Cantera Chemical Kinetics & Thermochemistry (.yaml, .cti)
@modelscript/cantera (languages/cantera) provides native WebAssembly parsing, NASA-7 polynomial thermodynamic evaluation (DAEBuilder lowering, and SBML / Modelica projections for Cantera gas-phase combustion, catalysis, and chemical kinetics mechanisms.
Supported Extensions & Standards
| Extension | Format | Description |
|---|---|---|
.yaml | Cantera YAML | Modern Cantera 2.5+ / 3.x YAML mechanism format (phases, species, reactions, thermo: NASA7) |
.cti | Legacy Cantera CTI | Classic Cantera ideal_gas, species, and reaction mechanism definitions |
Key Capabilities
1. NASA-7 Thermochemical Polynomials
- Evaluates two-range (low-
/ high- ) 7-coefficient NASA polynomials for every species: - Verifies continuity of
, , and across the midpoint splitting temperature .
2. Elementary, Three-Body & Troe Falloff Kinetics
- Computes forward and reverse rate constants via modified Arrhenius expressions and thermodynamic equilibrium constants
: - Supports third-body collision efficiencies (
+ M) and pressure-dependent Lindemann / Troe falloff formulations.
3. Batch Reactor ODE Solver & DAE Lowering
- Integrates constant-volume or constant-pressure gas-phase reactor species and temperature evolution and lowers the kinetic network into
@modelscript/runtime'sDAEBuilderarena, Modelica 3.x, or SBML.
Pre-Flight Diagnostics
10 rules7 error3 warning
| Code | Rule | Severity | Message |
|---|---|---|---|
M9201 | element-balance-violation | error | Reaction '<equation>' is not elementally balanced for element '<element>' (reactants: <reactantCount>, products: <productCount>). |
M9202 | charge-balance-violation | error | Reaction '<equation>' violates net electrical charge conservation (reactants: <reactantCharge>, products: <productCharge>). |
M9203 | undeclared-phase-species | error | Reaction or phase '<equationOrPhase>' references species '<speciesName>' not declared in the mechanism species list. |
M9204 | nasa7-temperature-discontinuity | warning | Species '<speciesName>' NASA-7 polynomial has a '<propName>' discontinuity (<value>) at midpoint temperature '<Tmid>' K. |
M9205 | invalid-nasa7-temperature-bounds | error | Species '<speciesName>' specifies invalid NASA-7 temperature bounds [<Tmin>, <Tmid>, <Tmax>] K. |
M9206 | negative-pre-exponential-factor | error | Reaction '<equation>' specifies a non-positive pre-exponential factor '<A>'. |
M9207 | missing-falloff-low-pressure-limit | error | Falloff reaction '<equation>' is missing required 'low-P-rate-constant' definition. |
M9208 | duplicate-reaction-declaration | warning | Identical non-duplicate reaction '<equation>' is declared multiple times without 'duplicate: true'. |
M9209 | negative-third-body-efficiency | error | Third-body efficiency for '<speciesName>' in reaction '<equation>' is negative (<efficiency>). |
M9210 | missing-species-thermo | warning | Species '<speciesName>' is missing a 'thermo' polynomial definition. |
Generated from languages/cantera/src/errors.ts. All languages →
CLI Usage
bash
# Validate elemental balance, NASA-7 continuity, and Arrhenius parameters
msx lint H2Combustion.yaml
# Parse and inspect the Cantera mechanism structure
msx parse H2Combustion.yaml
