antioch-0.4.0
|
This class encapsulates all the reaction mechanisms considered in a chemical nonequilibrium simulation. More...
#include <kinetics_evaluator.h>
Public Member Functions | |
ReactionSet (const ChemicalMixture< CoeffType > &chem_mixture) | |
Constructor. More... | |
~ReactionSet () | |
unsigned int | n_species () const |
unsigned int | n_reactions () const |
void | add_reaction (Reaction< CoeffType > *reaction) |
Add a reaction to the system. More... | |
void | remove_reaction (unsigned int nr) |
remove a reaction from the system. More... | |
const Reaction< CoeffType > & | reaction (const unsigned int r) const |
Reaction< CoeffType > & | reaction (const unsigned int r) |
unsigned int | reaction_by_id (const std::string &reaction_id) const |
template<typename ParamType > | |
void | set_parameter_of_reaction (const std::string &reaction_id, const std::vector< std::string > &keywords, ParamType value) |
change a parameter of a reaction More... | |
CoeffType | get_parameter_of_reaction (const std::string &reaction_id, const std::vector< std::string > &keywords) const |
const ChemicalMixture < CoeffType > & | chemical_mixture () const |
template<typename StateType , typename VectorStateType , typename VectorReactionsType > | |
void | compute_reaction_rates (const KineticsConditions< StateType, VectorStateType > &conditions, const VectorStateType &molar_densities, const VectorStateType &h_RT_minus_s_R, VectorReactionsType &net_reaction_rates) const |
Compute the rates of progress for each reaction. More... | |
template<typename StateType , typename VectorStateType , typename VectorReactionsType , typename MatrixReactionsType > | |
void | compute_reaction_rates_and_derivs (const KineticsConditions< StateType, VectorStateType > &conditions, const VectorStateType &molar_densities, const VectorStateType &h_RT_minus_s_R, const VectorStateType &dh_RT_minus_s_R_dT, VectorReactionsType &net_reaction_rates, VectorReactionsType &dnet_rate_dT, MatrixReactionsType &dnet_rate_dX_s) const |
Compute the rates of progress and derivatives for each reaction. More... | |
template<typename StateType , typename VectorStateType > | |
void | print_chemical_scheme (std::ostream &output, const KineticsConditions< StateType, VectorStateType > &conditions, const VectorStateType &molar_densities, const VectorStateType &h_RT_minus_s_R, std::vector< VectorStateType > &lossMatrix, std::vector< VectorStateType > &prodMatrix, std::vector< VectorStateType > &netMatrix) const |
template<typename StateType , typename VectorStateType > | |
void | get_reactive_scheme (const KineticsConditions< StateType, VectorStateType > &conditions, const VectorStateType &molar_densities, const VectorStateType &h_RT_minus_s_R, VectorStateType &net_rates, VectorStateType &kfwd_const, VectorStateType &kbkwd_const, VectorStateType &kfwd, VectorStateType &kbkwd, VectorStateType &fwd_conc, VectorStateType &bkwd_conc) const |
void | print (std::ostream &os=std::cout) const |
Formatted print, by default to std::cout . More... | |
Private Member Functions | |
ReactionSet () | |
void | find_kinetics_model_parameter (const unsigned int r, const std::vector< std::string > &keywords, unsigned int &nr, std::string &unit, int &l) const |
helper function More... | |
void | find_chemical_process_parameter (ReactionType::Parameters paramChem, const std::vector< std::string > &keywords, unsigned int &species) const |
helper function More... | |
Private Attributes | |
const ChemicalMixture < CoeffType > & | _chem_mixture |
std::vector< Reaction < CoeffType > * > | _reactions |
const CoeffType | _P0_R |
Scaling for equilibrium constant. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ReactionSet< CoeffType > &rset) |
Formatted print. More... | |
This class encapsulates all the reaction mechanisms considered in a chemical nonequilibrium simulation.
Definition at line 42 of file kinetics_evaluator.h.
|
inline |
Constructor.
Definition at line 256 of file reaction_set.h.
|
inline |
Definition at line 266 of file reaction_set.h.
|
private |
|
inline |
Add a reaction to the system.
Definition at line 207 of file reaction_set.h.
Referenced by Antioch::read_reaction_set_data().
|
inline |
Definition at line 248 of file reaction_set.h.
Referenced by Antioch::read_reaction_set_data().
|
inline |
Compute the rates of progress for each reaction.
Definition at line 275 of file reaction_set.h.
References antioch_assert_equal_to, and Antioch::KineticsConditions< StateType, VectorStateType >::T().
|
inline |
Compute the rates of progress and derivatives for each reaction.
Definition at line 303 of file reaction_set.h.
References antioch_assert_equal_to, and Antioch::KineticsConditions< StateType, VectorStateType >::T().
|
inlineprivate |
helper function
Definition at line 438 of file reaction_set.h.
References antioch_assert_greater, antioch_error, and Antioch::ReactionType::EFFICIENCIES.
|
inlineprivate |
helper function
Definition at line 374 of file reaction_set.h.
References antioch_error, Antioch::ReactionType::DUPLICATE, Antioch::ReactionType::ELEMENTARY, Antioch::KineticsModel::HIGH_PRESSURE, Antioch::ReactionType::LINDEMANN_FALLOFF, Antioch::ReactionType::LINDEMANN_FALLOFF_THREE_BODY, Antioch::KineticsModel::LOW_PRESSURE, Antioch::KineticsModel::PHOTOCHEM, Antioch::string_to_kin_enum(), Antioch::ReactionType::TROE_FALLOFF, and Antioch::ReactionType::TROE_FALLOFF_THREE_BODY.
|
inline |
Definition at line 462 of file reaction_set.h.
References antioch_assert, antioch_error, std::max(), Antioch::KineticsModel::NOT_FOUND, Antioch::set_zero(), Antioch::string_to_chem_enum(), and Antioch::string_to_kin_enum().
Referenced by tester().
|
inline |
Definition at line 802 of file reaction_set.h.
References antioch_assert_equal_to, Antioch::Reaction< CoeffType, VectorCoeffType >::compute_forward_rate_coefficient(), Antioch::Reaction< CoeffType, VectorCoeffType >::equilibrium_constant(), Antioch::Reaction< CoeffType, VectorCoeffType >::n_products(), Antioch::Reaction< CoeffType, VectorCoeffType >::n_reactants(), std::pow(), Antioch::Reaction< CoeffType, VectorCoeffType >::product_id(), Antioch::Reaction< CoeffType, VectorCoeffType >::product_partial_order(), Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_id(), Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_partial_order(), Antioch::Reaction< CoeffType, VectorCoeffType >::reversible(), and Antioch::KineticsConditions< StateType, VectorStateType >::T().
Referenced by tester().
|
inline |
Definition at line 200 of file reaction_set.h.
Referenced by tester().
|
inline |
Definition at line 193 of file reaction_set.h.
Referenced by Antioch::KineticsEvaluator< CoeffType, StateType >::KineticsEvaluator().
|
inline |
Formatted print, by default to std::cout
.
Definition at line 868 of file reaction_set.h.
|
inline |
Definition at line 556 of file reaction_set.h.
References Antioch::Reaction< CoeffType, VectorCoeffType >::n_products(), Antioch::Reaction< CoeffType, VectorCoeffType >::n_reactants(), Antioch::Reaction< CoeffType, VectorCoeffType >::product_id(), Antioch::Reaction< CoeffType, VectorCoeffType >::product_stoichiometric_coefficient(), Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_id(), and Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_stoichiometric_coefficient().
Referenced by tester_N2N().
|
inline |
r
. Definition at line 232 of file reaction_set.h.
References antioch_assert_less.
Referenced by tester().
|
inline |
r
. Definition at line 240 of file reaction_set.h.
References antioch_assert_less.
|
inline |
Definition at line 347 of file reaction_set.h.
References antioch_error, and antioch_warning.
|
inline |
remove a reaction from the system.
Definition at line 219 of file reaction_set.h.
References antioch_assert_less.
|
inline |
change a parameter of a reaction
Definition at line 512 of file reaction_set.h.
References antioch_assert, antioch_error, std::max(), Antioch::KineticsModel::NOT_FOUND, Antioch::string_to_chem_enum(), and Antioch::string_to_kin_enum().
Referenced by tester().
|
friend |
Formatted print.
Definition at line 153 of file reaction_set.h.
|
private |
Definition at line 181 of file reaction_set.h.
|
private |
Scaling for equilibrium constant.
Definition at line 186 of file reaction_set.h.
|
private |
Definition at line 183 of file reaction_set.h.