Cantera  2.1.2
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 
11 #include "TransportBase.h"
12 
13 namespace Cantera
14 {
15 
16 class XML_Writer;
17 
18 //! Error class to indicate an unimplemented method
19 /*!
20  * This class is used by transport objects
21  */
23 {
24 public:
25  //! Constructor for error class
26  /*!
27  * @param method Single string indicating a method that is not implemented
28  */
29  NotImplemented(const std::string& method);
30 };
31 
32 //! Base structure to hold transport model parameters.
33 /*!
34  * This structure is used by TransportFactory.
35  */
37 {
38 public:
40  virtual ~TransportParams();
41 
42  //! Local storage of the number of species
43  size_t nsp_;
44 
45  //! Pointer to the ThermoPhase object
47 
48  //! Local storage of the molecular weights of the species
49  /*!
50  * Length is nsp_ and units are kg kmol-1.
51  */
53 
54  //! A basis for the average velocity can be specified.
55  /*!
56  * Valid bases include "mole", "mass", and "species" names.
57  */
59 
60  //! Maximum temperatures for parameter fits
61  doublereal tmax;
62 
63  //! Minimum temperatures for parameter fits
64  doublereal tmin;
65 
66  //! Mode parameter
67  int mode_;
68 
69  //! Pointer to the xml tree describing the implementation of transport for this object
70  XML_Writer* xml;
71 
72  //! Log level
73  int log_level;
74 };
75 
76 //! This structure holds transport model parameters relevant to transport in ideal
77 //! gases with a kinetic theory of gases derived transport model.
78 /*!
79  * This structure is used by TransportFactory object.
80  */
82 {
83 public:
85 
86  // polynomial fits
87 
88  //! temperature-fit of the viscosity
89  /*!
90  * The outer loop the number of species, nsp
91  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
92  */
93  std::vector<vector_fp> visccoeffs;
94 
95  //! temperature-fits of the heat conduction
96  /*!
97  * The outer loop the number of species, nsp
98  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
99  */
100  std::vector<vector_fp> condcoeffs;
101 
102  //! temperature-fits of the diffusivity
103  /*!
104  * The outer loop the number of species, nsp
105  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
106  */
107  std::vector<vector_fp> diffcoeffs;
108 
109  //! This is vector of vectors containing the integer lookup value for the (i,j) interaction
110  /*!
111  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
112  * Unique values of delta get their own spot in the array. The values of delta are stored in
113  * the fitlist vector.
114  *
115  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
116  */
117  std::vector<std::vector<int> > poly;
118 
119  //! This is vector of vectors containing the astar fit.
120  /*!
121  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
122  * Unique values of delta get their own spot in the array. The values of delta are stored in
123  * the fitlist vector.
124  *
125  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
126  */
127  std::vector<vector_fp> omega22_poly;
128 
129  //! This is vector of vectors containing the astar fit.
130  /*!
131  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
132  * Unique values of delta get their own spot in the array. The values of delta are stored in
133  * the fitlist vector.
134  *
135  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
136  */
137  std::vector<vector_fp> astar_poly;
138 
139  //! This is vector of vectors containing the astar fit.
140  /*!
141  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
142  * Unique values of delta get their own spot in the array. The values of delta are stored in
143  * the fitlist vector.
144  *
145  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
146  */
147  std::vector<vector_fp> bstar_poly;
148 
149  //! This is vector of vectors containing the astar fit.
150  /*!
151  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
152  * Unique values of delta get their own spot in the array. The values of delta are stored in
153  * the fitlist vector.
154  *
155  * The inner loop is over degree + 1, which is the polynomial order of the collision integral fit.
156  */
157  std::vector<vector_fp> cstar_poly;
158 
159  //! Rotational relaxation number for the species in the current phase
160  /*!
161  * length is the number of species in the phase
162  * units are dimensionless
163  */
165 
166  //! Dimensionless rotational heat capacity of the species in the current phase
167  /*!
168  * These values are 0, 1 and 1.5 for single-molecule, linear, and nonlinear species respectively
169  * length is the number of species in the phase
170  * units are dimensionless (Cr / R)
171  */
173 
174  //! Vector of booleans indicating whether a species is a polar molecule
175  /*!
176  * Length is nsp
177  */
178  std::vector<bool> polar;
179 
180  //! Polarizability of each species in the phase
181  /*!
182  * Length = nsp
183  * Units = m^3
184  */
186 
187  //! This is vector containing the values of delta(i,j) that are used in the collision integral fits.
188  /*!
189  * This is used in astar_poly, bstar_poly, cstar_poly, and omega22_poly.
190  * The outer loop is over a flat (i,j) index that is parameterized on the tr.delta(i,j) value.
191  * Unique values of delta get their own spot in the array. The values of delta are stored in
192  * the fitlist vector.
193  */
195 
196  //! Lennard-Jones well-depth of the species in the current phase
197  /*!
198  * length is the number of species in the phase
199  * Units are Joules (Note this is not Joules/kmol) (note, no kmol -> this is a per molecule amount)
200  */
202 
203  //! Lennard-Jones diameter of the species in the current phase
204  /*!
205  * length is the number of species in the phase
206  * units are in meters.
207  */
209 
210  //! This is the reduced mass of the interaction between species i and j
211  /*!
212  * tr.reducedMass(i,j) = tr.mw[i] * tr.mw[j] / (Avogadro * (tr.mw[i] + tr.mw[j]));
213  *
214  * Units are kg (note, no kmol -> this is a per molecule amount)
215  *
216  * Length nsp * nsp. This is a symmetric matrix
217  */
219 
220  //! hard-sphere diameter for (i,j) collision
221  /*!
222  * diam(i,j) = 0.5*(tr.sigma[i] + tr.sigma[j]);
223  * Units are m (note, no kmol -> this is a per molecule amount)
224  *
225  * Length nsp * nsp. This is a symmetric matrix.
226  */
228 
229  //! The effective well depth for (i,j) collisions
230  /*!
231  * epsilon(i,j) = sqrt(tr.eps[i]*tr.eps[j]);
232  * Units are Joules (note, no kmol -> this is a per molecule amount)
233  *
234  * Length nsp * nsp. This is a symmetric matrix.
235  */
237 
238  //! The effective dipole moment for (i,j) collisions
239  /*!
240  * tr.dipoleMoment has units of Debye's. A Debye is 10-18 cm3/2 erg1/2
241  *
242  * tr.dipole(i,i) = 1.e-25 * SqrtTen * trdat.dipoleMoment;
243  * tr.dipole(i,j) = sqrt(tr.dipole(i,i)*tr.dipole(j,j));
244  * Units are in Debye (note, no kmol -> this is a per molecule amount)
245  *
246  * Length nsp * nsp. This is a symmetric matrix.
247  */
249 
250  //! Matrix containing the reduced dipole moment of the interaction between two species
251  /*!
252  * This is the reduced dipole moment of the interaction between two species
253  * 0.5 * tr.dipole(i,j)*tr.dipole(i,j) (epsilon(i,j) * d * d * d);
254  *
255  * Length nsp * nsp .This is a symmetric matrix
256  */
258 };
259 
260 } // End of namespace Cantera
261 
262 #endif //CT_TRANSPORTPARAMS_H
doublereal tmin
Minimum temperatures for parameter fits.
DenseMatrix diam
hard-sphere diameter for (i,j) collision
This structure holds transport model parameters relevant to transport in ideal gases with a kinetic t...
vector_fp alpha
Polarizability of each species in the phase.
thermo_t * thermo
Pointer to the ThermoPhase object.
std::vector< vector_fp > omega22_poly
This is vector of vectors containing the astar fit.
std::vector< vector_fp > astar_poly
This is vector of vectors containing the astar fit.
size_t nsp_
Local storage of the number of species.
doublereal tmax
Maximum temperatures for parameter fits.
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
vector_fp sigma
Lennard-Jones diameter of the species in the current phase.
DenseMatrix reducedMass
This is the reduced mass of the interaction between species i and j.
vector_fp fitlist
This is vector containing the values of delta(i,j) that are used in the collision integral fits...
std::vector< vector_fp > cstar_poly
This is vector of vectors containing the astar fit.
std::vector< vector_fp > diffcoeffs
temperature-fits of the diffusivity
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:101
int VelocityBasis
The diffusion fluxes must be referenced to a particular reference fluid velocity. ...
Definition: TransportBase.h:61
vector_fp zrot
Rotational relaxation number for the species in the current phase.
Error class to indicate an unimplemented method.
vector_fp eps
Lennard-Jones well-depth of the species in the current phase.
VelocityBasis velocityBasis_
A basis for the average velocity can be specified.
std::vector< bool > polar
Vector of booleans indicating whether a species is a polar molecule.
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:68
DenseMatrix delta
Matrix containing the reduced dipole moment of the interaction between two species.
vector_fp crot
Dimensionless rotational heat capacity of the species in the current phase.
DenseMatrix epsilon
The effective well depth for (i,j) collisions.
vector_fp mw
Local storage of the molecular weights of the species.
std::vector< vector_fp > bstar_poly
This is vector of vectors containing the astar fit.
std::vector< std::vector< int > > poly
This is vector of vectors containing the integer lookup value for the (i,j) interaction.
int mode_
Mode parameter.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:165
DenseMatrix dipole
The effective dipole moment for (i,j) collisions.
std::vector< vector_fp > visccoeffs
temperature-fit of the viscosity
Headers for the DenseMatrix object, which deals with dense rectangular matrices and description of th...
NotImplemented(const std::string &method)
Constructor for error class.
std::vector< vector_fp > condcoeffs
temperature-fits of the heat conduction
XML_Writer * xml
Pointer to the xml tree describing the implementation of transport for this object.
Base structure to hold transport model parameters.
A class for full (non-sparse) matrices with Fortran-compatible data storage, which adds matrix operat...
Definition: DenseMatrix.h:70