Reaction.h Source File#
Reaction.h
Go to the documentation of this file.
Header for unit conversion utilities, which are used to translate user input from input files (See In...
Base class defining common data possessed by both AnyMap and AnyValue objects.
Definition AnyMap.h:34
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
A wrapper for a variable whose type is determined at runtime.
Definition AnyMap.h:86
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
Definition Reaction.h:25
void setParameters(const AnyMap &node, const Kinetics &kin)
Set up reaction based on AnyMap node
Definition Reaction.cpp:229
UnitStack calculateRateCoeffUnits(const Kinetics &kin)
Calculate the units of the rate constant.
Definition Reaction.cpp:523
bool m_from_composition
Flag indicating that object was instantiated from reactant/product compositions.
Definition Reaction.h:178
void checkBalance(const Kinetics &kin) const
Check that the specified reaction is balanced (same number of atoms for each element in the reactants...
Definition Reaction.cpp:576
bool checkSpecies(const Kinetics &kin) const
Verify that all species involved in the reaction are defined in the Kinetics object.
Definition Reaction.cpp:643
shared_ptr< ThirdBody > m_third_body
Relative efficiencies of third-body species in enhancing the reaction rate (if applicable)
Definition Reaction.h:185
AnyMap parameters(bool withInput=true) const
Return the parameters such that an identical Reaction could be reconstructed using the newReaction() ...
Definition Reaction.cpp:159
bool usesThirdBody() const
Check whether reaction involves third body collider.
Definition Reaction.h:161
string reactantString() const
The reactant side of the chemical equation for this reaction.
Definition Reaction.cpp:309
string productString() const
The product side of the chemical equation for this reaction.
Definition Reaction.cpp:327
void check()
Ensure that the rate constant and other parameters for this reaction are valid.
Definition Reaction.cpp:123
bool reversible
True if the current reaction is reversible. False otherwise.
Definition Reaction.h:126
bool allow_nonreactant_orders
True if reaction orders can be specified for non-reactant species.
Definition Reaction.h:133
string type() const
The type of reaction, including reaction rate information.
Definition Reaction.cpp:504
void setEquation(const string &equation, const Kinetics *kin=0)
Set the reactants and products based on the reaction equation.
Definition Reaction.cpp:354
bool usesElectrochemistry(const Kinetics &kin) const
Check whether reaction uses electrochemistry.
Definition Reaction.cpp:687
void getParameters(AnyMap &reactionNode) const
Store the parameters of a Reaction needed to reconstruct an identical object using the newReaction(An...
Definition Reaction.cpp:181
bool allow_negative_orders
True if negative reaction orders are allowed. Default is false.
Definition Reaction.h:136
string id
An identification string for the reaction, used in some filtering operations.
Definition Reaction.h:123
void validate(Kinetics &kin)
Perform validation checks that need access to a complete Kinetics objects, for.
Definition Reaction.h:66
A class for managing third-body efficiencies, including default values.
Definition Reaction.h:192
bool explicit_3rd
Flag indicating whether third body requires explicit serialization.
Definition Reaction.h:245
void setParameters(const AnyMap &node)
Set third-body efficiencies from AnyMap node
Definition Reaction.cpp:757
double efficiency(const string &k) const
Get the third-body efficiency for species k
Definition Reaction.cpp:792
double default_efficiency
The default third body efficiency for species not listed in efficiencies.
Definition Reaction.h:238
string collider() const
Suffix representing the third body collider in reaction equation, for example + M or (+M)
Definition Reaction.cpp:797
bool mass_action
Third body is used by law of mass action (true for three-body reactions, false for falloff reactions)
Definition Reaction.h:242
void getParameters(AnyMap &node) const
Get third-body efficiencies from AnyMap node
Definition Reaction.cpp:779
void setName(const string &third_body)
Set name of the third body collider.
Definition Reaction.cpp:724
bool checkSpecies(const Reaction &rxn, const Kinetics &kin) const
Verify that all species involved in collision efficiencies are defined in the Kinetics object.
Definition Reaction.cpp:805
A representation of the units associated with a dimensional quantity.
Definition Units.h:35
void parseReactionEquation(Reaction &R, const string &equation, const AnyBase &reactionNode, const Kinetics *kin)
Parse reaction equation.
Definition Reaction.cpp:842
vector< shared_ptr< Reaction > > getReactions(const AnyValue &items, Kinetics &kinetics)
Create Reaction objects for each item (an AnyMap) in items.
Definition Reaction.cpp:912
unique_ptr< Reaction > newReaction(const string &type)
Create a new empty Reaction object.
Definition Reaction.cpp:832
Generated by