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
34 \*---------------------------------------------------------------------------*/
39 #include <liquids/liquid.H>
40 #include <thermophysicalFunctions/NSRDSfunc0.H>
41 #include <thermophysicalFunctions/NSRDSfunc1.H>
42 #include <thermophysicalFunctions/NSRDSfunc2.H>
43 #include <thermophysicalFunctions/NSRDSfunc3.H>
44 #include <thermophysicalFunctions/NSRDSfunc4.H>
45 #include <thermophysicalFunctions/NSRDSfunc5.H>
46 #include <thermophysicalFunctions/NSRDSfunc6.H>
47 #include <thermophysicalFunctions/NSRDSfunc7.H>
48 #include <thermophysicalFunctions/NSRDSfunc14.H>
49 #include <thermophysicalFunctions/APIdiffCoefFunc.H>
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 /*---------------------------------------------------------------------------*\
57 Class C2H6 Declaration
58 \*---------------------------------------------------------------------------*/
83 //- Runtime type information
92 //- Construct from components
96 const NSRDSfunc5& density,
97 const NSRDSfunc1& vapourPressure,
98 const NSRDSfunc6& heatOfVapourisation,
99 const NSRDSfunc14& heatCapacity,
100 const NSRDSfunc0& enthalpy,
101 const NSRDSfunc7& idealGasHeatCapacity,
102 const NSRDSfunc4& secondVirialCoeff,
103 const NSRDSfunc1& dynamicViscosity,
104 const NSRDSfunc2& vapourDynamicViscosity,
105 const NSRDSfunc0& thermalConductivity,
106 const NSRDSfunc2& vapourThermalConductivity,
107 const NSRDSfunc6& surfaceTension,
108 const APIdiffCoefFunc& vapourDiffussivity
111 //- Construct from Istream
117 //- Liquid density [kg/m^3]
118 inline scalar rho(scalar p, scalar T) const;
120 //- Vapour pressure [Pa]
121 inline scalar pv(scalar p, scalar T) const;
123 //- Heat of vapourisation [J/kg]
124 inline scalar hl(scalar p, scalar T) const;
126 //- Liquid heat capacity [J/(kg K)]
127 inline scalar cp(scalar p, scalar T) const;
129 //- Liquid Enthalpy [J/(kg)]
130 inline scalar h(scalar p, scalar T) const;
132 //- Ideal gas heat capacity [J/(kg K)]
133 inline scalar cpg(scalar p, scalar T) const;
135 //- Second Virial Coefficient [m^3/kg]
136 inline scalar B(scalar p, scalar T) const;
138 //- Liquid viscosity [Pa s]
139 inline scalar mu(scalar p, scalar T) const;
141 //- Vapour viscosity [Pa s]
142 inline scalar mug(scalar p, scalar T) const;
144 //- Liquid thermal conductivity [W/(m K)]
145 inline scalar K(scalar p, scalar T) const;
147 //- Vapour thermal conductivity [W/(m K)]
148 inline scalar Kg(scalar p, scalar T) const;
150 //- Surface tension [N/m]
151 inline scalar sigma(scalar p, scalar T) const;
153 //- Vapour diffussivity [m2/s]
154 inline scalar D(scalar p, scalar T) const;
159 //- Write the function coefficients
160 void writeData(Ostream& os) const
162 liquid::writeData(os); os << nl;
163 rho_.writeData(os); os << nl;
164 pv_.writeData(os); os << nl;
165 hl_.writeData(os); os << nl;
166 cp_.writeData(os); os << nl;
167 cpg_.writeData(os); os << nl;
168 B_.writeData(os); os << nl;
169 mu_.writeData(os); os << nl;
170 mug_.writeData(os); os << nl;
171 K_.writeData(os); os << nl;
172 Kg_.writeData(os); os << nl;
173 sigma_.writeData(os); os << nl;
174 D_.writeData(os); os << endl;
178 friend Ostream& operator<<(Ostream& os, const C2H6& l)
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 } // End namespace Foam
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 // ************************ vim: set sw=4 sts=4 et: ************************ //