Team 8

Thermodynamics Calculator

Build an app that converts temperatures between scales, calculates heat energy using Q=mcΔT, and demonstrates specific heat capacity concepts for different materials.

🎯 Learning Goals

  • Master Temperature scale conversions (C, F, K)
  • Understand Specific Heat Capacity and Energy transfer
  • Implement thermal equilibrium calculations for mixing
  • Build a reference-based calculator using material lists

🌎 Why This Matters

Thermodynamics allows us to design engines, refrigerators, and climate-controlled buildings. Whenever energy changes form or heat moves, these laws are at play. Mastering this helps you understand the energy efficiency of our modern world.

📖Understanding Heat & Thermodynamics

Theory Masterclass
"

Thermodynamics is the study of heat, temperature, and energy transfer. Temperature Scales: • Celsius (°C): Water freezes at 0°C, boils at 100°C • Fahrenheit (°F): Water freezes at 32°F, boils at 212°F • Kelvin (K): Absolute zero = 0K = -273.15°C. No negative temperatures! Heat Energy (Q): When you heat something up, the energy transferred is: Q = m × c × ΔT Where: Q = Heat energy (in Joules) m = Mass of the substance (in kg) c = Specific heat capacity (different for each material, in J/(kg·°C)) ΔT = Change in temperature = T_final - T_initial Specific Heat Capacity (c): • Water: 4186 J/(kg·°C) — very high! That's why water heats slowly • Iron: 450 J/(kg·°C) • Copper: 385 J/(kg·°C) • Aluminum: 897 J/(kg·°C) • Air: 1005 J/(kg·°C) • Ice: 2090 J/(kg·°C) Higher c means more energy needed to raise temperature by 1°C. Latent Heat: Energy needed for phase change (solid↔liquid↔gas) WITHOUT temperature change. Q = m × L (where L = latent heat)

Mathematical Foundation

fxQ = m × c × ΔT (heat energy)
fx°C to °F: F = (C × 9/5) + 32
fx°C to K: K = C + 273.15
fxLatent Heat: Q = m × L
fxHeat exchange: Q_lost = Q_gained (equilibrium)

🎨Part A — Designer View (UI Design)

Open MIT App Inventor → Switch to Designer view. Follow each step below to build the interface.

1

1. Screen Basics

• In the **Properties** panel (right) for **Screen1**. • Set **Title** to "Heat Calculator". • Set **AlignHorizontal** to Center. • Set **BackgroundColor** to dark red.

2

2. Input Fields

• Drag 3 **TextBoxes** renamed: 'MassTxt', 'SpecificHeatTxt', 'TempChangeTxt'. • Set each to **NumbersOnly**. • Give hints: "Mass (kg)", "Specific Heat (J/kg°C)", "Temp Change (°C)".

3

3. Action Button

• Drag a **Button** renamed 'CalcQBtn'. • Set text to "CALCULATE HEAT (Q)". • Change **BackgroundColor** to Orange.

4

4. Result Display

• Drag a **Label** renamed 'ResultLbl'. • Set **TextColor** to White and **FontSize** to 22.

🧩Part B — Blocks View (Logic & Calculation)

Switch to Blocks view. Now add the logic that makes your app actually work.

1

1. Switch to Blocks

• Click the **Blocks** button at the top right of the Designer screen.

2

2. The Heat Formula

• Q = m * c * ΔT. • Click **CalcQBtn** (Gold). Drag 'when CalcQBtn.Click' into the workspace. • Click **ResultLbl**. Drag the green 'set ResultLbl.Text to' and snap it inside. • Go to the **Math** drawer (Blue). Drag out two multiplication '*' blocks.

3

3. Multiplying Three Numbers

• Since the '*' block only has two slots, snap another '*' block inside one of the slots. • Now you have three slots: snap [MassTxt.Text], [SpecificHeatTxt.Text], and [TempChangeTxt.Text] into them.

4

4. Showing the Answer

• Go to the **Text** drawer (Bright Pink). Drag a 'join' block. • Join the math result with the word " Joules".

🧪Testing Your App

  • 100°C = 212°F = 373.15K
  • 0°C = 32°F = 273.15K
  • -273.15°C = 0K (absolute zero)
  • Heating 1kg water from 20°C to 100°C → Q = 334,400 J
  • Mix: 1kg water at 80°C + 1kg water at 20°C → Tf = 50°C

🚀Bonus Challenges

Extra credit — impress your instructor

  • Add phase change calculations (melting/boiling with latent heat)
  • Create a graph showing temperature vs time during heating
  • Add a 'How long to boil?' calculator given power input
  • Compare energy needed to heat same mass of different materials