H2O.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011 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, Istream);
36  addToRunTimeSelectionTable(liquidProperties, H2O, dictionary);
37 }
38 
39 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40 
42 :
44  (
45  18.015,
46  647.13,
47  2.2055e+7,
48  0.05595,
49  0.229,
50  273.16,
51  6.113e+2,
52  373.15,
53  6.1709e-30,
54  0.3449,
55  4.7813e+4
56  ),
57  rho_(98.343885, 0.30542, 647.13, 0.081),
58  pv_(73.649, -7258.2, -7.3037, 4.1653e-06, 2),
59  hl_(647.13, 2889425.47876769, 0.3199, -0.212, 0.25795, 0),
60  Cp_
61  (
62  15341.1046350264,
63  -116.019983347211,
64  0.451013044684985,
65  -0.000783569247849015,
66  5.20127671384957e-07,
67  0
68  ),
69  h_
70  (
71  -17957283.7993676,
72  15341.1046350264,
73  -58.0099916736053,
74  0.150337681561662,
75  -0.000195892311962254,
76  1.04025534276991e-07
77  ),
78  Cpg_
79  (
80  1851.73466555648,
81  1487.53816264224,
82  2609.3,
83  493.366638912018,
84  1167.6
85  ),
86  B_
87  (
88  -0.0012789342214821,
89  1.4909797391063,
90  -1563696.91923397,
91  1.85445462114904e+19,
92  -7.68082153760755e+21
93  ),
94  mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10),
95  mug_(2.6986e-06, 0.498, 1257.7, -19570),
96  K_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0, 0),
97  Kg_(6.977e-05, 1.1243, 844.9, -148850),
98  sigma_(647.13, 0.18548, 2.717, -3.554, 2.047, 0),
99  D_(15.0, 15.0, 18.015, 28)
100 {}
101 
102 
104 (
105  const liquidProperties& l,
106  const NSRDSfunc5& density,
107  const NSRDSfunc1& vapourPressure,
108  const NSRDSfunc6& heatOfVapourisation,
109  const NSRDSfunc0& heatCapacity,
110  const NSRDSfunc0& enthalpy,
111  const NSRDSfunc7& idealGasHeatCapacity,
112  const NSRDSfunc4& secondVirialCoeff,
113  const NSRDSfunc1& dynamicViscosity,
114  const NSRDSfunc2& vapourDynamicViscosity,
115  const NSRDSfunc0& thermalConductivity,
116  const NSRDSfunc2& vapourThermalConductivity,
117  const NSRDSfunc6& surfaceTension,
118  const APIdiffCoefFunc& vapourDiffussivity
119 )
120 :
121  liquidProperties(l),
122  rho_(density),
123  pv_(vapourPressure),
124  hl_(heatOfVapourisation),
125  Cp_(heatCapacity),
126  h_(enthalpy),
127  Cpg_(idealGasHeatCapacity),
128  B_(secondVirialCoeff),
129  mu_(dynamicViscosity),
130  mug_(vapourDynamicViscosity),
131  K_(thermalConductivity),
132  Kg_(vapourThermalConductivity),
133  sigma_(surfaceTension),
134  D_(vapourDiffussivity)
135 {}
136 
137 
139 :
140  liquidProperties(is),
141  rho_(is),
142  pv_(is),
143  hl_(is),
144  Cp_(is),
145  h_(is),
146  Cpg_(is),
147  B_(is),
148  mu_(is),
149  mug_(is),
150  K_(is),
151  Kg_(is),
152  sigma_(is),
153  D_(is)
154 {}
155 
156 
158 :
160  rho_(dict.subDict("rho")),
161  pv_(dict.subDict("pv")),
162  hl_(dict.subDict("hl")),
163  Cp_(dict.subDict("Cp")),
164  h_(dict.subDict("h")),
165  Cpg_(dict.subDict("Cpg")),
166  B_(dict.subDict("B")),
167  mu_(dict.subDict("mu")),
168  mug_(dict.subDict("mug")),
169  K_(dict.subDict("K")),
170  Kg_(dict.subDict("Kg")),
171  sigma_(dict.subDict("sigma")),
172  D_(dict.subDict("D"))
173 {}
174 
175 
176 Foam::H2O::H2O(const H2O& liq)
177 :
178  liquidProperties(liq),
179  rho_(liq.rho_),
180  pv_(liq.pv_),
181  hl_(liq.hl_),
182  Cp_(liq.Cp_),
183  h_(liq.h_),
184  Cpg_(liq.Cpg_),
185  B_(liq.B_),
186  mu_(liq.mu_),
187  mug_(liq.mug_),
188  K_(liq.K_),
189  Kg_(liq.Kg_),
190  sigma_(liq.sigma_),
191  D_(liq.D_)
192 {}
193 
194 
195 // ************************************************************************* //
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Foam::NSRDSfunc0
NSRDS function number 100.
Definition: NSRDSfunc0.H:67
Foam::NSRDSfunc7
NSRDS-AICHE function number 107.
Definition: NSRDSfunc7.H:67
Foam::NSRDSfunc4
NSRDS function number 104.
Definition: NSRDSfunc4.H:67
Foam::liquidProperties
The thermophysical properties of a liquidProperties.
Definition: liquidProperties.H:53
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::H2O
water
Definition: H2O.H:57
Foam::APIdiffCoefFunc
API function for vapour mass diffusivity.
Definition: APIdiffCoefFunc.H:51
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::NSRDSfunc1
NSRDS function number 101.
Definition: NSRDSfunc1.H:67
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::NSRDSfunc5
NSRDS function number 105.
Definition: NSRDSfunc5.H:67
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: doubleFloat.H:94
Foam::NSRDSfunc2
NSRDS function number 102.
Definition: NSRDSfunc2.H:67
H2O.H
Foam::H2O::H2O
H2O()
Construct null.
Definition: H2O.C:41
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::NSRDSfunc6
NSRDS function number 106.
Definition: NSRDSfunc6.H:67