From 06a88b70eba118b1b7fb222898ac10fa46e5b160 Mon Sep 17 00:00:00 2001 From: Steven DeCaluwe Date: Fri, 25 Apr 2014 11:49:32 +0000 Subject: [PATCH] Added gas-phse kinetics to RedlichKwongMFTP class --- interfaces/cython/cantera/ctml_writer.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/interfaces/cython/cantera/ctml_writer.py b/interfaces/cython/cantera/ctml_writer.py index 3ba93ff99..85373f3e0 100644 --- a/interfaces/cython/cantera/ctml_writer.py +++ b/interfaces/cython/cantera/ctml_writer.py @@ -927,7 +927,7 @@ class gas_transport(transport): """ def __init__(self, geom = 'nonlin', diam = 0.0, well_depth = 0.0, dipole = 0.0, - polar = 0.0, rot_relax = 0.0): + polar = 0.0, rot_relax = 0.0, omega_ac = 0.0): """ :param geom: A string specifying the molecular geometry. One of ``atom``, @@ -943,6 +943,9 @@ class gas_transport(transport): :param rot_relax: The rotational relaxation collision number at 298 K. Dimensionless. Default: 0.0 + :param w_ac: + Pitzer's acentric factor. Dimensionless. + Default: 0.0 """ self._geom = geom self._diam = diam @@ -950,6 +953,7 @@ class gas_transport(transport): self._dipole = dipole self._polar = polar self._rot_relax = rot_relax + self._w_ac = omega_ac def build(self, t): #t = s.addChild("transport") @@ -962,6 +966,7 @@ class gas_transport(transport): addFloat(t, "dipoleMoment", (self._dipole, 'Debye'),'%8.3f') addFloat(t, "polarizability", (self._polar, 'A3'),'%8.3f') addFloat(t, "rotRelax", self._rot_relax,'%8.3f') + addFloat(t, "omega_ac", self._w_ac, '%8.3f') class rate_expression(object): pass @@ -2233,20 +2238,20 @@ class RedlichKwongMFTP(phase): elements = '', species = '', note = '', + reactions = 'none', + kinetics = 'GasKinetics', initial_state = None, activity_coefficients = None, transport = 'None', options = []): - phase.__init__(self,name, 3, elements, species, note, 'none', + phase.__init__(self,name, 3, elements, species, note, reactions, initial_state,options) self._pure = 0 + self._kin = kinetics self._tr = transport self._activityCoefficients = activity_coefficients - def conc_dim(self): - return (0,0) - def build(self, p): ph = phase.build(self,p) e = ph.child("thermo") @@ -2263,8 +2268,9 @@ class RedlichKwongMFTP(phase): if self._tr: t = ph.addChild('transport') t['model'] = self._tr - k = ph.addChild("kinetics") - k['model'] = 'none' + if self._kin: + k = ph.addChild("kinetics") + k['model'] = self._kin class redlich_kwong(phase):