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