1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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
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 "APIdiffCoefFunc.H"
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class C8H10 Declaration
57 \*---------------------------------------------------------------------------*/
82 //- Runtime type information
91 liquid(106.167, 617.17, 3.6094e+6, 0.37381, 0.263, 178.15, 4.038e-3, 409.35, 1.9680e-30, 0.3036, 1.8043e+4),
92 rho_(76.3765398, 0.26438, 617.17, 0.2921),
93 pv_(88.246, -7691.1, -9.797, 5.931e-06, 2),
94 hl_(617.17, 516167.924119547, 0.3882, 0, 0, 0),
95 cp_(818.521762883005, 6.66873887366131, -0.0248005500767658, 4.23860521631015e-05, 0, 0),
96 // NN: enthalpy, h_, is not used in the sprayModel.
97 // For consistency, the enthalpy is derived from hlat and hl.
98 // It is, however, convenient to have it available.
99 h_(-524002.612929508, 818.521762883005, 3.33436943683065, -0.00826685002558862, 1.05965130407754e-05, 0),
100 cpg_(738.835984816374, 3201.5598067196, 1559, 2285.07916772632, -702),
101 B_(0.00165776559571242, -2.77958310962917, -388067.855359952, -5.86905535618412e+18, 1.58052878954854e+21),
102 mu_(-10.452, 1048.4, -0.0715, 0, 0),
103 mug_(1.2e-06, 0.4518, 439, 0),
104 K_(0.20149, -0.00023988, 0, 0, 0, 0),
105 Kg_(1.708e-05, 1.319, 565.6, 0),
106 sigma_(617.17, 0.066, 1.268, 0, 0, 0),
107 D_(147.18, 20.1, 106.167, 28) // NN: Same as nHeptane
112 const NSRDSfunc5& density,
113 const NSRDSfunc1& vapourPressure,
114 const NSRDSfunc6& heatOfVapourisation,
115 const NSRDSfunc0& heatCapacity,
116 const NSRDSfunc0& enthalpy,
117 const NSRDSfunc7& idealGasHeatCapacity,
118 const NSRDSfunc4& secondVirialCoeff,
119 const NSRDSfunc1& dynamicViscosity,
120 const NSRDSfunc2& vapourDynamicViscosity,
121 const NSRDSfunc0& thermalConductivity,
122 const NSRDSfunc2& vapourThermalConductivity,
123 const NSRDSfunc6& surfaceTension,
124 const APIdiffCoefFunc& vapourDiffussivity
130 hl_(heatOfVapourisation),
133 cpg_(idealGasHeatCapacity),
134 B_(secondVirialCoeff),
135 mu_(dynamicViscosity),
136 mug_(vapourDynamicViscosity),
137 K_(thermalConductivity),
138 Kg_(vapourThermalConductivity),
139 sigma_(surfaceTension),
140 D_(vapourDiffussivity)
143 //- Construct from Istream
165 //- Liquid density [kg/m^3]
166 scalar rho(scalar p, scalar T) const
171 //- Vapour pressure [Pa]
172 scalar pv(scalar p, scalar T) const
177 //- Heat of vapourisation [J/kg]
178 scalar hl(scalar p, scalar T) const
183 //- Liquid heat capacity [J/(kg K)]
184 scalar cp(scalar p, scalar T) const
189 //- Liquid Enthalpy [J/(kg)]
190 scalar h(scalar p, scalar T) const
195 //- Ideal gas heat capacity [J/(kg K)]
196 scalar cpg(scalar p, scalar T) const
201 //- Second Virial Coefficient [m^3/kg]
202 scalar B(scalar p, scalar T) const
207 //- Liquid viscosity [Pa s]
208 scalar mu(scalar p, scalar T) const
213 //- Vapour viscosity [Pa s]
214 scalar mug(scalar p, scalar T) const
219 //- Liquid thermal conductivity [W/(m K)]
220 scalar K(scalar p, scalar T) const
225 //- Vapour thermal conductivity [W/(m K)]
226 scalar Kg(scalar p, scalar T) const
231 //- Surface tension [N/m]
232 scalar sigma(scalar p, scalar T) const
234 return sigma_.f(p, T);
237 //- Vapour diffussivity [m2/s]
238 scalar D(scalar p, scalar T) const
244 //- Write the function coefficients
245 void writeData(Ostream& os) const
247 liquid::writeData(os); os << nl;
248 rho_.writeData(os); os << nl;
249 pv_.writeData(os); os << nl;
250 hl_.writeData(os); os << nl;
251 cp_.writeData(os); os << nl;
252 cpg_.writeData(os); os << nl;
253 B_.writeData(os); os << nl;
254 mu_.writeData(os); os << nl;
255 mug_.writeData(os); os << nl;
256 K_.writeData(os); os << nl;
257 Kg_.writeData(os); os << nl;
258 sigma_.writeData(os); os << nl;
259 D_.writeData(os); os << endl;
265 friend Ostream& operator<<(Ostream& os, const C8H10& l)
273 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
275 } // End namespace Foam
277 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
281 // ************************************************************************* //