From 3116653f2f0b7f41a319a688f736f63f121003aa Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 5 Nov 2012 19:25:58 +0000 Subject: [PATCH 01/10] Fix to ignore duplicate third body efficiencies in ohn.cti --- data/inputs/ohn.cti | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/inputs/ohn.cti b/data/inputs/ohn.cti index ace7666b9..565d329b8 100644 --- a/data/inputs/ohn.cti +++ b/data/inputs/ohn.cti @@ -7,7 +7,8 @@ ideal_gas(name = "gas", transport = 'Mix', reactions = 'gri30: all', options = ['skip_undeclared_elements', - 'skip_undeclared_species'], + 'skip_undeclared_species', + 'skip_undeclared_third_bodies'], initial_state = state(temperature = 300.0, pressure = OneAtm, mole_fractions = 'H2:2, O2:1, N2:3.76') ) From 2e233d05429792591924598740f1fa2fd50e570b Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 5 Nov 2012 19:26:04 +0000 Subject: [PATCH 02/10] Fixed handling of explicit reaction orders for some reactions For reactions with unity reactant stoichiometric coefficients, explicit values for the forward reaction order were being ignored while setting up the StoichManager. Cherry-picked from trunk (r1802). --- include/cantera/kinetics/StoichManager.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/cantera/kinetics/StoichManager.h b/include/cantera/kinetics/StoichManager.h index c54753959..265044061 100644 --- a/include/cantera/kinetics/StoichManager.h +++ b/include/cantera/kinetics/StoichManager.h @@ -827,8 +827,9 @@ public: m_n[rxn] = k.size(); bool frac = false; for (size_t n = 0; n < stoich.size(); n++) { - if (stoich[n] != 1.0) { + if (stoich[n] != 1.0 || order[n] != 1.0) { frac = true; + break; } } if (frac) { From 353fb38b110f8c31d3ed5c2c1a9cda2beb1609dc Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 5 Nov 2012 19:26:07 +0000 Subject: [PATCH 03/10] Fixed correspondence of reactor type string names to integer constants Cherry-picked from trunk (r1869). --- src/zeroD/ReactorFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zeroD/ReactorFactory.cpp b/src/zeroD/ReactorFactory.cpp index 0edbb0a51..53eac7977 100644 --- a/src/zeroD/ReactorFactory.cpp +++ b/src/zeroD/ReactorFactory.cpp @@ -23,8 +23,8 @@ static string _types[] = {"Reservoir", "Reactor", "ConstPressureReactor", }; // these constants are defined in ReactorBase.h -static int _itypes[] = {ReservoirType, ReactorType, FlowReactorType, - ConstPressureReactorType +static int _itypes[] = {ReservoirType, ReactorType, ConstPressureReactorType, + FlowReactorType }; /** From ba7725fb5bc2bef69cd1927ec0c1bbc763cb103f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 5 Nov 2012 19:26:11 +0000 Subject: [PATCH 04/10] Fixed a problem with the VCS equilibrium solver at constant HP or UP A sign error when limiting the temperature step caused the solver to fail if the initial temperature was higher than sqrt(Tlow*Thigh). Cherry-picked from trunk (r1883). --- src/equil/vcs_MultiPhaseEquil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/equil/vcs_MultiPhaseEquil.cpp b/src/equil/vcs_MultiPhaseEquil.cpp index ea91b7076..fe13a17e9 100644 --- a/src/equil/vcs_MultiPhaseEquil.cpp +++ b/src/equil/vcs_MultiPhaseEquil.cpp @@ -293,7 +293,7 @@ int vcs_MultiPhaseEquil::equilibrate_HP(doublereal Htarget, Tnew = sqrt(Tlow*Thigh); dT = Tnew - Tnow; if (dT < -200.) { - dT = 200; + dT = -200; } if (dT > 200.) { dT = 200.; From 5c086f77fee42a4fbda5c9ba0c8a684d973b2ea1 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sun, 18 Nov 2012 02:14:22 +0000 Subject: [PATCH 05/10] Bump version for 2.0.1 maintenance release --- README | 2 +- SConstruct | 2 +- cantera.pc.in | 2 +- configure.ac | 2 +- doc/sphinx/conf.py | 2 +- site_scons/wxsgen.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README b/README index 963f06fbe..62e706722 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ CANTERA ******* -Version 2.0.0 +Version 2.0.1 License Information =================== diff --git a/SConstruct b/SConstruct index d5063183e..025066620 100644 --- a/SConstruct +++ b/SConstruct @@ -526,7 +526,7 @@ opts.AddVariables( name recognized by the 'dot' program. On linux systems, this should be lowercase 'helvetica'.""", 'Helvetica'), - ('cantera_version', '', '2.0.0') + ('cantera_version', '', '2.0.1') ) opts.Update(env) diff --git a/cantera.pc.in b/cantera.pc.in index 869e3e3ef..07d5e5f88 100644 --- a/cantera.pc.in +++ b/cantera.pc.in @@ -12,7 +12,7 @@ Name: cantera Description: An object-oriented software toolkit for chemical kinetics, thermodynamics, and transport processes. URL: http://code.google.com/p/cantera/ Requires: -Version: 2.0.0 +Version: 2.0.1 LINK = -lctcxx -luser -loneD -lzeroD -lequil -lkinetics -ltransport -lthermo -lctnumerics -lctmath -ltpx -lctspectra -lconverters -lctbase -lcvode -lctlapack -lctblas -lctf2c -lm -lstdc++ diff --git a/configure.ac b/configure.ac index 9157b39eb..5a61bc0d2 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([cantera], [2.0.0], [nick@ices.utexas.edu]) +AC_INIT([cantera], [2.0.1], [nick@ices.utexas.edu]) AC_CONFIG_HEADER(config.h) AC_CONFIG_AUX_DIR([build-aux]) #AX_ENABLE_BUILDDIR diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 27869d11e..9e31415d4 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -70,7 +70,7 @@ copyright = u'2012, Cantera Developers' # The short X.Y version. version = '2.0' # The full version, including alpha/beta/rc tags. -release = '2.0.0' +release = '2.0.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/site_scons/wxsgen.py b/site_scons/wxsgen.py index c1332421b..7aa20de62 100644 --- a/site_scons/wxsgen.py +++ b/site_scons/wxsgen.py @@ -71,7 +71,7 @@ class WxsGenerator(object): UpgradeCode='2340BEE1-279D-11E1-A4AA-001FBC085391', Language='1033', Codepage='1252', - Version='2.0.0', + Version='2.0.1', Manufacturer='Cantera Developers')) fields = {'Platform': 'x64'} if self.x64 else {} From 54e4b17aa5615b7f397daa9738e40d516ce6b21f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 30 Nov 2012 22:50:47 +0000 Subject: [PATCH 06/10] [Matlab] Corrected error messages generated by setState_SP --- interfaces/matlab/toolbox/@ThermoPhase/setState_SP.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interfaces/matlab/toolbox/@ThermoPhase/setState_SP.m b/interfaces/matlab/toolbox/@ThermoPhase/setState_SP.m index 2b14d7696..ed9d99f26 100644 --- a/interfaces/matlab/toolbox/@ThermoPhase/setState_SP.m +++ b/interfaces/matlab/toolbox/@ThermoPhase/setState_SP.m @@ -7,9 +7,9 @@ function a = setState_SP(a,sp) % entropy (J/kg/K) and pressure (Pa). % if sp(1) <= 0.0 - error('the pressure must be positive'); -end -if sp(2) <= 0.0 error('the specific entropy must be positive'); end +if sp(2) <= 0.0 + error('the pressure must be positive'); +end thermo_set(a.tp_id,23,sp); From 53891d0b235f3db7f4ba10a8640f5e1fbf9a63fa Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 7 Dec 2012 15:02:55 +0000 Subject: [PATCH 07/10] [SCons] Include libexecstream in pkg-config libraries --- platform/posix/SConscript | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/posix/SConscript b/platform/posix/SConscript index 740884dc1..1bd21e25d 100644 --- a/platform/posix/SConscript +++ b/platform/posix/SConscript @@ -32,6 +32,7 @@ pc_cflags = [] localenv['mak_corelibs'] = '-lcantera' if not env['single_library']: localenv['mak_corelibs'] += ' -lctmath -lexecstream' + pc_libs.append('execstream') if env['use_sundials'] == 'n': localenv['mak_sundials_libs'] = '-lcvode' From 180d5c4813bd769df5b5555f606e951727c620c7 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 12 Dec 2012 19:16:02 +0000 Subject: [PATCH 08/10] [SCons] Fixed generation of library list in cantera.pc Now includes cvode, sundials, ctlapack, etc. as necessary depending on the SCons options specified. --- platform/posix/SConscript | 5 +---- platform/posix/cantera.pc.in | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/posix/SConscript b/platform/posix/SConscript index 1bd21e25d..9b9265fa5 100644 --- a/platform/posix/SConscript +++ b/platform/posix/SConscript @@ -24,7 +24,7 @@ if env['python_package'] == 'full': # Cantera.mak include file for Makefile projects # cantera.pc for use with pkg-config -pc_libs = [] +pc_libs = list(localenv['cantera_libs']) pc_libdirs = [] pc_incdirs = [] pc_cflags = [] @@ -32,7 +32,6 @@ pc_cflags = [] localenv['mak_corelibs'] = '-lcantera' if not env['single_library']: localenv['mak_corelibs'] += ' -lctmath -lexecstream' - pc_libs.append('execstream') if env['use_sundials'] == 'n': localenv['mak_sundials_libs'] = '-lcvode' @@ -42,7 +41,6 @@ else: # Add links to the sundials environment localenv['mak_sundials_libs'] = ' '.join('-l%s' % s for s in localenv['sundials_libs']) - pc_libs += localenv['sundials_libs'] if localenv['sundials_libdir']: localenv['mak_sundials_libdir'] = '-L' + localenv['sundials_libdir'] pc_libdirs.append(localenv['sundials_libdir']) @@ -75,7 +73,6 @@ localenv['mak_have_blas_lapack_dir'] = '1' if localenv['blas_lapack_dir'] else ' if localenv['blas_lapack_dir']: localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs']) - pc_libs += localenv['blas_lapack_libs'] elif not env['single_library']: localenv['mak_blas_lapack_libs'] = ('-L' + '$inst_libdir' + ' -lctlapack -lctblas') else: diff --git a/platform/posix/cantera.pc.in b/platform/posix/cantera.pc.in index f421ca0c1..b2161876c 100644 --- a/platform/posix/cantera.pc.in +++ b/platform/posix/cantera.pc.in @@ -8,5 +8,5 @@ Description: Cantera library URL: http://cantera.googlecode.com Version: @cantera_version@ -Libs: -L${libdir} @pc_libdirs@ -lcantera @pc_libs@ +Libs: -L${libdir} @pc_libdirs@ @pc_libs@ Cflags: @pc_cflags@ -I${includedir} @pc_incdirs@ From c4e62b72eddcfbd917335d0cd5c4d50bcb44d953 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 13 Dec 2012 22:46:05 +0000 Subject: [PATCH 09/10] [1D] Resize StFlow::m_dthermal after grid refinement Resolves Issue 133. --- src/oneD/StFlow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/oneD/StFlow.cpp b/src/oneD/StFlow.cpp index 6a3a2e3a7..161a44612 100644 --- a/src/oneD/StFlow.cpp +++ b/src/oneD/StFlow.cpp @@ -210,6 +210,7 @@ void StFlow::resize(size_t ncomponents, size_t points) } else { m_multidiff.resize(m_nsp*m_nsp*m_points); m_diff.resize(m_nsp*m_points); + m_dthermal.resize(m_nsp, m_points, 0.0); } m_flux.resize(m_nsp,m_points); m_wdot.resize(m_nsp,m_points, 0.0); From 5b423847f2f7c50da125d5da8a089cc46d17fc00 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 13 Dec 2012 22:46:10 +0000 Subject: [PATCH 10/10] [1D] Fixed calculation of diffusion flux due to Soret effect Resolves Issue 132. --- src/oneD/StFlow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/oneD/StFlow.cpp b/src/oneD/StFlow.cpp index 161a44612..78a5860cd 100644 --- a/src/oneD/StFlow.cpp +++ b/src/oneD/StFlow.cpp @@ -979,7 +979,8 @@ void StFlow::updateDiffFluxes(const doublereal* x, size_t j0, size_t j1) if (m_do_soret) { for (m = j0; m < j1; m++) { - gradlogT = 2.0*(T(x,m+1) - T(x,m))/(T(x,m+1) + T(x,m)); + gradlogT = 2.0 * (T(x,m+1) - T(x,m)) / + ((T(x,m+1) + T(x,m)) * (z(m+1) - z(m))); for (k = 0; k < m_nsp; k++) { m_flux(k,m) -= m_dthermal(k,m)*gradlogT; }