API Reference¶
This page is a compact map of the public surface exposed from canterax.
Top-level imports¶
from canterax import ReactorNet, Solution
Solution¶
Main responsibilities:
load a mechanism
store thermodynamic state
expose Cantera-like ideal-gas properties
compute equilibrium
expose net production rates
Constructor:
Solution(yaml_file: str)
Primary mutable fields:
TPXYbasis
Implemented state pairs/triples:
TP,TPX,TPYHP,HPX,HPYUV,UVX,UVYSP,SPX,SPYSV,SVX,SVYTD,TDX,TDYDP,DPX,DPY
Common scalar properties:
cp_mass,cp_molecv_mass,cv_moleenthalpy_mass,enthalpy_moleint_energy_mass,int_energy_moleentropy_mass,entropy_molegibbs_mass,gibbs_moledensity_mass,density_molevolume_mass,volume_moleviscositythermal_conductivitymean_molecular_weight
Basis-aware aliases:
husgcpcvvdensity
Selected methods:
species_name(k)species_index(name_or_index)element_name(m)element_index(name_or_index)n_atoms(species, element)mass_fraction_dict(threshold=0.0)mole_fraction_dict(threshold=0.0)equilibrate(...)
ReactorNet¶
Main responsibilities:
hold a loaded mechanism
integrate constant-pressure adiabatic reactors
Constructor:
ReactorNet(mech)
Primary method:
advance(
T0,
P,
Y0,
t_end,
rtol=1e-7,
atol=1e-10,
solver=None,
saveat=None,
max_steps=100000,
dt0=1e-8,
stepsize_controller=None,
)
Internal modules¶
These modules are present in the package, but most users should start with Solution and ReactorNet:
canterax.loadercanterax.thermocanterax.kineticscanterax.equilibratecanterax.flowcanterax.solvers.bdf