Energy accounts for machines
In Energy and efficiency you met the rule that energy is never created or destroyed, and used it on roller coasters, kettles and stairs. Those were mechanical stories: height became speed, and friction turned some of it into "waste heat". Most of the machines that power the world are not like that. A car engine, a jet engine, a gas turbine in a power station, a refrigerator, a heat pump and a steam turbine all work by heating, compressing and expanding a fluid. In each of them heat becomes work or work moves heat, and the fluid's temperature, pressure and volume all change at once.
To design such a machine you need to know how much fuel it burns, how much power it delivers, how hot its parts get and how much cooling it needs. Every one of those numbers starts with an energy balance, and thermodynamics is the discipline of writing energy balances for fluids correctly. Its first law is conservation of energy again, but made precise enough to handle heat, work, flowing streams and substances that boil.
This lesson builds that precision. You will learn to draw a boundary around exactly the thing you are accounting for, to tell the two ways energy crosses it (work and heat) from the energy stored inside it, to compute the work of a gas being compressed or expanded, and to apply the first law to the steady-flow devices — nozzles, compressors, turbines, heat exchangers — from which every engine and power plant is assembled. Chemists use the same law to follow the energy of reactions in Lumenary Chemistry's thermochemistry; here the focus is on machines.
Systems, states and processes
Every thermodynamic calculation begins by choosing what to account for. The system is the region of space or quantity of matter you study; everything else is the surroundings; and the surface between them is the boundary. The boundary is your choice, and a clever choice often makes a hard problem easy, exactly as a well-chosen free-body diagram does in statics.
There are two kinds of system.
- A closed system (also called a control mass) has a fixed amount of matter: nothing crosses its boundary except energy. The gas trapped in a cylinder under a piston is the classic example. The boundary may move, as the piston does.
- An open system, or control volume, is a region of space through which matter flows: a turbine, a pump, a nozzle, a car radiator. Mass, and the energy it carries, cross its boundary at inlets and outlets.
The condition of a system is its state, described by properties: pressure , temperature , volume , mass , internal energy and others you will meet below. Properties that grow with the amount of matter (, , ) are extensive; those that do not (, , density) are intensive. Dividing an extensive property by the mass gives a specific property, written in lower case: specific volume in m³/kg, specific internal energy in J/kg. Engineers work per kilogram most of the time, because the answers then apply to a machine of any size.
How many properties do you need to pin down a state? For a simple compressible substance — a single pure substance whose only important form of work is expansion or compression, which covers air, steam and refrigerants in most machines — two independent intensive properties fix the state. Give the pressure and temperature of air and its density, internal energy and every other property follow.
A process is a change from one state to another, and the path is the series of states it passes through. A process slow enough that the system stays practically in equilibrium at every instant is quasi-equilibrium (or quasi-static); only then do and have single values throughout the system and the path can be drawn as a line on a diagram. A cycle is a process that returns the system to its starting state, as the working fluid of every engine and refrigerator does.
"Quasi-equilibrium" sounds like a fiction, but it is a good model of real machines more often than you might expect. A car engine at 3000 rpm compresses its charge in about a hundredth of a second, yet pressure waves cross a 9 cm cylinder in about a quarter of a millisecond, so the pressure stays nearly uniform. The model fails for sudden events, such as a gas rushing into an evacuated tank, and there you must not draw a path at all.
Work, heat, internal energy and enthalpy
Energy crosses a boundary in only two ways.
Definition— heat
Heat is energy that crosses a boundary because of a temperature difference between the system and its surroundings. A process with no heat transfer is adiabatic.
Definition— work
Work is energy that crosses a boundary in any other way: a force moving its point of application, a rotating shaft, an electric current. For a simple compressible system, the work done by the system as its boundary moves in a quasi-equilibrium process is the boundary work
the area under the path on a – diagram.
Neither heat nor work is something a system contains. Both are energy in transit, recorded only while they cross the boundary, and both depend on the path, not just on the end states. What a system does contain is its internal energy : the kinetic energy of its molecules' jiggling and spinning, and the potential energy of the forces between them and within them. is a property.
This course follows the custom of mechanical engineering: is positive when heat flows into the system, and is positive when the system does work on its surroundings. An engine's job is to produce work, so engineers count that as positive. Chemists, and IUPAC, count both as positive when energy flows in, and write the first law as . The physics is identical; only the sign of differs, so always check which convention a formula uses before borrowing it.
Theorem— The first law of thermodynamics
For a closed system going from state 1 to state 2,
where and are the changes in the bulk kinetic and gravitational potential energy of the system as a whole. For a stationary system, . Over a cycle, the system returns to its starting state, so : the net heat in equals the net work out.
The first law cannot be proved from anything simpler; it summarises experiment. Its key experimental content is this: in the 1840s Joule found that whatever way he did work on an insulated tank of water — a paddle wheel, compressing air, an electric current through a wire — the same amount of work always produced the same rise in temperature.
Enthalpy
Many machines handle fluids at nearly constant pressure, or with fluid flowing in and out. In both cases the combination keeps appearing, so it gets a name.
Definition— enthalpy
The enthalpy of a system is , and its specific enthalpy is , in J/kg. Since , and are properties, so is . For a closed system heated at constant pressure in a quasi-equilibrium process, .
The last claim follows in one line: at constant the boundary work is , so .
Ideal gases and specific heats
Definition— ideal gas
An ideal gas obeys , with in kelvin and the gas constant of the particular gas: the universal constant J/(mol K) divided by the molar mass. For air, g/mol and J/(kg K). The internal energy and enthalpy of an ideal gas depend on temperature only.
Definition— specific heats
The specific heat at constant volume is and the specific heat at constant pressure is . For an ideal gas , , and . Their ratio is (also written ). For air near room temperature, kJ/(kg K), kJ/(kg K) and . For liquids and solids, which barely change volume, ; for liquid water kJ/(kg K).
Air is very nearly ideal at ordinary temperatures and pressures, with errors well under 1%. The specific heats do rise with temperature, though: of air is about 1.12 kJ/(kg K) at 900 K and higher still in combustion gases, so a hot-section calculation with room-temperature values can be several per cent off. Professional calculations use temperature-dependent data; this lesson uses constant values, which is the right first step.
Ideal-gas processes, computed
Take 10 litres of air in a cylinder at 100 kPa and 300 K (state A), and bring it to 150 kPa and 14 litres (state B). There are infinitely many ways to do it. Here are three, drawn on a – diagram whose pressure axis starts at zero, so that the area under each path is the boundary work it does.
The program computes the mass of air and the temperature at B from the ideal-gas law, integrates along each path numerically with the trapezoidal rule, and then uses the first law to find the heat.
import numpy as np
# 10 litres of air in a cylinder go from state A to state B by three different paths.
R, cv = 287.0, 718.0 # J/(kg K) for air, treated as an ideal gas with constant cv
pA, VA, TA = 100e3, 0.010, 300.0
pB, VB = 150e3, 0.014
m = pA * VA / (R * TA) # mass of air, kg
TB = pB * VB / (m * R) # ideal-gas law at B
def work(p, V):
"""Boundary work: the integral of p dV along a path, by the trapezoidal rule."""
return float(np.sum(0.5 * (p[1:] + p[:-1]) * np.diff(V)))
s = np.linspace(0.0, 1.0, 2001) # a parameter running along each leg
paths = {
"heat at fixed V, then expand at 150 kPa": (
np.r_[pA + (pB - pA) * s, np.full(s.size, pB)],
np.r_[np.full(s.size, VA), VA + (VB - VA) * s]),
"expand at 100 kPa, then heat at fixed V": (
np.r_[np.full(s.size, pA), pA + (pB - pA) * s],
np.r_[VA + (VB - VA) * s, np.full(s.size, VB)]),
"straight line on the p-V diagram": (
pA + (pB - pA) * s, VA + (VB - VA) * s),
}
dU = m * cv * (TB - TA) # depends only on the end states
print(f"m = {m * 1000:.2f} g of air, T_A = {TA:.0f} K, T_B = {TB:.0f} K, dU = {dU:.0f} J\n")
print(f"{'path':42} {'W (J)':>7} {'Q = dU + W (J)':>15}")
for name, (p, V) in paths.items():
W = work(p, V)
print(f"{name:42} {W:7.0f} {dU + W:15.0f}")The 11.61 g of air gains 2752 J of internal energy whichever way it goes, because is a property. But the work ranges from 400 J to 600 J and the heat from 3152 J to 3352 J. Expanding while the pressure is high does more work, and the extra work must be paid for with extra heat. This is the whole reason engines are designed around particular paths: the path decides how much of the heat comes out as work.
Polytropic processes
Many real compressions and expansions follow, closely enough, a curve for some exponent , called a polytropic process. Special values of give the textbook cases:
| process | what is held constant | |
|---|---|---|
| 0 | isobaric | pressure |
| 1 | isothermal (for an ideal gas) | temperature, since |
| reversible adiabatic (isentropic) | no heat transfer | |
| isochoric | volume |
Integrating with gives the work done by the gas,
and for an ideal gas . That the reversible adiabatic process has follows from the first law: with , , and substituting and and integrating gives .
The next program compresses a kilogram of air to an eighth of its volume, as in a petrol engine's compression stroke, along four polytropic paths, and checks each formula against a brute-force integral.
import numpy as np
# Compress 1 kg of air from 100 kPa and 300 K to one eighth of its volume, along
# polytropic paths p v^n = constant. Per kilogram: v in m^3/kg, w and q in kJ/kg.
R, gamma = 0.287, 1.4 # kJ/(kg K) and cp/cv for air
cv = R / (gamma - 1) # 0.7175 kJ/(kg K), consistent with gamma
p1, T1, r = 100.0, 300.0, 8.0 # kPa, K, volume ratio v1/v2
v1 = R * T1 / p1
v2 = v1 / r
def polytropic_work(p1, v1, v2, n):
"""Work done BY the gas, w = integral of p dv, along p v^n = constant."""
if abs(n - 1.0) < 1e-12: # isothermal: p v = constant
return p1 * v1 * np.log(v2 / v1)
p2 = p1 * (v1 / v2) ** n
return (p2 * v2 - p1 * v1) / (1.0 - n)
print(" n T2 (K) p2 (kPa) work in (kJ/kg) heat out (kJ/kg)")
for n, label in [(1.0, "isothermal"), (1.2, ""), (1.3, ""), (1.4, "adiabatic")]:
p2 = p1 * r ** n
T2 = p2 * v2 / R
w = polytropic_work(p1, v1, v2, n) # negative: work is done ON the gas
du = cv * (T2 - T1)
q = du + w # first law, q - w = du
# check the formula against a brute-force integral of p dv
v = np.linspace(v1, v2, 100001)
p = p1 * (v1 / v) ** n
w_num = np.sum(0.5 * (p[1:] + p[:-1]) * np.diff(v))
assert abs(w_num - w) < 1e-6 * abs(w)
print(f"{n:4.1f} {T2:9.0f} {p2:10.0f} {-w:14.1f} {round(-q, 6) + 0.0:17.1f} {label}".rstrip())Compressing adiabatically takes 279 kJ/kg and heats the air to 689 K, over 400 °C, with no heat added at all: all the work goes into internal energy. That is why a bicycle pump warms up, and why a diesel engine, which compresses by a factor of 15 to 20, needs no spark: the air is hot enough to ignite the fuel sprayed into it. Compressing isothermally takes only 179 kJ/kg, because the gas stays cool and its pressure rises less, but all 179 kJ must be removed as heat while it happens. Real compressors lie in between, and cooling during compression (or between stages, as you will see in power and refrigeration cycles) saves work.
Open systems: the steady-flow energy equation
Most machines are not closed systems: fluid streams through them. To account for a control volume you need two balances, one for mass and one for energy, and one new idea.
The new idea is flow work. To push a kilogram of fluid into a control volume against the pressure at the inlet, the fluid behind it must do work on it. So each kilogram crossing an inlet brings in not only its internal, kinetic and potential energy, , but also the flow work . The sum is the enthalpy , and this is the main reason enthalpy is so useful: it is the energy a flowing stream carries, flow work included.
Definition— steady flow
A control volume is in steady flow when nothing inside it changes with time: the mass and energy inside are constant, and the properties at each inlet and outlet do not change. A gas turbine running at constant load, or a radiator in a car cruising on a motorway, is in steady flow; the same machines starting up are not.
Theorem— Steady-flow balances for one inlet and one outlet
Mass: , where is the flow area and the mean velocity.
Energy, with heat transfer rate into the control volume and power out of it (not counting flow work):
This steady-flow energy equation is used more than any other equation in thermal engineering. Each device makes some terms negligible, and what remains is usually a one-line calculation.
| Device | Usually negligible | What remains |
|---|---|---|
| Nozzle, diffuser | , , | : enthalpy traded for speed |
| Turbine | (small), , | , power out |
| Compressor, pump, fan | (small), , | , power in |
| Throttling valve, porous plug | , , , | |
| Heat exchanger (no losses) | , , , to the outside | heat lost by the hot stream = heat gained by the cold one |
For an ideal gas, ; for a liquid, . The program below works through one example of each kind.
# The steady-flow energy equation, one inlet and one outlet, in SI units (J, kg, s):
# Q_dot - W_dot = m_dot * [(h2 - h1) + (V2**2 - V1**2) / 2 + g * (z2 - z1)]
g = 9.81
def heat_minus_work(m_dot, dh, V1=0.0, V2=0.0, dz=0.0):
"""Q_dot - W_dot in watts, for a mass flow m_dot (kg/s) and an enthalpy change dh (J/kg)."""
return m_dot * (dh + (V2**2 - V1**2) / 2 + g * dz)
cp_air, cp_gas, c_water = 1005.0, 1150.0, 4180.0 # J/(kg K); cp_gas: hot combustion products
# 1. Adiabatic nozzle (Q = 0, W = 0): air cools from 600 K to 520 K and speeds up.
V1 = 40.0
V2 = (V1**2 + 2 * cp_air * (600 - 520)) ** 0.5
print(f"nozzle: exit velocity {V2:7.0f} m/s")
# 2. Adiabatic compressor: 1.5 kg/s of air heated by compression from 288 K to 560 K.
W = -heat_minus_work(1.5, cp_air * (560 - 288)) # Q = 0, so W = -(Q - W)
print(f"compressor: power absorbed {-W / 1e3:7.0f} kW")
# 3. Adiabatic gas turbine: 1.5 kg/s of hot gas expands from 1400 K to 850 K.
W = -heat_minus_work(1.5, cp_gas * (850 - 1400))
print(f"turbine: power delivered {W / 1e3:7.0f} kW")
# 4. Electric shower (a heat exchanger with an electric heater): 8 L/min from 12 to 40 C.
m_dot = 8 / 60 # 8 kg of water per minute
Q = heat_minus_work(m_dot, c_water * (40 - 12)) # W = 0
print(f"shower: heating power needed {Q / 1e3:7.1f} kW")
print(f" flow a 9.5 kW heater can warm by 28 K: {9.5e3 / (c_water * 28) * 60:.1f} L/min")
# 5. How big are the kinetic and potential energy terms, compared with 1 K of heating air?
print(f"\n1 K of air heating: {cp_air:.0f} J/kg; KE at 2 m/s: {2**2 / 2:.0f} J/kg;"
f" KE at 45 m/s: {45**2 / 2:.0f} J/kg; 10 m of height: {g * 10:.0f} J/kg")Read the results as an engineer would.
- The nozzle turns an 80 K temperature drop into a speed of 403 m/s. That is how a jet engine's exhaust or a steam turbine's nozzles make high-speed jets: enthalpy becomes kinetic energy.
- The compressor and turbine handle the same 1.5 kg/s. The turbine delivers 949 kW and the compressor absorbs 410 kW. Put a combustion chamber between them to heat the air, and the 539 kW difference is the net output of a small gas turbine, which is the Brayton cycle of the next lesson but one.
- The shower needs 15.6 kW to heat a comfortable 8 litres per minute by 28 K. Electric showers, common in the United Kingdom and Brazil, are rated around 10 kW or less, so they can heat only about 5 litres a minute through the same rise; that is why their flow feels weaker than a gas-heated or stored hot-water supply. Nothing clever in the plumbing can change this: it is the first law.
- The last line shows when kinetic and potential energy matter. A metre-per-second flow in a pipe carries a few joules per kilogram of kinetic energy, against about 1000 J/kg for each kelvin of temperature change. Only in nozzles, diffusers and high-speed flow does kinetic energy compete, and height matters mainly for liquids pumped uphill, the subject of fluid statics and Bernoulli.
Throttling
A throttling valve — a partly closed valve, a capillary tube, a porous plug — drops the pressure of a stream without doing work or exchanging heat. The steady-flow equation leaves only . For an ideal gas, depends only on , so the temperature does not change. Real fluids are not ideal, and for most of them at ordinary conditions a throttle cools the stream (the Joule–Thomson effect). For a liquid near its boiling point the effect is dramatic: part of it flashes into vapour, taking the energy for evaporation from the rest, and the mixture leaves much colder. That is the cold side of every refrigerator.
Property tables in outline
Air in an engine can be treated as an ideal gas, but water in a boiler and refrigerant in a fridge boil and condense. For them you need property data: tables, equations or software that give , , and (in the next lesson) entropy as functions of the state.
When a pure substance is heated at constant pressure, it passes through recognisable stages. A compressed (subcooled) liquid warms until it reaches the saturation temperature for that pressure (100 °C for water at 101.42 kPa, about 46 °C at 10 kPa, 311 °C at 10 MPa). It then boils at constant temperature: while liquid and vapour coexist, the mixture is saturated, and pressure and temperature are no longer independent. When the last drop has evaporated it is saturated vapour, and further heating gives superheated vapour. Above the critical point (374 °C and 22.06 MPa for water) the distinction between liquid and vapour disappears.
Inside the two-phase region, temperature and pressure no longer fix the state, so a second property is needed: the quality , the mass fraction that is vapour. Any specific property of the mixture is then a mass-weighted average,
where the subscript means saturated liquid, saturated vapour, and the difference . A saturation table lists , , , , , , and more at each saturation state; superheated tables list properties at chosen pressures and temperatures. For water at 100 °C, for instance, kJ/kg, kJ/kg and kJ/kg, while is about 1600: a litre of boiling water becomes about 1600 litres of steam.
Example— Boiling dry and wet steam
In Energy and efficiency a kettle needed about 336 kJ to heat a litre of water from 20 °C to 100 °C. Boiling that kilogram away completely takes kJ more, nearly seven times as much. This is why a pan that has come to the boil takes so long to boil dry, and why steam at 100 °C scalds far worse than water at 100 °C: it releases as it condenses on skin.
Steam leaving a vessel at atmospheric pressure with a quality of (5% of its mass as fine droplets) has kJ/kg, about 113 kJ/kg less than dry saturated steam. Steam-turbine designers watch this closely, because water droplets moving at turbine speeds erode the last rows of blades.
Where do the numbers come from? For water, an international body, the International Association for the Properties of Water and Steam (IAPWS), maintains agreed formulations fitted to the best measurements: IAPWS-95 for scientific use and the faster IAPWS-IF97 for industry. Printed steam tables, textbook appendices and software all derive from them. You can generate tables for water, air, refrigerants and many other fluids, at any states you choose, from the free NIST Chemistry WebBook. In professional work you would call a property library from code rather than interpolate in printed tables: NIST's REFPROP (licensed), the open-source CoolProp, and the property functions built into process simulators and into equation solvers such as EES. For example, with CoolProp installed on your own computer:
# Not run here: CoolProp is not available in the browser. Install it with pip on your own machine.
from CoolProp.CoolProp import PropsSI
h_f = PropsSI("H", "T", 373.15, "Q", 0, "Water") # J/kg, saturated liquid at 100 C
h_g = PropsSI("H", "T", 373.15, "Q", 1, "Water") # J/kg, saturated vapour at 100 C
print((h_g - h_f) / 1e3, "kJ/kg") # the enthalpy of vaporisationEnergy balances in practice
The first law is the backbone of a mechanical engineer's thermal work, from back-of-the-envelope estimates to multi-million-pound acceptance tests.
- Heat and mass balances. Every power plant, chemical plant, building services system and data-centre cooling plant is designed around a diagram of streams, each labelled with its flow, pressure, temperature and enthalpy, that must satisfy the mass and energy balances at every component. Process simulators (commercial ones such as Aspen HYSYS and gPROMS, and open-source ones such as DWSIM) solve thousands of such balances at once, with property libraries underneath.
- Performance testing. When a new turbine or compressor is delivered, its power and efficiency are measured from flows, pressures and temperatures, and computed by energy balances following agreed procedures such as ASME's Performance Test Codes or the corresponding ISO and IEC standards, so that buyer and seller agree on the numbers.
- Combustion and chemistry. When a fuel burns inside the control volume, the enthalpies must include chemical energy, measured from a common reference using enthalpies of formation, as in Lumenary Chemistry's thermochemistry. Open-source tools such as Cantera handle this for engine and burner design.
The first law has one famous limitation. It says energy is conserved, but nothing about which way processes go: it would be perfectly content for a cup of tea to grow hotter by drawing heat from a cooler room, or for an engine to turn all of its heat into work. Both never happen, and the reason is the subject of the second law and entropy.
A short history
The – diagram is older than thermodynamics. James Watt and his assistant John Southern built an indicator in the 1790s: a small piston and spring connected to an engine cylinder, with a pencil that traced pressure against piston position on a moving card. The area of the loop measured the work per stroke, and Watt's firm guarded the device as a trade secret. Half a century later Julius Robert Mayer in Germany (1842) and James Joule in England (from 1843) argued that heat and work are interchangeable at a fixed rate, Joule backing it with careful paddle-wheel experiments, and Hermann von Helmholtz generalised conservation of energy in 1847. Rudolf Clausius in Berlin (1850) and William Rankine and William Thomson (later Lord Kelvin) in Glasgow turned these ideas into the first law with internal energy as a property. The word enthalpy came much later, in the early twentieth century, and the steady-flow energy equation became the everyday tool of engineers with the rise of steam turbines and, after the 1930s, gas turbines.
Common misconceptions
Misconception
"A hot body contains a lot of heat." It contains a lot of internal energy. Heat is energy crossing a boundary because of a temperature difference; once it has crossed, it is simply part of . Saying "heat content" leads straight to the error of thinking is a property.
Misconception
"Adiabatic means the temperature stays constant." Adiabatic means no heat crosses the boundary. Work can still change the temperature: adiabatic compression of air by a factor of 8 heats it from 300 K to 689 K. Constant temperature is isothermal, and isothermal compression requires heat to be removed.
Misconception
"If heat is added, the temperature must rise." During boiling at constant pressure, heat goes in and the temperature does not change. And a gas expanding while heated can even cool, if it does more work than the heat it receives.
Misconception
"Enthalpy is just a fancy word for heat." Enthalpy is a property. It equals the heat transferred only in the special case of a constant-pressure process with no other work. In a turbine, the enthalpy drop becomes work, with no heat transfer at all.
Misconception
"Throttling a gas always cools it." An ideal gas keeps its temperature through a throttle, because and depends only on . Real gases usually cool a little (and hydrogen and helium at room temperature warm slightly); a saturated liquid flashing to vapour cools a lot.
Exercises
Use the engineering sign convention ( positive when the system does work). For air, J/(kg K), J/(kg K) and ; for liquid water, J/(kg K).
1. The first law of thermodynamics
Warm-upHumanAir in a cylinder goes from state 1 to state 2. Which of these are properties of the air, whose change depends only on the two end states and not on the path? Select all that apply.
2. The first law of thermodynamics
Warm-upHumanGas under a free piston expands slowly at a constant pressure of 200 kPa from 0.010 m³ to 0.025 m³. How much boundary work, in joules, does the gas do?
3. The first law of thermodynamics
CoreHumanA rigid, sealed tank of gas contains a paddle wheel driven by a motor outside. The paddle does 12 kJ of work on the gas while the tank loses 3 kJ of heat to the room. By how many kilojoules does the internal energy of the gas change? (Give a negative number if it falls.)
4. The first law of thermodynamics
CoreHumanPumping up a bicycle tyre quickly, Amara notices that the end of the pump near the valve gets warm. Which explanation is best?
5. The first law of thermodynamics
CoreHumanAir enters an adiabatic nozzle at 500 K with negligible velocity and leaves at 450 K. Using J/(kg K), what is the exit velocity, to the nearest m/s?
6. The first law of thermodynamics
Warm-upHumanHow much energy, in kilojoules, does it take to turn 2.0 kg of saturated liquid water at 100 °C into saturated vapour at 100 °C? Use kJ/kg.
7. The first law of thermodynamics
CoreComputationalWrite polytropic_work(p1, V1, V2, n) returning the boundary work in joules done by a gas that goes from volume V1 to V2 (m³) along , starting at pressure p1 (Pa). It must handle every , including the isothermal case , where the usual formula divides by zero.
8. The first law of thermodynamics
CoreComputationalA heat exchanger recovers heat from hot exhaust gas to warm water. Write cold_outlet_temperature(m_hot, cp_hot, Th_in, Th_out, m_cold, cp_cold, Tc_in, loss=0.0) returning the water's outlet temperature in °C. Mass flows are in kg/s, specific heats in J/(kg K), temperatures in °C, and loss is the fraction of the heat given up by the hot stream that escapes to the surroundings instead of reaching the water.
Then use it: 0.8 kg/s of exhaust ( J/(kg K)) cooled from 450 °C to 150 °C heats 1.2 kg/s of water from 15 °C, with 5% lost. What is the water's outlet temperature?
Further reading and resources
- NIST Chemistry WebBook: Thermophysical Properties of Fluid Systems · National Institute of Standards and TechnologyFree, accurate properties of water, air components, refrigerants and many other fluids, as tables at any pressure or temperature you choose.
- The International Association for the Properties of Water and Steam (IAPWS)Publishes the internationally agreed formulations for the properties of water and steam (IAPWS-95 and the industrial IAPWS-IF97) that steam tables and software are built on.
- CoolPropAn open-source library of thermophysical properties for more than a hundred fluids, usable from Python, MATLAB, Excel and many other languages.
- CanteraOpen-source software for thermodynamics, chemical kinetics and transport, widely used for combustion and energy research.
- NASA Glenn Research Center: Beginner's Guide to AeronauticsShort, clear pages on the thermodynamics of gases and engines.
- ASMEPublishes the Performance Test Codes (PTC) used to measure the output and efficiency of turbines, compressors and power plants by energy balances like the ones in this lesson.
- On the Mechanical Equivalent of Heat · James Prescott Joule · 1850Philosophical Transactions of the Royal Society. Joule's paddle-wheel measurements, the experimental foundation of the first law.