Cantera 2.6.0
Public Member Functions | Protected Attributes | List of all members
TroeRate Class Referencefinal

The 3- or 4-parameter Troe falloff parameterization. More...

#include <Falloff.h>

Inheritance diagram for TroeRate:
[legend]
Collaboration diagram for TroeRate:
[legend]

Public Member Functions

 TroeRate ()
 Constructor. More...
 
 TroeRate (const AnyMap &node, const UnitStack &rate_units={})
 
 TroeRate (const ArrheniusRate &low, const ArrheniusRate &high, const vector_fp &c)
 
unique_ptr< MultiRateBasenewMultiRate () const
 Create a rate evaluator for reactions of a particular derived type. More...
 
virtual void setFalloffCoeffs (const vector_fp &c)
 Set coefficients used by parameterization. More...
 
virtual void getFalloffCoeffs (vector_fp &c) const
 Retrieve coefficients of the falloff parameterization. More...
 
virtual void updateTemp (double T, double *work) const
 Update the temperature parameters in the representation. More...
 
virtual double F (double pr, const double *work) const
 The falloff function. More...
 
virtual size_t workSize () const
 The size of the work array required. More...
 
virtual const std::string type () const
 String identifying reaction rate specialization. More...
 
virtual size_t nParameters () const
 Returns the number of parameters used by this parameterization. More...
 
virtual void setParameters (const AnyMap &node, const UnitStack &rate_units)
 Set parameters. More...
 
virtual void getParameters (double *params) const
 Sets params to contain, in order,. More...
 
virtual void getParameters (AnyMap &node) const
 Get parameters. More...
 
- Public Member Functions inherited from FalloffRate
 FalloffRate (const AnyMap &node, const UnitStack &rate_units={})
 
void init (const vector_fp &c)
 Initialize. More...
 
double evalF (double T, double conc3b)
 Evaluate falloff function at current conditions. More...
 
virtual double evalFromStruct (const FalloffData &shared_data)
 Evaluate reaction rate. More...
 
void check (const std::string &equation, const AnyMap &node)
 Check basic syntax and settings of reaction rate expression. More...
 
virtual void validate (const std::string &equation, const Kinetics &kin)
 Validate the reaction rate expression. More...
 
bool allowNegativePreExponentialFactor () const
 Get flag indicating whether negative A values are permitted. More...
 
void setAllowNegativePreExponentialFactor (bool value)
 Set flag indicating whether negative A values are permitted. More...
 
bool chemicallyActivated () const
 Get flag indicating whether reaction is chemically activated. More...
 
void setChemicallyActivated (bool activated)
 Set flag indicating whether reaction is chemically activated. More...
 
ArrheniusRatelowRate ()
 Get reaction rate in the low-pressure limit. More...
 
void setLowRate (const ArrheniusRate &low)
 Set reaction rate in the low-pressure limit. More...
 
ArrheniusRatehighRate ()
 Get reaction rate in the high-pressure limit. More...
 
void setHighRate (const ArrheniusRate &high)
 Set reaction rate in the high-pressure limit. More...
 
- Public Member Functions inherited from ReactionRate
 ReactionRate (const ReactionRate &other)
 
ReactionRateoperator= (const ReactionRate &other)
 
AnyMap parameters () const
 Return the parameters such that an identical Reaction could be reconstructed using the newReaction() function. More...
 
virtual void validate (const std::string &equation)
 Validate the reaction rate expression (legacy call) More...
 
size_t rateIndex () const
 Reaction rate index within kinetics evaluator. More...
 
void setRateIndex (size_t idx)
 Set reaction rate index within kinetics evaluator. More...
 
virtual void setContext (const Reaction &rxn, const Kinetics &kin)
 Set context of reaction rate evaluation. More...
 
double eval (double T)
 Evaluate reaction rate based on temperature. More...
 
double eval (double T, double extra)
 Evaluate reaction rate based on temperature and an extra parameter. More...
 
double eval (double T, const std::vector< double > &extra)
 Evaluate reaction rate based on temperature and an extra vector parameter. More...
 

Protected Attributes

double m_a
 parameter a in the 4-parameter Troe falloff function. Dimensionless More...
 
double m_rt3
 parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1] More...
 
double m_rt1
 parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1] More...
 
double m_t2
 parameter T_2 in the 4-parameter Troe falloff function. [K] More...
 
- Protected Attributes inherited from FalloffRate
ArrheniusRate m_lowRate
 The reaction rate in the low-pressure limit. More...
 
ArrheniusRate m_highRate
 The reaction rate in the high-pressure limit. More...
 
bool m_chemicallyActivated
 Flag labeling reaction as chemically activated. More...
 
bool m_negativeA_ok
 Flag indicating whether negative A values are permitted. More...
 
double m_rc_low
 Evaluated reaction rate in the low-pressure limit. More...
 
double m_rc_high
 Evaluated reaction rate in the high-pressure limit. More...
 
vector_fp m_work
 Work vector. More...
 
- Protected Attributes inherited from ReactionRate
AnyMap m_input
 Input data used for specific models. More...
 
size_t m_rate_index
 Index of reaction rate within kinetics evaluator. More...
 

Additional Inherited Members

Detailed Description

The 3- or 4-parameter Troe falloff parameterization.

The falloff function defines the value of \( F \) in the following rate expression

\[ k = k_{\infty} \left( \frac{P_r}{1 + P_r} \right) F \]

where

\[ P_r = \frac{k_0 [M]}{k_{\infty}} \]

This parameterization is defined by

\[ F = F_{cent}^{1/(1 + f_1^2)} \]

where

\[ F_{cent} = (1 - A)\exp(-T/T_3) + A \exp(-T/T_1) + \exp(-T_2/T) \]

\[ f_1 = (\log_{10} P_r + C) / \left(N - 0.14 (\log_{10} P_r + C)\right) \]

\[ C = -0.4 - 0.67 \log_{10} F_{cent} \]

\[ N = 0.75 - 1.27 \log_{10} F_{cent} \]

Definition at line 334 of file Falloff.h.

Constructor & Destructor Documentation

◆ TroeRate() [1/3]

TroeRate ( )
inline

Constructor.

Definition at line 338 of file Falloff.h.

References FalloffRate::m_work.

◆ TroeRate() [2/3]

TroeRate ( const AnyMap node,
const UnitStack rate_units = {} 
)
inline

Definition at line 342 of file Falloff.h.

◆ TroeRate() [3/3]

TroeRate ( const ArrheniusRate low,
const ArrheniusRate high,
const vector_fp c 
)
inline

Definition at line 348 of file Falloff.h.

Member Function Documentation

◆ newMultiRate()

unique_ptr< MultiRateBase > newMultiRate ( ) const
inlinevirtual

Create a rate evaluator for reactions of a particular derived type.

Derived classes usually implement this as:

unique_ptr<MultiRateBase> newMultiRate() const override {
return unique_ptr<MultiRateBase>(new MultiRate<RateType, DataType>);
unique_ptr< MultiRateBase > newMultiRate() const
Create a rate evaluator for reactions of a particular derived type.
Definition: Falloff.h:356

where RateType is the derived class name and DataType is the corresponding container for parameters needed to evaluate reactions of that type.

Reimplemented from ReactionRate.

Definition at line 356 of file Falloff.h.

◆ setFalloffCoeffs()

void setFalloffCoeffs ( const vector_fp c)
virtual

Set coefficients used by parameterization.

Parameters
cVector of three or four doubles: The doubles are the parameters, a, T_3, T_1, and (optionally) T_2 of the Troe parameterization

Reimplemented from FalloffRate.

Definition at line 209 of file Falloff.cpp.

References Cantera::SmallNumber, and Cantera::warn_user().

◆ getFalloffCoeffs()

void getFalloffCoeffs ( vector_fp c) const
virtual

Retrieve coefficients of the falloff parameterization.

Parameters
cVector of coefficients of the parameterization. The number and meaning of these coefficients is subclass-dependent.

Reimplemented from FalloffRate.

Definition at line 245 of file Falloff.cpp.

References Cantera::SmallNumber.

◆ updateTemp()

void updateTemp ( double  T,
double *  work 
) const
virtual

Update the temperature parameters in the representation.

Parameters
TTemperature (Kelvin)
workVector of working space, length 1, representing the temperature-dependent part of the parameterization.

Reimplemented from FalloffRate.

Definition at line 254 of file Falloff.cpp.

◆ F()

double F ( double  pr,
const double *  work 
) const
virtual

The falloff function.

This is defined so that the rate coefficient is

\[ k = F(Pr)\frac{Pr}{1 + Pr}. \]

Here \( Pr \) is the reduced pressure, defined by

\[ Pr = \frac{k_0 [M]}{k_\infty}. \]

Parameters
prreduced pressure (dimensionless).
workarray of size workSize() containing cached temperature-dependent intermediate results from a prior call to updateTemp.
Returns
the value of the falloff function \( F \) defined above

Reimplemented from FalloffRate.

Definition at line 263 of file Falloff.cpp.

◆ workSize()

virtual size_t workSize ( ) const
inlinevirtual

The size of the work array required.

Todo:
deprecate; only used by legacy framework

Reimplemented from FalloffRate.

Definition at line 379 of file Falloff.h.

◆ type()

virtual const std::string type ( ) const
inlinevirtual

String identifying reaction rate specialization.

Reimplemented from FalloffRate.

Definition at line 383 of file Falloff.h.

◆ nParameters()

virtual size_t nParameters ( ) const
inlinevirtual

Returns the number of parameters used by this parameterization.

The values of these parameters can be obtained from getParameters().

Reimplemented from FalloffRate.

Definition at line 387 of file Falloff.h.

◆ setParameters()

void setParameters ( const AnyMap node,
const UnitStack units 
)
virtual

Set parameters.

Parameters
nodeAnyMap object containing reaction rate specification
unitsunit definitions specific to rate information

Reimplemented from FalloffRate.

Definition at line 273 of file Falloff.cpp.

References AnyMap::empty().

◆ getParameters() [1/2]

void getParameters ( double *  params) const
virtual

Sets params to contain, in order,.

\[ (A, T_3, T_1, T_2) \]

Todo:
deprecate; superseded by getFalloffCoeffs

Reimplemented from FalloffRate.

Definition at line 295 of file Falloff.cpp.

◆ getParameters() [2/2]

void getParameters ( AnyMap node) const
virtual

Get parameters.

Parameters
nodeAnyMap containing rate information Store the parameters of a ReactionRate needed to reconstruct an identical object. Does not include user-defined fields available in the m_input map.

Reimplemented from FalloffRate.

Definition at line 302 of file Falloff.cpp.

References AnyMap::setFlowStyle(), and Cantera::SmallNumber.

Member Data Documentation

◆ m_a

double m_a
protected

parameter a in the 4-parameter Troe falloff function. Dimensionless

Definition at line 403 of file Falloff.h.

◆ m_rt3

double m_rt3
protected

parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]

Definition at line 406 of file Falloff.h.

◆ m_rt1

double m_rt1
protected

parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]

Definition at line 409 of file Falloff.h.

◆ m_t2

double m_t2
protected

parameter T_2 in the 4-parameter Troe falloff function. [K]

Definition at line 412 of file Falloff.h.


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