mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Added a test CpJump that stresses the new setState_HP() algorithm.
The old undamped newton's method fails on this problem.
This commit is contained in:
10
test_problems/CpJump/.cvsignore
Normal file
10
test_problems/CpJump/.cvsignore
Normal file
@@ -0,0 +1,10 @@
|
||||
Makefile
|
||||
output.txt
|
||||
diff_test.out
|
||||
gri_pairs
|
||||
outputa.txt
|
||||
csvCode.txt
|
||||
.depends
|
||||
*.d
|
||||
CpJump
|
||||
ct2ctml.log
|
||||
47
test_problems/CpJump/CpJump.cpp
Normal file
47
test_problems/CpJump/CpJump.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* $Author$
|
||||
* $Date$
|
||||
* $Revision$
|
||||
*
|
||||
* Copyright 2002 California Institute of Technology
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef SRCDIRTREE
|
||||
#include "ct_defs.h"
|
||||
#include "ThermoPhase.h"
|
||||
#include "IdealGasMix.h"
|
||||
#include "equil.h"
|
||||
#else
|
||||
#include "Cantera.h"
|
||||
#include "IdealGasMix.h"
|
||||
#include "equilibrium.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using namespace Cantera;
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
try {
|
||||
IdealGasMix g("bad_air.xml", "air");
|
||||
double pres = 1.0E5;
|
||||
g.setState_TPX(1000.1, pres, "O2:0.4, N2:0.6");
|
||||
equilibrate(g, "TP", -1);
|
||||
cout << g;
|
||||
double enth = g.enthalpy_mass();
|
||||
printf(" enth = %g\n", enth);
|
||||
enth -= 2.0E2;
|
||||
printf("attempted equil at (H,P) = %10.5g, %10.5g\n", enth, pres);
|
||||
g.setState_HP(enth, pres);
|
||||
equilibrate(g, "HP", -1);
|
||||
cout << g;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (CanteraError) {
|
||||
showErrors(cerr);
|
||||
cerr << "program terminating." << endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
119
test_problems/CpJump/Makefile.in
Normal file
119
test_problems/CpJump/Makefile.in
Normal file
@@ -0,0 +1,119 @@
|
||||
#!/bin/sh
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Makefile to compile and link a C++ application to
|
||||
# Cantera.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# addition to suffixes
|
||||
.SUFFIXES : .d
|
||||
|
||||
# the name of the executable program to be created
|
||||
PROG_NAME = CpJump
|
||||
|
||||
# the object files to be linked together. List those generated from Fortran
|
||||
# and from C/C++ separately
|
||||
OBJS = CpJump.o
|
||||
|
||||
# Location of the current build. Will assume that tests are run
|
||||
# in the source directory tree location
|
||||
src_dir_tree = 0
|
||||
|
||||
# additional flags to be passed to the linker. If your program
|
||||
# requires other external libraries, put them here
|
||||
LINK_OPTIONS = @EXTRA_LINK@
|
||||
|
||||
#############################################################################
|
||||
|
||||
# Check to see whether we are in the msvc++ environment
|
||||
os_is_win = @OS_IS_WIN@
|
||||
|
||||
# Fortran libraries
|
||||
FORT_LIBS = @FLIBS@
|
||||
|
||||
# the C++ compiler
|
||||
CXX = @CXX@
|
||||
|
||||
# C++ compile flags
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@
|
||||
else
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
endif
|
||||
|
||||
# Ending C++ linking libraries
|
||||
LCXX_END_LIBS = @LCXX_END_LIBS@
|
||||
|
||||
# the directory where the Cantera libraries are located
|
||||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
ifeq ($(src_dir_tree), 1)
|
||||
CANTERA_INCDIR=../../Cantera/src
|
||||
else
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
endif
|
||||
|
||||
# flags passed to the C++ compiler/linker for the linking step
|
||||
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
|
||||
|
||||
# How to compile C++ source files to object files
|
||||
.@CXX_EXT@.@OBJ_EXT@:
|
||||
$(CXX) -c $< -I$(CANTERA_INCDIR) $(CXX_FLAGS)
|
||||
|
||||
# How to compile the dependency file
|
||||
.cpp.d:
|
||||
@CXX_DEPENDS@ -I$(CANTERA_INCDIR) $(CXX_FLAGS) $*.cpp > $*.d
|
||||
|
||||
# List of dependency files to be created
|
||||
DEPENDS=$(OBJS:.o=.d)
|
||||
|
||||
# Program Name
|
||||
PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libctbase.a
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
# Add an additional target for stability:
|
||||
$(OBJS): $(CANTERA_LIBDIR)/libctbase.a $(CANTERA_LIBDIR)/libthermo.a
|
||||
|
||||
|
||||
# depends target -> forces recalculation of dependencies
|
||||
depends:
|
||||
$(RM) *.d .depends
|
||||
@MAKE@ .depends
|
||||
|
||||
.depends: $(DEPENDS)
|
||||
cat *.d > .depends
|
||||
|
||||
# Do the test -> For the windows vc++ environment, we have to skip checking on
|
||||
# whether the program is uptodate, because we don't utilize make
|
||||
# in that environment to build programs.
|
||||
test:
|
||||
ifeq ($(os_is_win), 1)
|
||||
else
|
||||
@MAKE@ $(PROGRAM)
|
||||
endif
|
||||
./runtest
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends
|
||||
../../bin/rm_cvsignore
|
||||
(if test -d SunWS_cache ; then \
|
||||
$(RM) -rf SunWS_cache ; \
|
||||
fi )
|
||||
|
||||
ifeq ($(wildcard .depends), .depends)
|
||||
include .depends
|
||||
endif
|
||||
|
||||
|
||||
8
test_problems/CpJump/README.txt
Normal file
8
test_problems/CpJump/README.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
# This test checks a new algorithm used in setState_HP(). Basically, we are trying
|
||||
# to make the convergence algorithm fault tolerant of (small) jumps in the value of H or Cp
|
||||
# at temperature boundaries. The new algorithm, which is a root finder, achieves this
|
||||
# while the old algorithm, a bare Newton's method, diverges on this sample problem.
|
||||
200
test_problems/CpJump/bad_air.cti
Normal file
200
test_problems/CpJump/bad_air.cti
Normal file
@@ -0,0 +1,200 @@
|
||||
#
|
||||
# This file has been modified to yield jumps in Cp and H
|
||||
# at T = 1000 for the species O2
|
||||
#
|
||||
|
||||
units(length = "cm", time = "s", quantity = "mol", act_energy = "cal/mol")
|
||||
|
||||
|
||||
ideal_gas(name = "air",
|
||||
elements = " O N Ar ",
|
||||
species = """ O O2 N NO NO2 N2O N2 AR """,
|
||||
reactions = "all",
|
||||
transport = "Mix",
|
||||
initial_state = state(temperature = 300.0,
|
||||
pressure = OneAtm, mole_fractions = 'O2:0.21, N2:0.78, AR:0.01') )
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Species data
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
species(name = "O",
|
||||
atoms = " O:1 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 3.168267100E+00, -3.279318840E-03,
|
||||
6.643063960E-06, -6.128066240E-09, 2.112659710E-12,
|
||||
2.912225920E+04, 2.051933460E+00] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 2.569420780E+00, -8.597411370E-05,
|
||||
4.194845890E-08, -1.001777990E-11, 1.228336910E-15,
|
||||
2.921757910E+04, 4.784338640E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "atom",
|
||||
diam = 2.75,
|
||||
well_depth = 80.00),
|
||||
note = "L 1/90"
|
||||
)
|
||||
|
||||
species(name = "O2",
|
||||
atoms = " O:2 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 3.782456360E+00, -3.996734160E-03,
|
||||
9.847302010E-06, -9.681295090E-09, 3.243728370E-12,
|
||||
-1.063943560E+03, 3.657675730E+00] ),
|
||||
NASA( [ 1000.00, 3500.00], [ 3.282537840E+00, 1.483087540E-03,
|
||||
-7.579666690E-07, 2.094705550E-10, -2.167177940E-14,
|
||||
-1.088457720E+03, 5.453231290E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.46,
|
||||
well_depth = 107.40,
|
||||
polar = 1.60,
|
||||
rot_relax = 3.80),
|
||||
note = "TPIS89"
|
||||
)
|
||||
|
||||
species(name = "N",
|
||||
atoms = " N:1 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
5.610463700E+04, 4.193908700E+00] ),
|
||||
NASA( [ 1000.00, 6000.00], [ 2.415942900E+00, 1.748906500E-04,
|
||||
-1.190236900E-07, 3.022624500E-11, -2.036098200E-15,
|
||||
5.613377300E+04, 4.649609600E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "atom",
|
||||
diam = 3.30,
|
||||
well_depth = 71.40),
|
||||
note = "L 6/88"
|
||||
)
|
||||
|
||||
species(name = "NO",
|
||||
atoms = " N:1 O:1 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 4.218476300E+00, -4.638976000E-03,
|
||||
1.104102200E-05, -9.336135400E-09, 2.803577000E-12,
|
||||
9.844623000E+03, 2.280846400E+00] ),
|
||||
NASA( [ 1000.00, 6000.00], [ 3.260605600E+00, 1.191104300E-03,
|
||||
-4.291704800E-07, 6.945766900E-11, -4.033609900E-15,
|
||||
9.920974600E+03, 6.369302700E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.62,
|
||||
well_depth = 97.53,
|
||||
polar = 1.76,
|
||||
rot_relax = 4.00),
|
||||
note = "RUS 78"
|
||||
)
|
||||
|
||||
species(name = "NO2",
|
||||
atoms = " N:1 O:2 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 3.944031200E+00, -1.585429000E-03,
|
||||
1.665781200E-05, -2.047542600E-08, 7.835056400E-12,
|
||||
2.896617900E+03, 6.311991700E+00] ),
|
||||
NASA( [ 1000.00, 6000.00], [ 4.884754200E+00, 2.172395600E-03,
|
||||
-8.280690600E-07, 1.574751000E-10, -1.051089500E-14,
|
||||
2.316498300E+03, -1.174169500E-01] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "nonlinear",
|
||||
diam = 3.50,
|
||||
well_depth = 200.00,
|
||||
rot_relax = 1.00),
|
||||
note = "L 7/88"
|
||||
)
|
||||
|
||||
species(name = "N2O",
|
||||
atoms = " N:2 O:1 ",
|
||||
thermo = (
|
||||
NASA( [ 200.00, 1000.00], [ 2.257150200E+00, 1.130472800E-02,
|
||||
-1.367131900E-05, 9.681980600E-09, -2.930718200E-12,
|
||||
8.741774400E+03, 1.075799200E+01] ),
|
||||
NASA( [ 1000.00, 6000.00], [ 4.823072900E+00, 2.627025100E-03,
|
||||
-9.585087400E-07, 1.600071200E-10, -9.775230300E-15,
|
||||
8.073404800E+03, -2.201720700E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.83,
|
||||
well_depth = 232.40,
|
||||
rot_relax = 1.00),
|
||||
note = "L 7/88"
|
||||
)
|
||||
|
||||
species(name = "N2",
|
||||
atoms = " N:2 ",
|
||||
thermo = (
|
||||
NASA( [ 300.00, 1000.00], [ 3.298677000E+00, 1.408240400E-03,
|
||||
-3.963222000E-06, 5.641515000E-09, -2.444854000E-12,
|
||||
-1.020899900E+03, 3.950372000E+00] ),
|
||||
NASA( [ 1000.00, 5000.00], [ 2.926640000E+00, 1.487976800E-03,
|
||||
-5.684760000E-07, 1.009703800E-10, -6.753351000E-15,
|
||||
-9.227977000E+02, 5.980528000E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "linear",
|
||||
diam = 3.62,
|
||||
well_depth = 97.53,
|
||||
polar = 1.76,
|
||||
rot_relax = 4.00),
|
||||
note = "121286"
|
||||
)
|
||||
|
||||
species(name = "AR",
|
||||
atoms = " Ar:1 ",
|
||||
thermo = (
|
||||
NASA( [ 300.00, 1000.00], [ 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
-7.453750000E+02, 4.366000000E+00] ),
|
||||
NASA( [ 1000.00, 5000.00], [ 2.500000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
-7.453750000E+02, 4.366000000E+00] )
|
||||
),
|
||||
transport = gas_transport(
|
||||
geom = "atom",
|
||||
diam = 3.33,
|
||||
well_depth = 136.50),
|
||||
note = "120186"
|
||||
)
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Reaction data
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Reaction 1
|
||||
three_body_reaction( "2 O + M <=> O2 + M", [1.20000E+17, -1, 0],
|
||||
efficiencies = " AR:0.83 ")
|
||||
|
||||
# Reaction 2
|
||||
reaction( "N + NO <=> N2 + O", [2.70000E+13, 0, 355])
|
||||
|
||||
# Reaction 3
|
||||
reaction( "N + O2 <=> NO + O", [9.00000E+09, 1, 6500])
|
||||
|
||||
# Reaction 4
|
||||
reaction( "N2O + O <=> N2 + O2", [1.40000E+12, 0, 10810])
|
||||
|
||||
# Reaction 5
|
||||
reaction( "N2O + O <=> 2 NO", [2.90000E+13, 0, 23150])
|
||||
|
||||
# Reaction 6
|
||||
falloff_reaction( "N2O (+ M) <=> N2 + O (+ M)",
|
||||
kf = [7.91000E+10, 0, 56020],
|
||||
kf0 = [6.37000E+14, 0, 56640],
|
||||
efficiencies = " AR:0.625 ")
|
||||
|
||||
# Reaction 7
|
||||
three_body_reaction( "NO + O + M <=> NO2 + M", [1.06000E+20, -1.41, 0],
|
||||
efficiencies = " AR:0.7 ")
|
||||
|
||||
# Reaction 8
|
||||
reaction( "NO2 + O <=> NO + O2", [3.90000E+12, 0, -240])
|
||||
354
test_problems/CpJump/bad_air.xml
Normal file
354
test_problems/CpJump/bad_air.xml
Normal file
@@ -0,0 +1,354 @@
|
||||
<?xml version="1.0"?>
|
||||
<ctml>
|
||||
<validate reactions="yes" species="yes"/>
|
||||
|
||||
<!-- phase air -->
|
||||
<phase dim="3" id="air">
|
||||
<elementArray datasrc="elements.xml">O N Ar </elementArray>
|
||||
<speciesArray datasrc="#species_data">O O2 N NO NO2 N2O N2 AR </speciesArray>
|
||||
<reactionArray datasrc="#reaction_data"/>
|
||||
<state>
|
||||
<temperature units="K">300.0</temperature>
|
||||
<pressure units="Pa">101325.0</pressure>
|
||||
<moleFractions>O2:0.21, N2:0.78, AR:0.01</moleFractions>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<kinetics model="GasKinetics"/>
|
||||
<transport model="Mix"/>
|
||||
</phase>
|
||||
|
||||
<!-- species definitions -->
|
||||
<speciesData id="species_data">
|
||||
|
||||
<!-- species O -->
|
||||
<species name="O">
|
||||
<atomArray>O:1 </atomArray>
|
||||
<note>L 1/90</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.168267100E+00, -3.279318840E-03, 6.643063960E-06, -6.128066240E-09,
|
||||
2.112659710E-12, 2.912225920E+04, 2.051933460E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.569420780E+00, -8.597411370E-05, 4.194845890E-08, -1.001777990E-11,
|
||||
1.228336910E-15, 2.921757910E+04, 4.784338640E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">atom</string>
|
||||
<LJ_welldepth units="K">80.000</LJ_welldepth>
|
||||
<LJ_diameter units="A">2.750</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">0.000</polarizability>
|
||||
<rotRelax>0.000</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- species O2 -->
|
||||
<species name="O2">
|
||||
<atomArray>O:2 </atomArray>
|
||||
<note>TPIS89</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.782456360E+00, -3.996734160E-03, 9.847302010E-06, -9.681295090E-09,
|
||||
3.243728370E-12, -1.063943560E+03, 3.657675730E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.282537840E+00, 1.483087540E-03, -7.579666690E-07, 2.094705550E-10,
|
||||
-2.167177940E-14, -1.088457720E+03, 5.453231290E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="K">107.400</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.460</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">1.600</polarizability>
|
||||
<rotRelax>3.800</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- species N -->
|
||||
<species name="N">
|
||||
<atomArray>N:1 </atomArray>
|
||||
<note>L 6/88</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 5.610463700E+04, 4.193908700E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.415942900E+00, 1.748906500E-04, -1.190236900E-07, 3.022624500E-11,
|
||||
-2.036098200E-15, 5.613377300E+04, 4.649609600E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">atom</string>
|
||||
<LJ_welldepth units="K">71.400</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.300</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">0.000</polarizability>
|
||||
<rotRelax>0.000</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- species NO -->
|
||||
<species name="NO">
|
||||
<atomArray>O:1 N:1 </atomArray>
|
||||
<note>RUS 78</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
4.218476300E+00, -4.638976000E-03, 1.104102200E-05, -9.336135400E-09,
|
||||
2.803577000E-12, 9.844623000E+03, 2.280846400E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.260605600E+00, 1.191104300E-03, -4.291704800E-07, 6.945766900E-11,
|
||||
-4.033609900E-15, 9.920974600E+03, 6.369302700E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="K">97.530</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.620</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">1.760</polarizability>
|
||||
<rotRelax>4.000</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- species NO2 -->
|
||||
<species name="NO2">
|
||||
<atomArray>O:2 N:1 </atomArray>
|
||||
<note>L 7/88</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.944031200E+00, -1.585429000E-03, 1.665781200E-05, -2.047542600E-08,
|
||||
7.835056400E-12, 2.896617900E+03, 6.311991700E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
4.884754200E+00, 2.172395600E-03, -8.280690600E-07, 1.574751000E-10,
|
||||
-1.051089500E-14, 2.316498300E+03, -1.174169500E-01</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">nonlinear</string>
|
||||
<LJ_welldepth units="K">200.000</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.500</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">0.000</polarizability>
|
||||
<rotRelax>1.000</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- species N2O -->
|
||||
<species name="N2O">
|
||||
<atomArray>O:1 N:2 </atomArray>
|
||||
<note>L 7/88</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.257150200E+00, 1.130472800E-02, -1.367131900E-05, 9.681980600E-09,
|
||||
-2.930718200E-12, 8.741774400E+03, 1.075799200E+01</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="6000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
4.823072900E+00, 2.627025100E-03, -9.585087400E-07, 1.600071200E-10,
|
||||
-9.775230300E-15, 8.073404800E+03, -2.201720700E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="K">232.400</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.830</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">0.000</polarizability>
|
||||
<rotRelax>1.000</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- species N2 -->
|
||||
<species name="N2">
|
||||
<atomArray>N:2 </atomArray>
|
||||
<note>121286</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="300.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
3.298677000E+00, 1.408240400E-03, -3.963222000E-06, 5.641515000E-09,
|
||||
-2.444854000E-12, -1.020899900E+03, 3.950372000E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="5000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.926640000E+00, 1.487976800E-03, -5.684760000E-07, 1.009703800E-10,
|
||||
-6.753351000E-15, -9.227977000E+02, 5.980528000E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="K">97.530</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.620</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">1.760</polarizability>
|
||||
<rotRelax>4.000</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- species AR -->
|
||||
<species name="AR">
|
||||
<atomArray>Ar:1 </atomArray>
|
||||
<note>120186</note>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="300.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, -7.453750000E+02, 4.366000000E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="5000.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, -7.453750000E+02, 4.366000000E+00</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
<transport model="gas_transport">
|
||||
<string title="geometry">atom</string>
|
||||
<LJ_welldepth units="K">136.500</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.330</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000</dipoleMoment>
|
||||
<polarizability units="A3">0.000</polarizability>
|
||||
<rotRelax>0.000</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
</speciesData>
|
||||
<reactionData id="reaction_data">
|
||||
|
||||
<!-- reaction 0001 -->
|
||||
<reaction reversible="yes" type="threeBody" id="0001">
|
||||
<equation>2 O + M [=] O2 + M</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>1.200000E+11</A>
|
||||
<b>-1</b>
|
||||
<E units="cal/mol">0.000000</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1.0">AR:0.83 </efficiencies>
|
||||
</rateCoeff>
|
||||
<reactants>O:2.0</reactants>
|
||||
<products>O2:1.0</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0002 -->
|
||||
<reaction reversible="yes" id="0002">
|
||||
<equation>N + NO [=] N2 + O</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>2.700000E+10</A>
|
||||
<b>0</b>
|
||||
<E units="cal/mol">355.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>NO:1 N:1.0</reactants>
|
||||
<products>N2:1.0 O:1</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0003 -->
|
||||
<reaction reversible="yes" id="0003">
|
||||
<equation>N + O2 [=] NO + O</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>9.000000E+06</A>
|
||||
<b>1</b>
|
||||
<E units="cal/mol">6500.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>O2:1 N:1.0</reactants>
|
||||
<products>O:1 NO:1.0</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0004 -->
|
||||
<reaction reversible="yes" id="0004">
|
||||
<equation>N2O + O [=] N2 + O2</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>1.400000E+09</A>
|
||||
<b>0</b>
|
||||
<E units="cal/mol">10810.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>N2O:1.0 O:1</reactants>
|
||||
<products>N2:1.0 O2:1</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0005 -->
|
||||
<reaction reversible="yes" id="0005">
|
||||
<equation>N2O + O [=] 2 NO</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>2.900000E+10</A>
|
||||
<b>0</b>
|
||||
<E units="cal/mol">23150.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>N2O:1.0 O:1</reactants>
|
||||
<products>NO:2.0</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0006 -->
|
||||
<reaction reversible="yes" type="falloff" id="0006">
|
||||
<equation>N2O (+ M) [=] N2 + O (+ M)</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>7.910000E+10</A>
|
||||
<b>0</b>
|
||||
<E units="cal/mol">56020.000000</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A>6.370000E+11</A>
|
||||
<b>0</b>
|
||||
<E units="cal/mol">56640.000000</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1.0">AR:0.625 </efficiencies>
|
||||
<falloff type="Lindemann"/>
|
||||
</rateCoeff>
|
||||
<reactants>N2O:1.0</reactants>
|
||||
<products>N2:1.0 O:1</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0007 -->
|
||||
<reaction reversible="yes" type="threeBody" id="0007">
|
||||
<equation>NO + O + M [=] NO2 + M</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>1.060000E+14</A>
|
||||
<b>-1.4099999999999999</b>
|
||||
<E units="cal/mol">0.000000</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1.0">AR:0.7 </efficiencies>
|
||||
</rateCoeff>
|
||||
<reactants>O:1 NO:1.0</reactants>
|
||||
<products>NO2:1.0</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0008 -->
|
||||
<reaction reversible="yes" id="0008">
|
||||
<equation>NO2 + O [=] NO + O2</equation>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>3.900000E+09</A>
|
||||
<b>0</b>
|
||||
<E units="cal/mol">-240.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>O:1 NO2:1.0</reactants>
|
||||
<products>O2:1 NO:1.0</products>
|
||||
</reaction>
|
||||
</reactionData>
|
||||
</ctml>
|
||||
68
test_problems/CpJump/output_blessed.txt
Normal file
68
test_problems/CpJump/output_blessed.txt
Normal file
@@ -0,0 +1,68 @@
|
||||
|
||||
|
||||
**** WARNING ****
|
||||
For species O2, discontinuity in cp/R detected at Tmid = 1000
|
||||
Value computed using low-temperature polynomial: 3.19546.
|
||||
Value computed using high-temperature polynomial: 4.19546.
|
||||
|
||||
|
||||
**** WARNING ****
|
||||
For species O2, discontinuity in s/R detected at Tmid = 1000
|
||||
Value computed using low-temperature polynomial: 28.2967.
|
||||
Value computed using high-temperature polynomial: 29.2967.
|
||||
|
||||
air:
|
||||
|
||||
temperature 1000.1 K
|
||||
pressure 100000 Pa
|
||||
density 0.356062 kg/m^3
|
||||
mean mol. weight 29.6076 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy 742093 2.197e+07 J
|
||||
internal energy 461243 1.366e+07 J
|
||||
entropy 8106.04 2.4e+05 J/K
|
||||
Gibbs function -7.36476e+06 -2.181e+08 J
|
||||
heat capacity c_p 1135.21 3.361e+04 J/K
|
||||
heat capacity c_v 854.39 2.53e+04 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
O 1.00395e-10 5.42517e-11 -13.7477
|
||||
O2 0.399979 0.432282 -27.4955
|
||||
N 2.33301e-22 1.10369e-22 -12.6874
|
||||
NO 3.79282e-05 3.84387e-05 -26.4351
|
||||
NO2 2.80497e-06 4.35848e-06 -40.1829
|
||||
N2O 2.71909e-09 4.04202e-09 -39.1225
|
||||
N2 0.59998 0.567676 -25.3748
|
||||
AR 0 0
|
||||
enth = 742093
|
||||
attempted equil at (H,P) = 7.4189e+05, 1e+05
|
||||
|
||||
air:
|
||||
|
||||
temperature 999.965 K
|
||||
pressure 100000 Pa
|
||||
density 0.356111 kg/m^3
|
||||
mean mol. weight 29.6077 amu
|
||||
|
||||
1 kg 1 kmol
|
||||
----------- ------------
|
||||
enthalpy 685818 2.031e+07 J
|
||||
internal energy 405006 1.199e+07 J
|
||||
entropy 7993.6 2.367e+05 J/K
|
||||
Gibbs function -7.3075e+06 -2.164e+08 J
|
||||
heat capacity c_p 1022.87 3.028e+04 J/K
|
||||
heat capacity c_v 742.051 2.197e+04 J/K
|
||||
|
||||
X Y Chem. Pot. / RT
|
||||
------------- ------------ ------------
|
||||
O 1.28379e-10 6.93733e-11 -13.4976
|
||||
O2 0.399972 0.432274 -26.9952
|
||||
N 2.31496e-22 1.09516e-22 -12.6872
|
||||
NO 4.86273e-05 4.92818e-05 -26.1848
|
||||
NO2 4.62191e-06 7.18171e-06 -39.6824
|
||||
N2O 3.48658e-09 5.18292e-09 -38.872
|
||||
N2 0.599975 0.56767 -25.3745
|
||||
AR 0 0
|
||||
32
test_problems/CpJump/runtest
Executable file
32
test_problems/CpJump/runtest
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
#
|
||||
temp_success="1"
|
||||
/bin/rm -f output.txt outputa.txt
|
||||
|
||||
#################################################################
|
||||
#
|
||||
#################################################################
|
||||
CANTERA_DATA=${CANTERA_DATA:=../../data/inputs}; export CANTERA_DATA
|
||||
|
||||
CANTERA_BIN=${CANTERA_BIN:=../../bin}
|
||||
./CpJump > output.txt
|
||||
retnStat=$?
|
||||
if [ $retnStat != "0" ]
|
||||
then
|
||||
temp_success="0"
|
||||
echo "gri_pairs returned with bad status, $retnStat, check output"
|
||||
fi
|
||||
|
||||
../../bin/exp3to2.sh output.txt > outputa.txt
|
||||
diff -w outputa.txt output_blessed.txt > diff_test.out
|
||||
retnStat=$?
|
||||
if [ $retnStat = "0" ]
|
||||
then
|
||||
echo "successful diff comparison on CpJump test"
|
||||
else
|
||||
echo "unsuccessful diff comparison on CpJump test"
|
||||
echo "FAILED" > csvCode.txt
|
||||
temp_success="0"
|
||||
fi
|
||||
|
||||
@@ -21,6 +21,7 @@ all:
|
||||
cd ChemEquil_gri_pairs; @MAKE@ all
|
||||
cd ChemEquil_ionizedGas; @MAKE@ all
|
||||
cd ChemEquil_red1; @MAKE@ all
|
||||
cd CpJump; @MAKE@ all
|
||||
cd mixGasTransport; @MAKE@ all
|
||||
cd multiGasTransport; @MAKE@ all
|
||||
ifeq ($(test_pure_fluids),1)
|
||||
@@ -53,6 +54,7 @@ test:
|
||||
@ cd ChemEquil_gri_pairs; @MAKE@ -s test
|
||||
@ cd ChemEquil_ionizedGas; @MAKE@ -s test
|
||||
@ cd ChemEquil_red1; @MAKE@ -s test
|
||||
@ cd CpJump; @MAKE@ -s test
|
||||
@ cd mixGasTransport; @MAKE@ -s test
|
||||
@ cd multiGasTransport; @MAKE@ -s test
|
||||
ifeq ($(test_cathermo),1)
|
||||
@@ -87,6 +89,7 @@ clean:
|
||||
cd ChemEquil_gri_pairs; $(RM) .depends ; @MAKE@ clean
|
||||
cd ChemEquil_ionizedGas; $(RM) .depends ; @MAKE@ clean
|
||||
cd ChemEquil_red1; $(RM) .depends ; @MAKE@ clean
|
||||
cd CpJump; $(RM) .depends ; @MAKE@ clean
|
||||
cd mixGasTransport; $(RM) .depends ; @MAKE@ clean
|
||||
cd multiGasTransport; $(RM) .depends ; @MAKE@ clean
|
||||
cd pureFluidTest; $(RM) .depends ; @MAKE@ clean
|
||||
@@ -109,6 +112,7 @@ depends:
|
||||
cd ChemEquil_gri_pairs; @MAKE@ depends
|
||||
cd ChemEquil_ionizedGas; @MAKE@ depends
|
||||
cd ChemEquil_red1; @MAKE@ depends
|
||||
cd CpJump; @MAKE@ depends
|
||||
cd mixGasTransport; @MAKE@ depends
|
||||
cd multiGasTransport; @MAKE@ depends
|
||||
ifeq ($(test_cathermo),1)
|
||||
|
||||
Reference in New Issue
Block a user