changed the cti file so that the elements of all phases were
ordered the same.
This commit is contained in:
parent
fc320fab8c
commit
c08df3b70a
3 changed files with 33 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ ideal_gas(name = 'gas',
|
||||||
#------------- bulk diamond -------------------------------------
|
#------------- bulk diamond -------------------------------------
|
||||||
|
|
||||||
pure_solid(name = 'diamond',
|
pure_solid(name = 'diamond',
|
||||||
elements = 'C',
|
elements = 'H C',
|
||||||
density = (3.52, 'g/cm3'),
|
density = (3.52, 'g/cm3'),
|
||||||
species = 'C(d)')
|
species = 'C(d)')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<!-- phase diamond -->
|
<!-- phase diamond -->
|
||||||
<phase dim="3" id="diamond">
|
<phase dim="3" id="diamond">
|
||||||
<elementArray datasrc="elements.xml">C</elementArray>
|
<elementArray datasrc="elements.xml">H C</elementArray>
|
||||||
<speciesArray datasrc="#species_data">C(d)</speciesArray>
|
<speciesArray datasrc="#species_data">C(d)</speciesArray>
|
||||||
<thermo model="SolidCompound">
|
<thermo model="SolidCompound">
|
||||||
<density units="g/cm3">3.52</density>
|
<density units="g/cm3">3.52</density>
|
||||||
|
|
|
||||||
31
test_problems/diamondSurf/tdia_a.py
Executable file
31
test_problems/diamondSurf/tdia_a.py
Executable file
|
|
@ -0,0 +1,31 @@
|
||||||
|
from Cantera import *
|
||||||
|
import math
|
||||||
|
|
||||||
|
g, dbulk = importPhases('diamond.cti',['gas','diamond'])
|
||||||
|
|
||||||
|
d = importInterface('diamond.cti','diamond_100',phases = [g, dbulk])
|
||||||
|
ns = d.nSpecies()
|
||||||
|
mw = dbulk.molarMasses()[0]
|
||||||
|
|
||||||
|
t = 1200.0
|
||||||
|
x = g.moleFractions()
|
||||||
|
p = 20.0*OneAtm/760.0
|
||||||
|
g.setState_TPX(t, p, x)
|
||||||
|
ih = g.speciesIndex('H')
|
||||||
|
|
||||||
|
xh0 = x[ih]
|
||||||
|
f = open('d.csv','w')
|
||||||
|
#writeCSV(f, ['H mole Fraction', 'Rate']+d.speciesNames())
|
||||||
|
for n in range(20):
|
||||||
|
x[ih] /= 1.4
|
||||||
|
g.setState_TPX(t, p, x)
|
||||||
|
d.advanceCoverages(10.0)
|
||||||
|
cdot = d.netProductionRates(phase = dbulk)[0]
|
||||||
|
mdot = mw*cdot
|
||||||
|
rate = mdot/dbulk.density()
|
||||||
|
print x[ih], rate*1.0e6*3600.0
|
||||||
|
writeCSV(f,[x[ih],rate]+list(d.coverages()))
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue