API
Docstrings for Arrhenius.jl interface members can be accessed through Julia's built-in documentation system or in the list below.
Arrhenius.C2X
— Functionget mole fraction (X) from concentration (C)
Arrhenius.CreateSolution
— FunctionCreateSolution(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
Arrhenius.H_mass_func
— Functionget enthaphy (H) per mass
Arrhenius.R
— Constantconst R = 8314.46261815324 #J/(kmol*K)
Gas constant
Arrhenius.S_mass_func
— Functionget entropy (S) per unit mass
Arrhenius.U_mass_func
— Functionget enthaphy (U) per mass
Arrhenius.X2C
— Functionget concentration (C) from mole fraction (X)
Arrhenius.X2Y
— Functionget mass fraction (Y) from mole fraction (X)
Arrhenius.Y2C
— Functionget concentration (C) from mass fraction (Y)
Arrhenius.Y2X
— Functionget mole fraction (X) from mass fraction (Y)
Arrhenius.get_H
— Functionget enthaphy (H) per mole
Arrhenius.get_S
— Functionget entropy (S)
Arrhenius.get_U
— Functionget enthaphy (U) per mole
Arrhenius.get_cp
— Functionget specific of heat capacity
Arrhenius.get_cv
— Functionget specific of heat capacity
Arrhenius.mix_trans
— Functionmix_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
Arrhenius.one_atm
— Constantconst one_atm = 101325.0 #pascal
One atm
Arrhenius.set_states
— Function"mainly for testing code, will be removed in the future" "please customize such functions following this example"
Arrhenius.species_index
— FunctionGet species index of a species
Example
species_index(gas, "O2")
Arrhenius.wdot_func
— Functioncompute reaction source term dC/dt
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.H_mass_func
— Methodget enthaphy (H) per mass
Arrhenius.S_mass_func
— Methodget entropy (S) per unit mass
Arrhenius.U_mass_func
— Methodget enthaphy (U) per mass
Arrhenius.cal_a
— Methodcal_a(Solution, T, p, X)
calculates the molar helmholz free energy (a) for each species
Arrhenius.cal_a_RT
— Methodcal_a_RT(gas, T, p, X)
calculates the dimensionless mole based helmholz free energy (a) for each species
Arrhenius.cal_a_mean
— Methodcal_a_mean(Solution, T, p, X)
calculates the mean mole based helmholz free energy (a) of the mixture
Arrhenius.cal_amass
— Methodcal_amass(Solution, T, p, X)
calculates the partial mass based helmholz free energy (a) for each species
Arrhenius.cal_amass_mean
— Methodcal_amass_mean(Solution, T, p, X)
calculates the mean mass based helmholz free energy (a) of the mixture
Arrhenius.cal_cp
— Methodcal_cp(Solution, T, p, X)
calculates the molar Heat capacity at constant pressure (cp) for each species
Arrhenius.cal_cp_R
— Methodcal_cp_R(gas, T, p, X)
calculates the dimensionless mole based heat capacity at constant pressure (cp) for each species
Arrhenius.cal_cp_mean
— Methodcal_cp_mean(Solution, T, p, X)
calculates the mean mole based Heat capacity at constant pressure (cp) of the mixture
Arrhenius.cal_cpmass
— Methodcal_cpmass(Solution, T, p, X)
calculates the partial mass based Heat capacity at constant pressure (cp) for each species
Arrhenius.cal_cpmass_mean
— Methodcal_cpmass_mean(Solution, T, p, X)
calculates the mean mass based Heat capacity at constant pressure (cp) of the mixture
Arrhenius.cal_cv
— Methodcal_cv(Solution, T, p, X)
calculates the molar Heat capacity at constant volume (cv) for each species
Arrhenius.cal_cv_R
— Methodcal_cv_R(gas, T, p, X)
calculates the dimensionless mole based heat capacity at constant volume (cv) for each species
Arrhenius.cal_cv_mean
— Methodcal_cv_mean(Solution, T, p, X)
calculates the mean mole based Heat capacity at constant volume (cv) of the mixture
Arrhenius.cal_cvmass
— Methodcal_cvmass(Solution, T, p, X)
calculates the partial mass based Heat capacity at constant volume (cv) for each species
Arrhenius.cal_cvmass_mean
— Methodcal_cvmass_mean(Solution, T, p, X)
calculates the mean mass based Heat capacity at constant volume (cv) of the mixture
Arrhenius.cal_g
— Methodcal_g(Solution, T, p, X)
calculates the molar gibbs free energy (g) for each species
Arrhenius.cal_g_RT
— Methodcal_g_RT(gas, T, p, X)
calculates the dimensionless mole based free gibbs energy (g) for each species
Arrhenius.cal_g_mean
— Methodcal_g_mean(Solution, T, p, X)
calculates the mean mole based gibbs free energy (g) of the mixture
Arrhenius.cal_gmass
— Methodcal_gmass(Solution, T, p, X)
calculates the partial mass based gibbs free energy (g) for each species
Arrhenius.cal_gmass_mean
— Methodcal_gmass_mean(Solution, T, p, X)
calculates the mean mass based gibbs free energy (g) of the mixture
Arrhenius.cal_h
— Methodcal_h(Solution, T, p, X)
calculates the molar enthalpy (h) for each species
Arrhenius.cal_h_RT
— Methodcal_h_RT(gas, T, p, X)
calculates the dimensionless mole based enthalpy (h) for each species
Arrhenius.cal_h_mean
— Methodcal_h_mean(Solution, T, p, X)
calculates the mean mole based enthalpy (h) of the mixture
Arrhenius.cal_hmass
— Methodcal_hmass(Solution, T, p, X)
calculates the partial mass based enthalpy (h) for each species
Arrhenius.cal_hmass_mean
— Methodcal_hmass_mean(Solution, T, p, X)
calculates the mean mass based enthalpy (h) of the mixture
Arrhenius.cal_s
— Methodcal_s(Solution, T, p, X)
calculates the molar entropy (s) for each species
Arrhenius.cal_s0
— Methodcal_s0(Solution, T, p, X)
calculates the molar reference entropy (s0) for each species
Arrhenius.cal_s0_R
— Methodcal_s0_R(gas, T, p, X)
calculates the dimensionless mole based reference state entropy (s0) for each species
Arrhenius.cal_s0_mean
— Methodcal_s0_mean(Solution, T, p, X)
calculates the mean mole based reference entropy (s0) of the mixture
Arrhenius.cal_s0mass
— Methodcal_s0mass(Solution, T, p, X)
calculates the partial mass based reference entropy (s0) for each species
Arrhenius.cal_s0mass_mean
— Methodcal_s0mass_mean(Solution, T, p, X)
calculates the mean mass based reference entropy (s0) of the mixture
Arrhenius.cal_s_R
— Methodcal_s_R(gas, T, p, X)
calculates the dimensionless mole based entropy (s) for each species
Arrhenius.cal_s_mean
— Methodcal_s_mean(Solution, T, p, X)
calculates the mean mole based entropy (s) of the mixture
Arrhenius.cal_smass
— Methodcal_smass(Solution, T, p, X)
calculates the partial mass based entropy (s) for each species
Arrhenius.cal_smass_mean
— Methodcal_smass_mean(Solution, T, p, X)
calculates the mean mass based entropy (s) of the mixture
Arrhenius.cal_u
— Methodcal_u(Solution, T, p, X)
calculates the molar internal energy for each species
Arrhenius.cal_u_RT
— Methodcal_u_RT(gas, T, p, X)
calculates the dimensionless mole based internal energy (u) for each species
Arrhenius.cal_u_mean
— Methodcal_u_mean(Solution, T, p, X)
calculates the mean mole based internal energy of the mixture
Arrhenius.cal_umass
— Methodcal_umass(Solution, T, p, X)
calculates the partial mass based internal energy for each species
Arrhenius.cal_umass_mean
— Methodcal_umass_mean(Solution, T, p, X)
calculates the mean mass based internal energy of the mixture
Arrhenius.get_H
— Methodget enthaphy (H) per mole
Arrhenius.get_S
— Methodget entropy (S)
Arrhenius.get_U
— Methodget enthaphy (U) per mole
Arrhenius.get_cp
— Methodget specific of heat capacity
Arrhenius.get_cv
— Methodget specific of heat capacity
Arrhenius.IdealGasThermo
— TypeStruct 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
Arrhenius.IdealGasThermo
— MethodConstructor for the idealGasThermo:
yaml:: Dict of the input yaml file