5#ifndef CT_LINEARBURKERATE_H
6#define CT_LINEARBURKERATE_H
9#include "cantera/kinetics/Falloff.h"
27 void update(
double T,
double P)
override
47 virtual void resize(
size_t nSpecies,
size_t nReactions,
size_t nPhases)
override
49 moleFractions.resize(nSpecies, NAN);
62 vector<double> moleFractions;
66 double m_pressure_buf = -1.0;
85 return make_unique<MultiRate<LinearBurkeRate, LinearBurkeData>>();
89 const string type()
const override {
return "linear-Burke"; }
101 using RateTypes = std::variant<PlogRate, TroeRate, ChebyshevRate>;
103 using DataTypes = std::variant<PlogData, FalloffData, ChebyshevData>;
Header for reaction rates that involve Arrhenius-type kinetics.
A map of string keys to values whose type can vary at runtime.
Arrhenius reaction rate type depends only on temperature.
Public interface for kinetics managers.
Pressure-dependent and composition-dependent reaction rate calculated according to the reduced-pressu...
void getParameters(AnyMap &rateNode) const override
Get parameters.
std::variant< PlogData, FalloffData, ChebyshevData > DataTypes
Type alias that refers to PlogData, FalloffData, and ChebyshevData.
double evalTroeRate(const LinearBurkeData &shared_data, DataTypes &dataObj, RateTypes &rateObj, double logPeff)
Evaluate overall reaction rate using Troe to evaluate pressure-dependent aspect of the reaction.
std::variant< PlogRate, TroeRate, ChebyshevRate > RateTypes
Type alias that refers to PlogRate, TroeRate, and ChebyshevRate.
void setContext(const Reaction &rxn, const Kinetics &kin) override
Set context of reaction rate evaluation.
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
vector< string > m_colliderNames
String name of each collider, appearing in the same order as that of the original reaction input.
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Perform object setup based on AnyMap node information.
vector< RateTypes > m_rateObjs
Stores rate objects corresponding to each non-M collider, which can be either PlogRate,...
LinearBurkeRate()=default
Default constructor.
DataTypes m_dataObj_M
Stores data objects corresponding to the reference collider M, which can be either PlogData,...
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
double evalChebyshevRate(const LinearBurkeData &shared_data, DataTypes &dataObj, RateTypes &rateObj, double logPeff)
Evaluate overall reaction rate using Chebyshev to evaluate pressure-dependent aspect of the reaction.
ArrheniusRate m_epsObj_M
Third-body collision efficiency object for the reference collider M (eig0_M/eig0_M = 1 always)
vector< size_t > m_colliderIndices
Index of each collider in the kinetics object species list where the vector elements appear in the sa...
const string type() const override
Identifier of reaction rate type.
vector< ArrheniusRate > m_epsObjs1
Third-body collision efficiency object for k(T,P,X) and eig0_mix calculation.
double evalPlogRate(const LinearBurkeData &shared_data, DataTypes &dataObj, RateTypes &rateObj, double logPeff)
Evaluate overall reaction rate using PLOG to evaluate pressure-dependent aspect of the reaction.
vector< bool > m_hasRateConstant
Indicates which colliders have a distinct k(T,P) versus only an efficiency.
vector< ArrheniusRate > m_epsObjs2
Third-body collision efficiency object for logPeff calculation.
RateTypes m_rateObj_M
Stores rate objects corresponding the reference collider M, which can be either PlogRate,...
vector< DataTypes > m_dataObjs
Stores data objects corresponding to each non-M collider, which can be either PlogData,...
Abstract base class for reaction rate definitions; this base class is used by user-facing APIs to acc...
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
Base class for a phase with thermodynamic properties.
Namespace for the Cantera kernel.
Data container holding shared data specific to LinearBurkeRate.
virtual void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override
Update number of species, reactions and phases.
void perturbPressure(double deltaP)
Perturb pressure of data container.
double logP
Logarithm of pressure.
bool ready
Boolean indicating whether vectors are accessible.
void restore() override
Restore data container after a perturbation.
void invalidateCache() override
Force shared data and reaction rates to be updated next time.
void update(double T, double P) override
Update data container based on temperature T and an extra parameter.
Data container holding shared data used for ReactionRate calculation.
virtual void update(double T)
Update data container based on temperature T
virtual void invalidateCache()
Force shared data and reaction rates to be updated next time.
Unit aggregation utility.