Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
chemistry Namespace Reference

Classes

struct  Arrhenius
 Modified Arrhenius rate k = A T^b exp(-Ea / (R T)), SI units with kmol. More...
 
struct  ConstantVolumeReactor
 Adiabatic, constant-volume reactor at density rho with state y = (Y_1 .. Y_Ns, T): dY_k/dt = W_k omega_k / rho, dT/dt = -sum_k u_k omega_k / (rho cv), with u_k the molar internal energies. The ODE system of integrate(). More...
 
struct  DenseLU
 Dense linear solver of integrate(): A = diagonal I - J factored by lu_factor in n * n doubles (LU, like J in the lanes' layout) and n integers (pivot). More...
 
struct  Dimension
 Exponents of a quantity's dimension in the basis in which a YAML file sets its default units: mass, length, time, temperature, quantity, energy, pressure (e.g. a molar enthalpy is energy^1 quantity^-1). More...
 
struct  IgnitionObserver
 Ignition delay as the time of the maximum of dT/dt: the vertex of the parabola through the largest sample and its two neighbors. The reactor has ignited once dT/dt has since fallen below half that maximum: the thermal runaway is over, however small the temperature rise (very lean mixtures). More...
 
struct  KineticsTable
 Reactions of a mechanism as flat device tables (compressed rows per reaction), in MemorySpace. All quantities SI with kmol, in double precision in every build. Concentrations C_k = rho Y_k / W_k. More...
 
struct  MassFractions
 Mass fractions held in a contiguous array. More...
 
struct  Mechanism
 One ideal-gas phase of a Cantera YAML file: its elements, species and reactions. More...
 
struct  NoObserver
 An observer that ignores the trajectory. More...
 
struct  OpticallyThinRadiation
 Optically thin radiative loss q = 4 sigma sum_i p_i a_i(T) (T^4 - T_amb^4), p_i the partial pressures [atm] of the radiating species present. More...
 
struct  Reaction
 A gas-phase reaction: elementary, three-body or falloff (Lindemann, Troe, SRI), reversible (reverse rate from the equilibrium constant) or not, with optional non-integer orders. More...
 
struct  ReactionDerivatives
 Per-reaction derivatives of the rates of progress, in one block of KineticsTable::derivatives_size() doubles: d q / dT at fixed concentrations; d q / d C of each forward (reactant) and reverse (product) mass-action term; d q / d[M] of third-body and falloff reactions; and the d q / d C_j shared by every species through the pressure of PLOG and Chebyshev reactions. More...
 
struct  ReactorOptions
 
struct  Rodas
 Coefficients of RODAS (Hairer & Wanner, Solving ODEs II, IV.7; rodas.f), a stiffly accurate, L-stable Rosenbrock method of order 4 with an embedded order-3 solution, in the form with A = I / (gamma h) - J. More...
 
struct  RosenbrockOptions
 
struct  RosenbrockResult
 
struct  SerialLanes
 One thread does all the work of a cell. More...
 
struct  SparseLU
 The linear solver of integrate() for SparseLUPattern: factor() gathers diagonal I - J_s from the compact Jacobian and factors it, then z = A_s^-1 u and beta = 1 - v . z; solve() is A_s^-1 b plus the Sherman-Morrison correction z (v . A_s^-1 b) / beta. More...
 
struct  SparseLUPattern
 The pattern of a reactor Jacobian in (Y_1 .. Y_Ns, T) without its rank-one part, an elimination order, the fill of its LU factors and the operations of a factorization without pivoting, on the device. More...
 
struct  Species
 
struct  SpeciesThermo
 Species thermodynamics as piecewise polynomials in NASA-9 form, one per temperature range: cp/R = a0/T^2 + a1/T + a2 + a3 T + a4 T^2 + a5 T^3 + a6 T^4, h/(RT) = -a0/T^2 + a1 ln(T)/T + a2 + a3 T/2 + a4 T^2/3 + a5 T^3/4 + a6 T^4/5 + a7/T, s/R = -a0/(2 T^2) - a1/T + a2 ln(T) + a3 T + a4 T^2/2 + a5 T^3/3 + a6 T^4/4 + a8. More...
 
struct  SpeciesTransport
 Gas transport data of a species (Cantera's "gas" transport model), in SI units. More...
 
struct  TeamLanes
 All threads and vector lanes of a team (TeamPolicy(cells, T, V), T * V lanes) share the work of a cell. Scalar code runs on every lane with the same values; sums accumulate SUM_SHARES strided shares in index order and then the shares in order, so a team's results do not depend on its width. Needs scratch_bytes(T * V) of level-0 team scratch. More...
 
struct  ThermalDiffusionFits
 Pair data of Cantera's mixture-averaged thermal diffusion: its fit of the reduced collision integral C* as a polynomial of degree 8 in ln T* (Monchick & Mason's table, with the fits in the reduced dipole moment), and the pair's well depth epsilon_kj [J], per pair (k, j >= k), k-major. More...
 
struct  ThermoTable
 Species thermodynamics of a mechanism on the device, in double precision in every build: per species its NASA-9 form ranges (SpeciesThermo), and the ideal-gas mixture properties per unit mass. More...
 
struct  TransportFits
 Pure-species transport fits of a mechanism, as Cantera computes them for its mixture-averaged model: polynomials of degree 4 in ln T of sqrt(mu_k / sqrt(T)) (viscosity), lambda_k / sqrt(T) (conductivity) and p D_kj / T^1.5 (binary diffusion coefficients), fitted over the mechanism's common thermo temperature range from Lennard-Jones collision integrals (Monchick & Mason) with Cantera's polar corrections and Parker's rotational relaxation. More...
 
struct  TransportTable
 Transport properties of a mechanism's mixtures on the device, in double precision in every build: Wilke's viscosity, the conductivity of Mathur, Tondon & Saxena, and the species diffusion coefficients D_k of the model (Cantera's "mixture-averaged" and "unity-Lewis-number" models, and constant Lewis numbers), to be used with mole-fraction gradients and a correction velocity; with the mixture-averaged model optionally also Cantera's thermal diffusion coefficients (Soret effect). More...
 
class  UnitSystem
 Default units of a YAML file (its units: map; Cantera's defaults otherwise) and conversion of values to Mallard's units: SI with quantities in kmol, as Cantera uses internally. More...
 

Enumerations

enum class  ThermoModel { NASA7 , NASA9 , CONSTANT_CP }
 
enum class  MoleculeGeometry { ATOM , LINEAR , NONLINEAR }
 
enum class  ReactionType {
  ELEMENTARY , THREE_BODY , FALLOFF , PLOG ,
  CHEBYSHEV
}
 
enum class  FalloffType { LINDEMANN , TROE , SRI }
 
enum class  RadiatingSpecies { H2O = 0 , CO2 = 1 , CO = 2 , CH4 = 3 }
 
enum class  RosenbrockStatus : uint8_t { SUCCESS = 0 , TOO_MANY_STEPS = 1 , STEP_SIZE_UNDERFLOW = 2 }
 
enum class  TransportModel { MIXTURE_AVERAGED , UNITY_LEWIS , CONSTANT_LEWIS }
 

Functions

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
KineticsTable< MemorySpace > make_kinetics_table (const Mechanism &mechanism, const double C_reg=KineticsTable< MemorySpace >::C_REG)
 Copy a mechanism's reactions to MemorySpace.
 
template<bool ColumnMajor>
KOKKOS_INLINE_FUNCTION constexpr uint32_t dense_index (const uint32_t n, const uint32_t r, const uint32_t c)
 Index of entry (r, c) of an n x n matrix stored by rows, or by columns.
 
double atomic_weight (const std::string &symbol)
 Atomic weight in kg/kmol of an element symbol (Cantera's table; case-insensitive), or a negative value if unknown.
 
Mechanism read_mechanism (const std::string &file, const std::string &phase="")
 Read a phase of a Cantera YAML file.
 
KOKKOS_INLINE_FUNCTION double planck_mean_absorption (const RadiatingSpecies s, const double T)
 Planck-mean absorption coefficient, 1 / (m atm), of species s at T (fits valid over 300-2500 K).
 
bool use_sparse_lu (const ReactorOptions &options, const Mechanism &mechanism)
 Whether a mechanism's reactors use the sparse LU: as options.sparse says, or automatically from 30 species when the factors of the static pattern fill at most 60% of the dense matrix (GRI-3.0 53%: sparse; on an A100 the sparse LU is about 3x faster at 100 species).
 
template<typename MemorySpace >
KOKKOS_INLINE_FUNCTION uint32_t reactor_fast_size (const KineticsTable< MemorySpace > &kinetics, const SparseLUPattern< MemorySpace > *sparse=nullptr)
 Doubles of the part of advance_reactor()'s work memory that can be in fast (team scratch) memory: the state, the factors and the integrator's vectors, the most used in the factorization and solves.
 
template<typename MemorySpace >
KOKKOS_INLINE_FUNCTION uint32_t reactor_work_size (const KineticsTable< MemorySpace > &kinetics, const SparseLUPattern< MemorySpace > *sparse=nullptr)
 Doubles of work memory advance_reactor() needs, the linear solver's included: dense, or sparse with a SparseLUPattern.
 
template<bool Sparse = false, typename Lanes , typename MemorySpace , typename Observer = NoObserver>
KOKKOS_INLINE_FUNCTION RosenbrockResult advance_reactor (const Lanes &lanes, const ThermoTable< MemorySpace > &thermo, const KineticsTable< MemorySpace > &kinetics, const double rho, const double dt, double *Y, double &T, double &h, const ReactorOptions &options, double *work, uint32_t *pivot, Observer &&observer=Observer(), const SparseLUPattern< MemorySpace > *sparse=nullptr, double *fast=nullptr, const double *forcing=nullptr)
 Advance one adiabatic constant-volume reactor over dt: integrate (Y, T), then clip negative mass fractions, renormalize, and take T from the initial internal energy (so energy is exact). Negative initial mass fractions are clipped the same way before integrating.
 
template<typename MemorySpace , typename Observer = NoObserver>
KOKKOS_INLINE_FUNCTION RosenbrockResult advance_reactor (const ThermoTable< MemorySpace > &thermo, const KineticsTable< MemorySpace > &kinetics, const double rho, const double dt, double *Y, double &T, double &h, const ReactorOptions &options, double *work, uint32_t *pivot, Observer &&observer=Observer(), const SparseLUPattern< MemorySpace > *sparse=nullptr)
 advance_reactor() by one thread.
 
template<typename Lanes >
KOKKOS_INLINE_FUNCTION bool lu_factor (const Lanes &lanes, const uint32_t n, double *A, uint32_t *pivot)
 Dense LU factorization with partial pivoting of the n x n matrix A (by rows, or by columns for lanes with Lanes::column_major), in place; pivot[i] is the row swapped with row i. Rows below the pivot are eliminated one per lane, each in the same order as by one thread, so the factors do not depend on the lane count.
 
KOKKOS_INLINE_FUNCTION bool lu_factor (const uint32_t n, double *A, uint32_t *pivot)
 
template<typename Lanes >
KOKKOS_INLINE_FUNCTION void lu_solve (const Lanes &lanes, const uint32_t n, const double *LU, const uint32_t *pivot, double *b)
 Solve A x = b in place with the factors of lu_factor, by columns: each column's updates go one row per lane.
 
KOKKOS_INLINE_FUNCTION void lu_solve (const uint32_t n, const double *LU, const uint32_t *pivot, double *b)
 
KOKKOS_INLINE_FUNCTION constexpr uint32_t rosenbrock_vectors_size (const uint32_t n)
 Doubles of the vectors integrate() needs for a system of size n (besides the dense J).
 
template<typename Lanes , typename System , typename Solver >
KOKKOS_INLINE_FUNCTION void rodas_step (const Lanes &lanes, const System &system, const Solver &solver, const uint32_t n, const double h, const double *y0, const double *f0, double *const k[6], double *y, double *f_tmp)
 One RODAS step of size h from y0 with f0 = f(y0), given the factored I / (gamma h) - J.
 
template<typename Lanes , typename System , typename Solver , typename Observer = NoObserver>
KOKKOS_INLINE_FUNCTION RosenbrockResult integrate (const Lanes &lanes, const System &system, const Solver &solver, const double t_start, const double t_end, double *y, double &h, const RosenbrockOptions &options, double *J, double *vectors, Observer &&observer=Observer())
 Integrate dy/dt = f(y) from t_start to t_end with adaptive RODAS steps and error control sqrt(mean((err_i / (atol_i + rtol max(|y0_i|, |y1_i|)))^2)) <= 1.
 
template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
SparseLUPattern< MemorySpace > make_sparse_lu_pattern (const Mechanism &mechanism)
 Build the pattern for a mechanism's reactor Jacobian (see SparseLUPattern).
 
template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
ThermoTable< MemorySpace > make_thermo_table (const Mechanism &mechanism)
 Copy a mechanism's species thermodynamics to MemorySpace.
 
TransportFits fit_transport (const Mechanism &mechanism)
 Fit the transport properties of every species of a mechanism.
 
ThermalDiffusionFits fit_thermal_diffusion (const Mechanism &mechanism)
 Fit the thermal diffusion data of a mechanism.
 
template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
TransportTable< MemorySpace > make_transport_table (const Mechanism &mechanism, const TransportModel model, const std::vector< double > &lewis={}, const bool thermal_diffusion=false)
 The transport table of a mechanism for a model.
 

Variables

constexpr double AVOGADRO = 6.02214076e26
 
constexpr double BOLTZMANN = 1.380649e-23
 
constexpr double GAS_CONSTANT = AVOGADRO * BOLTZMANN
 
constexpr double ELEMENTARY_CHARGE = 1.602176634e-19
 
constexpr double ONE_ATM = 101325.0
 
constexpr double LIGHT_SPEED = 299792458.0
 
constexpr double EPSILON_0 = 8.854187812773345e-12
 
constexpr int N_RADIATING_SPECIES = 4
 
constexpr double STEFAN_BOLTZMANN = 5.670374419e-8
 

Enumeration Type Documentation

◆ FalloffType

Enumerator
LINDEMANN 
TROE 
SRI 

◆ MoleculeGeometry

Enumerator
ATOM 
LINEAR 
NONLINEAR 

◆ RadiatingSpecies

Enumerator
H2O 
CO2 
CO 
CH4 

◆ ReactionType

Enumerator
ELEMENTARY 
THREE_BODY 
FALLOFF 
PLOG 
CHEBYSHEV 

◆ RosenbrockStatus

Enumerator
SUCCESS 
TOO_MANY_STEPS 
STEP_SIZE_UNDERFLOW 

◆ ThermoModel

Enumerator
NASA7 
NASA9 
CONSTANT_CP 

◆ TransportModel

Enumerator
MIXTURE_AVERAGED 
UNITY_LEWIS 
CONSTANT_LEWIS 

Function Documentation

◆ advance_reactor() [1/2]

template<bool Sparse = false, typename Lanes , typename MemorySpace , typename Observer = NoObserver>
KOKKOS_INLINE_FUNCTION RosenbrockResult chemistry::advance_reactor ( const Lanes &  lanes,
const ThermoTable< MemorySpace > &  thermo,
const KineticsTable< MemorySpace > &  kinetics,
const double  rho,
const double  dt,
double *  Y,
double &  T,
double &  h,
const ReactorOptions &  options,
double *  work,
uint32_t *  pivot,
Observer &&  observer = Observer(),
const SparseLUPattern< MemorySpace > *  sparse = nullptr,
double *  fast = nullptr,
const double *  forcing = nullptr 
)

Advance one adiabatic constant-volume reactor over dt: integrate (Y, T), then clip negative mass fractions, renormalize, and take T from the initial internal energy (so energy is exact). Negative initial mass fractions are clipped the same way before integrating.

Parameters
YMass fractions (n_species), T temperature: updated in place.
hSub-step size: first guess in, proposal for the next call out.
workreactor_work_size(kinetics, sparse) doubles (with fast, only the Jacobian and the reactor's scratch are used).
pivotn_species + 1 integers (dense LU).
sparseThe pattern of the sparse LU (Sparse = true; else unused).
fastNull, or reactor_fast_size(kinetics, sparse) doubles of faster memory for the rest of the work memory.
forcingNull, or the constant sources g_1 .. g_Ns, g_e per unit initial density (see ConstantVolumeReactor): Y then holds the mass fractions at the end, at density rho (1 + dt sum_k g_k), and T follows from the internal energy e + dt g_e per unit initial mass.

◆ advance_reactor() [2/2]

template<typename MemorySpace , typename Observer = NoObserver>
KOKKOS_INLINE_FUNCTION RosenbrockResult chemistry::advance_reactor ( const ThermoTable< MemorySpace > &  thermo,
const KineticsTable< MemorySpace > &  kinetics,
const double  rho,
const double  dt,
double *  Y,
double &  T,
double &  h,
const ReactorOptions &  options,
double *  work,
uint32_t *  pivot,
Observer &&  observer = Observer(),
const SparseLUPattern< MemorySpace > *  sparse = nullptr 
)

advance_reactor() by one thread.

◆ atomic_weight()

double chemistry::atomic_weight ( const std::string &  symbol)

Atomic weight in kg/kmol of an element symbol (Cantera's table; case-insensitive), or a negative value if unknown.

◆ dense_index()

template<bool ColumnMajor>
KOKKOS_INLINE_FUNCTION constexpr uint32_t chemistry::dense_index ( const uint32_t  n,
const uint32_t  r,
const uint32_t  c 
)
constexpr

Index of entry (r, c) of an n x n matrix stored by rows, or by columns.

◆ fit_thermal_diffusion()

ThermalDiffusionFits chemistry::fit_thermal_diffusion ( const Mechanism &  mechanism)

Fit the thermal diffusion data of a mechanism.

Exceptions
std::runtime_errornaming a species without gas transport data.

◆ fit_transport()

TransportFits chemistry::fit_transport ( const Mechanism &  mechanism)

Fit the transport properties of every species of a mechanism.

Exceptions
std::runtime_errornaming a species without gas transport data.

◆ integrate()

template<typename Lanes , typename System , typename Solver , typename Observer = NoObserver>
KOKKOS_INLINE_FUNCTION RosenbrockResult chemistry::integrate ( const Lanes &  lanes,
const System &  system,
const Solver &  solver,
const double  t_start,
const double  t_end,
double *  y,
double &  h,
const RosenbrockOptions &  options,
double *  J,
double *  vectors,
Observer &&  observer = Observer() 
)

Integrate dy/dt = f(y) from t_start to t_end with adaptive RODAS steps and error control sqrt(mean((err_i / (atol_i + rtol max(|y0_i|, |y1_i|)))^2)) <= 1.

The System provides size(), rhs(lanes, y, f), rhs_jacobian(lanes, y, f, J) (dense J in the lanes' layout, see dense_index), atol(i) and admissible(lanes, y); steps to inadmissible states (e.g. negative mass fractions) are rejected. The Solver factors diagonal I - J (factor) and solves with it (solve), e.g. DenseLU.

Parameters
yState, advanced in place.
hFirst sub-step size if positive; on return the proposed next one.
Jn * n doubles for the Jacobian (kept over rejected sub-steps).
vectorsrosenbrock_vectors_size(n) doubles.
observerCalled as observer(t, y, f) at every accepted state from which a step starts (t_start included, t_end excluded).

◆ lu_factor() [1/2]

template<typename Lanes >
KOKKOS_INLINE_FUNCTION bool chemistry::lu_factor ( const Lanes &  lanes,
const uint32_t  n,
double *  A,
uint32_t *  pivot 
)

Dense LU factorization with partial pivoting of the n x n matrix A (by rows, or by columns for lanes with Lanes::column_major), in place; pivot[i] is the row swapped with row i. Rows below the pivot are eliminated one per lane, each in the same order as by one thread, so the factors do not depend on the lane count.

Returns
False if A is singular.

◆ lu_factor() [2/2]

KOKKOS_INLINE_FUNCTION bool chemistry::lu_factor ( const uint32_t  n,
double *  A,
uint32_t *  pivot 
)

◆ lu_solve() [1/2]

template<typename Lanes >
KOKKOS_INLINE_FUNCTION void chemistry::lu_solve ( const Lanes &  lanes,
const uint32_t  n,
const double *  LU,
const uint32_t *  pivot,
double *  b 
)

Solve A x = b in place with the factors of lu_factor, by columns: each column's updates go one row per lane.

◆ lu_solve() [2/2]

KOKKOS_INLINE_FUNCTION void chemistry::lu_solve ( const uint32_t  n,
const double *  LU,
const uint32_t *  pivot,
double *  b 
)

◆ make_kinetics_table()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
KineticsTable< MemorySpace > chemistry::make_kinetics_table ( const Mechanism &  mechanism,
const double  C_reg = KineticsTable<MemorySpace>::C_REG 
)

Copy a mechanism's reactions to MemorySpace.

Parameters
C_regConcentration of the regularization of orders 0 < n < 1 (KineticsTable::C_REG by default).

◆ make_sparse_lu_pattern()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
SparseLUPattern< MemorySpace > chemistry::make_sparse_lu_pattern ( const Mechanism &  mechanism)

Build the pattern for a mechanism's reactor Jacobian (see SparseLUPattern).

◆ make_thermo_table()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
ThermoTable< MemorySpace > chemistry::make_thermo_table ( const Mechanism &  mechanism)

Copy a mechanism's species thermodynamics to MemorySpace.

◆ make_transport_table()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
TransportTable< MemorySpace > chemistry::make_transport_table ( const Mechanism &  mechanism,
const TransportModel  model,
const std::vector< double > &  lewis = {},
const bool  thermal_diffusion = false 
)

The transport table of a mechanism for a model.

Parameters
lewisConstant Lewis numbers per species (CONSTANT_LEWIS only); empty: 1.
thermal_diffusionAlso the data of the thermal diffusion coefficients (MIXTURE_AVERAGED only).

◆ planck_mean_absorption()

KOKKOS_INLINE_FUNCTION double chemistry::planck_mean_absorption ( const RadiatingSpecies  s,
const double  T 
)

Planck-mean absorption coefficient, 1 / (m atm), of species s at T (fits valid over 300-2500 K).

◆ reactor_fast_size()

template<typename MemorySpace >
KOKKOS_INLINE_FUNCTION uint32_t chemistry::reactor_fast_size ( const KineticsTable< MemorySpace > &  kinetics,
const SparseLUPattern< MemorySpace > *  sparse = nullptr 
)

Doubles of the part of advance_reactor()'s work memory that can be in fast (team scratch) memory: the state, the factors and the integrator's vectors, the most used in the factorization and solves.

◆ reactor_work_size()

template<typename MemorySpace >
KOKKOS_INLINE_FUNCTION uint32_t chemistry::reactor_work_size ( const KineticsTable< MemorySpace > &  kinetics,
const SparseLUPattern< MemorySpace > *  sparse = nullptr 
)

Doubles of work memory advance_reactor() needs, the linear solver's included: dense, or sparse with a SparseLUPattern.

◆ read_mechanism()

Mechanism chemistry::read_mechanism ( const std::string &  file,
const std::string &  phase = "" 
)

Read a phase of a Cantera YAML file.

Parameters
filePath of the YAML file.
phaseName of the phase; empty for the first one.
Exceptions
std::runtime_errornaming the offending entry for unsupported or malformed input.

◆ rodas_step()

template<typename Lanes , typename System , typename Solver >
KOKKOS_INLINE_FUNCTION void chemistry::rodas_step ( const Lanes &  lanes,
const System &  system,
const Solver &  solver,
const uint32_t  n,
const double  h,
const double *  y0,
const double *  f0,
double *const  k[6],
double *  y,
double *  f_tmp 
)

One RODAS step of size h from y0 with f0 = f(y0), given the factored I / (gamma h) - J.

Parameters
kSix stage vectors (k[5] receives the error estimate).
yResult; f_tmp is scratch.

◆ rosenbrock_vectors_size()

KOKKOS_INLINE_FUNCTION constexpr uint32_t chemistry::rosenbrock_vectors_size ( const uint32_t  n)
constexpr

Doubles of the vectors integrate() needs for a system of size n (besides the dense J).

◆ use_sparse_lu()

bool chemistry::use_sparse_lu ( const ReactorOptions &  options,
const Mechanism &  mechanism 
)
inline

Whether a mechanism's reactors use the sparse LU: as options.sparse says, or automatically from 30 species when the factors of the static pattern fill at most 60% of the dense matrix (GRI-3.0 53%: sparse; on an A100 the sparse LU is about 3x faster at 100 species).

Variable Documentation

◆ AVOGADRO

constexpr double chemistry::AVOGADRO = 6.02214076e26
constexpr

◆ BOLTZMANN

constexpr double chemistry::BOLTZMANN = 1.380649e-23
constexpr

◆ ELEMENTARY_CHARGE

constexpr double chemistry::ELEMENTARY_CHARGE = 1.602176634e-19
constexpr

◆ EPSILON_0

constexpr double chemistry::EPSILON_0 = 8.854187812773345e-12
constexpr

◆ GAS_CONSTANT

constexpr double chemistry::GAS_CONSTANT = AVOGADRO * BOLTZMANN
constexpr

◆ LIGHT_SPEED

constexpr double chemistry::LIGHT_SPEED = 299792458.0
constexpr

◆ N_RADIATING_SPECIES

constexpr int chemistry::N_RADIATING_SPECIES = 4
constexpr

◆ ONE_ATM

constexpr double chemistry::ONE_ATM = 101325.0
constexpr

◆ STEFAN_BOLTZMANN

constexpr double chemistry::STEFAN_BOLTZMANN = 5.670374419e-8
constexpr