Cantera 2.6.0

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"
13#include "cantera/kinetics/BlowersMaselRate.h"
14#include "MultiRate.h"
15
16 namespace Cantera
17{
18
19 class AnyMap;
20
21/**
22 * @defgroup surfaceGroup Coverage-dependent rate parameterizations
23 *
24 * This section describes the parameterizations used to describe rate
25 * parameterization that involve interfaces.
26 *
27 * @ingroup chemkinetics
28 */
29
30
31//! Data container holding shared data for reaction rate specification with interfaces
32/**
33 * The data container InterfaceData holds precalculated data common to
34 * InterfaceRate and StickingRate objects.
35 *
36 * The data container inherits from BlowersMaselData, where density is used to
37 * hold the site density [kmol/m^2].
38 */
39 struct InterfaceData : public BlowersMaselData
40{
41 InterfaceData();
42
43 virtual bool update(const ThermoPhase& bulk, const Kinetics& kin) override;
44
45 virtual void update(double T) override;
46
47 virtual void update(double T, const vector_fp& values) override;
48
49 using BlowersMaselData::update;
50
51 virtual void perturbTemperature(double deltaT);
52
53 virtual void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override {
54 coverages.resize(nSpecies, 0.);
55 logCoverages.resize(nSpecies, 0.);
56 partialMolarEnthalpies.resize(nSpecies, 0.);
57 electricPotentials.resize(nPhases, 0.);
58 standardChemPotentials.resize(nSpecies, 0.);
59 standardConcentrations.resize(nSpecies, 0.);
60 ready = true;
61 }
62
63 double sqrtT; //!< square root of temperature
64
65 vector_fp coverages; //!< surface coverages
66 vector_fp logCoverages; //!< logarithm of surface coverages
67 vector_fp electricPotentials; //!< electric potentials of phases
68 vector_fp standardChemPotentials; //!< standard state chemical potentials
69 vector_fp standardConcentrations; //!< standard state concentrations
70};
71
72
73//! Base class for rate parameterizations that involve interfaces
74/**
75 * Rate expressions defined for interfaces may include coverage dependent terms,
76 * where an example is given by [Kee, R. J., Coltrin, M. E., & Glarborg, P.(2003).
77 * Chemically reacting flow: theory and practice. John Wiley & Sons. Eq 11.113].
78 * Using Cantera nomenclature, this expression can be rewritten as
79 * \f[
80 * k_f = A T^b \exp \left( - \frac{E_a}{RT} \right)
81 * \prod_k 10^{a_k \theta_k} \theta_k^{m_k}
82 * \exp \left( \frac{- E_k \theta_k}{RT} \right)
83 * \f]
84 * It is evident that this expression combines a regular modified Arrhenius rate
85 * expression \f$ A T^b \exp \left( - \frac{E_a}{RT} \right) \f$ with coverage-related
86 * terms, where the parameters \f$ (a_k, E_k, m_k) \f$ describe the dependency on the
87 * surface coverage of species \f$ k, \theta_k \f$. The InterfaceRateBase class implements
88 * terms related to coverage only, which allows for combinations with arbitrary rate
89 * parameterizations (for example Arrhenius and BlowersMaselRate).
90 */
91 class InterfaceRateBase
92{
93 public:
94 InterfaceRateBase();
95
96 //! Perform object setup based on AnyMap node information
97 //! @param node AnyMap object containing reaction rate specification
98 void setParameters(const AnyMap& node);
99
100 //! Store parameters needed to reconstruct an identical object
101 //! @param node AnyMap object receiving reaction rate specification
102 void getParameters(AnyMap& node) const;
103
104 //! Set coverage dependencies based on AnyMap node information
105 //! @param dependencies Coverage dependencies
106 //! @param units Unit system
107 void setCoverageDependencies(const AnyMap& dependencies,
108 const UnitSystem& units=UnitSystem());
109
110 //! Store parameters needed to reconstruct coverage dependencies
111 //! @param dependencies AnyMap receiving coverage information
112 //! @param asVector Optional boolean flag to override map output
113 //! @todo Remove vector version (which currently only serves testing purposes)
114 void getCoverageDependencies(AnyMap& dependencies, bool asVector=false) const;
115
116 //! Add a coverage dependency for species *sp*, with exponential dependence
117 //! *a*, power-law exponent *m*, and activation energy dependence *e*,
118 //! where *e* is in Kelvin, that is, energy divided by the molar gas constant.
119 void addCoverageDependence(const std::string& sp, double a, double m, double e);
120
121 //! Boolean indicating whether rate uses exchange current density formulation
122 bool exchangeCurrentDensityFormulation() {
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 std::vector<std::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);
179 tmp /= m_prodStandardConcentrations * Faraday;
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, @see voltageCorrection.
192 */
193 bool usesElectrochemistry() {
194 return m_chargeTransfer;
195 }
196
197 //! Return the charge transfer beta parameter
198 double beta() const {
199 if (m_chargeTransfer) {
200 return m_beta;
201 }
202 return NAN;
203 }
204
205 //! Return site density [kmol/m^2]
206 /*!
207 * @warning This method is an experimental part of the %Cantera API and
208 * may be changed or removed without notice.
209 */
210 double siteDensity() const {
211 return m_siteDensity;
212 }
213
214 //! Set site density [kmol/m^2]
215 /*!
216 * @internal This method is used for testing purposes only as the site density
217 * is a property of InterfaceKinetics and will be overwritten during an update
218 * of the thermodynamic state.
219 *
220 * @warning This method is an experimental part of the %Cantera API and
221 * may be changed or removed without notice.
222 */
223 void setSiteDensity(double siteDensity) {
224 m_siteDensity = siteDensity;
225 }
226
227 protected:
228 double m_siteDensity; //!< Site density [kmol/m^2]
229 double m_acov; //!< Coverage contribution to pre-exponential factor
230 double m_ecov; //!< Coverage contribution to activation energy
231 double m_mcov; //!< Coverage term in reaction rate
232 bool m_chargeTransfer; //!< Boolean indicating use of electrochemistry
233 bool m_exchangeCurrentDensityFormulation; //! Electrochemistry only
234 double m_beta; //!< Forward value of apparent electrochemical transfer coefficient
235 double m_deltaPotential_RT; //!< Normalized electric potential energy change
236 double m_deltaGibbs0_RT; //!< Normalized standard state Gibbs free energy change
237 double m_prodStandardConcentrations; //!< Products of standard concentrations
238 std::map<size_t, size_t> m_indices; //!< Map holding indices of coverage species
239 std::vector<std::string> m_cov; //!< Vector holding names of coverage species
240 vector_fp m_ac; //!< Vector holding coverage-specific exponential dependence
241 vector_fp m_ec; //!< Vector holding coverage-specific activation energy dependence
242 vector_fp m_mc; //!< Vector holding coverage-specific power-law exponents
243
244 private:
245 //! Pairs of species index and multiplers to calculate enthalpy change
246 std::vector<std::pair<size_t, double>> m_stoichCoeffs;
247
248 //! Pairs of phase index and net electric charges (same order as m_stoichCoeffs)
249 std::vector<std::pair<size_t, double>> m_netCharges;
250};
251
252
253//! Base class for rate parameterizations that implement sticking coefficients
254/**
255 * The StickingCoverage class enhances Coverage to accommodate sticking coefficients.
256 */
257 class StickingCoverage : public InterfaceRateBase
258{
259 public:
260 StickingCoverage();
261
262 //! Perform object setup based on AnyMap node information
263 //! @param node Sticking coefficient parameters
264 void setStickingParameters(const AnyMap& node);
265
266 //! Store parameters needed to reconstruct an identical object
267 //! @param node Sticking coefficient parameters
268 void getStickingParameters(AnyMap& node) const;
269
270 //! Get flag indicating whether sticking rate uses the correction factor developed
271 //! by Motz & Wise for reactions with high (near-unity) sticking coefficients.
272 //! Defaults to 'false'.
273 bool motzWiseCorrection() const {
274 return m_motzWise;
275 }
276
277 //! Set flag for Motz & Wise correction factor
278 void setMotzWiseCorrection(bool motz_wise) {
279 m_motzWise = motz_wise;
280 m_explicitMotzWise = true;
281 }
282
283 //! Get sticking species.
284 std::string stickingSpecies() const {
285 return m_stickingSpecies;
286 }
287
288 //! Set sticking species
289 /*!
290 * For reactions with multiple non-surface species, the sticking species needs
291 * to be explicitly identified. Note that species have to be specified prior
292 * to adding a reaction to a Kinetics object.
293 */
294 void setStickingSpecies(const std::string& stickingSpecies) {
295 m_stickingSpecies = stickingSpecies;
296 m_explicitSpecies = true;
297 }
298
299 //! Get exponent applied to site density (sticking order)
300 double stickingOrder() {
301 return m_surfaceOrder;
302 }
303
304 //! Set exponent applied to site density (sticking order)
305 /*!
306 * @internal This method is used for testing purposes only as the value is
307 * determined automatically by setContext.
308 *
309 * @warning This method is an experimental part of the %Cantera API and
310 * may be changed or removed without notice.
311 */
312 void setStickingOrder(double order) {
313 m_surfaceOrder = order;
314 }
315
316 //! Get the molecular weight of the sticking species
317 double stickingWeight() {
318 return GasConstant / (2 * Pi * m_multiplier * m_multiplier);
319 }
320
321 //! Set the molecular weight of the sticking species
322 /*!
323 * @internal This method is used for testing purposes only as the value is
324 * determined automatically by setContext.
325 *
326 * @warning This method is an experimental part of the %Cantera API and
327 * may be changed or removed without notice.
328 */
329 void setStickingWeight(double weight) {
330 m_multiplier = sqrt(GasConstant / (2 * Pi * weight));
331 }
332
333 //! Build rate-specific parameters based on Reaction and Kinetics context
334 //! @param rxn Reaction associated with the sticking coefficient
335 //! @param kin Kinetics object associated with the sticking coefficient
336 //! Parameters can be accessed using the method stickingSpecies, stickingOrder
337 //! and stickingWeight.
338 void setContext(const Reaction& rxn, const Kinetics& kin);
339
340 protected:
341 bool m_motzWise; //!< boolean indicating whether Motz & Wise correction is used
342 bool m_explicitMotzWise; //!< Correction cannot be overriden by default
343 std::string m_stickingSpecies; //!< string identifying sticking species
344 bool m_explicitSpecies; //!< Boolean flag
345 double m_surfaceOrder; //!< exponent applied to site density term
346 double m_multiplier; //!< multiplicative factor in rate expression
347 double m_factor; //!< cached factor
348};
349
350
351//! A class template for interface reaction rate specifications
352 template <class RateType, class DataType>
353 class InterfaceRate : public RateType, public InterfaceRateBase
354{
355 CT_DEFINE_HAS_MEMBER(has_update, updateFromStruct)
356
357 public:
358 InterfaceRate() = default;
359 using RateType::RateType; // inherit constructors
360
361 //! Constructor based on AnyMap content
362 InterfaceRate(const AnyMap& node, const UnitStack& rate_units) {
363 setParameters(node, rate_units);
364 }
365 explicit InterfaceRate(const AnyMap& node) {
366 setParameters(node, {});
367 }
368
369 unique_ptr<MultiRateBase> newMultiRate() const override {
370 return unique_ptr<MultiRateBase>(
371 new MultiRate<InterfaceRate<RateType, DataType>, DataType>);
372 }
373
374 //! Identifier of reaction rate type
375 virtual const std::string type() const override {
376 return "interface-" + RateType::type();
377 }
378
379 virtual void setParameters(
380 const AnyMap& node, const UnitStack& rate_units) override
381 {
382 InterfaceRateBase::setParameters(node);
383 RateType::setParameters(node, rate_units);
384 }
385
386 virtual void getParameters(AnyMap& node) const override {
387 RateType::getParameters(node);
388 node["type"] = type();
389 InterfaceRateBase::getParameters(node);
390 }
391
392 virtual void setContext(const Reaction& rxn, const Kinetics& kin) override {
393 RateType::setContext(rxn, kin);
394 InterfaceRateBase::setContext(rxn, kin);
395 }
396
397 //! Update reaction rate parameters
398 //! @param shared_data data shared by all reactions of a given type
399 void updateFromStruct(const DataType& shared_data) {
400 _update(shared_data);
401 InterfaceRateBase::updateFromStruct(shared_data);
402 }
403
404 //! Evaluate reaction rate
405 //! @param shared_data data shared by all reactions of a given type
406 double evalFromStruct(const DataType& shared_data) const {
407 double out = RateType::evalRate(shared_data.logT, shared_data.recipT) *
408 std::exp(std::log(10.0) * m_acov - m_ecov * shared_data.recipT + m_mcov);
409 if (m_chargeTransfer) {
410 out *= voltageCorrection();
411 }
412 return out;
413 }
414
415 //! Evaluate derivative of reaction rate with respect to temperature
416 //! divided by reaction rate
417 //! @param shared_data data shared by all reactions of a given type
418 double ddTScaledFromStruct(const DataType& shared_data) const {
419 throw NotImplementedError("InterfaceRate<>::ddTScaledFromStruct");
420 }
421
422 virtual double preExponentialFactor() const override {
423 return RateType::preExponentialFactor() *
424 std::exp(std::log(10.0) * m_acov + m_mcov);
425 }
426
427 virtual double activationEnergy() const override {
428 return RateType::activationEnergy() + m_ecov * GasConstant;
429 }
430
431 protected:
432 //! Helper function to process updates for rate types that implement the
433 //! `updateFromStruct` method.
434 template <typename T=RateType,
435 typename std::enable_if<has_update<T>::value, bool>::type = true>
436 void _update(const DataType& shared_data) {
437 T::updateFromStruct(shared_data);
438 }
439
440 //! Helper function for rate types that do not implement `updateFromStruct`.
441 //! Does nothing, but exists to allow generic implementations of update().
442 template <typename T=RateType,
443 typename std::enable_if<!has_update<T>::value, bool>::type = true>
444 void _update(const DataType& shared_data) {
445 }
446};
447
448 using InterfaceArrheniusRate = InterfaceRate<ArrheniusRate, InterfaceData>;
449 using InterfaceBlowersMaselRate = InterfaceRate<BlowersMaselRate, InterfaceData>;
450
451
452//! A class template for interface sticking rate specifications
453 template <class RateType, class DataType>
454 class StickingRate : public RateType, public StickingCoverage
455{
456 CT_DEFINE_HAS_MEMBER(has_update, updateFromStruct)
457
458 public:
459 StickingRate() = default;
460 using RateType::RateType; // inherit constructors
461
462 //! Constructor based on AnyMap content
463 StickingRate(const AnyMap& node, const UnitStack& rate_units) {
464 // sticking coefficients are dimensionless
465 setParameters(node, Units(1.0));
466 }
467 explicit StickingRate(const AnyMap& node) {
468 // sticking coefficients are dimensionless
469 setParameters(node, Units(1.0));
470 }
471
472 unique_ptr<MultiRateBase> newMultiRate() const override {
473 return unique_ptr<MultiRateBase>(
474 new MultiRate<StickingRate<RateType, DataType>, DataType>);
475 }
476
477 //! Identifier of reaction rate type
478 virtual const std::string type() const override {
479 return "sticking-" + RateType::type();
480 }
481
482 virtual void setParameters(
483 const AnyMap& node, const UnitStack& rate_units) override
484 {
485 InterfaceRateBase::setParameters(node);
486 RateType::m_negativeA_ok = node.getBool("negative-A", false);
487 setStickingParameters(node);
488 if (!node.hasKey("sticking-coefficient")) {
489 RateType::setRateParameters(AnyValue(), node.units(), rate_units);
490 return;
491 }
492 RateType::setRateParameters(
493 node["sticking-coefficient"], node.units(), rate_units);
494 }
495
496 virtual void getParameters(AnyMap& node) const override {
497 node["type"] = type();
498 if (RateType::m_negativeA_ok) {
499 node["negative-A"] = true;
500 }
501 AnyMap rateNode;
502 RateType::getRateParameters(rateNode);
503 getStickingParameters(node);
504 if (!rateNode.empty()) {
505 // RateType object is configured
506 node["sticking-coefficient"] = std::move(rateNode);
507 }
508 InterfaceRateBase::getParameters(node);
509 }
510
511 virtual void setContext(const Reaction& rxn, const Kinetics& kin) override {
512 RateType::setContext(rxn, kin);
513 InterfaceRateBase::setContext(rxn, kin);
514 StickingCoverage::setContext(rxn, kin);
515 }
516
517 virtual void validate(const std::string &equation, const Kinetics& kin) override {
518 RateType::validate(equation, kin);
519 fmt::memory_buffer err_reactions;
520 double T[] = {200.0, 500.0, 1000.0, 2000.0, 5000.0, 10000.0};
521 for (size_t i=0; i < 6; i++) {
522 double k = RateType::evalRate(log(T[i]), 1 / T[i]);
523 if (k > 1) {
524 fmt_append(err_reactions,
525 "\n Sticking coefficient is greater than 1 for reaction '{}'\n"
526 " at T = {:.1f}\n", equation, T[i]);
527 }
528 }
529 if (err_reactions.size()) {
530 warn_user("StickingRate::validate", to_string(err_reactions));
531 }
532 }
533
534 //! Update reaction rate parameters
535 //! @param shared_data data shared by all reactions of a given type
536 void updateFromStruct(const DataType& shared_data) {
537 _update(shared_data);
538 InterfaceRateBase::updateFromStruct(shared_data);
539 m_factor = pow(m_siteDensity, -m_surfaceOrder);
540 }
541
542 //! Evaluate reaction rate
543 //! @param shared_data data shared by all reactions of a given type
544 double evalFromStruct(const DataType& shared_data) const {
545 double out = RateType::evalRate(shared_data.logT, shared_data.recipT) *
546 std::exp(std::log(10.0) * m_acov - m_ecov * shared_data.recipT + m_mcov);
547 if (m_chargeTransfer) {
548 // @todo the physical interpretation of a 'sticking' charge transfer
549 // reaction remains to be resolved.
550 out *= voltageCorrection();
551 }
552 if (m_motzWise) {
553 out /= 1 - 0.5 * out;
554 }
555 return out * m_factor * shared_data.sqrtT * m_multiplier;
556 }
557
558 //! Evaluate derivative of reaction rate with respect to temperature
559 //! divided by reaction rate
560 //! @param shared_data data shared by all reactions of a given type
561 double ddTScaledFromStruct(const DataType& shared_data) const {
562 throw NotImplementedError("StickingRate<>::ddTScaledFromStruct");
563 }
564
565 virtual double preExponentialFactor() const override {
566 return RateType::preExponentialFactor() *
567 std::exp(std::log(10.0) * m_acov + m_mcov);
568 }
569
570 virtual double activationEnergy() const override {
571 return RateType::activationEnergy() + m_ecov * GasConstant;
572 }
573
574 protected:
575 //! Helper function to process updates for rate types that implement the
576 //! `updateFromStruct` method.
577 template <typename T=RateType,
578 typename std::enable_if<has_update<T>::value, bool>::type = true>
579 void _update(const DataType& shared_data) {
580 T::updateFromStruct(shared_data);
581 }
582
583 //! Helper function for rate types that do not implement `updateFromStruct`.
584 //! Does nothing, but exists to allow generic implementations of update().
585 template <typename T=RateType,
586 typename std::enable_if<!has_update<T>::value, bool>::type = true>
587 void _update(const DataType& shared_data) {
588 }
589};
590
591 using StickingArrheniusRate = StickingRate<ArrheniusRate, InterfaceData>;
592 using StickingBlowersMaselRate = StickingRate<BlowersMaselRate, InterfaceData>;
593
594}
595#endif
BlowersMaselRate.h
Header for Blowers-Masel reaction rates.
MultiRate.h
Cantera::AnyMap
A map of string keys to values whose type can vary at runtime.
Definition: AnyMap.h:399
Cantera::AnyMap::units
const UnitSystem & units() const
Return the default units that should be used to convert stored values.
Definition: AnyMap.h:598
Cantera::AnyMap::getBool
bool getBool(const std::string &key, bool default_) const
If key exists, return it as a bool, otherwise return default_.
Definition: AnyMap.cpp:1487
Cantera::AnyMap::hasKey
bool hasKey(const std::string &key) const
Returns true if the map contains an item named key.
Definition: AnyMap.cpp:1406
Cantera::AnyValue
A wrapper for a variable whose type is determined at runtime.
Definition: AnyMap.h:84
Cantera::InterfaceRateBase
Base class for rate parameterizations that involve interfaces.
Definition: InterfaceRate.h:92
Cantera::InterfaceRateBase::m_mcov
double m_mcov
Coverage term in reaction rate.
Definition: InterfaceRate.h:231
Cantera::InterfaceRateBase::setCoverageDependencies
void setCoverageDependencies(const AnyMap &dependencies, const UnitSystem &units=UnitSystem())
Set coverage dependencies based on AnyMap node information.
Definition: InterfaceRate.cpp:141
Cantera::InterfaceRateBase::m_beta
double m_beta
Electrochemistry only.
Definition: InterfaceRate.h:234
Cantera::InterfaceRateBase::m_ecov
double m_ecov
Coverage contribution to activation energy.
Definition: InterfaceRate.h:230
Cantera::InterfaceRateBase::addCoverageDependence
void addCoverageDependence(const std::string &sp, double a, double m, double e)
Add a coverage dependency for species sp, with exponential dependence a, power-law exponent m,...
Definition: InterfaceRate.cpp:186
Cantera::InterfaceRateBase::setParameters
void setParameters(const AnyMap &node)
Perform object setup based on AnyMap node information.
Definition: InterfaceRate.cpp:111
Cantera::InterfaceRateBase::m_prodStandardConcentrations
double m_prodStandardConcentrations
Products of standard concentrations.
Definition: InterfaceRate.h:237
Cantera::InterfaceRateBase::m_netCharges
std::vector< std::pair< size_t, double > > m_netCharges
Pairs of phase index and net electric charges (same order as m_stoichCoeffs)
Definition: InterfaceRate.h:249
Cantera::InterfaceRateBase::m_deltaGibbs0_RT
double m_deltaGibbs0_RT
Normalized standard state Gibbs free energy change.
Definition: InterfaceRate.h:236
Cantera::InterfaceRateBase::m_mc
vector_fp m_mc
Vector holding coverage-specific power-law exponents.
Definition: InterfaceRate.h:242
Cantera::InterfaceRateBase::m_indices
std::map< size_t, size_t > m_indices
Map holding indices of coverage species.
Definition: InterfaceRate.h:238
Cantera::InterfaceRateBase::beta
double beta() const
Return the charge transfer beta parameter.
Definition: InterfaceRate.h:198
Cantera::InterfaceRateBase::m_ec
vector_fp m_ec
Vector holding coverage-specific activation energy dependence.
Definition: InterfaceRate.h:241
Cantera::InterfaceRateBase::exchangeCurrentDensityFormulation
bool exchangeCurrentDensityFormulation()
Boolean indicating whether rate uses exchange current density formulation.
Definition: InterfaceRate.h:122
Cantera::InterfaceRateBase::usesElectrochemistry
bool usesElectrochemistry()
Boolean indicating whether rate uses electrochemistry.
Definition: InterfaceRate.h:193
Cantera::InterfaceRateBase::m_ac
vector_fp m_ac
Vector holding coverage-specific exponential dependence.
Definition: InterfaceRate.h:240
Cantera::InterfaceRateBase::m_chargeTransfer
bool m_chargeTransfer
Boolean indicating use of electrochemistry.
Definition: InterfaceRate.h:232
Cantera::InterfaceRateBase::siteDensity
double siteDensity() const
Return site density [kmol/m^2].
Definition: InterfaceRate.h:210
Cantera::InterfaceRateBase::getCoverageDependencies
void getCoverageDependencies(AnyMap &dependencies, bool asVector=false) const
Store parameters needed to reconstruct coverage dependencies.
Definition: InterfaceRate.cpp:165
Cantera::InterfaceRateBase::m_acov
double m_acov
Coverage contribution to pre-exponential factor.
Definition: InterfaceRate.h:229
Cantera::InterfaceRateBase::m_stoichCoeffs
std::vector< std::pair< size_t, double > > m_stoichCoeffs
Pairs of species index and multiplers to calculate enthalpy change.
Definition: InterfaceRate.h:246
Cantera::InterfaceRateBase::setSpecies
void setSpecies(const std::vector< std::string > &species)
Set association with an ordered list of all species associated with a given Kinetics object.
Definition: InterfaceRate.cpp:201
Cantera::InterfaceRateBase::getParameters
void getParameters(AnyMap &node) const
Store parameters needed to reconstruct an identical object.
Definition: InterfaceRate.cpp:124
Cantera::InterfaceRateBase::m_siteDensity
double m_siteDensity
Site density [kmol/m^2].
Definition: InterfaceRate.h:228
Cantera::InterfaceRateBase::setContext
void setContext(const Reaction &rxn, const Kinetics &kin)
Build rate-specific parameters based on Reaction and Kinetics context.
Definition: InterfaceRate.cpp:262
Cantera::InterfaceRateBase::voltageCorrection
double voltageCorrection() const
Calculate modifications for the forward reaction rate for interfacial charge transfer reactions.
Definition: InterfaceRate.h:160
Cantera::InterfaceRateBase::updateFromStruct
void updateFromStruct(const InterfaceData &shared_data)
Update reaction rate parameters.
Definition: InterfaceRate.cpp:215
Cantera::InterfaceRateBase::m_cov
std::vector< std::string > m_cov
Vector holding names of coverage species.
Definition: InterfaceRate.h:239
Cantera::InterfaceRateBase::setSiteDensity
void setSiteDensity(double siteDensity)
Set site density [kmol/m^2].
Definition: InterfaceRate.h:223
Cantera::InterfaceRateBase::m_deltaPotential_RT
double m_deltaPotential_RT
Normalized electric potential energy change.
Definition: InterfaceRate.h:235
Cantera::InterfaceRate
A class template for interface reaction rate specifications.
Definition: InterfaceRate.h:354
Cantera::InterfaceRate::ddTScaledFromStruct
double ddTScaledFromStruct(const DataType &shared_data) const
Evaluate derivative of reaction rate with respect to temperature divided by reaction rate.
Definition: InterfaceRate.h:418
Cantera::InterfaceRate::InterfaceRate
InterfaceRate(const AnyMap &node, const UnitStack &rate_units)
Constructor based on AnyMap content.
Definition: InterfaceRate.h:362
Cantera::InterfaceRate::updateFromStruct
void updateFromStruct(const DataType &shared_data)
Update reaction rate parameters.
Definition: InterfaceRate.h:399
Cantera::InterfaceRate::_update
void _update(const DataType &shared_data)
Helper function to process updates for rate types that implement the updateFromStruct method.
Definition: InterfaceRate.h:436
Cantera::InterfaceRate::evalFromStruct
double evalFromStruct(const DataType &shared_data) const
Evaluate reaction rate.
Definition: InterfaceRate.h:406
Cantera::InterfaceRate::type
virtual const std::string type() const override
Identifier of reaction rate type.
Definition: InterfaceRate.h:375
Cantera::Kinetics
Public interface for kinetics managers.
Definition: Kinetics.h:114
Cantera::NotImplementedError
An error indicating that an unimplemented function has been called.
Definition: ctexceptions.h:187
Cantera::Reaction
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
Definition: Reaction.h:33
Cantera::StickingCoverage
Base class for rate parameterizations that implement sticking coefficients.
Definition: InterfaceRate.h:258
Cantera::StickingCoverage::setStickingParameters
void setStickingParameters(const AnyMap &node)
Perform object setup based on AnyMap node information.
Definition: InterfaceRate.cpp:299
Cantera::StickingCoverage::m_explicitSpecies
bool m_explicitSpecies
Boolean flag.
Definition: InterfaceRate.h:344
Cantera::StickingCoverage::stickingSpecies
std::string stickingSpecies() const
Get sticking species.
Definition: InterfaceRate.h:284
Cantera::StickingCoverage::setStickingWeight
void setStickingWeight(double weight)
Set the molecular weight of the sticking species.
Definition: InterfaceRate.h:329
Cantera::StickingCoverage::m_factor
double m_factor
cached factor
Definition: InterfaceRate.h:347
Cantera::StickingCoverage::m_stickingSpecies
std::string m_stickingSpecies
string identifying sticking species
Definition: InterfaceRate.h:343
Cantera::StickingCoverage::setStickingSpecies
void setStickingSpecies(const std::string &stickingSpecies)
Set sticking species.
Definition: InterfaceRate.h:294
Cantera::StickingCoverage::setStickingOrder
void setStickingOrder(double order)
Set exponent applied to site density (sticking order)
Definition: InterfaceRate.h:312
Cantera::StickingCoverage::m_explicitMotzWise
bool m_explicitMotzWise
Correction cannot be overriden by default.
Definition: InterfaceRate.h:342
Cantera::StickingCoverage::setMotzWiseCorrection
void setMotzWiseCorrection(bool motz_wise)
Set flag for Motz & Wise correction factor.
Definition: InterfaceRate.h:278
Cantera::StickingCoverage::getStickingParameters
void getStickingParameters(AnyMap &node) const
Store parameters needed to reconstruct an identical object.
Definition: InterfaceRate.cpp:307
Cantera::StickingCoverage::m_multiplier
double m_multiplier
multiplicative factor in rate expression
Definition: InterfaceRate.h:346
Cantera::StickingCoverage::m_motzWise
bool m_motzWise
boolean indicating whether Motz & Wise correction is used
Definition: InterfaceRate.h:341
Cantera::StickingCoverage::m_surfaceOrder
double m_surfaceOrder
exponent applied to site density term
Definition: InterfaceRate.h:345
Cantera::StickingCoverage::setContext
void setContext(const Reaction &rxn, const Kinetics &kin)
Build rate-specific parameters based on Reaction and Kinetics context.
Definition: InterfaceRate.cpp:317
Cantera::StickingCoverage::stickingWeight
double stickingWeight()
Get the molecular weight of the sticking species.
Definition: InterfaceRate.h:317
Cantera::StickingCoverage::motzWiseCorrection
bool motzWiseCorrection() const
Get flag indicating whether sticking rate uses the correction factor developed by Motz & Wise for rea...
Definition: InterfaceRate.h:273
Cantera::StickingCoverage::stickingOrder
double stickingOrder()
Get exponent applied to site density (sticking order)
Definition: InterfaceRate.h:300
Cantera::StickingRate
A class template for interface sticking rate specifications.
Definition: InterfaceRate.h:455
Cantera::StickingRate::ddTScaledFromStruct
double ddTScaledFromStruct(const DataType &shared_data) const
Evaluate derivative of reaction rate with respect to temperature divided by reaction rate.
Definition: InterfaceRate.h:561
Cantera::StickingRate::StickingRate
StickingRate(const AnyMap &node, const UnitStack &rate_units)
Constructor based on AnyMap content.
Definition: InterfaceRate.h:463
Cantera::StickingRate::updateFromStruct
void updateFromStruct(const DataType &shared_data)
Update reaction rate parameters.
Definition: InterfaceRate.h:536
Cantera::StickingRate::_update
void _update(const DataType &shared_data)
Helper function to process updates for rate types that implement the updateFromStruct method.
Definition: InterfaceRate.h:579
Cantera::StickingRate::evalFromStruct
double evalFromStruct(const DataType &shared_data) const
Evaluate reaction rate.
Definition: InterfaceRate.h:544
Cantera::StickingRate::type
virtual const std::string type() const override
Identifier of reaction rate type.
Definition: InterfaceRate.h:478
Cantera::ThermoPhase
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:102
Cantera::UnitSystem
Unit conversion utility.
Definition: Units.h:161
Cantera::Units
A representation of the units associated with a dimensional quantity.
Definition: Units.h:30
global.h
This file contains definitions for utility functions and text for modules, inputfiles,...
Cantera::Pi
const double Pi
Pi.
Definition: ct_defs.h:52
Cantera
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:557
Cantera::Faraday
const double Faraday
Faraday constant [C/kmol].
Definition: ct_defs.h:128
Cantera::vector_fp
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:184
Cantera::warn_user
void warn_user(const std::string &method, const std::string &msg, const Args &... args)
Print a user warning raised from method as CanteraWarning.
Definition: global.h:245
Cantera::GasConstant
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition: ct_defs.h:113
Cantera::BlowersMaselData
Data container holding shared data specific to BlowersMaselRate.
Definition: BlowersMaselRate.h:20
Cantera::BlowersMaselData::update
virtual void update(double T) override
Update data container based on temperature T
Definition: BlowersMaselRate.cpp:21
Cantera::BlowersMaselData::ready
bool ready
boolean indicating whether vectors are accessible
Definition: BlowersMaselRate.h:32
Cantera::BlowersMaselData::partialMolarEnthalpies
vector_fp partialMolarEnthalpies
partial molar enthalpies
Definition: BlowersMaselRate.h:34
Cantera::InterfaceData
Data container holding shared data for reaction rate specification with interfaces.
Definition: InterfaceRate.h:40
Cantera::InterfaceData::resize
virtual void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override
Update number of species, reactions and phases.
Definition: InterfaceRate.h:53
Cantera::InterfaceData::electricPotentials
vector_fp electricPotentials
electric potentials of phases
Definition: InterfaceRate.h:67
Cantera::InterfaceData::update
virtual bool update(const ThermoPhase &bulk, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
Definition: InterfaceRate.cpp:48
Cantera::InterfaceData::coverages
vector_fp coverages
surface coverages
Definition: InterfaceRate.h:65
Cantera::InterfaceData::logCoverages
vector_fp logCoverages
logarithm of surface coverages
Definition: InterfaceRate.h:66
Cantera::InterfaceData::standardChemPotentials
vector_fp standardChemPotentials
standard state chemical potentials
Definition: InterfaceRate.h:68
Cantera::InterfaceData::standardConcentrations
vector_fp standardConcentrations
standard state concentrations
Definition: InterfaceRate.h:69
Cantera::InterfaceData::sqrtT
double sqrtT
square root of temperature
Definition: InterfaceRate.h:63
Cantera::UnitStack
Unit aggregation utility.
Definition: Units.h:99
CT_DEFINE_HAS_MEMBER
#define CT_DEFINE_HAS_MEMBER(detector_name, func_name)
A macro for generating member function detectors, which can then be used in combination with std::ena...
Definition: utilities.h:193