Cantera  3.1.0a1
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 void getCoverageDependencies(AnyMap& dependencies) const;
114
115 //! Add a coverage dependency for species *sp*, with exponential dependence
116 //! *a*, power-law exponent *m*, and activation energy dependence *e*,
117 //! where *e* is in Kelvin, that is, energy divided by the molar gas constant.
118 virtual void addCoverageDependence(const string& sp, double a, double m,
119 const vector<double>& e);
120
121 //! Boolean indicating whether rate uses exchange current density formulation
123 return m_exchangeCurrentDensityFormulation;
124 }
125
126 //! Build rate-specific parameters based on Reaction and Kinetics context
127 //! @param rxn Reaction associated with rate parameterization
128 //! @param kin Kinetics object associated with rate parameterization
129 void setContext(const Reaction& rxn, const Kinetics& kin);
130
131 //! Set association with an ordered list of all species associated with a given
132 //! `Kinetics` object.
133 void setSpecies(const vector<string>& species);
134
135 //! Update reaction rate parameters
136 //! @param shared_data data shared by all reactions of a given type
137 void updateFromStruct(const InterfaceData& shared_data);
138
139 //! Calculate modifications for the forward reaction rate for interfacial charge
140 //! transfer reactions.
141 /*!
142 * For reactions that transfer charge across a potential difference, the
143 * activation energies are modified by the potential difference. The correction
144 * factor is based on the net electric potential energy change
145 * @f[
146 * \Delta E_{p,j} = \sum_i E_{p,i} \nu_{i,j}
147 * @f]
148 * where potential energies are calculated as @f$ E_{p,i} = F \phi_i z_i @f$.
149 * Here, @f$ F @f$ is Faraday's constant, @f$ \phi_i @f$ is the electric potential
150 * of the species phase and @f$ z_i @f$ is the charge of the species.
151 *
152 * When an electrode reaction rate is specified in terms of its exchange current
153 * density, the correction factor is adjusted to the standard reaction rate
154 * constant form and units. Specifically, this converts a reaction rate constant
155 * that was specified in units of A/m2 to kmol/m2/s.
156 *
157 * @warning The updated calculation of voltage corrections is an experimental
158 * part of the %Cantera API and may be changed or removed without notice.
159 */
160 double voltageCorrection() const {
161 // Calculate reaction rate correction. Only modify those with a non-zero
162 // activation energy.
163 double correction = 1.;
164 if (m_deltaPotential_RT != 0.) {
165 // Comments preserved from previous implementation:
166 // Below we decrease the activation energy below zero.
167 // NOTE, there is some discussion about this point. Should we decrease the
168 // activation energy below zero? I don't think this has been decided in any
169 // definitive way. The treatment below is numerically more stable, however.
170 correction = exp(-m_beta * m_deltaPotential_RT);
171 }
172
173 // Update correction if exchange current density formulation format is used.
174 if (m_exchangeCurrentDensityFormulation) {
175 // Comment preserved from previous implementation:
176 // We need to have the straight chemical reaction rate constant to
177 // come out of this calculation.
178 double tmp = exp(-m_beta * m_deltaGibbs0_RT);
180 correction *= tmp;
181 }
182 return correction;
183 }
184
185 //! Boolean indicating whether rate uses electrochemistry
186 /*!
187 * If this is true, the Butler-Volmer correction
188 * @f[
189 * f_{BV} = \exp ( - \beta * Delta E_{p,j} / R T )
190 * @f]
191 * is applied to the forward reaction rate.
192 *
193 * @see voltageCorrection().
194 */
196 return m_chargeTransfer;
197 }
198
199 //! Return the charge transfer beta parameter
200 double beta() const {
201 if (m_chargeTransfer) {
202 return m_beta;
203 }
204 return NAN;
205 }
206
207 //! Return site density [kmol/m^2]
208 /*!
209 * @warning This method is an experimental part of the %Cantera API and
210 * may be changed or removed without notice.
211 */
212 double siteDensity() const {
213 return m_siteDensity;
214 }
215
216 //! Set site density [kmol/m^2]
217 /*!
218 * @note This method is used internally, for testing purposes only as the site
219 * density is a property of InterfaceKinetics and will be overwritten during an
220 * update of the thermodynamic state.
221 *
222 * @warning This method is an experimental part of the %Cantera API and
223 * may be changed or removed without notice.
224 */
227 }
228
229protected:
230 double m_siteDensity; //!< Site density [kmol/m^2]
231 double m_acov; //!< Coverage contribution to pre-exponential factor
232 double m_ecov; //!< Coverage contribution to activation energy
233 double m_mcov; //!< Coverage term in reaction rate
234 bool m_chargeTransfer; //!< Boolean indicating use of electrochemistry
235 bool m_exchangeCurrentDensityFormulation; //! Electrochemistry only
236 double m_beta; //!< Forward value of apparent electrochemical transfer coefficient
237 double m_deltaPotential_RT; //!< Normalized electric potential energy change
238 double m_deltaGibbs0_RT; //!< Normalized standard state Gibbs free energy change
239 double m_prodStandardConcentrations; //!< Products of standard concentrations
240
241 //! Map from coverage dependencies stored in this object to the index of the
242 //! coverage species in the Kinetics object
243 map<size_t, size_t> m_indices;
244 vector<string> m_cov; //!< Vector holding names of coverage species
245 vector<double> m_ac; //!< Vector holding coverage-specific exponential dependence
246 //! Vector holding coverage-specific activation energy dependence as a
247 //! 5-membered array of polynomial coeffcients starting from 0th-order to
248 //! 4th-order coefficients
249 vector<vector<double>> m_ec;
250 vector<bool> m_lindep; //!< Vector holding boolean for linear dependence
251 vector<double> m_mc; //!< Vector holding coverage-specific power-law exponents
252
253private:
254 //! Pairs of species index and multipliers to calculate enthalpy change
255 vector<pair<size_t, double>> m_stoichCoeffs;
256
257 //! Pairs of phase index and net electric charges (same order as m_stoichCoeffs)
258 vector<pair<size_t, double>> m_netCharges;
259};
260
261
262//! Base class for rate parameterizations that implement sticking coefficients
263/**
264 * The StickingCoverage class enhances Coverage to accommodate sticking coefficients.
265 * @ingroup surfaceGroup
266 */
268{
269public:
271
272 //! Perform object setup based on AnyMap node information
273 //! @param node Sticking coefficient parameters
274 void setStickingParameters(const AnyMap& node);
275
276 //! Store parameters needed to reconstruct an identical object
277 //! @param node Sticking coefficient parameters
278 void getStickingParameters(AnyMap& node) const;
279
280 //! Get flag indicating whether sticking rate uses the correction factor developed
281 //! by Motz & Wise for reactions with high (near-unity) sticking coefficients.
282 //! Defaults to 'false'.
283 bool motzWiseCorrection() const {
284 return m_motzWise;
285 }
286
287 //! Set flag for Motz & Wise correction factor
288 void setMotzWiseCorrection(bool motz_wise) {
289 m_motzWise = motz_wise;
290 m_explicitMotzWise = true;
291 }
292
293 //! Get sticking species.
294 string stickingSpecies() const {
295 return m_stickingSpecies;
296 }
297
298 //! Set sticking species
299 /*!
300 * For reactions with multiple non-surface species, the sticking species needs
301 * to be explicitly identified. Note that species have to be specified prior
302 * to adding a reaction to a Kinetics object.
303 */
306 m_explicitSpecies = true;
307 }
308
309 //! Get exponent applied to site density (sticking order)
310 double stickingOrder() {
311 return m_surfaceOrder;
312 }
313
314 //! Set exponent applied to site density (sticking order)
315 /*!
316 * @note This method is used for internal testing purposes only as the value is
317 * determined automatically by setContext.
318 *
319 * @warning This method is an experimental part of the %Cantera API and
320 * may be changed or removed without notice.
321 */
322 void setStickingOrder(double order) {
323 m_surfaceOrder = order;
324 }
325
326 //! Get the molecular weight of the sticking species
327 double stickingWeight() {
328 return GasConstant / (2 * Pi * m_multiplier * m_multiplier);
329 }
330
331 //! Set the molecular weight of the sticking species
332 /*!
333 * @note This method is used for internal testing purposes only as the value is
334 * determined automatically by setContext.
335 *
336 * @warning This method is an experimental part of the %Cantera API and
337 * may be changed or removed without notice.
338 */
339 void setStickingWeight(double weight) {
340 m_multiplier = sqrt(GasConstant / (2 * Pi * weight));
341 }
342
343 //! Build rate-specific parameters based on Reaction and Kinetics context
344 //! @param rxn Reaction associated with the sticking coefficient
345 //! @param kin Kinetics object associated with the sticking coefficient
346 //! Parameters can be accessed using the method stickingSpecies, stickingOrder
347 //! and stickingWeight.
348 void setContext(const Reaction& rxn, const Kinetics& kin);
349
350protected:
351 bool m_motzWise; //!< boolean indicating whether Motz & Wise correction is used
352 bool m_explicitMotzWise; //!< Correction cannot be overriden by default
353 string m_stickingSpecies; //!< string identifying sticking species
354 bool m_explicitSpecies; //!< Boolean flag
355 double m_surfaceOrder; //!< exponent applied to site density term
356 double m_multiplier; //!< multiplicative factor in rate expression
357 double m_factor; //!< cached factor
358};
359
360
361//! A class template for interface reaction rate specifications
362//! @ingroup surfaceGroup
363template <class RateType, class DataType>
364class InterfaceRate : public RateType, public InterfaceRateBase
365{
367
368public:
369 InterfaceRate() = default;
370 using RateType::RateType; // inherit constructors
371
372 //! Constructor based on AnyMap content
373 InterfaceRate(const AnyMap& node, const UnitStack& rate_units) {
374 setParameters(node, rate_units);
375 }
376 explicit InterfaceRate(const AnyMap& node) {
377 setParameters(node, {});
378 }
379
380 unique_ptr<MultiRateBase> newMultiRate() const override {
381 return make_unique<MultiRate<InterfaceRate<RateType, DataType>, DataType>>();
382 }
383
384 //! Identifier of reaction rate type
385 const string type() const override {
386 return "interface-" + RateType::type();
387 }
388
389 void setParameters(const AnyMap& node, const UnitStack& rate_units) override {
391 RateType::setParameters(node, rate_units);
392 }
393
394 void getParameters(AnyMap& node) const override {
395 RateType::getParameters(node);
396 node["type"] = type();
398 }
399
400 void setContext(const Reaction& rxn, const Kinetics& kin) override {
401 RateType::setContext(rxn, kin);
403 }
404
405 //! Update reaction rate parameters
406 //! @param shared_data data shared by all reactions of a given type
407 void updateFromStruct(const DataType& shared_data) {
408 if constexpr (has_update<RateType>::value) {
409 RateType::updateFromStruct(shared_data);
410 }
412 }
413
414 //! Evaluate reaction rate
415 //! @param shared_data data shared by all reactions of a given type
416 double evalFromStruct(const DataType& shared_data) const {
417 double out = RateType::evalRate(shared_data.logT, shared_data.recipT) *
418 std::exp(std::log(10.0) * m_acov - m_ecov * shared_data.recipT + m_mcov);
419 if (m_chargeTransfer) {
420 out *= voltageCorrection();
421 }
422 return out;
423 }
424
425 //! Evaluate derivative of reaction rate with respect to temperature
426 //! divided by reaction rate
427 //! @param shared_data data shared by all reactions of a given type
428 double ddTScaledFromStruct(const DataType& shared_data) const {
429 throw NotImplementedError("InterfaceRate<>::ddTScaledFromStruct");
430 }
431
432 double preExponentialFactor() const override {
433 return RateType::preExponentialFactor() *
434 std::exp(std::log(10.0) * m_acov + m_mcov);
435 }
436
437 double activationEnergy() const override {
438 return RateType::activationEnergy() + m_ecov * GasConstant;
439 }
440
441 void addCoverageDependence(const string& sp, double a, double m,
442 const vector<double>& e) override
443 {
445 RateType::setCompositionDependence(true);
446 }
447};
448
449//! Arrhenius-type interface reaction rate specifications
450//! @ingroup surfaceGroup
452
453//! Blowers-Masel-type interface reaction rate specifications
454//! @ingroup surfaceGroup
456
457
458//! A class template for interface sticking rate specifications
459//! @ingroup surfaceGroup
460template <class RateType, class DataType>
461class StickingRate : public RateType, public StickingCoverage
462{
464
465public:
466 StickingRate() = default;
467 using RateType::RateType; // inherit constructors
468
469 //! Constructor based on AnyMap content
470 StickingRate(const AnyMap& node, const UnitStack& rate_units) {
471 setParameters(node, rate_units);
472 }
473 explicit StickingRate(const AnyMap& node) {
474 setParameters(node, {});
475 }
476
477 unique_ptr<MultiRateBase> newMultiRate() const override {
478 return make_unique<MultiRate<StickingRate<RateType, DataType>, DataType>>();
479 }
480
481 //! Identifier of reaction rate type
482 const string type() const override {
483 return "sticking-" + RateType::type();
484 }
485
486 void setRateUnits(const UnitStack& rate_units) override {
487 // Sticking coefficients are dimensionless
488 RateType::m_conversion_units = Units(1.0);
489 }
490
491 void setParameters(const AnyMap& node, const UnitStack& rate_units) override {
493 setRateUnits(rate_units);
494 RateType::m_negativeA_ok = node.getBool("negative-A", false);
496 if (!node.hasKey("sticking-coefficient")) {
497 RateType::setRateParameters(AnyValue(), node.units(), rate_units);
498 return;
499 }
500 RateType::setRateParameters(
501 node["sticking-coefficient"], node.units(), rate_units);
502 }
503
504 void getParameters(AnyMap& node) const override {
505 node["type"] = type();
506 if (RateType::m_negativeA_ok) {
507 node["negative-A"] = true;
508 }
509 AnyMap rateNode;
510 RateType::getRateParameters(rateNode);
512 if (!rateNode.empty()) {
513 // RateType object is configured
514 node["sticking-coefficient"] = std::move(rateNode);
515 }
517 }
518
519 void setContext(const Reaction& rxn, const Kinetics& kin) override {
520 RateType::setContext(rxn, kin);
523 }
524
525 void validate(const string &equation, const Kinetics& kin) override {
526 RateType::validate(equation, kin);
527 fmt::memory_buffer err_reactions;
528 double T[] = {200.0, 500.0, 1000.0, 2000.0, 5000.0, 10000.0};
529 for (size_t i=0; i < 6; i++) {
530 double k = RateType::evalRate(log(T[i]), 1 / T[i]);
531 if (k > 1) {
532 fmt_append(err_reactions, "at T = {:.1f}\n", T[i]);
533 }
534 }
535 if (err_reactions.size()) {
536 warn_user("StickingRate::validate",
537 "\nSticking coefficient is greater than 1 for reaction '{}'\n{}",
538 equation, to_string(err_reactions));
539 }
540 }
541
542 //! Update reaction rate parameters
543 //! @param shared_data data shared by all reactions of a given type
544 void updateFromStruct(const DataType& shared_data) {
545 if constexpr (has_update<RateType>::value) {
546 RateType::updateFromStruct(shared_data);
547 }
550 }
551
552 //! Evaluate reaction rate
553 //! @param shared_data data shared by all reactions of a given type
554 double evalFromStruct(const DataType& shared_data) const {
555 double out = RateType::evalRate(shared_data.logT, shared_data.recipT) *
556 std::exp(std::log(10.0) * m_acov - m_ecov * shared_data.recipT + m_mcov);
557 if (m_chargeTransfer) {
558 // @todo the physical interpretation of a 'sticking' charge transfer
559 // reaction remains to be resolved.
560 out *= voltageCorrection();
561 }
562 if (m_motzWise) {
563 out /= 1 - 0.5 * out;
564 }
565 return out * m_factor * shared_data.sqrtT * m_multiplier;
566 }
567
568 //! Evaluate derivative of reaction rate with respect to temperature
569 //! divided by reaction rate
570 //! @param shared_data data shared by all reactions of a given type
571 double ddTScaledFromStruct(const DataType& shared_data) const {
572 throw NotImplementedError("StickingRate<>::ddTScaledFromStruct");
573 }
574
575 double preExponentialFactor() const override {
576 return RateType::preExponentialFactor() *
577 std::exp(std::log(10.0) * m_acov + m_mcov);
578 }
579
580 double activationEnergy() const override {
581 return RateType::activationEnergy() + m_ecov * GasConstant;
582 }
583};
584
585//! Arrhenius-type interface sticking rate specifications
586//! @ingroup surfaceGroup
588
589//! Blowers-Masel-type interface sticking rate specifications
590//! @ingroup surfaceGroup
592
593}
594#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,...
void getCoverageDependencies(AnyMap &dependencies) const
Store parameters needed to reconstruct coverage dependencies.
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].
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:125
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:25
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