Cantera  3.0.0
Loading...
Searching...
No Matches
InterfaceRate.h
Go to the documentation of this file.
1/**
2 * @file InterfaceRate.h
3 * Header for reaction rates that occur at interfaces.
4 */
5
6// This file is part of Cantera. See License.txt in the top-level directory or
7// at https://cantera.org/license.txt for license and copyright information.
8
9#ifndef CT_INTERFACERATE_H
10#define CT_INTERFACERATE_H
11
12#include "cantera/base/global.h"
14#include "MultiRate.h"
15
16namespace Cantera
17{
18
19class AnyMap;
20
21//! Data container holding shared data for reaction rate specification with interfaces
22/**
23 * The data container InterfaceData holds precalculated data common to
24 * InterfaceRate and StickingRate objects.
25 *
26 * The data container inherits from BlowersMaselData, where density is used to
27 * hold the site density [kmol/m^2].
28 */
30{
31 InterfaceData() = default;
32
33 bool update(const ThermoPhase& bulk, const Kinetics& kin) override;
34
35 void update(double T) override;
36
37 void update(double T, const vector<double>& values) override;
38
40
41 virtual void perturbTemperature(double deltaT);
42
43 void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override {
44 coverages.resize(nSpecies, 0.);
45 logCoverages.resize(nSpecies, 0.);
46 partialMolarEnthalpies.resize(nSpecies, 0.);
47 electricPotentials.resize(nPhases, 0.);
48 standardChemPotentials.resize(nSpecies, 0.);
49 standardConcentrations.resize(nSpecies, 0.);
50 ready = true;
51 }
52
53 double sqrtT = NAN; //!< square root of temperature
54
55 vector<double> coverages; //!< surface coverages
56 vector<double> logCoverages; //!< logarithm of surface coverages
57 vector<double> electricPotentials; //!< electric potentials of phases
58 vector<double> standardChemPotentials; //!< standard state chemical potentials
59 vector<double> standardConcentrations; //!< standard state concentrations
60};
61
62
63//! Base class for rate parameterizations that involve interfaces
64/**
65 * Rate expressions defined for interfaces may include coverage dependent terms,
66 * where an example is given by Kee, et al. @cite kee2003, Eq 11.113.
67 * Using %Cantera nomenclature, this expression can be rewritten as
68 * @f[
69 * k_f = A T^b \exp \left( - \frac{E_a}{RT} \right)
70 * \prod_k 10^{a_k \theta_k} \theta_k^{m_k}
71 * \exp \left( \frac{- E_k \theta_k}{RT} \right)
72 * @f]
73 * It is evident that this expression combines a regular modified Arrhenius rate
74 * expression @f$ A T^b \exp \left( - \frac{E_a}{RT} \right) @f$ with coverage-related
75 * terms, where the parameters @f$ (a_k, E_k, m_k) @f$ describe the dependency on the
76 * surface coverage of species @f$ k, \theta_k @f$. In addition to the linear coverage
77 * dependence on the activation energy modifier @f$ E_k @f$, polynomial coverage
78 * dependence is also available. When the dependence parameter @f$ E_k @f$ is given as
79 * a scalar value, the linear dependency is applied whereas if a list of four values
80 * are given as @f$ [E^{(1)}_k, ..., E^{(4)}_k] @f$, a polynomial dependency is applied as
81 * @f[
82 * k_f = A T^b \exp \left( - \frac{E_a}{RT} \right)
83 * \prod_k 10^{a_k \theta_k} \theta_k^{m_k}
84 * \exp \left( \frac{- E^{(1)}_k \theta_k - E^{(2)}_k \theta_k^2
85 * - E^{(3)}_k \theta_k^3 - E^{(4)}_k \theta_k^4}{RT} \right)
86 * @f]
87 * The InterfaceRateBase class implements terms related to coverage only, which allows
88 * for combinations with arbitrary rate parameterizations (for example Arrhenius and
89 * BlowersMaselRate).
90 * @ingroup surfaceGroup
91 */
93{
94public:
96
97 //! Perform object setup based on AnyMap node information
98 //! @param node AnyMap object containing reaction rate specification
99 void setParameters(const AnyMap& node);
100
101 //! Store parameters needed to reconstruct an identical object
102 //! @param node AnyMap object receiving reaction rate specification
103 void getParameters(AnyMap& node) const;
104
105 //! Set coverage dependencies based on AnyMap node information
106 //! @param dependencies Coverage dependencies
107 //! @param units Unit system
108 void setCoverageDependencies(const AnyMap& dependencies,
109 const UnitSystem& units=UnitSystem());
110
111 //! Store parameters needed to reconstruct coverage dependencies
112 //! @param dependencies AnyMap receiving coverage information
113 //! @param asVector Optional boolean flag to override map output
114 //! @deprecated After %Cantera 3.0, the optional asVector argument will be removed.
115 void getCoverageDependencies(AnyMap& dependencies, bool asVector=false) const;
116
117 //! Add a coverage dependency for species *sp*, with exponential dependence
118 //! *a*, power-law exponent *m*, and activation energy dependence *e*,
119 //! where *e* is in Kelvin, that is, energy divided by the molar gas constant.
120 virtual void addCoverageDependence(const string& sp, double a, double m,
121 const vector<double>& e);
122
123 //! Boolean indicating whether rate uses exchange current density formulation
125 return m_exchangeCurrentDensityFormulation;
126 }
127
128 //! Build rate-specific parameters based on Reaction and Kinetics context
129 //! @param rxn Reaction associated with rate parameterization
130 //! @param kin Kinetics object associated with rate parameterization
131 void setContext(const Reaction& rxn, const Kinetics& kin);
132
133 //! Set association with an ordered list of all species associated with a given
134 //! `Kinetics` object.
135 void setSpecies(const vector<string>& species);
136
137 //! Update reaction rate parameters
138 //! @param shared_data data shared by all reactions of a given type
139 void updateFromStruct(const InterfaceData& shared_data);
140
141 //! Calculate modifications for the forward reaction rate for interfacial charge
142 //! transfer reactions.
143 /*!
144 * For reactions that transfer charge across a potential difference, the
145 * activation energies are modified by the potential difference. The correction
146 * factor is based on the net electric potential energy change
147 * @f[
148 * \Delta E_{p,j} = \sum_i E_{p,i} \nu_{i,j}
149 * @f]
150 * where potential energies are calculated as @f$ E_{p,i} = F \phi_i z_i @f$.
151 * Here, @f$ F @f$ is Faraday's constant, @f$ \phi_i @f$ is the electric potential
152 * of the species phase and @f$ z_i @f$ is the charge of the species.
153 *
154 * When an electrode reaction rate is specified in terms of its exchange current
155 * density, the correction factor is adjusted to the standard reaction rate
156 * constant form and units. Specifically, this converts a reaction rate constant
157 * that was specified in units of A/m2 to kmol/m2/s.
158 *
159 * @warning The updated calculation of voltage corrections is an experimental
160 * part of the %Cantera API and may be changed or removed without notice.
161 */
162 double voltageCorrection() const {
163 // Calculate reaction rate correction. Only modify those with a non-zero
164 // activation energy.
165 double correction = 1.;
166 if (m_deltaPotential_RT != 0.) {
167 // Comments preserved from previous implementation:
168 // Below we decrease the activation energy below zero.
169 // NOTE, there is some discussion about this point. Should we decrease the
170 // activation energy below zero? I don't think this has been decided in any
171 // definitive way. The treatment below is numerically more stable, however.
172 correction = exp(-m_beta * m_deltaPotential_RT);
173 }
174
175 // Update correction if exchange current density formulation format is used.
176 if (m_exchangeCurrentDensityFormulation) {
177 // Comment preserved from previous implementation:
178 // We need to have the straight chemical reaction rate constant to
179 // come out of this calculation.
180 double tmp = exp(-m_beta * m_deltaGibbs0_RT);
182 correction *= tmp;
183 }
184 return correction;
185 }
186
187 //! Boolean indicating whether rate uses electrochemistry
188 /*!
189 * If this is true, the Butler-Volmer correction
190 * @f[
191 * f_{BV} = \exp ( - \beta * Delta E_{p,j} / R T )
192 * @f]
193 * is applied to the forward reaction rate.
194 *
195 * @see voltageCorrection().
196 */
198 return m_chargeTransfer;
199 }
200
201 //! Return the charge transfer beta parameter
202 double beta() const {
203 if (m_chargeTransfer) {
204 return m_beta;
205 }
206 return NAN;
207 }
208
209 //! Return site density [kmol/m^2]
210 /*!
211 * @warning This method is an experimental part of the %Cantera API and
212 * may be changed or removed without notice.
213 */
214 double siteDensity() const {
215 return m_siteDensity;
216 }
217
218 //! Set site density [kmol/m^2]
219 /*!
220 * @note This method is used internally, for testing purposes only as the site
221 * density is a property of InterfaceKinetics and will be overwritten during an
222 * update of the thermodynamic state.
223 *
224 * @warning This method is an experimental part of the %Cantera API and
225 * may be changed or removed without notice.
226 */
229 }
230
231protected:
232 double m_siteDensity; //!< Site density [kmol/m^2]
233 double m_acov; //!< Coverage contribution to pre-exponential factor
234 double m_ecov; //!< Coverage contribution to activation energy
235 double m_mcov; //!< Coverage term in reaction rate
236 bool m_chargeTransfer; //!< Boolean indicating use of electrochemistry
237 bool m_exchangeCurrentDensityFormulation; //! Electrochemistry only
238 double m_beta; //!< Forward value of apparent electrochemical transfer coefficient
239 double m_deltaPotential_RT; //!< Normalized electric potential energy change
240 double m_deltaGibbs0_RT; //!< Normalized standard state Gibbs free energy change
241 double m_prodStandardConcentrations; //!< Products of standard concentrations
242
243 //! Map from coverage dependencies stored in this object to the index of the
244 //! coverage species in the Kinetics object
245 map<size_t, size_t> m_indices;
246 vector<string> m_cov; //!< Vector holding names of coverage species
247 vector<double> m_ac; //!< Vector holding coverage-specific exponential dependence
248 //! Vector holding coverage-specific activation energy dependence as a
249 //! 5-membered array of polynomial coeffcients starting from 0th-order to
250 //! 4th-order coefficients
251 vector<vector<double>> m_ec;
252 vector<bool> m_lindep; //!< Vector holding boolean for linear dependence
253 vector<double> m_mc; //!< Vector holding coverage-specific power-law exponents
254
255private:
256 //! Pairs of species index and multipliers to calculate enthalpy change
257 vector<pair<size_t, double>> m_stoichCoeffs;
258
259 //! Pairs of phase index and net electric charges (same order as m_stoichCoeffs)
260 vector<pair<size_t, double>> m_netCharges;
261};
262
263
264//! Base class for rate parameterizations that implement sticking coefficients
265/**
266 * The StickingCoverage class enhances Coverage to accommodate sticking coefficients.
267 * @ingroup surfaceGroup
268 */
270{
271public:
273
274 //! Perform object setup based on AnyMap node information
275 //! @param node Sticking coefficient parameters
276 void setStickingParameters(const AnyMap& node);
277
278 //! Store parameters needed to reconstruct an identical object
279 //! @param node Sticking coefficient parameters
280 void getStickingParameters(AnyMap& node) const;
281
282 //! Get flag indicating whether sticking rate uses the correction factor developed
283 //! by Motz & Wise for reactions with high (near-unity) sticking coefficients.
284 //! Defaults to 'false'.
285 bool motzWiseCorrection() const {
286 return m_motzWise;
287 }
288
289 //! Set flag for Motz & Wise correction factor
290 void setMotzWiseCorrection(bool motz_wise) {
291 m_motzWise = motz_wise;
292 m_explicitMotzWise = true;
293 }
294
295 //! Get sticking species.
296 string stickingSpecies() const {
297 return m_stickingSpecies;
298 }
299
300 //! Set sticking species
301 /*!
302 * For reactions with multiple non-surface species, the sticking species needs
303 * to be explicitly identified. Note that species have to be specified prior
304 * to adding a reaction to a Kinetics object.
305 */
308 m_explicitSpecies = true;
309 }
310
311 //! Get exponent applied to site density (sticking order)
312 double stickingOrder() {
313 return m_surfaceOrder;
314 }
315
316 //! Set exponent applied to site density (sticking order)
317 /*!
318 * @note This method is used for internal testing purposes only as the value is
319 * determined automatically by setContext.
320 *
321 * @warning This method is an experimental part of the %Cantera API and
322 * may be changed or removed without notice.
323 */
324 void setStickingOrder(double order) {
325 m_surfaceOrder = order;
326 }
327
328 //! Get the molecular weight of the sticking species
329 double stickingWeight() {
330 return GasConstant / (2 * Pi * m_multiplier * m_multiplier);
331 }
332
333 //! Set the molecular weight of the sticking species
334 /*!
335 * @note This method is used for internal testing purposes only as the value is
336 * determined automatically by setContext.
337 *
338 * @warning This method is an experimental part of the %Cantera API and
339 * may be changed or removed without notice.
340 */
341 void setStickingWeight(double weight) {
342 m_multiplier = sqrt(GasConstant / (2 * Pi * weight));
343 }
344
345 //! Build rate-specific parameters based on Reaction and Kinetics context
346 //! @param rxn Reaction associated with the sticking coefficient
347 //! @param kin Kinetics object associated with the sticking coefficient
348 //! Parameters can be accessed using the method stickingSpecies, stickingOrder
349 //! and stickingWeight.
350 void setContext(const Reaction& rxn, const Kinetics& kin);
351
352protected:
353 bool m_motzWise; //!< boolean indicating whether Motz & Wise correction is used
354 bool m_explicitMotzWise; //!< Correction cannot be overriden by default
355 string m_stickingSpecies; //!< string identifying sticking species
356 bool m_explicitSpecies; //!< Boolean flag
357 double m_surfaceOrder; //!< exponent applied to site density term
358 double m_multiplier; //!< multiplicative factor in rate expression
359 double m_factor; //!< cached factor
360};
361
362
363//! A class template for interface reaction rate specifications
364//! @ingroup surfaceGroup
365template <class RateType, class DataType>
366class InterfaceRate : public RateType, public InterfaceRateBase
367{
369
370public:
371 InterfaceRate() = default;
372 using RateType::RateType; // inherit constructors
373
374 //! Constructor based on AnyMap content
375 InterfaceRate(const AnyMap& node, const UnitStack& rate_units) {
376 setParameters(node, rate_units);
377 }
378 explicit InterfaceRate(const AnyMap& node) {
379 setParameters(node, {});
380 }
381
382 unique_ptr<MultiRateBase> newMultiRate() const override {
383 return make_unique<MultiRate<InterfaceRate<RateType, DataType>, DataType>>();
384 }
385
386 //! Identifier of reaction rate type
387 const string type() const override {
388 return "interface-" + RateType::type();
389 }
390
391 void setParameters(const AnyMap& node, const UnitStack& rate_units) override {
393 RateType::setParameters(node, rate_units);
394 }
395
396 void getParameters(AnyMap& node) const override {
397 RateType::getParameters(node);
398 node["type"] = type();
400 }
401
402 void setContext(const Reaction& rxn, const Kinetics& kin) override {
403 RateType::setContext(rxn, kin);
405 }
406
407 //! Update reaction rate parameters
408 //! @param shared_data data shared by all reactions of a given type
409 void updateFromStruct(const DataType& shared_data) {
410 if constexpr (has_update<RateType>::value) {
411 RateType::updateFromStruct(shared_data);
412 }
414 }
415
416 //! Evaluate reaction rate
417 //! @param shared_data data shared by all reactions of a given type
418 double evalFromStruct(const DataType& shared_data) const {
419 double out = RateType::evalRate(shared_data.logT, shared_data.recipT) *
420 std::exp(std::log(10.0) * m_acov - m_ecov * shared_data.recipT + m_mcov);
421 if (m_chargeTransfer) {
422 out *= voltageCorrection();
423 }
424 return out;
425 }
426
427 //! Evaluate derivative of reaction rate with respect to temperature
428 //! divided by reaction rate
429 //! @param shared_data data shared by all reactions of a given type
430 double ddTScaledFromStruct(const DataType& shared_data) const {
431 throw NotImplementedError("InterfaceRate<>::ddTScaledFromStruct");
432 }
433
434 double preExponentialFactor() const override {
435 return RateType::preExponentialFactor() *
436 std::exp(std::log(10.0) * m_acov + m_mcov);
437 }
438
439 double activationEnergy() const override {
440 return RateType::activationEnergy() + m_ecov * GasConstant;
441 }
442
443 void addCoverageDependence(const string& sp, double a, double m,
444 const vector<double>& e) override
445 {
447 RateType::setCompositionDependence(true);
448 }
449};
450
451//! Arrhenius-type interface reaction rate specifications
452//! @ingroup surfaceGroup
454
455//! Blowers-Masel-type interface reaction rate specifications
456//! @ingroup surfaceGroup
458
459
460//! A class template for interface sticking rate specifications
461//! @ingroup surfaceGroup
462template <class RateType, class DataType>
463class StickingRate : public RateType, public StickingCoverage
464{
466
467public:
468 StickingRate() = default;
469 using RateType::RateType; // inherit constructors
470
471 //! Constructor based on AnyMap content
472 StickingRate(const AnyMap& node, const UnitStack& rate_units) {
473 setParameters(node, rate_units);
474 }
475 explicit StickingRate(const AnyMap& node) {
476 setParameters(node, {});
477 }
478
479 unique_ptr<MultiRateBase> newMultiRate() const override {
480 return make_unique<MultiRate<StickingRate<RateType, DataType>, DataType>>();
481 }
482
483 //! Identifier of reaction rate type
484 const string type() const override {
485 return "sticking-" + RateType::type();
486 }
487
488 void setRateUnits(const UnitStack& rate_units) override {
489 // Sticking coefficients are dimensionless
490 RateType::m_conversion_units = Units(1.0);
491 }
492
493 void setParameters(const AnyMap& node, const UnitStack& rate_units) override {
495 setRateUnits(rate_units);
496 RateType::m_negativeA_ok = node.getBool("negative-A", false);
498 if (!node.hasKey("sticking-coefficient")) {
499 RateType::setRateParameters(AnyValue(), node.units(), rate_units);
500 return;
501 }
502 RateType::setRateParameters(
503 node["sticking-coefficient"], node.units(), rate_units);
504 }
505
506 void getParameters(AnyMap& node) const override {
507 node["type"] = type();
508 if (RateType::m_negativeA_ok) {
509 node["negative-A"] = true;
510 }
511 AnyMap rateNode;
512 RateType::getRateParameters(rateNode);
514 if (!rateNode.empty()) {
515 // RateType object is configured
516 node["sticking-coefficient"] = std::move(rateNode);
517 }
519 }
520
521 void setContext(const Reaction& rxn, const Kinetics& kin) override {
522 RateType::setContext(rxn, kin);
525 }
526
527 void validate(const string &equation, const Kinetics& kin) override {
528 RateType::validate(equation, kin);
529 fmt::memory_buffer err_reactions;
530 double T[] = {200.0, 500.0, 1000.0, 2000.0, 5000.0, 10000.0};
531 for (size_t i=0; i < 6; i++) {
532 double k = RateType::evalRate(log(T[i]), 1 / T[i]);
533 if (k > 1) {
534 fmt_append(err_reactions, "at T = {:.1f}\n", T[i]);
535 }
536 }
537 if (err_reactions.size()) {
538 warn_user("StickingRate::validate",
539 "\nSticking coefficient is greater than 1 for reaction '{}'\n{}",
540 equation, to_string(err_reactions));
541 }
542 }
543
544 //! Update reaction rate parameters
545 //! @param shared_data data shared by all reactions of a given type
546 void updateFromStruct(const DataType& shared_data) {
547 if constexpr (has_update<RateType>::value) {
548 RateType::updateFromStruct(shared_data);
549 }
552 }
553
554 //! Evaluate reaction rate
555 //! @param shared_data data shared by all reactions of a given type
556 double evalFromStruct(const DataType& shared_data) const {
557 double out = RateType::evalRate(shared_data.logT, shared_data.recipT) *
558 std::exp(std::log(10.0) * m_acov - m_ecov * shared_data.recipT + m_mcov);
559 if (m_chargeTransfer) {
560 // @todo the physical interpretation of a 'sticking' charge transfer
561 // reaction remains to be resolved.
562 out *= voltageCorrection();
563 }
564 if (m_motzWise) {
565 out /= 1 - 0.5 * out;
566 }
567 return out * m_factor * shared_data.sqrtT * m_multiplier;
568 }
569
570 //! Evaluate derivative of reaction rate with respect to temperature
571 //! divided by reaction rate
572 //! @param shared_data data shared by all reactions of a given type
573 double ddTScaledFromStruct(const DataType& shared_data) const {
574 throw NotImplementedError("StickingRate<>::ddTScaledFromStruct");
575 }
576
577 double preExponentialFactor() const override {
578 return RateType::preExponentialFactor() *
579 std::exp(std::log(10.0) * m_acov + m_mcov);
580 }
581
582 double activationEnergy() const override {
583 return RateType::activationEnergy() + m_ecov * GasConstant;
584 }
585};
586
587//! Arrhenius-type interface sticking rate specifications
588//! @ingroup surfaceGroup
590
591//! Blowers-Masel-type interface sticking rate specifications
592//! @ingroup surfaceGroup
594
595}
596#endif
Header for Blowers-Masel reaction rates.
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:427
Base class for rate parameterizations that involve interfaces.
double m_mcov
Coverage term in reaction rate.
void setCoverageDependencies(const AnyMap &dependencies, const UnitSystem &units=UnitSystem())
Set coverage dependencies based on AnyMap node information.
double m_beta
Electrochemistry only.
double m_ecov
Coverage contribution to activation energy.
vector< pair< size_t, double > > m_stoichCoeffs
Pairs of species index and multipliers to calculate enthalpy change.
vector< double > m_ac
Vector holding coverage-specific exponential dependence.
void setParameters(const AnyMap &node)
Perform object setup based on AnyMap node information.
void setSpecies(const vector< string > &species)
Set association with an ordered list of all species associated with a given Kinetics object.
vector< string > m_cov
Vector holding names of coverage species.
double m_prodStandardConcentrations
Products of standard concentrations.
double m_deltaGibbs0_RT
Normalized standard state Gibbs free energy change.
virtual void addCoverageDependence(const string &sp, double a, double m, const vector< double > &e)
Add a coverage dependency for species sp, with exponential dependence a, power-law exponent m,...
double beta() const
Return the charge transfer beta parameter.
bool exchangeCurrentDensityFormulation()
Boolean indicating whether rate uses exchange current density formulation.
bool usesElectrochemistry()
Boolean indicating whether rate uses electrochemistry.
bool m_chargeTransfer
Boolean indicating use of electrochemistry.
double siteDensity() const
Return site density [kmol/m^2].
void getCoverageDependencies(AnyMap &dependencies, bool asVector=false) const
Store parameters needed to reconstruct coverage dependencies.
vector< double > m_mc
Vector holding coverage-specific power-law exponents.
map< size_t, size_t > m_indices
Map from coverage dependencies stored in this object to the index of the coverage species in the Kine...
vector< pair< size_t, double > > m_netCharges
Pairs of phase index and net electric charges (same order as m_stoichCoeffs)
double m_acov
Coverage contribution to pre-exponential factor.
vector< bool > m_lindep
Vector holding boolean for linear dependence.
void getParameters(AnyMap &node) const
Store parameters needed to reconstruct an identical object.
vector< vector< double > > m_ec
Vector holding coverage-specific activation energy dependence as a 5-membered array of polynomial coe...
double m_siteDensity
Site density [kmol/m^2].
void setContext(const Reaction &rxn, const Kinetics &kin)
Build rate-specific parameters based on Reaction and Kinetics context.
double voltageCorrection() const
Calculate modifications for the forward reaction rate for interfacial charge transfer reactions.
void updateFromStruct(const InterfaceData &shared_data)
Update reaction rate parameters.
void setSiteDensity(double siteDensity)
Set site density [kmol/m^2].
double m_deltaPotential_RT
Normalized electric potential energy change.
A class template for interface reaction rate specifications.
double ddTScaledFromStruct(const DataType &shared_data) const
Evaluate derivative of reaction rate with respect to temperature divided by reaction rate.
InterfaceRate(const AnyMap &node, const UnitStack &rate_units)
Constructor based on AnyMap content.
void updateFromStruct(const DataType &shared_data)
Update reaction rate parameters.
void addCoverageDependence(const string &sp, double a, double m, const vector< double > &e) override
Add a coverage dependency for species sp, with exponential dependence a, power-law exponent m,...
const string type() const override
Identifier of reaction rate type.
double evalFromStruct(const DataType &shared_data) const
Evaluate reaction rate.
Public interface for kinetics managers.
Definition Kinetics.h:126
An error indicating that an unimplemented function has been called.
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
Definition Reaction.h:27
Base class for rate parameterizations that implement sticking coefficients.
void setStickingParameters(const AnyMap &node)
Perform object setup based on AnyMap node information.
bool m_explicitSpecies
Boolean flag.
void setStickingWeight(double weight)
Set the molecular weight of the sticking species.
double m_factor
cached factor
string m_stickingSpecies
string identifying sticking species
void setStickingOrder(double order)
Set exponent applied to site density (sticking order)
bool m_explicitMotzWise
Correction cannot be overriden by default.
void setMotzWiseCorrection(bool motz_wise)
Set flag for Motz & Wise correction factor.
void getStickingParameters(AnyMap &node) const
Store parameters needed to reconstruct an identical object.
string stickingSpecies() const
Get sticking species.
double m_multiplier
multiplicative factor in rate expression
bool m_motzWise
boolean indicating whether Motz & Wise correction is used
double m_surfaceOrder
exponent applied to site density term
void setContext(const Reaction &rxn, const Kinetics &kin)
Build rate-specific parameters based on Reaction and Kinetics context.
double stickingWeight()
Get the molecular weight of the sticking species.
bool motzWiseCorrection() const
Get flag indicating whether sticking rate uses the correction factor developed by Motz & Wise for rea...
void setStickingSpecies(const string &stickingSpecies)
Set sticking species.
double stickingOrder()
Get exponent applied to site density (sticking order)
A class template for interface sticking rate specifications.
double ddTScaledFromStruct(const DataType &shared_data) const
Evaluate derivative of reaction rate with respect to temperature divided by reaction rate.
StickingRate(const AnyMap &node, const UnitStack &rate_units)
Constructor based on AnyMap content.
void updateFromStruct(const DataType &shared_data)
Update reaction rate parameters.
const string type() const override
Identifier of reaction rate type.
double evalFromStruct(const DataType &shared_data) const
Evaluate reaction rate.
Base class for a phase with thermodynamic properties.
Unit conversion utility.
Definition Units.h:169
A representation of the units associated with a dimensional quantity.
Definition Units.h:35
void fmt_append(fmt::memory_buffer &b, Args... args)
Versions 6.2.0 and 6.2.1 of fmtlib do not include this define before they include windows....
Definition fmt.h:29
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
const double Faraday
Faraday constant [C/kmol].
Definition ct_defs.h:131
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition ct_defs.h:120
const double Pi
Pi.
Definition ct_defs.h:68
void warn_user(const string &method, const string &msg, const Args &... args)
Print a user warning raised from method as CanteraWarning.
Definition global.h:267
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564
Data container holding shared data specific to BlowersMaselRate.
vector< double > partialMolarEnthalpies
partial molar enthalpies
void update(double T) override
Update data container based on temperature T
bool ready
boolean indicating whether vectors are accessible
Data container holding shared data for reaction rate specification with interfaces.
vector< double > logCoverages
logarithm of surface coverages
vector< double > electricPotentials
electric potentials of phases
bool update(const ThermoPhase &bulk, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override
Update number of species, reactions and phases.
vector< double > coverages
surface coverages
vector< double > standardChemPotentials
standard state chemical potentials
vector< double > standardConcentrations
standard state concentrations
double sqrtT
square root of temperature
Unit aggregation utility.
Definition Units.h:105
#define CT_DEFINE_HAS_MEMBER(detector_name, func_name)
A macro for generating member function detectors, which can then be used in combination with if const...
Definition utilities.h:205