liquid.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::liquid
26 
27 Description
28  Generic thermophysical properties class for a liquid in which the
29  functions and coefficients for each property are run-time selected.
30 
31 SourceFiles
32  liquid.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef liquid_H
37 #define liquid_H
38 
39 #include "liquidProperties.H"
40 #include "thermophysicalFunction.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class liquid Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class liquid
52 :
53  public liquidProperties
54 {
55  // Private Data
56 
70 
71 
72 public:
73 
74  friend class liquidProperties;
75 
76  //- Runtime type information
77  TypeName("liquid");
78 
79 
80  // Constructors
81 
82  //- Construct from dictionary
83  liquid(const dictionary& dict);
84 
85  //- Construct and return clone
86  virtual autoPtr<liquidProperties> clone() const
87  {
88  return autoPtr<liquidProperties>(new liquid(*this));
89  }
90 
91 
92  // Member Functions
93 
94  //- Liquid density [kg/m^3]
95  inline scalar rho(scalar p, scalar T) const;
96 
97  //- Vapour pressure [Pa]
98  inline scalar pv(scalar p, scalar T) const;
99 
100  //- Heat of vapourisation [J/kg]
101  inline scalar hl(scalar p, scalar T) const;
102 
103  //- Liquid heat capacity [J/kg/K]
104  inline scalar Cp(scalar p, scalar T) const;
105 
106  //- Liquid enthalpy [J/kg]
107  inline scalar h(scalar p, scalar T) const;
108 
109  //- Ideal gas heat capacity [J/kg/K]
110  inline scalar Cpg(scalar p, scalar T) const;
111 
112  //- Second Virial Coefficient [m^3/kg]
113  inline scalar B(scalar p, scalar T) const;
114 
115  //- Liquid viscosity [Pa s]
116  inline scalar mu(scalar p, scalar T) const;
117 
118  //- Vapour viscosity [Pa s]
119  inline scalar mug(scalar p, scalar T) const;
120 
121  //- Liquid thermal conductivity [W/m/K]
122  inline scalar kappa(scalar p, scalar T) const;
123 
124  //- Vapour thermal conductivity [W/m/K]
125  inline scalar kappag(scalar p, scalar T) const;
126 
127  //- Surface tension [N/m]
128  inline scalar sigma(scalar p, scalar T) const;
129 
130  //- Vapour diffusivity [m^2/s]
131  inline scalar D(scalar p, scalar T) const;
132 
133  //- Vapour diffusivity [m^2/s] with specified binary pair
134  inline scalar D(scalar p, scalar T, scalar Wb) const;
135 
136 
137  // I-O
138 
139  //- Write the function coefficients
140  void write(Ostream& os) const;
141 };
142 
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #include "liquidI.H"
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
Generic thermophysical properties class for a liquid in which the functions and coefficients for each...
Definition: liquid.H:50
dictionary dict
scalar kappag(scalar p, scalar T) const
Vapour thermal conductivity [W/m/K].
Definition: liquidI.H:86
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition: liquidI.H:38
scalar mu(scalar p, scalar T) const
Liquid viscosity [Pa s].
Definition: liquidI.H:68
liquid(const dictionary &dict)
Construct from dictionary.
Definition: liquid.C:39
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/kg/K].
Definition: liquidI.H:56
scalar B(scalar p, scalar T) const
Second Virial Coefficient [m^3/kg].
Definition: liquidI.H:62
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: liquidI.H:26
The thermophysical properties of a liquid.
scalar Cp(scalar p, scalar T) const
Liquid heat capacity [J/kg/K].
Definition: liquidI.H:44
scalar D(scalar p, scalar T) const
Vapour diffusivity [m^2/s].
Definition: liquidI.H:98
scalar kappa(scalar p, scalar T) const
Liquid thermal conductivity [W/m/K].
Definition: liquidI.H:80
virtual autoPtr< liquidProperties > clone() const
Construct and return clone.
Definition: liquid.H:85
scalar h(scalar p, scalar T) const
Liquid enthalpy [J/kg].
Definition: liquidI.H:50
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void write(Ostream &os) const
Write the function coefficients.
Definition: liquid.C:60
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition: liquidI.H:74
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition: liquidI.H:32
volScalarField & p
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: liquidI.H:92
Namespace for OpenFOAM.
TypeName("liquid")
Runtime type information.