1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
33 \*---------------------------------------------------------------------------*/
38 #include "liquidProperties.H"
39 #include "NSRDSfunc0.H"
40 #include "NSRDSfunc1.H"
41 #include "NSRDSfunc2.H"
42 #include "NSRDSfunc3.H"
43 #include "NSRDSfunc4.H"
44 #include "NSRDSfunc5.H"
45 #include "NSRDSfunc6.H"
46 #include "NSRDSfunc7.H"
47 #include "APIdiffCoefFunc.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 /*---------------------------------------------------------------------------*\
56 \*---------------------------------------------------------------------------*/
60 public liquidProperties
81 //- Runtime type information
90 //- Construct from components
93 const liquidProperties& l,
94 const NSRDSfunc5& density,
95 const NSRDSfunc1& vapourPressure,
96 const NSRDSfunc6& heatOfVapourisation,
97 const NSRDSfunc0& heatCapacity,
98 const NSRDSfunc0& enthalpy,
99 const NSRDSfunc7& idealGasHeatCapacity,
100 const NSRDSfunc4& secondVirialCoeff,
101 const NSRDSfunc1& dynamicViscosity,
102 const NSRDSfunc2& vapourDynamicViscosity,
103 const NSRDSfunc0& thermalConductivity,
104 const NSRDSfunc2& vapourThermalConductivity,
105 const NSRDSfunc6& surfaceTension,
106 const APIdiffCoefFunc& vapourDiffussivity
109 //- Construct from Istream
112 //- Construct from dictionary
113 H2O(const dictionary& dict);
118 //- Construct and return clone
119 virtual autoPtr<liquidProperties> clone() const
121 return autoPtr<liquidProperties>(new H2O(*this));
127 //- Liquid density [kg/m^3]
128 inline scalar rho(scalar p, scalar T) const;
130 //- Vapour pressure [Pa]
131 inline scalar pv(scalar p, scalar T) const;
133 //- Heat of vapourisation [J/kg]
134 inline scalar hl(scalar p, scalar T) const;
136 //- Liquid heat capacity [J/(kg K)]
137 inline scalar Cp(scalar p, scalar T) const;
139 //- Liquid Enthalpy [J/(kg)]
140 inline scalar h(scalar p, scalar T) const;
142 //- Ideal gas heat capacity [J/(kg K)]
143 inline scalar Cpg(scalar p, scalar T) const;
145 //- Second Virial Coefficient [m^3/kg]
146 inline scalar B(scalar p, scalar T) const;
148 //- Liquid viscosity [Pa s]
149 inline scalar mu(scalar p, scalar T) const;
151 //- Vapour viscosity [Pa s]
152 inline scalar mug(scalar p, scalar T) const;
154 //- Liquid thermal conductivity [W/(m K)]
155 inline scalar K(scalar p, scalar T) const;
157 //- Vapour thermal conductivity [W/(m K)]
158 inline scalar Kg(scalar p, scalar T) const;
160 //- Surface tension [N/m]
161 inline scalar sigma(scalar p, scalar T) const;
163 //- Vapour diffussivity [m2/s]
164 inline scalar D(scalar p, scalar T) const;
166 //- Vapour diffussivity [m2/s] with specified binary pair
167 inline scalar D(scalar p, scalar T, scalar Wb) const;
172 //- Write the function coefficients
173 void writeData(Ostream& os) const
175 liquidProperties::writeData(os); os << nl;
176 rho_.writeData(os); os << nl;
177 pv_.writeData(os); os << nl;
178 hl_.writeData(os); os << nl;
179 Cp_.writeData(os); os << nl;
180 Cpg_.writeData(os); os << nl;
181 B_.writeData(os); os << nl;
182 mu_.writeData(os); os << nl;
183 mug_.writeData(os); os << nl;
184 K_.writeData(os); os << nl;
185 Kg_.writeData(os); os << nl;
186 sigma_.writeData(os); os << nl;
187 D_.writeData(os); os << endl;
192 friend Ostream& operator<<(Ostream& os, const H2O& l)
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 } // End namespace Foam
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 // ************************************************************************* //