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