mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
*** empty log message ***
This commit is contained in:
parent
03e175c01f
commit
0d00c29e75
@ -22,6 +22,7 @@
|
||||
#include "converters/ck2ctml.h"
|
||||
#include "Storage.h"
|
||||
#include "Cabinet.h"
|
||||
#include "InterfaceKinetics.h"
|
||||
|
||||
#include "clib_defs.h"
|
||||
|
||||
@ -475,10 +476,17 @@ extern "C" {
|
||||
return -10;
|
||||
}
|
||||
|
||||
int DLL_EXPORT th_setElectricPotential(int n, double v) {
|
||||
th(n)->setElectricPotential(v);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//-------------- Kinetics ------------------//
|
||||
|
||||
int DLL_EXPORT newKineticsFromXML(int mxml, int iphase,
|
||||
int neighbor1, int neighbor2) {
|
||||
int neighbor1, int neighbor2, int neighbor3,
|
||||
int neighbor4) {
|
||||
try {
|
||||
XML_Node* x = _xml(mxml);
|
||||
vector<thermo_t*> phases;
|
||||
@ -487,6 +495,12 @@ extern "C" {
|
||||
phases.push_back(th(neighbor1));
|
||||
if (neighbor2 >= 0) {
|
||||
phases.push_back(th(neighbor2));
|
||||
if (neighbor3 >= 0) {
|
||||
phases.push_back(th(neighbor3));
|
||||
if (neighbor4 >= 0) {
|
||||
phases.push_back(th(neighbor4));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Kinetics* kin = newKineticsMgr(*x, phases);
|
||||
@ -648,6 +662,10 @@ extern "C" {
|
||||
return kin(n)->multiplier(i);
|
||||
}
|
||||
|
||||
int DLL_EXPORT kin_phase(int n, int i) {
|
||||
return thermo_index(kin(n)->thermo(i).id());
|
||||
}
|
||||
|
||||
int DLL_EXPORT kin_getEquilibriumConstants(int n, int len, double* kc) {
|
||||
try {
|
||||
Kinetics* k = kin(n);
|
||||
@ -684,6 +702,20 @@ extern "C" {
|
||||
catch (CanteraError) {return -1;}
|
||||
}
|
||||
|
||||
int DLL_EXPORT kin_advanceCoverages(int n, double tstep) {
|
||||
try {
|
||||
Kinetics* k = kin(n);
|
||||
if (k->type() == cInterfaceKinetics) {
|
||||
((InterfaceKinetics*)k)->advanceCoverages(tstep);
|
||||
}
|
||||
else {
|
||||
throw CanteraError("kin_advanceCoverages",
|
||||
"wrong kinetics manager type");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
catch (CanteraError) {return -1;}
|
||||
}
|
||||
|
||||
//------------------- Transport ---------------------------
|
||||
|
||||
|
@ -66,6 +66,7 @@ extern "C" {
|
||||
int DLL_IMPORT th_getEnthalpies_RT(int n, int lenm, double* h_rt);
|
||||
int DLL_IMPORT th_getEntropies_R(int n, int lenm, double* s_r);
|
||||
int DLL_IMPORT th_getCp_R(int n, int lenm, double* cp_r);
|
||||
int DLL_IMPORT th_setElectricPotential(int n, double v);
|
||||
int DLL_IMPORT get_eos(char* fname, char* phase_id);
|
||||
|
||||
int DLL_IMPORT th_set_HP(int n, double* vals);
|
||||
@ -75,7 +76,8 @@ extern "C" {
|
||||
int DLL_IMPORT th_equil(int n, int XY);
|
||||
|
||||
int DLL_IMPORT newKineticsFromXML(int mxml, int iphase,
|
||||
int neighbor1=-1, int neighbor2=-1);
|
||||
int neighbor1=-1, int neighbor2=-1, int neighbor3=-1,
|
||||
int neighbor4=-1);
|
||||
int DLL_IMPORT installRxnArrays(int pxml, int ikin,
|
||||
char* default_phase);
|
||||
int DLL_IMPORT kin_nSpecies(int n);
|
||||
@ -99,6 +101,8 @@ extern "C" {
|
||||
int DLL_IMPORT kin_type(int n);
|
||||
int DLL_IMPORT kin_start(int n, int p);
|
||||
int DLL_IMPORT kin_speciesIndex(int n, const char* nm, const char* ph);
|
||||
int DLL_IMPORT kin_advanceCoverages(int n, double tstep);
|
||||
int DLL_IMPORT kin_phase(int n, int i);
|
||||
|
||||
int DLL_IMPORT newTransport(char* model,
|
||||
int th, int loglevel);
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Cantera includes
|
||||
#include "SurfPhase.h"
|
||||
#include "InterfaceKinetics.h"
|
||||
#include "ImplicitSurfChem.h"
|
||||
|
||||
#include "Cabinet.h"
|
||||
#include "Storage.h"
|
||||
|
@ -93,6 +93,16 @@ extern "C" {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DLL_EXPORT xml_addComment(int i, const char* comment) {
|
||||
try {
|
||||
string c = string(comment);
|
||||
XML_Node& node = *_xml(i);
|
||||
node.addComment(c);
|
||||
}
|
||||
catch (CanteraError) { return -1; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DLL_EXPORT xml_tag(int i, char* tag) {
|
||||
try {
|
||||
XML_Node& node = *_xml(i);
|
||||
|
@ -12,6 +12,7 @@ extern "C" {
|
||||
int DLL_IMPORT xml_build(int i, const char* file);
|
||||
int DLL_IMPORT xml_attrib(int i, const char* key, char* value);
|
||||
int DLL_IMPORT xml_addAttrib(int i, const char* key, const char* value);
|
||||
int DLL_IMPORT xml_addComment(int i, const char* comment);
|
||||
int DLL_IMPORT xml_value(int i, char* value);
|
||||
int DLL_IMPORT xml_tag(int i, char* tag);
|
||||
int DLL_IMPORT xml_child(int i, const char* loc);
|
||||
|
@ -13,10 +13,15 @@ else
|
||||
end
|
||||
|
||||
pr = zeros(31,31);
|
||||
xh2 = zeros(31,31);
|
||||
visc = zeros(31,31);
|
||||
lambda = zeros(31,31);
|
||||
t = [];
|
||||
xo2 = [];
|
||||
io2 = speciesIndex(gas,'O2');
|
||||
ih2 = speciesIndex(gas,'H2');
|
||||
ih = speciesIndex(gas,'H');
|
||||
ih2o = speciesIndex(gas,'H2O');
|
||||
|
||||
atm = oneatm;
|
||||
t0 = cputime;
|
||||
@ -29,9 +34,11 @@ for i = 1:31
|
||||
x(ih2) = 1.0 - xo2(j);
|
||||
set(gas,'T',t(i),'P',oneatm,'X',x);
|
||||
equilibrate(gas,'TP');
|
||||
pr(i,j) = viscosity(gas)*cp_mass(gas)/ ...
|
||||
thermalConductivity(gas);
|
||||
|
||||
visc(i,j) = viscosity(gas);
|
||||
lambda(i,j) = thermalConductivity(gas);
|
||||
pr(i,j) = visc(i,j)*cp_mass(gas)/lambda(i,j);
|
||||
x = moleFractions(gas);
|
||||
xh2(i,j) = x(ih2);
|
||||
end
|
||||
end
|
||||
disp(['CPU time = ' num2str(cputime - t0)]);
|
||||
@ -39,8 +46,27 @@ disp(['CPU time = ' num2str(cputime - t0)]);
|
||||
% plot results
|
||||
|
||||
figure(1);
|
||||
subplot(2,2,1);
|
||||
surf(xo2,t,pr);
|
||||
xlabel('Elemental O/(O+H)');
|
||||
ylabel('Temperature (K)');
|
||||
zlabel('Prandtl Number');
|
||||
|
||||
subplot(2,2,2);
|
||||
surf(xo2,t,xh2);
|
||||
xlabel('Elemental O/(O+H)');
|
||||
ylabel('Temperature (K)');
|
||||
zlabel('H_2 Mole Fraction');
|
||||
|
||||
subplot(2,2,3);
|
||||
surf(xo2,t,visc);
|
||||
xlabel('Elemental O/(O+H)');
|
||||
ylabel('Temperature (K)');
|
||||
zlabel('Viscosity');
|
||||
|
||||
subplot(2,2,4);
|
||||
surf(xo2,t,lambda);
|
||||
xlabel('Elemental O/(O+H)');
|
||||
ylabel('Temperature (K)');
|
||||
zlabel('Thermal Conductivity');
|
||||
|
||||
|
@ -22,17 +22,22 @@ class Interface(SurfacePhase, Kinetics):
|
||||
|
||||
fn = string.split(src,'#')
|
||||
fn = fn[0]
|
||||
id = ""
|
||||
if len(fn) > 1: id = fn[1]
|
||||
fname = os.path.basename(fn)
|
||||
ff = os.path.splitext(fname)
|
||||
|
||||
# get the 'phase' element
|
||||
s = XML.find_XML(src=src, root=root, name="phase")
|
||||
if id:
|
||||
s = XML.find_XML(src=src, root=root, id=id)
|
||||
else:
|
||||
s = XML.find_XML(src=src, root=root, name="phase")
|
||||
|
||||
# get the equation of state model
|
||||
SurfacePhase.__init__(self, xml_phase=s)
|
||||
|
||||
# get the kinetics model
|
||||
Kinetics.__init__(self, xml_phase=s, phases=[self]+phases)
|
||||
Kinetics.__init__(self, xml_phase=s, phases=phases+[self])
|
||||
|
||||
|
||||
def __del__(self):
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
from Cantera.exceptions import CanteraError
|
||||
from Cantera.exceptions import CanteraError, getCanteraError
|
||||
from Cantera.ThermoPhase import ThermoPhase
|
||||
from Cantera.XML import XML_Node
|
||||
import Numeric
|
||||
@ -47,23 +47,45 @@ class Kinetics:
|
||||
the specification of the parameters.
|
||||
"""
|
||||
np = len(phases)
|
||||
self._np = np
|
||||
self._ph = {}
|
||||
self._sp = []
|
||||
for p in phases:
|
||||
self._ph[p.thermophase()] = p
|
||||
self._phnum = {}
|
||||
|
||||
self._end = [0]
|
||||
p0 = phases[0].thermophase()
|
||||
self._ph[phases[0]] = 0
|
||||
self._end.append(phases[0].nSpecies())
|
||||
#self._ph[phases[0]] = phases
|
||||
#self._end.append(phases[0].nSpecies())
|
||||
p1 = -1
|
||||
p2 = -1
|
||||
p3 = -1
|
||||
p4 = -1
|
||||
if np >= 2:
|
||||
p1 = phases[1].thermophase()
|
||||
self._ph[phases[1]] = 1
|
||||
self._end.append(self._end[-1] + phases[1].nSpecies())
|
||||
if np >= 3:
|
||||
p2 = phases[2].thermophase()
|
||||
self._ph[phases[2]] = 2
|
||||
self._end.append(self._end[-1] + phases[2].nSpecies())
|
||||
if np >= 4:
|
||||
p3 = phases[3].thermophase()
|
||||
if np >= 5:
|
||||
p4 = phases[4].thermophase()
|
||||
if np >= 6:
|
||||
raise CanteraError("only 4 neighbor phases allowed")
|
||||
#try:
|
||||
self.ckin = _cantera.KineticsFromXML(xml_phase,
|
||||
p0, p1, p2)
|
||||
p0, p1, p2, p3, p4)
|
||||
|
||||
for nn in range(self._np):
|
||||
p = self.phase(nn)
|
||||
self._phnum[p] = nn
|
||||
self._end.append(self._end[-1]+p.nSpecies())
|
||||
for k in range(p.nSpecies()):
|
||||
self._sp.append(p.speciesName(k))
|
||||
|
||||
#except:
|
||||
# print getCanteraError()
|
||||
# self.ckin = 0
|
||||
self.phases = phases
|
||||
|
||||
|
||||
@ -85,6 +107,9 @@ class Kinetics:
|
||||
|
||||
def kineticsStart(self, n):
|
||||
return _cantera.kin_start(self.ckin, n)
|
||||
|
||||
def phase(self, n):
|
||||
return self._ph[_cantera.kin_phase(self.ckin, n)]
|
||||
|
||||
def nReactions(self):
|
||||
"""Number of reactions."""
|
||||
@ -101,18 +126,41 @@ class Kinetics:
|
||||
"""Type of reaction 'i'"""
|
||||
return _cantera.kin_rxntype(self.ckin,i)
|
||||
|
||||
def reactionString(self,i):
|
||||
return _cantera.kin_getstring(self.ckin,1,i)
|
||||
#def reactionString(self,i):
|
||||
# return _cantera.kin_getstring(self.ckin,1,i)
|
||||
|
||||
def reactionEqn(self,i):
|
||||
try:
|
||||
eqs = []
|
||||
for rxn in i:
|
||||
eqs.append(_cantera.kin_getstring(self.ckin,1,rxn))
|
||||
eqs.append(self.reactionString(rxn))
|
||||
return eqs
|
||||
except:
|
||||
return _cantera.kin_getstring(self.ckin,1,i)
|
||||
return self.reactionString(i)
|
||||
|
||||
def reactionString(self, i):
|
||||
s = ''
|
||||
nsp = _cantera.kin_nspecies(self.ckin)
|
||||
for k in range(nsp):
|
||||
nur = _cantera.kin_rstoichcoeff(self.ckin,k,i)
|
||||
if nur <> 0.0:
|
||||
if nur <> 1.0:
|
||||
s += `int(nur)`+' '
|
||||
s += self._sp[k]+' + '
|
||||
s = s[:-2]
|
||||
if self.isReversible(i):
|
||||
s += ' <=> '
|
||||
else:
|
||||
s += ' => '
|
||||
for k in range(nsp):
|
||||
nup = _cantera.kin_pstoichcoeff(self.ckin,k,i)
|
||||
if nup <> 0.0:
|
||||
if nup <> 1.0:
|
||||
s += `int(nup)`+' '
|
||||
s += self._sp[k]+' + '
|
||||
s = s[:-2]
|
||||
return s
|
||||
|
||||
def reactantStoichCoeff(self,k,i):
|
||||
return _cantera.kin_rstoichcoeff(self.ckin,k,i)
|
||||
|
||||
@ -152,22 +200,38 @@ class Kinetics:
|
||||
def creationRates(self, phase = None):
|
||||
c = _cantera.kin_getarray(self.ckin,50)
|
||||
if phase:
|
||||
if self._ph.has_key(phase):
|
||||
n = self._ph[phase]
|
||||
if self._phnum.has_key(phase):
|
||||
n = self._phnum[phase]
|
||||
return c[self._end[n]:self._end[n+1]]
|
||||
else:
|
||||
raise CanteraError('unknown phase')
|
||||
else:
|
||||
return c
|
||||
|
||||
return c
|
||||
|
||||
|
||||
def destructionRates(self):
|
||||
return _cantera.kin_getarray(self.ckin,60)
|
||||
def destructionRates(self, phase = None):
|
||||
d = _cantera.kin_getarray(self.ckin,60)
|
||||
if phase:
|
||||
if self._phnum.has_key(phase):
|
||||
n = self._phnum[phase]
|
||||
return d[self._end[n]:self._end[n+1]]
|
||||
else:
|
||||
raise CanteraError('unknown phase')
|
||||
else:
|
||||
return d
|
||||
|
||||
|
||||
def netProductionRates(self):
|
||||
return _cantera.kin_getarray(self.ckin,70)
|
||||
|
||||
def netProductionRates(self, phase = None):
|
||||
w = _cantera.kin_getarray(self.ckin,70)
|
||||
if phase:
|
||||
if self._phnum.has_key(phase):
|
||||
n = self._phnum[phase]
|
||||
return w[self._end[n]:self._end[n+1]]
|
||||
else:
|
||||
raise CanteraError('unknown phase')
|
||||
else:
|
||||
return w
|
||||
|
||||
def sourceTerms(self):
|
||||
return _cantera.kin_getarray(self.ckin,80)
|
||||
|
||||
@ -177,7 +241,8 @@ class Kinetics:
|
||||
def setMultiplier(self,i,v):
|
||||
return _cantera.kin_setMultiplier(self.ckin,i,v)
|
||||
|
||||
|
||||
def advanceCoverages(self,dt):
|
||||
return _cantera.kin_advanceCoverages(self.ckin,dt)
|
||||
|
||||
|
||||
|
||||
|
@ -237,6 +237,9 @@ class ThermoPhase(Phase):
|
||||
energy and the pressure."""
|
||||
_cantera.thermo_setfp(self._phase_id, 5, s, p)
|
||||
|
||||
def setElectricPotential(self, v):
|
||||
_cantera.thermo_setfp(self._phase_id, 6, v, 0);
|
||||
|
||||
def equilibrate(self, XY):
|
||||
"""Set to a state of chemical equilibrium holding property pair
|
||||
'XY' constant. The pair is specified by a two-letter string,
|
||||
|
@ -82,6 +82,9 @@ class XML_Node:
|
||||
|
||||
def addAttrib(self, key, value):
|
||||
_cantera.xml_addAttrib(self._xml_id, key, value)
|
||||
|
||||
def addComment(self, comment):
|
||||
_cantera.xml_addComment(self._xml_id, comment)
|
||||
|
||||
def value(self, loc=""):
|
||||
if loc:
|
||||
|
@ -7,6 +7,8 @@ from constants import *
|
||||
from gases import *
|
||||
from exceptions import *
|
||||
from set import set
|
||||
from importFromFile import *
|
||||
|
||||
#from _version import __createdate__
|
||||
|
||||
try:
|
||||
|
941
Cantera/python/Cantera/ctml_writer.py
Normal file
941
Cantera/python/Cantera/ctml_writer.py
Normal file
@ -0,0 +1,941 @@
|
||||
#
|
||||
# Cantera input file processor
|
||||
#
|
||||
|
||||
from Cantera import GasConstant
|
||||
from Cantera.XML import XML_Node
|
||||
import types, math
|
||||
|
||||
SPECIES = 10
|
||||
SPECIES_SET = 20
|
||||
COLLECTION = 30
|
||||
THERMO = 40
|
||||
|
||||
ALL = 10
|
||||
SKIP_UNDECLARED_ELEMENTS = 20
|
||||
SKIP_UNDECLARED_SPECIES = 30
|
||||
STOP = 0
|
||||
|
||||
# default units
|
||||
_ulen = 'm'
|
||||
_umol = 'kmol'
|
||||
_umass = 'kg'
|
||||
_utime = 's'
|
||||
_ue = 'J/kmol'
|
||||
|
||||
# default std state pressure
|
||||
_pref = 1.0e5 # 1 bar
|
||||
|
||||
_name = 'noname'
|
||||
|
||||
_species = []
|
||||
_phases = []
|
||||
_reactions = []
|
||||
_atw = {}
|
||||
_mw = {}
|
||||
|
||||
def isnum(a):
|
||||
if type(a) == types.IntType or type(a) == types.FloatType:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
def dataset(nm):
|
||||
global _name
|
||||
_name = nm
|
||||
|
||||
def standard_pressure(p0):
|
||||
"""Set the default standard-state pressure."""
|
||||
global _pref
|
||||
_pref = p0
|
||||
|
||||
def get_atomic_wts():
|
||||
global _atw
|
||||
edb = XML_Node('edb', src = 'elements.xml')
|
||||
edata = edb.child('ctml/elementData')
|
||||
e = edata.children()
|
||||
for el in e:
|
||||
_atw[el['name']] = el['atomicWt']
|
||||
if el['atomicWt'] == '':
|
||||
print 'no wt for ',el['name']
|
||||
|
||||
def units(length = '', quantity = '', mass = '', time = '', act_energy = ''):
|
||||
global _ulen, _umol, _ue
|
||||
if length: _ulen = length
|
||||
if quantity: _umol = quantity
|
||||
if act_energy: _ue = act_energy
|
||||
if time: _utime = time
|
||||
if mass: _umass = mass
|
||||
|
||||
def ufmt(base, n):
|
||||
if n == 0: return ''
|
||||
if n == 1: return '-'+base
|
||||
if n == -1: return '/'+base
|
||||
if n > 0: return '-'+base+`n`
|
||||
if n < 0: return '/'+base+`-n`
|
||||
|
||||
def write():
|
||||
x = XML_Node("ctml")
|
||||
for ph in _phases:
|
||||
ph.build(x)
|
||||
s = species_set(name = _name, species = _species)
|
||||
s.build(x)
|
||||
|
||||
r = x.addChild('reactionData')
|
||||
r['id'] = 'reaction_data'
|
||||
for rx in _reactions:
|
||||
rx.build(r)
|
||||
|
||||
if _name <> 'noname':
|
||||
x.write(_name+'.xml')
|
||||
else:
|
||||
print x
|
||||
|
||||
def addFloat(x, nm, val, fmt=''):
|
||||
u = ''
|
||||
s = ''
|
||||
if isnum(val):
|
||||
fval = float(val)
|
||||
if fmt:
|
||||
s = fmt % fval
|
||||
else:
|
||||
s = `fval`
|
||||
x.addChild(nm, s)
|
||||
else:
|
||||
v = val[0]
|
||||
u = val[1]
|
||||
if fmt:
|
||||
s = fmt % v
|
||||
else:
|
||||
s = `v`
|
||||
xc = x.addChild(nm, s)
|
||||
xc['units'] = u
|
||||
|
||||
def getAtomicComp(atoms):
|
||||
if type(atoms) == types.DictType: return atoms
|
||||
a = atoms.replace(',',' ')
|
||||
toks = a.split()
|
||||
d = {}
|
||||
for t in toks:
|
||||
b = t.split(':')
|
||||
d[b[0]] = int(b[1])
|
||||
return d
|
||||
|
||||
def getEfficiencies(e):
|
||||
if type(e) == types.DictType: return e
|
||||
a = atoms.replace(',',' ')
|
||||
toks = a.split()
|
||||
d = {}
|
||||
for t in toks:
|
||||
b = t.split(':')
|
||||
d[b[0]] = int(b[1])
|
||||
return d
|
||||
|
||||
def getReactionSpecies(s):
|
||||
toks = s.replace(' + ',' ').split()
|
||||
d = {}
|
||||
n = 1
|
||||
for t in toks:
|
||||
if t > '0' and t < '9':
|
||||
n = int(t)
|
||||
else:
|
||||
if d.has_key(t):
|
||||
d[t] += n
|
||||
else:
|
||||
d[t] = n
|
||||
n = 1
|
||||
return d
|
||||
|
||||
class writer:
|
||||
def write_ctml(self, file = ''):
|
||||
x = XML_Node("ctml")
|
||||
self.build(x)
|
||||
if file:
|
||||
x.write(file)
|
||||
else:
|
||||
print x
|
||||
|
||||
class collection(writer):
|
||||
def __init__(self, s):
|
||||
self._s = s
|
||||
self.type = COLLECTION
|
||||
def build(self, p):
|
||||
for s in self._s:
|
||||
s.build(p)
|
||||
|
||||
class species_set(writer):
|
||||
def __init__(self, name = '', species = []):
|
||||
self._s = species
|
||||
self._name = name
|
||||
self.type = SPECIES_SET
|
||||
|
||||
def build(self, p):
|
||||
p.addComment(' species definitions ')
|
||||
sd = p.addChild("speciesData")
|
||||
sd.addAttrib("id","species_data")
|
||||
for s in self._s:
|
||||
if s.type == SPECIES:
|
||||
s.build(sd)
|
||||
else:
|
||||
raise 'wrong object type in species_set: '+s.__class__
|
||||
|
||||
|
||||
class species(writer):
|
||||
"""A species."""
|
||||
|
||||
def __init__(self,
|
||||
name = 'missing name!',
|
||||
atoms = 'missing atoms!',
|
||||
comment = '',
|
||||
thermo = None,
|
||||
transport = None,
|
||||
charge = -999):
|
||||
self._name = name
|
||||
self._atoms = getAtomicComp(atoms)
|
||||
mw = 0.0
|
||||
for a in self._atoms.keys():
|
||||
mw += self._atoms[a]*float(_atw[a])
|
||||
self._mw = mw
|
||||
global _mw
|
||||
_mw[name] = mw
|
||||
self._comment = comment
|
||||
self._thermo = thermo
|
||||
self._transport = transport
|
||||
chrg = 0
|
||||
self._charge = charge
|
||||
if self._atoms.has_key('E'):
|
||||
chrg = -self._atoms['E']
|
||||
if self._charge <> -999:
|
||||
if self._charge <> chrg:
|
||||
raise 'specified charge inconsistent with number of electrons'
|
||||
else:
|
||||
self._charge = chrg
|
||||
self.type = SPECIES
|
||||
|
||||
global _species
|
||||
_species.append(self)
|
||||
|
||||
|
||||
def build(self, p):
|
||||
#phname = ''
|
||||
#for ph in _phases:
|
||||
# if ph.has_species(self._name):
|
||||
# phname = ph._name
|
||||
hdr = ' species '+self._name+' '
|
||||
p.addComment(hdr)
|
||||
s = p.addChild("species")
|
||||
s.addAttrib("name",self._name)
|
||||
a = ''
|
||||
for e in self._atoms.keys():
|
||||
a += e+':'+`self._atoms[e]`+' '
|
||||
s.addChild("atomArray",a)
|
||||
if self._comment:
|
||||
s.addChild("note",self._comment)
|
||||
if self._charge <> -999:
|
||||
s.addChild("charge",self._charge)
|
||||
if self._thermo:
|
||||
t = s.addChild("thermo")
|
||||
if type(self._thermo) == types.InstanceType:
|
||||
self._thermo.build(t)
|
||||
else:
|
||||
nt = len(self._thermo)
|
||||
for n in range(nt):
|
||||
self._thermo[n].build(t)
|
||||
if self._transport:
|
||||
t = s.addChild("transport")
|
||||
if type(self._transport) == types.InstanceType:
|
||||
self._transport.build(t)
|
||||
else:
|
||||
nt = len(self._transport)
|
||||
for n in range(nt):
|
||||
self._transport[n].build(t)
|
||||
|
||||
class thermo(writer):
|
||||
"""Base class for species standard-state thermodynamic properties."""
|
||||
def _build(self, p):
|
||||
return p.addChild("thermo")
|
||||
|
||||
|
||||
class NASA(thermo):
|
||||
"""NASA polynomial parameterization."""
|
||||
|
||||
def __init__(self, range = (0.0, 0.0),
|
||||
coeffs = [], p0 = -1.0):
|
||||
self._t = range
|
||||
self._pref = p0
|
||||
if len(coeffs) <> 7:
|
||||
raise 'NASA coefficient list must have length = 7'
|
||||
self._coeffs = coeffs
|
||||
|
||||
|
||||
def build(self, t):
|
||||
n = t.addChild("NASA")
|
||||
n['Tmin'] = `self._t[0]`
|
||||
#n['Tmid'] = `self._t[1]`
|
||||
n['Tmax'] = `self._t[1]`
|
||||
if self._pref <= 0.0:
|
||||
n['P0'] = `_pref`
|
||||
else:
|
||||
n['P0'] = `self._pref`
|
||||
str = ''
|
||||
for i in range(7):
|
||||
str += '%17.9E, ' % self._coeffs[i]
|
||||
if i > 0 and 3*((i+1)/3) == i: str += '\n'
|
||||
str = str[:-2]
|
||||
u = n.addChild("floatArray", str)
|
||||
u["size"] = "7"
|
||||
u["name"] = "coeffs"
|
||||
|
||||
|
||||
class const_cp(thermo):
|
||||
"""Constant specific heat."""
|
||||
|
||||
def __init__(self, tmax = -1.0, tmin = -1.0,
|
||||
t0 = 0.0, cp0 = 0.0, h0 = 0.0, s0 = 0.0):
|
||||
self._t = [tmin, tmax]
|
||||
self._c = [t0, h0, s0, cp0]
|
||||
|
||||
def build(self, t):
|
||||
#t = self._build(p)
|
||||
c = t.addChild('const_cp')
|
||||
if self._t[0] >= 0.0: c['Tmin'] = self._t[0]
|
||||
if self._t[1] >= 0.0: c['Tmax'] = self._t[1]
|
||||
addFloat(c,'t0',self._c[0])
|
||||
addFloat(c,'h0',self._c[1])
|
||||
addFloat(c,'s0',self._c[2])
|
||||
addFloat(c,'cp0',self._c[3])
|
||||
|
||||
|
||||
class gas_transport:
|
||||
"""Transport coefficients for ideal gas transport model."""
|
||||
|
||||
def __init__(self, geom = 'nonlin',
|
||||
diam = 0.0, well_depth = 0.0, dipole = 0.0,
|
||||
polar = 0.0, rot_relax = 0.0):
|
||||
self._geom = geom
|
||||
self._diam = diam
|
||||
self._well_depth = well_depth
|
||||
self._dipole = dipole
|
||||
self._polar = polar
|
||||
self._rot_relax = rot_relax
|
||||
|
||||
def build(self, t):
|
||||
#t = s.addChild("transport")
|
||||
t['model'] = 'gas_transport'
|
||||
# t.addChild("geometry", self._geom)
|
||||
tg = t.addChild('string',self._geom)
|
||||
tg['title'] = 'geometry'
|
||||
addFloat(t, "LJ_welldepth", (self._well_depth, 'K'), '%8.3f')
|
||||
addFloat(t, "LJ_diameter", (self._diam, 'A'),'%8.3f')
|
||||
addFloat(t, "dipoleMoment", (self._dipole, 'Debye'),'%8.3f')
|
||||
addFloat(t, "polarizability", (self._polar, 'A3'),'%8.3f')
|
||||
addFloat(t, "rotRelax", self._rot_relax,'%8.3f')
|
||||
|
||||
class Arrhenius(writer):
|
||||
def __init__(self,
|
||||
A = 0.0,
|
||||
n = 0.0,
|
||||
E = 0.0):
|
||||
self._c = [A, n, E]
|
||||
|
||||
def build(self, p, units = '', name = ''):
|
||||
a = p.addChild('Arrhenius')
|
||||
if name: a['name'] = name
|
||||
if isnum(self._c[0]):
|
||||
addFloat(a,'A', (self._c[0], units), fmt = '%14.6E')
|
||||
else:
|
||||
addFloat(a,'A',self._c[0], fmt = '%14.6E')
|
||||
a.addChild('b',`self._c[1]`)
|
||||
if isnum(self._c[2]):
|
||||
addFloat(a,'E',(self._c[2],_ue), fmt = '%f')
|
||||
else:
|
||||
addFloat(a,'E',self._c[2], fmt = '%f')
|
||||
|
||||
|
||||
class sticking_prob(writer):
|
||||
def __init__(self,
|
||||
A = 0.0,
|
||||
n = 0.0,
|
||||
E = 0.0,
|
||||
species = ''):
|
||||
self._c = [A, n, E]
|
||||
self._sp = species
|
||||
|
||||
def build(self, p):
|
||||
ig = ideal_gas()
|
||||
for ph in _phases:
|
||||
if ph.has_species(self._sp):
|
||||
if ph._eos.__class__ == ig.__class__:
|
||||
pass
|
||||
else:
|
||||
raise ('sticking probabilities only implemented for '
|
||||
+'species in ideal gas mixtures')
|
||||
|
||||
a = p.addChild('Stick')
|
||||
addFloat(a,'A',self._c[0],fmt = '%14.6E')
|
||||
a.addChild('n',`self._c[1]`)
|
||||
if type(self._c[2]) == types.FloatType:
|
||||
addFloat(a,'E',(self._c[2],_ue))
|
||||
else:
|
||||
addFloat(a,'E',self._c[2])
|
||||
|
||||
|
||||
class reaction(writer):
|
||||
def __init__(self,
|
||||
equation = '',
|
||||
rate_coeff = None,
|
||||
k_0 = None,
|
||||
k_inf = None,
|
||||
efficiencies = '',
|
||||
falloff = None,
|
||||
id = ''
|
||||
):
|
||||
|
||||
self._id = id
|
||||
self._e = equation
|
||||
self._falloff = falloff
|
||||
global _reactions
|
||||
self._num = len(_reactions)+1
|
||||
r = ''
|
||||
p = ''
|
||||
for e in ['<=>', '=>', '=']:
|
||||
if self._e.find(e) >= 0:
|
||||
r, p = self._e.split(e)
|
||||
if e in ['<=>','=']: self.rev = 1
|
||||
else: self.rev = 0
|
||||
break
|
||||
self._r = getReactionSpecies(r)
|
||||
self._p = getReactionSpecies(p)
|
||||
self._kf = rate_coeff
|
||||
self._kf0 = k_0
|
||||
self._kfinf = k_inf
|
||||
self._type = ''
|
||||
self._effm = -1.0
|
||||
self._eff = efficiencies
|
||||
_reactions.append(self)
|
||||
|
||||
|
||||
def build(self, p):
|
||||
if self._id:
|
||||
id = self._id
|
||||
else:
|
||||
id = 'reaction_'+`self._num`
|
||||
p.addComment(" reaction "+id+" ")
|
||||
r = p.addChild('reaction')
|
||||
r['id'] = id
|
||||
if self.rev:
|
||||
r['reversible'] = 'yes'
|
||||
else:
|
||||
r['reversible'] = 'no'
|
||||
|
||||
ee = self._e.replace('<','[')
|
||||
ee = ee.replace('>',']')
|
||||
r.addChild('equation',ee)
|
||||
|
||||
mdim = 0
|
||||
ldim = 0
|
||||
str = ''
|
||||
|
||||
if self._r.has_key('(+'):
|
||||
self._type = 'falloff'
|
||||
if not self._falloff:
|
||||
self._falloff = Lindemann()
|
||||
if self._r.has_key('M)'):
|
||||
self._effm = 1.0
|
||||
del self._r['M)']
|
||||
del self._p['M)']
|
||||
else:
|
||||
for f in self._r.keys():
|
||||
if f[-1] == ')' and f.find('(') < 0:
|
||||
self._effm = 0.0
|
||||
self._eff = f[:-1]+':1.0'
|
||||
del self._r[f]
|
||||
del self._p[f]
|
||||
|
||||
del self._r['(+']
|
||||
del self._p['(+']
|
||||
|
||||
for s in self._r.keys():
|
||||
ns = self._r[s]
|
||||
nm = -999
|
||||
nl = -999
|
||||
if s == 'M' or s == 'm':
|
||||
self._type = 'threeBody'
|
||||
mdim += 1
|
||||
ldim -= 3
|
||||
self._effm = 1.0
|
||||
else:
|
||||
str += s+':'+`ns`+' '
|
||||
|
||||
for ph in _phases:
|
||||
if ph.has_species(s):
|
||||
nm, nl = ph.conc_dim()
|
||||
break
|
||||
if nm < 0:
|
||||
print self._r
|
||||
raise 'undeclared species '+s
|
||||
else:
|
||||
mdim += nm*ns
|
||||
ldim += nl*ns
|
||||
|
||||
# adjust the moles and length powers based on the dimensions of
|
||||
# the rate of progress (moles/length^2 or moles/length^3)
|
||||
if self._type == 'surface':
|
||||
mdim += -1
|
||||
ldim += 2
|
||||
else:
|
||||
mdim += -1
|
||||
ldim += 3
|
||||
|
||||
if self._type == 'falloff':
|
||||
self._kf = (self._kfinf, self._kf0)
|
||||
else:
|
||||
self._kf = (self._kf,)
|
||||
|
||||
# add the reaction type as an attribute if it has been specified.
|
||||
if self._type:
|
||||
r['type'] = self._type
|
||||
|
||||
# The default rate coefficient type is Arrhenius. If the rate
|
||||
# coefficient has been specified as a sequence of three
|
||||
# numbers, then create a new Arrhenius instance for it;
|
||||
# otherwise, just use the supplied instance.
|
||||
nm = ''
|
||||
kfnode = r.addChild('rateCoeff')
|
||||
|
||||
for kf in self._kf:
|
||||
|
||||
# compute the pre-exponential units string, and if it begins with a
|
||||
# dash, remove it.
|
||||
ku = ufmt(_ulen,-ldim) + ufmt(_umol,-mdim) + ufmt('s',-1)
|
||||
if ku[0] == '-': ku = ku[1:]
|
||||
mdim += 1
|
||||
ldim -= 3
|
||||
|
||||
if type(kf) == types.InstanceType:
|
||||
k = kf
|
||||
else:
|
||||
k = Arrhenius(A = kf[0], n = kf[1], E = kf[2])
|
||||
k.build(kfnode, units = ku, name = nm)
|
||||
nm = 'k0'
|
||||
|
||||
if self._eff and self._effm >= 0.0:
|
||||
eff = kfnode.addChild('efficiencies',self._eff)
|
||||
eff['default'] = `self._effm`
|
||||
|
||||
str = str[:-1]
|
||||
r.addChild('reactants',str)
|
||||
str = ''
|
||||
for s in self._p.keys():
|
||||
ns = self._p[s]
|
||||
if s == 'M' or s == 'm':
|
||||
pass
|
||||
else:
|
||||
str += s+':'+`ns`+' '
|
||||
str = str[:-1]
|
||||
r.addChild('products',str)
|
||||
|
||||
if self._falloff:
|
||||
self._falloff.build(kfnode)
|
||||
|
||||
|
||||
|
||||
#-------------------
|
||||
|
||||
|
||||
class falloff_reaction(writer):
|
||||
def __init__(self,
|
||||
equation = '',
|
||||
k_0 = None,
|
||||
k_inf = None,
|
||||
efficiencies = '',
|
||||
falloff = None,
|
||||
id = ''
|
||||
):
|
||||
|
||||
if self._falloff:
|
||||
self._falloff = falloff
|
||||
else:
|
||||
self._falloff = Lindemann()
|
||||
self._num = len(_reactions)+1
|
||||
self._type = 'falloff'
|
||||
self._effm = 1.0
|
||||
self._eff = efficiencies
|
||||
kf = (kfinf, kf0)
|
||||
reaction.__init__(self, equation, kf, id)
|
||||
|
||||
|
||||
|
||||
def build(self, p):
|
||||
r = reaction.build(self, p)
|
||||
if self._r.has_key('M)'):
|
||||
self._effm = 1.0
|
||||
del self._r['M)']
|
||||
del self._p['M)']
|
||||
else:
|
||||
for f in self._r.keys():
|
||||
if f[-1] == ')' and f.find('(') < 0:
|
||||
self._effm = 0.0
|
||||
self._eff = f[:-1]+':1.0'
|
||||
del self._r[f]
|
||||
del self._p[f]
|
||||
|
||||
del self._r['(+']
|
||||
del self._p['(+']
|
||||
|
||||
|
||||
r['type'] = 'falloff'
|
||||
|
||||
# The default rate coefficient type is Arrhenius. If the rate
|
||||
# coefficient has been specified as a sequence of three
|
||||
# numbers, then create a new Arrhenius instance for it;
|
||||
# otherwise, just use the supplied instance.
|
||||
nm = ''
|
||||
kfnode = r.addChild('rateCoeff')
|
||||
|
||||
if self._eff and self._effm >= 0.0:
|
||||
eff = kfnode.addChild('efficiencies',self._eff)
|
||||
eff['default'] = `self._effm`
|
||||
|
||||
if self._falloff:
|
||||
self._falloff.build(kfnode)
|
||||
|
||||
|
||||
#--------------
|
||||
|
||||
|
||||
class state:
|
||||
def __init__(self,
|
||||
temperature = None,
|
||||
pressure = None,
|
||||
moleFractions = None,
|
||||
massFractions = None,
|
||||
density = None,
|
||||
coverages = None):
|
||||
self._t = temperature
|
||||
self._p = pressure
|
||||
self._rho = density
|
||||
self._x = moleFractions
|
||||
self._y = massFractions
|
||||
self._c = coverages
|
||||
|
||||
def build(self, ph):
|
||||
st = ph.addChild('state')
|
||||
if self._t: addFloat(st, 'temperature', self._t)
|
||||
if self._p: addFloat(st, 'pressure', self._p)
|
||||
if self._rho: addFloat(st, 'density', self._rho)
|
||||
if self._x: st.addChild('moleFractions', self._x)
|
||||
if self._y: st.addChild('massFractions', self._y)
|
||||
if self._c: st.addChild('moleFractions', self._c)
|
||||
|
||||
|
||||
class phase(writer):
|
||||
"""Base class for phases of matter."""
|
||||
|
||||
def __init__(self,
|
||||
name = '',
|
||||
dim = 3,
|
||||
elements = '',
|
||||
species = '',
|
||||
reactions = 'none',
|
||||
initial_state = None):
|
||||
|
||||
self._name = name
|
||||
self._dim = dim
|
||||
self._el = elements
|
||||
self._sp = []
|
||||
self._rx = []
|
||||
|
||||
#--------------------------------
|
||||
# process species
|
||||
#--------------------------------
|
||||
|
||||
# if a single string is entered, make it a list
|
||||
if type(species) == types.StringType:
|
||||
self._species = [species]
|
||||
else:
|
||||
self._species = species
|
||||
|
||||
self._skip = 0
|
||||
|
||||
# dictionary of species names
|
||||
self._spmap = {}
|
||||
|
||||
# for each species string, check whether or not the species
|
||||
# are imported or defined locally. If imported, the string
|
||||
# contains a colon (:)
|
||||
for sp in self._species:
|
||||
if sp.find(':') > 0:
|
||||
datasrc, spnames = sp.split(':')
|
||||
self._sp.append((datasrc+'.xml', spnames))
|
||||
else:
|
||||
spnames = sp
|
||||
self._sp.append(('', spnames))
|
||||
|
||||
# strip the commas, and make the list of species names
|
||||
sptoks = spnames.replace(',',' ').split()
|
||||
for s in sptoks:
|
||||
if self._spmap.has_key(s):
|
||||
raise 'multiply-defined species '+s+' in phase '+self._name
|
||||
self._spmap[s] = self._dim
|
||||
|
||||
self._rxns = reactions
|
||||
|
||||
# check that species have been declared
|
||||
if len(self._spmap) == 0:
|
||||
raise 'No species declared for phase '+self._name
|
||||
|
||||
# and that only one species is declared if it is a pure phase
|
||||
if self.is_pure() and len(self._spmap) > 1:
|
||||
raise 'Pure phases may only declare one species, but phase '+self._name+' declares '+`len(self._spmap)`+'.'
|
||||
|
||||
self._initial = initial_state
|
||||
|
||||
# add this phase to the global phase list
|
||||
global _phases
|
||||
_phases.append(self)
|
||||
|
||||
|
||||
def is_pure(self):
|
||||
return 0
|
||||
|
||||
def has_species(self, s):
|
||||
"""Return 1 is a species with name 's' belongs to the phase,
|
||||
or 0 otherwise."""
|
||||
if self._spmap.has_key(s): return 1
|
||||
return 0
|
||||
|
||||
def conc_dim(self):
|
||||
"""Concentration dimensions. Used in computing the units for reaction
|
||||
rate coefficients."""
|
||||
return (1, -self._dim)
|
||||
|
||||
|
||||
def buildrxns(self, p):
|
||||
|
||||
if type(self._rxns) == types.StringType:
|
||||
self._rxns = [self._rxns]
|
||||
|
||||
# for each reaction string, check whether or not the reactions
|
||||
# are imported or defined locally. If imported, the string
|
||||
# contains a colon (:)
|
||||
for r in self._rxns:
|
||||
|
||||
if r.find(':') > 0:
|
||||
datasrc, rnum = r.split(':')
|
||||
self._rx.append((datasrc+'.xml', rnum))
|
||||
else:
|
||||
rnum = r
|
||||
self._rx.append(('', rnum))
|
||||
|
||||
for r in self._rx:
|
||||
datasrc = r[0]
|
||||
ra = p.addChild('reactionArray')
|
||||
ra['datasrc'] = datasrc+'#reaction_data'
|
||||
rtoks = r[1].split()
|
||||
if rtoks[0] <> 'all':
|
||||
i = ra.addChild('include')
|
||||
i['prefix'] = 'reaction_'
|
||||
i['min'] = rtoks[0]
|
||||
if len(rtoks) > 2 and (rtoks[1] == 'to' or rtoks[1] == '-'):
|
||||
i['max'] = rtoks[2]
|
||||
else:
|
||||
i['max'] = rtoks[0]
|
||||
|
||||
|
||||
def build(self, p):
|
||||
p.addComment(' phase '+self._name+' ')
|
||||
ph = p.addChild('phase')
|
||||
ph['id'] = self._name
|
||||
ph['dim'] = `self._dim`
|
||||
e = ph.addChild('elementArray',self._el)
|
||||
e['datasrc'] = 'elements.xml'
|
||||
for s in self._sp:
|
||||
datasrc, names = s
|
||||
sa = ph.addChild('speciesArray',names)
|
||||
sa['datasrc'] = datasrc+'#species_data'
|
||||
|
||||
if self._skip:
|
||||
sk = sa.addChild('skip')
|
||||
sk['element'] = 'undeclared'
|
||||
|
||||
if self._rxns <> 'none':
|
||||
self.buildrxns(ph)
|
||||
|
||||
#self._eos.build(ph)
|
||||
if self._initial:
|
||||
self._initial.build(ph)
|
||||
return ph
|
||||
|
||||
|
||||
class ideal_gas(phase):
|
||||
"""An ideal gas mixture."""
|
||||
def __init__(self,
|
||||
name = '',
|
||||
elements = '',
|
||||
species = '',
|
||||
reactions = 'none',
|
||||
kinetics = 'GasKinetics',
|
||||
transport = 'Mix',
|
||||
initial_state = None):
|
||||
|
||||
phase.__init__(self, name, 3, elements, species, reactions,
|
||||
initial_state)
|
||||
self._pure = 0
|
||||
self._kin = kinetics
|
||||
self._tr = transport
|
||||
|
||||
|
||||
def build(self, p):
|
||||
ph = phase.build(self, p)
|
||||
e = ph.addChild("thermo")
|
||||
e['model'] = 'IdealGas'
|
||||
k = ph.addChild("kinetics")
|
||||
k['model'] = self._kin
|
||||
t = ph.addChild('transport')
|
||||
t['model'] = self._tr
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------ equations of state --------------------------
|
||||
|
||||
class eos(writer):
|
||||
def is_pure(self):
|
||||
return self._pure
|
||||
|
||||
class incompressible_eos(eos):
|
||||
def __init__(self, density = -1.0):
|
||||
self._dens = density
|
||||
self._pure = 0
|
||||
if self._dens < 0.0:
|
||||
raise 'density must be specified.'
|
||||
|
||||
def build(self, p):
|
||||
e = p.addChild("thermo")
|
||||
e['model'] = 'Incompressible'
|
||||
addFloat(e, 'density', self._dens)
|
||||
|
||||
def conc_dim(self):
|
||||
return (1, -3)
|
||||
|
||||
class solid_compound_eos(eos):
|
||||
def __init__(self, density = -1.0):
|
||||
self._dens = density
|
||||
self._pure = 1
|
||||
if self._dens < 0.0:
|
||||
raise 'density must be specified.'
|
||||
|
||||
def build(self, p):
|
||||
e = p.addChild("thermo")
|
||||
e['model'] = 'SolidCompound'
|
||||
addFloat(e, 'density', self._dens)
|
||||
if len(self.parent._spmap) > 1:
|
||||
raise 'A solid compound can only have one species.'
|
||||
|
||||
def conc_dim(self):
|
||||
return (0, 0)
|
||||
|
||||
|
||||
class ideal_gas_eos(eos):
|
||||
def __init__(self, kinetics = 'GasKinetics',
|
||||
transport = 'none'):
|
||||
self._pure = 0
|
||||
self._kin = kinetics
|
||||
self._tr = transport
|
||||
global _idealgas_class
|
||||
_idealgas_class = self.__class__
|
||||
|
||||
def build(self, p):
|
||||
e = p.addChild("thermo")
|
||||
e['model'] = 'IdealGas'
|
||||
k = p.addChild("kinetics")
|
||||
k['model'] = self._kin
|
||||
t = p.addChild('transport')
|
||||
t['model'] = self._tr
|
||||
|
||||
def conc_dim(self):
|
||||
return (1, -3)
|
||||
|
||||
|
||||
class surface(eos):
|
||||
def __init__(self, site_density = 0.0):
|
||||
self._pure = 0
|
||||
self._s0 = site_density
|
||||
def build(self, p):
|
||||
e = p.addChild("thermo")
|
||||
e['model'] = 'Surface'
|
||||
addFloat(e, 'site_density', self._s0, '%14.6E')
|
||||
|
||||
def conc_dim(self):
|
||||
return (1, -2)
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
# falloff parameterizations
|
||||
|
||||
class Troe:
|
||||
|
||||
def __init__(self, A = 0.0, T3 = 0.0, T1 = 0.0, T2 = -999.9):
|
||||
if T2 <> -999.9:
|
||||
self._c = (A, T3, T1, T2)
|
||||
else:
|
||||
self._c = (A, T3, T1)
|
||||
|
||||
def build(self, p):
|
||||
s = ''
|
||||
for num in self._c:
|
||||
s += '%g ' % num
|
||||
f = p.addChild('falloff', s)
|
||||
f['type'] = 'Troe'
|
||||
|
||||
|
||||
class SRI:
|
||||
def __init__(self, A = 0.0, B = 0.0, C = 0.0, D = -999.9, E=-999.9):
|
||||
if D <> -999.9 and E <> -999.9:
|
||||
self._c = (A, B, C, D, E)
|
||||
else:
|
||||
self._c = (A, B, C)
|
||||
|
||||
def build(self, p):
|
||||
s = ''
|
||||
for num in self._c:
|
||||
s += '%g ' % num
|
||||
f = p.addChild('falloff', s)
|
||||
f['type'] = 'SRI'
|
||||
|
||||
class Lindemann:
|
||||
def __init__(self):
|
||||
pass
|
||||
def build(self, p):
|
||||
f = p.addChild('falloff')
|
||||
f['type'] = 'Lindemann'
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
## class gas_transport:
|
||||
## def __init__(self, geom = 'nonlin',
|
||||
## welldepth = 0.0,
|
||||
## diam = 0.0,
|
||||
## dipole = 0.0,
|
||||
## polar = 0.0,
|
||||
## rot_relax = 0.0):
|
||||
## self._sp = species
|
||||
## self._geom = geom
|
||||
## self._params = (welldepth, diam, dipole, polar, rotrelax)
|
||||
|
||||
## #global _trdata
|
||||
## #_trdata[species] = self
|
||||
|
||||
## def build(self, s):
|
||||
## tr = s.addChild('transport')
|
||||
## g = tr.addChild('string','linear')
|
||||
## g['title'] = 'geometry'
|
||||
## tr.addChild('LJ_welldepth',`self._params[0]`)
|
||||
## tr.addChild('LJ_diameter',`self._params[1]`)
|
||||
## tr.addChild('dipoleMoment',`self._params[2]`)
|
||||
## tr.addChild('polarizability',`self._params[3]`)
|
||||
## tr.addChild('rotRelax',`self._params[4]`)
|
||||
|
||||
|
||||
get_atomic_wts()
|
@ -34,13 +34,17 @@ def IdealGasMix(src="", root=None, transport='None',
|
||||
else:
|
||||
nm = ff
|
||||
ext = ''
|
||||
if ext <> '.xml' and ext <> '.XML' and ext <> '.ctml' and ext <> '.CTML':
|
||||
outfile = p+os.sep+nm+'.xml'
|
||||
ck2ctml(infile = src, outfile = outfile, thermo = thermo,
|
||||
transport = trandb, id = nm)
|
||||
return Solution(src=outfile, root=None, transport=transport)
|
||||
else:
|
||||
return Solution(src=src, root=root, transport=transport)
|
||||
## if ext <> '.xml' and ext <> '.XML' and ext <> '.ctml' and ext <> '.CTML':
|
||||
## outfile = p+os.sep+nm+'.xml'
|
||||
## if ext == '.py':
|
||||
## from Cantera import pip
|
||||
## pip.process(fname)
|
||||
## else:
|
||||
## ck2ctml(infile = src, outfile = outfile, thermo = thermo,
|
||||
## transport = trandb, id = nm)
|
||||
## return Solution(src=outfile, root=None, transport=transport)
|
||||
## else:
|
||||
return Solution(src=src, root=root, transport=transport)
|
||||
|
||||
def GRI30(transport='None'):
|
||||
"""Return a Solution instance implementing reaction mechanism
|
||||
|
@ -1,8 +1,9 @@
|
||||
import solution
|
||||
|
||||
import _cantera
|
||||
from Thermo import Thermo
|
||||
from Kinetics import Kinetics
|
||||
|
||||
def importFromFile(t, k, params):
|
||||
return _cantera.importFromFile(t.cthermo, k.ckin, params['import_file'],'',1)
|
||||
def importPhase(file = '', name = ''):
|
||||
if name:
|
||||
src = file+'#'+name
|
||||
else:
|
||||
src = file
|
||||
return solution.Solution(src)
|
||||
|
||||
|
29
Cantera/python/Cantera/pip.py
Normal file
29
Cantera/python/Cantera/pip.py
Normal file
@ -0,0 +1,29 @@
|
||||
import sys, os
|
||||
from tempfile import mktemp
|
||||
|
||||
def process(name):
|
||||
parts = name.split('.')
|
||||
base = parts[0]
|
||||
if len(parts) == 2:
|
||||
ext = parts[1]
|
||||
fname = mktemp('.py')
|
||||
fo = open(fname,'w')
|
||||
txt = """from Cantera.ctml_writer import *
|
||||
import sys, os
|
||||
f = sys.argv[1]
|
||||
b = sys.argv[2]
|
||||
try:
|
||||
os.remove(b+'.xml')
|
||||
except:
|
||||
pass
|
||||
execfile(f)
|
||||
write()
|
||||
"""
|
||||
fo.write(txt)
|
||||
fo.close()
|
||||
cmd = sys.executable+' '+fname+' '+name+' '+base
|
||||
os.system(cmd)
|
||||
os.remove(fname)
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""
|
||||
"""
|
||||
|
||||
import string
|
||||
#import string
|
||||
import os
|
||||
|
||||
from constants import *
|
||||
@ -29,30 +29,41 @@ class Solution(ThermoPhase, Kinetics, Transport):
|
||||
"""
|
||||
|
||||
def __init__(self, src="", root=None,
|
||||
transport = "None", thermo_db = "",
|
||||
transport_db = ""):
|
||||
transport = "", thermo_db = "",
|
||||
transport_db = "", phases=[]):
|
||||
|
||||
self.ckin = 0
|
||||
self._owner = 0
|
||||
self.verbose = 1
|
||||
|
||||
fn = string.split(src,'#')
|
||||
fn = src.split('#')
|
||||
id = ""
|
||||
if len(fn) > 1: id = fn[1]
|
||||
fn = fn[0]
|
||||
|
||||
fname = os.path.basename(fn)
|
||||
ff = os.path.splitext(fname)
|
||||
if ff[1] <> '.xml' and ff[1] <> '.ctml':
|
||||
ctmodule.ck2ctml(src, thermo_db, transport_db, ff[0]+'.xml',
|
||||
ff[0])
|
||||
#if ff[1] == '.py' or ff[1] == '.in':
|
||||
from Cantera import pip
|
||||
pip.process(fname)
|
||||
#else:
|
||||
# ctmodule.ck2ctml(src, thermo_db, transport_db, ff[0]+'.xml',
|
||||
# ff[0])
|
||||
src = ff[0]+'.xml'
|
||||
|
||||
# get the 'phase' element
|
||||
s = XML.find_XML(src=src, root=root, name="phase")
|
||||
|
||||
if id:
|
||||
s = XML.find_XML(src=src, root=root, id=id)
|
||||
else:
|
||||
s = XML.find_XML(src=src, root=root, name="phase")
|
||||
|
||||
# get the equation of state model
|
||||
ThermoPhase.__init__(self, xml_phase=s)
|
||||
|
||||
# get the kinetics model
|
||||
Kinetics.__init__(self, xml_phase=s, phases=[self])
|
||||
ph = [self]+list(phases)
|
||||
Kinetics.__init__(self, xml_phase=s, phases=ph)
|
||||
|
||||
Transport.__init__(self, xml_phase=s, phase=self,
|
||||
model = transport, loglevel=4)
|
||||
|
@ -7,7 +7,7 @@ from Cantera import units
|
||||
#from Cantera.gases import H_O_AR
|
||||
|
||||
|
||||
gas = GRI30(transport = 'Default')
|
||||
gas = GRI30(transport = 'Mix')
|
||||
|
||||
flame = BurnerFlame(
|
||||
domain = (0, 0.01),
|
||||
|
@ -42,6 +42,19 @@ py_bndry_settemperature(PyObject *self, PyObject *args)
|
||||
return Py_BuildValue("i",0);
|
||||
}
|
||||
|
||||
|
||||
static PyObject*
|
||||
py_bndry_setspreadrate(PyObject *self, PyObject *args)
|
||||
{
|
||||
int n;
|
||||
double v;
|
||||
if (!PyArg_ParseTuple(args, "id:bndry_setspreadrate", &n, &v))
|
||||
return NULL;
|
||||
int iok = bndry_setSpreadRate(n, v);
|
||||
if (iok < 0) return reportError(iok);
|
||||
return Py_BuildValue("i",0);
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
py_bndry_mdot(PyObject *self, PyObject *args)
|
||||
{
|
||||
|
@ -1,11 +1,12 @@
|
||||
|
||||
static PyObject*
|
||||
kin_newFromXML(PyObject *self, PyObject *args) {
|
||||
int mxml, iphase, neighbor1, neighbor2;
|
||||
if (!PyArg_ParseTuple(args, "iiii:newFromXML", &mxml,
|
||||
&iphase, &neighbor1, &neighbor2))
|
||||
int mxml, iphase, neighbor1, neighbor2, neighbor3, neighbor4;
|
||||
if (!PyArg_ParseTuple(args, "iiiiii:newFromXML", &mxml,
|
||||
&iphase, &neighbor1, &neighbor2, &neighbor3, &neighbor4))
|
||||
return NULL;
|
||||
int n = newKineticsFromXML(mxml, iphase, neighbor1, neighbor2);
|
||||
int n = newKineticsFromXML(mxml, iphase, neighbor1, neighbor2,
|
||||
neighbor3, neighbor4);
|
||||
if (n < 0) return reportError(n);
|
||||
return Py_BuildValue("i",n);
|
||||
}
|
||||
@ -19,6 +20,13 @@ kin_delete(PyObject *self, PyObject *args)
|
||||
return Py_BuildValue("i",0);
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
kin_phase(PyObject *self, PyObject *args) {
|
||||
int kin, n;
|
||||
if (!PyArg_ParseTuple(args, "ii:kin_phase", &kin, &n)) return NULL;
|
||||
return Py_BuildValue("i",kin_phase(kin, n));
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
kin_nspecies(PyObject *self, PyObject *args) {
|
||||
int kin;
|
||||
@ -102,6 +110,17 @@ kin_speciesIndex(PyObject *self, PyObject *args) {
|
||||
return Py_BuildValue("i",kin_speciesIndex(kin,nm,ph));
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
kin_advanceCoverages(PyObject *self, PyObject *args) {
|
||||
int kin;
|
||||
double dt;
|
||||
if (!PyArg_ParseTuple(args, "id:kin_advanceCoverages", &kin, &dt))
|
||||
return NULL;
|
||||
int iok = kin_advanceCoverages(kin, dt);
|
||||
if (iok < 0) return reportCanteraError();
|
||||
return Py_BuildValue("i",0);
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
kin_getarray(PyObject *self, PyObject *args)
|
||||
{
|
||||
|
@ -149,6 +149,8 @@ thermo_setfp(PyObject *self, PyObject *args)
|
||||
iok = th_set_SV(th, v); break;
|
||||
case 5:
|
||||
iok = th_set_SP(th, v); break;
|
||||
case 6:
|
||||
iok = th_setElectricPotential(th, v[0]); break;
|
||||
default:
|
||||
iok = -10;
|
||||
}
|
||||
|
@ -170,6 +170,18 @@ py_xml_addAttrib(PyObject *self, PyObject *args)
|
||||
return Py_BuildValue("i",m);
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
py_xml_addComment(PyObject *self, PyObject *args)
|
||||
{
|
||||
int n;
|
||||
char *comment;
|
||||
if (!PyArg_ParseTuple(args, "is:xml_addComment", &n, &comment))
|
||||
return NULL;
|
||||
int m = xml_addComment(n, comment);
|
||||
if (m < 0) return reportError(m);
|
||||
return Py_BuildValue("i",m);
|
||||
}
|
||||
|
||||
static PyObject*
|
||||
py_xml_removeChild(PyObject *self, PyObject *args)
|
||||
{
|
||||
|
@ -35,6 +35,7 @@ static PyMethodDef ct_methods[] = {
|
||||
|
||||
{"xml_attrib", py_xml_attrib, METH_VARARGS},
|
||||
{"xml_addAttrib", py_xml_addAttrib, METH_VARARGS},
|
||||
{"xml_addComment", py_xml_addComment, METH_VARARGS},
|
||||
{"xml_tag", py_xml_tag, METH_VARARGS},
|
||||
{"xml_value", py_xml_value, METH_VARARGS},
|
||||
{"xml_new", py_xml_new, METH_VARARGS},
|
||||
@ -66,6 +67,8 @@ static PyMethodDef ct_methods[] = {
|
||||
{"kin_speciesIndex", kin_speciesIndex, METH_VARARGS},
|
||||
{"kin_getarray", kin_getarray, METH_VARARGS},
|
||||
{"kin_getstring", kin_getstring, METH_VARARGS},
|
||||
{"kin_phase", kin_phase, METH_VARARGS},
|
||||
{"kin_advanceCoverages", kin_advanceCoverages, METH_VARARGS},
|
||||
|
||||
{"Transport", py_transport_new, METH_VARARGS},
|
||||
{"tran_delete", py_transport_delete, METH_VARARGS},
|
||||
@ -156,6 +159,7 @@ static PyMethodDef ct_methods[] = {
|
||||
{"bndry_setxin", py_bndry_setxin, METH_VARARGS},
|
||||
{"bndry_setxinbyname", py_bndry_setxinbyname, METH_VARARGS},
|
||||
{"bndry_settemperature", py_bndry_settemperature, METH_VARARGS},
|
||||
{"bndry_setspreadrate", py_bndry_setspreadrate, METH_VARARGS},
|
||||
{"bndry_new", py_bndry_new, METH_VARARGS},
|
||||
{"bndry_del", py_bndry_del, METH_VARARGS},
|
||||
{"bndry_mdot", py_bndry_mdot, METH_VARARGS},
|
||||
|
@ -316,7 +316,6 @@ namespace Cantera {
|
||||
delete m_p2;
|
||||
bool tempFixed = true;
|
||||
initialize(s);
|
||||
|
||||
switch (XY) {
|
||||
case TP: case PT:
|
||||
m_p1 = new TemperatureCalculator<thermo_t>;
|
||||
@ -346,7 +345,6 @@ namespace Cantera {
|
||||
|
||||
xval = m_p1->value(s);
|
||||
yval = m_p2->value(s);
|
||||
|
||||
int mm = m_mm;
|
||||
|
||||
int m;
|
||||
@ -357,7 +355,6 @@ namespace Cantera {
|
||||
|
||||
vector_fp res_trial(nvar);
|
||||
vector_fp elementMol(mm, 0.0);
|
||||
|
||||
double perturb;
|
||||
for (m = 0; m < mm; m++) {
|
||||
perturb = Cutoff*(1.0 + rand());
|
||||
|
@ -84,12 +84,12 @@ namespace Cantera {
|
||||
m_spthermo->update(tnow, m_cp0_R.begin(), m_h0_RT.begin(),
|
||||
m_s0_R.begin());
|
||||
m_tlast = tnow;
|
||||
doublereal rrt = 1.0 / (GasConstant * tnow);
|
||||
// doublereal rrt = 1.0 / (GasConstant * tnow);
|
||||
int k;
|
||||
doublereal deltaE;
|
||||
//doublereal deltaE;
|
||||
for (k = 0; k < m_kk; k++) {
|
||||
deltaE = rrt * m_pe[k];
|
||||
m_h0_RT[k] += deltaE;
|
||||
//deltaE = rrt * m_pe[k];
|
||||
//m_h0_RT[k] += deltaE;
|
||||
m_g0_RT[k] = m_h0_RT[k] - m_s0_R[k];
|
||||
}
|
||||
m_tlast = tnow;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "GRI_30_Kinetics.h"
|
||||
|
||||
#include "ReactionData.h"
|
||||
#include "StoichManager.h"
|
||||
//#include "StoichManager.h"
|
||||
#include "Enhanced3BConc.h"
|
||||
#include "ThirdBodyMgr.h"
|
||||
#include "RateCoeffMgr.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "GasKinetics.h"
|
||||
|
||||
#include "ReactionData.h"
|
||||
#include "StoichManager.h"
|
||||
//#include "StoichManager.h"
|
||||
#include "Enhanced3BConc.h"
|
||||
#include "ThirdBodyMgr.h"
|
||||
#include "RateCoeffMgr.h"
|
||||
@ -52,6 +52,7 @@ namespace Cantera {
|
||||
{
|
||||
m_kdata = new GasKineticsData;
|
||||
m_kdata->m_temp = 0.0;
|
||||
// m_rxnstoich = new ReactionStoichMgr;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,8 +129,9 @@ namespace Cantera {
|
||||
fill(m_rkc.begin(), m_rkc.end(), 0.0);
|
||||
|
||||
// compute Delta G^0 for all reversible reactions
|
||||
m_reactantStoich.decrementReactions(m_grt.begin(), m_rkc.begin());
|
||||
m_revProductStoich.incrementReactions(m_grt.begin(), m_rkc.begin());
|
||||
m_rxnstoich.getRevReactionDelta(m_ii, m_grt.begin(), m_rkc.begin());
|
||||
//m_reactantStoich.decrementReactions(m_grt.begin(), m_rkc.begin());
|
||||
//m_revProductStoich.incrementReactions(m_grt.begin(), m_rkc.begin());
|
||||
|
||||
doublereal logc0 = m_kdata->m_logc0;
|
||||
doublereal rrt = 1.0/(GasConstant * thermo().temperature());
|
||||
@ -157,11 +159,13 @@ namespace Cantera {
|
||||
fill(rkc.begin(), rkc.end(), 0.0);
|
||||
|
||||
// compute Delta G^0 for all reactions
|
||||
m_reactantStoich.decrementReactions(m_grt.begin(), rkc.begin());
|
||||
m_revProductStoich.incrementReactions(m_grt.begin(),
|
||||
rkc.begin());
|
||||
m_irrevProductStoich.incrementReactions(m_grt.begin(),
|
||||
rkc.begin());
|
||||
m_rxnstoich.getReactionDelta(m_ii, m_grt.begin(), rkc.begin());
|
||||
|
||||
// m_reactantStoich.decrementReactions(m_grt.begin(), rkc.begin());
|
||||
//m_revProductStoich.incrementReactions(m_grt.begin(),
|
||||
//rkc.begin());
|
||||
//m_irrevProductStoich.incrementReactions(m_grt.begin(),
|
||||
//rkc.begin());
|
||||
|
||||
doublereal logc0 = m_kdata->m_logc0;
|
||||
doublereal rrt = 1.0/(GasConstant * thermo().temperature());
|
||||
@ -239,11 +243,13 @@ namespace Cantera {
|
||||
multiply_each(ropr.begin(), ropr.end(), m_rkc.begin());
|
||||
|
||||
// multiply ropf by concentration products
|
||||
m_reactantStoich.multiply(m_conc.begin(), ropf.begin());
|
||||
m_rxnstoich.multiplyReactants(m_conc.begin(), ropf.begin());
|
||||
//m_reactantStoich.multiply(m_conc.begin(), ropf.begin());
|
||||
|
||||
// for reversible reactions, multiply ropr by concentration
|
||||
// products
|
||||
m_revProductStoich.multiply(m_conc.begin(), ropr.begin());
|
||||
m_rxnstoich.multiplyRevProducts(m_conc.begin(), ropr.begin());
|
||||
//m_revProductStoich.multiply(m_conc.begin(), ropr.begin());
|
||||
|
||||
for (int j = 0; j != m_ii; ++j) {
|
||||
ropnet[j] = ropf[j] - ropr[j];
|
||||
@ -390,26 +396,18 @@ namespace Cantera {
|
||||
m_kdata->m_rkcn.push_back(0.0);
|
||||
// int nr = r.size();
|
||||
|
||||
//int i;
|
||||
//for (i = 0; i < nr; i++) {
|
||||
// m_rrxn[r[i]][rnum] += 1.0;
|
||||
//}
|
||||
m_reactantStoich.add( reactionNumber(), rk);
|
||||
|
||||
//int np = p.size();
|
||||
//
|
||||
//for (i = 0; i < np; i++) {
|
||||
// m_prxn[p[i]][rnum] += 1.0;
|
||||
// }
|
||||
//m_reactantStoich.add( reactionNumber(), rk);
|
||||
|
||||
if (r.reversible) {
|
||||
m_revProductStoich.add(reactionNumber(), pk);
|
||||
m_rxnstoich.add(reactionNumber(), rk, pk, true);
|
||||
//m_revProductStoich.add(reactionNumber(), pk);
|
||||
m_dn.push_back(pk.size() - rk.size());
|
||||
m_revindex.push_back(reactionNumber());
|
||||
m_nrev++;
|
||||
}
|
||||
else {
|
||||
m_irrevProductStoich.add(reactionNumber(), pk);
|
||||
m_rxnstoich.add(reactionNumber(), rk, pk, false);
|
||||
//m_irrevProductStoich.add(reactionNumber(), pk);
|
||||
m_dn.push_back(pk.size() - rk.size());
|
||||
m_irrev.push_back( reactionNumber() );
|
||||
m_nirrev++;
|
||||
|
@ -21,7 +21,10 @@
|
||||
#include "Kinetics.h"
|
||||
|
||||
#include "utilities.h"
|
||||
#include "StoichManager.h"
|
||||
|
||||
//#include "StoichManager.h"
|
||||
|
||||
#include "ReactionStoichMgr.h"
|
||||
#include "ThirdBodyMgr.h"
|
||||
#include "FalloffMgr.h"
|
||||
#include "RateCoeffMgr.h"
|
||||
@ -109,34 +112,39 @@ namespace Cantera {
|
||||
#ifdef HWMECH
|
||||
get_wdot(m_kdata->m_ropnet.begin(), net);
|
||||
#else
|
||||
fill(net, net + m_kk, 0.0);
|
||||
m_revProductStoich.incrementSpecies(
|
||||
m_kdata->m_ropnet.begin(), net);
|
||||
m_irrevProductStoich.incrementSpecies(
|
||||
m_kdata->m_ropnet.begin(), net);
|
||||
m_reactantStoich.decrementSpecies(
|
||||
m_kdata->m_ropnet.begin(), net);
|
||||
m_rxnstoich.getNetProductionRates(m_kk, m_kdata->m_ropnet.begin(), net);
|
||||
//fill(net, net + m_kk, 0.0);
|
||||
//m_revProductStoich.incrementSpecies(
|
||||
// m_kdata->m_ropnet.begin(), net);
|
||||
//m_irrevProductStoich.incrementSpecies(
|
||||
// m_kdata->m_ropnet.begin(), net);
|
||||
//m_reactantStoich.decrementSpecies(
|
||||
// m_kdata->m_ropnet.begin(), net);
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void getCreationRates(doublereal* cdot) {
|
||||
updateROP();
|
||||
fill(cdot, cdot + m_kk, 0.0);
|
||||
m_revProductStoich.incrementSpecies(
|
||||
m_kdata->m_ropf.begin(), cdot);
|
||||
m_irrevProductStoich.incrementSpecies(
|
||||
m_kdata->m_ropf.begin(), cdot);
|
||||
m_reactantStoich.incrementSpecies(
|
||||
m_kdata->m_ropr.begin(), cdot);
|
||||
m_rxnstoich.getCreationRates(m_kk, m_kdata->m_ropf.begin(),
|
||||
m_kdata->m_ropr.begin(), cdot);
|
||||
//fill(cdot, cdot + m_kk, 0.0);
|
||||
//m_revProductStoich.incrementSpecies(
|
||||
// m_kdata->m_ropf.begin(), cdot);
|
||||
//m_irrevProductStoich.incrementSpecies(
|
||||
// m_kdata->m_ropf.begin(), cdot);
|
||||
//m_reactantStoich.incrementSpecies(
|
||||
// m_kdata->m_ropr.begin(), cdot);
|
||||
}
|
||||
|
||||
virtual void getDestructionRates(doublereal* ddot) {
|
||||
updateROP();
|
||||
fill(ddot, ddot + m_kk, 0.0);
|
||||
m_revProductStoich.incrementSpecies(
|
||||
m_kdata->m_ropr.begin(), ddot);
|
||||
m_reactantStoich.incrementSpecies(
|
||||
m_kdata->m_ropf.begin(), ddot);
|
||||
m_rxnstoich.getDestructionRates(m_kk, m_kdata->m_ropf.begin(),
|
||||
m_kdata->m_ropr.begin(), ddot);
|
||||
// fill(ddot, ddot + m_kk, 0.0);
|
||||
//m_revProductStoich.incrementSpecies(
|
||||
// m_kdata->m_ropr.begin(), ddot);
|
||||
//m_reactantStoich.incrementSpecies(
|
||||
// m_kdata->m_ropf.begin(), ddot);
|
||||
}
|
||||
|
||||
virtual void getEquilibriumConstants(doublereal* kc);
|
||||
@ -204,9 +212,11 @@ namespace Cantera {
|
||||
|
||||
vector<int> m_irrev;
|
||||
|
||||
StoichManagerN m_reactantStoich;
|
||||
StoichManagerN m_revProductStoich;
|
||||
StoichManagerN m_irrevProductStoich;
|
||||
//StoichManagerN m_reactantStoich;
|
||||
//StoichManagerN m_revProductStoich;
|
||||
//StoichManagerN m_irrevProductStoich;
|
||||
|
||||
ReactionStoichMgr m_rxnstoich;
|
||||
|
||||
vector<int> m_fwdOrder;
|
||||
|
||||
|
@ -91,12 +91,12 @@ namespace Cantera {
|
||||
m_spthermo->update(tnow, m_cp0_R.begin(), m_h0_RT.begin(),
|
||||
m_s0_R.begin());
|
||||
m_tlast = tnow;
|
||||
doublereal rrt = 1.0 / (GasConstant * tnow);
|
||||
// doublereal rrt = 1.0 / (GasConstant * tnow);
|
||||
int k;
|
||||
doublereal deltaE;
|
||||
//doublereal deltaE;
|
||||
for (k = 0; k < m_kk; k++) {
|
||||
deltaE = rrt * m_pe[k];
|
||||
m_h0_RT[k] += deltaE;
|
||||
//deltaE = rrt * m_pe[k];
|
||||
//m_h0_RT[k] += deltaE;
|
||||
m_g0_RT[k] = m_h0_RT[k] - m_s0_R[k];
|
||||
}
|
||||
m_logc0 = log(m_p0/(GasConstant * tnow));
|
||||
|
@ -26,7 +26,8 @@ namespace Cantera {
|
||||
m_atol(1.e-14), m_rtol(1.e-7), m_maxstep(0.0)
|
||||
{
|
||||
m_integ = new CVodeInt;
|
||||
m_surf = (SurfPhase*)&kin.thermo(kin.nPhases()-1);
|
||||
m_surfindex = kin.surfacePhaseIndex();
|
||||
m_surf = (SurfPhase*)&kin.thermo(m_surfindex);
|
||||
|
||||
// use backward differencing, with a full Jacobian computed
|
||||
// numerically, and use a Newton linear iterator
|
||||
@ -38,6 +39,7 @@ namespace Cantera {
|
||||
m_work.resize(m_kin->nTotalSpecies());
|
||||
}
|
||||
|
||||
|
||||
// overloaded method of FuncEval. Called by the integrator to
|
||||
// get the initial conditions.
|
||||
void ImplicitSurfChem::getInitialConditions(double t0, size_t lenc,
|
||||
@ -55,10 +57,12 @@ namespace Cantera {
|
||||
m_integ->initialize(t0, *this);
|
||||
}
|
||||
|
||||
|
||||
void ImplicitSurfChem::updateState(doublereal* c) {
|
||||
m_surf->setCoverages(c);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called by the integrator to evaluate ydot given y at time 'time'.
|
||||
*/
|
||||
@ -69,10 +73,10 @@ namespace Cantera {
|
||||
doublereal rs0 = 1.0/m_surf->siteDensity();
|
||||
m_kin->getNetProductionRates(m_work.begin());
|
||||
int k;
|
||||
int kbulk = m_kin->nTotalSpecies() - m_nsp;
|
||||
int kstart = m_kin->start(m_surfindex);
|
||||
doublereal sum = 0.0;
|
||||
for (k = 1; k < m_nsp; k++) {
|
||||
ydot[k] = m_work[kbulk + k] * rs0 * m_surf->size(k);
|
||||
ydot[k] = m_work[kstart + k] * rs0 * m_surf->size(k);
|
||||
sum -= ydot[k];
|
||||
}
|
||||
//if (sum < 0.0) sum = 0.0;
|
||||
|
@ -93,7 +93,7 @@ namespace Cantera {
|
||||
|
||||
SurfPhase* m_surf;
|
||||
InterfaceKinetics* m_kin;
|
||||
int m_nsp;
|
||||
int m_nsp, m_surfindex;
|
||||
Integrator* m_integ; // pointer to integrator
|
||||
doublereal m_atol, m_rtol; // tolerances
|
||||
doublereal m_maxstep; // max step size
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "StoichManager.h"
|
||||
#include "RateCoeffMgr.h"
|
||||
|
||||
#include "ImplicitSurfChem.h"
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
@ -44,6 +46,9 @@ namespace Cantera {
|
||||
return mean_X(m_h0.begin());
|
||||
}
|
||||
|
||||
SurfPhase::
|
||||
~SurfPhase() { }
|
||||
|
||||
/**
|
||||
* For a surface phase, the pressure is not a relevant
|
||||
* thermodynamic variable, and so the enthalpy is equal to the
|
||||
@ -101,20 +106,20 @@ namespace Cantera {
|
||||
_updateThermo(true);
|
||||
}
|
||||
|
||||
|
||||
void SurfPhase::
|
||||
setSiteDensity(doublereal n0) {
|
||||
doublereal x = n0;
|
||||
setParameters(1, &x);
|
||||
}
|
||||
|
||||
void SurfPhase::
|
||||
setElectricPotential(doublereal V) {
|
||||
for (int k = 0; k < m_kk; k++) {
|
||||
m_pe[k] = charge(k)*Faraday*V;
|
||||
}
|
||||
_updateThermo(true);
|
||||
}
|
||||
|
||||
//void SurfPhase::
|
||||
//setElectricPotential(doublereal V) {
|
||||
// for (int k = 0; k < m_kk; k++) {
|
||||
// m_pe[k] = charge(k)*Faraday*V;
|
||||
// }
|
||||
// _updateThermo(true);
|
||||
//}
|
||||
|
||||
void SurfPhase::
|
||||
setCoverages(const doublereal* theta) {
|
||||
@ -141,12 +146,12 @@ namespace Cantera {
|
||||
m_tlast = tnow;
|
||||
doublereal rt = GasConstant * tnow;
|
||||
int k;
|
||||
doublereal deltaE;
|
||||
//doublereal deltaE;
|
||||
for (k = 0; k < m_kk; k++) {
|
||||
m_h0[k] *= rt;
|
||||
m_s0[k] *= GasConstant;
|
||||
m_cp0[k] *= GasConstant;
|
||||
deltaE = m_pe[k];
|
||||
//deltaE = m_pe[k];
|
||||
//m_h0[k] += deltaE;
|
||||
m_mu0[k] = m_h0[k] - tnow*m_s0[k];
|
||||
}
|
||||
@ -169,29 +174,53 @@ namespace Cantera {
|
||||
m_redo_rates(false),
|
||||
m_nirrev(0),
|
||||
m_nrev(0),
|
||||
m_integrator(0),
|
||||
m_finalized(false)
|
||||
{
|
||||
m_kdata = new InterfaceKineticsData;
|
||||
m_kdata->m_temp = 0.0;
|
||||
}
|
||||
|
||||
InterfaceKinetics::
|
||||
~InterfaceKinetics(){
|
||||
delete m_kdata;
|
||||
delete m_integrator;
|
||||
}
|
||||
|
||||
void InterfaceKinetics::
|
||||
_update_rates_T() {
|
||||
_update_rates_phi();
|
||||
doublereal T = thermo().temperature();
|
||||
if (T != m_kdata->m_temp || m_redo_rates) {
|
||||
doublereal logT = log(T);
|
||||
m_rates.update(T, logT, m_kdata->m_rfn.begin());
|
||||
correctElectronTransferRates(m_kdata->m_rfn.begin());
|
||||
applyButlerVolmerCorrection(m_kdata->m_rfn.begin());
|
||||
m_kdata->m_temp = T;
|
||||
updateKc();
|
||||
m_kdata->m_ROP_ok = false;
|
||||
m_redo_rates = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void InterfaceKinetics::
|
||||
_update_rates_phi() {
|
||||
int np = nPhases();
|
||||
for (int n = 0; n < np; n++) {
|
||||
if (thermo(n).electricPotential() != m_phi[n]) {
|
||||
m_phi[n] = thermo(n).electricPotential();
|
||||
m_redo_rates = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update properties that depend on concentrations.
|
||||
* Update properties that depend on concentrations. This method
|
||||
* fills out the array of generalized concentrations by calling
|
||||
* method getActivityConcentrations for each phase, which classes
|
||||
* representing phases should overload to return the appropriate
|
||||
* quantities.
|
||||
*/
|
||||
void InterfaceKinetics::
|
||||
_update_rates_C() {
|
||||
@ -203,8 +232,10 @@ namespace Cantera {
|
||||
m_kdata->m_ROP_ok = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the equilibrium constants in molar units.
|
||||
* Update the equilibrium constants in molar units for all
|
||||
* reversible reactions.
|
||||
*/
|
||||
void InterfaceKinetics::updateKc() {
|
||||
int i, irxn;
|
||||
@ -215,14 +246,11 @@ namespace Cantera {
|
||||
doublereal rrt = 1.0/rt;
|
||||
int np = nPhases();
|
||||
for (n = 0; n < np; n++) {
|
||||
// cout << n << "start = " << m_start[n] << endl;
|
||||
thermo(n).getStandardChemPotentials(m_mu0.begin() + m_start[n]);
|
||||
nsp = thermo(n).nSpecies();
|
||||
for (k = 0; k < nsp; k++) {
|
||||
//cout << ik << "mu0 = " << m_mu0[ik] << endl;
|
||||
m_mu0[ik] -= rt*thermo(n).logStandardConc(k);
|
||||
m_mu0[ik] += Faraday * m_phi[n] * thermo(n).charge(k);
|
||||
//cout << ik << "mu0 = " << m_mu0[ik] << endl;
|
||||
ik++;
|
||||
}
|
||||
}
|
||||
@ -235,9 +263,7 @@ namespace Cantera {
|
||||
|
||||
for (i = 0; i < m_nrev; i++) {
|
||||
irxn = m_revindex[i];
|
||||
//cout << "rev " << irxn << " " << m_rkc[irxn] << endl;
|
||||
m_rkc[irxn] = exp(m_rkc[irxn]*rrt);
|
||||
//cout << "rev " << irxn << " " << m_rkc[irxn] << endl;
|
||||
}
|
||||
|
||||
for(i = 0; i != m_nirrev; ++i) {
|
||||
@ -245,6 +271,7 @@ namespace Cantera {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the equilibrium constants of all reactions, whether
|
||||
* reversible or not.
|
||||
@ -260,14 +287,8 @@ namespace Cantera {
|
||||
thermo(n).getStandardChemPotentials(m_mu0.begin() + m_start[n]);
|
||||
nsp = thermo(n).nSpecies();
|
||||
for (k = 0; k < nsp; k++) {
|
||||
//cout << thermo(n).id() << " " << thermo(n).speciesName(k)
|
||||
// << " " << m_mu0[ik] << endl;
|
||||
m_mu0[ik] -= rt*thermo(n).logStandardConc(k);
|
||||
m_mu0[ik] += Faraday * m_phi[n] * thermo(n).charge(k);
|
||||
//if (thermo(n).charge(k) != 0.0) {
|
||||
// cout << thermo(n).id() << " " << thermo(n).speciesName(k)
|
||||
// << " " << m_phi[n] << " " << thermo(n).charge(k) << endl;
|
||||
//}
|
||||
ik++;
|
||||
}
|
||||
}
|
||||
@ -285,16 +306,19 @@ namespace Cantera {
|
||||
|
||||
|
||||
/**
|
||||
* Get the equilibrium constants of all reactions, whether
|
||||
* reversible or not.
|
||||
* For reactions that transfer charge across a potential difference,
|
||||
* the activation energies are modified by the potential difference.
|
||||
* (see, for example, ...). This method applies this correction.
|
||||
*/
|
||||
void InterfaceKinetics::correctElectronTransferRates(doublereal* kf) {
|
||||
void InterfaceKinetics::applyButlerVolmerCorrection(doublereal* kf) {
|
||||
int i;
|
||||
|
||||
int n, nsp, k, ik=0;
|
||||
doublereal rt = GasConstant*thermo(0).temperature();
|
||||
doublereal rrt = 1.0/rt;
|
||||
int np = nPhases();
|
||||
|
||||
// compute the electrical potential energy of each species
|
||||
for (n = 0; n < np; n++) {
|
||||
nsp = thermo(n).nSpecies();
|
||||
for (k = 0; k < nsp; k++) {
|
||||
@ -302,18 +326,25 @@ namespace Cantera {
|
||||
ik++;
|
||||
}
|
||||
}
|
||||
|
||||
// compute the change in electrical potential energy for each
|
||||
// reaction. This will only be non-zero if a potential
|
||||
// difference is present.
|
||||
fill(m_rwork.begin(), m_rwork.begin() + m_ii, 0.0);
|
||||
m_reactantStoich.decrementReactions(m_pot.begin(), m_rwork.begin());
|
||||
m_revProductStoich.incrementReactions(m_pot.begin(), m_rwork.begin());
|
||||
m_irrevProductStoich.incrementReactions(m_pot.begin(), m_rwork.begin());
|
||||
doublereal eamod, ea;
|
||||
// modify the reaction rates. Only modify those with a
|
||||
// non-zero activation energy, and do not decrease the
|
||||
// activation energy below zero.
|
||||
doublereal ea, eamod;
|
||||
for (i = 0; i < m_ii; i++) {
|
||||
//loc = m_index[i].second;
|
||||
//if (loc >= 0) {
|
||||
// const Arrhenius& r = m_rates.rateCoeff(m_index[i].second);
|
||||
// ea = GasConstant*r.activationEnergy_R();
|
||||
eamod = 0.5*m_rwork[i];
|
||||
if (m_index[i].second >= 0) kf[i] *= exp(-eamod*rrt);
|
||||
if (eamod != 0.0 && m_E[i] != 0.0) {
|
||||
ea = GasConstant * m_E[i];
|
||||
if (eamod + ea < 0.0) eamod = -ea;
|
||||
kf[i] *= exp(-eamod*rrt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,6 +417,8 @@ namespace Cantera {
|
||||
iloc = m_rates.install( reactionNumber(),
|
||||
r.rateCoeffType, r.rateCoeffParameters.size(),
|
||||
r.rateCoeffParameters.begin() );
|
||||
// store activation energy
|
||||
m_E.push_back(r.rateCoeffParameters[2]);
|
||||
// add constant term to rate coeff value vector
|
||||
m_kdata->m_rfn.push_back(r.rateCoeffParameters[0]);
|
||||
registerReaction( reactionNumber(), ELEMENTARY_RXN, iloc);
|
||||
@ -500,6 +533,15 @@ namespace Cantera {
|
||||
return (m_finalized);
|
||||
}
|
||||
|
||||
void InterfaceKinetics::
|
||||
advanceCoverages(doublereal tstep) {
|
||||
if (m_integrator == 0) {
|
||||
m_integrator = new ImplicitSurfChem(*this);
|
||||
m_integrator->initialize();
|
||||
}
|
||||
m_integrator->integrate(0.0, tstep);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,6 +31,7 @@ namespace Cantera {
|
||||
class ReactionData;
|
||||
class InterfaceKineticsData;
|
||||
class ThermoPhase;
|
||||
class ImplicitSurfChem;
|
||||
|
||||
/**
|
||||
* Holds mechanism-specific data.
|
||||
@ -62,12 +63,13 @@ namespace Cantera {
|
||||
InterfaceKinetics(thermo_t* thermo = 0);
|
||||
|
||||
/// Destructor.
|
||||
virtual ~InterfaceKinetics(){delete m_kdata;}
|
||||
virtual ~InterfaceKinetics();
|
||||
|
||||
virtual int ID() { return cInterfaceKinetics; }
|
||||
virtual int type() { return cInterfaceKinetics; }
|
||||
|
||||
void setElectricPotential(int n, doublereal V) {
|
||||
m_phi[n] = V;
|
||||
thermo(n).setElectricPotential(V);
|
||||
m_redo_rates = true;
|
||||
}
|
||||
|
||||
@ -158,10 +160,12 @@ namespace Cantera {
|
||||
< m_revindex.end()) return true;
|
||||
else return false;
|
||||
}
|
||||
void correctElectronTransferRates(doublereal* kf);
|
||||
void _update_rates_T();
|
||||
void _update_rates_phi();
|
||||
void _update_rates_C();
|
||||
|
||||
void advanceCoverages(doublereal tstep);
|
||||
|
||||
protected:
|
||||
|
||||
int m_kk;
|
||||
@ -200,6 +204,9 @@ namespace Cantera {
|
||||
vector_fp m_phi;
|
||||
vector_fp m_pot;
|
||||
vector_fp m_rwork;
|
||||
vector_fp m_E;
|
||||
|
||||
ImplicitSurfChem* m_integrator;
|
||||
|
||||
private:
|
||||
|
||||
@ -215,6 +222,7 @@ namespace Cantera {
|
||||
void registerReaction(int rxnNumber, int type, int loc) {
|
||||
m_index[rxnNumber] = pair<int, int>(type, loc);
|
||||
}
|
||||
void applyButlerVolmerCorrection(doublereal* kf);
|
||||
bool m_finalized;
|
||||
};
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
#define CT_KINETICS_H
|
||||
|
||||
#include "ctexceptions.h"
|
||||
//#include "Phase.h"
|
||||
#include "ThermoPhase.h"
|
||||
|
||||
namespace Cantera {
|
||||
@ -36,7 +35,7 @@ namespace Cantera {
|
||||
typedef ThermoPhase thermo_t;
|
||||
|
||||
/// Constructors.
|
||||
Kinetics() : m_ii(0), m_thermo(0), m_index(-1) {}
|
||||
Kinetics() : m_ii(0), m_thermo(0), m_index(-1), m_surfphase(-1) {}
|
||||
|
||||
/**
|
||||
* This Constructor initializes with a starting phase.
|
||||
@ -44,7 +43,7 @@ namespace Cantera {
|
||||
* sets up are also done here.
|
||||
*/
|
||||
Kinetics(thermo_t* thermo)
|
||||
: m_ii(0), m_index(-1) {
|
||||
: m_ii(0), m_index(-1), m_surfphase(-1) {
|
||||
if (thermo) {
|
||||
m_start.push_back(0);
|
||||
m_thermo.push_back(thermo);
|
||||
@ -76,6 +75,8 @@ namespace Cantera {
|
||||
return n;
|
||||
}
|
||||
|
||||
int surfacePhaseIndex() { return m_surfphase; }
|
||||
|
||||
/**
|
||||
* Stoichiometric coefficient of species k as a reactant in
|
||||
* reaction i.
|
||||
@ -268,9 +269,20 @@ namespace Cantera {
|
||||
* @param k species index
|
||||
* @param n phase index for the species
|
||||
*/
|
||||
int kineticsSpeciesIndex(int k, int n) {
|
||||
int kineticsSpeciesIndex(int k, int n) const {
|
||||
return m_start[n] + k;
|
||||
}
|
||||
|
||||
string kineticsSpeciesName(int k) const {
|
||||
int np = m_start.size();
|
||||
for (int n = np-1; n >= 0; n--) {
|
||||
if (k >= m_start[n]) {
|
||||
return thermo(n).speciesName(k - m_start[n]);
|
||||
}
|
||||
}
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine will look up a species number based on
|
||||
* the input string nm. The lookup of species will
|
||||
@ -283,7 +295,7 @@ namespace Cantera {
|
||||
* is returned.
|
||||
* If no match is found, the value -2 is returned.
|
||||
*/
|
||||
int kineticsSpeciesIndex(string nm, string ph = "<any>") {
|
||||
int kineticsSpeciesIndex(string nm, string ph = "<any>") const {
|
||||
int np = m_thermo.size();
|
||||
int k;
|
||||
string id;
|
||||
@ -317,6 +329,17 @@ namespace Cantera {
|
||||
throw CanteraError("speciesPhase", "unknown species "+nm);
|
||||
}
|
||||
|
||||
thermo_t& speciesPhase(int k) {
|
||||
int np = m_start.size();
|
||||
for (int n = np-1; n >= 0; n--) {
|
||||
if (k >= m_start[n]) {
|
||||
return thermo(n);
|
||||
}
|
||||
}
|
||||
throw CanteraError("speciesPhase",
|
||||
"illegal species index: "+int2str(k));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepare the class for the addition of reactions. This function
|
||||
@ -440,6 +463,8 @@ namespace Cantera {
|
||||
map<string, int> m_phaseindex;
|
||||
int m_index;
|
||||
|
||||
int m_surfphase;
|
||||
|
||||
private:
|
||||
|
||||
vector<grouplist_t> m_dummygroups;
|
||||
|
@ -52,7 +52,7 @@ namespace Cantera {
|
||||
|
||||
|
||||
/**
|
||||
* Create a new thermo manager instance.
|
||||
* Create a new kinetics manager.
|
||||
*/
|
||||
inline Kinetics* newKineticsMgr(XML_Node& phase,
|
||||
vector<ThermoPhase*> th, KineticsFactory* f=0) {
|
||||
@ -64,7 +64,7 @@ namespace Cantera {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new thermo manager instance.
|
||||
* Create a new kinetics manager.
|
||||
*/
|
||||
inline Kinetics* newKineticsMgr(string model, KineticsFactory* f=0) {
|
||||
if (f == 0) {
|
||||
|
@ -22,14 +22,15 @@ EXT = ../../ext
|
||||
#----------------------
|
||||
|
||||
# basic components always needed
|
||||
BASE = Elements.o Constituents.o stringUtils.o misc.o importCTML.o plots.o \
|
||||
BASE = State.o Elements.o Constituents.o stringUtils.o misc.o importCTML.o plots.o \
|
||||
xml.o Phase.o DenseMatrix.o ctml.o funcs.o ctvector.o phasereport.o
|
||||
|
||||
# thermodynamic properties
|
||||
THERMO = $(BASE) ThermoPhase.o IdealGasPhase.o ConstDensityThermo.o SolidCompound.o SpeciesThermoFactory.o ThermoFactory.o
|
||||
|
||||
# homogeneous kinetics
|
||||
KINETICS = GRI_30_Kinetics.o KineticsFactory.o GasKinetics.o FalloffFactory.o GasKineticsWriter.o $(THERMO)
|
||||
KINETICS = GRI_30_Kinetics.o KineticsFactory.o GasKinetics.o FalloffFactory.o GasKineticsWriter.o \
|
||||
ReactionStoichMgr.o $(THERMO)
|
||||
|
||||
# heterogeneous kinetics
|
||||
HETEROKIN = InterfaceKinetics.o ImplicitSurfChem.o $(THERMO)
|
||||
|
@ -207,13 +207,13 @@ namespace Cantera {
|
||||
}
|
||||
|
||||
|
||||
void Phase::update_T(int n) const {
|
||||
m_T_updater.update(n);
|
||||
}
|
||||
// void Phase::update_T(int n) const {
|
||||
// m_T_updater.update(n);
|
||||
// }
|
||||
|
||||
void Phase::update_C(int n) const {
|
||||
m_C_updater.update(n);
|
||||
}
|
||||
// void Phase::update_C(int n) const {
|
||||
// m_C_updater.update(n);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Finished adding species, prepare to use them for calculation
|
||||
@ -238,11 +238,11 @@ namespace Cantera {
|
||||
return (m_kk > 0 && Constituents::ready() && State::ready());
|
||||
}
|
||||
|
||||
int Phase::installUpdater_T(Updater* u) {
|
||||
return m_T_updater.install(u);
|
||||
}
|
||||
// int Phase::installUpdater_T(Updater* u) {
|
||||
// return m_T_updater.install(u);
|
||||
// }
|
||||
|
||||
int Phase::installUpdater_C(Updater* u) {
|
||||
return m_C_updater.install(u);
|
||||
}
|
||||
// int Phase::installUpdater_C(Updater* u) {
|
||||
// return m_C_updater.install(u);
|
||||
// }
|
||||
}
|
||||
|
@ -50,9 +50,9 @@ namespace Cantera {
|
||||
virtual ~Phase(){ delete m_xml; }
|
||||
|
||||
XML_Node& xml() { return *m_xml; }
|
||||
string id() { return m_id; }
|
||||
string id() const { return m_id; }
|
||||
void setID(string id) {m_id = id;}
|
||||
int index() { return m_index; }
|
||||
int index() const { return m_index; }
|
||||
void setIndex(int m) { m_index = m; }
|
||||
|
||||
/**
|
||||
@ -154,9 +154,9 @@ namespace Cantera {
|
||||
*/
|
||||
doublereal chargeDensity() const;
|
||||
|
||||
void update_T(int n) const;
|
||||
//void update_T(int n) const;
|
||||
|
||||
void update_C(int n) const;
|
||||
//void update_C(int n) const;
|
||||
|
||||
/// Number of spatial dimensions (1, 2, or 3)
|
||||
int nDim() {return m_ndim;}
|
||||
@ -170,9 +170,9 @@ namespace Cantera {
|
||||
|
||||
virtual bool ready() const;
|
||||
|
||||
int installUpdater_T(Updater* u);
|
||||
// int installUpdater_T(Updater* u);
|
||||
|
||||
int installUpdater_C(Updater* u);
|
||||
// int installUpdater_C(Updater* u);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace Cantera {
|
||||
}
|
||||
|
||||
void SpeciesNode::printPaths() {
|
||||
for (int i = 0; i < m_paths.size(); i++) {
|
||||
for (int i = 0; i < int(m_paths.size()); i++) {
|
||||
cout << m_paths[i]->begin()->name << " --> "
|
||||
<< m_paths[i]->end()->name << ": "
|
||||
<< m_paths[i]->flow() << endl;
|
||||
@ -789,14 +789,13 @@ namespace Cantera {
|
||||
|
||||
string reactionLabel(int i, int kr, int nr, const vector_int& slist,
|
||||
const Kinetics& s) {
|
||||
|
||||
const Kinetics::thermo_t& ph = s.thermo();
|
||||
|
||||
|
||||
//int np = s.nPhases();
|
||||
string label = "";
|
||||
int l;
|
||||
for (l = 0; l < nr; l++) {
|
||||
if (l != kr)
|
||||
label += " + "+ ph.speciesName(slist[l]);
|
||||
label += " + "+ s.kineticsSpeciesName(slist[l]);
|
||||
}
|
||||
if (s.reactionType(i) == THREE_BODY_RXN)
|
||||
label += " + M ";
|
||||
@ -823,7 +822,7 @@ namespace Cantera {
|
||||
r.element = element;
|
||||
if (m < 0) return -1;
|
||||
|
||||
int k;
|
||||
//int k;
|
||||
int kk = ph.nSpecies();
|
||||
|
||||
s.getFwdRatesOfProgress(m_ropf.begin());
|
||||
@ -831,11 +830,11 @@ namespace Cantera {
|
||||
|
||||
ph.getMoleFractions(m_x.begin());
|
||||
|
||||
doublereal sum = 0.0;
|
||||
for (k = 0; k < kk; k++) {
|
||||
sum += m_x[k] * ph.nAtoms(k,m);
|
||||
}
|
||||
sum *= ph.molarDensity();
|
||||
//doublereal sum = 0.0;
|
||||
//for (k = 0; k < kk; k++) {
|
||||
// sum += m_x[k] * ph.nAtoms(k,m);
|
||||
//}
|
||||
//sum *= ph.molarDensity();
|
||||
|
||||
// species explicitly included or excluded
|
||||
vector<string>& in_nodes = r.included();
|
||||
@ -846,9 +845,9 @@ namespace Cantera {
|
||||
vector_int status;
|
||||
status.resize(kk,0);
|
||||
for (int ni = 0; ni < nin; ni++)
|
||||
status[ph.speciesIndex(in_nodes[ni])] = 1;
|
||||
status[s.kineticsSpeciesIndex(in_nodes[ni])] = 1;
|
||||
for (int ne = 0; ne < nout; ne++)
|
||||
status[ph.speciesIndex(out_nodes[ne])] = -1;
|
||||
status[s.kineticsSpeciesIndex(out_nodes[ne])] = -1;
|
||||
|
||||
for (i = 0; i < m_nr; i++)
|
||||
{
|
||||
|
@ -40,8 +40,8 @@ namespace Cantera {
|
||||
m_kk(0),
|
||||
m_tmin(0.0),
|
||||
m_tmax(0.0),
|
||||
m_p0(OneAtm),
|
||||
m_press(OneAtm),
|
||||
m_p0(OneAtm),
|
||||
m_tlast(-1.0) {}
|
||||
|
||||
virtual ~SolidCompound() {}
|
||||
@ -71,8 +71,6 @@ namespace Cantera {
|
||||
*/
|
||||
virtual doublereal intEnergy_mole() const {
|
||||
_updateThermo();
|
||||
// cout << "intEnergy: " << m_h0_RT[0] << " " << m_p0/molarDensity()
|
||||
// << endl;
|
||||
return GasConstant * temperature() * m_h0_RT[0]
|
||||
- m_p0 / molarDensity();
|
||||
}
|
||||
@ -82,7 +80,6 @@ namespace Cantera {
|
||||
*/
|
||||
virtual doublereal entropy_mole() const {
|
||||
_updateThermo();
|
||||
//cout << "s/r = " << m_s0_R[0] << endl;
|
||||
return GasConstant * m_s0_R[0];
|
||||
}
|
||||
|
||||
@ -170,7 +167,7 @@ namespace Cantera {
|
||||
protected:
|
||||
|
||||
int m_kk;
|
||||
doublereal m_tmin, m_tmax, m_p0, m_press;
|
||||
doublereal m_tmin, m_tmax, m_press, m_p0;
|
||||
|
||||
mutable doublereal m_tlast;
|
||||
mutable array_fp m_h0_RT;
|
||||
|
@ -32,33 +32,49 @@ namespace Cantera {
|
||||
|
||||
SpeciesThermoFactory* SpeciesThermoFactory::__factory = 0;
|
||||
|
||||
|
||||
static void getSpeciesThermoTypes(XML_Node* node,
|
||||
int& has_nasa, int& has_shomate, int& has_simple) {
|
||||
XML_Node& sparray = *node;
|
||||
vector<XML_Node*> sp;
|
||||
sparray.getChildren("species",sp);
|
||||
int ns = sp.size();
|
||||
for (int n = 0; n < ns; n++) {
|
||||
XML_Node& th = sp[n]->child("thermo");
|
||||
if (th.hasChild("NASA")) has_nasa = 1;
|
||||
if (th.hasChild("Shomate")) has_shomate = 1;
|
||||
if (th.hasChild("const_cp")) has_simple = 1;
|
||||
if (th.hasChild("poly")) {
|
||||
if (th.child("poly")["order"] == "1") has_simple = 1;
|
||||
else throw CanteraError("newSpeciesThermo",
|
||||
"poly with order > 1 not yet supported");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a species thermo manager to handle the parameterizations
|
||||
* specified in a CTML phase specification.
|
||||
*/
|
||||
SpeciesThermo* SpeciesThermoFactory::newSpeciesThermo(XML_Node* node) {
|
||||
XML_Node& sparray = *node; //node->child("speciesData");
|
||||
vector<XML_Node*> sp;
|
||||
sparray.getChildren("species",sp);
|
||||
int ns = sp.size();
|
||||
int inasa = 0;
|
||||
int ishomate = 0;
|
||||
int isimple = 0;
|
||||
for (int n = 0; n < ns; n++) {
|
||||
XML_Node& th = sp[n]->child("thermo");
|
||||
if (th.hasChild("NASA")) inasa = 1;
|
||||
if (th.hasChild("Shomate")) ishomate = 1;
|
||||
if (th.hasChild("const_cp")) isimple = 1;
|
||||
if (th.hasChild("poly")) {
|
||||
if (th.child("poly")["order"] == "1") isimple = 1;
|
||||
else throw CanteraError("newSpeciesThermo",
|
||||
"poly with order > 1 not yet supported");
|
||||
}
|
||||
}
|
||||
return newSpeciesThermo(NASA*inasa
|
||||
int inasa = 0, ishomate = 0, isimple = 0;
|
||||
getSpeciesThermoTypes(node, inasa, ishomate, isimple);
|
||||
return newSpeciesThermo(NASA*inasa
|
||||
+ SHOMATE*ishomate + SIMPLE*isimple);
|
||||
}
|
||||
|
||||
SpeciesThermo* SpeciesThermoFactory::newSpeciesThermo(vector<XML_Node*> nodes) {
|
||||
int n = nodes.size();
|
||||
int inasa = 0, ishomate = 0, isimple = 0;
|
||||
for (int j = 0; j < n; j++) {
|
||||
getSpeciesThermoTypes(nodes[j], inasa, ishomate, isimple);
|
||||
}
|
||||
return newSpeciesThermo(NASA*inasa
|
||||
+ SHOMATE*ishomate + SIMPLE*isimple);
|
||||
}
|
||||
|
||||
|
||||
SpeciesThermo* SpeciesThermoFactory::newSpeciesThermo(int type) {
|
||||
|
||||
switch (type) {
|
||||
|
@ -45,6 +45,7 @@ namespace Cantera {
|
||||
*/
|
||||
virtual SpeciesThermo* newSpeciesThermo(int type);
|
||||
virtual SpeciesThermo* newSpeciesThermo(XML_Node* node);
|
||||
virtual SpeciesThermo* newSpeciesThermo(vector<XML_Node*> nodes);
|
||||
|
||||
private:
|
||||
static SpeciesThermoFactory* __factory;
|
||||
@ -76,6 +77,15 @@ namespace Cantera {
|
||||
return sptherm;
|
||||
}
|
||||
|
||||
inline SpeciesThermo* newSpeciesThermoMgr(vector<XML_Node*> nodes,
|
||||
SpeciesThermoFactory* f=0) {
|
||||
if (f == 0) {
|
||||
f = SpeciesThermoFactory::factory();
|
||||
}
|
||||
SpeciesThermo* sptherm = f->newSpeciesThermo(nodes);
|
||||
return sptherm;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -226,8 +226,6 @@ namespace Cantera {
|
||||
|
||||
private:
|
||||
|
||||
doublereal m_temp, m_dens;
|
||||
|
||||
/**
|
||||
* Temperature. This is an independent variable
|
||||
* units = Kelvin
|
||||
|
@ -36,7 +36,7 @@ namespace Cantera {
|
||||
public:
|
||||
|
||||
SurfPhase(doublereal n0 = 0.0);
|
||||
virtual ~SurfPhase() {}
|
||||
virtual ~SurfPhase();
|
||||
virtual int eosType() const { return cSurf; }
|
||||
virtual doublereal enthalpy_mole() const;
|
||||
virtual doublereal intEnergy_mole() const;
|
||||
|
@ -74,72 +74,72 @@ namespace Cantera {
|
||||
return th;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a thermo manager to handle the parameterizations
|
||||
* specified in a CTML phase specification.
|
||||
*/
|
||||
ThermoPhase* ThermoFactory::newThermo(XML_Node& root, string id) {
|
||||
// /**
|
||||
// * Return a thermo manager to handle the parameterizations
|
||||
// * specified in a CTML phase specification.
|
||||
// */
|
||||
// ThermoPhase* ThermoFactory::newThermo(XML_Node& root, string id) {
|
||||
|
||||
// Find the node with the specified id, check that it is
|
||||
// a 'phase' node, and set the phase id to 'id'.
|
||||
XML_Node* ph;
|
||||
ph = root.findID(id);
|
||||
if (ph == 0) return 0; // false; // id not found
|
||||
XML_Node& node = *ph;
|
||||
// // Find the node with the specified id, check that it is
|
||||
// // a 'phase' node, and set the phase id to 'id'.
|
||||
// XML_Node* ph;
|
||||
// ph = root.findID(id);
|
||||
// if (ph == 0) return 0; // false; // id not found
|
||||
// XML_Node& node = *ph;
|
||||
|
||||
if (node.name() != "phase")
|
||||
throw CanteraError("newThermo","node with id = "+id
|
||||
+" is not a phase object.");
|
||||
// if (node.name() != "phase")
|
||||
// throw CanteraError("newThermo","node with id = "+id
|
||||
// +" is not a phase object.");
|
||||
|
||||
//Phase* p = new Phase;
|
||||
//p->setID(id); // set the phase id
|
||||
// //Phase* p = new Phase;
|
||||
// //p->setID(id); // set the phase id
|
||||
|
||||
// get equaton of state type
|
||||
XML_Node& eos = node.child("thermo");
|
||||
string eostype = eos["model"];
|
||||
int ieos=-1;
|
||||
for (int n = 0; n < ntypes; n++) {
|
||||
if (eostype == _types[n]) ieos = _itypes[n];
|
||||
}
|
||||
// // get equaton of state type
|
||||
// XML_Node& eos = node.child("thermo");
|
||||
// string eostype = eos["model"];
|
||||
// int ieos=-1;
|
||||
// for (int n = 0; n < ntypes; n++) {
|
||||
// if (eostype == _types[n]) ieos = _itypes[n];
|
||||
// }
|
||||
|
||||
// build species thermo manager
|
||||
SpeciesThermo* spthermo = newSpeciesThermoMgr(&node);
|
||||
// // build species thermo manager
|
||||
// SpeciesThermo* spthermo = newSpeciesThermoMgr(&node);
|
||||
|
||||
ThermoPhase* th=0;
|
||||
// doublereal dens;
|
||||
map<string, double> d;
|
||||
switch (ieos) {
|
||||
// ThermoPhase* th=0;
|
||||
// // doublereal dens;
|
||||
// map<string, double> d;
|
||||
// switch (ieos) {
|
||||
|
||||
case cIdealGas:
|
||||
th = new IdealGasPhase;
|
||||
break;
|
||||
// case cIdealGas:
|
||||
// th = new IdealGasPhase;
|
||||
// break;
|
||||
|
||||
case cIncompressible:
|
||||
th = new ConstDensityThermo;
|
||||
break;
|
||||
// case cIncompressible:
|
||||
// th = new ConstDensityThermo;
|
||||
// break;
|
||||
|
||||
case cSurf:
|
||||
th = new SurfPhase;
|
||||
break;
|
||||
// case cSurf:
|
||||
// th = new SurfPhase;
|
||||
// break;
|
||||
|
||||
case cMetal:
|
||||
th = new MetalPhase;
|
||||
break;
|
||||
// case cMetal:
|
||||
// th = new MetalPhase;
|
||||
// break;
|
||||
|
||||
case cSolidCompound:
|
||||
th = new SolidCompound;
|
||||
break;
|
||||
// case cSolidCompound:
|
||||
// th = new SolidCompound;
|
||||
// break;
|
||||
|
||||
default:
|
||||
throw CanteraError("newThermo",
|
||||
"newThermo: unknown equation of state: "+eostype);
|
||||
}
|
||||
th->setSpeciesThermo(spthermo);
|
||||
// default:
|
||||
// throw CanteraError("newThermo",
|
||||
// "newThermo: unknown equation of state: "+eostype);
|
||||
// }
|
||||
// th->setSpeciesThermo(spthermo);
|
||||
|
||||
// import the phase specification
|
||||
importPhase(node, th);
|
||||
// // import the phase specification
|
||||
// importPhase(node, th);
|
||||
|
||||
return th;
|
||||
}
|
||||
// return th;
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace Cantera {
|
||||
* Create a new thermodynamic property manager.
|
||||
* @param type the type to be created.
|
||||
*/
|
||||
virtual ThermoPhase* newThermo(XML_Node& node, string id);
|
||||
//virtual ThermoPhase* newThermo(XML_Node& node, string id);
|
||||
virtual ThermoPhase* newThermoPhase(string model);
|
||||
|
||||
private:
|
||||
@ -53,14 +53,14 @@ namespace Cantera {
|
||||
/**
|
||||
* Create a new thermo manager instance.
|
||||
*/
|
||||
inline ThermoPhase* newThermoMgr(XML_Node& root, string id,
|
||||
ThermoFactory* f=0) {
|
||||
if (f == 0) {
|
||||
f = ThermoFactory::factory();
|
||||
}
|
||||
ThermoPhase* therm = f->newThermo(root, id);
|
||||
return therm;
|
||||
}
|
||||
// inline ThermoPhase* newThermoMgr(XML_Node& root, string id,
|
||||
// ThermoFactory* f=0) {
|
||||
// if (f == 0) {
|
||||
// f = ThermoFactory::factory();
|
||||
// }
|
||||
// ThermoPhase* therm = f->newThermo(root, id);
|
||||
// return therm;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Create a new thermo manager instance.
|
||||
|
@ -199,6 +199,8 @@ namespace Cantera {
|
||||
err("setPressure");
|
||||
}
|
||||
|
||||
virtual void updateDensity() {}
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Potential Energy
|
||||
@ -231,12 +233,16 @@ namespace Cantera {
|
||||
}
|
||||
|
||||
void setElectricPotential(doublereal v) {
|
||||
int nsp = nSpecies();
|
||||
for (int k = 0; k < nsp; k++) {
|
||||
setPotentialEnergy(k, v*charge(k)*Faraday);
|
||||
}
|
||||
//int nsp = nSpecies();
|
||||
m_phi = v;
|
||||
//for (int k = 0; k < nsp; k++) {
|
||||
// setPotentialEnergy(k, v*charge(k)*Faraday);
|
||||
//}
|
||||
}
|
||||
|
||||
doublereal electricPotential() { return m_phi; }
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Chemical Potentials and Activities
|
||||
@ -594,6 +600,7 @@ namespace Cantera {
|
||||
m_spthermo = 0;
|
||||
m_index = -1;
|
||||
m_speciesData = 0;
|
||||
m_phi = 0.0;
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -605,6 +612,7 @@ namespace Cantera {
|
||||
|
||||
/// Index number
|
||||
int m_index;
|
||||
doublereal m_phi;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -16,7 +16,7 @@ OBJDIR = .
|
||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT)
|
||||
|
||||
# Temporarily removed 'filter.o', since it was causing a compile error on Mac OS X.
|
||||
OBJS = ck2ctml.o atomicWeightDB.o CKParser.o CKReader.o Reaction.o ckr_utils.o thermoFunctions.o writelog.o
|
||||
OBJS = ck2ctml.o atomicWeightDB.o CKParser.o CKReader.o Reaction.o ckr_utils.o thermoFunctions.o writelog.o ck2ct.o
|
||||
|
||||
CXX_INCLUDES = -I. -I..
|
||||
CONV_LIB = @buildlib@/libconverters.a
|
||||
|
462
Cantera/src/converters/ck2ct.cpp
Normal file
462
Cantera/src/converters/ck2ct.cpp
Normal file
@ -0,0 +1,462 @@
|
||||
/**
|
||||
* @file ck2ctml.cpp
|
||||
*
|
||||
* Convert CK-format reaction mechanism files to CTML format.
|
||||
*
|
||||
*/
|
||||
#ifdef WIN32
|
||||
#pragma warning(disable:4786)
|
||||
#pragma warning(disable:4503)
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#include "CKReader.h"
|
||||
#include "Reaction.h"
|
||||
#include "writelog.h"
|
||||
|
||||
#include "ck2ct.h"
|
||||
#include "../ct_defs.h"
|
||||
#include "ctml.h"
|
||||
using namespace Cantera;
|
||||
|
||||
namespace pip {
|
||||
|
||||
struct trdata {
|
||||
//trdata() {name = "-";}
|
||||
// string name;
|
||||
int geom;
|
||||
doublereal welldepth, diam, dipole, polar, rot;
|
||||
};
|
||||
|
||||
static map<string, trdata> _trmap;
|
||||
static bool _with_transport = false;
|
||||
|
||||
static void getTransportData(string trfile) {
|
||||
|
||||
_with_transport = true;
|
||||
ifstream s(trfile.c_str());
|
||||
if (!s) throw CanteraError("getTransportData",
|
||||
"could not open transport database "+trfile);
|
||||
|
||||
/*
|
||||
* The first thing we will do is to read the entire transport
|
||||
* database and place its contents into a map structure,
|
||||
* indexed by the name of the species.
|
||||
*/
|
||||
string rest;
|
||||
while (! s.eof()) {
|
||||
#ifdef USE_STRINGSTREAM
|
||||
/*
|
||||
* Read a line from the file
|
||||
*/
|
||||
getline(s, rest);
|
||||
/*
|
||||
* In the transport database, we allow comment lines that
|
||||
* consist of '#' and '!' as the first character in the
|
||||
* in the line. We also don't bother to parse short lines that
|
||||
* can't possibly have enough data in them to comprise a
|
||||
* properly formatted record.
|
||||
*/
|
||||
if (rest[0] != '#' && rest[0] != '!' && rest.size() > 5) {
|
||||
/*
|
||||
* copy the string into a stringstream and parse the line
|
||||
* into the trdata object
|
||||
*/
|
||||
std::istringstream ioline(rest);
|
||||
trdata t;
|
||||
string nm;
|
||||
ioline >> nm >> t.geom >> t.welldepth >> t.diam
|
||||
>> t.dipole >> t.polar >> t.rot;
|
||||
/*
|
||||
* Add the trdata object into the map database by making a
|
||||
* copy of it, and index it by the species name.
|
||||
*/
|
||||
if (nm != "") {
|
||||
_trmap[nm] = t; // t.name] = t;
|
||||
}
|
||||
}
|
||||
#else
|
||||
trdata t;
|
||||
string nm;
|
||||
s >> nm;
|
||||
if (nm[0] != '!' && !s.eof()) {
|
||||
s >> t.geom >> t.welldepth >> t.diam
|
||||
>> t.dipole >> t.polar >> t.rot;
|
||||
|
||||
// get the rest of the line, in case there are comments
|
||||
getline(s, rest);
|
||||
if (nm != "") {
|
||||
_trmap[nm] = t; // t.name] = t;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// add a NASA polynomial parameterization
|
||||
static void addNASA(
|
||||
const vector_fp& low, const vector_fp& high,
|
||||
doublereal minx, doublereal midx,
|
||||
doublereal maxx) {
|
||||
|
||||
printf(" thermo = (\n");
|
||||
printf(" NASA( [%8.2f, %8.2f], ", minx, midx);
|
||||
printf("[%17.9E, %17.9E, \n", low[0], low[1]);
|
||||
printf(" %17.9E, %17.9E, %17.9E,\n", low[2], low[3], low[4]);
|
||||
printf(" %17.9E, %17.9E] ),\n", low[5], low[6]);
|
||||
printf(" NASA( [%8.2f, %8.2f], ", midx, maxx);
|
||||
printf("[%17.9E, %17.9E, \n", high[0], high[1]);
|
||||
printf(" %17.9E, %17.9E, %17.9E,\n", high[2], high[3], high[4]);
|
||||
printf(" %17.9E, %17.9E] )\n", high[5], high[6]);
|
||||
printf(" )");
|
||||
}
|
||||
|
||||
|
||||
static void addTransportParams(string name) {
|
||||
|
||||
trdata td;
|
||||
if (_with_transport && _trmap.find(name) != _trmap.end()) {
|
||||
td = _trmap[name];
|
||||
}
|
||||
else {
|
||||
throw CanteraError("addTransportParams",
|
||||
"no transport data for species "+name);
|
||||
}
|
||||
|
||||
printf(",\n transport = gas_transport(\n");
|
||||
int geom = td.geom;
|
||||
switch (geom) {
|
||||
case 0: printf(" geom = \"atom\",\n"); break;
|
||||
case 1: printf(" geom = \"linear\",\n"); break;
|
||||
case 2: printf(" geom = \"nonlinear\",\n"); break;
|
||||
}
|
||||
printf(" diam = %8.2f,\n",td.diam);
|
||||
printf(" well_depth = %8.2f",td.welldepth);
|
||||
if (td.polar != 0.0)
|
||||
printf(",\n polar = %8.2f",td.polar);
|
||||
if (td.dipole != 0.0)
|
||||
printf(",\n dipole = %8.2f",td.dipole);
|
||||
if (td.rot != 0.0)
|
||||
printf(",\n rot_relax = %8.2f",td.rot);
|
||||
printf(")");
|
||||
}
|
||||
|
||||
|
||||
// static void addShomate(XML_Node& node,
|
||||
// const vector_fp& low, const vector_fp& high,
|
||||
// doublereal minx, doublereal midx,
|
||||
// doublereal maxx) {
|
||||
// XML_Node& f = node.addChild("Shomate");
|
||||
// if (minx != -999.0) f.addAttribute("Tmin",minx);
|
||||
// if (maxx != -999.0) f.addAttribute("Tmid",midx);
|
||||
// if (maxx != -999.0) f.addAttribute("Tmax",maxx);
|
||||
// addFloatArray(f,"low",low.size(),low.begin());
|
||||
// addFloatArray(f,"high",high.size(),high.begin());
|
||||
// }
|
||||
|
||||
|
||||
static void addFalloff(string type,
|
||||
const vector_fp& params) {
|
||||
if (type == "Troe") {
|
||||
cout << ",\n falloff = Troe(A = "
|
||||
<< fp2str(params[0]) << ", T3 = "
|
||||
<< fp2str(params[1]) << ", T1 = "
|
||||
<< fp2str(params[2]);
|
||||
if (params.size() >= 4) {
|
||||
cout << ", T2 = " << fp2str(params[3]);
|
||||
}
|
||||
cout << ")";
|
||||
}
|
||||
else if (type == "SRI") {
|
||||
cout << ",\n falloff = SRI(A = "
|
||||
<< fp2str(params[0]) << ", B = "
|
||||
<< fp2str(params[1]) << ", C = "
|
||||
<< fp2str(params[2]);
|
||||
if (params.size() >= 5) {
|
||||
cout << ", D = " << fp2str(params[3])
|
||||
<< ", E = " << fp2str(params[4]);
|
||||
}
|
||||
cout << ")";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* addSpecies():
|
||||
*
|
||||
*/
|
||||
static void addSpecies(string idtag, const ckr::Species& sp) {
|
||||
string spname = sp.name;
|
||||
printf("\nspecies(name = \"%s\",\n",spname.c_str());
|
||||
int nel = sp.elements.size();
|
||||
int m, num;
|
||||
string nm, str="";
|
||||
doublereal charge = 0.0;
|
||||
for (m = 0; m < nel; m++) {
|
||||
/*
|
||||
* Copy the element name into the string, nm. Lower case the
|
||||
* second letter, if needed.
|
||||
*/
|
||||
nm = sp.elements[m].name;
|
||||
nm[0] = toupper(nm[0]);
|
||||
if (nm.size() == 2) nm[1] = tolower(nm[1]);
|
||||
/*
|
||||
* Obtain the current number of atoms in the species.
|
||||
* Linearize the number (HKM question? can we employ real values here
|
||||
* instead?)
|
||||
*/
|
||||
num = int(sp.elements[m].number);
|
||||
/*
|
||||
* Add the name and number to end of the string, str
|
||||
*/
|
||||
str += " "+nm+":"+int2str(num)+" ";
|
||||
|
||||
/* if the species contains the special element E (electron),
|
||||
* then set the charge.
|
||||
*/
|
||||
if (nm == "E") charge = -sp.elements[m].number;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the child element, atomArray, to the species xml node.
|
||||
*/
|
||||
printf(" atoms = \"%s\",\n", str.c_str());
|
||||
addNASA(sp.lowCoeffs, sp.highCoeffs,
|
||||
sp.tlow, sp.tmid, sp.thigh);
|
||||
|
||||
if (_with_transport)
|
||||
addTransportParams(sp.name);
|
||||
printf("\n )\n");
|
||||
}
|
||||
|
||||
|
||||
static void addReaction(string idtag, int i,
|
||||
const ckr::Reaction& rxn,
|
||||
const ckr::ReactionUnits& runits, doublereal version) {
|
||||
|
||||
cout << "\n# Reaction " << i+1 << endl;
|
||||
string eqn = ckr::reactionEquation(rxn);
|
||||
cout << "reaction( \"" << eqn << "\", ";
|
||||
|
||||
if (rxn.isFalloffRxn) {
|
||||
if (rxn.kf.type == ckr::Arrhenius) {
|
||||
printf("\n k_inf = [%10.5E, %g, %g]", rxn.kf.A, rxn.kf.n, rxn.kf.E);
|
||||
}
|
||||
if (rxn.kf_aux.type == ckr::Arrhenius) {
|
||||
printf(",\n k_0 = [%10.5E, %g, %g]", rxn.kf_aux.A, rxn.kf_aux.n, rxn.kf_aux.E);
|
||||
}
|
||||
if (rxn.falloffType == ckr::Lindemann)
|
||||
addFalloff("Lindemann",rxn.falloffParameters);
|
||||
else if (rxn.falloffType == ckr::Troe)
|
||||
addFalloff("Troe",rxn.falloffParameters);
|
||||
else if (rxn.falloffType == ckr::SRI)
|
||||
addFalloff("SRI",rxn.falloffParameters);
|
||||
else
|
||||
throw CanteraError("addReaction","unknown falloff type");
|
||||
}
|
||||
else {
|
||||
if (rxn.kf.type == ckr::Arrhenius) {
|
||||
printf(" [%10.5E, %g, %g]", rxn.kf.A, rxn.kf.n, rxn.kf.E);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int ne = rxn.e3b.size();
|
||||
if (rxn.thirdBody != "<none>") {
|
||||
if (rxn.thirdBody != "M") {
|
||||
;
|
||||
}
|
||||
else if (ne > 0.0) {
|
||||
map<string, double>::const_iterator b = rxn.e3b.begin(),
|
||||
e = rxn.e3b.end();
|
||||
string estr = "";
|
||||
for (; b != e; ++b) {
|
||||
estr += " "+b->first+":"+fp2str(b->second)+" ";
|
||||
}
|
||||
cout << ",\n efficiencies = \"" << estr << "\"";
|
||||
}
|
||||
}
|
||||
cout << ")" << endl;
|
||||
}
|
||||
|
||||
void writeline() {
|
||||
cout << "#-------------------------------------------------------------------------------" << endl;
|
||||
}
|
||||
|
||||
/*!
|
||||
* This routine is the main routine. It
|
||||
*
|
||||
* @param r reference to a ckreader object that has already read a chemkin formatted
|
||||
* mechanism. This is the input to the routine.
|
||||
* @param root Reference to the root node of an XML description of the
|
||||
* mechanism. The node will be filled up with the description
|
||||
* of the mechanism. This is the output to the routine.
|
||||
*/
|
||||
void ck2ct(string idtag, ckr::CKReader& r) {
|
||||
|
||||
popError();
|
||||
doublereal version = 1.0;
|
||||
cout << "from ctmm import *" << endl;
|
||||
|
||||
cout << "dataset(\"" << idtag << "\")" << endl;
|
||||
|
||||
cout << "\n\n";
|
||||
writeline();
|
||||
cout << "#\n# The default units. These will be used for dimensional quantities" << endl
|
||||
<< "# with unspecified units." << endl;
|
||||
writeline();
|
||||
|
||||
cout << "units(length = \"cm\", time = \"s\", quantity = \"mol\", ";
|
||||
string e_unit;
|
||||
int eunit = r.units.ActEnergy;
|
||||
if (eunit == ckr::Cal_per_Mole)
|
||||
e_unit = "cal/mol";
|
||||
else if (eunit == ckr::Kcal_per_Mole)
|
||||
e_unit = "kcal/mol";
|
||||
else if (eunit == ckr::Joules_per_Mole)
|
||||
e_unit = "J/mol";
|
||||
else if (eunit == ckr::Kjoules_per_Mole)
|
||||
e_unit = "kJ/mol";
|
||||
else if (eunit == ckr::Kelvin)
|
||||
e_unit = "K";
|
||||
else if (eunit == ckr::Electron_Volts)
|
||||
e_unit = "eV";
|
||||
cout << "act_energy = " << "\"" << e_unit << "\")\n\n";
|
||||
|
||||
cout << "\n\n\n";
|
||||
writeline();
|
||||
cout << "#\n# The phase definition. This specifies an ideal gas mixture that" << endl
|
||||
<< "# includes all species and reactions defined in this file."
|
||||
<< "\n#\n";
|
||||
writeline();
|
||||
|
||||
|
||||
printf("ideal_gas(name = \"%s\",\n",idtag.c_str());
|
||||
|
||||
string enames;
|
||||
int nel = r.elements.size();
|
||||
int i;
|
||||
map<string, string> emap;
|
||||
string elnm;
|
||||
for (i = 0; i < nel; i++) {
|
||||
elnm = r.elements[i].name;
|
||||
elnm[0] = toupper(elnm[0]);
|
||||
if (elnm.size() == 2) elnm[1] = tolower(elnm[1]);
|
||||
emap[r.elements[i].name] = elnm;
|
||||
enames += " "+elnm+" ";
|
||||
//addElement(earray, idtag, r.elements[i]);
|
||||
}
|
||||
printf(" elements = \"%s\",\n",enames.c_str());
|
||||
|
||||
string spnames = "";
|
||||
int nsp = r.species.size();
|
||||
for (i = 0; i < nsp; i++) {
|
||||
spnames += " "+r.species[i].name+" ";
|
||||
if ((i+1) % 10 == 0) spnames += "\n ";
|
||||
}
|
||||
printf(" species = \"\"\"%s\"\"\",\n", spnames.c_str());
|
||||
printf(" reactions = \"all\"");
|
||||
cout << " )" << endl;
|
||||
|
||||
cout << "\n\n\n";
|
||||
writeline();
|
||||
cout << "#\n# Species data \n#\n";
|
||||
writeline();
|
||||
|
||||
for (i = 0; i < nsp; i++) {
|
||||
addSpecies(idtag, r.species[i]);
|
||||
}
|
||||
|
||||
cout << "\n\n\n";
|
||||
writeline();
|
||||
cout << "#\n# Reaction data \n#\n";
|
||||
writeline();
|
||||
|
||||
|
||||
int nrxns = r.reactions.size();
|
||||
|
||||
int irxn = 0;
|
||||
string idktag = idtag;
|
||||
for (i = 0; i < nrxns; i++) {
|
||||
|
||||
// if krev.A is non-zero, then the reverse rate coefficient is
|
||||
// being explicitly specified rather than being computed from
|
||||
// thermochemistry. In this case, convert the reaction into
|
||||
// two irreversible reactions.
|
||||
|
||||
if (r.reactions[i].krev.A != 0.0) {
|
||||
addReaction(idktag, irxn,
|
||||
ckr::forwardReaction(r.reactions[i]), r.units, version);
|
||||
irxn++;
|
||||
addReaction(idktag, irxn,
|
||||
ckr::reverseReaction(r.reactions[i]), r.units, version);
|
||||
irxn++;
|
||||
}
|
||||
|
||||
// Otherwise, just add the whole reaction, which may or may
|
||||
// not be reversible.
|
||||
else {
|
||||
addReaction(idktag, irxn, r.reactions[i],
|
||||
r.units, version);
|
||||
irxn++;
|
||||
}
|
||||
}
|
||||
// incl.addAttribute("min",1);
|
||||
// incl.addAttribute("max", irxn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int convert_ck(const char* in_file, const char* db_file,
|
||||
const char* tr_file, const char* id_tag) {
|
||||
ckr::CKReader r;
|
||||
r.validate = true;
|
||||
//int i=1;
|
||||
|
||||
string infile = string(in_file);
|
||||
string dbfile = string(db_file);
|
||||
string trfile = string(tr_file);
|
||||
//string outfile = string(out_file);
|
||||
string idtag = string(id_tag);
|
||||
string logfile;
|
||||
if (dbfile == "-") dbfile = "";
|
||||
if (trfile == "-") trfile = "";
|
||||
|
||||
struct tm *newtime;
|
||||
time_t aclock;
|
||||
::time( &aclock ); /* Get time in seconds */
|
||||
newtime = localtime( &aclock ); /* Convert time to struct tm form */
|
||||
|
||||
try {
|
||||
|
||||
logfile = "ck2ct.log";
|
||||
if (!r.read(infile, dbfile, logfile)) {
|
||||
throw CanteraError("convert_ck",
|
||||
"error encountered in input file " + string(infile)
|
||||
+ "\nsee file ck2ct.log for more information.\n");
|
||||
}
|
||||
|
||||
|
||||
cout << "#" << endl;
|
||||
cout << "# Generated from file "
|
||||
<< infile << "\n# by ck2ct on " << asctime(newtime) << "#\n" << endl;
|
||||
if (trfile != "") {
|
||||
cout << "# Transport data from file "+trfile+"." << endl;
|
||||
getTransportData(trfile);
|
||||
}
|
||||
ck2ct(idtag, r);
|
||||
cout << "write()" << endl;
|
||||
}
|
||||
catch (CanteraError) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
24
Cantera/src/converters/ck2ct.h
Normal file
24
Cantera/src/converters/ck2ct.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef CT_CK2CT_H
|
||||
#define CT_CK2CT_H
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <stdlib.h>
|
||||
|
||||
//#include "ctml.h"
|
||||
|
||||
namespace ckr{
|
||||
class CKReader;
|
||||
}
|
||||
|
||||
namespace pip {
|
||||
|
||||
void ck2ct(string idtag, ckr::CKReader& r);
|
||||
|
||||
int convert_ck(const char* in_file, const char* db_file,
|
||||
const char* tr_file, const char* id_tag);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -40,10 +40,12 @@ namespace ctml {
|
||||
doublereal maxx) {
|
||||
XML_Node& f = node.addChild("NASA");
|
||||
if (minx != -999.0) f.addAttribute("Tmin",minx);
|
||||
if (maxx != -999.0) f.addAttribute("Tmid",midx);
|
||||
if (maxx != -999.0) f.addAttribute("Tmax",maxx);
|
||||
addFloatArray(f,"low",low.size(),low.begin());
|
||||
addFloatArray(f,"high",high.size(),high.begin());
|
||||
if (midx != -999.0) f.addAttribute("Tmax",midx);
|
||||
addFloatArray(f,"coeffs",low.size(),low.begin());
|
||||
XML_Node& fh = node.addChild("NASA");
|
||||
if (midx != -999.0) fh.addAttribute("Tmin",midx);
|
||||
if (maxx != -999.0) fh.addAttribute("Tmax",maxx);
|
||||
addFloatArray(fh,"coeffs",high.size(),high.begin());
|
||||
}
|
||||
|
||||
/*
|
||||
@ -66,10 +68,27 @@ namespace ctml {
|
||||
|
||||
static void addArrhenius(XML_Node& node,
|
||||
doublereal A, doublereal b, doublereal E, int order,
|
||||
string unitsys, string E_units) {
|
||||
string id, string E_units) {
|
||||
|
||||
#ifdef OLD_VERSION
|
||||
// versions prior to 1.4.1
|
||||
string abe = fp2str(A)+" "+fp2str(b)+" "+fp2str(E);
|
||||
XML_Node& r = node.addChild("Arrhenius",abe);
|
||||
r.addAttribute("order",order);
|
||||
#else
|
||||
// version 1.4.1
|
||||
XML_Node& rn = node.addChild("Arrhenius");
|
||||
if (id != "") rn.addAttribute("name",id);
|
||||
string units;
|
||||
if (order == 1) units = "/s";
|
||||
else if (order == 2) units = "cm3/mol/s";
|
||||
else if (order == 3) units = "cm6/mol2/s";
|
||||
else throw CanteraError("addArrhenius",
|
||||
"unsupported rxn order: "+int2str(order));
|
||||
addFloat(rn, "A", A, units);
|
||||
addFloat(rn, "b", b);
|
||||
addFloat(rn, "E", E, E_units);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -273,17 +292,17 @@ namespace ctml {
|
||||
|
||||
|
||||
XML_Node& kf = r.addChild("rateCoeff");
|
||||
kf.addAttribute("units","mol,cm,s");
|
||||
kf.addAttribute("Eunits",e_unit);
|
||||
//kf.addAttribute("units","mol,cm,s");
|
||||
//kf.addAttribute("Eunits",e_unit);
|
||||
|
||||
//kf.addAttribute("id",r["id"]+"_kf");
|
||||
if (rxn.kf.type == ckr::Arrhenius)
|
||||
addArrhenius(kf, rxn.kf.A, rxn.kf.n, rxn.kf.E,
|
||||
int(order), "mol,cm,s", e_unit);
|
||||
int(order), "", e_unit);
|
||||
|
||||
if (rxn.isFalloffRxn) {
|
||||
addArrhenius(kf, rxn.kf_aux.A, rxn.kf_aux.n, rxn.kf_aux.E,
|
||||
int(order+1), "mol,cm,s", e_unit);
|
||||
int(order+1), "k0", e_unit);
|
||||
|
||||
if (rxn.falloffType == ckr::Lindemann)
|
||||
addFalloff(kf,"Lindemann",rxn.falloffParameters);
|
||||
@ -426,15 +445,15 @@ namespace ctml {
|
||||
addString(tr,"geometry","nonlinear"); break;
|
||||
default: ;
|
||||
}
|
||||
if (t.welldepth != 0.0)
|
||||
//if (t.welldepth != 0.0)
|
||||
addFloat(tr,"LJ_welldepth",t.welldepth,"Kelvin");
|
||||
if (t.diam != 0.0)
|
||||
//if (t.diam != 0.0)
|
||||
addFloat(tr,"LJ_diameter",t.diam,"A");
|
||||
if (t.dipole != 0.0)
|
||||
//if (t.dipole != 0.0)
|
||||
addFloat(tr,"dipoleMoment",t.dipole,"Debye");
|
||||
if (t.polar != 0.0)
|
||||
//if (t.polar != 0.0)
|
||||
addFloat(tr,"polarizability",t.polar,"A^3");
|
||||
if (t.rot != 0.0)
|
||||
//if (t.rot != 0.0)
|
||||
addFloat(tr,"rotRelax",t.rot);
|
||||
}
|
||||
}
|
||||
@ -562,6 +581,7 @@ namespace ctml {
|
||||
}
|
||||
|
||||
XML_Node root("ctml");
|
||||
root["version"] = CTML_Version;
|
||||
root.addComment("generated from "+infile+" by ck2ctml.");
|
||||
if (trfile != "")
|
||||
root.addComment("transport data from "+trfile+".");
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include "ctml.h"
|
||||
|
||||
#define CTML_VERSION_1_4_1
|
||||
|
||||
namespace ctml {
|
||||
|
||||
static doublereal fpValue(string val) {
|
||||
@ -69,11 +71,15 @@ namespace ctml {
|
||||
string type,
|
||||
doublereal minval,
|
||||
doublereal maxval) {
|
||||
|
||||
string fmt = "%17.9E";
|
||||
#ifdef CTML_VERSION_1_4
|
||||
XML_Node& f = node.addChild("float",val,fmt);
|
||||
f.addAttribute("title",title);
|
||||
if (type != "") f.addAttribute("type",type);
|
||||
#endif
|
||||
#ifdef CTML_VERSION_1_4_1
|
||||
XML_Node& f = node.addChild(title,val,fmt);
|
||||
#endif
|
||||
if (type != "") f.addAttribute("type",type);
|
||||
if (units != "") f.addAttribute("units",units);
|
||||
if (minval != Undef) f.addAttribute("min",minval);
|
||||
if (maxval != Undef) f.addAttribute("max",maxval);
|
||||
|
@ -26,6 +26,8 @@ using namespace Cantera;
|
||||
|
||||
namespace ctml {
|
||||
|
||||
const string CTML_Version = "1.4.1";
|
||||
|
||||
bool isBuiltin(string nm);
|
||||
|
||||
void addBool(XML_Node& node,
|
||||
|
@ -80,37 +80,70 @@ namespace Cantera {
|
||||
* Install a NASA polynomial thermodynamic property
|
||||
* parameterization for species k.
|
||||
*/
|
||||
void installNasaThermo(SpeciesThermo& sp, int k, XML_Node& f) {
|
||||
doublereal tmin, tmid, tmax;
|
||||
tmin = fpValue(f["Tmin"]);
|
||||
tmid = fpValue(f["Tmid"]);
|
||||
tmax = fpValue(f["Tmax"]);
|
||||
void installNasaThermo(SpeciesThermo& sp, int k, XML_Node& f0, XML_Node& f1) {
|
||||
doublereal tmin0, tmax0, tmin1, tmax1, tmin, tmid, tmax;
|
||||
|
||||
tmin0 = fpValue(f0["Tmin"]);
|
||||
tmax0 = fpValue(f0["Tmax"]);
|
||||
tmin1 = fpValue(f1["Tmin"]);
|
||||
tmax1 = fpValue(f1["Tmax"]);
|
||||
|
||||
vector<XML_Node*> fa;
|
||||
f.getChildren("floatArray",fa);
|
||||
vector_fp c0, c1;
|
||||
getFloatArray(*fa[0], c0, false);
|
||||
getFloatArray(*fa[1], c1, false);
|
||||
if (fabs(tmax0 - tmin1) < 0.01) {
|
||||
tmin = tmin0;
|
||||
tmid = tmax0;
|
||||
tmax = tmax1;
|
||||
getFloatArray(f0.child("floatArray"), c0, false);
|
||||
getFloatArray(f1.child("floatArray"), c1, false);
|
||||
}
|
||||
else if (fabs(tmax1 - tmin0) < 0.01) {
|
||||
tmin = tmin1;
|
||||
tmid = tmax1;
|
||||
tmax = tmax0;
|
||||
getFloatArray(f1.child("floatArray"), c0, false);
|
||||
getFloatArray(f0.child("floatArray"), c1, false);
|
||||
}
|
||||
else {
|
||||
throw CanteraError("installNasaThermo","non-continuous temperature ranges.");
|
||||
}
|
||||
array_fp c(15);
|
||||
c[0] = tmid;
|
||||
doublereal p0 = OneAtm;
|
||||
if ((*fa[0])["title"] == "low") {
|
||||
c[1] = c0[5];
|
||||
c[2] = c0[6];
|
||||
copy(c0.begin(), c0.begin()+5, c.begin() + 3);
|
||||
c[8] = c1[5];
|
||||
c[9] = c1[6];
|
||||
copy(c1.begin(), c1.begin()+5, c.begin() + 10);
|
||||
}
|
||||
else {
|
||||
c[1] = c1[5];
|
||||
c[2] = c1[6];
|
||||
copy(c1.begin(), c1.begin()+5, c.begin() + 3);
|
||||
c[8] = c0[5];
|
||||
c[9] = c0[6];
|
||||
copy(c0.begin(), c0.begin()+5, c.begin() + 10);
|
||||
}
|
||||
c[1] = c0[5];
|
||||
c[2] = c0[6];
|
||||
copy(c0.begin(), c0.begin()+5, c.begin() + 3);
|
||||
c[8] = c1[5];
|
||||
c[9] = c1[6];
|
||||
copy(c1.begin(), c1.begin()+5, c.begin() + 10);
|
||||
sp.install(k, NASA, c.begin(), tmin, tmax, p0);
|
||||
|
||||
// tmax = fpValue(f["Tmax"]);
|
||||
|
||||
// vector<XML_Node*> fa;
|
||||
// f.getChildren("floatArray",fa);
|
||||
// vector_fp c0, c1;
|
||||
// getFloatArray(*fa[0], c0, false);
|
||||
// getFloatArray(*fa[1], c1, false);
|
||||
// array_fp c(15);
|
||||
// c[0] = tmid;
|
||||
// doublereal p0 = OneAtm;
|
||||
// if ((*fa[0])["title"] == "low") {
|
||||
// c[1] = c0[5];
|
||||
// c[2] = c0[6];
|
||||
// copy(c0.begin(), c0.begin()+5, c.begin() + 3);
|
||||
// c[8] = c1[5];
|
||||
// c[9] = c1[6];
|
||||
// copy(c1.begin(), c1.begin()+5, c.begin() + 10);
|
||||
// }
|
||||
// else {
|
||||
// c[1] = c1[5];
|
||||
// c[2] = c1[6];
|
||||
// copy(c1.begin(), c1.begin()+5, c.begin() + 3);
|
||||
// c[8] = c0[5];
|
||||
// c[9] = c0[6];
|
||||
// copy(c0.begin(), c0.begin()+5, c.begin() + 10);
|
||||
// }
|
||||
// sp.install(k, NASA, c.begin(), tmin, tmax, p0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,10 +243,10 @@ namespace Cantera {
|
||||
int nc = tp.size();
|
||||
if (nc == 1) {
|
||||
XML_Node& f = *tp[0];
|
||||
if (f.name() == "NASA") {
|
||||
installNasaThermo(spthermo, k, f);
|
||||
}
|
||||
else if (f.name() == "Shomate") {
|
||||
//if (f.name() == "NASA") {
|
||||
// installNasaThermo(spthermo, k, f);
|
||||
//}
|
||||
if (f.name() == "Shomate") {
|
||||
installShomateThermo(spthermo, k, f);
|
||||
}
|
||||
else if (f.name() == "const_cp") {
|
||||
@ -222,7 +255,14 @@ namespace Cantera {
|
||||
else
|
||||
throw CanteraError("importCTML",
|
||||
"Unsupported species thermo parameterization"
|
||||
" for species "+s["name"]);
|
||||
" for species "+s["name"]+": "+f.name());
|
||||
}
|
||||
else if (nc == 2) {
|
||||
XML_Node& f0 = *tp[0];
|
||||
XML_Node& f1 = *tp[1];
|
||||
if (f0.name() == "NASA" && f1.name() == "NASA") {
|
||||
installNasaThermo(spthermo, k, f0, f1);
|
||||
}
|
||||
}
|
||||
else
|
||||
throw CanteraError("importCTML",
|
||||
@ -276,53 +316,43 @@ namespace Cantera {
|
||||
}
|
||||
|
||||
|
||||
void getArrhenius(XML_Node& node, int& order, doublereal& A, doublereal& b,
|
||||
void getArrhenius(XML_Node& node, int& highlow, doublereal& A, doublereal& b,
|
||||
doublereal& E) {
|
||||
|
||||
// get rxn order to do unit conversion for pre-exponential
|
||||
order = intValue(node["order"]);
|
||||
if (node["name"] == "k0")
|
||||
highlow = 0;
|
||||
else highlow = 1;
|
||||
|
||||
//nodeset_t c = node.children();
|
||||
A = getFloat(node, "A", "-");
|
||||
b = getFloat(node, "b");
|
||||
E = getFloat(node, "E", "-");
|
||||
E /= GasConstant;
|
||||
}
|
||||
|
||||
vector<string> abe;
|
||||
getStringArray(node, abe);
|
||||
A = fpValue(abe[0]);
|
||||
b = fpValue(abe[1]);
|
||||
E = fpValue(abe[2]);
|
||||
|
||||
string u = (*node.parent())["units"];
|
||||
string eu = (*node.parent())["Eunits"];
|
||||
|
||||
doublereal cmult = 1.0;
|
||||
if (u != "") {
|
||||
if (u == "mol,cm,s")
|
||||
cmult = 1.0e-6 / CtMoles_per_mole;
|
||||
else if (u == "molec,cm,s")
|
||||
cmult = 1.0e-6*Avogadro;
|
||||
void getStick(XML_Node& node, doublereal mw, Kinetics& kin,
|
||||
ReactionData& r, doublereal& A, doublereal& b, doublereal& E) {
|
||||
int nr = r.reactants.size();
|
||||
int k, ns, not_surf = 0;
|
||||
doublereal f = 1.0;
|
||||
for (int n = 0; n < nr; n++) {
|
||||
k = r.reactants[n];
|
||||
ns = r.rstoich[n];
|
||||
const ThermoPhase& p = kin.speciesPhase(k);
|
||||
if (p.eosType() == cSurf)
|
||||
f /= pow(p.standardConcentration(k),ns);
|
||||
else
|
||||
throw CanteraError("getArrhenius","unknown units for A");
|
||||
not_surf++;
|
||||
}
|
||||
A *= pow(cmult, order - 1);
|
||||
|
||||
doublereal gasConstant = 1.0;
|
||||
if (eu != "") {
|
||||
if (eu == "cal/mol")
|
||||
gasConstant = 1.987;
|
||||
else if (eu == "kcal/mol")
|
||||
gasConstant = 1.987e-3;
|
||||
else if (eu == "J/mol")
|
||||
gasConstant = 8.314;
|
||||
else if (eu == "kJ/mol")
|
||||
gasConstant = 8.314e-3;
|
||||
else if (eu == "K")
|
||||
gasConstant = 1.0;
|
||||
else if (eu == "eV")
|
||||
gasConstant = 1.0/11600.0;
|
||||
else
|
||||
throw CanteraError("getArrhenius",
|
||||
"unknown units for activation energy: "+eu);
|
||||
if (not_surf != 1) {
|
||||
throw CanteraError("getStick",
|
||||
"reaction probabilities can only be used in "
|
||||
"reactions with exactly 1 bulk species.");
|
||||
}
|
||||
E /= gasConstant;
|
||||
doublereal cbar = sqrt(8.0*GasConstant/(Pi*mw));
|
||||
A = 0.25 * getFloat(node, "A", "-") * cbar * f;
|
||||
b = getFloat(node, "b") + 0.5;
|
||||
E = getFloat(node, "E", "-");
|
||||
E /= GasConstant;
|
||||
}
|
||||
|
||||
|
||||
@ -384,36 +414,30 @@ namespace Cantera {
|
||||
int nc = kf.nChildren();
|
||||
const nodeset_t& kf_children = kf.children();
|
||||
vector_fp clow(3,0.0), chigh(3,0.0);
|
||||
int nr = nReacMolecules(rdata);
|
||||
// int nr = nReacMolecules(rdata);
|
||||
for (int m = 0; m < nc; m++) {
|
||||
node_t& c = *kf_children[m];
|
||||
string nm = c.name();
|
||||
int order=0;
|
||||
int highlow=0;
|
||||
|
||||
if (nm == "Arrhenius") {
|
||||
vector_fp coeff(3);
|
||||
getArrhenius(c, order, coeff[0], coeff[1], coeff[2]);
|
||||
if (order == 0) order = nr;
|
||||
if (order == nr || rdata.reactionType == THREE_BODY_RXN
|
||||
getArrhenius(c, highlow, coeff[0], coeff[1], coeff[2]);
|
||||
if (highlow == 1 || rdata.reactionType == THREE_BODY_RXN
|
||||
|| rdata.reactionType == ELEMENTARY_RXN)
|
||||
chigh = coeff;
|
||||
else if (order == nr + 1) clow = coeff;
|
||||
else {
|
||||
cerr << "\n\n\n" << endl;
|
||||
kf.write(cerr);
|
||||
throw CanteraError("importCTML",
|
||||
"wrong Arrhenius coeff order");
|
||||
}
|
||||
else clow = coeff;
|
||||
}
|
||||
// else if (nm == "Stick") {
|
||||
// vector_fp coeff(3);
|
||||
// string spname = c["species"];
|
||||
// ThermoPhase& th = kin.speciesPhase(spname);
|
||||
// int isp = th.speciesIndex(spname);
|
||||
// double mw = th.molecularWeights()[isp];
|
||||
// cbar = sqrt((8.0*GasConstant)/(Pi*mw));
|
||||
//
|
||||
// }
|
||||
else if (nm == "Stick") {
|
||||
vector_fp coeff(3);
|
||||
string spname = c["species"];
|
||||
ThermoPhase& th = kin.speciesPhase(spname);
|
||||
int isp = th.speciesIndex(spname);
|
||||
double mw = th.molecularWeights()[isp];
|
||||
getStick(c, mw, kin, rdata, coeff[0], coeff[1], coeff[2]);
|
||||
chigh = coeff;
|
||||
}
|
||||
|
||||
else if (nm == "falloff") {
|
||||
getFalloff(c, rdata);
|
||||
}
|
||||
@ -540,7 +564,7 @@ namespace Cantera {
|
||||
|
||||
|
||||
/*************************************************
|
||||
* Add the elements.
|
||||
* AddArrhethe elements.
|
||||
************************************************/
|
||||
|
||||
|
||||
@ -578,19 +602,27 @@ namespace Cantera {
|
||||
* the species database.
|
||||
***************************************************************/
|
||||
|
||||
XML_Node& species = phase.child("speciesArray");
|
||||
vector<XML_Node*> sparrays;
|
||||
phase.getChildren("speciesArray", sparrays);
|
||||
int jsp, nspa = sparrays.size();
|
||||
vector<XML_Node*> dbases;
|
||||
vector_int sprule(nspa,0);
|
||||
|
||||
int sprule = 0;
|
||||
if (species.hasChild("skip")) {
|
||||
XML_Node& sk = species.child("skip");
|
||||
string eskip = sk["element"];
|
||||
if (eskip == "undeclared") {
|
||||
sprule = 1;
|
||||
for (jsp = 0; jsp < nspa; jsp++) {
|
||||
|
||||
XML_Node& species = *sparrays[jsp]; // phase.child("speciesArray");
|
||||
|
||||
if (species.hasChild("skip")) {
|
||||
XML_Node& sk = species.child("skip");
|
||||
string eskip = sk["element"];
|
||||
if (eskip == "undeclared") {
|
||||
sprule[jsp] = 1;
|
||||
}
|
||||
}
|
||||
db = find_XML(species["datasrc"], &phase.root(), species["idRef"],
|
||||
"","speciesData");
|
||||
dbases.push_back(db);
|
||||
}
|
||||
|
||||
db = find_XML(species["datasrc"], &phase.root(), species["idRef"],
|
||||
"","speciesData");
|
||||
|
||||
|
||||
/*******************************************************
|
||||
@ -602,42 +634,55 @@ namespace Cantera {
|
||||
******************************************************/
|
||||
|
||||
delete &th->speciesThermo();
|
||||
SpeciesThermo* spth = newSpeciesThermoMgr(db);
|
||||
SpeciesThermo* spth = newSpeciesThermoMgr(dbases);
|
||||
th->setSpeciesThermo(spth);
|
||||
SpeciesThermo& spthermo = th->speciesThermo();
|
||||
|
||||
|
||||
/*
|
||||
* Get the array of species name strings.
|
||||
*/
|
||||
vector<string> spnames;
|
||||
getStringArray(species, spnames);
|
||||
int nsp = spnames.size();
|
||||
|
||||
map<string,bool> declared;
|
||||
string name;
|
||||
int k = 0;
|
||||
for (i = 0; i < nsp; i++) {
|
||||
name = spnames[i];
|
||||
|
||||
// Check that every species is only declared once
|
||||
if (declared[name]) {
|
||||
throw CanteraError("importPhase",
|
||||
"duplicate species: "+name);
|
||||
}
|
||||
declared[name] = true;
|
||||
for (jsp = 0; jsp < nspa; jsp++) {
|
||||
|
||||
XML_Node& species = *sparrays[jsp];
|
||||
db = dbases[jsp];
|
||||
|
||||
/*
|
||||
* Find the species in the database by name.
|
||||
*/
|
||||
XML_Node* s = db->findByAttr("name",spnames[i]);
|
||||
if (s) {
|
||||
if (installSpecies(k, *s, *th, spthermo, sprule))
|
||||
++k;
|
||||
* Get the array of species name strings.
|
||||
*/
|
||||
vector<string> spnames;
|
||||
getStringArray(species, spnames);
|
||||
int nsp = spnames.size();
|
||||
|
||||
if (nsp == 1 && spnames[0] == "all") {
|
||||
vector<XML_Node*> allsp;
|
||||
db->getChildren("species",allsp);
|
||||
nsp = allsp.size();
|
||||
spnames.resize(nsp);
|
||||
for (int nn = 0; nn < nsp; nn++) spnames[nn] = (*allsp[nn])["name"];
|
||||
}
|
||||
else {
|
||||
throw CanteraError("importPhase","no data for species "
|
||||
+name);
|
||||
|
||||
string name;
|
||||
for (i = 0; i < nsp; i++) {
|
||||
name = spnames[i];
|
||||
|
||||
// Check that every species is only declared once
|
||||
if (declared[name]) {
|
||||
throw CanteraError("importPhase",
|
||||
"duplicate species: "+name);
|
||||
}
|
||||
declared[name] = true;
|
||||
|
||||
/*
|
||||
* Find the species in the database by name.
|
||||
*/
|
||||
XML_Node* s = db->findByAttr("name",spnames[i]);
|
||||
if (s) {
|
||||
if (installSpecies(k, *s, *th, spthermo, sprule[jsp]))
|
||||
++k;
|
||||
}
|
||||
else {
|
||||
throw CanteraError("importPhase","no data for species "
|
||||
+name);
|
||||
}
|
||||
}
|
||||
}
|
||||
th->freezeSpecies();
|
||||
@ -661,7 +706,11 @@ namespace Cantera {
|
||||
int nn, eqlen;
|
||||
vector_fp dummy;
|
||||
|
||||
eqn = r("equation");
|
||||
if (r.hasChild("equation"))
|
||||
eqn = r("equation");
|
||||
else
|
||||
eqn = "<no equation>";
|
||||
|
||||
eqlen = eqn.size();
|
||||
for (nn = 0; nn < eqlen; nn++) {
|
||||
if (eqn[nn] == '[') eqn[nn] = '<';
|
||||
@ -677,7 +726,7 @@ namespace Cantera {
|
||||
ok = ok && getReagents(r, kin, -1, default_phase, rdata.products,
|
||||
rdata.pstoich, dummy, rule);
|
||||
if (!ok) {
|
||||
cout << "skipping " << eqn << endl;
|
||||
//cout << "skipping " << eqn << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -715,9 +764,6 @@ namespace Cantera {
|
||||
|
||||
bool installReactionArrays(XML_Node& p, Kinetics& kin,
|
||||
string default_phase) {
|
||||
|
||||
writer = new GasKineticsWriter;
|
||||
|
||||
vector<XML_Node*> rarrays;
|
||||
int itot = 0;
|
||||
p.getChildren("reactionArray",rarrays);
|
||||
@ -736,40 +782,50 @@ namespace Cantera {
|
||||
rxnrule = 1;
|
||||
}
|
||||
}
|
||||
|
||||
int i, nrxns = 0;
|
||||
vector<XML_Node*> incl;
|
||||
rxns.getChildren("include",incl);
|
||||
int ninc = incl.size();
|
||||
for (int nii = 0; nii < ninc; nii++) {
|
||||
int nrxns = 0;
|
||||
XML_Node& ii = *incl[nii];
|
||||
vector<string> rxn_ids;
|
||||
string pref = ii["prefix"];
|
||||
int imin = atoi(ii["min"].c_str());
|
||||
int imax = atoi(ii["max"].c_str());
|
||||
if (imin != 0 && imax != 0) {
|
||||
nrxns = imax - imin + 1;
|
||||
for (int nn=0; nn<nrxns; nn++) {
|
||||
rxn_ids.push_back(pref+int2str(imin+nn));
|
||||
}
|
||||
}
|
||||
|
||||
int i;
|
||||
|
||||
// if no 'include' directive, then include all reactions
|
||||
if (ninc == 0) {
|
||||
vector<XML_Node*> allrxns;
|
||||
rdata->getChildren("reaction",allrxns);
|
||||
nrxns = allrxns.size();
|
||||
for (i = 0; i < nrxns; i++) {
|
||||
XML_Node* r = rdata->findID(rxn_ids[i],1);
|
||||
XML_Node* r = allrxns[i];
|
||||
if (r) {
|
||||
if (installReaction(itot, *r, &kin,
|
||||
default_phase, rxnrule)) ++itot;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int nii = 0; nii < ninc; nii++) {
|
||||
nrxns = 0;
|
||||
XML_Node& ii = *incl[nii];
|
||||
vector<string> rxn_ids;
|
||||
string pref = ii["prefix"];
|
||||
int imin = atoi(ii["min"].c_str());
|
||||
int imax = atoi(ii["max"].c_str());
|
||||
if (imin != 0 && imax != 0) {
|
||||
nrxns = imax - imin + 1;
|
||||
for (int nn=0; nn<nrxns; nn++) {
|
||||
rxn_ids.push_back(pref+int2str(imin+nn));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < nrxns; i++) {
|
||||
XML_Node* r = rdata->findID(rxn_ids[i],1);
|
||||
if (r) {
|
||||
if (installReaction(itot, *r, &kin,
|
||||
default_phase, rxnrule)) ++itot;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
kin.finalize();
|
||||
ofstream fwrite("mech.cpp");
|
||||
//writer->writeGetNetProductionRates(cout, kin.nTotalSpecies(),
|
||||
// kin.nReactions());
|
||||
fwrite.close();
|
||||
delete writer;
|
||||
writer = 0;
|
||||
return true;
|
||||
}
|
||||
|
@ -45,33 +45,33 @@
|
||||
namespace Cantera {
|
||||
|
||||
|
||||
template<class S>
|
||||
struct UpdateSpeciesVisc : public Updater {
|
||||
UpdateSpeciesVisc(S& s) : Updater(), m_s(s) {}
|
||||
void update() { m_s._update_species_visc_T(); }
|
||||
S& m_s;
|
||||
};
|
||||
// template<class S>
|
||||
// struct UpdateSpeciesVisc : public Updater {
|
||||
// UpdateSpeciesVisc(S& s) : Updater(), m_s(s) {}
|
||||
// void update() { m_s._update_species_visc_T(); }
|
||||
// S& m_s;
|
||||
// };
|
||||
|
||||
template<class S>
|
||||
struct UpdateVisc_T : public Updater {
|
||||
UpdateVisc_T(S& s) : Updater(), m_s(s) {}
|
||||
void update() { m_s._update_visc_T(); }
|
||||
S& m_s;
|
||||
};
|
||||
// template<class S>
|
||||
// struct UpdateVisc_T : public Updater {
|
||||
// UpdateVisc_T(S& s) : Updater(), m_s(s) {}
|
||||
// void update() { m_s._update_visc_T(); }
|
||||
// S& m_s;
|
||||
// };
|
||||
|
||||
template<class S>
|
||||
struct UpdateDiff_T : public Updater {
|
||||
UpdateDiff_T(S& s) : Updater(), m_s(s) {}
|
||||
void update() { m_s._update_diff_T(); }
|
||||
S& m_s;
|
||||
};
|
||||
// template<class S>
|
||||
// struct UpdateDiff_T : public Updater {
|
||||
// UpdateDiff_T(S& s) : Updater(), m_s(s) {}
|
||||
// void update() { m_s._update_diff_T(); }
|
||||
// S& m_s;
|
||||
// };
|
||||
|
||||
template<class S>
|
||||
struct UpdateThermal_T : public Updater {
|
||||
UpdateThermal_T(S& s) : Updater(), m_s(s) {}
|
||||
void update() { m_s._update_thermal_T(); }
|
||||
S& m_s;
|
||||
};
|
||||
// template<class S>
|
||||
// struct UpdateThermal_T : public Updater {
|
||||
// UpdateThermal_T(S& s) : Updater(), m_s(s) {}
|
||||
// void update() { m_s._update_thermal_T(); }
|
||||
// S& m_s;
|
||||
// };
|
||||
|
||||
|
||||
/////////////////////////// constants //////////////////////////
|
||||
@ -189,6 +189,11 @@ namespace Cantera {
|
||||
m_l0000_ok = false;
|
||||
m_lmatrix_soln_ok = false;
|
||||
|
||||
m_diff_tlast = 0.0;
|
||||
m_spvisc_tlast = 0.0;
|
||||
m_visc_tlast = 0.0;
|
||||
m_thermal_tlast = 0.0;
|
||||
|
||||
// use LU decomposition by default
|
||||
m_gmres = false;
|
||||
|
||||
@ -223,19 +228,19 @@ namespace Cantera {
|
||||
m_sqrt_eps_k[k]/sq298);
|
||||
}
|
||||
|
||||
// install updaters
|
||||
m_update_transport_T = m_thermo->installUpdater_T(
|
||||
new UpdateTransport_T<MultiTransport>(*this));
|
||||
m_update_transport_C = m_thermo->installUpdater_C(
|
||||
new UpdateTransport_C<MultiTransport>(*this));
|
||||
m_update_spvisc_T = m_thermo->installUpdater_T(
|
||||
new UpdateSpeciesVisc<MultiTransport>(*this));
|
||||
m_update_visc_T = m_thermo->installUpdater_T(
|
||||
new UpdateVisc_T<MultiTransport>(*this));
|
||||
m_update_diff_T = m_thermo->installUpdater_T(
|
||||
new UpdateDiff_T<MultiTransport>(*this));
|
||||
m_update_thermal_T = m_thermo->installUpdater_T(
|
||||
new UpdateThermal_T<MultiTransport>(*this));
|
||||
// // install updaters
|
||||
// m_update_transport_T = m_thermo->installUpdater_T(
|
||||
// new UpdateTransport_T<MultiTransport>(*this));
|
||||
// m_update_transport_C = m_thermo->installUpdater_C(
|
||||
// new UpdateTransport_C<MultiTransport>(*this));
|
||||
// m_update_spvisc_T = m_thermo->installUpdater_T(
|
||||
// new UpdateSpeciesVisc<MultiTransport>(*this));
|
||||
// m_update_visc_T = m_thermo->installUpdater_T(
|
||||
// new UpdateVisc_T<MultiTransport>(*this));
|
||||
// m_update_diff_T = m_thermo->installUpdater_T(
|
||||
// new UpdateDiff_T<MultiTransport>(*this));
|
||||
// m_update_thermal_T = m_thermo->installUpdater_T(
|
||||
// new UpdateThermal_T<MultiTransport>(*this));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -551,14 +556,25 @@ namespace Cantera {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MultiTransport::updateTransport_T() {
|
||||
//m_thermo->update_T(m_update_transport_T);
|
||||
_update_transport_T();
|
||||
}
|
||||
|
||||
void MultiTransport::updateTransport_C() {
|
||||
// {m_thermo->update_C(m_update_transport_C);
|
||||
_update_transport_C();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update temperature-dependent quantities. This method is called
|
||||
* by the temperature property updater.
|
||||
*/
|
||||
void MultiTransport::_update_transport_T()
|
||||
{
|
||||
//if (m_temp == m_thermo->temperature()) return;
|
||||
if (m_temp == m_thermo->temperature()) return;
|
||||
|
||||
m_temp = m_thermo->temperature();
|
||||
m_logt = log(m_temp);
|
||||
@ -620,7 +636,10 @@ namespace Cantera {
|
||||
* from the polynomial fits at unit pressure (1 Pa).
|
||||
*/
|
||||
void MultiTransport::updateDiff_T() {
|
||||
m_thermo->update_T(m_update_diff_T);
|
||||
if (m_diff_tlast == m_thermo->temperature()) return;
|
||||
_update_diff_T();
|
||||
m_diff_tlast = m_thermo->temperature();
|
||||
//m_thermo->update_T(m_update_diff_T);
|
||||
}
|
||||
|
||||
void MultiTransport::_update_diff_T() {
|
||||
@ -661,7 +680,10 @@ namespace Cantera {
|
||||
* The flag m_visc_ok is set to true.
|
||||
*/
|
||||
void MultiTransport::updateSpeciesViscosities_T() {
|
||||
m_thermo->update_T(m_update_spvisc_T);
|
||||
if (m_spvisc_tlast == m_thermo->temperature()) return;
|
||||
_update_species_visc_T();
|
||||
//m_thermo->update_T(m_update_spvisc_T);
|
||||
m_spvisc_tlast = m_thermo->temperature();
|
||||
}
|
||||
|
||||
|
||||
@ -687,7 +709,10 @@ namespace Cantera {
|
||||
* @internal
|
||||
*/
|
||||
void MultiTransport::updateViscosity_T() {
|
||||
m_thermo->update_T(m_update_visc_T);
|
||||
if (m_visc_tlast == m_thermo->temperature()) return;
|
||||
_update_visc_T();
|
||||
//m_thermo->update_T(m_update_visc_T);
|
||||
m_visc_tlast = m_thermo->temperature();
|
||||
}
|
||||
|
||||
void MultiTransport::_update_visc_T() {
|
||||
@ -718,10 +743,14 @@ namespace Cantera {
|
||||
* thermal conductivity and thermal diffusion coefficients.
|
||||
*/
|
||||
void MultiTransport::updateThermal_T() {
|
||||
m_thermo->update_T(m_update_thermal_T);
|
||||
if (m_thermal_tlast == m_thermo->temperature()) return;
|
||||
_update_thermal_T();
|
||||
// m_thermo->update_T(m_update_thermal_T);
|
||||
m_thermal_tlast = m_thermo->temperature();
|
||||
}
|
||||
|
||||
void MultiTransport::_update_thermal_T() {
|
||||
|
||||
// we need species viscosities and binary diffusion
|
||||
// coefficients
|
||||
updateSpeciesViscosities_T();
|
||||
|
@ -141,9 +141,8 @@ namespace Cantera {
|
||||
* are the ones with names beginning with an underscore. These
|
||||
* are only called by the property updaters.
|
||||
*/
|
||||
|
||||
void updateTransport_T() {m_thermo->update_T(m_update_transport_T);}
|
||||
void updateTransport_C() {m_thermo->update_C(m_update_transport_C);}
|
||||
void updateTransport_T();
|
||||
void updateTransport_C();
|
||||
|
||||
void updateThermal_T();
|
||||
void updateViscosity_T();
|
||||
@ -167,13 +166,15 @@ namespace Cantera {
|
||||
|
||||
private:
|
||||
|
||||
int m_update_transport_T;
|
||||
int m_update_transport_C;
|
||||
int m_update_spvisc_T;
|
||||
int m_update_visc_T;
|
||||
int m_update_diff_T;
|
||||
int m_update_thermal_T;
|
||||
// int m_update_transport_T;
|
||||
// int m_update_transport_C;
|
||||
// int m_update_spvisc_T;
|
||||
// int m_update_visc_T;
|
||||
// int m_update_diff_T;
|
||||
// int m_update_thermal_T;
|
||||
|
||||
doublereal m_diff_tlast, m_spvisc_tlast, m_visc_tlast,
|
||||
m_thermal_tlast;
|
||||
|
||||
// mixture attributes
|
||||
int m_nsp;
|
||||
|
@ -691,12 +691,19 @@ namespace Cantera {
|
||||
getString(tr, "geometry", val, type);
|
||||
geom = gindx[val] - 100;
|
||||
map<string, doublereal> fv;
|
||||
getFloats(tr, fv, false);
|
||||
welldepth = fv["LJ_welldepth"];
|
||||
diam = fv["LJ_diameter"];
|
||||
dipole = fv["dipoleMoment"];
|
||||
polar = fv["polarizability"];
|
||||
rot = fv["rotRelax"];
|
||||
|
||||
welldepth = getFloat(tr, "LJ_welldepth");
|
||||
diam = getFloat(tr, "LJ_diameter");
|
||||
dipole = getFloat(tr, "dipoleMoment");
|
||||
polar = getFloat(tr, "polarizability");
|
||||
rot = getFloat(tr, "rotRelax");
|
||||
|
||||
//getFloats(tr, fv, false);
|
||||
//welldepth = fv["LJ_welldepth"];
|
||||
//diam = fv["LJ_diameter"];
|
||||
//dipole = fv["dipoleMoment"];
|
||||
//polar = fv["polarizability"];
|
||||
//rot = fv["rotRelax"];
|
||||
|
||||
TransportData data;
|
||||
data.speciesName = name;
|
||||
|
@ -25,6 +25,7 @@ namespace Cantera {
|
||||
string u = units, tok, tsub;
|
||||
int k;
|
||||
char action = '-';
|
||||
//if (units[0] == '/') action = '/';
|
||||
while (1 > 0) {
|
||||
k = u.find_first_of("/-");
|
||||
if (k >= 0)
|
||||
@ -32,7 +33,9 @@ namespace Cantera {
|
||||
else
|
||||
tok = u;
|
||||
tsize = tok.size();
|
||||
if (tok[tsize - 1] == '2') {
|
||||
if (tsize == 0)
|
||||
fctr = 1.0;
|
||||
else if (tok[tsize - 1] == '2') {
|
||||
tsub = tok.substr(0,tsize-1);
|
||||
fctr = m_u[tsub];
|
||||
fctr *= fctr;
|
||||
@ -42,6 +45,21 @@ namespace Cantera {
|
||||
fctr = m_u[tsub];
|
||||
fctr *= fctr*fctr;
|
||||
}
|
||||
else if (tok[tsize - 1] == '4') {
|
||||
tsub = tok.substr(0,tsize-1);
|
||||
fctr = m_u[tsub];
|
||||
fctr *= fctr*fctr*fctr;
|
||||
}
|
||||
else if (tok[tsize - 1] == '5') {
|
||||
tsub = tok.substr(0,tsize-1);
|
||||
fctr = m_u[tsub];
|
||||
fctr *= fctr*fctr*fctr*fctr;
|
||||
}
|
||||
else if (tok[tsize - 1] == '6') {
|
||||
tsub = tok.substr(0,tsize-1);
|
||||
fctr = m_u[tsub];
|
||||
fctr *= fctr*fctr*fctr*fctr*fctr;
|
||||
}
|
||||
else {
|
||||
tsub = tok;
|
||||
fctr = m_u[tok];
|
||||
@ -96,6 +114,12 @@ namespace Cantera {
|
||||
m_u["atm"] = 1.01325e5;
|
||||
m_u["bar"] = 1.0e5;
|
||||
m_u["Pa"] = 1.0;
|
||||
|
||||
// time
|
||||
m_u["s"] = 1.0;
|
||||
m_u["min"] = 60.0;
|
||||
m_u["hr"] = 3600.0;
|
||||
m_u["ms"] = 0.001;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
466
config/configure
vendored
466
config/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,11 @@ AC_INIT(Cantera.README)
|
||||
AC_CONFIG_HEADER(../config.h)
|
||||
AC_CONFIG_AUX_DIR(.)
|
||||
|
||||
echo
|
||||
echo "**************************************************************"
|
||||
echo " Cantera Configuration Script "
|
||||
echo "**************************************************************"
|
||||
echo
|
||||
|
||||
AC_DEFINE(NDEBUG)
|
||||
|
||||
@ -16,7 +21,29 @@ local_inst=1
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
prefix=${ac_default_prefix}
|
||||
local_inst=0
|
||||
if test ! -d ${prefix}; then
|
||||
echo
|
||||
echo "********************************************************************"
|
||||
echo "Installation directory /usr/local does not exist. Either create it and"
|
||||
echo "re-run configure, or specify another installation directory using the"
|
||||
echo "prefix option:"
|
||||
echo " ./configure --prefix=<installation_directory>"
|
||||
echo "********************************************************************"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Cantera will be installed in ${prefix}"
|
||||
if test ! -w ${prefix}; then
|
||||
echo "checking for write-access... no"
|
||||
echo
|
||||
echo "**** Since you do not have write-access to ${prefix}, you will need to"
|
||||
echo "**** run the 'make install' step as super-user."
|
||||
echo
|
||||
else
|
||||
echo "checking for write-access... yes"
|
||||
fi
|
||||
|
||||
AC_SUBST(prefix)
|
||||
AC_SUBST(local_inst)
|
||||
CANTERA_LIBDIR=$prefix/lib/cantera
|
||||
@ -221,24 +248,25 @@ AC_SUBST(CANTERA_DATA_DIR)
|
||||
AC_SUBST(CT_SHARED_LIB)
|
||||
|
||||
BUILD_CLIB=0
|
||||
#
|
||||
# Fortran 90 Interface
|
||||
#
|
||||
BUILD_F90=0
|
||||
if test "$BUILD_FORTRAN_90_INTERFACE" = "y"; then BUILD_F90=1; BUILD_CLIB=1; fi
|
||||
AC_SUBST(BUILD_F90)
|
||||
|
||||
#
|
||||
# Python Interface
|
||||
#
|
||||
BUILD_PYTHON=0
|
||||
if test "$BUILD_PYTHON_INTERFACE" != "n"; then
|
||||
if test -z "$PYTHON_CMD"; then
|
||||
if test -z "$PYTHON_CMD"; then
|
||||
AC_PATH_PROGS(PYTHON_CMD, python2 python, "none")
|
||||
if test "$PYTHON_CMD" != "none"; then BUILD_PYTHON=1; BUILD_CLIB=1; fi
|
||||
else
|
||||
BUILD_PYTHON=1
|
||||
fi
|
||||
if test "$PYTHON_CMD" != "none"; then
|
||||
if test "$BUILD_PYTHON_INTERFACE" != "n"; then
|
||||
BUILD_PYTHON=1; BUILD_CLIB=1
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "********************************************************************"
|
||||
echo "Configuration error. Python is required to build Cantera, but it"
|
||||
echo "cannot be found. Set environment variable PYTHON_CMD to the command to"
|
||||
echo "run the Python interpreter on your system, and run configure again."
|
||||
echo "********************************************************************"
|
||||
exit 1
|
||||
fi
|
||||
AC_SUBST(BUILD_PYTHON)
|
||||
|
||||
@ -274,7 +302,6 @@ AC_SUBST(CXX_DEPENDS)
|
||||
#---------------------------------
|
||||
|
||||
AC_PROG_F77()
|
||||
AC_SUBST(F90)
|
||||
|
||||
# if G77 is defined, then add a flag to turn off adding a second underscore
|
||||
# to procedures that have an underscore in the name
|
||||
@ -295,17 +322,9 @@ esac
|
||||
AC_SUBST(SHARED_CTLIB)
|
||||
AC_SUBST(mex_ext)
|
||||
|
||||
# filename extensions for Fortran 77 and Fortran 90
|
||||
# filename extensions for Fortran 77
|
||||
if test -z "$F77_EXT"; then F77_EXT=f; fi
|
||||
AC_SUBST(F77_EXT)
|
||||
if test -z "$F90_EXT"; then F90_EXT=f90; fi
|
||||
AC_SUBST(F90_EXT)
|
||||
|
||||
|
||||
if test -n "$FORT_MODULE_PATH_CMD"
|
||||
then FORT_MOD_PATH=$FORT_MODULE_PATH_CMD
|
||||
fi
|
||||
AC_SUBST(FORT_MOD_PATH)
|
||||
|
||||
|
||||
AC_LANG_CPLUSPLUS
|
||||
@ -405,6 +424,9 @@ AC_OUTPUT(../Cantera/Makefile \
|
||||
../test_problems/silane_equil/Makefile)
|
||||
# )
|
||||
|
||||
echo
|
||||
echo "Now type '${MAKE}' to build Cantera"
|
||||
echo
|
||||
# $Log: configure.in,v
|
||||
|
||||
|
||||
|
@ -1,296 +1,406 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-stylesheet type="text/xsl" href="ctml.xslt"?>
|
||||
<ctml xmlns="http://www.cantera.org"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cantera.org /Users/dgg/ctml.xsd">
|
||||
<!-- generated from air.inp by ck2ctml. -->
|
||||
<!-- transport data from ../transport/gri30_tran.dat. -->
|
||||
<phase id="air">
|
||||
<state>
|
||||
<temperature units="K">300</temperature>
|
||||
<pressure units="atm">1</pressure>
|
||||
<moleFractions>O:1.0</moleFractions>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<elementArray datasrc="elements.xml"> O N Ar </elementArray>
|
||||
<speciesArray datasrc="#air_species_data"> O O2 N NO NO2 N2O N2 AR </speciesArray>
|
||||
<reactionArray datasrc="#air_rxn_data">
|
||||
<include max="8" min="1" prefix="air_rxn_"/>
|
||||
</reactionArray>
|
||||
<kinetics model="GasKinetics"/>
|
||||
</phase>
|
||||
<!-- species data -->
|
||||
<speciesData id="air_species_data">
|
||||
<!-- O -->
|
||||
<species id="air_s_O" name="O">
|
||||
<note>L 1/90</note>
|
||||
<atomArray> O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low"> 3.168267100E+00,
|
||||
-3.279318840E-03, 6.643063960E-06,
|
||||
-6.128066240E-09, 2.112659710E-12,
|
||||
2.912225920E+04, 2.051933460E+00 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">atom</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">8.000000000E+01</float>
|
||||
<float title="LJ_diameter" units="A">2.750000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
<!-- O2 -->
|
||||
<species id="air_s_O2" name="O2">
|
||||
<note>TPIS89</note>
|
||||
<atomArray> O:2 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low"> 3.782456360E+00,
|
||||
-2.996734160E-03, 9.847302010E-06,
|
||||
-9.681295090E-09, 3.243728370E-12,
|
||||
-1.063943560E+03, 3.657675730E+00 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.074000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.458000000E+00</float>
|
||||
<float title="polarizability" units="A^3">1.600000000E+00</float>
|
||||
<float title="rotRelax">3.800000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
<!-- N -->
|
||||
<species id="air_s_N" name="N">
|
||||
<note>L 6/88</note>
|
||||
<atomArray> N:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="6000" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low"> 2.500000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00,
|
||||
5.610463700E+04, 4.193908700E+00 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">atom</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">7.140000000E+01</float>
|
||||
<float title="LJ_diameter" units="A">3.298000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
<!-- NO -->
|
||||
<species id="air_s_NO" name="NO">
|
||||
<note>RUS 78</note>
|
||||
<atomArray> N:1 O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="6000" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low"> 4.218476300E+00,
|
||||
-4.638976000E-03, 1.104102200E-05,
|
||||
-9.336135400E-09, 2.803577000E-12,
|
||||
9.844623000E+03, 2.280846400E+00 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">9.753000000E+01</float>
|
||||
<float title="LJ_diameter" units="A">3.621000000E+00</float>
|
||||
<float title="polarizability" units="A^3">1.760000000E+00</float>
|
||||
<float title="rotRelax">4.000000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
<!-- NO2 -->
|
||||
<species id="air_s_NO2" name="NO2">
|
||||
<note>L 7/88</note>
|
||||
<atomArray> N:1 O:2 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="6000" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low"> 3.944031200E+00,
|
||||
-1.585429000E-03, 1.665781200E-05,
|
||||
-2.047542600E-08, 7.835056400E-12,
|
||||
2.896617900E+03, 6.311991700E+00 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">nonlinear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">2.000000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.500000000E+00</float>
|
||||
<float title="rotRelax">1.000000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
<!-- N2O -->
|
||||
<species id="air_s_N2O" name="N2O">
|
||||
<note>L 7/88</note>
|
||||
<atomArray> N:2 O:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="6000" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low"> 2.257150200E+00,
|
||||
1.130472800E-02, -1.367131900E-05,
|
||||
9.681980600E-09, -2.930718200E-12,
|
||||
8.741774400E+03, 1.075799200E+01 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">2.324000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.828000000E+00</float>
|
||||
<float title="rotRelax">1.000000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
<!-- N2 -->
|
||||
<species id="air_s_N2" name="N2">
|
||||
<note>121286</note>
|
||||
<atomArray> N:2 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="5000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low"> 3.298677000E+00,
|
||||
1.408240400E-03, -3.963222000E-06,
|
||||
5.641515000E-09, -2.444854000E-12,
|
||||
-1.020899900E+03, 3.950372000E+00 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">9.753000000E+01</float>
|
||||
<float title="LJ_diameter" units="A">3.621000000E+00</float>
|
||||
<float title="polarizability" units="A^3">1.760000000E+00</float>
|
||||
<float title="rotRelax">4.000000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
<!-- AR -->
|
||||
<species id="air_s_AR" name="AR">
|
||||
<note>120186</note>
|
||||
<atomArray> Ar:1 </atomArray>
|
||||
<thermo>
|
||||
<NASA Tmax="5000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low"> 2.500000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00,
|
||||
-7.453750000E+02, 4.366000000E+00 </floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
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>
|
||||
<string title="geometry">atom</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.365000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.330000000E+00</float>
|
||||
</transport>
|
||||
</species>
|
||||
</speciesData>
|
||||
<!-- reaction data -->
|
||||
<reactionData id="air_rxn_data">
|
||||
<!-- air reaction 1 -->
|
||||
<reaction id="air_rxn_1" reversible="yes" type="threeBody">
|
||||
<equation>2 O + M [=] O2 + M</equation>
|
||||
<reactants> O:2 </reactants>
|
||||
<products> O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">1.2e+17 -1 0</Arrhenius>
|
||||
<efficiencies default="1"> AR:0.83 </efficiencies>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
<!-- air reaction 2 -->
|
||||
<reaction id="air_rxn_2" reversible="yes">
|
||||
<equation>N + NO [=] N2 + O</equation>
|
||||
<reactants> N:1 NO:1 </reactants>
|
||||
<products> N2:1 O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">2.7e+13 0 355</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
<!-- air reaction 3 -->
|
||||
<reaction id="air_rxn_3" reversible="yes">
|
||||
<equation>N + O2 [=] NO + O</equation>
|
||||
<reactants> N:1 O2:1 </reactants>
|
||||
<products> NO:1 O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">9e+09 1 6500</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
<!-- air reaction 4 -->
|
||||
<reaction id="air_rxn_4" reversible="yes">
|
||||
<equation>N2O + O [=] N2 + O2</equation>
|
||||
<reactants> N2O:1 O:1 </reactants>
|
||||
<products> N2:1 O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.4e+12 0 10810</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
<!-- air reaction 5 -->
|
||||
<reaction id="air_rxn_5" reversible="yes">
|
||||
<equation>N2O + O [=] 2 NO</equation>
|
||||
<reactants> N2O:1 O:1 </reactants>
|
||||
<products> NO:2 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">2.9e+13 0 23150</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
<!-- air reaction 6 -->
|
||||
<reaction id="air_rxn_6" reversible="yes" type="falloff">
|
||||
<equation>N2O (+ M) [=] N2 + O (+ M)</equation>
|
||||
<reactants> N2O:1 </reactants>
|
||||
<products> N2:1 O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="1">7.91e+10 0 56020</Arrhenius>
|
||||
<Arrhenius order="2">6.37e+14 0 56640</Arrhenius>
|
||||
<falloff type="Lindemann"/>
|
||||
<efficiencies default="1"> AR:0.625 </efficiencies>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
<!-- air reaction 7 -->
|
||||
<reaction id="air_rxn_7" reversible="yes" type="threeBody">
|
||||
<equation>NO + O + M [=] NO2 + M</equation>
|
||||
<reactants> NO:1 O:1 </reactants>
|
||||
<products> NO2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">1.06e+20 -1.41 0</Arrhenius>
|
||||
<efficiencies default="1"> AR:0.7 </efficiencies>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
<!-- air reaction 8 -->
|
||||
<reaction id="air_rxn_8" reversible="yes">
|
||||
<equation>NO2 + O [=] NO + O2</equation>
|
||||
<reactants> NO2:1 O:1 </reactants>
|
||||
<products> NO:1 O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">3.9e+12 0 -240</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
</reactionData>
|
||||
</ctml>
|
||||
<?xml version="1.0"?>
|
||||
<ctml>
|
||||
|
||||
<!-- generated from air.inp by ck2ctml. -->
|
||||
|
||||
<!-- transport data from ../transport/gri30_tran.dat. -->
|
||||
<phase id="air">
|
||||
<state>
|
||||
<temperature units="K">300</temperature>
|
||||
<pressure units="atm">1</pressure>
|
||||
<moleFractions>O:1.0</moleFractions>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<elementArray datasrc="elements.xml"> O N Ar </elementArray>
|
||||
<speciesArray datasrc="#air_species_data">
|
||||
O O2 N NO NO2 N2O N2 AR
|
||||
</speciesArray>
|
||||
<reactionArray datasrc="#air_rxn_data">
|
||||
<include max="8" min="1" prefix="air_rxn_"/>
|
||||
</reactionArray>
|
||||
<kinetics model="GasKinetics"/>
|
||||
</phase>
|
||||
|
||||
<!-- species data -->
|
||||
<speciesData id="air_species_data">
|
||||
|
||||
<!-- O -->
|
||||
<species id="air_s_O" name="O">
|
||||
<note>L 1/90</note>
|
||||
<atomArray> O:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">atom</string>
|
||||
<LJ_welldepth units="Kelvin">8.000000000E+01</LJ_welldepth>
|
||||
<LJ_diameter units="A">2.750000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- O2 -->
|
||||
<species id="air_s_O2" name="O2">
|
||||
<note>TPIS89</note>
|
||||
<atomArray> O:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.782456360E+00, -2.996734160E-03, 9.847302010E-06,
|
||||
-9.681295090E-09, 3.243728370E-12, -1.063943560E+03,
|
||||
3.657675730E+00
|
||||
</floatArray>
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="Kelvin">1.074000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.458000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">1.600000000E+00</polarizability>
|
||||
<rotRelax>3.800000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- N -->
|
||||
<species id="air_s_N" name="N">
|
||||
<note>L 6/88</note>
|
||||
<atomArray> N:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">atom</string>
|
||||
<LJ_welldepth units="Kelvin">7.140000000E+01</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.298000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- NO -->
|
||||
<species id="air_s_NO" name="NO">
|
||||
<note>RUS 78</note>
|
||||
<atomArray> N:1 O:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="Kelvin">9.753000000E+01</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.621000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">1.760000000E+00</polarizability>
|
||||
<rotRelax>4.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- NO2 -->
|
||||
<species id="air_s_NO2" name="NO2">
|
||||
<note>L 7/88</note>
|
||||
<atomArray> N:1 O:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">nonlinear</string>
|
||||
<LJ_welldepth units="Kelvin">2.000000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.500000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>1.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- N2O -->
|
||||
<species id="air_s_N2O" name="N2O">
|
||||
<note>L 7/88</note>
|
||||
<atomArray> N:2 O:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="Kelvin">2.324000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.828000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>1.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- N2 -->
|
||||
<species id="air_s_N2" name="N2">
|
||||
<note>121286</note>
|
||||
<atomArray> N:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">linear</string>
|
||||
<LJ_welldepth units="Kelvin">9.753000000E+01</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.621000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">1.760000000E+00</polarizability>
|
||||
<rotRelax>4.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
<!-- AR -->
|
||||
<species id="air_s_AR" name="AR">
|
||||
<note>120186</note>
|
||||
<atomArray> Ar:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">atom</string>
|
||||
<LJ_welldepth units="Kelvin">1.365000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.330000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
</speciesData>
|
||||
|
||||
<!-- reaction data -->
|
||||
<reactionData id="air_rxn_data">
|
||||
|
||||
<!-- air reaction 1 -->
|
||||
<reaction id="air_rxn_1" reversible="yes" type="threeBody">
|
||||
<equation>2 O + M [=] O2 + M</equation>
|
||||
<reactants> O:2 </reactants>
|
||||
<products> O2:1 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">1.200000000E+17</A>
|
||||
<b>-1.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1">
|
||||
AR:0.83
|
||||
</efficiencies>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
<!-- air reaction 2 -->
|
||||
<reaction id="air_rxn_2" reversible="yes">
|
||||
<equation>N + NO [=] N2 + O</equation>
|
||||
<reactants> N:1 NO:1 </reactants>
|
||||
<products> N2:1 O:1 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">2.700000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">3.550000000E+02</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
<!-- air reaction 3 -->
|
||||
<reaction id="air_rxn_3" reversible="yes">
|
||||
<equation>N + O2 [=] NO + O</equation>
|
||||
<reactants> N:1 O2:1 </reactants>
|
||||
<products> NO:1 O:1 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">9.000000000E+09</A>
|
||||
<b>1.000000000E+00</b>
|
||||
<E units="cal/mol">6.500000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
<!-- air reaction 4 -->
|
||||
<reaction id="air_rxn_4" reversible="yes">
|
||||
<equation>N2O + O [=] N2 + O2</equation>
|
||||
<reactants> N2O:1 O:1 </reactants>
|
||||
<products> N2:1 O2:1 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.400000000E+12</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">1.081000000E+04</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
<!-- air reaction 5 -->
|
||||
<reaction id="air_rxn_5" reversible="yes">
|
||||
<equation>N2O + O [=] 2 NO</equation>
|
||||
<reactants> N2O:1 O:1 </reactants>
|
||||
<products> NO:2 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">2.900000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">2.315000000E+04</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
<!-- air reaction 6 -->
|
||||
<reaction id="air_rxn_6" reversible="yes" type="falloff">
|
||||
<equation>N2O (+ M) [=] N2 + O (+ M)</equation>
|
||||
<reactants> N2O:1 </reactants>
|
||||
<products> N2:1 O:1 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="/s">7.910000000E+10</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">5.602000000E+04</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm3/mol/s">6.370000000E+14</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">5.664000000E+04</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Lindemann"/>
|
||||
<efficiencies default="1">
|
||||
AR:0.625
|
||||
</efficiencies>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
<!-- air reaction 7 -->
|
||||
<reaction id="air_rxn_7" reversible="yes" type="threeBody">
|
||||
<equation>NO + O + M [=] NO2 + M</equation>
|
||||
<reactants> NO:1 O:1 </reactants>
|
||||
<products> NO2:1 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">1.060000000E+20</A>
|
||||
<b>-1.410000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1">
|
||||
AR:0.7
|
||||
</efficiencies>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
<!-- air reaction 8 -->
|
||||
<reaction id="air_rxn_8" reversible="yes">
|
||||
<equation>NO2 + O [=] NO + O2</equation>
|
||||
<reactants> NO2:1 O:1 </reactants>
|
||||
<products> NO:1 O2:1 </products>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">3.900000000E+12</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">-2.400000000E+02</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
</reactionData>
|
||||
</ctml>
|
@ -28,24 +28,30 @@
|
||||
<species id="argon_s_AR" name="AR">
|
||||
<note>120186</note>
|
||||
<atomArray> Ar:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="5000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
2.500000000E+000, 0.000000000E+000, 0.000000000E+000,
|
||||
0.000000000E+000, 0.000000000E+000, -7.453750000E+002,
|
||||
4.366000000E+000
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
4.366000000E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
2.500000000E+000, 0.000000000E+000, 0.000000000E+000,
|
||||
0.000000000E+000, 0.000000000E+000, -7.453750000E+002,
|
||||
4.366000000E+000
|
||||
</NASA>
|
||||
<NASA Tmax="5000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
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>
|
||||
<string title="geometry">atom</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.365000000E+002</float>
|
||||
<float title="LJ_diameter" units="A">3.330000000E+000</float>
|
||||
<LJ_welldepth units="Kelvin">1.365000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.330000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
</speciesData>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<ctml>
|
||||
<elementData caseSensitive="no">
|
||||
<element name="H", atomicWt = "1.00794"/>
|
||||
<element name="D", atomicWt = "2.0"/>
|
||||
<element name="Tr", atomicWt = "3.0"/>
|
||||
<element name="D", atomicWt = "2.0147"/>
|
||||
<element name="Tr", atomicWt = "3.016327"/>
|
||||
<element name="He", atomicWt = "4.002602"/>
|
||||
<element name="Li", atomicWt = "6.941"/>
|
||||
<element name="Be", atomicWt = "9.012182"/>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,6 @@
|
||||
<include max="27" min="1" prefix="ohmech_rxn_"/>
|
||||
</reactionArray>
|
||||
<kinetics model="GasKinetics"/>
|
||||
<transport model="Mix"/>
|
||||
</phase>
|
||||
|
||||
<!-- species data -->
|
||||
@ -29,14 +28,17 @@
|
||||
<species id="ohmech_s_H2" name="H2">
|
||||
<note>TPIS78</note>
|
||||
<atomArray> H:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.344331120E+00, 7.980520750E-03, -1.947815100E-05,
|
||||
2.015720940E-08, -7.376117610E-12, -9.179351730E+02,
|
||||
6.830102380E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.337279200E+00, -4.940247310E-05, 4.994567780E-07,
|
||||
-1.795663940E-10, 2.002553760E-14, -9.501589220E+02,
|
||||
-3.205023310E+00
|
||||
@ -45,10 +47,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">linear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">3.800000000E+01</float>
|
||||
<float title="LJ_diameter" units="A">2.920000000E+00</float>
|
||||
<float title="polarizability" units="A^3">7.900000000E-01</float>
|
||||
<float title="rotRelax">2.800000000E+02</float>
|
||||
<LJ_welldepth units="Kelvin">3.800000000E+01</LJ_welldepth>
|
||||
<LJ_diameter units="A">2.920000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">7.900000000E-01</polarizability>
|
||||
<rotRelax>2.800000000E+02</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -56,14 +59,17 @@
|
||||
<species id="ohmech_s_H" name="H">
|
||||
<note>L 7/88</note>
|
||||
<atomArray> H:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000000E+00, 7.053328190E-13, -1.995919640E-15,
|
||||
2.300816320E-18, -9.277323320E-22, 2.547365990E+04,
|
||||
-4.466828530E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000010E+00, -2.308429730E-11, 1.615619480E-14,
|
||||
-4.735152350E-18, 4.981973570E-22, 2.547365990E+04,
|
||||
-4.466829140E-01
|
||||
@ -72,8 +78,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">atom</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.450000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">2.050000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">1.450000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">2.050000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -81,14 +90,17 @@
|
||||
<species id="ohmech_s_O" name="O">
|
||||
<note>L 1/90</note>
|
||||
<atomArray> O:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.168267100E+00, -3.279318840E-03, 6.643063960E-06,
|
||||
-6.128066240E-09, 2.112659710E-12, 2.912225920E+04,
|
||||
2.051933460E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.569420780E+00, -8.597411370E-05, 4.194845890E-08,
|
||||
-1.001777990E-11, 1.228336910E-15, 2.921757910E+04,
|
||||
4.784338640E+00
|
||||
@ -97,8 +109,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">atom</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">8.000000000E+01</float>
|
||||
<float title="LJ_diameter" units="A">2.750000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">8.000000000E+01</LJ_welldepth>
|
||||
<LJ_diameter units="A">2.750000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -106,14 +121,17 @@
|
||||
<species id="ohmech_s_O2" name="O2">
|
||||
<note>TPIS89</note>
|
||||
<atomArray> O:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.782456360E+00, -2.996734160E-03, 9.847302010E-06,
|
||||
-9.681295090E-09, 3.243728370E-12, -1.063943560E+03,
|
||||
3.657675730E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.282537840E+00, 1.483087540E-03, -7.579666690E-07,
|
||||
2.094705550E-10, -2.167177940E-14, -1.088457720E+03,
|
||||
5.453231290E+00
|
||||
@ -122,10 +140,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">linear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.074000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.458000000E+00</float>
|
||||
<float title="polarizability" units="A^3">1.600000000E+00</float>
|
||||
<float title="rotRelax">3.800000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">1.074000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.458000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">1.600000000E+00</polarizability>
|
||||
<rotRelax>3.800000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -133,14 +152,17 @@
|
||||
<species id="ohmech_s_OH" name="OH">
|
||||
<note>RUS 78</note>
|
||||
<atomArray> O:1 H:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.992015430E+00, -2.401317520E-03, 4.617938410E-06,
|
||||
-3.881133330E-09, 1.364114700E-12, 3.615080560E+03,
|
||||
-1.039254580E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.092887670E+00, 5.484297160E-04, 1.265052280E-07,
|
||||
-8.794615560E-11, 1.174123760E-14, 3.858657000E+03,
|
||||
4.476696100E+00
|
||||
@ -149,8 +171,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">linear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">8.000000000E+01</float>
|
||||
<float title="LJ_diameter" units="A">2.750000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">8.000000000E+01</LJ_welldepth>
|
||||
<LJ_diameter units="A">2.750000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -158,14 +183,17 @@
|
||||
<species id="ohmech_s_H2O" name="H2O">
|
||||
<note>L 8/89</note>
|
||||
<atomArray> H:2 O:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.198640560E+00, -2.036434100E-03, 6.520402110E-06,
|
||||
-5.487970620E-09, 1.771978170E-12, -3.029372670E+04,
|
||||
-8.490322080E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.033992490E+00, 2.176918040E-03, -1.640725180E-07,
|
||||
-9.704198700E-11, 1.682009920E-14, -3.000429710E+04,
|
||||
4.966770100E+00
|
||||
@ -174,10 +202,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">nonlinear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">5.724000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">2.605000000E+00</float>
|
||||
<float title="dipoleMoment" units="Debye">1.844000000E+00</float>
|
||||
<float title="rotRelax">4.000000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">5.724000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">2.605000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">1.844000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>4.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -185,14 +214,17 @@
|
||||
<species id="ohmech_s_HO2" name="HO2">
|
||||
<note>L 5/89</note>
|
||||
<atomArray> H:1 O:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.301798010E+00, -4.749120510E-03, 2.115828910E-05,
|
||||
-2.427638940E-08, 9.292251240E-12, 2.948080400E+02,
|
||||
3.716662450E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.017210900E+00, 2.239820130E-03, -6.336581500E-07,
|
||||
1.142463700E-10, -1.079085350E-14, 1.118567130E+02,
|
||||
3.785102150E+00
|
||||
@ -201,9 +233,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">nonlinear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.074000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.458000000E+00</float>
|
||||
<float title="rotRelax">1.000000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">1.074000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.458000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>1.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -211,14 +245,17 @@
|
||||
<species id="ohmech_s_H2O2" name="H2O2">
|
||||
<note>L 7/88</note>
|
||||
<atomArray> H:2 O:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.276112690E+00, -5.428224170E-04, 1.673357010E-05,
|
||||
-2.157708130E-08, 8.624543630E-12, -1.770258210E+04,
|
||||
3.435050740E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.165002850E+00, 4.908316940E-03, -1.901392250E-06,
|
||||
3.711859860E-10, -2.879083050E-14, -1.786178770E+04,
|
||||
2.916156620E+00
|
||||
@ -227,9 +264,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">nonlinear</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.074000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.458000000E+00</float>
|
||||
<float title="rotRelax">3.800000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">1.074000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.458000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>3.800000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
|
||||
@ -237,14 +276,17 @@
|
||||
<species id="ohmech_s_AR" name="AR">
|
||||
<note>120186</note>
|
||||
<atomArray> Ar:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="5000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
4.366000000E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="5000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
4.366000000E+00
|
||||
@ -253,8 +295,11 @@
|
||||
</thermo>
|
||||
<transport>
|
||||
<string title="geometry">atom</string>
|
||||
<float title="LJ_welldepth" units="Kelvin">1.365000000E+02</float>
|
||||
<float title="LJ_diameter" units="A">3.330000000E+00</float>
|
||||
<LJ_welldepth units="Kelvin">1.365000000E+02</LJ_welldepth>
|
||||
<LJ_diameter units="A">3.330000000E+00</LJ_diameter>
|
||||
<dipoleMoment units="Debye">0.000000000E+00</dipoleMoment>
|
||||
<polarizability units="A^3">0.000000000E+00</polarizability>
|
||||
<rotRelax>0.000000000E+00</rotRelax>
|
||||
</transport>
|
||||
</species>
|
||||
</speciesData>
|
||||
@ -267,8 +312,12 @@
|
||||
<equation>2 O + M [=] O2 + M</equation>
|
||||
<reactants> O:2 </reactants>
|
||||
<products> O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">1.2e+17 -1 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">1.200000000E+17</A>
|
||||
<b>-1.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1">
|
||||
AR:0.83 H2:2.4 H2O:15.4
|
||||
</efficiencies>
|
||||
@ -280,8 +329,12 @@
|
||||
<equation>O + H + M [=] OH + M</equation>
|
||||
<reactants> O:1 H:1 </reactants>
|
||||
<products> OH:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">5e+17 -1 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">5.000000000E+17</A>
|
||||
<b>-1.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1">
|
||||
AR:0.7 H2:2 H2O:6
|
||||
</efficiencies>
|
||||
@ -293,8 +346,12 @@
|
||||
<equation>O + H2 [=] H + OH</equation>
|
||||
<reactants> O:1 H2:1 </reactants>
|
||||
<products> H:1 OH:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">38700 2.7 6260</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">3.870000000E+04</A>
|
||||
<b>2.700000000E+00</b>
|
||||
<E units="cal/mol">6.260000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -303,8 +360,12 @@
|
||||
<equation>O + HO2 [=] OH + O2</equation>
|
||||
<reactants> O:1 HO2:1 </reactants>
|
||||
<products> OH:1 O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">2e+13 0 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">2.000000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -313,8 +374,12 @@
|
||||
<equation>O + H2O2 [=] OH + HO2</equation>
|
||||
<reactants> O:1 H2O2:1 </reactants>
|
||||
<products> OH:1 HO2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">9.63e+06 2 4000</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">9.630000000E+06</A>
|
||||
<b>2.000000000E+00</b>
|
||||
<E units="cal/mol">4.000000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -323,8 +388,12 @@
|
||||
<equation>H + 2 O2 [=] HO2 + O2</equation>
|
||||
<reactants> H:1 O2:2 </reactants>
|
||||
<products> HO2:1 O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">2.08e+19 -1.24 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">2.080000000E+19</A>
|
||||
<b>-1.240000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -333,8 +402,12 @@
|
||||
<equation>H + O2 + H2O [=] HO2 + H2O</equation>
|
||||
<reactants> H:1 O2:1 H2O:1 </reactants>
|
||||
<products> HO2:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">1.126e+19 -0.76 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">1.126000000E+19</A>
|
||||
<b>-7.600000000E-01</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -343,8 +416,12 @@
|
||||
<equation>H + O2 + AR [=] HO2 + AR</equation>
|
||||
<reactants> H:1 O2:1 AR:1 </reactants>
|
||||
<products> HO2:1 AR:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">7e+17 -0.8 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">7.000000000E+17</A>
|
||||
<b>-8.000000000E-01</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -353,8 +430,12 @@
|
||||
<equation>H + O2 [=] O + OH</equation>
|
||||
<reactants> H:1 O2:1 </reactants>
|
||||
<products> O:1 OH:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">2.65e+16 -0.6707 17041</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">2.650000000E+16</A>
|
||||
<b>-6.707000000E-01</b>
|
||||
<E units="cal/mol">1.704100000E+04</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -363,8 +444,12 @@
|
||||
<equation>2 H + M [=] H2 + M</equation>
|
||||
<reactants> H:2 </reactants>
|
||||
<products> H2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">1e+18 -1 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">1.000000000E+18</A>
|
||||
<b>-1.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1">
|
||||
AR:0.63 H2:0 H2O:0
|
||||
</efficiencies>
|
||||
@ -376,8 +461,12 @@
|
||||
<equation>2 H + H2 [=] 2 H2</equation>
|
||||
<reactants> H:2 H2:1 </reactants>
|
||||
<products> H2:2 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">9e+16 -0.6 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">9.000000000E+16</A>
|
||||
<b>-6.000000000E-01</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -386,8 +475,12 @@
|
||||
<equation>2 H + H2O [=] H2 + H2O</equation>
|
||||
<reactants> H:2 H2O:1 </reactants>
|
||||
<products> H2:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">6e+19 -1.25 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">6.000000000E+19</A>
|
||||
<b>-1.250000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -396,8 +489,12 @@
|
||||
<equation>H + OH + M [=] H2O + M</equation>
|
||||
<reactants> H:1 OH:1 </reactants>
|
||||
<products> H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">2.2e+22 -2 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">2.200000000E+22</A>
|
||||
<b>-2.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
<efficiencies default="1">
|
||||
AR:0.38 H2:0.73 H2O:3.65
|
||||
</efficiencies>
|
||||
@ -409,8 +506,12 @@
|
||||
<equation>H + HO2 [=] O + H2O</equation>
|
||||
<reactants> H:1 HO2:1 </reactants>
|
||||
<products> O:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">3.97e+12 0 671</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">3.970000000E+12</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">6.710000000E+02</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -419,8 +520,12 @@
|
||||
<equation>H + HO2 [=] O2 + H2</equation>
|
||||
<reactants> H:1 HO2:1 </reactants>
|
||||
<products> O2:1 H2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">4.48e+13 0 1068</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">4.480000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">1.068000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -429,8 +534,12 @@
|
||||
<equation>H + HO2 [=] 2 OH</equation>
|
||||
<reactants> H:1 HO2:1 </reactants>
|
||||
<products> OH:2 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">8.4e+13 0 635</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">8.400000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">6.350000000E+02</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -439,8 +548,12 @@
|
||||
<equation>H + H2O2 [=] HO2 + H2</equation>
|
||||
<reactants> H:1 H2O2:1 </reactants>
|
||||
<products> HO2:1 H2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.21e+07 2 5200</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.210000000E+07</A>
|
||||
<b>2.000000000E+00</b>
|
||||
<E units="cal/mol">5.200000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -449,8 +562,12 @@
|
||||
<equation>H + H2O2 [=] OH + H2O</equation>
|
||||
<reactants> H:1 H2O2:1 </reactants>
|
||||
<products> OH:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1e+13 0 3600</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.000000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">3.600000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -459,8 +576,12 @@
|
||||
<equation>OH + H2 [=] H + H2O</equation>
|
||||
<reactants> OH:1 H2:1 </reactants>
|
||||
<products> H:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">2.16e+08 1.51 3430</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">2.160000000E+08</A>
|
||||
<b>1.510000000E+00</b>
|
||||
<E units="cal/mol">3.430000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -469,9 +590,17 @@
|
||||
<equation>2 OH (+ M) [=] H2O2 (+ M)</equation>
|
||||
<reactants> OH:2 </reactants>
|
||||
<products> H2O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">7.4e+13 -0.37 0</Arrhenius>
|
||||
<Arrhenius order="3">2.3e+18 -0.9 -1700</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">7.400000000E+13</A>
|
||||
<b>-3.700000000E-01</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm6/mol2/s">2.300000000E+18</A>
|
||||
<b>-9.000000000E-01</b>
|
||||
<E units="cal/mol">-1.700000000E+03</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Troe"> 0.7346 94 1756 5182 </falloff>
|
||||
<efficiencies default="1">
|
||||
AR:0.7 H2:2 H2O:6
|
||||
@ -484,8 +613,12 @@
|
||||
<equation>2 OH [=] O + H2O</equation>
|
||||
<reactants> OH:2 </reactants>
|
||||
<products> O:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">35700 2.4 -2110</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">3.570000000E+04</A>
|
||||
<b>2.400000000E+00</b>
|
||||
<E units="cal/mol">-2.110000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -494,8 +627,12 @@
|
||||
<equation>OH + HO2 [=] O2 + H2O</equation>
|
||||
<reactants> OH:1 HO2:1 </reactants>
|
||||
<products> O2:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.45e+13 0 -500</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.450000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">-5.000000000E+02</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<duplicate>idtag_rxn_27</duplicate>
|
||||
</reaction>
|
||||
@ -505,8 +642,12 @@
|
||||
<equation>OH + H2O2 [=] HO2 + H2O</equation>
|
||||
<reactants> OH:1 H2O2:1 </reactants>
|
||||
<products> HO2:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">2e+12 0 427</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">2.000000000E+12</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">4.270000000E+02</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<duplicate>idtag_rxn_24</duplicate>
|
||||
</reaction>
|
||||
@ -516,8 +657,12 @@
|
||||
<equation>OH + H2O2 [=] HO2 + H2O</equation>
|
||||
<reactants> OH:1 H2O2:1 </reactants>
|
||||
<products> HO2:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.7e+18 0 29410</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.700000000E+18</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">2.941000000E+04</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<duplicate>idtag_rxn_23</duplicate>
|
||||
</reaction>
|
||||
@ -527,8 +672,12 @@
|
||||
<equation>2 HO2 [=] O2 + H2O2</equation>
|
||||
<reactants> HO2:2 </reactants>
|
||||
<products> O2:1 H2O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.3e+11 0 -1630</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.300000000E+11</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">-1.630000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<duplicate>idtag_rxn_26</duplicate>
|
||||
</reaction>
|
||||
@ -538,8 +687,12 @@
|
||||
<equation>2 HO2 [=] O2 + H2O2</equation>
|
||||
<reactants> HO2:2 </reactants>
|
||||
<products> O2:1 H2O2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">4.2e+14 0 12000</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">4.200000000E+14</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">1.200000000E+04</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<duplicate>idtag_rxn_25</duplicate>
|
||||
</reaction>
|
||||
@ -549,8 +702,12 @@
|
||||
<equation>OH + HO2 [=] O2 + H2O</equation>
|
||||
<reactants> OH:1 HO2:1 </reactants>
|
||||
<products> O2:1 H2O:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">5e+15 0 17330</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">5.000000000E+15</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">1.733000000E+04</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
<duplicate>idtag_rxn_22</duplicate>
|
||||
</reaction>
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
../../bin/ck2ctml -i gri30.inp -id gri30 -o gri30.xml -tr ../transport/gri30_tran.dat
|
||||
../../bin/ck2ctml -i air.inp -o air.xml -t gri30.inp -id air -tr ../transport/gri30_tran.dat
|
||||
../../bin/ck2ctml -i h2o2.inp -o h2o2.xml -id ohmech -tr ../transport/gri30_tran.dat
|
||||
../../bin/ck2ctml -i silane.inp -o silane.xml -id silane
|
||||
../../bin/ck2ctml -i argon.inp -o argon.xml -id argon -t gri30.inp -tr ../transport/gri30_tran.dat
|
||||
../../bin/ck2ctml -i gri30.inp -id gri30 -o gri30_data.xml -tr ../transport/gri30_tran.dat > gri30.in
|
||||
../../bin/ck2ctml -i air.inp -o air.xml -t gri30.inp -id air -tr ../transport/gri30_tran.dat > air.in
|
||||
../../bin/ck2ctml -i h2o2.inp -o h2o2.xml -id ohmech -tr ../transport/gri30_tran.dat > h2o2.in
|
||||
../../bin/ck2ctml -i silane.inp -o silane.xml -id silane > silane.in
|
||||
../../bin/ck2ctml -i argon.inp -o argon.xml -id argon -t gri30.inp -tr ../transport/gri30_tran.dat > argon.in
|
||||
|
||||
|
@ -27,14 +27,17 @@
|
||||
<species id="silane_s_H2" name="H2">
|
||||
<note>TPIS78</note>
|
||||
<atomArray> H:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.344331120E+00, 7.980520750E-03, -1.947815100E-05,
|
||||
2.015720940E-08, -7.376117610E-12, -9.179351730E+02,
|
||||
6.830102380E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.337279200E+00, -4.940247310E-05, 4.994567780E-07,
|
||||
-1.795663940E-10, 2.002553760E-14, -9.501589220E+02,
|
||||
-3.205023310E+00
|
||||
@ -47,14 +50,17 @@
|
||||
<species id="silane_s_H" name="H">
|
||||
<note>L 7/88</note>
|
||||
<atomArray> H:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3500" Tmid="1000" Tmin="200">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="200">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000000E+00, 7.053328190E-13, -1.995919640E-15,
|
||||
2.300816320E-18, -9.277323320E-22, 2.547365990E+04,
|
||||
-4.466828530E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3500" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000010E+00, -2.308429730E-11, 1.615619480E-14,
|
||||
-4.735152350E-18, 4.981973570E-22, 2.547365990E+04,
|
||||
-4.466829140E-01
|
||||
@ -67,14 +73,17 @@
|
||||
<species id="silane_s_HE" name="HE">
|
||||
<note>120186</note>
|
||||
<atomArray> He:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="5000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
9.153488000E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="5000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.500000000E+00, 0.000000000E+00, 0.000000000E+00,
|
||||
0.000000000E+00, 0.000000000E+00, -7.453750000E+02,
|
||||
9.153489000E-01
|
||||
@ -87,14 +96,17 @@
|
||||
<species id="silane_s_SIH4" name="SIH4">
|
||||
<note>90784</note>
|
||||
<atomArray> Si:1 H:4 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="2000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
1.451640400E+00, 1.398736300E-02, -4.234563900E-06,
|
||||
-2.360614200E-09, 1.371208900E-12, 3.113410500E+03,
|
||||
1.232185500E+01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="2000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
7.935938000E-01, 1.767189900E-02, -1.139800900E-05,
|
||||
3.599260400E-09, -4.524157100E-13, 3.198212700E+03,
|
||||
1.524225700E+01
|
||||
@ -107,14 +119,17 @@
|
||||
<species id="silane_s_SI" name="SI">
|
||||
<note>J 3/67</note>
|
||||
<atomArray> Si:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="5000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.179353700E+00, -2.764699200E-03, 4.478403800E-06,
|
||||
-3.283317700E-09, 9.121363100E-13, 5.333903200E+04,
|
||||
2.727320400E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="5000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.650601400E+00, -3.576385200E-04, 2.959229300E-07,
|
||||
-7.280482900E-11, 5.796332900E-15, 5.343705400E+04,
|
||||
5.220405700E+00
|
||||
@ -127,14 +142,17 @@
|
||||
<species id="silane_s_SIH" name="SIH">
|
||||
<note>121986</note>
|
||||
<atomArray> Si:1 H:1 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="2000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.836010000E+00, -2.702657000E-03, 6.849070000E-06,
|
||||
-5.424184000E-09, 1.472131000E-12, 4.507593000E+04,
|
||||
9.350778000E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="2000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.110430000E+00, 1.094946000E-03, 2.898629000E-08,
|
||||
-2.745104000E-10, 7.051799000E-14, 4.516898000E+04,
|
||||
4.193487000E+00
|
||||
@ -147,14 +165,17 @@
|
||||
<species id="silane_s_SIH2" name="SIH2">
|
||||
<note>42489</note>
|
||||
<atomArray> Si:1 H:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.475092000E+00, 2.139338000E-03, 7.672306000E-07,
|
||||
5.217668000E-10, -9.898824000E-13, 3.147397000E+04,
|
||||
4.436585000E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.142390000E+00, 2.150191000E-03, -2.190730000E-07,
|
||||
-2.073725000E-10, 4.741018000E-14, 3.110484000E+04,
|
||||
2.930745000E-01
|
||||
@ -167,14 +188,17 @@
|
||||
<species id="silane_s_SIH3" name="SIH3">
|
||||
<note>42489</note>
|
||||
<atomArray> Si:1 H:3 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.946733000E+00, 6.466764000E-03, 5.991653000E-07,
|
||||
-2.218413000E-09, 3.052670000E-13, 2.270173000E+04,
|
||||
7.347948000E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
5.015906000E+00, 3.732750000E-03, -3.609053000E-07,
|
||||
-3.729193000E-10, 8.468490000E-14, 2.190233000E+04,
|
||||
-4.291368000E+00
|
||||
@ -187,14 +211,17 @@
|
||||
<species id="silane_s_H3SISIH" name="H3SISIH">
|
||||
<note>111191</note>
|
||||
<atomArray> H:4 Si:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="4000" Tmid="1500" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1500" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.698707000E+00, 1.870180000E-02, -1.430704000E-05,
|
||||
6.005836000E-09, -1.116293000E-12, 3.590825000E+04,
|
||||
8.825191000E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="4000" Tmin="1500">
|
||||
<floatArray size="7" title="coeffs">
|
||||
1.127202000E+01, 2.538145000E-03, -2.998472000E-07,
|
||||
-9.465367000E-11, 1.855053000E-14, 3.297169000E+04,
|
||||
-3.264598000E+01
|
||||
@ -207,14 +234,17 @@
|
||||
<species id="silane_s_SI2H6" name="SI2H6">
|
||||
<note>90784</note>
|
||||
<atomArray> Si:2 H:6 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="2000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
6.734798300E-01, 4.093153100E-02, -4.484125500E-05,
|
||||
2.995223200E-08, -8.901085400E-12, 7.932787500E+03,
|
||||
1.862740300E+01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="2000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
3.407493600E+00, 2.720647900E-02, -1.771320400E-05,
|
||||
5.639117700E-09, -7.137868200E-13, 7.532184200E+03,
|
||||
6.132175400E+00
|
||||
@ -227,14 +257,17 @@
|
||||
<species id="silane_s_H2SISIH2" name="H2SISIH2">
|
||||
<note>42489</note>
|
||||
<atomArray> Si:2 H:4 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="3000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
5.133186000E+00, 1.252855000E-02, -4.620421000E-07,
|
||||
-6.606075000E-09, 2.864345000E-12, 2.956915000E+04,
|
||||
7.605133000E-01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="3000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
8.986817000E+00, 5.405047000E-03, -5.214022000E-07,
|
||||
-5.313742000E-10, 1.188727000E-13, 2.832748000E+04,
|
||||
-2.004478000E+01
|
||||
@ -247,14 +280,17 @@
|
||||
<species id="silane_s_SI3H8" name="SI3H8">
|
||||
<note>90784</note>
|
||||
<atomArray> Si:3 H:8 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="2000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
7.719684600E-01, 6.344274000E-02, -7.672610900E-05,
|
||||
5.454371500E-08, -1.661172900E-11, 1.207126300E+04,
|
||||
2.153250700E+01
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="2000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
6.093334100E+00, 3.658011200E-02, -2.389236100E-05,
|
||||
7.627193200E-09, -9.676938400E-13, 1.129720500E+04,
|
||||
-2.747565400E+00
|
||||
@ -267,14 +303,17 @@
|
||||
<species id="silane_s_SI2" name="SI2">
|
||||
<note>90784</note>
|
||||
<atomArray> Si:2 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="2000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
2.967197600E+00, 6.311955800E-03, -1.097079000E-05,
|
||||
8.927868000E-09, -2.787368900E-12, 6.987073800E+04,
|
||||
9.278950300E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="2000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.144677900E+00, 6.523467700E-04, -5.010852000E-07,
|
||||
1.806284300E-10, -2.516111100E-14, 6.969470700E+04,
|
||||
3.862736600E+00
|
||||
@ -287,14 +326,17 @@
|
||||
<species id="silane_s_SI3" name="SI3">
|
||||
<note>J 3/67</note>
|
||||
<atomArray> Si:3 </atomArray>
|
||||
<charge>0.000000000E+00</charge>
|
||||
<thermo>
|
||||
<NASA Tmax="5000" Tmid="1000" Tmin="300">
|
||||
<floatArray size="7" title="low">
|
||||
<NASA Tmax="1000" Tmin="300">
|
||||
<floatArray size="7" title="coeffs">
|
||||
4.597912900E+00, 1.071527400E-02, -1.610042200E-05,
|
||||
1.096920700E-08, -2.783287500E-12, 7.476632400E+04,
|
||||
3.442167100E+00
|
||||
</floatArray>
|
||||
<floatArray size="7" title="high">
|
||||
</NASA>
|
||||
<NASA Tmax="5000" Tmin="1000">
|
||||
<floatArray size="7" title="coeffs">
|
||||
7.421336000E+00, -1.170994800E-04, 8.982077500E-08,
|
||||
7.193596400E-12, -2.567083700E-15, 7.414669900E+04,
|
||||
-1.036527400E+01
|
||||
@ -312,8 +354,12 @@
|
||||
<equation>SIH4 + H [=] SIH3 + H2</equation>
|
||||
<reactants> SIH4:1 H:1 </reactants>
|
||||
<products> SIH3:1 H2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">7.8e+14 0 2260</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">7.800000000E+14</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">2.260000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -322,8 +368,12 @@
|
||||
<equation>SIH4 + M [=] SIH3 + H + M</equation>
|
||||
<reactants> SIH4:1 </reactants>
|
||||
<products> SIH3:1 H:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">3.91e+15 0 89356</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">3.910000000E+15</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">8.935600000E+04</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -332,8 +382,12 @@
|
||||
<equation>SIH3 + H [=] SIH2 + H2</equation>
|
||||
<reactants> SIH3:1 H:1 </reactants>
|
||||
<products> SIH2:1 H2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">7.8e+14 0 2260</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">7.800000000E+14</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">2.260000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -342,8 +396,12 @@
|
||||
<equation>SI + SI + M [=] SI2 + M</equation>
|
||||
<reactants> SI:1 SI:1 </reactants>
|
||||
<products> SI2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="3">2.47e+16 0 1178</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm6/mol2/s">2.470000000E+16</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">1.178000000E+03</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -352,8 +410,12 @@
|
||||
<equation>SIH4 + SIH2 [=] H3SISIH + H2</equation>
|
||||
<reactants> SIH4:1 SIH2:1 </reactants>
|
||||
<products> H3SISIH:1 H2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.3e+13 0 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.300000000E+13</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -362,8 +424,12 @@
|
||||
<equation>SIH + H2 [=] SIH2 + H</equation>
|
||||
<reactants> SIH:1 H2:1 </reactants>
|
||||
<products> SIH2:1 H:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">4.8e+14 0 23.64</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">4.800000000E+14</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">2.364000000E+01</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -372,8 +438,12 @@
|
||||
<equation>SIH + SIH4 [=] H3SISIH + H</equation>
|
||||
<reactants> SIH:1 SIH4:1 </reactants>
|
||||
<products> H3SISIH:1 H:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.6e+14 0 0</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.600000000E+14</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">0.000000000E+00</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -382,8 +452,12 @@
|
||||
<equation>SI + H2 [=] SIH + H</equation>
|
||||
<reactants> SI:1 H2:1 </reactants>
|
||||
<products> SIH:1 H:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="2">1.5e+15 0 31.8</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="cm3/mol/s">1.500000000E+15</A>
|
||||
<b>0.000000000E+00</b>
|
||||
<E units="cal/mol">3.180000000E+01</E>
|
||||
</Arrhenius>
|
||||
</rateCoeff>
|
||||
</reaction>
|
||||
|
||||
@ -392,9 +466,17 @@
|
||||
<equation>SIH4 (+ M) [=] SIH2 + H2 (+ M)</equation>
|
||||
<reactants> SIH4:1 </reactants>
|
||||
<products> SIH2:1 H2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="1">3.119e+09 1.669 54710</Arrhenius>
|
||||
<Arrhenius order="2">5.214e+29 -3.545 57550</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="/s">3.119000000E+09</A>
|
||||
<b>1.669000000E+00</b>
|
||||
<E units="cal/mol">5.471000000E+04</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm3/mol/s">5.214000000E+29</A>
|
||||
<b>-3.545000000E+00</b>
|
||||
<E units="cal/mol">5.755000000E+04</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Troe"> -0.4984 888.3 209.4 2760 </falloff>
|
||||
<efficiencies default="1">
|
||||
SI2H6:4 SIH4:4
|
||||
@ -407,9 +489,17 @@
|
||||
<equation>H3SISIH (+ M) [=] H2SISIH2 (+ M)</equation>
|
||||
<reactants> H3SISIH:1 </reactants>
|
||||
<products> H2SISIH2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="1">2.54e+13 -0.2239 5381</Arrhenius>
|
||||
<Arrhenius order="2">1.099e+33 -5.765 9152</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="/s">2.540000000E+13</A>
|
||||
<b>-2.239000000E-01</b>
|
||||
<E units="cal/mol">5.381000000E+03</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm3/mol/s">1.099000000E+33</A>
|
||||
<b>-5.765000000E+00</b>
|
||||
<E units="cal/mol">9.152000000E+03</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Troe"> -0.4202 214.5 103 136.3 </falloff>
|
||||
<efficiencies default="1">
|
||||
SI2H6:4 SIH4:4
|
||||
@ -422,9 +512,17 @@
|
||||
<equation>SI3H8 (+ M) [=] SIH4 + H3SISIH (+ M)</equation>
|
||||
<reactants> SI3H8:1 </reactants>
|
||||
<products> SIH4:1 H3SISIH:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="1">3.73e+12 0.992 50850</Arrhenius>
|
||||
<Arrhenius order="2">4.36e+76 -17.26 59303</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="/s">3.730000000E+12</A>
|
||||
<b>9.920000000E-01</b>
|
||||
<E units="cal/mol">5.085000000E+04</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm3/mol/s">4.360000000E+76</A>
|
||||
<b>-1.726000000E+01</b>
|
||||
<E units="cal/mol">5.930300000E+04</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Troe"> 0.4157 365.3 3102 9.724 </falloff>
|
||||
<efficiencies default="1">
|
||||
SI2H6:4 SIH4:4
|
||||
@ -437,9 +535,17 @@
|
||||
<equation>SI3H8 (+ M) [=] SIH2 + SI2H6 (+ M)</equation>
|
||||
<reactants> SI3H8:1 </reactants>
|
||||
<products> SIH2:1 SI2H6:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="1">6.97e+12 0.9691 52677</Arrhenius>
|
||||
<Arrhenius order="2">1.73e+69 -15.07 60491</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="/s">6.970000000E+12</A>
|
||||
<b>9.691000000E-01</b>
|
||||
<E units="cal/mol">5.267700000E+04</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm3/mol/s">1.730000000E+69</A>
|
||||
<b>-1.507000000E+01</b>
|
||||
<E units="cal/mol">6.049100000E+04</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Troe"> -3.47e-05 442 2412 128.3 </falloff>
|
||||
<efficiencies default="1">
|
||||
SI2H6:4 SIH4:4
|
||||
@ -452,9 +558,17 @@
|
||||
<equation>SI2H6 (+ M) [=] H2 + H3SISIH (+ M)</equation>
|
||||
<reactants> SI2H6:1 </reactants>
|
||||
<products> H2:1 H3SISIH:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="1">9.086e+09 1.834 54197</Arrhenius>
|
||||
<Arrhenius order="2">1.945e+44 -7.772 59023</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="/s">9.086000000E+09</A>
|
||||
<b>1.834000000E+00</b>
|
||||
<E units="cal/mol">5.419700000E+04</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm3/mol/s">1.945000000E+44</A>
|
||||
<b>-7.772000000E+00</b>
|
||||
<E units="cal/mol">5.902300000E+04</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Troe"> -0.1224 793.3 2400 11.39 </falloff>
|
||||
<efficiencies default="1">
|
||||
SI2H6:4 SIH4:4
|
||||
@ -467,9 +581,17 @@
|
||||
<equation>SI2H6 (+ M) [=] SIH4 + SIH2 (+ M)</equation>
|
||||
<reactants> SI2H6:1 </reactants>
|
||||
<products> SIH4:1 SIH2:1 </products>
|
||||
<rateCoeff Eunits="cal/mol" units="mol,cm,s">
|
||||
<Arrhenius order="1">1.81e+10 1.747 50203</Arrhenius>
|
||||
<Arrhenius order="2">5.09e+53 -10.37 56034</Arrhenius>
|
||||
<rateCoeff>
|
||||
<Arrhenius>
|
||||
<A units="/s">1.810000000E+10</A>
|
||||
<b>1.747000000E+00</b>
|
||||
<E units="cal/mol">5.020300000E+04</E>
|
||||
</Arrhenius>
|
||||
<Arrhenius name="k0">
|
||||
<A units="cm3/mol/s">5.090000000E+53</A>
|
||||
<b>-1.037000000E+01</b>
|
||||
<E units="cal/mol">5.603400000E+04</E>
|
||||
</Arrhenius>
|
||||
<falloff type="Troe"> 4.375e-05 438.5 2726 438.2 </falloff>
|
||||
<efficiencies default="1">
|
||||
SI2H6:4 SIH4:4
|
||||
|
@ -14,6 +14,7 @@
|
||||
using namespace std;
|
||||
|
||||
#include "converters/ck2ctml.h"
|
||||
#include "converters/ck2ct.h"
|
||||
|
||||
using namespace ctml;
|
||||
|
||||
@ -68,8 +69,14 @@ int main(int argc, char** argv) {
|
||||
++i;
|
||||
}
|
||||
|
||||
#define MAKE_CT_INPUT
|
||||
#ifdef MAKE_CT_INPUT
|
||||
int ierr = pip::convert_ck(infile.c_str(), dbfile.c_str(), trfile.c_str(),
|
||||
idtag.c_str());
|
||||
#else
|
||||
int ierr = convert_ck(infile.c_str(), dbfile.c_str(), trfile.c_str(),
|
||||
outfile.c_str(), idtag.c_str());
|
||||
#endif
|
||||
if (ierr < 0) {
|
||||
showErrors(cerr);
|
||||
}
|
||||
|
@ -38,9 +38,9 @@
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef CYGWIN
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
//#ifndef CYGWIN
|
||||
//#include <getopt.h>
|
||||
//#endif
|
||||
|
||||
#include "mdp_allo.h"
|
||||
#include "tok_input_util.h"
|
||||
|
Loading…
Reference in New Issue
Block a user