Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WaterProps.cpp
Go to the documentation of this file.
1 /**
2  * @file WaterProps.cpp
3  */
4 /*
5  * Copyright (2006) Sandia Corporation. Under the terms of
6  * Contract DE-AC04-94AL85000 with Sandia Corporation, the
7  * U.S. Government retains certain rights in this software.
8  */
9 
11 #include "cantera/base/ctml.h"
14 
15 namespace Cantera
16 {
18  m_waterIAPWS(0),
19  m_own_sub(false)
20 {
21  // object owns its own water evaluator
23  m_own_sub = true;
24 }
25 
27  m_waterIAPWS(0),
28  m_own_sub(false)
29 {
30  if (wptr) {
31  // object in slave mode; it doesn't own its own water evaluator.
32  m_waterIAPWS = wptr->getWater();
33  m_own_sub = false;
34  } else {
36  m_own_sub = true;
37  }
38 }
39 
41  m_waterIAPWS(0),
42  m_own_sub(false)
43 {
44  if (waterIAPWS) {
45  m_waterIAPWS = waterIAPWS;
46  m_own_sub = false;
47  } else {
49  m_own_sub = true;
50  }
51 }
52 
54  m_waterIAPWS(0),
55  m_own_sub(false)
56 {
57  *this = b;
58 }
59 
61 {
62  if (m_own_sub) {
63  delete m_waterIAPWS;
64  }
65 }
66 
68 {
69  if (&b == this) {
70  return *this;
71  }
72 
73  if (m_own_sub) {
74  delete m_waterIAPWS;
75  }
76  if (b.m_own_sub) {
78  m_own_sub = true;
79  } else {
81  m_own_sub = false;
82  }
83 
84  return *this;
85 }
86 
87 doublereal WaterProps::density_T(doublereal T, doublereal P, int ifunc)
88 {
89  static const doublereal Tc = T - 273.15;
90  static const doublereal U1 = 288.9414;
91  static const doublereal U2 = 508929.2;
92  static const doublereal U3 = 68.12963;
93  static const doublereal U4 = -3.9863;
94 
95  doublereal tmp1 = Tc + U1;
96  doublereal tmp4 = Tc + U4;
97  doublereal t4t4 = tmp4 * tmp4;
98  doublereal tmp3 = Tc + U3;
99  doublereal rho = 1000. * (1.0 - tmp1*t4t4/(U2 * tmp3));
100 
101  /*
102  * Impose an ideal gas lower bound on rho. We need this
103  * to ensure positivity of rho, even though it is
104  * grossly unrepresentative.
105  */
106  doublereal rhomin = P / (GasConstant * T);
107  if (rho < rhomin) {
108  rho = rhomin;
109  if (ifunc == 1) {
110  return - rhomin / T;
111  } else if (ifunc == 3) {
112  return rhomin / P;
113  } else if (ifunc == 2) {
114  return 2.0 * rhomin / (T * T);
115  }
116  }
117 
118  if (ifunc == 1) {
119  doublereal drhodT = 1000./U2 * (
120  - tmp4 * tmp4 / (tmp3)
121  - tmp1 * 2 * tmp4 / (tmp3)
122  + tmp1 * t4t4 / (tmp3*tmp3)
123  );
124  return drhodT;
125  } else if (ifunc == 3) {
126  return 0.0;
127  } else if (ifunc == 2) {
128  doublereal t3t3 = tmp3 * tmp3;
129  doublereal d2rhodT2 = 1000./U2 *
130  ((-4.0*tmp4-2.0*tmp1)/tmp3 +
131  (2.0*t4t4 + 4.0*tmp1*tmp4)/t3t3
132  - 2.0*tmp1 * t4t4/(t3t3*tmp3));
133  return d2rhodT2;
134  }
135 
136  return rho;
137 }
138 
139 doublereal WaterProps::relEpsilon(doublereal T, doublereal P_pascal,
140  int ifunc)
141 {
142  static const doublereal U1 = 3.4279E2;
143  static const doublereal U2 = -5.0866E-3;
144  static const doublereal U3 = 9.4690E-7;
145  static const doublereal U4 = -2.0525;
146  static const doublereal U5 = 3.1159E3;
147  static const doublereal U6 = -1.8289E2;
148  static const doublereal U7 = -8.0325E3;
149  static const doublereal U8 = 4.2142E6;
150  static const doublereal U9 = 2.1417;
151  doublereal T2 = T * T;
152 
153  doublereal eps1000 = U1 * exp(U2 * T + U3 * T2);
154  doublereal C = U4 + U5/(U6 + T);
155  doublereal B = U7 + U8/T + U9 * T;
156 
157  doublereal Pbar = P_pascal * 1.0E-5;
158  doublereal tmpBpar = B + Pbar;
159  doublereal tmpB1000 = B + 1000.0;
160  doublereal ltmp = log(tmpBpar/tmpB1000);
161  doublereal epsRel = eps1000 + C * ltmp;
162 
163  if (ifunc == 1 || ifunc == 2) {
164  doublereal tmpC = U6 + T;
165  doublereal dCdT = - U5/(tmpC * tmpC);
166 
167  doublereal dBdT = - U8/(T * T) + U9;
168 
169  doublereal deps1000dT = eps1000 * (U2 + 2.0 * U3 * T);
170 
171  doublereal dltmpdT = (dBdT/tmpBpar - dBdT/tmpB1000);
172  if (ifunc == 1) {
173  return deps1000dT + dCdT * ltmp + C * dltmpdT;
174  }
175  doublereal T3 = T2 * T;
176  doublereal d2CdT2 = - 2.0 * dCdT / tmpC;
177  doublereal d2BdT2 = 2.0 * U8 / (T3);
178 
179  doublereal d2ltmpdT2 = (d2BdT2*(1.0/tmpBpar - 1.0/tmpB1000) +
180  dBdT*dBdT*(1.0/(tmpB1000*tmpB1000) - 1.0/(tmpBpar*tmpBpar)));
181 
182  doublereal d2eps1000dT2 = (deps1000dT * (U2 + 2.0 * U3 * T) + eps1000 * (2.0 * U3));
183 
184  if (ifunc == 2) {
185  doublereal d2epsReldT2 = (d2eps1000dT2 + d2CdT2 * ltmp + 2.0 * dCdT * dltmpdT
186  + C * d2ltmpdT2);
187  return d2epsReldT2;
188  }
189  }
190  if (ifunc == 3) {
191  doublereal dltmpdP = 1.0E-5 / tmpBpar;
192  return C * dltmpdP;
193  }
194 
195  return epsRel;
196 }
197 
198 
199 doublereal WaterProps::ADebye(doublereal T, doublereal P_input, int ifunc)
200 {
201  doublereal psat = satPressure(T);
202  doublereal P;
203  if (psat > P_input) {
204  P = psat;
205  } else {
206  P = P_input;
207  }
208  doublereal epsRelWater = relEpsilon(T, P, 0);
209  doublereal epsilon = epsilon_0 * epsRelWater;
210  doublereal dw = density_IAPWS(T, P);
211  doublereal tmp = sqrt(2.0 * Avogadro * dw / 1000.);
212  doublereal tmp2 = ElectronCharge * ElectronCharge * Avogadro /
213  (epsilon * GasConstant * T);
214  doublereal tmp3 = tmp2 * sqrt(tmp2);
215  doublereal A_Debye = tmp * tmp3 / (8.0 * Pi);
216 
217 
218  /*
219  * dAdT = - 3/2 Ad/T + 1/2 Ad/dw d(dw)/dT - 3/2 Ad/eps d(eps)/dT
220  *
221  * dAdT = - 3/2 Ad/T - 1/2 Ad/Vw d(Vw)/dT - 3/2 Ad/eps d(eps)/dT
222  */
223  if (ifunc == 1 || ifunc == 2) {
224  doublereal dAdT = - 1.5 * A_Debye / T;
225 
226  doublereal depsRelWaterdT = relEpsilon(T, P, 1);
227  dAdT -= A_Debye * (1.5 * depsRelWaterdT / epsRelWater);
228 
229  /*
230  * calculate d(lnV)/dT _constantP, i.e., the cte
231  */
232  doublereal cte = coeffThermalExp_IAPWS(T, P);
233  doublereal contrib2 = - A_Debye * (0.5 * cte);
234  dAdT += contrib2;
235 
236  if (ifunc == 1) {
237  return dAdT;
238  }
239 
240  if (ifunc == 2) {
241  /*
242  * Get the second derivative of the dielectric constant wrt T
243  * -> we will take each of the terms in dAdT and differentiate
244  * it again.
245  */
246  doublereal d2AdT2 = 1.5 / T * (A_Debye/T - dAdT);
247 
248  doublereal d2epsRelWaterdT2 = relEpsilon(T, P, 2);
249 
250  d2AdT2 += 1.5 * (- dAdT * depsRelWaterdT / epsRelWater
251  - A_Debye / epsRelWater *
252  (d2epsRelWaterdT2 - depsRelWaterdT * depsRelWaterdT / epsRelWater));
253 
254  doublereal deltaT = -0.1;
255  doublereal Tdel = T + deltaT;
256  doublereal cte_del = coeffThermalExp_IAPWS(Tdel, P);
257  doublereal dctedT = (cte_del - cte) / Tdel;
258  doublereal contrib3 = 0.5 * (-(dAdT * cte) -(A_Debye * dctedT));
259  d2AdT2 += contrib3;
260 
261  return d2AdT2;
262  }
263  }
264  /*
265  * A_Debye = (1/(8 Pi)) sqrt(2 Na dw / 1000)
266  * (e e/(epsilon R T))^3/2
267  *
268  * dAdP = + 1/2 Ad/dw d(dw)/dP - 3/2 Ad/eps d(eps)/dP
269  *
270  * dAdP = - 1/2 Ad/Vw d(Vw)/dP - 3/2 Ad/eps d(eps)/dP
271  *
272  * dAdP = + 1/2 Ad * kappa - 3/2 Ad/eps d(eps)/dP
273  *
274  * where kappa = - 1/Vw d(Vw)/dP_T (isothermal compressibility)
275  */
276  if (ifunc == 3) {
277 
278  doublereal dAdP = 0.0;
279 
280  doublereal depsRelWaterdP = relEpsilon(T, P, 3);
281  dAdP -= A_Debye * (1.5 * depsRelWaterdP / epsRelWater);
282 
283  doublereal kappa = isothermalCompressibility_IAPWS(T,P);
284  dAdP += A_Debye * (0.5 * kappa);
285 
286  return dAdP;
287  }
288 
289  return A_Debye;
290 }
291 
292 doublereal WaterProps::satPressure(doublereal T)
293 {
294  return m_waterIAPWS->psat(T);
295 }
296 
297 doublereal WaterProps::density_IAPWS(doublereal temp, doublereal press)
298 {
299  return m_waterIAPWS->density(temp, press, WATER_LIQUID);
300 }
301 
302 doublereal WaterProps::density_IAPWS() const
303 {
304  return m_waterIAPWS->density();
305 }
306 
307 doublereal WaterProps::coeffThermalExp_IAPWS(doublereal temp, doublereal press)
308 {
309  doublereal dens = m_waterIAPWS->density(temp, press, WATER_LIQUID);
310  if (dens < 0.0) {
311  throw CanteraError("WaterProps::coeffThermalExp_IAPWS",
312  "Unable to solve for density at T = " + fp2str(temp) + " and P = " + fp2str(press));
313  }
314  return m_waterIAPWS->coeffThermExp();
315 }
316 
317 doublereal WaterProps::isothermalCompressibility_IAPWS(doublereal temp, doublereal press)
318 {
319  doublereal dens = m_waterIAPWS->density(temp, press, WATER_LIQUID);
320  if (dens < 0.0) {
321  throw CanteraError("WaterProps::isothermalCompressibility_IAPWS",
322  "Unable to solve for density at T = " + fp2str(temp) + " and P = " + fp2str(press));
323  }
325 }
326 
327 static const doublereal H[4] = {1., 0.978197, 0.579829, -0.202354};
328 
329 static const doublereal Hij[6][7] = {
330  { 0.5132047, 0.2151778, -0.2818107, 0.1778064, -0.04176610, 0., 0.},
331  { 0.3205656, 0.7317883, -1.070786 , 0.4605040, 0., -0.01578386, 0.},
332  { 0., 1.241044 , -1.263184 , 0.2340379, 0., 0., 0.},
333  { 0., 1.476783 , 0., -0.4924179, 0.1600435, 0., -0.003629481},
334  {-0.7782567, 0.0 , 0., 0. , 0., 0., 0.},
335  { 0.1885447, 0.0 , 0., 0. , 0., 0., 0.},
336 };
337 
338 static const doublereal rhoStar = 317.763; // kg / m3
339 static const doublereal presStar = 22.115E6; // Pa
340 
341 doublereal WaterProps::viscosityWater() const
342 {
343  static const doublereal TStar = 647.27; // Kelvin
344  static const doublereal muStar = 55.071E-6; //Pa s
345  doublereal temp = m_waterIAPWS->temperature();
346  doublereal dens = m_waterIAPWS->density();
347 
348  doublereal rhobar = dens/rhoStar;
349  doublereal tbar = temp / TStar;
350  doublereal tbar2 = tbar * tbar;
351  doublereal tbar3 = tbar2 * tbar;
352 
353  doublereal mu0bar = std::sqrt(tbar) / (H[0] + H[1]/tbar + H[2]/tbar2 + H[3]/tbar3);
354 
355  doublereal tfac1 = 1.0 / tbar - 1.0;
356  doublereal tfac2 = tfac1 * tfac1;
357  doublereal tfac3 = tfac2 * tfac1;
358  doublereal tfac4 = tfac3 * tfac1;
359  doublereal tfac5 = tfac4 * tfac1;
360 
361  doublereal rfac1 = rhobar - 1.0;
362  doublereal rfac2 = rfac1 * rfac1;
363  doublereal rfac3 = rfac2 * rfac1;
364  doublereal rfac4 = rfac3 * rfac1;
365  doublereal rfac5 = rfac4 * rfac1;
366  doublereal rfac6 = rfac5 * rfac1;
367 
368  doublereal sum = (Hij[0][0] + Hij[1][0]*tfac1 + Hij[4][0]*tfac4 + Hij[5][0]*tfac5 +
369  Hij[0][1]*rfac1 + Hij[1][1]*tfac1*rfac1 + Hij[2][1]*tfac2*rfac1 + Hij[3][1]*tfac3*rfac1 +
370  Hij[0][2]*rfac2 + Hij[1][2]*tfac1*rfac2 + Hij[2][2]*tfac2*rfac2 +
371  Hij[0][3]*rfac3 + Hij[1][3]*tfac1*rfac3 + Hij[2][3]*tfac2*rfac3 + Hij[3][3]*tfac3*rfac3 +
372  Hij[0][4]*rfac4 + Hij[3][4]*tfac3*rfac4 +
373  Hij[1][5]*tfac1*rfac5 + Hij[3][6]*tfac3*rfac6
374  );
375  doublereal mu1bar = std::exp(rhobar * sum);
376 
377  // Apply the near-critical point corrections if necessary
378  doublereal mu2bar = 1.0;
379  if ((tbar >= 0.9970) && tbar <= 1.0082) {
380  if ((rhobar >= 0.755) && (rhobar <= 1.290)) {
381  doublereal drhodp = 1.0 / m_waterIAPWS->dpdrho();
382  drhodp *= presStar / rhoStar;
383  doublereal xsi = rhobar * drhodp;
384  if (xsi >= 21.93) {
385  mu2bar = 0.922 * std::pow(xsi, 0.0263);
386  }
387  }
388  }
389 
390  doublereal mubar = mu0bar * mu1bar * mu2bar;
391 
392  return mubar * muStar;
393 }
394 
396 {
397  static const doublereal Tstar = 647.27;
398  static const doublereal rhostar = 317.763;
399  static const doublereal lambdastar = 0.4945;
400  static const doublereal presstar = 22.115E6;
401  static const doublereal L[4] = {
402  1.0000,
403  6.978267,
404  2.599096,
405  -0.998254
406  };
407  static const doublereal Lji[6][5] = {
408  { 1.3293046, 1.7018363, 5.2246158, 8.7127675, -1.8525999},
409  {-0.40452437, -2.2156845, -10.124111, -9.5000611, 0.93404690},
410  { 0.24409490, 1.6511057, 4.9874687, 4.3786606, 0.0},
411  { 0.018660751, -0.76736002, -0.27297694, -0.91783782, 0.0},
412  {-0.12961068, 0.37283344, -0.43083393, 0.0, 0.0},
413  { 0.044809953, -0.11203160, 0.13333849, 0.0, 0.0},
414  };
415 
416  doublereal temp = m_waterIAPWS->temperature();
417  doublereal dens = m_waterIAPWS->density();
418 
419  doublereal rhobar = dens/rhostar;
420  doublereal tbar = temp / Tstar;
421  doublereal tbar2 = tbar * tbar;
422  doublereal tbar3 = tbar2 * tbar;
423  doublereal lambda0bar = sqrt(tbar) / (L[0] + L[1]/tbar + L[2]/tbar2 + L[3]/tbar3);
424 
425  doublereal tfac1 = 1.0 / tbar - 1.0;
426  doublereal tfac2 = tfac1 * tfac1;
427  doublereal tfac3 = tfac2 * tfac1;
428  doublereal tfac4 = tfac3 * tfac1;
429 
430  doublereal rfac1 = rhobar - 1.0;
431  doublereal rfac2 = rfac1 * rfac1;
432  doublereal rfac3 = rfac2 * rfac1;
433  doublereal rfac4 = rfac3 * rfac1;
434  doublereal rfac5 = rfac4 * rfac1;
435 
436  doublereal sum = (Lji[0][0] + Lji[0][1]*tfac1 + Lji[0][2]*tfac2 + Lji[0][3]*tfac3 + Lji[0][4]*tfac4 +
437  Lji[1][0]*rfac1 + Lji[1][1]*tfac1*rfac1 + Lji[1][2]*tfac2*rfac1 + Lji[1][3]*tfac3*rfac1 + Lji[1][4]*tfac4*rfac1 +
438  Lji[2][0]*rfac2 + Lji[2][1]*tfac1*rfac2 + Lji[2][2]*tfac2*rfac2 + Lji[2][3]*tfac3*rfac2 +
439  Lji[3][0]*rfac3 + Lji[3][1]*tfac1*rfac3 + Lji[3][2]*tfac2*rfac3 + Lji[3][3]*tfac3*rfac3 +
440  Lji[4][0]*rfac4 + Lji[4][1]*tfac1*rfac4 + Lji[4][2]*tfac2*rfac4 +
441  Lji[5][0]*rfac5 + Lji[5][1]*tfac1*rfac5 + Lji[5][2]*tfac2*rfac5
442  );
443  doublereal lambda1bar = exp(rhobar * sum);
444 
445  doublereal mu0bar = std::sqrt(tbar) / (H[0] + H[1]/tbar + H[2]/tbar2 + H[3]/tbar3);
446 
447  doublereal tfac5 = tfac4 * tfac1;
448  doublereal rfac6 = rfac5 * rfac1;
449 
450  sum = (Hij[0][0] + Hij[1][0]*tfac1 + Hij[4][0]*tfac4 + Hij[5][0]*tfac5 +
451  Hij[0][1]*rfac1 + Hij[1][1]*tfac1*rfac1 + Hij[2][1]*tfac2*rfac1 + Hij[3][1]*tfac3*rfac1 +
452  Hij[0][2]*rfac2 + Hij[1][2]*tfac1*rfac2 + Hij[2][2]*tfac2*rfac2 +
453  Hij[0][3]*rfac3 + Hij[1][3]*tfac1*rfac3 + Hij[2][3]*tfac2*rfac3 + Hij[3][3]*tfac3*rfac3 +
454  Hij[0][4]*rfac4 + Hij[3][4]*tfac3*rfac4 +
455  Hij[1][5]*tfac1*rfac5 + Hij[3][6]*tfac3*rfac6
456  );
457  doublereal mu1bar = std::exp(rhobar * sum);
458 
459  doublereal t2r2 = tbar * tbar / (rhobar * rhobar);
460  doublereal drhodp = 1.0 / m_waterIAPWS->dpdrho();
461  drhodp *= presStar / rhoStar;
462  doublereal xsi = rhobar * drhodp;
463  doublereal xsipow = std::pow(xsi, 0.4678);
464  doublereal rho1 = rhobar - 1.;
465  doublereal rho2 = rho1 * rho1;
466  doublereal rho4 = rho2 * rho2;
467  doublereal temp2 = (tbar - 1.0) * (tbar - 1.0);
468 
469  /*
470  * beta = M / (rho * Rgas) (d (pressure) / dT) at constant rho
471  *
472  * Note for ideal gases this is equal to one.
473  *
474  * beta = delta (phi0_d() + phiR_d())
475  * - tau delta (phi0_dt() + phiR_dt())
476  */
477  doublereal beta = m_waterIAPWS->coeffPresExp();
478 
479  doublereal dpdT_const_rho = beta * GasConstant * dens / 18.015268;
480  dpdT_const_rho *= Tstar / presstar;
481 
482  doublereal lambda2bar = 0.0013848 / (mu0bar * mu1bar) * t2r2 * dpdT_const_rho * dpdT_const_rho *
483  xsipow * sqrt(rhobar) * exp(-18.66*temp2 - rho4);
484 
485  return (lambda0bar * lambda1bar + lambda2bar) * lambdastar;
486 }
487 
488 }
doublereal isothermalCompressibility() const
Returns the coefficient of isothermal compressibility for the state of the object.
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
doublereal viscosityWater() const
Returns the viscosity of water at the current conditions (kg/m/s)
Definition: WaterProps.cpp:341
doublereal density(doublereal temperature, doublereal pressure, int phase=-1, doublereal rhoguess=-1.0)
Calculates the density given the temperature and the pressure, and a guess at the density...
Class for calculating the equation of state of water.
doublereal density_IAPWS() const
Returns the density of water.
Definition: WaterProps.cpp:302
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
Header for a class used to house several approximation routines for properties of water...
doublereal coeffThermExp() const
Returns the coefficient of thermal expansion.
const doublereal Pi
Pi.
Definition: ct_defs.h:51
doublereal satPressure(doublereal T)
Returns the saturation pressure given the temperature.
Definition: WaterProps.cpp:292
doublereal dpdrho() const
Returns the value of dp / drho at constant T for the state of the object.
WaterProps & operator=(const WaterProps &b)
Assignment operator.
Definition: WaterProps.cpp:67
doublereal isothermalCompressibility_IAPWS(doublereal T, doublereal P)
Returns the isothermal compressibility of water.
Definition: WaterProps.cpp:317
The WaterProps class is used to house several approximation routines for properties of water...
Definition: WaterProps.h:96
virtual ~WaterProps()
destructor
Definition: WaterProps.cpp:60
WaterPropsIAPWS * getWater()
Get a pointer to a changeable WaterPropsIAPWS object.
Definition: PDSS_Water.h:212
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
Definition: stringUtils.cpp:28
Class for the liquid water pressure dependent standard state.
Definition: PDSS_Water.h:51
WaterPropsIAPWS * m_waterIAPWS
Pointer to the WaterPropsIAPWS object.
Definition: WaterProps.h:290
doublereal thermalConductivityWater() const
Returns the thermal conductivity of water at the current conditions (W/m/K)
Definition: WaterProps.cpp:395
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:99
WaterProps()
Default constructor.
Definition: WaterProps.cpp:17
const doublereal Avogadro
Avogadro's Number [number/kmol].
Definition: ct_defs.h:61
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
Definition: ct_defs.h:64
Contains declarations for string manipulation functions within Cantera.
const doublereal epsilon_0
Permittivity of free space in F/m.
Definition: ct_defs.h:106
doublereal ADebye(doublereal T, doublereal P, int ifunc)
ADebye calculates the value of A_Debye as a function of temperature and pressure according to relatio...
Definition: WaterProps.cpp:199
doublereal coeffThermalExp_IAPWS(doublereal T, doublereal P)
returns the coefficient of thermal expansion
Definition: WaterProps.cpp:307
doublereal relEpsilon(doublereal T, doublereal P_pascal, int ifunc=0)
Bradley-Pitzer equation for the dielectric constant of water as a function of temperature and pressur...
Definition: WaterProps.cpp:139
static doublereal density_T(doublereal T, doublereal P, int ifunc)
Simple calculation of water density at atmospheric pressure.
Definition: WaterProps.cpp:87
bool m_own_sub
true if we own the WaterPropsIAPWS object
Definition: WaterProps.h:293
doublereal temperature() const
Returns the temperature (Kelvin)
doublereal psat(doublereal temperature, int waterState=WATER_LIQUID)
This function returns the saturation pressure given the temperature as an input parameter, and sets the internal state to the saturated conditions.
doublereal coeffPresExp() const
Returns the isochoric pressure derivative wrt temperature.