Loading...
Searching...
No Matches
liquid.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2020 OpenFOAM Foundation
9 Copyright (C) 2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::liquid
29
30Description
31 Generic thermophysical properties class for a liquid in which the
32 functions and coefficients for each property are run-time selected.
33
34SourceFiles
35 liquid.C
36 liquidI.H
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef Foam_liquid_H
41#define Foam_liquid_H
42
43#include "liquidProperties.H"
44#include "Function1.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
51/*---------------------------------------------------------------------------*\
52 Class liquid Declaration
53\*---------------------------------------------------------------------------*/
54
55class liquid
56:
57 public liquidProperties
58{
59 // Private Data
60
74
75
76public:
77
78 friend class liquidProperties;
79
80 //- Runtime type information
81 TypeName("liquid");
82
83
84 // Constructors
85
86 //- Construct from dictionary
87 explicit liquid(const dictionary& dict);
88
89 //- Copy construct
90 liquid(const liquid& rhs);
91
92
93 //- Return a clone
94 virtual autoPtr<liquidProperties> clone() const
95 {
96 return liquidProperties::Clone(*this);
97 }
98
99
100 // Member Functions
101
102 //- Liquid density [kg/m^3]
103 inline scalar rho(scalar p, scalar T) const;
104
105 //- Vapour pressure [Pa]
106 inline scalar pv(scalar p, scalar T) const;
107
108 //- Heat of vapourisation [J/kg]
109 inline scalar hl(scalar p, scalar T) const;
110
111 //- Liquid heat capacity [J/(kg K)]
112 inline scalar Cp(scalar p, scalar T) const;
113
114 //- Liquid Enthalpy [J/(kg)]
115 inline scalar h(scalar p, scalar T) const;
116
117 //- Ideal gas heat capacity [J/(kg K)]
118 inline scalar Cpg(scalar p, scalar T) const;
119
120 //- Second Virial Coefficient [m^3/kg]
121 inline scalar B(scalar p, scalar T) const;
122
123 //- Liquid viscosity [Pa s]
124 inline scalar mu(scalar p, scalar T) const;
125
126 //- Vapour viscosity [Pa s]
127 inline scalar mug(scalar p, scalar T) const;
128
129 //- Liquid thermal conductivity [W/(m K)]
130 inline scalar kappa(scalar p, scalar T) const;
131
132 //- Vapour thermal conductivity [W/(m K)]
133 inline scalar kappag(scalar p, scalar T) const;
134
135 //- Surface tension [N/m]
136 inline scalar sigma(scalar p, scalar T) const;
137
138 //- Vapour diffusivity [m2/s]
139 inline scalar D(scalar p, scalar T) const;
140
141 //- Vapour diffusivity [m2/s] with specified binary pair
142 inline scalar D(scalar p, scalar T, scalar Wb) const;
143
144
145 // I-O
146
147 //- Write the function coefficients
148 void writeData(Ostream& os) const;
149};
150
151
152// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154} // End namespace Foam
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158#include "liquidI.H"
159
160// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162#endif
163
164// ************************************************************************* //
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
static autoPtr< liquidProperties > Clone(const Derived &prop)
Clone liquidProperties.
TypeName("liquid")
Runtime type information.
scalar Cpg(scalar p, scalar T) const
Ideal gas heat capacity [J/(kg K)].
Definition liquidI.H:51
void writeData(Ostream &os) const
Write the function coefficients.
Definition liquid.C:109
virtual autoPtr< liquidProperties > clone() const
Return a clone.
Definition liquid.H:97
friend class liquidProperties
Definition liquid.H:73
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition liquidI.H:87
scalar kappa(scalar p, scalar T) const
Liquid thermal conductivity [W/(m K)].
Definition liquidI.H:75
scalar mug(scalar p, scalar T) const
Vapour viscosity [Pa s].
Definition liquidI.H:69
scalar pv(scalar p, scalar T) const
Vapour pressure [Pa].
Definition liquidI.H:27
liquid(const dictionary &dict)
Construct from dictionary.
Definition liquid.C:68
scalar hl(scalar p, scalar T) const
Heat of vapourisation [J/kg].
Definition liquidI.H:33
scalar kappag(scalar p, scalar T) const
Vapour thermal conductivity [W/(m K)].
Definition liquidI.H:81
volScalarField & p
const volScalarField & Cp
Definition EEqn.H:7
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict
volScalarField & h
const dimensionedScalar & D
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68