Energy and power
Heat, Work and the First Law on a Cold Room
On this page
The compressor of a cold room runs twenty hours a day, the electricity bill is high, and nobody on site can say whether twenty hours is correct or a sign of a fault. The room holds its temperature, so no alarm sounds, and the loss continues for months. The answer starts with counting energy: how much heat enters the room in a day, and how much the machine can remove in an hour. This lesson gives you the rule for that count, the first law of thermodynamics, and applies it to the room and the machine that cools it. #Refrigeration #FirstLaw #EnergyBalance
Learning Objectives
By the end of this lesson, you will be able to:
- Distinguish energy from power, and convert between kJ, kWh and kW
- Apply the first law to a boundary drawn round a room or a machine
- Calculate the heat removed from a product when it is cooled, and the average load that this gives
- Explain the difference between sensible heat and latent heat, with numbers for water
- Calculate the heat a refrigerating machine rejects, and say where that heat goes
Real-World System Problem: A cold room for fresh produce
This course follows one cold room through every lesson. It is 4.0 m long, 3.0 m wide and 2.5 m high inside, and it is held at 4 °C. It stands inside a store building where the air is at 30 °C on the design day. Each day 500 kg of fresh fruit and vegetables arrive at 25 °C and must be cooled to 4 °C. The refrigerating machine has a cooling capacity of 3.0 kW at its design point.
Heat enters the room through the walls, ceiling and floor, with warm air each time the door opens, with the warm produce, and from the fans, the lights and the people inside. The machine must remove all of it. If it removes less, the room warms. If it removes more, the room cools below its setting and the thermostat stops the compressor.
So the compressor hours follow from the heat that enters. To judge twenty hours, add every heat flow in the same units and compare the total with what the machine can do. That is an energy balance.
Fundamental Theory: Counting energy across a boundary
Energy, heat and work
Energy is the quantity that is conserved. It can be stored in a body, for example as the temperature of 500 kg of produce, and it passes from one body to another in two ways.
Heat is energy that passes because of a temperature difference. When nothing else acts, it always goes from the warmer body to the colder one, as from the store air at 30 °C through the wall panels to the room air at 4 °C.
Work is energy that passes in any other way: a shaft that turns, a piston that pushes, an electric current that drives a motor. The electricity that drives the compressor is work.
Both are measured in joules (J). One joule is small, so refrigeration uses the kilojoule (kJ), 1,000 J.
Power against energy
Energy is an amount. Power is the rate at which energy passes: one joule per second is one watt (W), and the kilowatt (kW) is 1,000 W. Think of water: the energy is the water in a tank, the power is the flow from the tap.
The two are confused every day because the kilowatt-hour (kWh) on the electricity bill has “kilowatt” in its name. A kWh is an amount of energy: what passes in one hour at one kilowatt.
For the room of this course:
- The machine’s capacity, 3.0 kW, is a power: what it can do at one instant.
- In one hour of running it removes
kWh of heat, or 10,800 kJ: an energy. - A compressor that takes about 1.2 kW and runs 20 hours uses
kWh a day, which at 12.00 currency units per kWh costs 288 units.
A dot over a symbol means a rate.
The first law as bookkeeping
The first law of thermodynamics says that energy is not created and not destroyed. To use it, draw a closed line, the boundary, round the thing you study, the system. You may draw it anywhere; a good choice is one where you know, or can measure, everything that crosses. Then count, as a shop counts stock.
The first law for any boundary
Energy that crosses inward, minus energy that crosses outward, equals the change in the energy stored inside. When nothing inside changes with time (a steady state), the right side is zero and
Draw the boundary round the cold room. Energy crosses inward as heat through the panels, as warm air at the door, with the warm produce, and as electricity to the fans and lights. It crosses outward one way only: the refrigerant in the evaporator absorbs heat and carries it out. If the room stays at 4 °C from day to day, its stored energy does not change, so the heat carried out equals the heat that came in.
This answers the opening question in outline. A compressor that ran 20 hours yesterday near 3.0 kW removed about
That count holds only if the machine really delivered 3.0 kW while it ran. A coil blocked with frost, a hot day at the condenser or a lost refrigerant charge lowers the capacity, and then 20 hours can mean less heat removed, not more heat entering. So on site, check the capacity before you blame the loads. The air through the evaporator gives a first estimate, with the same
The sign convention
The form above, with “in” and “out” written as words, needs no signs, and this course uses it. Many textbooks write the first law for a closed system as
where
Sensible heat
Heat that changes a body’s temperature is sensible heat, because a thermometer can sense it. The amount depends on the mass, the temperature change and a property of the material, the specific heat.
Sensible heat
A temperature difference has the same number in kelvin and in degrees Celsius, so a fall from 25 °C to 4 °C is 21 K. Liquid water has
The formula takes
Latent heat
When a substance melts, freezes, boils or condenses, it gains or loses a large amount of heat at a constant temperature. This is latent heat, hidden heat, and the amount for each kilogram is a property of the substance.
Water gives the scale:
- To cool 1 kg of water from 25 °C to 0 °C:
kJ (sensible). - To freeze that 1 kg at 0 °C: 334 kJ (latent heat of fusion).
- To evaporate 1 kg of water near 0 °C: about 2,500 kJ (latent heat of vaporisation).
Freezing one kilogram of water takes as much heat as cooling it by
Latent heat matters in a cold room in two places. The refrigerant absorbs heat in the evaporator by boiling and gives it away in the condenser by condensing, so each kilogram carries far more heat than a temperature change alone could. And the water vapour in warm door air gives its latent heat to the room’s load when it condenses or freezes on the cold evaporator.
A refrigerator moves heat
No machine produces a substance called “cold”. A body is cold when heat has been taken out of it. A refrigerating machine takes heat from a place at low temperature and delivers it to a warmer place, as a pump lifts water from a low tank to a high one.
Heat does not go from cold to warm by itself, so the machine needs work: the electricity the compressor uses. Here the pump picture stops: a pump’s work does not become water, but the compressor’s work becomes heat and leaves with the rest. The refrigerant is the carrier: it boils at a low temperature in the evaporator and takes heat from the room air, the compressor raises its pressure, and it condenses at a high temperature in the condenser and gives the heat to the surrounding air.
The energy balance of the whole machine
Now draw the boundary round the whole refrigerating machine: evaporator, compressor, condenser and the pipes between them. In a steady state the refrigerant inside stores no more energy from one minute to the next. Three flows cross the boundary.
First law for a refrigerating machine
The condenser always rejects more heat than the evaporator absorbs: the difference is the work, turned into heat. So the machine is a net heater of any space that contains all of it. A refrigerator with its door open warms a kitchen, at a rate equal to its electrical input.
In this lesson
Application 1: Energy to cool the daily produce
Step 1: Heat to remove
Click to reveal the energy calculation
-
Temperature change.
The produce falls through 21 K. ✅
-
Sensible heat. Nothing freezes, so all of the heat is sensible.
The room must lose 39,900 kJ each day for the produce alone. ✅
-
Convert to kWh.
This is 11.08 kWh of heat, not of electricity. ✅
Step 2: Average load
The same energy gives a different power when the time changes.
Click to reveal the two loads
-
Spread over 24 hours. Twenty-four hours is 86,400 s.
Averaged over the day, the produce is a load of 462 W, which is 15.4 percent of the 3.0 kW capacity. ✅
-
Completed in 8 hours. Eight hours is 28,800 s.
During an 8-hour pull-down the produce takes 46.2 percent of the capacity. ✅
-
Ratio. The time is 3 times shorter, so the power is 3 times higher:
W (from the unrounded 461.8 W). The energy is the same in both cases. ✅
Step 3: Check a second way
Click to reveal the check
-
Per kilogram. Each kilogram gives up
kJ. For 500 kg that is kJ, the same as Step 1. ✅ -
Compressor hours. At 3.0 kW the machine removes 3.0 kWh in each hour of running.
The produce alone explains 3.69 hours of running each day. ✅
-
Python. The script below reports 39,900 kJ, 11.08 kWh, 462 W and 1,385 W. ✅
Application 2: First-law balance of the machine
Step 1: Heat rejected
Click to reveal the machine balance
-
Boundary. Draw it round the whole machine. Heat enters at the evaporator, work enters at the compressor, heat leaves at the condenser. The state is steady. ✅
-
Balance.
The condenser rejects 4.2 kW. ✅
-
Ratios. The condenser rejects
times the heat that the evaporator absorbs. Each kilowatt of electricity moves kW of heat out of the room. ✅
Step 2: The air that passes through the condenser
Click to reveal the air temperature rise
-
Mass flow of air.
The fan moves 0.432 kg of air each second. ✅
-
Boundary round the air stream. In a steady state the air gains, as sensible heat, exactly what the refrigerant gives away.
Air that enters at 30 °C leaves at about 39.7 °C. ✅
Step 3: The store building
Click to reveal the building balance
-
A new boundary. Draw it round the whole store building, with the cold room and the condensing unit both inside. The 3.0 kW that the evaporator absorbs and the 4.2 kW that the condenser rejects are now both inside the boundary. Neither crosses it. ✅
-
What crosses. The electricity crosses inward at 1.2 kW. If all the heat that the cold room absorbs comes from the building’s own air, nothing else is added, and the net heating of the building is
The building gains heat at the rate of the compressor’s electrical input. ✅
-
Outside air needed. Ventilation air that enters at the outside temperature and leaves 3 K warmer must carry 1.2 kW.
The building volume is
, so this is air changes per hour. ✅ -
Check with the script. The script reports 4.2 kW, a rise of 9.7 K, 0.415 m³/s and 3.9 air changes per hour. ✅
Verify It in Python
The script repeats both applications and the water figures, and then gives the daily totals for a compressor that runs 20 hours. It needs only numpy and matplotlib. The plot shows the product load against the time allowed for cooling: one energy, many possible powers.
"""First law on a cold room: product load, and the energy balance of the machine."""import numpy as npimport matplotlib.pyplot as plt
KJ_PER_KWH = 3600.0
# ---------- Application 1: cooling the daily produce ----------MASS = 500.0 # kg of produce a dayCP = 3.8 # kJ/(kg.K), produce above freezingT_IN, T_ROOM = 25.0, 4.0 # degCCAPACITY = 3.0 # kW, cooling capacity at the design point
delta_t = T_IN - T_ROOMq_kj = MASS * CP * delta_tq_kwh = q_kj / KJ_PER_KWHprint("Application 1: product load")print(f" temperature fall: {delta_t:.0f} K")print(f" heat to remove: {q_kj:,.0f} kJ = {q_kwh:.2f} kWh")print(f" per kilogram: {CP * delta_t:.1f} kJ/kg")for hours in (24.0, 8.0): watts = q_kj * 1000.0 / (hours * 3600.0) print(f" average over {hours:.0f} h: {watts:,.0f} W " f"({100.0 * watts / (CAPACITY * 1000.0):.1f} % of capacity)")print(f" compressor hours for the product alone: {q_kwh / CAPACITY:.2f} h")
# ---------- Sensible against latent heat, 1 kg of water ----------CP_WATER, H_FUSION, H_VAP = 4.18, 334.0, 2500.0 # kJ/(kg.K), kJ/kg, kJ/kgsensible = CP_WATER * 25.0print("Water, 1 kg")print(f" cool from 25 to 0 degC: {sensible:.1f} kJ")print(f" freeze at 0 degC: {H_FUSION:.0f} kJ " f"(same as cooling liquid water by {H_FUSION / CP_WATER:.1f} K)")print(f" evaporate near 0 degC: {H_VAP:.0f} kJ " f"({H_VAP / H_FUSION:.1f} times the heat of fusion)")
# ---------- Application 2: the machine ----------Q_E = 3.0 # kW, heat in at the evaporatorW_IN = 1.2 # kW, compressor input (given)V_COND = 0.45 # m3/s, air through the condenserRHO_AIR, CP_AIR = 0.96, 1.005 # kg/m3 at the site, kJ/(kg.K)RISE_ALLOWED = 3.0 # K, allowed rise of the building airVOLUME = 12.0 * 8.0 * 4.0 # m3, store building
q_c = Q_E + W_INprint("Application 2: machine balance")print(f" heat rejected at the condenser: {q_c:.1f} kW")print(f" ratio rejected / absorbed: {q_c / Q_E:.2f}")print(f" ratio absorbed / work: {Q_E / W_IN:.2f}")rise_cond = q_c / (V_COND * RHO_AIR * CP_AIR)print(f" condenser air temperature rise: {rise_cond:.1f} K")print(f" net heat added to a closed building: {W_IN:.1f} kW")vent = W_IN / (RHO_AIR * CP_AIR * RISE_ALLOWED)print(f" outside air needed for a {RISE_ALLOWED:.0f} K rise: {vent:.3f} m3/s " f"= {vent * 3600.0 / VOLUME:.1f} air changes per hour")m_air = VOLUME * RHO_AIRrate = W_IN / (m_air * CP_AIR) * 3600.0print(f" building air: {m_air:.0f} kg, warming at {rate:.1f} K per hour " f"if the air alone stored the heat")
# ---------- Daily energy for a stated run time ----------RUN_HOURS, PRICE = 20.0, 12.00print(f"Daily energy at {RUN_HOURS:.0f} h of running")print(f" heat removed from the room: {Q_E * RUN_HOURS:.1f} kWh")print(f" compressor input: {W_IN * RUN_HOURS:.1f} kWh, " f"cost {W_IN * RUN_HOURS * PRICE:.0f} units")print(f" heat rejected: {q_c * RUN_HOURS:.1f} kWh")print(f" run time fraction: {RUN_HOURS / 24.0:.3f}")print(f" load not explained by the product: " f"{Q_E * RUN_HOURS - q_kwh:.2f} kWh " f"= {(Q_E * RUN_HOURS - q_kwh) * 1000.0 / 24.0:,.0f} W average")
# ---------- Plot: product load against pull-down time ----------hours = np.linspace(2.0, 24.0, 200)load_w = q_kj * 1000.0 / (hours * 3600.0)fig, ax = plt.subplots(figsize=(8, 4.5))ax.plot(hours, load_w, label="product load")ax.axhline(CAPACITY * 1000.0, color="gray", linestyle="--", label="cooling capacity, 3.0 kW")for h in (8.0, 24.0): w = q_kj * 1000.0 / (h * 3600.0) ax.plot(h, w, "o", color="black") ax.annotate(f"{w:,.0f} W", (h, w), textcoords="offset points", xytext=(-10, 12))ax.set_xlabel("time allowed to cool the produce (h)")ax.set_ylabel("average load (W)")ax.set_title("500 kg of produce from 25 to 4 degC: the same energy, different power")ax.set_xlim(0.0, 25.0)ax.set_ylim(0.0, 6000.0)ax.legend()fig.tight_layout()fig.savefig("cold_room_first_law.png", dpi=120)print("Saved cold_room_first_law.png")Expected output
Application 1: product load temperature fall: 21 K heat to remove: 39,900 kJ = 11.08 kWh per kilogram: 79.8 kJ/kg average over 24 h: 462 W (15.4 % of capacity) average over 8 h: 1,385 W (46.2 % of capacity) compressor hours for the product alone: 3.69 hWater, 1 kg cool from 25 to 0 degC: 104.5 kJ freeze at 0 degC: 334 kJ (same as cooling liquid water by 79.9 K) evaporate near 0 degC: 2500 kJ (7.5 times the heat of fusion)Application 2: machine balance heat rejected at the condenser: 4.2 kW ratio rejected / absorbed: 1.40 ratio absorbed / work: 2.50 condenser air temperature rise: 9.7 K net heat added to a closed building: 1.2 kW outside air needed for a 3 K rise: 0.415 m3/s = 3.9 air changes per hour building air: 369 kg, warming at 11.7 K per hour if the air alone stored the heatDaily energy at 20 h of running heat removed from the room: 60.0 kWh compressor input: 24.0 kWh, cost 288 units heat rejected: 84.0 kWh run time fraction: 0.833 load not explained by the product: 48.92 kWh = 2,038 W averageSaved cold_room_first_law.pngThe building air line shows how little heat air stores: its 369 kg would warm by 11.7 K in an hour if it alone took the 1.2 kW. A real building warms far more slowly, because walls, floor and stock absorb heat too, but a closed plant room still becomes hot within an afternoon. The last lines answer the opening question in numbers: 20 hours at 3.0 kW removed 60.0 kWh of heat, and the produce explains only 11.08 kWh of it.
Common Mistakes
- Mixing kW and kWh. A capacity is a power in kW, a day’s consumption an energy in kWh. Multiply a power by hours to get kWh, and never add the two.
- Reading 11.08 kWh of heat as 11.08 kWh of electricity. The machine moves about 2.5 kWh of heat with each kWh of electricity, so the electricity for this heat is much less.
- Believing the machine “makes cold” and that its heat disappears. All the heat taken from the room, plus the compressor’s work, leaves at the condenser and must go somewhere.
- Adding 273 to a temperature difference. A fall from 25 °C to 4 °C is 21 K. Only an absolute temperature needs the 273.15.
- Using the sensible heat formula across a change of phase. Freezing, melting, boiling and condensing need the latent heat, and the temperature does not change while they happen.
- Applying a textbook formula with signs without checking that book’s sign convention for work.
Summary
- Energy is an amount, in kJ or kWh. Power is a rate, in kW. One kWh is 3,600 kJ.
- The first law is bookkeeping on a boundary: energy in minus energy out equals the change in stored energy, and in a steady state energy in equals energy out.
- Sensible heat changes temperature,
. Latent heat changes phase at constant temperature, and for water it is 334 kJ/kg to freeze and about 2,500 kJ/kg to evaporate. - Cooling 500 kg of produce from 25 °C to 4 °C takes 39,900 kJ, or 11.08 kWh. That is 462 W averaged over a day and 1,385 W over 8 hours.
- A refrigerating machine moves heat. The condenser rejects the evaporator heat plus the work: 3.0 kW plus 1.2 kW gives 4.2 kW, and a closed building that contains the whole machine is heated by it.
Exercises
1. A compressor takes 1.2 kW and runs 20 hours a day. Electricity costs 12.00 currency units per kWh. Find the daily energy in kWh and in kJ, and the cost for a day and for a year of 365 days.
Answer
2. A dairy cools 800 kg of milk from 35 °C to 4 °C in 3 hours. Take the specific heat of milk as
Answer
3. An ice maker turns 50 kg of water at 20 °C into ice at 0 °C. Use
Answer
Sensible:
4. On a different machine, the heat rejected at the condenser is measured as 5.6 kW and the compressor input as 1.6 kW. Find the heat absorbed at the evaporator, and the heat moved for each kilowatt of work.
Answer
From
5. The cold room of this lesson held 4 °C all day while its compressor ran 20 hours at a capacity of 3.0 kW. Find the run time fraction, the heat that entered the room in the day, and the average load, in watts, that the 500 kg of produce does not explain.
Answer
Run time fraction:
6. The store building of Application 2 (384 m³ of air, density
Answer
Mass of air:
References
- Y. A. Çengel and M. A. Boles, Thermodynamics: An Engineering Approach, 8th edition, McGraw-Hill, 2015.
- W. F. Stoecker and J. W. Jones, Refrigeration and Air Conditioning, 2nd edition, McGraw-Hill, 1982.
- ASHRAE, ASHRAE Handbook: Refrigeration, 2022 (chapters on refrigeration load and on thermal properties of foods).
On a hot day, someone leaves a refrigerator running with its door open in a small closed kitchen. After an hour, the kitchen air is:
The produce is cooled to the room's 4 °C, with a specific heat of 3.8 kJ/(kg·K). The area of the rectangle is power × time, which is the energy: it stays the same while you change the time, and only the mass or the entering temperature changes it. The dashed line is the 3.0 kW capacity. Any part of the rectangle above it is load the machine cannot remove in time, before the walls, the door and the fans take their share.
- Draw a boundary round the cold room. Then count what crosses it.
- Four flows of heat cross inward and one leaves with the refrigerant. On a steady day, in equals out.
- 20 hours near 3.0 kW carried 60 kWh out, so 60 kWh came in.
- Check the capacity first: coil air cooled 5.7 K means 3.0 kW; only 4 K means 2.1 kW.
Check yourself
Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.
1. A smaller store receives 300 kg of fruit a day at 28 °C and cools it to 2 °C in 6 hours. The specific heat is 3.8 kJ/(kg·K). What average load does the fruit put on the machine during those 6 hours?
2. In the machine of this lesson the condenser rejects 4.2 kW into air at 0.45 m³/s, and that air warms by 9.7 K. Dust on the coil halves the air flow to 0.225 m³/s. Take the heat rejected as still about 4.2 kW. By how much does the air now warm?
3. Damp air enters at the door, and in one day 2 kg of its water vapour freezes on the evaporator coil as frost. About how much heat does this add to the room's load? Use about 2,500 kJ/kg to condense vapour and 334 kJ/kg to freeze water.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.