From 1de94e0ee12dc5d95e3a904638e2abad239bb921 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 28 Aug 2012 22:36:26 +0000 Subject: [PATCH 1/3] Fixed handling of falloff reactions with specific third bodies --- interfaces/python/ctml_writer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/interfaces/python/ctml_writer.py b/interfaces/python/ctml_writer.py index c4ef4fb35..7da286874 100644 --- a/interfaces/python/ctml_writer.py +++ b/interfaces/python/ctml_writer.py @@ -1282,15 +1282,16 @@ class falloff_reaction(reaction): if 'M)' in self._r: del self._r['M)'] del self._p['M)'] - if 'm)' in self._r: + elif 'm)' in self._r: del self._r['m)'] del self._p['m)'] else: for r in self._r.keys(): if r[-1] == ')' and r.find('(') < 0: + species = r[:-1] if self._eff: - raise CTI_Error('(+ '+mspecies+') and '+self._eff+' cannot both be specified') - self._eff = r[-1]+':1.0' + raise CTI_Error('(+ '+species+') and '+self._eff+' cannot both be specified') + self._eff = species+':1.0' self._effm = 0.0 del self._r[r] From 86e7723c264104a27e2334ab6de170227180803c Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 30 Oct 2012 15:30:27 +0000 Subject: [PATCH 2/3] Fixed sign error in isothermalCompressibility of ideal phases --- include/cantera/thermo/IdealGasPhase.h | 4 ++-- src/thermo/IdealSolnGasVPSS.cpp | 2 +- src/thermo/MetalSHEelectrons.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/cantera/thermo/IdealGasPhase.h b/include/cantera/thermo/IdealGasPhase.h index b2c01ece0..189521d1d 100644 --- a/include/cantera/thermo/IdealGasPhase.h +++ b/include/cantera/thermo/IdealGasPhase.h @@ -471,10 +471,10 @@ public: * \f[ * \kappa_T = -\frac{1}{v}\left(\frac{\partial v}{\partial P}\right)_T * \f] - * For ideal gases it's equal to the negative of the inverse of the pressure + * For ideal gases it's equal to the inverse of the pressure */ virtual doublereal isothermalCompressibility() const { - return -1.0/pressure(); + return 1.0/pressure(); } //! Return the volumetric thermal expansion coefficient. Units: 1/K. diff --git a/src/thermo/IdealSolnGasVPSS.cpp b/src/thermo/IdealSolnGasVPSS.cpp index 1004e4213..0d46fae07 100644 --- a/src/thermo/IdealSolnGasVPSS.cpp +++ b/src/thermo/IdealSolnGasVPSS.cpp @@ -203,7 +203,7 @@ void IdealSolnGasVPSS::calcDensity() doublereal IdealSolnGasVPSS::isothermalCompressibility() const { if (m_idealGas) { - return -1.0 / m_Pcurrent; + return 1.0 / m_Pcurrent; } else { throw CanteraError("IdealSolnGasVPSS::isothermalCompressibility() ", "not implemented"); diff --git a/src/thermo/MetalSHEelectrons.cpp b/src/thermo/MetalSHEelectrons.cpp index 3f526719a..cfdc29f9e 100644 --- a/src/thermo/MetalSHEelectrons.cpp +++ b/src/thermo/MetalSHEelectrons.cpp @@ -211,7 +211,7 @@ void MetalSHEelectrons::setPressure(doublereal p) */ doublereal MetalSHEelectrons::isothermalCompressibility() const { - return -1.0/pressure(); + return 1.0/pressure(); } //==================================================================================================================== /* From 71156434f87cf5af35bb34d11e8ea7e378b6830f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 30 Oct 2012 15:30:33 +0000 Subject: [PATCH 3/3] Fixed handling of the SCons construction variable "FRAMEWORKS" This variable is only needed on OS X, but for simplicity, we expect it to be defined (but empty) on other platforms. --- SConstruct | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SConstruct b/SConstruct index fd374fa88..d5063183e 100644 --- a/SConstruct +++ b/SConstruct @@ -148,6 +148,9 @@ if os.name == 'nt': for key,val in env['ENV'].iteritems(): env['ENV'][key] = str(val) +if 'FRAMEWORKS' not in env: + env['FRAMEWORKS'] = [] + add_RegressionTest(env) class defaults: pass