Cantera  3.1.0a1
Loading...
Searching...
No Matches
ThirdBodyCalc Class Reference

Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies. More...

#include <ThirdBodyCalc.h>

Detailed Description

Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies.

Definition at line 19 of file ThirdBodyCalc.h.

Public Member Functions

void install (size_t rxnNumber, const map< size_t, double > &efficiencies, double default_efficiency, bool mass_action)
 Install reaction that uses third-body effects in ThirdBodyCalc manager.
 
void resizeCoeffs (size_t nSpc, size_t nRxn)
 Resize the sparse coefficient matrix.
 
void update (const vector< double > &conc, double ctot, double *concm) const
 Update third-body concentrations in full vector.
 
void multiply (double *output, const double *concm)
 Multiply output with effective third-body concentration.
 
Eigen::SparseMatrix< double > derivatives (const double *product)
 Calculate derivatives with respect to species concentrations.
 
void scale (const double *in, double *out, double factor) const
 Scale entries involving third-body collider in law of mass action by factor.
 
void scaleM (const double *in, double *out, const double *concm, double factor) const
 Scale entries involving third-body collider in rate expression by third-body concentration and factor.
 
bool empty () const
 Return boolean indicating whether ThirdBodyCalc is empty.
 

Protected Attributes

vector< size_t > m_reaction_index
 Indices of reactions that use third-bodies within vector of concentrations.
 
vector< size_t > m_mass_action_index
 Indices within m_reaction_index of reactions that consider third-body effects in the law of mass action.
 
vector< size_t > m_no_mass_action_index
 Indices within m_reaction_index of reactions that consider third-body effects in the rate expression.
 
vector< vector< size_t > > m_species
 m_species[i][j] is the index of the j-th species in reaction i.
 
vector< vector< double > > m_eff
 m_eff[i][j] is the efficiency of the j-th species in reaction i.
 
vector< double > m_default
 The default efficiency for each reaction.
 
vector< Eigen::Triplet< double > > m_efficiencyList
 Sparse efficiency matrix (compensated for defaults) Each triplet corresponds to (reaction index, species index, efficiency)
 
Eigen::SparseMatrix< double > m_multipliers
 Sparse derivative multiplier matrix.
 

Member Function Documentation

◆ install()

void install ( size_t  rxnNumber,
const map< size_t, double > &  efficiencies,
double  default_efficiency,
bool  mass_action 
)
inline

Install reaction that uses third-body effects in ThirdBodyCalc manager.

Definition at line 23 of file ThirdBodyCalc.h.

◆ resizeCoeffs()

void resizeCoeffs ( size_t  nSpc,
size_t  nRxn 
)
inline

Resize the sparse coefficient matrix.

Definition at line 47 of file ThirdBodyCalc.h.

◆ update()

void update ( const vector< double > &  conc,
double  ctot,
double *  concm 
) const
inline

Update third-body concentrations in full vector.

Definition at line 75 of file ThirdBodyCalc.h.

◆ multiply()

void multiply ( double *  output,
const double *  concm 
)
inline

Multiply output with effective third-body concentration.

Definition at line 86 of file ThirdBodyCalc.h.

◆ derivatives()

Eigen::SparseMatrix< double > derivatives ( const double *  product)
inline

Calculate derivatives with respect to species concentrations.

Parameters
productProduct of law of mass action and rate terms.

Definition at line 97 of file ThirdBodyCalc.h.

◆ scale()

void scale ( const double *  in,
double *  out,
double  factor 
) const
inline

Scale entries involving third-body collider in law of mass action by factor.

Definition at line 103 of file ThirdBodyCalc.h.

◆ scaleM()

void scaleM ( const double *  in,
double *  out,
const double *  concm,
double  factor 
) const
inline

Scale entries involving third-body collider in rate expression by third-body concentration and factor.

Definition at line 112 of file ThirdBodyCalc.h.

◆ empty()

bool empty ( ) const
inline

Return boolean indicating whether ThirdBodyCalc is empty.

Definition at line 122 of file ThirdBodyCalc.h.

Member Data Documentation

◆ m_reaction_index

vector<size_t> m_reaction_index
protected

Indices of reactions that use third-bodies within vector of concentrations.

Definition at line 128 of file ThirdBodyCalc.h.

◆ m_mass_action_index

vector<size_t> m_mass_action_index
protected

Indices within m_reaction_index of reactions that consider third-body effects in the law of mass action.

Definition at line 132 of file ThirdBodyCalc.h.

◆ m_no_mass_action_index

vector<size_t> m_no_mass_action_index
protected

Indices within m_reaction_index of reactions that consider third-body effects in the rate expression.

Definition at line 136 of file ThirdBodyCalc.h.

◆ m_species

vector<vector<size_t> > m_species
protected

m_species[i][j] is the index of the j-th species in reaction i.

Definition at line 139 of file ThirdBodyCalc.h.

◆ m_eff

vector<vector<double> > m_eff
protected

m_eff[i][j] is the efficiency of the j-th species in reaction i.

Definition at line 142 of file ThirdBodyCalc.h.

◆ m_default

vector<double> m_default
protected

The default efficiency for each reaction.

Definition at line 145 of file ThirdBodyCalc.h.

◆ m_efficiencyList

vector<Eigen::Triplet<double> > m_efficiencyList
protected

Sparse efficiency matrix (compensated for defaults) Each triplet corresponds to (reaction index, species index, efficiency)

Definition at line 149 of file ThirdBodyCalc.h.

◆ m_multipliers

Eigen::SparseMatrix<double> m_multipliers
protected

Sparse derivative multiplier matrix.

Definition at line 152 of file ThirdBodyCalc.h.


The documentation for this class was generated from the following file: