rmgpy.kinetics.Chebyshev¶
- class rmgpy.kinetics.Chebyshev(coeffs=None, kunits='', highPlimit=None, Tmin=None, Tmax=None, Pmin=None, Pmax=None, comment='')¶
A model of a phenomenological rate coefficient \(k(T,P)\) using a set of Chebyshev polynomials in temperature and pressure. The attributes are:
Attribute
Description
coeffs
Matrix of Chebyshev coefficients, such that the resulting \(k(T,P)\) has units of cm^3, mol, s
kunits
The units of the rate coefficient
degreeT
The number of terms in the inverse temperature direction
degreeP
The number of terms in the log pressure direction
Tmin
The minimum temperature at which the model is valid, or zero if unknown or undefined
Tmax
The maximum temperature at which the model is valid, or zero if unknown or undefined
Pmin
The minimum pressure at which the model is valid, or zero if unknown or undefined
Pmax
The maximum pressure at which the model is valid, or zero if unknown or undefined
comment
Information about the model (e.g. its source)
The Chebyshev polynomial formulation is a means of fitting a wide range of complex \(k(T,P)\) behavior. However, there is no meaningful physical interpretation of the polynomial-based fit, and one must take care to minimize the magnitude of Runge’s phenomenon. The formulation is as follows:
\[\log k(T,P) = \sum_{t=1}^{N_T} \sum_{p=1}^{N_P} \alpha_{tp} \phi_t(\tilde{T}) \phi_p(\tilde{P})\]Above, \(\alpha_{tp}\) is a constant, \(\phi_n(x)\) is the Chebyshev polynomial of degree \(n\) evaluated at \(x\), and
\[\tilde{T} \equiv \frac{2T^{-1} - T_\mathrm{min}^{-1} - T_\mathrm{max}^{-1}}{T_\mathrm{max}^{-1} - T_\mathrm{min}^{-1}}\]\[\tilde{P} \equiv \frac{2 \log P - \log P_\mathrm{min} - \log P_\mathrm{max}}{\log P_\mathrm{max} - \log P_\mathrm{min}}\]are reduced temperature and reduced pressure designed to map the ranges \((T_\mathrm{min}, T_\mathrm{max})\) and \((P_\mathrm{min}, P_\mathrm{max})\) to \((-1, 1)\).
- Pmax¶
The maximum pressure at which the model is valid, or
None
if not defined.
- Pmin¶
The minimum pressure at which the model is valid, or
None
if not defined.
- Tmax¶
The maximum temperature at which the model is valid, or
None
if not defined.
- Tmin¶
The minimum temperature at which the model is valid, or
None
if not defined.
- change_rate(self, double factor)¶
Changes kinetics rates by a multiple
factor
.
- chebyshev(self, int n, double x) double ¶
Return the value of the nth-order Chebyshev polynomial at the given value of x.
- coeffs¶
The Chebyshev coefficients.
- comment¶
unicode
- Type:
comment
- degreeP¶
‘int’
- Type:
degreeP
- degreeT¶
‘int’
- Type:
degreeT
- discrepancy(self, KineticsModel other_kinetics) double ¶
Returns some measure of the discrepancy based on two different reaction models.
- efficiencies¶
dict
- Type:
efficiencies
- fit_to_data(self, ndarray Tlist, ndarray Plist, ndarray K, unicode kunits, int degreeT, int degreeP, double Tmin, double Tmax, double Pmin, double Pmax)¶
Fit a Chebyshev kinetic model to a set of rate coefficients K, which is a matrix corresponding to the temperatures Tlist in K and pressures Plist in Pa. degreeT and degreeP are the degree of the polynomials in temperature and pressure, while Tmin, Tmax, Pmin, and Pmax set the edges of the valid temperature and pressure ranges in K and bar, respectively.
- get_cantera_efficiencies(self, species_list)¶
Returns a dictionary containing the collider efficiencies for this PDepKineticsModel object suitable for setting the efficiencies in the following cantera reaction objects: ThreeBodyReaction, FalloffReaction,`ChemicallyActivatedReaction`
- get_effective_collider_efficiencies(self, list species) ndarray ¶
Return the effective collider efficiencies for all species in the form of a numpy array. This function helps assist rapid effective pressure calculations in the solver.
- get_effective_pressure(self, double P, list species, ndarray fractions) double ¶
Return the effective pressure in Pa for a system at a given pressure P in Pa composed of the given list of species (Species or Molecule objects) with the given fractions.
- get_rate_coefficient(self, double T, double P=0) double ¶
Return the rate coefficient in the appropriate combination of m^3, mol, and s at temperature T in K and pressure P in Pa by evaluating the Chebyshev expression.
- get_reduced_pressure(self, double P) double ¶
Return the reduced pressure corresponding to the given pressure P in Pa. This maps the logarithm of the pressure onto the domain [-1, 1] using the Pmin and Pmax attributes as the limits.
- get_reduced_temperature(self, double T) double ¶
Return the reduced temperature corresponding to the given temperature T in K. This maps the inverse of the temperature onto the domain [-1, 1] using the Tmin and Tmax attributes as the limits.
- highPlimit¶
rmgpy.kinetics.model.KineticsModel
- Type:
highPlimit
- is_identical_to(self, KineticsModel other_kinetics) bool ¶
Checks to see if kinetics matches that of other kinetics and returns
True
if coeffs, kunits, Tmin,
- is_pressure_dependent(self) bool ¶
Return
True
since all objects derived from PDepKineticsModel represent pressure-dependent kinetics.
- is_pressure_valid(self, double P) bool ¶
Return
True
if the pressure P in Pa is within the valid pressure range of the kinetic data, orFalse
if not. If the minimum and maximum pressure are not defined,True
is returned.
- is_similar_to(self, KineticsModel other_kinetics) bool ¶
Returns
True
if rates of reaction at temperatures 500,1000,1500,2000 K and 1 and 10 bar are within +/ .5 for log(k), in other words, within a factor of 3.
- is_temperature_valid(self, double T) bool ¶
Return
True
if the temperature T in K is within the valid temperature range of the kinetic data, orFalse
if not. If the minimum and maximum temperature are not defined,True
is returned.
- kunits¶
unicode
- Type:
kunits
- set_cantera_kinetics(self, ct_reaction, species_list)¶
Sets the kinetics parameters for a Cantera ChebyshevReaction() object Uses set_parameters(self,Tmin,Tmax,Pmin,Pmax,coeffs) where T’s are in units of K, P’s in units of Pa, and coeffs is 2D array of (nTemperature, nPressure).
- to_html(self)¶
Return an HTML rendering.
- uncertainty¶
rmgpy.kinetics.uncertainties.RateUncertainty
- Type:
uncertainty