Cantera 2.6.0
|
Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies. More...
#include <ThirdBodyCalc.h>
Public Member Functions | |
void | install (size_t rxnNumber, const std::map< size_t, double > &efficiencies, double default_efficiency, bool mass_action) |
Install reaction that uses third-body effects in ThirdBodyCalc3 manager. More... | |
void | resizeCoeffs (size_t nSpc, size_t nRxn) |
Resize the sparse coefficient matrix. More... | |
void | update (const vector_fp &conc, double ctot, double *concm) const |
Update third-body concentrations in full vector. More... | |
void | multiply (double *output, const double *concm) |
Multiply output with effective third-body concentration. More... | |
Eigen::SparseMatrix< double > | derivatives (const double *product) |
Calculate derivatives with respect to species concentrations. More... | |
void | scale (const double *in, double *out, double factor) const |
Scale entries involving third-body collider in law of mass action by factor. More... | |
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. More... | |
bool | empty () const |
Return boolean indicating whether ThirdBodyCalc3 is empty. More... | |
Protected Attributes | |
std::vector< size_t > | m_reaction_index |
Indices of reactions that use third-bodies within vector of concentrations. More... | |
std::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. More... | |
std::vector< size_t > | m_no_mass_action_index |
Indices within m_reaction_index of reactions that consider third-body effects in the rate expression. More... | |
std::vector< std::vector< size_t > > | m_species |
m_species[i][j] is the index of the j-th species in reaction i. More... | |
std::vector< vector_fp > | m_eff |
m_eff[i][j] is the efficiency of the j-th species in reaction i. More... | |
vector_fp | m_default |
The default efficiency for each reaction. More... | |
std::vector< Eigen::Triplet< double > > | m_efficiencyList |
Sparse efficiency matrix (compensated for defaults) Each triplet corresponds to (reaction index, species index, efficiency) More... | |
Eigen::SparseMatrix< double > | m_multipliers |
Sparse derivative multiplier matrix. More... | |
Calculate and apply third-body effects on reaction rates, including non- unity third-body efficiencies.
Definition at line 88 of file ThirdBodyCalc.h.
|
inline |
Install reaction that uses third-body effects in ThirdBodyCalc3 manager.
Definition at line 92 of file ThirdBodyCalc.h.
References AssertTrace, ThirdBodyCalc3::m_default, ThirdBodyCalc3::m_eff, ThirdBodyCalc3::m_efficiencyList, ThirdBodyCalc3::m_mass_action_index, ThirdBodyCalc3::m_no_mass_action_index, ThirdBodyCalc3::m_reaction_index, ThirdBodyCalc3::m_species, and Cantera::npos.
|
inline |
Resize the sparse coefficient matrix.
Definition at line 116 of file ThirdBodyCalc.h.
References ThirdBodyCalc3::m_default, ThirdBodyCalc3::m_efficiencyList, ThirdBodyCalc3::m_multipliers, and ThirdBodyCalc3::m_reaction_index.
|
inline |
Update third-body concentrations in full vector.
Definition at line 144 of file ThirdBodyCalc.h.
References ThirdBodyCalc3::m_default, ThirdBodyCalc3::m_eff, ThirdBodyCalc3::m_reaction_index, and ThirdBodyCalc3::m_species.
Referenced by GasKinetics::update_rates_C().
|
inline |
Multiply output with effective third-body concentration.
Definition at line 155 of file ThirdBodyCalc.h.
References ThirdBodyCalc3::m_mass_action_index, and ThirdBodyCalc3::m_reaction_index.
Referenced by GasKinetics::processThirdBodies().
|
inline |
Calculate derivatives with respect to species concentrations.
product | Product of law of mass action and rate terms. |
Definition at line 166 of file ThirdBodyCalc.h.
References ThirdBodyCalc3::m_multipliers.
Referenced by GasKinetics::process_ddX().
|
inline |
Scale entries involving third-body collider in law of mass action by factor.
Definition at line 172 of file ThirdBodyCalc.h.
References ThirdBodyCalc3::m_mass_action_index, and ThirdBodyCalc3::m_reaction_index.
Referenced by GasKinetics::process_ddC().
|
inline |
Scale entries involving third-body collider in rate expression by third-body concentration and factor.
Definition at line 181 of file ThirdBodyCalc.h.
References ThirdBodyCalc3::m_no_mass_action_index, and ThirdBodyCalc3::m_reaction_index.
Referenced by GasKinetics::process_ddC().
|
inline |
Return boolean indicating whether ThirdBodyCalc3 is empty.
Definition at line 191 of file ThirdBodyCalc.h.
References ThirdBodyCalc3::m_reaction_index.
Referenced by GasKinetics::process_ddC(), and GasKinetics::process_ddX().
|
protected |
Indices of reactions that use third-bodies within vector of concentrations.
Definition at line 197 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::empty(), ThirdBodyCalc3::install(), ThirdBodyCalc3::multiply(), ThirdBodyCalc3::resizeCoeffs(), ThirdBodyCalc3::scale(), ThirdBodyCalc3::scaleM(), and ThirdBodyCalc3::update().
|
protected |
Indices within m_reaction_index of reactions that consider third-body effects in the law of mass action.
Definition at line 201 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::install(), ThirdBodyCalc3::multiply(), and ThirdBodyCalc3::scale().
|
protected |
Indices within m_reaction_index of reactions that consider third-body effects in the rate expression.
Definition at line 205 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::install(), and ThirdBodyCalc3::scaleM().
|
protected |
m_species[i][j] is the index of the j-th species in reaction i.
Definition at line 208 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::install(), and ThirdBodyCalc3::update().
|
protected |
m_eff[i][j] is the efficiency of the j-th species in reaction i.
Definition at line 211 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::install(), and ThirdBodyCalc3::update().
|
protected |
The default efficiency for each reaction.
Definition at line 214 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::install(), ThirdBodyCalc3::resizeCoeffs(), and ThirdBodyCalc3::update().
|
protected |
Sparse efficiency matrix (compensated for defaults) Each triplet corresponds to (reaction index, species index, efficiency)
Definition at line 218 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::install(), and ThirdBodyCalc3::resizeCoeffs().
|
protected |
Sparse derivative multiplier matrix.
Definition at line 221 of file ThirdBodyCalc.h.
Referenced by ThirdBodyCalc3::derivatives(), and ThirdBodyCalc3::resizeCoeffs().