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 Glennjulia> # 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.882346223554805julia> props.h_relative22707.08129523519julia> 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)
- H° → J/mol
Database Contents
| Table | Description | Records |
|---|---|---|
species | Chemical species | 2030 |
temperature_intervals | Valid T ranges per species | 3772 |
coefficients | NASA-7 polynomial coefficients (a1–a7, b1, b2) | 3772 sets |
file_metadata | Global file metadata | 1 |
Index
Glenn.ThermoDatabase.R_UNIVERSALGlenn.CalculatorGlenn.DatabaseNotConnectedErrorGlenn.IntervalDataGlenn.NASACoefficientsGlenn.SpeciesInfoGlenn.SpeciesNotFoundErrorGlenn.TemperatureOutOfRangeErrorGlenn.ThermoCalcErrorGlenn.ThermoDBBuilderGlenn.ThermoDatabase.ThermoDBGlenn.ThermoPropertiesGlenn.CLI.cli_mainGlenn.ThermoBuilder.connectGlenn.ThermoBuilder.create_tablesGlenn.ThermoBuilder.is_coefficient_lineGlenn.ThermoBuilder.is_temperature_lineGlenn.ThermoBuilder.parse_and_loadGlenn.ThermoBuilder.parse_coefficients_recordGlenn.ThermoBuilder.parse_floatGlenn.ThermoBuilder.parse_general_info_recordGlenn.ThermoBuilder.parse_species_recordGlenn.ThermoBuilder.parse_temp_interval_recordGlenn.ThermoBuilder.read_thermo_fileGlenn.ThermoCalculator.calculate_enthalpy_changeGlenn.ThermoCalculator.calculate_formation_enthalpyGlenn.ThermoCalculator.calculate_propertiesGlenn.ThermoCalculator.default_db_pathGlenn.ThermoCalculator.default_inp_pathGlenn.ThermoCalculator.get_available_speciesGlenn.ThermoCalculator.get_properties_rangeGlenn.ThermoDatabase.calculate_cpGlenn.ThermoDatabase.calculate_hGlenn.ThermoDatabase.calculate_sGlenn.ThermoDatabase.find_speciesGlenn.ThermoDatabase.get_species_dataGlenn.ThermoDatabase.get_species_for_temperatureGlenn.ThermoDatabase.get_species_infoGlenn.ThermoDatabase.get_statisticsGlenn.ThermoDatabase.list_all_speciesGlenn.ThermoDatabase.list_species_page