All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
H2O.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "H2O.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(H2O, 0);
34  addToRunTimeSelectionTable(liquidProperties, H2O,);
35  addToRunTimeSelectionTable(liquidProperties, H2O, dictionary);
36 }
37 
38 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39 
41 :
43  (
44  18.015,
45  647.13,
46  2.2055e+7,
47  0.05595,
48  0.229,
49  273.16,
50  6.113e+2,
51  373.15,
52  6.1709e-30,
53  0.3449,
54  4.7813e+4
55  ),
56  rho_(98.343885, 0.30542, 647.13, 0.081),
57  pv_(73.649, -7258.2, -7.3037, 4.1653e-06, 2),
58  hl_(647.13, 2889425.47876769, 0.3199, -0.212, 0.25795, 0),
59  Cp_
60  (
61  15341.1046350264,
62  -116.019983347211,
63  0.451013044684985,
64  -0.000783569247849015,
65  5.20127671384957e-07,
66  0
67  ),
68  h_
69  (
70  -17957283.7993676,
71  15341.1046350264,
72  -58.0099916736053,
73  0.150337681561662,
74  -0.000195892311962254,
75  1.04025534276991e-07
76  ),
77  Cpg_
78  (
79  1851.73466555648,
80  1487.53816264224,
81  2609.3,
82  493.366638912018,
83  1167.6
84  ),
85  B_
86  (
87  -0.0012789342214821,
88  1.4909797391063,
89  -1563696.91923397,
90  1.85445462114904e+19,
91  -7.68082153760755e+21
92  ),
93  mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10),
94  mug_(2.6986e-06, 0.498, 1257.7, -19570),
95  kappa_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0, 0),
96  kappag_(6.977e-05, 1.1243, 844.9, -148850),
97  sigma_(647.13, 0.18548, 2.717, -3.554, 2.047, 0),
98  D_(15.0, 15.0, 18.015, 28)
99 {}
100 
101 
103 (
104  const liquidProperties& l,
105  const thermophysicalFunctions::NSRDS5& density,
106  const thermophysicalFunctions::NSRDS1& vapourPressure,
107  const thermophysicalFunctions::NSRDS6& heatOfVapourisation,
108  const thermophysicalFunctions::NSRDS0& heatCapacity,
109  const thermophysicalFunctions::NSRDS0& enthalpy,
110  const thermophysicalFunctions::NSRDS7& idealGasHeatCapacity,
111  const thermophysicalFunctions::NSRDS4& secondVirialCoeff,
112  const thermophysicalFunctions::NSRDS1& dynamicViscosity,
113  const thermophysicalFunctions::NSRDS2& vapourDynamicViscosity,
114  const thermophysicalFunctions::NSRDS0& thermalConductivity,
115  const thermophysicalFunctions::NSRDS2& vapourThermalConductivity,
116  const thermophysicalFunctions::NSRDS6& surfaceTension,
117  const thermophysicalFunctions::APIdiffCoef& vapourDiffusivity
118 )
119 :
120  liquidProperties(l),
121  rho_(density),
122  pv_(vapourPressure),
123  hl_(heatOfVapourisation),
124  Cp_(heatCapacity),
125  h_(enthalpy),
126  Cpg_(idealGasHeatCapacity),
127  B_(secondVirialCoeff),
128  mu_(dynamicViscosity),
129  mug_(vapourDynamicViscosity),
130  kappa_(thermalConductivity),
131  kappag_(vapourThermalConductivity),
132  sigma_(surfaceTension),
133  D_(vapourDiffusivity)
134 {}
135 
136 
138 :
139  H2O()
140 {
141  readIfPresent(*this, dict);
142 }
143 
144 
145 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
146 
147 void Foam::H2O::write(Ostream& os) const
148 {
149  liquidProperties::write(*this, os);
150 }
151 
152 
153 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
H2O()
Construct null.
Definition: H2O.C:40
void readIfPresent(const dictionary &dict)
Read and set the properties present it the given dictionary.
water
Definition: H2O.H:57
void write(Ostream &os) const
Write the function coefficients.
Definition: H2O.C:147
Macros for easy insertion into run-time selection tables.
The thermophysical properties of a liquid.
friend class liquidProperties
Definition: H2O.H:80
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
virtual void write(Ostream &os) const =0
Write the function coefficients.
Namespace for OpenFOAM.