Cantera  2.0
TransportParams.h
Go to the documentation of this file.
1 /**
2  * @file TransportParams.h
3  * Class that holds the data that is read in from the xml file, and which is used for
4  * processing of the transport object
5  * (see \ref tranprops and \link Cantera::TransportParams TransportParams \endlink).
6  */
7 #ifndef CT_TRANSPORTPARAMS_H
8 #define CT_TRANSPORTPARAMS_H
9 
10 #include <vector>
11 
12 #include "cantera/base/ct_defs.h"
14 #include "TransportBase.h"
15 
16 namespace Cantera
17 {
18 
19 class XML_Writer;
20 
21 
22 //====================================================================================================================
23 //! Error class to indicate an unimplemented method
24 /*!
25  * This class is used by transport objects
26  */
28 {
29 public:
30 
31  //! Constructor for error class
32  /*!
33  * @param method Single string indicating a method that is not implemented
34  */
35  NotImplemented(std::string method);
36 };
37 //====================================================================================================================
38 //! Base structure to hold transport model parameters.
39 /*!
40  * This structure is used by TransportFactory.
41  */
43 {
44 
45 public:
46 
47  //! Default Constructor
49 
50  //! Destructor
51  virtual ~TransportParams();
52 
53  //! Local storage of the number of species
54  size_t nsp_;
55 
56  //! Pointer to the ThermoPhase object
58 
59  //! Local storage of the molecular weights of the species
60  /*!
61  * Length is nsp_ and units are kg kmol-1.
62  */
64 
65  //! A basis for the average velocity can be specified.
66  /*!
67  * Valid bases include "mole", "mass", and "species" names.
68  */
70 
71  //! Maximum temperatures for parameter fits
72  doublereal tmax;
73 
74  //! Minimum temperatures for parameter fits
75  doublereal tmin;
76 
77  //! Mode parameter
78  int mode_;
79 
80  //! Pointer to the xml tree describing the implementation of transport for this object
81  XML_Writer* xml;
82 
83  //! Log level
84  int log_level;
85 };
86 
87 //====================================================================================================================
88 //! This structure holds transport model parameters relevant to transport in ideal
89 //! gases with a kinetic theory of gases derived transport model.
90 /*!
91  * This structure is used by TransportFactory object.
92  */
94 {
95 
96 public:
97 
98  //! Constructor
100 
101  //! Destructor
102  virtual ~GasTransportParams();
103 
104  // polynomial fits
105 
106  //! temperature-fit of the viscosity
107  /*!
108  * The outer loop the number of species, nsp
109  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
110  */
111  std::vector<vector_fp> visccoeffs;
112 
113  //! temperature-fits of the heat conduction
114  /*!
115  * The outer loop the number of species, nsp
116  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
117  */
118  std::vector<vector_fp> condcoeffs;
119 
120  //! temperature-fits of the diffusivity
121  /*!
122  * The outer loop the number of species, nsp
123  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
124  */
125  std::vector<vector_fp> diffcoeffs;
126 
127  //! This is vector of vectors containing the integer lookup value for the (i,j) interaction
128  /*!
129  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
130  * Unique values of delta get their own spot in the array. The values of delta are stored in
131  * the fitlist vector.
132  *
133  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
134  */
135  std::vector<std::vector<int> > poly;
136 
137  //! This is vector of vectors containing the astar fit.
138  /*!
139  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
140  * Unique values of delta get their own spot in the array. The values of delta are stored in
141  * the fitlist vector.
142  *
143  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
144  */
145  std::vector<vector_fp> omega22_poly;
146 
147  //! This is vector of vectors containing the astar fit.
148  /*!
149  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
150  * Unique values of delta get their own spot in the array. The values of delta are stored in
151  * the fitlist vector.
152  *
153  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
154  */
155  std::vector<vector_fp> astar_poly;
156 
157  //! This is vector of vectors containing the astar fit.
158  /*!
159  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
160  * Unique values of delta get their own spot in the array. The values of delta are stored in
161  * the fitlist vector.
162  *
163  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
164  */
165  std::vector<vector_fp> bstar_poly;
166 
167  //! This is vector of vectors containing the astar fit.
168  /*!
169  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
170  * Unique values of delta get their own spot in the array. The values of delta are stored in
171  * the fitlist vector.
172  *
173  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
174  */
175  std::vector<vector_fp> cstar_poly;
176 
177  //! Rotational relaxation number for the species in the current phase
178  /*!
179  * length is the number of species in the phase
180  * units are dimensionless
181  */
183 
184  //! Dimensionless rotational heat capacity of the species in the current phase
185  /*!
186  * These values are 0, 1 and 1.5 for single-molecule, linear, and nonlinear species respectively
187  * length is the number of species in the phase
188  * units are dimensionless (Cr / R)
189  */
191 
192  //! Vector of booleans indicating whether a species is a polar molecule
193  /*!
194  * Length is nsp
195  */
196  std::vector<bool> polar;
197 
198  //! Polarizability of each species in the phase
199  /*!
200  * Length = nsp
201  * Units = m^3
202  */
204 
205  //! This is vector containing the values of delta(i,j) that are used in the collision integral fits.
206  /*!
207  * This is used in astar_poly, bstar_poly, cstar_poly, and omega22_poly.
208  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
209  * Unique values of delta get their own spot in the array. The values of delta are stored in
210  * the fitlist vector.
211  *
212  */
214 
215  //! Lennard-Jones well-depth of the species in the current phase
216  /*!
217  * length is the number of species in the phase
218  * Units are Joules (Note this is not Joules/kmol) (note, no kmol -> this is a per molecule amount)
219  */
221 
222  //! Lennard-Jones diameter of the species in the current phase
223  /*!
224  * length is the number of species in the phase
225  * units are in meters.
226  */
228 
229  //! This is the reduced mass of the interaction between species i and j
230  /*!
231  * tr.reducedMass(i,j) = tr.mw[i] * tr.mw[j] / (Avogadro * (tr.mw[i] + tr.mw[j]));
232  *
233  * Units are kg (note, no kmol -> this is a per molecule amount)
234  *
235  * Length nsp * nsp. This is a symmetric matrix
236  */
238 
239  //! hard-sphere diameter for (i,j) collision
240  /*!
241  * diam(i,j) = 0.5*(tr.sigma[i] + tr.sigma[j]);
242  * Units are m (note, no kmol -> this is a per molecule amount)
243  *
244  * Length nsp * nsp. This is a symmetric matrix.
245  */
247 
248  //! The effective well depth for (i,j) collisions
249  /*!
250  * epsilon(i,j) = sqrt(tr.eps[i]*tr.eps[j]);
251  * Units are Joules (note, no kmol -> this is a per molecule amount)
252  *
253  * Length nsp * nsp. This is a symmetric matrix.
254  */
256 
257  //! The effective dipole moment for (i,j) collisions
258  /*!
259  * tr.dipoleMoment has units of Debye's. A Debye is 10-18 cm3/2 erg1/2
260  *
261  * tr.dipole(i,i) = 1.e-25 * SqrtTen * trdat.dipoleMoment;
262  * tr.dipole(i,j) = sqrt(tr.dipole(i,i)*tr.dipole(j,j));
263  * Units are in Debye (note, no kmol -> this is a per molecule amount)
264  *
265  * Length nsp * nsp. This is a symmetric matrix.
266  */
268 
269  //! Matrix containing the reduced dipole moment of the interaction between two species
270  /*!
271  * This is the reduced dipole moment of the interaction between two species
272  * 0.5 * tr.dipole(i,j)*tr.dipole(i,j) (epsilon(i,j) * d * d * d);
273  *
274  * Length nsp * nsp .This is a symmetric matrix
275  */
277 };
278 //====================================================================================================================
279 } // End of namespace Cantera
280 //======================================================================================================================
281 
282 #endif //CT_TRANSPORTPARAMS_H