From 10aa8ba060a727078f67cb7f2ef32c5154bd2739 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 1 Aug 2013 18:57:33 +0000 Subject: [PATCH] [Kinetics] Allow negative Troe parameters --- src/kinetics/FalloffFactory.cpp | 48 +++++++++------------------------ 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/src/kinetics/FalloffFactory.cpp b/src/kinetics/FalloffFactory.cpp index 78304a2c8..023dff29c 100644 --- a/src/kinetics/FalloffFactory.cpp +++ b/src/kinetics/FalloffFactory.cpp @@ -35,12 +35,8 @@ mutex_t FalloffFactory::falloff_mutex; * * \f[ N = 0.75 - 1.27 \log_{10} F_{cent} \f] * - * There are a few requirements for the parameters: - * - * - T_3 is required to greater than or equal to zero. If it is zero, then - * the term is set to zero. - * - T_1 is required to greater than or equal to zero. If it is zero, then - * the term is set to zero. + * - If \f$ T_3 \f$ is zero, then the corresponding term is set to zero. + * - If \f$ T_1 \f$ is zero, then the corresponding term is set to zero. * * @ingroup falloffGroup */ @@ -58,21 +54,13 @@ public: virtual void init(const vector_fp& c) { m_a = c[0]; - if (c[1] <= 0.0) { - if (c[1] == 0.0) { - m_rt3 = 1000.; - } else { - throw CanteraError("Troe3::init()", "T3 parameter is less than zero"); - } + if (c[1] == 0.0) { + m_rt3 = 1000.; } else { m_rt3 = 1.0/c[1]; } - if (c[2] <= 0.0) { - if (c[2] == 0.0) { - m_rt1 = 1000.; - } else { - throw CanteraError("Troe3::init()", "T1 parameter is less than zero"); - } + if (c[2] == 0.0) { + m_rt1 = 1000.; } else { m_rt1 = 1.0/c[2]; } @@ -143,12 +131,8 @@ protected: * * \f[ N = 0.75 - 1.27 \log_{10} F_{cent} \f] * - * There are a few requirements for the parameters - * - * - T_3 is required to greater than or equal to zero. If it is zero, - * then the term is set to zero. - * - T_1 is required to greater than or equal to zero. If it is zero, - * then the term is set to zero. + * - If \f$ T_3 \f$ is zero, then the corresponding term is set to zero. + * - If \f$ T_1 \f$ is zero, then the corresponding term is set to zero. * * @ingroup falloffGroup */ @@ -166,21 +150,13 @@ public: */ virtual void init(const vector_fp& c) { m_a = c[0]; - if (c[1] <= 0.0) { - if (c[1] == 0.0) { - m_rt3 = 1000.; - } else { - throw CanteraError("Troe4::init()", "T3 parameter is less than zero"); - } + if (c[1] == 0.0) { + m_rt3 = 1000.; } else { m_rt3 = 1.0/c[1]; } - if (c[2] <= 0.0) { - if (c[2] == 0.0) { - m_rt1 = 1000.; - } else { - throw CanteraError("Troe4::init()", "T1 parameter is less than zero"); - } + if (c[2] == 0.0) { + m_rt1 = 1000.; } else { m_rt1 = 1.0/c[2]; }