1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 urea, note that some of the properties are unavailable in the literature and have been copied from water.
34 \*---------------------------------------------------------------------------*/
40 #include "NSRDSfunc0.H"
41 #include "NSRDSfunc1.H"
42 #include "NSRDSfunc2.H"
43 #include "NSRDSfunc3.H"
44 #include "NSRDSfunc4.H"
45 #include "NSRDSfunc5.H"
46 #include "NSRDSfunc6.H"
47 #include "NSRDSfunc7.H"
48 #include "NSRDSfunc14.H"
49 #include "APIdiffCoefFunc.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 /*---------------------------------------------------------------------------*\
57 Class CH4N2O Declaration
58 \*---------------------------------------------------------------------------*/
82 //- Runtime type information
91 liquid(60.056, 705.0, 9.050e+6, 0.218, 0.337, 405.85, 9.3131e+1, 465.0, 1.52e-29, 0.3449, 4.7813e+4),
92 rho_(1230.006936, 0, 0, 0, 0, 0),
93 pv_(3015.15611544, -185497.059684, -430.223621983, 0.00017405122622, 2.0),
94 hl_(705.0, 2534249.0, 0.5, 0.0, 0.0, 0.0),
95 cp_(2006.46063673904, 0, 0, 0, 0, 0),
96 h_(-6154107.41641135, 2006.46063673904, 0, 0, 0, 0),
97 cpg_(811.875582789397, 2099.04089516451, 1627.3, 1603.63660583455, 724.41),
98 B_(-0.000383641934194752, 0.447249234048222, -469062.208605302, 5.5628080458239e+18, -2.3040162514986e+21),
99 mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10),
100 mug_(2.6986e-06, 0.498, 1257.7, -19570),
101 K_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0, 0),
102 Kg_(6.977e-05, 1.1243, 844.9, -148850),
103 sigma_(705.0, 1.0, 0.0, 0.0, 0.0, 0), // set to constant
104 D_(147.18, 20.1, 60.056, 28) // Same as nHeptane
109 const NSRDSfunc0& density,
110 const NSRDSfunc1& vapourPressure,
111 const NSRDSfunc6& heatOfVapourisation,
112 const NSRDSfunc0& heatCapacity,
113 const NSRDSfunc0& enthalpy,
114 const NSRDSfunc7& idealGasHeatCapacity,
115 const NSRDSfunc4& secondVirialCoeff,
116 const NSRDSfunc1& dynamicViscosity,
117 const NSRDSfunc2& vapourDynamicViscosity,
118 const NSRDSfunc0& thermalConductivity,
119 const NSRDSfunc2& vapourThermalConductivity,
120 const NSRDSfunc6& surfaceTension,
121 const APIdiffCoefFunc& vapourDiffussivity
127 hl_(heatOfVapourisation),
130 cpg_(idealGasHeatCapacity),
131 B_(secondVirialCoeff),
132 mu_(dynamicViscosity),
133 mug_(vapourDynamicViscosity),
134 K_(thermalConductivity),
135 Kg_(vapourThermalConductivity),
136 sigma_(surfaceTension),
137 D_(vapourDiffussivity)
140 //- Construct from Istream
162 //- Liquid density [kg/m^3]
163 scalar rho(scalar p, scalar T) const
168 //- Vapour pressure [Pa]
169 scalar pv(scalar p, scalar T) const
174 //- Heat of vapourisation [J/kg]
175 scalar hl(scalar p, scalar T) const
180 //- Liquid heat capacity [J/(kg K)]
181 scalar cp(scalar p, scalar T) const
186 //- Liquid Enthalpy [J/(kg)]
187 scalar h(scalar p, scalar T) const
192 //- Ideal gas heat capacity [J/(kg K)]
193 scalar cpg(scalar p, scalar T) const
198 //- Second Virial Coefficient [m^3/kg]
199 scalar B(scalar p, scalar T) const
204 //- Liquid viscosity [Pa s]
205 scalar mu(scalar p, scalar T) const
210 //- Vapour viscosity [Pa s]
211 scalar mug(scalar p, scalar T) const
216 //- Liquid thermal conductivity [W/(m K)]
217 scalar K(scalar p, scalar T) const
222 //- Vapour thermal conductivity [W/(m K)]
223 scalar Kg(scalar p, scalar T) const
228 //- Surface tension [N/m]
229 scalar sigma(scalar p, scalar T) const
231 return sigma_.f(p, T);
234 //- Vapour diffussivity [m2/s]
235 scalar D(scalar p, scalar T) const
241 //- Write the function coefficients
242 void writeData(Ostream& os) const
244 liquid::writeData(os); os << nl;
245 rho_.writeData(os); os << nl;
246 pv_.writeData(os); os << nl;
247 hl_.writeData(os); os << nl;
248 cp_.writeData(os); os << nl;
249 cpg_.writeData(os); os << nl;
250 B_.writeData(os); os << nl;
251 mu_.writeData(os); os << nl;
252 mug_.writeData(os); os << nl;
253 K_.writeData(os); os << nl;
254 Kg_.writeData(os); os << nl;
255 sigma_.writeData(os); os << nl;
256 D_.writeData(os); os << endl;
262 friend Ostream& operator<<(Ostream& os, const CH4N2O& l)
270 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
272 } // End namespace Foam
274 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
278 // ************************************************************************* //