API

Docstrings for Arrhenius.jl interface members can be accessed through Julia's built-in documentation system or in the list below.

Arrhenius.CreateSolutionFunction
CreateSolution(mech)

Reaction mechanism is interepreted here. Part of the infomation are read in from the yaml file, pary of them are from the pre-processed .npz file from ReacTorch and Cantera test for math enviroment

source
Arrhenius.mix_transFunction
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.

Test this module in transporttest.jl

See also implementations in ReacTorch

source
Arrhenius.set_statesFunction

"mainly for testing code, will be removed in the future" "please customize such functions following this example"

source

Thermo Interface API

The thermo functions can be called with the following functions. The ‘cal_‘ functions internally dispatch to

cal_phi(Solution,T,p,X) = cal_phi(Solution,Solution.thermo,T,p,X) to enable the usage of different thermo modules.

A new thermoModul should implement the dimless functions for cv, cp, h, a, g, s. with the inputs ‘cal_phi(Solution,Solution.thermo,T,p,X)‘. Then it should work with the rest of Arrenius. In the creation of a Solution object the thermo model is generated by the function ‘MyThermo(yaml::Dict)‘, which must be available as well. If you specify the name of your Thermomodel in the yaml files phase (e.g. ‘My‘ here or 'IdealGas') the code will automatically dispatch to the new thermomodel

Arrhenius.cal_aMethod
cal_a(Solution, T, p, X)

calculates the molar helmholz free energy (a) for each species

source
Arrhenius.cal_a_RTMethod
cal_a_RT(gas, T, p, X)

calculates the dimensionless mole based helmholz free energy (a) for each species

source
Arrhenius.cal_a_meanMethod
cal_a_mean(Solution, T, p, X)

calculates the mean mole based helmholz free energy (a) of the mixture

source
Arrhenius.cal_amassMethod
cal_amass(Solution, T, p, X)

calculates the partial mass based helmholz free energy (a) for each species

source
Arrhenius.cal_cpMethod
cal_cp(Solution, T, p, X)

calculates the molar Heat capacity at constant pressure (cp) for each species

source
Arrhenius.cal_cp_RMethod
cal_cp_R(gas, T, p, X)

calculates the dimensionless mole based heat capacity at constant pressure (cp) for each species

source
Arrhenius.cal_cp_meanMethod
cal_cp_mean(Solution, T, p, X)

calculates the mean mole based Heat capacity at constant pressure (cp) of the mixture

source
Arrhenius.cal_cpmassMethod
cal_cpmass(Solution, T, p, X)

calculates the partial mass based Heat capacity at constant pressure (cp) for each species

source
Arrhenius.cal_cpmass_meanMethod
cal_cpmass_mean(Solution, T, p, X)

calculates the mean mass based Heat capacity at constant pressure (cp) of the mixture

source
Arrhenius.cal_cvMethod
cal_cv(Solution, T, p, X)

calculates the molar Heat capacity at constant volume (cv) for each species

source
Arrhenius.cal_cv_RMethod
cal_cv_R(gas, T, p, X)

calculates the dimensionless mole based heat capacity at constant volume (cv) for each species

source
Arrhenius.cal_cv_meanMethod
cal_cv_mean(Solution, T, p, X)

calculates the mean mole based Heat capacity at constant volume (cv) of the mixture

source
Arrhenius.cal_cvmassMethod
cal_cvmass(Solution, T, p, X)

calculates the partial mass based Heat capacity at constant volume (cv) for each species

source
Arrhenius.cal_cvmass_meanMethod
cal_cvmass_mean(Solution, T, p, X)

calculates the mean mass based Heat capacity at constant volume (cv) of the mixture

source
Arrhenius.cal_gMethod
cal_g(Solution, T, p, X)

calculates the molar gibbs free energy (g) for each species

source
Arrhenius.cal_g_RTMethod
cal_g_RT(gas, T, p, X)

calculates the dimensionless mole based free gibbs energy (g) for each species

source
Arrhenius.cal_g_meanMethod
cal_g_mean(Solution, T, p, X)

calculates the mean mole based gibbs free energy (g) of the mixture

source
Arrhenius.cal_gmassMethod
cal_gmass(Solution, T, p, X)

calculates the partial mass based gibbs free energy (g) for each species

source
Arrhenius.cal_hMethod
cal_h(Solution, T, p, X)

calculates the molar enthalpy (h) for each species

source
Arrhenius.cal_h_RTMethod
cal_h_RT(gas, T, p, X)

calculates the dimensionless mole based enthalpy (h) for each species

source
Arrhenius.cal_hmassMethod
cal_hmass(Solution, T, p, X)

calculates the partial mass based enthalpy (h) for each species

source
Arrhenius.cal_sMethod
cal_s(Solution, T, p, X)

calculates the molar entropy (s) for each species

source
Arrhenius.cal_s0Method
cal_s0(Solution, T, p, X)

calculates the molar reference entropy (s0) for each species

source
Arrhenius.cal_s0_RMethod
cal_s0_R(gas, T, p, X)

calculates the dimensionless mole based reference state entropy (s0) for each species

source
Arrhenius.cal_s0_meanMethod
cal_s0_mean(Solution, T, p, X)

calculates the mean mole based reference entropy (s0) of the mixture

source
Arrhenius.cal_s0massMethod
cal_s0mass(Solution, T, p, X)

calculates the partial mass based reference entropy (s0) for each species

source
Arrhenius.cal_s_RMethod
cal_s_R(gas, T, p, X)

calculates the dimensionless mole based entropy (s) for each species

source
Arrhenius.cal_smassMethod
cal_smass(Solution, T, p, X)

calculates the partial mass based entropy (s) for each species

source
Arrhenius.cal_uMethod
cal_u(Solution, T, p, X)

calculates the molar internal energy for each species

source
Arrhenius.cal_u_RTMethod
cal_u_RT(gas, T, p, X)

calculates the dimensionless mole based internal energy (u) for each species

source
Arrhenius.cal_umassMethod
cal_umass(Solution, T, p, X)

calculates the partial mass based internal energy for each species

source
Arrhenius.IdealGasThermoType

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

source