Glenn.jl — Thermochemical Properties Calculator

Computes Cp(T), H°(T), S°(T) from NASA-7 polynomial coefficients stored in a SQLite database (thermo.db).

The database is the same thermo.db generated by the pyglenn Python package and is bundled with the package — no extra setup needed.

Quick Start

julia> using Glenn
julia> # Calculator() uses the bundled thermo.db automatically calc = Calculator()Calculator("thermo.db")
julia> # Find species by name — use exact_match=true for case-insensitive exact match # (returns only O2, not Al2O2 or Be3N2) o2 = only(get_available_species(calc, "O2", exact_match = true))SpeciesInfo(931, "O2", nothing, "gas", 31.9988, 0.0, 3)
julia> # Calculate properties at 1000 K props = calculate_properties(calc, o2.id, 1000.0)ThermoProperties(1000.0, 34.882346223554805, 22707.08129523519, 243.58592574388805, 200.0, 1000.0, "O2", "gas")
julia> props.cp34.882346223554805
julia> props.h_relative22707.08129523519
julia> props.s243.58592574388805

NASA-7 Polynomial Equations

\[\frac{C_p(T)}{R} = a_1 T^{-2} + a_2 T^{-1} + a_3 + a_4 T + a_5 T^2 + a_6 T^3 + a_7 T^4\]

\[\frac{H^\circ(T)}{RT} = -a_1 T^{-2} + a_2 \frac{\ln T}{T} + a_3 + a_4 \frac{T}{2} + a_5 \frac{T^2}{3} + a_6 \frac{T^3}{4} + a_7 \frac{T^4}{5} + \frac{b_1}{T}\]

\[\frac{S^\circ(T)}{R} = -\frac{a_1}{2} T^{-2} - a_2 T^{-1} + a_3 \ln T + a_4 T + a_5 \frac{T^2}{2} + a_6 \frac{T^3}{3} + a_7 \frac{T^4}{4} + b_2\]

All results are returned in SI units:

  • Cp, S° → J/(mol·K)
  • → J/mol

Database Contents

TableDescriptionRecords
speciesChemical species2030
temperature_intervalsValid T ranges per species3772
coefficientsNASA-7 polynomial coefficients (a1–a7, b1, b2)3772 sets
file_metadataGlobal file metadata1

Index