API
The API reference is generated from exported Arrhenius.jl docstrings. It includes constructors, solver functions, thermodynamic and transport methods, and diagnostics.
Arrhenius.R — Constant
const R = 8314.46261815324 #J/(kmol*K)Gas constant
Arrhenius.one_atm — Constant
const one_atm = 101325.0 #pascalOne atm
Arrhenius.AbstractCoverageDependency — Type
Supertype for composable coverage-dependency laws targeting species standard states.
Arrhenius.BlowersMaselRate — Type
BlowersMaselRate(A, b, Ea0, w)Enthalpy-dependent modified Arrhenius rate. Ea0 and the average bond energy w use J/kmol, temperature uses K, and the units of A follow reaction order. The intrinsic barrier must be nonnegative and w > Ea0.
Arrhenius.BurnerFlame — Type
A planar premixed flame with prescribed inlet mass flux.
Arrhenius.BurnerFlame — Method
BurnerFlame(gas; mdot, T=300, P=one_atm, X, width=0.03, grid=nothing)Construct a burner-stabilized premixed flame. mdot is the inlet mass flux in kg/(m² s). The energy equation is enabled unless set_temperature_profile! specifies a measured temperature profile. The default discretization=:finite_difference matches Cantera's original discretization. Use :conservative for finite-volume species and total enthalpy balances.
Arrhenius.CatalyticImpingingJet — Type
An axisymmetric jet impinging on an isothermal, chemically reacting surface.
Arrhenius.CatalyticImpingingJet — Method
CatalyticImpingingJet(gas, surface; reactants, mdot, T_inlet=300,
T_surface=900, P=one_atm, width=.1, coverages)Couple an ideal gas jet to stationary surface coverages. The wall has fixed temperature and zero normal velocity. Surface gas production sets the wall species flux; surface reaction heat is removed by the prescribed thermostat. The gas must be the surface mechanism's companion phase, in its original order. Persistent bulk phases, deposition, and moving walls are not supported. Initialization uses a linear temperature profile and inlet gas composition.
Arrhenius.CatalyticNetwork — Type
CatalyticNetwork(network; surfaces)Extend a native reactor network with gas/surface species exchange. Reactors carrying surfaces must be isothermal; other network vessels retain their own energy settings. The state contains the network state followed by each surface's coverages and signed bulk deposition in kmol. No solid depletion or surface energy equation is assumed. catalytic_diagnostics reports combined gas, surface, and deposited-bulk mass and elemental inventories and their rates.
Arrhenius.CounterflowContinuationPoint — Type
Fixed-grid pseudo-arclength predictor-corrector for counterflow flames. Supported parameters: fuelmassflux, oxidizermassflux, pressure, inletfluxscale (proportional scaling of both inlet mass fluxes), or control_temperature for a controlled diffusion flame. The bordered correction retains the banded flame Jacobian and uses a scalar Schur complement. The initial flame must be converged; no grid refinement is performed during tracing.
Arrhenius.CounterflowDiffusionFlame — Type
Axisymmetric opposed fuel/oxidizer jets with optional optically thin gas radiation.
Arrhenius.CounterflowDiffusionFlame — Method
CounterflowDiffusionFlame(gas; fuel, oxidizer, mdot_fuel, mdot_oxidizer,
T_fuel=300, T_oxidizer=300, P=one_atm, width=.02)Construct a native axisymmetric counterflow diffusion flame. Both inlet mass fluxes are positive magnitudes [kg/(m² s)], directed into the domain. The axial velocity is positive at the fuel inlet and negative at the oxidizer inlet. Initialization uses a native stoichiometric HP equilibrium and an error-function mixing layer. Supports mixture-averaged neutral ideal gas, with optional gray optically thin H2O/CO2 radiation (radiation=true).
Arrhenius.CounterflowPremixedFlame — Type
Premixed reactants opposed by a prescribed product stream.
Arrhenius.CounterflowPremixedFlame — Method
CounterflowPremixedFlame(gas; reactants, mdot_reactants, mdot_products,
T_reactants=300, P=one_atm, width=.02)Opposed premixed reactants and products, with positive inlet mass-flux magnitudes in kg/(m² s). By default, the product temperature and composition are calculated by native HP equilibrium. Set both products and T_products for another prescribed product stream. No reference flame profiles are used to initialize.
Arrhenius.CounterflowTwinPremixedFlame — Type
Half of a symmetric pair of premixed counterflow flames.
Arrhenius.CounterflowTwinPremixedFlame — Method
CounterflowTwinPremixedFlame(gas; reactants, mdot, T=300, P=one_atm, width=.025)Solve one half of a symmetric pair of opposed premixed jets. width is the distance from the inlet to the symmetry plane. The plane has zero axial velocity, zero temperature and spread-rate gradients, and zero diffusive species fluxes.
Arrhenius.CoverageThermoModel — Type
CoverageThermoModel(; species_names, thermo_type, thermo_coefficients,
reference_coverage=1.0,
dependencies=AbstractCoverageDependency[])Coverage-dependent surface standard-state thermodynamics. thermo_type uses the SurfaceMechanism convention (1 = NASA7, 2 = constant-cp) and thermo_coefficients uses its per-species row layout, so the base low-coverage states are evaluated with the existing _surface_species_thermo. reference_coverage is the standard-state reference coverage thetaref in (0, 1]; dependencies lists self- and cross-interaction objects whose target and influencing indices refer to `speciesnames`.
Arrhenius.CoverageThermoModel — Method
CoverageThermoModel(path::AbstractString)Load SI model parameters prepared by mechanism/export_coverage_thermo.py. The parameter archive is JSON; Cantera is needed only for preprocessing.
Arrhenius.CoverageThermoWorkspace — Type
CoverageThermoWorkspace(model)Reusable per-state output buffers. The arrays returned by coverage_thermo! alias this workspace, so full coverage sweeps evaluate without per-state allocation.
Arrhenius.DustyGasParameters — Type
Stationary porous-medium geometry; lengths are in m and permeability in m².
Arrhenius.DustyGasTransport — Type
DustyGasTransport(gas; porosity, mean_pore_radius, tortuosity=1,
mean_particle_diameter=0, permeability=nothing,
multicomponent_data=nothing)Native ideal-gas transport through a stationary porous medium. Molecular and Knudsen diffusion both include porosity/tortuosity. With permeability=nothing, the Darcy term uses the close-packed-sphere estimate from particle diameter. Provide MultiTransportData to evaluate gas-phase thermal conductivity. The reusable workspace holds diffusion [m²/s], effective binary [m²/s], knudsen [m²/s], and the gas viscosity [Pa s].
Arrhenius.FreeFlame — Type
A freely propagating, adiabatic, planar ideal-gas premixed flame.
Arrhenius.FreeFlame — Method
FreeFlame(gas; T=300, P=one_atm, X, width=0.03, grid=nothing)Construct a native Julia premixed flame with mixture-averaged diffusion using mole-fraction gradients. The inlet mass flux (and flame speed) is an eigenvalue. Initialization uses native constant-enthalpy chemical equilibrium. Call solve! to solve the species and energy equations with adaptive grid refinement. discretization=:finite_difference is the default and matches Cantera's original discretization. :conservative uses shared finite-volume species and total enthalpy fluxes.
Arrhenius.HeatCapacityDependency — Type
HeatCapacityDependency(target, influencing; a, b)Log-quadratic coverage heat capacity (a*log(T) + b)*theta_j^2 [J/kmol/K]. Its contributions to enthalpy and entropy are integrated analytically and anchored to zero at 298.15 K, following Cantera.
Arrhenius.HeatTransferWall — Type
HeatTransferWall(left, right; area=1.0, U=0.0, heat_flux=0.0)A fixed wall transferring area*(U*(T_left-T_right)+heat_flux(t)) watts from left to right. Area is in m², U in W/m²/K, and prescribed heat flux in W/m². heat_flux may be a constant or a time function. No wall motion is modeled.
Arrhenius.IdealGasReactor — Type
IdealGasReactor(gas; temperature, pressure=one_atm,
mole_fractions=nothing, mass_fractions=nothing,
constraint=:constant_pressure, energy=:adiabatic,
rate_multipliers=nothing)A homogeneous, closed ideal-gas reactor. Supply exactly one composition as a species-name dictionary or a vector in mechanism order. Amounts are normalized. constraint is :constant_pressure or :constant_volume; energy is :adiabatic or :isothermal. SI units are used throughout (K, Pa, kg, s).
The state is [Y₁, …, Yₙ, T]. Constant-pressure reactors conserve specific enthalpy when adiabatic; constant-volume reactors conserve specific internal energy. Isothermal reactors impose the initial temperature. Walls, inlet and outlet flows, surface chemistry, and non-ideal equations of state are excluded.
Arrhenius.IdealGasThermo — Type
Struct for the ideal gas thermo.
nasa_low: Array with low temperature nasa coeff. for each species
nasa_high: Array with high temperature nasa coeff. for each species
Trange: Array with temperature ranges for each species
isTcommon: bool which indicates if both polynoms share same T at intersection
extra: optional NASA9/Shomate/constant-cp regions. The NASA7 coefficient rows are zero for these species; Trange retains their minimum, first split, maximum.
Arrhenius.IdealGasThermo — Method
Constructor for the idealGasThermo:
yaml:: Dict of the input yaml file
Arrhenius.IdealSurface — Type
IdealSurface(mechanism; temperature, pressure, mole_fractions, coverages,
gas_temperature=temperature)A surface with fixed temperature, gas pressure, and adjacent gas composition. Coverages denote fractions of occupied sites and sum to one. An optional gas temperature permits direct nonisothermal interface rate evaluation. For a stationary surface equilibrated thermally with its gas, use the default equal temperatures. Persistent solid phases have unit activity and positive inventory.
Arrhenius.ImpingingJet — Type
An axisymmetric jet impinging on an inert, isothermal surface.
Arrhenius.ImpingingJet — Method
ImpingingJet(gas; reactants, mdot, T_inlet=300, T_surface=300,
P=one_atm, width=.02, initial_products=:equilibrium)An axisymmetric jet against an inert isothermal wall. The wall has zero axial velocity and spread rate and zero net species flux. initial_products=:inlet initializes a nonburning flow; :equilibrium initializes a detached flame using native HP equilibrium. Reactive surfaces are not represented by this type.
Arrhenius.InertialWall — Type
InertialWall(left, right; area=1, mass, initial_velocity=0, U=0, heat_flux=0)A piston with one integrated velocity and equation mass*dv/dt = area*(P_left-P_right). Wall mass is in kg and positive velocity expands the left vessel. Gas pressure work transfers energy to the piston's kinetic energy. Heat transfer follows MovingWall. No friction, wall heat capacity, or contact stops are modeled.
Arrhenius.InterpolativeDependency — Type
InterpolativeDependency(target, influencing; enthalpy_coverages, enthalpies,
entropy_coverages, entropies)Tabulated law linearly interpolated between knots. Coverage knots must be strictly increasing, start at 0.0, end at 1.0, and match the value lengths. Enthalpies are in J/kmol, entropies in J/kmol/K.
Arrhenius.IonTransportData — Type
Model-specific collision fits and charge information for ionized-gas transport.
Arrhenius.IonTransportData — Method
IonTransportData(gas)Prepare ionized-gas transport from a mechanism preprocessed with mechanism/export_sidecar.py. The collision fits must come from the ionized-gas model. Electron mobility follows that model's fixed 0.4 m²/(V s).
Arrhenius.IonTransportWorkspace — Type
Reusable ionized transport storage; binary stores D*P [m² Pa/s], diffusion D [m²/s], mobility [m²/(V s)].
Arrhenius.IonizedFlame — Type
Planar premixed flame with signed charged species and an algebraic electric field.
Construct through FreeFlame or BurnerFlame with an ionized-gas mechanism. The initial stage freezes charged diffusion. Enable it with setelectricfield!(flame, true) before the second solve!. Conservative flames first initialize with a frozen finite-difference solve.
Arrhenius.KineticsWorkspace — Type
Reusable arrays for allocation-free kinetics evaluation.
Arrhenius.LinearDependency — Type
LinearDependency(target, influencing; enthalpy=0.0, entropy=0.0)Linear lateral-interaction law. Adds enthalpy*theta_j [J/kmol] and entropy*theta_j [J/kmol/K] to the standard state of species target, where j = influencing.
Arrhenius.LogRateData — Type
Log-domain Arrhenius parameters for mixed-precision rate evaluation.
The outer thermochemical state and source accumulation retain their existing precision. Only the stored Arrhenius parameters and elementary exponential use T, which is typically Float32.
Arrhenius.MassFlowController — Type
MassFlowController(upstream, downstream; mdot)One-way flow in kg/s, independent of pressure. Node identifiers are symbols. mdot is a number, f(t), or f(states, t), where named node states expose mass, temperature, pressure, density, and mass_fractions. For example, mdot=(states,t)->states.combustor.mass/0.1 sets a 0.1 s residence time. Negative requested rates are clipped to zero. Treat callback states as read-only.
Arrhenius.MixtureThermalDiffusionWorkspace — Type
Reusable storage for the separate mixture-averaged Soret model.
Arrhenius.MovingWall — Type
MovingWall(left, right; area=1, K=0, velocity=0, U=0, heat_flux=0)A massless piston between named network nodes. Positive velocity expands the left vessel and compresses the right. Its velocity is K*(P_left-P_right) + velocity(states,t), in m/s; prescribed velocity may also be a number or f(t). Heat flowing left to right is area*(U*(T_left-T_right) + heat_flux(t)), in W.
Pressure work uses each vessel's own pressure. Consequently a pressure-driven massless piston removes mechanical energy from the gases at area*velocity*(P_left-P_right); this work is recorded by the network's ledger. The piston has neither inertia nor a stored thermal energy.
Arrhenius.MovingWallNetwork — Type
MovingWallNetwork(network::ReactorNetwork; walls)Add moving walls to an ideal-gas network, retaining its chemistry, flow devices, and fixed heat-transfer walls. Reservoirs remain fixed boundaries. State order: the base network's species masses/temperatures, vessel volumes, inertial-wall velocities, then cumulative external mass input, energy input (including isothermal thermostats), and gas pressure work output. Use moving_wall_state and moving_wall_diagnostics instead of interpreting indices directly.
All runtime calculations are Julia. Callers supply a stiff ODE integrator to solve_moving_wall. At a prescribed discontinuity, restart with each segment's continuous wall law; example/reactors/piston.jl demonstrates this for a release.
Arrhenius.MultiTransportData — Type
Temperature-independent neutral ideal-gas collision fits and species constants.
Arrhenius.MultiTransportWorkspace — Type
Reusable storage. diffusion is m²/s; thermal_diffusion is kg/(m s); binary stores pressure times diffusivity.
Arrhenius.NewtonPolicyOptions — Type
NewtonPolicyOptions(; kwargs...)Immutable controls for Newton damping, bounds, weighted correction norms, convergence, iteration caps, and Jacobian refresh policy. The defaults preserve Arrhenius' current behavior. Pass cantera_compatible=true to solve! to select the corresponding Cantera policy values, or pass a NewtonPolicyOptions value to select individual settings.
Arrhenius.PiecewiseLinearDependency — Type
PiecewiseLinearDependency(target, influencing; enthalpy_low, enthalpy_high,
enthalpy_change, entropy_low, entropy_high,
entropy_change)Two-segment law with slopes *_low below the change coverage and *_high above it, continuous at *_change. Slopes are in J/kmol (enthalpy) or J/kmol/K (entropy); change coverages are dimensionless in (0, 1).
Arrhenius.PolynomialDependency — Type
PolynomialDependency(target, influencing; enthalpy_coefficients=zeros(4),
entropy_coefficients=zeros(4))Quartic polynomial law sum_i c_i*theta_j^i for orders one through four. Enthalpy coefficients are in J/kmol, entropy coefficients in J/kmol/K.
Arrhenius.PressureController — Type
PressureController(upstream, downstream; primary, K, pressure_function=identity)One-way flow equal to the primary device's flow plus K*pressure_function(ΔP). primary is an earlier device in the network's flow tuple, or its one-based index. K has units kg/s/Pa for the default pressure function.
Arrhenius.PureWater — Type
PureWater()Reynolds liquid/vapor water equation of state, evaluated entirely in Julia. Temperatures span 273.16–1600 K; saturation spans 273.16–647.286 K. This model does not describe ice. Thermochemical reference offsets match Cantera's water phase. A model holds a saturation cache; use one model per concurrent task.
Arrhenius.ReactorNetwork — Type
ReactorNetwork(nodes::NamedTuple; flows=(), walls=())Connect named WellStirredReactors and Reservoirs with one-way flow devices and fixed heat-transfer walls. Species are mapped by name. Every species that can enter a vessel must exist in its mechanism; incompatible molecular weights are rejected. Reservoir outlets need not contain every exhaust species.
All calculations use ideal-gas thermodynamics. This network supports fixed volumes, homogeneous chemistry, mixing, pressure regulation, and heat transfer. Surface chemistry, moving walls, and non-ideal phases are excluded.
Arrhenius.ReactorRHS — Type
A reusable in-place ODE function. Use a separate instance for each concurrent solve.
Arrhenius.ReactorSurface — Type
ReactorSurface(node, mechanism; area, coverages=mechanism.initial_coverages)Attach a fixed-area ideal surface to an isothermal WellStirredReactor named node. The surface follows that reactor's temperature, pressure, and gas composition. Persistent bulk products are tracked as signed deposited amounts.
Arrhenius.RealGasKineticsWorkspace — Type
Reusable native RK property, physical concentration and activity arrays.
Arrhenius.RedlichKwongReactor — Type
RedlichKwongReactor(gas, model; temperature, pressure=one_atm,
mole_fractions=nothing, mass_fractions=nothing,
rate_multipliers=nothing)Closed, constant-volume, adiabatic homogeneous reactor with native RK thermodynamics and native reaction rates. gas supplies kinetic sidecar data; its species order and molecular weights must match model. Supply exactly one composition. State variables are [Y₁,…,Yₙ,T], in SI units. The energy equation uses the constant-T,V derivative of total energy with respect to each species' mole amount, rather than its ordinary partial molar internal energy. Elementary Arrhenius, third-body, Lindemann, Troe and PLOG reactions are supported. Blowers–Masel rates require additional nonideal enthalpy coupling and are rejected by this constructor.
Use the existing caller-owned ODE interface solve_reactor(...; integrator). No ODE package or Cantera runtime is required by the core implementation.
Arrhenius.RedlichKwongThermo — Type
RedlichKwongThermo(yaml_or_path; phase=nothing, molecular_weights=nothing,
critical_properties=nothing)Native single-phase Redlich–Kwong mixture model. Species use the existing ideal reference thermodynamics and a(T)=a0+a1*T, quadratic attraction mixing and linear covolume mixing. Explicit binary-a coefficients override geometric means. YAML units and species critical parameters are accepted. An optional critical-properties YAML file supplies missing critical data; none are guessed. Pure-species a0 and b must be nonnegative; a1 and binary coefficients may be signed. Unlike-species coefficients use the nonnegative geometric mean while pure-species a1 retains its sign. Opposite-sign a1 pairs require explicit binary-a coefficients because their geometric mean is not real.
The standalone constructor needs no kinetic sidecar or Cantera installation. Default atomic weights cover H, He, C, N, O, S, Cl and Ar. For other elements or isotopes, supply molecular weights in kg/kmol. No phase-equilibrium or Peng–Robinson calculation is implied by this model.
Arrhenius.RedlichKwongWorkspace — Type
Reusable property arrays; use one workspace per concurrent caller.
Arrhenius.Reservoir — Type
A constant-temperature, constant-pressure ideal-gas boundary for a reactor network.
Arrhenius.StoichiometricCondensedPhase — Type
StoichiometricCondensedPhase(; name, species, elements, molecular_weight,
molar_volume, thermo_model, thermo_coefficients, temperature_range,
reference_pressure=one_atm, charge=0.0)
StoichiometricCondensedPhase(path)A pure condensed phase of fixed stoichiometry and constant molar volume, in equilibrium with one ideal gas through equilibrate(gas, phase; ...). The phase is a single neutral species with NASA7 or constant-cp standard thermodynamics; it is not a general multiphase, nonideal, or electrochemical phase model. All inputs are SI.
Keyword arguments:
name,species: phase and species names.elements: dictionary of element names to atom counts, e.g.Dict("C" => 1.0)for graphite. Counts must be finite and nonnegative with at least one positive; negative (charged) counts are rejected.molecular_weight: kg/kmol, positive and finite.molar_volume: m^3/kmol, positive and finite. Enters the incompressible pressure correctionh(T, P) = h0(T) + (P - reference_pressure) * molar_volumewithhin J/kmol.thermo_model:"NASA7"or"constant-cp".thermo_coefficients: NASA7:[Tmid, a1..a7 high-temperature region, a1..a7 low-temperature region]giving h in J/kmol and s in J/kmol/K; constant-cp:[T0, h0, s0, cp0]givingh = h0 + cp0*(T - T0)ands = s0 + cp0*log(T/T0).temperature_range:[Tmin, Tmax]kelvin declaring polynomial validity. NASA7 requires finite positive bounds withTmidstrictly inside. Constant-cp permits zero andInfas open fit bounds; temperatures must still be positive. The JSON representation usesnullfor an infinite upper bound.reference_pressure: Pa, positive, default one atmosphere.charge: must be zero; charged species are unsupported.
The path constructor loads the numeric JSON written by mechanism/export_condensed_phase.py (format arrhenius-condensed-phase-v1); the same validations are applied.
Arrhenius.SurfaceFlowReactor — Type
SurfaceFlowReactor(surface; temperature, pressure=one_atm, mole_fractions,
area, mass_flow_rate, surface_area_per_length)An isothermal, constant-area, frictionless ideal-gas plug-flow reactor. Surface coverages satisfy stationary algebraic equations at every axial position. surface_area_per_length is catalyst area per axial metre, in m²/m. Persistent bulk phases are not supported here: total gas mass flux remains constant.
Arrhenius.SurfaceMechanism — Type
SurfaceMechanism(path)Load parameters prepared by mechanism/export_surface.py. Supports one ideal surface, one ideal gas, and persistent fixed-stoichiometry solids; NASA7 and constant-cp species; elementary and sticking Arrhenius reactions, explicit orders, Motz–Wise corrections, and polynomial coverage activation energies. Species are ordered surface, gas, then bulk. Rates use kmol, m, s, K, and J.
Arrhenius.SurfaceWorkspace — Type
A reusable surface rate workspace. Returned rate arrays alias this workspace.
Arrhenius.TwoPointControlPoint — Type
One fixed-grid solution produced by Cantera-style two-point control.
Arrhenius.Valve — Type
A one-way valve: mdot = max(0, K * timefunction(t) * pressurefunction(ΔP)).
Arrhenius.WaterState — Type
Water state in SI units: T [K], P [Pa], rho [kg/m³], h/u [J/kg], s [J/kg/K].
Arrhenius.WellStirredReactor — Type
WellStirredReactor(initial; volume=1.0, chemistry=true)
WellStirredReactor(gas; volume=1.0, chemistry=true, kwargs...)A homogeneous fixed-volume vessel, with volume in m³. Its state is the species masses in kg followed by temperature in K. Total mass and mass fractions are derived from species masses. The initial IdealGasReactor must use :constant_volume; the gas constructor selects that constraint automatically. Energy may be adiabatic or isothermal. Set chemistry=false for pure mixing.
Arrhenius.C2X — Method
get mole fraction (X) from concentration (C)
Arrhenius.CreateSolution — Method
CreateSolution(mech; data_paths=String[], phase=nothing, kinetics_reader=:native, validate=true)Load the selected gas phase directly from YAML. Gas kinetics are parsed in Julia; an optional legacy NPZ sidecar may provide transport polynomial fits. Set kinetics_reader=:sidecar to compare against the legacy kinetics arrays. Imports are resolved relative to the mechanism first, then in data_paths.
Arrhenius.H_mass_func — Method
get enthaphy (H) per mass
Arrhenius.S_mass_func — Method
get entropy (S) per unit mass
Arrhenius.U_mass_func — Method
get enthaphy (U) per mass
Arrhenius.X2C — Method
get concentration (C) from mole fraction (X)
Arrhenius.X2Y — Method
get mass fraction (Y) from mole fraction (X)
Arrhenius.Y2C — Method
get concentration (C) from mass fraction (Y)
Arrhenius.Y2X — Method
get mole fraction (X) from mass fraction (Y)
Arrhenius.activation_energy — Method
Effective activation energy [J/kmol] at the supplied reaction enthalpy [J/kmol].
Arrhenius.cal_a — Method
cal_a(Solution, T, p, X)calculates the molar helmholz free energy (a) for each species
Arrhenius.cal_a_RT — Method
cal_a_RT(gas, T, p, X)calculates the dimensionless mole based helmholz free energy (a) for each species
Arrhenius.cal_a_mean — Method
cal_a_mean(Solution, T, p, X)calculates the mean mole based helmholz free energy (a) of the mixture
Arrhenius.cal_amass — Method
cal_amass(Solution, T, p, X)calculates the partial mass based helmholz free energy (a) for each species
Arrhenius.cal_amass_mean — Method
cal_amass_mean(Solution, T, p, X)calculates the mean mass based helmholz free energy (a) of the mixture
Arrhenius.cal_cp — Method
cal_cp(Solution, T, p, X)calculates the molar Heat capacity at constant pressure (cp) for each species
Arrhenius.cal_cp_R — Method
cal_cp_R(gas, T, p, X)calculates the dimensionless mole based heat capacity at constant pressure (cp) for each species
Arrhenius.cal_cp_mean — Method
cal_cp_mean(Solution, T, p, X)calculates the mean mole based Heat capacity at constant pressure (cp) of the mixture
Arrhenius.cal_cpmass — Method
cal_cpmass(Solution, T, p, X)calculates the partial mass based Heat capacity at constant pressure (cp) for each species
Arrhenius.cal_cpmass_mean — Method
cal_cpmass_mean(Solution, T, p, X)calculates the mean mass based Heat capacity at constant pressure (cp) of the mixture
Arrhenius.cal_cv — Method
cal_cv(Solution, T, p, X)calculates the molar Heat capacity at constant volume (cv) for each species
Arrhenius.cal_cv_R — Method
cal_cv_R(gas, T, p, X)calculates the dimensionless mole based heat capacity at constant volume (cv) for each species
Arrhenius.cal_cv_mean — Method
cal_cv_mean(Solution, T, p, X)calculates the mean mole based Heat capacity at constant volume (cv) of the mixture
Arrhenius.cal_cvmass — Method
cal_cvmass(Solution, T, p, X)calculates the partial mass based Heat capacity at constant volume (cv) for each species
Arrhenius.cal_cvmass_mean — Method
cal_cvmass_mean(Solution, T, p, X)calculates the mean mass based Heat capacity at constant volume (cv) of the mixture
Arrhenius.cal_g — Method
cal_g(Solution, T, p, X)calculates the molar gibbs free energy (g) for each species
Arrhenius.cal_g_RT — Method
cal_g_RT(gas, T, p, X)calculates the dimensionless mole based free gibbs energy (g) for each species
Arrhenius.cal_g_mean — Method
cal_g_mean(Solution, T, p, X)calculates the mean mole based gibbs free energy (g) of the mixture
Arrhenius.cal_gmass — Method
cal_gmass(Solution, T, p, X)calculates the partial mass based gibbs free energy (g) for each species
Arrhenius.cal_gmass_mean — Method
cal_gmass_mean(Solution, T, p, X)calculates the mean mass based gibbs free energy (g) of the mixture
Arrhenius.cal_h — Method
cal_h(Solution, T, p, X)calculates the molar enthalpy (h) for each species
Arrhenius.cal_h_RT — Method
cal_h_RT(gas, T, p, X)calculates the dimensionless mole based enthalpy (h) for each species
Arrhenius.cal_h_cp_s0! — Method
Species hRT, cpR, and s0R in one pass; element values match the individual `cal*_R!` functions term for term.
Arrhenius.cal_h_mean — Method
cal_h_mean(Solution, T, p, X)calculates the mean mole based enthalpy (h) of the mixture
Arrhenius.cal_hmass — Method
cal_hmass(Solution, T, p, X)calculates the partial mass based enthalpy (h) for each species
Arrhenius.cal_hmass_mean — Method
cal_hmass_mean(Solution, T, p, X)calculates the mean mass based enthalpy (h) of the mixture
Arrhenius.cal_s — Method
cal_s(Solution, T, p, X)calculates the molar entropy (s) for each species
Arrhenius.cal_s0 — Method
cal_s0(Solution, T, p, X)calculates the molar reference entropy (s0) for each species
Arrhenius.cal_s0_R — Method
cal_s0_R(gas, T, p, X)calculates the dimensionless mole based reference state entropy (s0) for each species
Arrhenius.cal_s0_mean — Method
cal_s0_mean(Solution, T, p, X)calculates the mean mole based reference entropy (s0) of the mixture
Arrhenius.cal_s0mass — Method
cal_s0mass(Solution, T, p, X)calculates the partial mass based reference entropy (s0) for each species
Arrhenius.cal_s0mass_mean — Method
cal_s0mass_mean(Solution, T, p, X)calculates the mean mass based reference entropy (s0) of the mixture
Arrhenius.cal_s_R — Method
cal_s_R(gas, T, p, X)calculates the dimensionless mole based entropy (s) for each species
Arrhenius.cal_s_mean — Method
cal_s_mean(Solution, T, p, X)calculates the mean mole based entropy (s) of the mixture
Arrhenius.cal_smass — Method
cal_smass(Solution, T, p, X)calculates the partial mass based entropy (s) for each species
Arrhenius.cal_smass_mean — Method
cal_smass_mean(Solution, T, p, X)calculates the mean mass based entropy (s) of the mixture
Arrhenius.cal_u — Method
cal_u(Solution, T, p, X)calculates the molar internal energy for each species
Arrhenius.cal_u_RT — Method
cal_u_RT(gas, T, p, X)calculates the dimensionless mole based internal energy (u) for each species
Arrhenius.cal_u_mean — Method
cal_u_mean(Solution, T, p, X)calculates the mean mole based internal energy of the mixture
Arrhenius.cal_umass — Method
cal_umass(Solution, T, p, X)calculates the partial mass based internal energy for each species
Arrhenius.cal_umass_mean — Method
cal_umass_mean(Solution, T, p, X)calculates the mean mass based internal energy of the mixture
Arrhenius.catalytic_diagnostics — Function
Combined inventory and conservation rates, including surface storage and bulk deposition.
Arrhenius.catalytic_wall_diagnostics — Method
Surface rates, wall mass fluxes and elemental balances in SI units.
Arrhenius.convert_precision — Method
convert_precision(gas::Solution, T)Return an independent copy of gas whose floating-point mechanism, thermodynamic, transport, and molecular data use type T. Index arrays and species names retain their original types. The default YAML loader continues to construct Float64 solutions.
Arrhenius.counterflow_residual! — Function
Evaluate continuity, radial momentum, pressure curvature, species and energy.
Arrhenius.coverage_thermo! — Method
coverage_thermo!(workspace, model, T, theta)Evaluate coverage-dependent standard-state properties at temperature T [K] and coverages theta (must lie in [0, 1] and sum to one). Fills workspace.enthalpy_RT (h°/RT), workspace.entropy_R (s°/R, including the +log(theta_ref) standard-state reference-coverage correction), workspace.cp_R (cp°/R), and workspace.gibbs_RT (g°/RT = h°/RT - s°/R). The returned arrays alias the workspace.
Arrhenius.coverage_thermo — Method
coverage_thermo(model, T, theta)Allocating convenience form of coverage_thermo!; returns a NamedTuple of independently owned arrays.
Arrhenius.critical_properties — Method
critical_properties(fluid::AbstractString)Return the TPX model's critical temperature T [K], pressure P [Pa], density density [kg/m³], molecular weight molecular_weight [kg/kmol], and critical compressibility Z = P*molecular_weight/(density*R*T).
Supported names (case insensitive) are water, nitrogen, methane, hydrogen, oxygen, carbon dioxide, heptane, and HFC-134a. This function provides critical properties; it does not construct an equation-of-state model. For liquid/vapor water states, use PureWater.
Arrhenius.density — Method
Mass density [kg/m³] at each grid point.
Arrhenius.disable_two_point_control! — Method
disable_two_point_control!(flame)Remove the auxiliary mass-flux row, store the current axial mass-flux endpoints [kg/(m² s)] as the inlet fluxes and restore inlet-flux boundary conditions. Enable/disable without solving reproduces the initial state bit-exactly.
Arrhenius.dusty_gas_diffusion! — Method
dusty_gas_diffusion!(workspace, P, T, X)Return the full dusty-gas diffusion matrix [m²/s]. P is Pa, T is K, and X contains normalized mole fractions. The returned matrix belongs to the workspace and is replaced by the next coefficient or flux evaluation.
Arrhenius.dusty_gas_molar_fluxes! — Method
dusty_gas_molar_fluxes!(flux, workspace, T1, T2, rho1, rho2, Y1, Y2, delta)Write species molar fluxes [kmol/(m² s)] from point 1 toward point 2, separated by positive delta [m]. Temperatures are K, densities kg/m³, and Y1, Y2 are normalized mass fractions. The calculation includes molecular diffusion, Knudsen diffusion and pressure-driven Darcy flow. No zero-total-flux correction is applied: momentum can be transferred to the stationary porous medium.
Coefficients are evaluated at arithmetic mean T/P and mole fractions formed from mean endpoint concentrations. Darcy's term uses those mean concentrations directly, including when endpoint temperatures differ.
Arrhenius.dusty_gas_molar_fluxes — Method
Allocate and return species molar fluxes [kmol/(m² s)] between two endpoint states.
Arrhenius.dusty_gas_permeability — Method
The prescribed or close-packed-sphere Darcy permeability [m²].
Arrhenius.dusty_gas_thermal_conductivity — Method
Gas-phase multicomponent thermal conductivity [W/(m K)]; no porous-solid correction is included.
Arrhenius.equilibrate — Method
equilibrate(gas::Solution, phase::StoichiometricCondensedPhase; T,
P=one_atm, X, mode=:TP, initial_gas_moles=1.0,
temperature_bounds=(200.0, 6000.0), property_rtol=1e-10)Native equilibrium of one ideal gas with a single initially absent fixed-stoichiometry condensed phase. Supported conserved pairs are :TP and :HP (symbols or strings); the gas-only equilibrate methods and their tolerances are unchanged. The initial state is initial_gas_moles kmol of gas at T, P, X plus zero kmol of the condensed phase; initially present solids are not supported, and neither are multiple condensed phases, nonideal phases, or charged species.
The condensed phase forms only when its element inventory allows it and its formation affinity is positive. If the phase requires an element with zero initial inventory, formation is excluded by conservation: the gas-only state is returned with zero condensed amount, status == :inactive_by_elements, and affinity == NaN.
Returns (; T, P, X, Y, gas_moles, condensed_moles, gas_species_moles, species_moles, status, affinity, element_error, enthalpy_error): gas mole and mass fractions X/Y, the total gas amount gas_moles (kmol), the condensed amount condensed_moles (kmol), the per-species gas amounts, the combined amounts (gas species order, then the condensed species), a status of :gas_only, :condensed_present, or :inactive_by_elements, the dimensionless phase affinity (zero when present, nonpositive when absent), the relative all-element conservation error, and the relative enthalpy conservation error (NaN for :TP).
The system is solved per 1 kmol of initial gas and all amounts are scaled by initial_gas_moles; equilibrium temperatures and compositions do not depend on it. temperature_bounds brackets the :HP temperature search; like the gas-only solver, evaluation outside the species fit ranges extrapolates the polynomials. property_rtol controls the :HP conserved-enthalpy solve.
Arrhenius.equilibrate — Method
equilibrate(gas; T, P=one_atm, X, mode=:TP, temperature_bounds=(200,6000),
property_rtol=1e-10)Native single-phase ideal-gas equilibrium. Supported conserved pairs are :TP, :TV, :HP, :UV, :SP and :SV (symbols or strings). The supplied state defines the conserved specific enthalpy, internal energy, entropy, or volume. Returns (T, P, X, Y); no input is modified. Absent ordinary elements stay absent; signed electron counts conserve the supplied net charge.
The temperature search uses the explicit temperature_bounds. Like the underlying NASA property functions, evaluation outside species fit ranges extrapolates the polynomials. Supply bounds within the shared fit interval when extrapolation is unsuitable. This solver does not support nonideal, surface, or multiphase equilibrium. property_rtol controls the outer conserved-property temperature solve for HP, UV, SP and SV states, with an enthalpy/energy scale floor of 1e6 J/kg or an entropy scale floor of 1e3 J/(kg K). Element-balance tolerances are unchanged.
Arrhenius.equilibrium_sound_speeds — Method
equilibrium_sound_speeds(gas; T, P=one_atm, X, pressure_step=1e-4,
temperature_bounds=(200,6000))Equilibrate at (T,P) and estimate equilibrium and frozen sound speeds from a relative pressure perturbation at constant entropy. Returns speeds in m/s as equilibrium, frozen, and frozen_at_equilibrium, plus the unperturbed state and perturbed_state. The last speed uses the analytic frozen formula at the perturbed equilibrium state. The pressure derivative has first-order truncation error; pressure_step must also be large enough to resolve equilibrium errors.
Arrhenius.equivalence_ratio — Method
equivalence_ratio(gas, X; fuel=nothing, oxidizer=nothing, basis=:mole,
include_species=nothing)Return equivalence ratio from a mole composition. With explicit streams, use the conserved Bilger mixture fraction. Without streams, assume all C/H/S originate in fuel and all O in oxidizer. Optionally restrict to named species.
Arrhenius.extinct — Method
Whether the computed temperature rise is less than 10 K.
Arrhenius.flame_residual! — Function
Evaluate the discretized steady species, energy, and mass-flow residual.
Arrhenius.flame_speed_sensitivities — Method
flame_speed_sensitivities(f::FreeFlame)Normalized laminar flame speed sensitivities $s_i = (k_i/S_u)\,dS_u/dk_i$ to the rate constant of every reaction at a converged conservative free flame. Construct with discretization=:conservative and solve before calling. One adjoint solve with the steady Newton Jacobian gives $λ$ with $Jᵀλ = ∂S_u/∂u$; scaling reaction $i$ scales its net rate of progress, which enters only the species balances of each node, so $s_i = -λᵀ ∂F/∂\ln k_i / S_u$. The adjoint uses a finite-difference Jacobian with transport coefficients updated in every column, as Cantera's adjoint sensitivities do.
Arrhenius.frozen_sound_speed — Method
frozen_sound_speed(gas; T, P=one_atm, X)Ideal-gas sound speed in m/s with composition held fixed, sqrt((cp/cv)*R*T/MW).
Arrhenius.get_H — Method
get enthaphy (H) per mole
Arrhenius.get_S — Method
get entropy (S)
Arrhenius.get_U — Method
get enthaphy (U) per mole
Arrhenius.get_cp — Method
get specific of heat capacity
Arrhenius.get_cv — Method
get specific of heat capacity
Arrhenius.heat_release_rate — Method
Volumetric chemical heat release rate [W/m³], positive for heat release.
Arrhenius.heat_release_rate — Method
heat_release_rate(f)Volumetric chemical heat release rate [W/m^3] at each grid point.
Arrhenius.initialize_catalytic_coverages! — Method
Initialize stationary coverages at the inlet composition and wall temperature. integrator is a caller-owned stiff native Julia surface ODE integrator, as in solve_surface. This initialization never uses a reference flow solution.
Arrhenius.ionized_flux! — Method
ionized_flux!(flux, workspace, data, gradX, Yleft, Yright;
density, electric_field=0.0, frozen=false)Fill mass fluxes [kg/(m² s)] with midpoint transport and mole-fraction gradients. The density is the left-node density; drift uses the average of endpoint mass fractions. The electric-field stage corrects neutral fluxes to conserve total mass. The frozen stage sets charged fluxes to zero and applies the source neutral correction without renormalizing neutral mass fractions. Endpoint mass fractions may contain signed, unnormalized Newton trial values; they are not clipped or normalized by this algebraic flux function.
Arrhenius.ionized_transport! — Method
ionized_transport!(workspace, data, P, T, X)Return mixture viscosity [Pa s], thermal conductivity [W/(m K)], and electrical conductivity [S/m], and update diffusion coefficients and mobilities. Input mole fractions sum to one; signed solver traces are floored only in the transport sums, following Cantera. All properties use gas temperature. The optional meanmolecularweight preserves a solver state's molecular weight when its underlying mass fractions are not normalized.
Arrhenius.isentropic_state — Method
isentropic_state(gas; T, P=one_atm, X, pressure,
temperature_bounds=(1,6000))Find the state at pressure (Pa) with the entropy and composition of (T,P,X). Returns (T,P,X,Y) without changing the input. Species heat capacities may vary with temperature. The explicit temperature bounds constrain the search; values outside species fit ranges extrapolate their thermodynamic polynomials.
Arrhenius.mass_fractions — Method
Species mass fractions, with species along rows and grid points along columns.
Arrhenius.mass_fractions — Method
Return normalized mass fractions, interpreting input on the specified basis.
Arrhenius.mix_constant_pressure — Method
mix_constant_pressure(gas::Solution, streams)Steady adiabatic mixing of ideal-gas streams at a common pressure. streams is a tuple or vector of named tuples, each with T (K), P (Pa), X (composition) and moles (kmol). Every stream shares gas — one species ordering and ideal-gas thermodynamics — and one pressure, matched to a relative tolerance of 1e-10. Compositions accept any form mole_fractions supports. Stream amounts must be finite and nonnegative with a positive total; streams carrying zero amount do not participate in the mixture. Inputs are never modified.
The mixed composition and totals follow from species and mass conservation. The mixed temperature conserves the total enthalpy, sum(moles * cal_h_mean(gas, T, P, X)) in J, with molar enthalpies in J/kmol from the species thermodynamic models; their reference states fix the energy convention. A safeguarded Newton solve with derivative cal_cp_mean brackets the root between the inlet temperature extremes; equal inlet temperatures return that exact temperature. Temperatures and amounts are Float64, matching the IdealGasStates APIs; the root solve itself does not support generic automatic differentiation.
Returns (T, P, X, Y, moles, mass, enthalpy): K, Pa, mole and mass fractions, total kmol, total mass in kg and the conserved total enthalpy in J. The state stays chemically frozen — call equilibrate separately to equilibrate it.
Arrhenius.mix_trans — Method
mix_trans(gas::A, P, T, X, mean_MW) where {A <: Arrhenius.Solution}Compute the tranposrt properties of a mixture using mixture average formula
Equations Ref. https://personal.ems.psu.edu/~radovic/ChemKinTheoryPaSR.pdf Equations. 5-50/51/52 for viscosity and thermal conductivity
Pure species viscosities [Pa-s]
Thermal conductivity. [W/m/K].
Equation 5-46 for diffusion
Mixture-averaged diffusion coefficients [m^2/s] relating the mass-averaged diffusive fluxes (with respect to the mass averaged velocity) to gradients in the species mole fractions.
Transport behavior is covered by the package test suite.
See also implementations in ReacTorch
Arrhenius.mixture_fraction — Method
mixture_fraction(gas, X; fuel, oxidizer, basis=:mole, element="Bilger")Return fuel mass fraction inferred from conserved elements. X is a mole composition; basis applies only to fuel and oxidizer. The default Bilger definition combines C, H, S and O; an individual element may also be selected.
Arrhenius.mixture_thermal_diffusion! — Method
mixture_thermal_diffusion!(workspace, data, P, T, X)Compute the mixture-averaged Soret coefficients [kg/(m s)], following Cantera 4 MixTransport::getThermalDiffCoeffs. Return the updated vector workspace.thermal_diffusion. These are distinct from multicomponent Soret coefficients; their mass-flux contribution is -DT * grad_T / T for either mole- or mass-gradient mixture diffusion. Requires the collision sidecar, but no species heat capacities or coupled multicomponent matrix solve.
Arrhenius.mixture_transport! — Method
mixture_transport!(workspace, gas, P, T, X)Return viscosity [Pa s] and conductivity [W/(m K)], and fill workspace.diffusion with mole-gradient mixture diffusion coefficients [m²/s]. X must contain normalized mole fractions. Requires transport polynomials from mechanism/export_sidecar.py.
Arrhenius.mole_fractions — Method
Species mole fractions, with species along rows and grid points along columns.
Arrhenius.mole_fractions — Method
mole_fractions(gas, composition; basis=:mole)Return normalized mole fractions. Compositions may be vectors, species-name dictionaries, "H2:2, O2:1", or a single species name. basis=:mass interprets the input amounts as masses. The input is never modified.
Arrhenius.moving_wall_diagnostics — Function
moving_wall_diagnostics(model_or_rhs, u, t=0)Report vessel states, wall velocity/heat/pressure work, and integrated balances. mass_balance = total_mass - external_mass_input and energy_balance = total_internal_energy + pressure_work_output - energy_input are invariants. Heat and work are signed in J, masses in kg, and elemental inventories in kmol. Internal gas heat transfers cancel from energy input. wall_kinetic_energy accounts for inertial walls separately; massless piston work need not vanish, even for an otherwise closed network.
Arrhenius.moving_wall_isoutofdomain — Method
Reject nonpositive volume, temperature, and mass, or materially negative species mass.
Arrhenius.moving_wall_jacobian! — Function
Dense finite-difference Jacobian with species, temperature, volume, and velocity couplings.
Arrhenius.moving_wall_problem — Method
Prepare native callbacks for a caller-owned stiff ODE integrator.
Arrhenius.moving_wall_state — Method
Independent initial species-mass, temperature, volume, velocity, and ledger state.
Arrhenius.multicomponent_fluxes! — Method
multicomponent_fluxes!(flux, workspace, data, P, T, X, grad_X, grad_T)Return mass fluxes [kg/(m² s)] relative to the mass-averaged velocity, using already updated transport coefficients. grad_X is in 1/m and grad_T in K/m. The Soret contribution is -thermal_diffusion * grad_T / T.
Arrhenius.multicomponent_thermal_conductivity! — Method
multicomponent_thermal_conductivity!(workspace, data, gas, P, T, X)
multicomponent_thermal_conductivity!(workspace, data, P, T, X, cp_R)Return Dixon–Lewis thermal conductivity [W/(m K)] without computing the multicomponent diffusion matrix. This updates thermal diffusion coefficients and the thermal workspace; workspace.diffusion retains its previous value. Input requirements are the same as for multicomponent_transport!.
Arrhenius.multicomponent_transport! — Method
multicomponent_transport!(workspace, data, P, T, X, cp_R)Compute the Dixon–Lewis multicomponent matrix [m²/s], thermal diffusion coefficients [kg/(m s)], and conductivity [W/(m K)]. Return conductivity and store the other results in workspace.diffusion and workspace.thermal_diffusion. cp_R contains species reference ideal-gas heat capacities divided by R. Mole fractions must be normalized and nonnegative; zero entries use the same 1e-20 transport floor as Cantera. This floor is not renormalized.
Arrhenius.network_diagnostics — Function
network_diagnostics(network_or_rhs, u, t=0.0)Return independent named node properties, device flow/heat rates, total and external mass/energy rates, and net elemental rates. Energy accounting includes reservoir enthalpy flow, reservoir wall heat, and imposed isothermal bath heat. Rates are kg/s, W, and kmol of element/s. Reuse a prepared RHS to avoid repeatedly allocating workspaces when evaluating a trajectory.
Arrhenius.network_isoutofdomain — Method
Check positive temperature/mass and reject species masses below a relative tolerance.
Arrhenius.network_jacobian! — Function
Dense second-order finite-difference Jacobian, including all device/state couplings.
Arrhenius.network_problem — Method
Prepare native callbacks and state for a caller-owned stiff ODE solver.
Arrhenius.network_rhs — Method
Prepare an in-place native network RHS. Each concurrent solve needs its own instance.
Arrhenius.network_state — Method
Return independent species-mass/temperature initial states in named-node order.
Arrhenius.pseudo_arclength! — Method
Trace or restart a fixed-grid branch with a bordered pseudo-arclength Newton corrector.
Arrhenius.radiation_source — Method
Return (heat_loss, planck_absorption) at all grid points, in W/m³ and 1/m. Positive heat loss cools the gas. Values are zero when radiation is disabled; the last inlet heat-loss entry is zero, matching Cantera's diagnostic convention.
Arrhenius.rate_constant — Method
Evaluate a Blowers–Masel forward rate constant from temperature and reaction enthalpy.
Arrhenius.reaction_rate_constants — Method
Forward, reverse and concentration-equilibrium constants at an ideal-gas state.
Arrhenius.reactor_jacobian! — Function
reactor_jacobian!(J, u, rhs, t=0)Evaluate a dense finite-difference Jacobian of a prepared ReactorRHS. Second-order central differences are used inside the physical domain and second-order forward differences at zero mass fractions. Negative trial mass fractions use second-order backward differences, sampling the RHS at u[j] - step and u[j] - 2 * step so no positive perturbation crosses the clipped concentration branch of the RHS. This callback avoids passing automatic-differentiation scalars through the fixed-type workspace. The input state is unchanged.
Arrhenius.reactor_problem — Method
reactor_problem(reactor, tspan)Prepare a solver-independent named tuple (f, jac, tgrad, u0, tspan, p). The callbacks use the SciML in-place calling convention. tgrad is zero for this autonomous system. Construct a solver's ODE problem from these fields. Each call allocates independent workspaces for safe concurrent integrations.
Arrhenius.reactor_properties — Function
reactor_properties(reactor, u=reactor_state(reactor))Return temperature (K), pressure (Pa), density (kg/m³), composition, specific heat capacities (J/kg/K), enthalpy and internal energy (J/kg), mass-fraction sum, and elemental inventories (kmol of element/kg). Values use the unprojected state, so mass, element, and energy drift can be checked after integration.
Arrhenius.reactor_rhs — Method
reactor_rhs(reactor)Prepare a callable rhs!(du, u, p, t) using native Arrhenius kinetics and thermodynamics. p is unused. The workspace has the same scalar type as the initial state; use reactor_jacobian! with solvers requiring derivatives.
Negative trial mass fractions are clipped only when evaluating reaction concentrations. The state and its mass/element balances are never projected.
Arrhenius.reactor_state — Method
Return an independent initial state vector [mass_fractions; temperature].
Arrhenius.read_flame_csv — Method
read_flame_csv(path) -> (; columns, data)Read a flame CSV into tabulated data. Both layouts are recognized: the native save_flame table (z_m,velocity_m_s,temperature_K,density_kg_m3,...) and the equivalent Cantera table (grid,velocity,T,D,X_<species>...). columns holds the header entries and data is a Matrix{Float64} with one row per saved grid point, in file order. Rows or columns may be pruned before the table is passed to set_initial_guess!.
Arrhenius.redlich_kwong_properties! — Method
redlich_kwong_properties!(work, model, T, rho, X)Evaluate a homogeneous RK state from kelvin, kg/m³ and normalized mole fractions. The returned h/u/s/cp/cv are J/kmol or J/kmol/K; hmass etc. use kg. `uTV[k] = ∂U/∂n[k]|T,V,n[j≠k]` is the energy coefficient for reacting constant-volume systems. It differs from ordinary partial molar internal energy. Returned vector properties alias workspace storage until its next evaluation. Only mechanically stable states with positive pressure and heat capacity are accepted. Species polynomials are evaluated at the supplied temperature without clamping, as in Cantera. Users must check their fit ranges and the accuracy of the cubic EOS for their application.
Arrhenius.redlich_kwong_rates! — Method
redlich_kwong_rates!(output, gas, model, T, rho, X, work; rate_multipliers=nothing)Evaluate species production in kmol/m³/s. X is normalized mole composition. Third-body and falloff rates use physical concentrations. Reaction mass action uses fugacity-based activity concentrations, and PLOG uses the EOS pressure. Equilibrium constants use ideal reference species h/s at one_atm; the phase standard-pressure and standard-concentration terms cancel to this reference. Returns the thermodynamic state, with arrays aliasing work. Supported reaction models are elementary Arrhenius, third-body, Lindemann, Troe and PLOG. Blowers–Masel reactions are explicitly rejected.
Arrhenius.redlich_kwong_state — Method
redlich_kwong_state(model; T, X, P=nothing, rho=nothing, basis=:mole, root=:gas)Return native RK mixture and partial properties from T/P or T/density. The largest physical cubic root is selected by default; root=:liquid explicitly selects the smallest. Selection does not perform phase-equilibrium stability or flash calculations. All arguments use SI units.
Arrhenius.refit_nasa7_common_tmid — Method
Refit all eligible NASA7 species to a single selected midpoint. The output retains each species' temperature endpoints, fits both cp segments by constrained least squares, enforces cp and d(cp)/dT continuity, and anchors h/s.
Arrhenius.refit_nasa7_continuity — Method
Refit the high-temperature NASA7 cp segment to be C0/C1 continuous. Returns (report, yaml_path); original coefficients are left unchanged. The high cp polynomial is the least-squares fit to its original cp values on an evenly spaced temperature grid subject to matching cp and dcp/dT at Tmid; h and s integration constants are then anchored continuously at Tmid.
Arrhenius.refit_plog_to_chebyshev — Method
Fit one root-section PLOG reaction to Cantera Chebyshev YAML.
The source file is never modified. The output is written only when the maximum validation-grid error is within max_log10_error, unless force=true. The returned Chebyshev mechanism is for Cantera; the native reader currently rejects Chebyshev rates explicitly.
Arrhenius.restore_continuation_checkpoint! — Method
Restore a checkpoint after verifying flame kind, mechanism, and boundary conditions.
Arrhenius.restore_flame! — Method
restore_flame!(flame, path)Restore a native .npz snapshot into a flame using the same mechanism and kind. For multicomponent or Soret snapshots, supply matching MultiTransportData on the destination flame. A restored state is marked converged only if its current native steady residual satisfies the solver tolerance. Snapshots fingerprint the numerical mechanism representation and are intended for the same Julia version. Older archives without a profile-grid policy restore :full_knots; missing spatial discretization retains historical finite-difference behavior. Invalid archives leave the destination unchanged.
Arrhenius.save_continuation_checkpoint — Method
Save a continuation point, tangent, grid, and next arc step to an NPZ checkpoint.
Arrhenius.save_flame — Method
save_flame(path, flame; overwrite=false, basis=:mass)Save a .npz restart snapshot or a .csv table. Snapshots retain the grid, boundary conditions, temperature profile, transport options, spatial discretization, profile-grid policy, and native state. CSV columns contain position [m], velocity [m/s], temperature [K], density [kg/m³], heat release [W/m³] and species fractions (basis=:mass or :mole).
Arrhenius.set_catalytic_inlet! — Method
Change the inlet composition while retaining the current catalytic solution.
Arrhenius.set_catalytic_reactions! — Method
Change reaction multipliers and coverage equation mode, retaining the flow profile.
Arrhenius.set_electric_field! — Method
Enable or freeze charged diffusion and the electric-field equation for the next solve.
Arrhenius.set_equivalence_ratio — Method
set_equivalence_ratio(gas, phi; fuel, oxidizer, basis=:mole,
diluent=nothing, fraction=nothing)Return mole fractions at the requested equivalence ratio. Complete oxidation forms CO2, H2O and SO2; other elements are inert in the mixture definition. Optional dilution specifies exactly one :diluent, :fuel, or :oxidizer fraction in a dictionary or named tuple, using the supplied basis.
Arrhenius.set_initial_guess! — Method
set_initial_guess!(flame, data)Load a restart initial guess from tabulated flame data, following Cantera's FlameBase.set_initial_guess(data=...). data is a CSV path (see read_flame_csv) or a (; columns, data) table, for example a pruned subset of a previous save_flame export. The flame adopts the data grid and takes its temperature, velocity and species fractions from the table; the temperature profile is shifted so its inlet matches the flame inlet, species absent from the table start at zero (renormalizing the supplied fractions per grid point, as Cantera's SolutionArray restore does; a table without any species columns keeps the inlet composition), and boundary conditions are not overwritten. For a FreeFlame the saved velocity becomes the mass-flux profile, and the fixed-temperature point is reselected on the loaded profile; for a BurnerFlame the prescribed mass flux is retained. The flame is marked unconverged; call solve! to continue from the guess.
Arrhenius.set_mass_flux! — Method
Change positive inlet mass-flux magnitudes [kg/(m² s)] while retaining the current profile.
Arrhenius.set_mixture_fraction — Method
set_mixture_fraction(gas, Z; fuel, oxidizer, basis=:mole)Return mole fractions with fuel mass fraction Z in the combined streams. basis describes the two input stream compositions, not Z.
Arrhenius.set_porous_medium! — Method
Update medium properties and invalidate cached coefficients.
Arrhenius.set_radiation! — Function
set_radiation!(flame, enabled=true; boundary_emissivities=(0,0))Enable or disable the gray optically thin H2O/CO2 radiation model. Emissivities of the fuel and oxidizer boundaries must lie in [0,1]. The current solution is retained for continuation; call solve!(flame; refine_grid=false) to repeat the official nonradiating-to-radiating calculation on the same grid.
Arrhenius.set_states — Method
"mainly for testing code, will be removed in the future" "please customize such functions following this example"
Arrhenius.set_temperature_profile! — Method
set_temperature_profile!(flame::BurnerFlame, positions, temperatures;
relative=true, grid_policy=:full_knots)Prescribe temperature [K] using piecewise-linear interpolation. Relative positions span 0–1; absolute positions are in meters. The profile must cover the domain and match the burner temperature at its inlet. All supplied pairs are copied and retained when the solution grid changes.
For conservative flames, grid_policy=:full_knots inserts every interior profile knot. :adaptive retains the current grid and adds cells during solve! wherever the exact profile-to-cell-chord error exceeds 1% of the largest supplied temperature, in addition to species and spacing refinement. Adaptive profiles require conservative discretization and no Soret diffusion. Enabling Soret later restores full knots. Finite-difference flames retain their historical profile sampling behavior.
Arrhenius.set_transport! — Method
set_transport!(flame, model; data=flame.multicomponent_data, soret=false)Select :mixture_averaged or :multicomponent diffusion. Multicomponent diffusion and either model's Soret diffusion require MultiTransportData exported for the same mechanism. soret=true includes thermal diffusion. Use flux_gradient_basis=:mass or :mole for mixture-averaged diffusion. An existing solution is retained as the initial guess for the next solve!. Enabling Soret on an adaptive prescribed-temperature grid first inserts all profile knots and interpolates the state, changing its policy to :full_knots. Invalid transport arguments leave the flame unchanged.
Arrhenius.set_two_point_control! — Method
set_two_point_control!(flame; temperature, decrement=0)Enable two-point temperature control: fixes the temperature [K] at the interior grid points nearest the first (fuel side) and last (oxidizer side) crossing of temperature, recording the actual selected grid temperatures minus decrement [K]. A positive oxidizer mass-flux auxiliary row [kg/(m² s)] is inserted before the spread-rate row on first enable; the inlet mass fluxes become unknowns. temperature must lie in 200–6000 K and exceed both inlet temperatures.
Arrhenius.solve! — Method
Solve the axisymmetric flow with native equilibrium initialization and adaptive refinement. Time-step controls are as for premixed flames. The default refinement_interpolation=:velocity interpolates axial velocity and reconstructs mass flux with the residual density function; :mass_flux retains linear interpolation of the stored mass-flux component.
Arrhenius.solve! — Method
solve!(flame; refine_grid=true, ratio=3, slope=0.06, curve=0.12, prune=0,
max_points=1000, max_time_steps=500, loglevel=0, auto=false)Solve a native premixed flame using damped Newton iterations and implicit pseudo-time stepping. Failure raises an error and leaves converged=false. cantera_compatible=true selects the Cantera-compatible Newton policies and staged ladder for free and burner flames; auto=true is an alias. It tries the input grid and uniform 12/24/48-point grids, retries failed-stage solves with temperature locked, then refines and conditionally repeats after restoring expensive transport. Free flames also expand a too-narrow domain; burner flames detect blowoff and return a nonreacting solution. newton_options selects individual Newton policy values. Cantera's time-step controls: time_step_growth_factor, time_step_growth_strategy (:fixed_growth, :steady_norm, :transient_residual, :residual_ratio, :newton_iterations), time_step_callback(dt), time_step_regrid and jacobian_mode (:finite_difference by default, :analytic to enable residual-faithful analytic species columns, or :auto to additionally match Cantera's omitted Burner boundary blocks). cantera_compatible=true selects jacobian_mode=:auto for this solve; it does not change other defaults. prune is Cantera's fourth refine criterion: grid points whose slope/curve indicators fall below it are removed on each refinement pass (0 disables pruning; it must not exceed slope or curve).
Arrhenius.solve! — Method
Solve coupled native gas and surface equations, with adaptive axial refinement.
Arrhenius.solve! — Method
Solve the native axisymmetric counterflow diffusion flame. With auto=true, recover failed or extinguished coarse-grid solves using the native prescribed initial temperature profile, then progressively finer initial grids. Failure to find a burning solution raises an error and leaves converged=false. With auto=false, a converged extinguished state is returned for extinction continuation. Two-point control always retains the current branch and disables automatic reinitialization; call set_two_point_control! to choose new targets. Time-step controls (time_step_growth_factor, time_step_growth_strategy, time_step_callback, time_step_regrid, jacobian_mode) are as for premixed flames.
Diffusion solves evolve every species equation at interior nodes and enforce species closure only at the boundary excess species, matching Cantera's algebraic-row handling. The Nakamura diffusion case is substantially more expensive with this correct handling; performance work is tracked separately. See audit.md and verify.md for source references and measured validation. :residual_ratio growth is supported for this diffusion kind only among the counterflow kinds; premixed, twin-premixed, and stagnation require Cantera boundary-residual parity before using it.
Arrhenius.solve_network — Method
Integrate with integrator(problem; kwargs...), using the same contract as solve_reactor.
Arrhenius.solve_network_steady — Method
solve_network_steady(network; integrator, interval=1, max_time=100,
steady_tolerance=1e-8, initial_state=network_state(network), kwargs...)Relax an autonomous network in finite integration intervals until species-mass rates divided by vessel mass and temperature rates divided by temperature are below steady_tolerance (s⁻¹). The caller's solution must expose its states as solution.u. Returns (state, time, residual); throws if convergence is not reached by max_time. Time-varying boundary conditions require transient solves.
Arrhenius.solve_reactor — Method
solve_reactor(reactor, tspan; integrator, kwargs...)Integrate with a caller-supplied integrator(problem; kwargs...), where problem is the named tuple from reactor_problem. Returns the integrator's solution unchanged. The core package has no mandatory ODE solver dependency.
For example, after loading SciMLBase and OrdinaryDiffEqBDF:
function bdf(problem; kwargs...)
f = ODEFunction(problem.f; jac=problem.jac, tgrad=problem.tgrad)
ode = ODEProblem(f, problem.u0, problem.tspan, problem.p)
solve(ode, QNDF(); kwargs...)
end
solution = solve_reactor(reactor, (0.0, 0.001); integrator=bdf,
reltol=1e-8, abstol=1e-14, saveat=1e-5)Arrhenius.solve_surface — Method
Integrate surface coverages with a caller-owned stiff ODE integrator.
Arrhenius.solve_surface_flow — Method
Solve the stationary surface DAE with caller-owned native stiff integrators.
Arrhenius.solver_options — Method
Return the resolved keyword settings recorded by the latest solve! call.
Arrhenius.solver_stats — Method
solver_stats(flame) -> statsReturn the mutable solve-counter object owned by flame, mirroring Cantera's per-instance Sim1D.solver_stats: a PremixedStats for FreeFlame/ BurnerFlame (and ionized premixed flames), a CounterflowStats for the counterflow and impinging-jet kinds. These counters are a diagnostic only; they never influence solver decisions.
Counted fields per kind (a field a kind never increments stays zero):
- premixed kinds (
FreeFlame,BurnerFlame,IonizedFlame):newton_calls,newton_iterations,jacobians,residual_evals,property_nodes,time_steps,time_step_failures,steady_failures,regrids,grids;property_nodescounts node-property refreshes forFreeFlameandBurnerFlameand stays zero forIonizedFlame; - counterflow kinds (
CounterflowDiffusionFlame, the premixed-counterflow wrappers, impinging and catalytic jets): all of the above plusfd_jacobians,chem_jac_failures,recoveriesand per-attemptcallstuples — except catalytic jets, which recordgridsbut nevercalls.
residual_evals counts every call to the public residual evaluator (flame_residual!/counterflow_residual!) at its entry, before argument validation: damped-step trials, time-step-growth probes and finite-difference Jacobian columns are all included. Cantera's counterpart excludes the finite-difference Jacobian evaluations (OneDim::eval counts only count!=0 calls, and evalJacobian passes 0), so native residual_evals runs higher than Cantera's on finite-difference solves.
Exact semantics:
solve!resets the flame's counters at entry and they then report thatsolve!only. The reset happens after the keyword-argument validation, so an invalidratio/slope/prune/... argument throws with the previous counts intact. Checks that run after the reset point throw with the counters already zeroed (counterflow two-point-control validation, catalytic transport requirements) or partially counted (runtimeerrors such as amax_pointsoverrun orautonon-convergence).- Direct calls to the internal helpers (
_flame_newton!,_flame_steady!,_refine_flame!,_counterflow_newton!,_counterflow_steady!) accumulate on top of the current counters without resetting them. - A steady attempt that throws is not rolled back: the scalar counters it already incremented stay, and its
gridsentry (pushed at attempt entry) stays, but counterflowcallssummaries are appended only when the attempt returns, so a thrown attempt gets none. - Immutable objects driven through the helpers (property adapters, test fixtures) count into the family global instead of a per-flame entry.
- The exported
PREMIXED_STATS/COUNTERFLOW_STATSglobals mirror the accumulated family totals across all flames and are never reset bysolve!; callArrhenius.reset!on them manually for per-run attribution.
Arrhenius.solver_stats — Method
solver_stats(f::CounterflowDiffusionFlame) -> CounterflowStatsPer-flame solve counters; see Arrhenius.solver_stats for the exact reset, accumulation and failure semantics. Beyond the shared counters the counterflow kinds also count fd_jacobians (chemistry-Jacobian fallbacks to finite differences), chem_jac_failures and recoveries, and append one calls tuple per _counterflow_steady! attempt — (grid, dt, newton_iterations, jacobians, time_steps, time_step_failures, wall_seconds, converged) — when that attempt returns; attempts that throw get their grids entry only (catalytic jets record grids but never calls). All counterflow kinds count residual_evals once per counterflow_residual! call, including the wrapper and catalytic methods, which delegate here.
Arrhenius.species_index — Method
Get species index of a species
Example
species_index(gas, "O2")Arrhenius.species_thermo — Method
species_thermo(thermo::IdealGasThermo, T; P=one_atm)Evaluate dimensionless ideal-gas standard-state (cp_R, h_RT, s_R) for every species, in the phase's declared order. T is kelvin and P is pascals. NASA7, multi-region NASA9, Shomate, and constant-cp models may coexist. This standalone evaluation needs no reaction or transport sidecar. For example, species_thermo(IdealGasThermo(YAML.load_file("airNASA9.yaml")), 8000.0).
Arrhenius.steady_coverages — Method
steady_coverages(surface; integrator, interval=1, max_time=1e5,
steady_tolerance=1e-6, kwargs...)Integrate fixed-gas coverage equations until the maximum absolute coverage derivative is below steady_tolerance in s⁻¹. Returns the coverages, residual, elapsed physical time, and final integration solution. Temperatures and pressure are exactly those supplied to IdealSurface throughout the solve. At a restart, negative roundoff coverages within 1e-13 are set to zero and the site fractions are normalized before continuing.
Arrhenius.surface_flow_diagnostics — Method
Mass, momentum, elemental fluxes, and stationary-surface residual at one axial state.
Arrhenius.surface_flow_problem — Method
surface_flow_problem(flow, length; initial_coverages)Return a constant-mass-matrix DAE in axial distance. The first gas-species rows are differential and the remaining coverage rows are algebraic. Supply stationary inlet coverages, or use solve_surface_flow to initialize them.
Arrhenius.surface_flow_properties — Method
Recover the subsonic pressure, density, and speed from conserved momentum and mass flux.
Arrhenius.surface_jacobian! — Function
Second-order finite-difference coverage Jacobian, including rate dependencies.
Arrhenius.surface_rates — Function
Calculate an independent copy of gas/surface/bulk production and coverage rates.
Arrhenius.surface_rates! — Method
surface_rates!(workspace, mechanism, T, P, X, coverages; gas_temperature=T)
surface_rates!(workspace, surface, coverages=surface.coverages)Calculate elementary reaction and species production rates per unit surface area. workspace.production_rates is in kmol/m²/s in mechanism species order; coverage_rates is in s⁻¹ and includes each species' site size. X and coverages must already be normalized. Tiny negative trial coverages are clipped only while evaluating rates; accepted ODE states are domain checked.
Arrhenius.surface_reactor_chain — Method
surface_reactor_chain(flow, length; reactors=201, porosity=0.3,
integrator, kwargs...)March a chain of isothermal stirred reactors to steady state. Each volume is area*length/(reactors-1)*porosity; its surface area is surface_area_per_length*length/(reactors-1). As in surf_pfr_chain.py, the first reported state is the first reactor outlet at coordinate zero. Returns all gas mole/mass fractions, coverages, pressures, and dimensionless steady residuals. A damped Newton solve enforces fixed-pressure species and site balances; native stiff integration supplies a stable fallback initial guess.
Arrhenius.temperature — Method
Temperature [K] at each grid point.
Arrhenius.twin_flame_diagnostics — Method
Return consumption speed [m/s], characteristic upstream strain rate [1/s], and its grid index for a twin flame. Definitions follow the published Cantera twin flame example: integrate heat release divided by mass heat capacity, and use the largest forward velocity gradient upstream of the preheat velocity minimum.
Arrhenius.two_point_control! — Method
Trace a counterflow diffusion flame with Cantera's two-point temperature schedule.
At every step, choose control locations from the first/last crossing of the current relative temperature, lower the selected temperatures by the current decrement, and solve without grid refinement. The initial schedule and decrement adaptation follow Cantera's diffusionflamecontinuation example.
Arrhenius.velocity — Method
Axial velocity [m/s] at each grid point.
Arrhenius.water_rankine — Method
water_rankine(model; inlet_temperature=300, boiler_pressure=8e5,
pump_efficiency=0.6, turbine_efficiency=0.8)Compute a Rankine cycle starting with saturated liquid, with an adiabatic pump, constant-pressure heating to saturated vapor, and an adiabatic turbine. Returns the four states, the two isentropic comparison states, work and heat in J/kg, and thermal efficiency. Inputs and outputs use SI units.
Arrhenius.water_saturation — Method
Return saturation pressure [Pa] and saturated liquid/vapor densities [kg/m³].
Arrhenius.water_state — Method
water_state(model::PureWater; T, P)
water_state(model::PureWater; T, Q)
water_state(model::PureWater; P, Q)
water_state(model::PureWater; h, P)
water_state(model::PureWater; s, P)Construct an equilibrium liquid/vapor water state from exactly two independent SI properties. Q is vapor mass fraction, h specific enthalpy and s specific entropy. (T,v) and (u,P) are also supported. The EOS excludes ice and uses the temperature limits of the Reynolds model; TP on saturation is ambiguous. State fields include T,P,Q,rho,v,h,u,s,cp,cv,g,a. Two-phase cp is infinite and cv is NaN, matching the convention used by Cantera's Reynolds water backend.
Arrhenius.wdot! — Method
Compute reaction source terms into preallocated storage.
Arrhenius.wdot_func — Method
compute reaction source term dC/dt
For usage paths, see reactors, flames, and the examples index.
Plasma module
Plasma functionality is organized under Arrhenius.Plasma. The EEDF solver, plasma mechanism and state readers, plasma rate and thermochemistry functions, and plasma reactor types are available there. Existing top-level names remain available for compatibility, for example Arrhenius.solve_eedf and Arrhenius.Plasma.solve_eedf refer to the same function. Plasma composes the core ideal-gas thermochemistry, kinetics and reactor APIs. Surface kinetics and coverage thermochemistry are available through Arrhenius.Plasma as well as Arrhenius; their implementations remain owned by the core module.