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 "NSRDSfunc14.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 /*---------------------------------------------------------------------------*\
55 Class nC3H8O Declaration
56 \*---------------------------------------------------------------------------*/
60 public liquidProperties
80 //- Runtime type information
89 //- Construct from components
92 const liquidProperties& l,
93 const NSRDSfunc5& density,
94 const NSRDSfunc1& vapourPressure,
95 const NSRDSfunc6& heatOfVapourisation,
96 const NSRDSfunc0& heatCapacity,
97 const NSRDSfunc0& enthalpy,
98 const NSRDSfunc7& idealGasHeatCapacity,
99 const NSRDSfunc4& secondVirialCoeff,
100 const NSRDSfunc1& dynamicViscosity,
101 const NSRDSfunc2& vapourDynamicViscosity,
102 const NSRDSfunc0& thermalConductivity,
103 const NSRDSfunc2& vapourThermalConductivity,
104 const NSRDSfunc0& surfaceTension,
105 const NSRDSfunc1& vapourDiffussivity
108 //- Construct from Istream
111 //- Construct from dictionary
112 nC3H8O(const dictionary& dict);
115 nC3H8O(const nC3H8O& liq);
117 //- Construct and return clone
118 virtual autoPtr<liquidProperties> clone() const
120 return autoPtr<liquidProperties>(new nC3H8O(*this));
126 //- Liquid density [kg/m^3]
127 inline scalar rho(scalar p, scalar T) const;
129 //- Vapour pressure [Pa]
130 inline scalar pv(scalar p, scalar T) const;
132 //- Heat of vapourisation [J/kg]
133 inline scalar hl(scalar p, scalar T) const;
135 //- Liquid heat capacity [J/(kg K)]
136 inline scalar Cp(scalar p, scalar T) const;
138 //- Liquid Enthalpy [J/(kg)]
139 inline scalar h(scalar p, scalar T) const;
141 //- Ideal gas heat capacity [J/(kg K)]
142 inline scalar Cpg(scalar p, scalar T) const;
144 //- Second Virial Coefficient [m^3/kg]
145 inline scalar B(scalar p, scalar T) const;
147 //- Liquid viscosity [Pa s]
148 inline scalar mu(scalar p, scalar T) const;
150 //- Vapour viscosity [Pa s]
151 inline scalar mug(scalar p, scalar T) const;
153 //- Liquid thermal conductivity [W/(m K)]
154 inline scalar K(scalar p, scalar T) const;
156 //- Vapour thermal conductivity [W/(m K)]
157 inline scalar Kg(scalar p, scalar T) const;
159 //- Surface tension [N/m]
160 inline scalar sigma(scalar p, scalar T) const;
162 //- Vapour diffussivity [m2/s]
163 inline scalar D(scalar p, scalar T) const;
165 //- Vapour diffussivity [m2/s] with specified binary pair
166 // Note: behaves the same as D(p, T)
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;
191 friend Ostream& operator<<(Ostream& os, const nC3H8O& l)
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 } // End namespace Foam
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 // ************************************************************************* //