27 virtual void update(
double T)
override;
29 virtual void update(
double T,
double P)
override {
46 virtual void restore()
override;
115 return unique_ptr<MultiRateBase>(
119 const std::string
type()
const {
return "Chebyshev"; }
127 void getParameters(
AnyMap& rateNode,
const Units& rate_units)
const {
129 return getParameters(rateNode);
131 void getParameters(AnyMap& rateNode)
const;
133 virtual void validate(
const std::string& equation,
const Kinetics& kin);
176 double Pr = (2 * c[0] + PrNum_) *
PrDen_;
184 Cnp1 = 2 * Pr * Cn - Cnm1;
200 double updateRC(
double logT,
double recipT)
const {
201 double Tr = (2 * recipT + TrNum_) *
TrDen_;
207 Cnp1 = 2 * Tr * Cn - Cnm1;
212 return std::pow(10, logk);
254 "and to be removed thereafter; replaceable by data().");
Header file for class Cantera::Array2D.
A map of string keys to values whose type can vary at runtime.
A class for 2D arrays stored in column-major (Fortran-compatible) form.
size_t nRows() const
Number of rows.
size_t nColumns() const
Number of columns.
Pressure-dependent rate expression where the rate coefficient is expressed as a bivariate Chebyshev p...
const Array2D & data() const
Access Chebyshev coefficients as 2-dimensional array with temperature and pressure dimensions corresp...
void setParameters(const AnyMap &node, const UnitStack &units)
Perform object setup based on AnyMap node information.
double Tmax_
valid temperature range
ChebyshevRate()
Default constructor.
unique_ptr< MultiRateBase > newMultiRate() const
Create a rate evaluator for reactions of a particular derived type.
double TrDen_
terms appearing in the reduced temperature
Units m_rate_units
Reaction rate units.
void updateFromStruct(const ChebyshevData &shared_data)
Update information specific to reaction.
double Pmin() const
Minimum valid pressure [Pa].
double Tmin() const
Minimum valid temperature [K].
void setData(const Array2D &coeffs)
Set the Chebyshev coefficients as 2-dimensional array.
double Tmax() const
Maximum valid temperature [K].
double updateRC(double logT, double recipT) const
Update the value the rate constant.
const std::string type() const
String identifying reaction rate specialization.
Array2D m_coeffs
< coefficient array
double Pmax_
valid pressure range
vector_fp dotProd_
dot product of chebCoeffs with the reduced pressure polynomial
size_t nPressure() const
Number of points in the pressure direction.
double evalFromStruct(const ChebyshevData &shared_data)
Evaluate reaction rate.
void setup(double Tmin, double Tmax, double Pmin, double Pmax, const Array2D &coeffs)
Set up ChebyshevRate object.
double Pmax() const
Maximum valid pressure [Pa].
double PrDen_
terms appearing in the reduced pressure
vector_fp chebCoeffs_
Chebyshev coefficients, length nP * nT.
double m_log10P
value detecting updates
const vector_fp & coeffs() const
Access the ChebyshevRate coefficients.
void update_C(const double *c)
Update concentration-dependent parts of the rate coefficient.
void setLimits(double Tmin, double Tmax, double Pmin, double Pmax)
Set limits for ChebyshevRate object.
size_t nTemperature() const
Number of points in the temperature direction.
virtual void validate(const std::string &equation, const Kinetics &kin)
Validate the reaction rate expression.
Public interface for kinetics managers.
A class template handling ReactionRate specializations.
Abstract base class for reaction rate definitions; this base class is used by user-facing APIs to acc...
Base class for a phase with thermodynamic properties.
A representation of the units associated with a dimensional quantity.
This file contains definitions for utility functions and text for modules, inputfiles,...
Namespace for the Cantera kernel.
void warn_deprecated(const std::string &source, const AnyBase &node, const std::string &message)
A deprecation warning for syntax in an input file.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Data container holding shared data specific to ChebyshevRate.
void perturbPressure(double deltaP)
Perturb pressure of data container.
double m_pressure_buf
buffered pressure
double log10P
base 10 logarithm of pressure
virtual void update(double T, double P) override
Update data container based on temperature T and an extra parameter.
virtual void update(double T) override
Update data container based on temperature T
virtual void invalidateCache() override
Force shared data and reaction rates to be updated next time.
virtual void restore() override
Restore data container after a perturbation.
Data container holding shared data used for ReactionRate calculation.
double recipT
inverse of temperature
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.