Thermodynamical models
ChemistryLab.THERMO_FACTORIESChemistryLab.THERMO_MODELSChemistryLab.add_thermo_modelChemistryLab.build_thermo_functions
ChemistryLab.THERMO_MODELS — Constant
THERMO_MODELSDictionary storing raw thermodynamic model expressions and units. Keys are model names (symbols), values are dictionaries containing:
- Symbolic expressions for thermodynamic functions (Cp, H, S, G).
- Units for parameters and variables.
ChemistryLab.THERMO_FACTORIES — Constant
THERMO_FACTORIESDictionary storing compiled ThermoFactory objects for each model. Used to efficiently generate SymbolicFunc instances.
ChemistryLab.add_thermo_model — Function
add_thermo_model(model_name, dict_model::AbstractDict)Add a new thermodynamic model to the registry using a dictionary of expressions.
Arguments
model_name: unique symbol for the model.dict_model: dictionary containing symbolic expressions and units.
add_thermo_model(model_name, Cpexpr::Expr, units=nothing)Add a new thermodynamic model derived from a heat capacity (Cp) expression. Automatically integrates Cp to find H, S, and G.
Arguments
model_name: unique symbol for the model.Cpexpr: symbolic expression for heat capacity as a function of T.units: optional dictionary of units for parameters.
ChemistryLab.build_thermo_functions — Function
build_thermo_functions(model_name, params) -> OrderedDictBuild thermodynamic function objects for a specific model and parameters. Dispatches on Val(model_name) — add a new method for each new model.
Arguments
model_name: symbol identifying the thermodynamic model (e.g.,:cp_ft_equation).params: dictionary or pair list of parameter values.
Returns
OrderedDictcontaining the constructed thermodynamic functions (Cp⁰,ΔₐH⁰,S⁰,ΔₐG⁰).