Cantera  2.0
WaterTransport.h
Go to the documentation of this file.
1 /**
2  * @file WaterTransport.h
3  * Header file defining class LiquidTransport
4  */
5 #ifndef CT_WATERTRAN_H
6 #define CT_WATERTRAN_H
7 
8 
9 
10 // STL includes
11 #include <vector>
12 #include <string>
13 #include <map>
14 #include <numeric>
15 #include <algorithm>
16 
17 // Cantera includes
18 #include "TransportBase.h"
20 #include "LiquidTransportParams.h"
21 
22 namespace Cantera
23 {
24 //! @{
25 const int LVISC_CONSTANT = 0;
26 const int LVISC_WILKES = 1;
27 const int LVISC_MIXTUREAVG = 2;
28 
29 const int LDIFF_MIXDIFF_UNCORRECTED = 0;
30 const int LDIFF_MIXDIFF_FLUXCORRECTED = 1;
31 const int LDIFF_MULTICOMP_STEFANMAXWELL = 2;
32 //! @}
33 
34 
35 class TransportParams;
36 class WaterProps;
37 class PDSS_Water;
38 
39 //! Transport Parameters for pure water
40 /*!
41  *
42  */
43 class WaterTransport : public Transport
44 {
45 public:
46 
47  //! default constructor
48  /*!
49  * @param thermo ThermoPhase object that represents the phase.
50  * Defaults to zero
51  *
52  * @param ndim Number of dimensions of the flux expressions.
53  * Defaults to a value of one.
54  */
55  WaterTransport(thermo_t* thermo = 0, int ndim = 1);
56 
57  //!Copy Constructor for the %LiquidThermo object.
58  /*!
59  * @param right ThermoPhase to be copied
60  */
61  WaterTransport(const WaterTransport& right);
62 
63  //! Assignment operator
64  /*!
65  * This is NOT a virtual function.
66  *
67  * @param right Reference to %ThermoPhase object to be copied into the
68  * current one.
69  */
71 
72  //! Duplication routine for objects which inherit from
73  //! %Transport
74  /*!
75  * This virtual routine can be used to duplicate %Transport objects
76  * inherited from %Transport even if the application only has
77  * a pointer to %Transport to work with.
78  *
79  * These routines are basically wrappers around the derived copy
80  * constructor.
81  */
82  virtual Transport* duplMyselfAsTransport() const;
83 
84  //! virtual destructor
85  virtual ~WaterTransport();
86 
87  //! Return the model id for this transport parameterization
88  virtual int model() const {
89  return cWaterTransport;
90  }
91 
92  //! Returns the viscosity of water at the current conditions
93  //! (kg/m/s)
94  /*!
95  * This function calculates the value of the viscosity of pure
96  * water at the current T and P.
97  *
98  * The formulas used are from the paper
99  *
100  * J. V. Sengers, J. T. R. Watson, "Improved International
101  * Formulations for the Viscosity and Thermal Conductivity of
102  * Water Substance", J. Phys. Chem. Ref. Data, 15, 1291 (1986).
103  *
104  * The formulation is accurate for all temperatures and pressures,
105  * for steam and for water, even near the critical point.
106  * Pressures above 500 MPa and temperature above 900 C are suspect.
107  */
108  virtual doublereal viscosity();
109 
110 
111  //! The bulk viscosity in Pa-s.
112  /*!
113  * The bulk viscosity is only
114  * non-zero in rare cases. Most transport managers either
115  * overload this method to return zero, or do not implement
116  * it, in which case an exception is thrown if called.
117  */
118  virtual doublereal bulkViscosity() {
119  return 0.0;
120  }
121 
122 
123  //! Returns the thermal conductivity of water at the current conditions
124  //! (W/m/K)
125  /*!
126  * This function calculates the value of the thermal conductivity of
127  * water at the current T and P.
128  *
129  * The formulas used are from the paper
130  * J. V. Sengers, J. T. R. Watson, "Improved International
131  * Formulations for the Viscosity and Thermal Conductivity of
132  * Water Substance", J. Phys. Chem. Ref. Data, 15, 1291 (1986).
133  *
134  * The formulation is accurate for all temperatures and pressures,
135  * for steam and for water, even near the critical point.
136  * Pressures above 500 MPa and temperature above 900 C are suspect.
137  */
138  virtual doublereal thermalConductivity();
139 
140 
141 private:
142 
143  //! Routine to do some common initializations at the start of using
144  //! this routine.
145  void initTP();
146 
147  //! Pointer to the WaterPropsIAPWS object, which does the actual calculations
148  //! for the real equation of state
149  /*!
150  * This object owns m_sub
151  */
153 
154  //! Pointer to the WaterProps object
155  /*!
156  * This class is used to house several approximation
157  * routines for properties of water.
158  *
159  * This object owns m_waterProps, and the WaterPropsIAPWS object used by
160  * WaterProps is m_sub, which is defined above.
161  */
163 
164 
165  //! Pressure dependent standard state object for water
166  /*!
167  * We assume that species 0 is water, with a PDSS_Water object.
168  */
170 
171 };
172 }
173 #endif
174 
175 
176 
177 
178 
179