Examples#
This gallery walks through every public feature of
engineeringkit.thermodynamics, one breakthrough per script: the first and
second laws, ideal and real gases and their mixtures, vapour pressure and
steam properties, heat-engine cycles and power plants, refrigerators and heat
pumps, exergy, moist air and combustion.
Units, assumptions and numerical validation
gives the physical validity limits. Each script is self-contained and can be
run directly with python examples/thermodynamics/<section>/<script>.py.
Sections#
laws – Joule’s mechanical equivalent of heat and steady-flow devices, Clausius’s entropy and Maxwell’s relations.
properties – Dalton’s partial pressures, Clapeyron’s ideal gas, the Clausius-Clapeyron relation, the Joule-Thomson effect, van der Waals’s equation, Antoine’s equation, Pitzer’s acentric factor, Peng and Robinson’s equation and IAPWS-IF97 steam properties up to region 5.
cycles – Carnot’s bound, Stirling’s regenerator, the Rankine, Brayton, Otto, Diesel and dual cycles with reheat, feedwater heating, regeneration and intercooling, and the Curzon-Ahlborn efficiency at maximum power.
refrigeration – Perkins’s vapour-compression refrigerator, on water and on R-134a, and Kelvin’s heat pump.
exergy – Gouy and Stodola’s lost work and Rant’s exergy.
psychrometrics – Carrier’s psychrometric chart and air-conditioning processes.
combustion – Hess’s law, heating values and the adiabatic flame temperature.
Combustion#
Burning fuel in air: stoichiometry, heating values and flame temperatures.
Cycles#
Heat engines: Carnot’s bound, the idealized cycles of real engines and power plants analysed state by state.
Carnot’s Réflexions: no engine beats the reversible one (1824)
Curzon and Ahlborn: efficiency at maximum power (1975)
Rankine’s cycle with reheat and feedwater heating (1859)
Brayton’s cycle with regeneration, intercooling and reheat (1872)
Exergy#
Work potential and the work lost to irreversibility.
Laws#
The first law (energy is conserved) for closed systems and steady-flow devices, the second (entropy never decreases), and Maxwell’s relations.
Joule’s first law in steady-flow devices (1843-1850)
Properties#
Equations of state, ideal-gas mixtures, vapour pressure and the properties of water, steam and refrigerants.
IAPWS-IF97: the properties of water and steam (1997)
Psychrometrics#
Moist air: humidity, relative humidity and dew point, and the air-conditioning processes.
Refrigeration#
Refrigerators and heat pumps, and their Carnot limits.