Cantera  2.4.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Plog Class Reference

Pressure-dependent reaction rate expressed by logarithmically interpolating between Arrhenius rate expressions at various pressures. More...

#include <RxnRates.h>

Public Member Functions

 Plog ()
 Default constructor. More...
 
 Plog (const std::multimap< double, Arrhenius > &rates)
 Constructor from Arrhenius rate expressions at a set of pressures. More...
 
void update_C (const doublereal *c)
 Update concentration-dependent parts of the rate coefficient. More...
 
doublereal updateRC (doublereal logT, doublereal recipT) const
 Update the value the rate constant. More...
 
void validate (const std::string &equation)
 Check to make sure that the rate expression is finite over a range of temperatures at each interpolation pressure. More...
 
std::vector< std::pair< double, Arrhenius > > rates () const
 Return the pressures and Arrhenius expressions which comprise this reaction. More...
 

Static Public Member Functions

static int type ()
 return the rate coefficient type. More...
 

Protected Attributes

std::map< double, std::pair< size_t, size_t > > pressures_
 log(p) to (index range) in the rates_ vector More...
 
std::vector< Arrheniusrates_
 
double logP_
 log(p) at the current state More...
 
double logP1_
 
double logP2_
 log(p) at the lower / upper pressure reference More...
 
size_t ilow1_
 Indices to the ranges within rates_ for the lower / upper pressure, such that rates_[ilow1_] through rates_[ilow2_] (inclusive) are the rates expressions which are combined to form the rate at the lower reference pressure. More...
 
size_t ilow2_
 
size_t ihigh1_
 
size_t ihigh2_
 
double rDeltaP_
 reciprocal of (logP2 - logP1) More...
 

Detailed Description

Pressure-dependent reaction rate expressed by logarithmically interpolating between Arrhenius rate expressions at various pressures.

Given two rate expressions at two specific pressures:

The rate at an intermediate pressure \( P_1 < P < P_2 \) is computed as

\[ \log k(T,P) = \log k_1(T) + \bigl(\log k_2(T) - \log k_1(T)\bigr) \frac{\log P - \log P_1}{\log P_2 - \log P_1} \]

Multiple rate expressions may be given at the same pressure, in which case the rate used in the interpolation formula is the sum of all the rates given at that pressure. For pressures outside the given range, the rate expression at the nearest pressure is used.

Definition at line 211 of file RxnRates.h.

Constructor & Destructor Documentation

◆ Plog() [1/2]

Plog ( )
inline

Default constructor.

Definition at line 220 of file RxnRates.h.

◆ Plog() [2/2]

Plog ( const std::multimap< double, Arrhenius > &  rates)
explicit

Constructor from Arrhenius rate expressions at a set of pressures.

Definition at line 63 of file RxnRates.cpp.

References Plog::pressures_, and Plog::rates().

Member Function Documentation

◆ type()

static int type ( )
inlinestatic

return the rate coefficient type.

Definition at line 215 of file RxnRates.h.

◆ update_C()

void update_C ( const doublereal *  c)
inline

Update concentration-dependent parts of the rate coefficient.

Parameters
cnatural log of the pressure in Pa

Definition at line 227 of file RxnRates.h.

References AssertThrowMsg, Plog::ilow1_, Plog::logP2_, Plog::logP_, Plog::pressures_, and Plog::rDeltaP_.

◆ updateRC()

doublereal updateRC ( doublereal  logT,
doublereal  recipT 
) const
inline

Update the value the rate constant.

This function returns the actual value of the rate constant.

Definition at line 257 of file RxnRates.h.

References Plog::ilow1_, Plog::logP_, and Plog::rDeltaP_.

◆ validate()

void validate ( const std::string &  equation)

Check to make sure that the rate expression is finite over a range of temperatures at each interpolation pressure.

This is potentially an issue when one of the Arrhenius expressions at a particular pressure has a negative pre-exponential factor.

Definition at line 91 of file RxnRates.cpp.

Referenced by PlogReaction::validate().

◆ rates()

std::vector< std::pair< double, Arrhenius > > rates ( ) const

Return the pressures and Arrhenius expressions which comprise this reaction.

Definition at line 110 of file RxnRates.cpp.

Referenced by Plog::Plog().

Member Data Documentation

◆ pressures_

std::map<double, std::pair<size_t, size_t> > pressures_
protected

log(p) to (index range) in the rates_ vector

Definition at line 294 of file RxnRates.h.

Referenced by Plog::Plog(), and Plog::update_C().

◆ logP_

double logP_
protected

log(p) at the current state

Definition at line 299 of file RxnRates.h.

Referenced by Plog::update_C(), and Plog::updateRC().

◆ logP2_

double logP2_
protected

log(p) at the lower / upper pressure reference

Definition at line 300 of file RxnRates.h.

Referenced by Plog::update_C().

◆ ilow1_

size_t ilow1_
protected

Indices to the ranges within rates_ for the lower / upper pressure, such that rates_[ilow1_] through rates_[ilow2_] (inclusive) are the rates expressions which are combined to form the rate at the lower reference pressure.

Definition at line 306 of file RxnRates.h.

Referenced by Plog::update_C(), and Plog::updateRC().

◆ rDeltaP_

double rDeltaP_
protected

reciprocal of (logP2 - logP1)

Definition at line 308 of file RxnRates.h.

Referenced by Plog::update_C(), and Plog::updateRC().


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