📖 Documentation: profleao.github.io/pyglenn-notebooks
A collection of eleven elaborated, self-contained Jupyter notebooks demonstrating
the pyglenn thermochemical properties
calculator. pyglenn reconstructs the standard-state molar properties
The topics follow the applications outlined in the package's ideias.md
(Dr. Reginaldo G. Leão Jr., GESESC / IFMG): combustion, biofuels, thermodynamic
cycles, chemical equilibrium and CFD/kinetics property provision.
# pip
pip install pyglenn
pip install numpy pandas matplotlib scipy # used for plots, tables and solvers
# conda / mamba
conda install -c conda-forge pyglenn numpy pandas matplotlib scipyEvery notebook opens with the same short preamble that connects to the bundled
database and defines a robust species_id(calc, name) helper for exact-name
lookups.
| # | Notebook | What it covers |
|---|---|---|
| 01 | Getting Started | Connecting, searching species, computing |
| 02 | NASA Polynomials Under the Hood | The 9-term polynomial math; reproducing the API from raw coefficients; piecewise intervals; meaning of |
| 03 | Temperature-Dependent Properties & Plotting |
|
| 04 | Enthalpy of Formation from NASA Polynomials | Recovering |
| 05 | Reaction Enthalpies & Heats of Combustion |
|
| 06 | Adiabatic Flame Temperature | Energy-balance solve for |
| 07 | Comparing Fuels & Biofuels | Ethanol / methanol / gasoline / jet-fuel: energy density, air-fuel ratio, CO₂ intensity (a GESESC use case) |
| 08 | Chemical Equilibrium & Gibbs Free Energy |
|
| 09 | Brayton Gas-Turbine Cycle | Air-standard Brayton with real |
| 10 | Property Provider for CFD & Chemical Kinetics | Batch tables, a cached coefficient provider, a benchmark, and an ODE integration |
| 11 | Comparing Thermodynamic Data Sources | NASA polynomials vs NIST vs conventional tables for H₂O(g); side-by-side Cp/S/H comparison, benchmark and discrepancy analysis |
-
pyglenn'sh_relative(calculate_properties(...)['h_relative']) is the standardized molar enthalpy on the NASA scale — it already includes the enthalpy of formation. Consequently reference-state elements read$H^\circ(298.15,\mathrm{K}) \approx 0$ , compounds read their$\Delta_f H^\circ$ , and reaction enthalpies are simple stoichiometric sums. - In the bundled database the dedicated
heat_of_formation_298Kcolumn is not populated, socalculate_formation_enthalpy()returnsNone. Notebook 04 shows how to obtain$\Delta_f H^\circ$ fromh_relativeat 298.15 K instead.
The notebooks are committed with their outputs already executed. To re-run:
jupyter nbconvert --to notebook --execute --inplace notebooks/en/*.ipynbIf you use this repository in your research or teaching, please cite it via Zenodo:
Gonçalves Leão Junior, R. (2026). pyglenn-notebooks. Zenodo. https://doi.org/10.5281/zenodo.21324685
BibTeX:
@software{goncalves_leao_junior_2026_21324685,
author = {Gonçalves Leão Junior, Reginaldo},
title = {pyglenn-notebooks},
month = jul,
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.21324685},
url = {https://doi.org/10.5281/zenodo.21324685},
}