From Rocket Science to Code: 12 Real-World Thermodynamic Notebooks with pyglenn
Engineering textbooks routinely introduce gas dynamics under the convenient assumption of constant specific heats. Students memorize that air has a heat capacity ratio ( γ ) of 1.4, calculate cycle efficiencies on a pocket calculator, and move on. Inside a gas turbine combustor or a rocket nozzle, that simplification collapses. At 1500 K, molecular nitrogen and oxygen absorb energy in quantized…
Thermodynamic notebooks showcase the reality of gas properties beyond simplistic models. Dr. Reginaldo G. Leão Jr.'s collection of twelve Jupyter notebooks, called pyglenn-notebooks, provides practical examples of real-world thermodynamic modeling. A key example is Notebook 09, which examines the cold-air standard delusion in gas turbine applications.
The textbook formula for Brayton cycle efficiency assumes constant specific heats: ηcold = 1 - rp(γ−1)/γ. For a pressure ratio of 10 and γ = 1.4, this yields a thermal efficiency of 48.2%. However, when pyglenn accounts for temperature-dependent heat capacity, the real thermal efficiency falls to 45.6%. The 2.6 percentage point difference demonstrates the impact of real gas behavior at high turbine inlet temperatures.
The notebook employs scipy's root_scalar function to solve for compressor discharge temperature. By matching entropy across compressor and turbine stages with temperature-dependent Cp(T), pyglenn reveals the numerical differences between theoretical and practical performance. This highlights the importance of incorporating realistic thermodynamic properties in engineering designs, as neglecting them can lead to costly failures in real-world applications.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.