From 40e09043bc7d7dc1346d53c1bf289f721b9b9aa7 Mon Sep 17 00:00:00 2001 From: imitrichev Date: Wed, 14 Oct 2015 15:15:42 +0400 Subject: [PATCH] Added methods to InterfaceKinetics to get effective rate parameters Effective rate parameters are used in SurfaceArrhenius reactions. Resolves #297. --- include/cantera/kinetics/InterfaceKinetics.h | 37 +++++++++++++++++++ include/cantera/kinetics/RateCoeffMgr.h | 38 ++++++++++++++++++++ include/cantera/kinetics/RxnRates.h | 18 +++++++++- src/kinetics/RxnRates.cpp | 2 +- 4 files changed, 93 insertions(+), 2 deletions(-) diff --git a/include/cantera/kinetics/InterfaceKinetics.h b/include/cantera/kinetics/InterfaceKinetics.h index 4e6ede1bf..b3d65b7cd 100644 --- a/include/cantera/kinetics/InterfaceKinetics.h +++ b/include/cantera/kinetics/InterfaceKinetics.h @@ -161,6 +161,43 @@ public: virtual void getRevRateConstants(doublereal* krev, bool doIrreversible = false); + //! Return effective preexponent for the specified reaction + /*! + * Returns effective preexponent, accounting for surface coverage + * dependencies. + * + * @param irxn Reaction number in the kinetics mechanism + * @return Effective preexponent + */ + double effectivePreExponentialFactor(size_t irxn) { + return m_rates.effectivePreExponentialFactor(irxn); + } + + //! Return effective activation energy for the specified reaction + /*! + * Returns effective activation energy, accounting for surface coverage + * dependencies. + * + * @param irxn Reaction number in the kinetics mechanism + * @return Effective activation energy divided by the gas constant + */ + double effectiveActivationEnergy_R(size_t irxn) { + return m_rates.effectiveActivationEnergy_R(irxn); + } + + //! Return effective temperature exponent for the specified reaction + /*! + * Returns effective temperature exponenty, accounting for surface coverage + * dependencies. Current parameterization in SurfaceArrhenius does not + * change this parameter with the change in surface coverages. + * + * @param irxn Reaction number in the kinetics mechanism + * @return Effective temperature exponent + */ + double effectiveTemperatureExponent(size_t irxn) { + return m_rates.effectiveTemperatureExponent(irxn); + } + //! @} //! @name Reaction Mechanism Construction //! @{ diff --git a/include/cantera/kinetics/RateCoeffMgr.h b/include/cantera/kinetics/RateCoeffMgr.h index 1a01e5dce..da3b97098 100644 --- a/include/cantera/kinetics/RateCoeffMgr.h +++ b/include/cantera/kinetics/RateCoeffMgr.h @@ -75,6 +75,44 @@ public: return m_rates.size(); } + //! Return effective preexponent for the specified reaction. + /*! + * Returns effective preexponent, accounting for surface coverage + * dependencies. Used in InterfaceKinetics. + * + * @param irxn Reaction number in the kinetics mechanism + * @return Effective preexponent + */ + double effectivePreExponentialFactor(size_t irxn) { + return m_rates[irxn].preExponentialFactor(); + } + + //! Return effective activation energy for the specified reaction. + /*! + * Returns effective activation energy, accounting for surface coverage + * dependencies. Used in InterfaceKinetics. + * + * @param irxn Reaction number in the kinetics mechanism + * @return Effective activation energy divided by the gas constant + */ + double effectiveActivationEnergy_R(size_t irxn) { + return m_rates[irxn].activationEnergy_R(); + } + + //! Return effective temperature exponent for the specified reaction. + /*! + * Returns effective temperature exponent, accounting for surface coverage + * dependencies. Used in InterfaceKinetics. Current parameterization in + * SurfaceArrhenius does not change this parameter with the change in + * surface coverages. + * + * @param irxn Reaction number in the kinetics mechanism + * @return Effective temperature exponent + */ + double effectiveTemperatureExponent(size_t irxn) { + return m_rates[irxn].temperatureExponent(); + } + protected: std::vector m_rates; std::vector m_rxn; diff --git a/include/cantera/kinetics/RxnRates.h b/include/cantera/kinetics/RxnRates.h index 53c3cb910..ba93ab7e7 100644 --- a/include/cantera/kinetics/RxnRates.h +++ b/include/cantera/kinetics/RxnRates.h @@ -118,7 +118,7 @@ public: explicit SurfaceArrhenius(double A, double b, double Ta); //! Add a coverage dependency for species *k*, with pre-exponential - //! dependence *a*, temperature exponent dependence *m* and activation + //! dependence *a*, rate constant exponential dependency *m*, and activation //! energy dependence *e*, where *e* is in Kelvin, i.e. energy divided by //! the molar gas constant. void addCoverageDependence(size_t k, doublereal a, @@ -153,6 +153,22 @@ public: (m_E + m_ecov)*recipT + m_mcov); } + //! Return the pre-exponential factor *A* (in m, kmol, s to powers depending + //! on the reaction order) accounting coverage dependence. + /*! + * Returns reaction prexponent accounting for both *a* and *m*. + */ + doublereal preExponentialFactor() const { + return m_A * std::exp(std::log(10.0)*m_acov + m_mcov); + } + + //! Return effective temperature exponent + doublereal temperatureExponent() const { + return m_b; + } + + //! Return the activation energy divided by the gas constant (i.e. the + //! activation temperature) [K], accounting coverage dependence. doublereal activationEnergy_R() const { return m_E + m_ecov; } diff --git a/src/kinetics/RxnRates.cpp b/src/kinetics/RxnRates.cpp index cd04e7783..50b21e8aa 100644 --- a/src/kinetics/RxnRates.cpp +++ b/src/kinetics/RxnRates.cpp @@ -21,7 +21,7 @@ Arrhenius::Arrhenius(doublereal A, doublereal b, doublereal E) if (m_A <= 0.0) { m_logA = -1.0E300; } else { - m_logA = log(m_A); + m_logA = std::log(m_A); } }