Added a test for handling of explicit reaction orders in Chemkin input files
This commit is contained in:
parent
7a327abb16
commit
f23c4fa940
4 changed files with 176 additions and 1 deletions
|
|
@ -5,7 +5,10 @@ H H 1 G 200.000 3500.000 1000.000 1
|
|||
2.50000001E+00-2.30842973E-11 1.61561948E-14-4.73515235E-18 4.98197357E-22 2
|
||||
2.54736599E+04-4.46682914E-01 2.50000000E+00 7.05332819E-13-1.99591964E-15 3
|
||||
2.30081632E-18-9.27732332E-22 2.54736599E+04-4.46682853E-01 4
|
||||
|
||||
AR 120186AR 1 G 300.000 5000.000 1000.000 1
|
||||
0.02500000E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 2
|
||||
-0.07453750E+04 0.04366000E+02 0.02500000E+02 0.00000000E+00 0.00000000E+00 3
|
||||
0.00000000E+00 0.00000000E+00-0.07453750E+04 0.04366000E+02 4
|
||||
R1A C 1H 4 G 200.000 3500.000 1000.000 1
|
||||
7.48514950E-02 1.33909467E-02-5.73285809E-06 1.22292535E-09-1.01815230E-13 2
|
||||
-9.46834459E+03 1.84373180E+01 5.14987613E+00-1.36709788E-02 4.91800599E-05 3
|
||||
|
|
|
|||
20
test/data/explicit-forward-order.inp
Normal file
20
test/data/explicit-forward-order.inp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
ELEMENTS
|
||||
H C AR
|
||||
END
|
||||
|
||||
SPECIES
|
||||
H
|
||||
AR
|
||||
R1A R1B P1
|
||||
END
|
||||
|
||||
REACTIONS
|
||||
|
||||
R1A+R1B=>H+P1 1e12 0.0 20000.0
|
||||
FORD / R1A 1.5 /
|
||||
FORD / R1B 0.5 /
|
||||
|
||||
H+P1=>R1A+R1B 5e13 -2.0 5000.0
|
||||
FORD / P1 0.2 /
|
||||
|
||||
END
|
||||
142
test/data/explicit-forward-order.xml
Normal file
142
test/data/explicit-forward-order.xml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0"?>
|
||||
<ctml>
|
||||
<validate reactions="yes" species="yes"/>
|
||||
|
||||
<!-- phase gas -->
|
||||
<phase dim="3" id="gas">
|
||||
<elementArray datasrc="elements.xml">H C Ar</elementArray>
|
||||
<speciesArray datasrc="#species_data">H AR R1A R1B P1</speciesArray>
|
||||
<reactionArray datasrc="#reaction_data"/>
|
||||
<state>
|
||||
<temperature units="K">300.0</temperature>
|
||||
<pressure units="Pa">101325.0</pressure>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<kinetics model="GasKinetics"/>
|
||||
<transport model="None"/>
|
||||
</phase>
|
||||
|
||||
<!-- species definitions -->
|
||||
<speciesData id="species_data">
|
||||
|
||||
<!-- species H -->
|
||||
<species name="H">
|
||||
<atomArray>H:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.500000000E+00, 7.053328190E-13, -1.995919640E-15, 2.300816320E-18,
|
||||
-9.277323320E-22, 2.547365990E+04, -4.466828530E-01</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
2.500000010E+00, -2.308429730E-11, 1.615619480E-14, -4.735152350E-18,
|
||||
4.981973570E-22, 2.547365990E+04, -4.466829140E-01</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</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>
|
||||
</species>
|
||||
|
||||
<!-- species R1A -->
|
||||
<species name="R1A">
|
||||
<atomArray>H:4 C:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
5.149876130E+00, -1.367097880E-02, 4.918005990E-05, -4.847430260E-08,
|
||||
1.666939560E-11, -1.024664760E+04, -4.641303760E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
7.485149500E-02, 1.339094670E-02, -5.732858090E-06, 1.222925350E-09,
|
||||
-1.018152300E-13, -9.468344590E+03, 1.843731800E+01</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species R1B -->
|
||||
<species name="R1B">
|
||||
<atomArray>H:4 C:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
5.149876130E+00, -1.367097880E-02, 4.918005990E-05, -4.847430260E-08,
|
||||
1.666939560E-11, -1.024664760E+04, -4.641303760E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
7.485149500E-02, 1.339094670E-02, -5.732858090E-06, 1.222925350E-09,
|
||||
-1.018152300E-13, -9.468344590E+03, 1.843731800E+01</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
|
||||
<!-- species P1 -->
|
||||
<species name="P1">
|
||||
<atomArray>H:7 C:2 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="1000.0" Tmin="200.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
5.149876130E+00, -1.367097880E-02, 4.918005990E-05, -4.847430260E-08,
|
||||
1.666939560E-11, -1.024664760E+04, -4.641303760E+00</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500.0" Tmin="1000.0" P0="100000.0">
|
||||
<floatArray name="coeffs" size="7">
|
||||
7.485149500E-02, 1.339094670E-02, -5.732858090E-06, 1.222925350E-09,
|
||||
-1.018152300E-13, -9.468344590E+03, 1.843731800E+01</floatArray>
|
||||
</NASA>
|
||||
</thermo>
|
||||
</species>
|
||||
</speciesData>
|
||||
<reactionData id="reaction_data">
|
||||
|
||||
<!-- reaction 0001 -->
|
||||
<reaction reversible="no" id="0001">
|
||||
<equation>R1A + R1B =] H + P1</equation>
|
||||
<order species="R1B">0.5</order>
|
||||
<order species="R1A">1.5</order>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>1.000000E+09</A>
|
||||
<b>0.0</b>
|
||||
<E units="cal/mol">20000.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>R1B:1 R1A:1.0</reactants>
|
||||
<products>H:1.0 P1:1</products>
|
||||
</reaction>
|
||||
|
||||
<!-- reaction 0002 -->
|
||||
<reaction reversible="no" id="0002">
|
||||
<equation>H + P1 =] R1A + R1B</equation>
|
||||
<order species="H">1.0</order>
|
||||
<order species="P1">0.2</order>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A>1.255943E+13</A>
|
||||
<b>-2.0</b>
|
||||
<E units="cal/mol">5000.000000</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<reactants>H:1.0 P1:1</reactants>
|
||||
<products>R1B:1 R1A:1.0</products>
|
||||
</reaction>
|
||||
</reactionData>
|
||||
</ctml>
|
||||
|
|
@ -143,3 +143,13 @@ class chemkinConverterTest(utilities.CanteraTest):
|
|||
Pstoich = gas.productStoichCoeffs()
|
||||
self.assertEqual(list(Rstoich[:,0]), list(Pstoich[:,1]))
|
||||
self.assertEqual(list(Rstoich[:,1]), list(Pstoich[:,0]))
|
||||
|
||||
def test_explicit_forward_order(self):
|
||||
if os.path.exists('explicit-forward-order.cti'):
|
||||
os.remove('explicit-forward-order.cti')
|
||||
ck2cti.convertMech('../data/explicit-forward-order.inp',
|
||||
thermoFile='../data/dummy-thermo.dat',
|
||||
outName='explicit-forward-order.cti', quiet=True)
|
||||
ref, gas = self.checkConversion('../data/explicit-forward-order.xml',
|
||||
'explicit-forward-order.cti')
|
||||
self.checkKinetics(ref, gas, [300, 800, 1450, 2800], [5e3, 1e5, 2e6])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue