liquidFilmThermo.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 | Copyright (C) 2013 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::liquidFilmThermo
26 
27 Description
28  Liquid thermo model
29 
30 SourceFiles
31  liquidFilmThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef liquidFilmThermo_H
36 #define liquidFilmThermo_H
37 
38 #include "filmThermoModel.H"
39 #include "liquidProperties.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace regionModels
46 {
47 namespace surfaceFilmModels
48 {
49 
50 // Forward class declarations
51 class thermoSingleLayer;
52 
53 /*---------------------------------------------------------------------------*\
54  Class liquidFilmThermo Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class liquidFilmThermo
58 :
59  public filmThermoModel
60 {
61 protected:
62 
63  // Protected data
64 
65  //- Liquid name
66  word name_;
67 
68  //- Pointer to the liquid properties
70 
71  //- Flag to indicate that model owns the liquid object
72  bool ownLiquid_;
73 
74  //- Flag to indicate that reference values of p and T should be used
76 
77  //- Reference pressure [pa]
78  scalar pRef_;
79 
80  //- Reference temperature [K]
81  scalar TRef_;
82 
83 
84  // Protected member functions
85 
86  //- Return a reference to a thermo film
87  const thermoSingleLayer& thermoFilm() const;
88 
89  //- Initialise the liquid pointer
90  void initLiquid(const dictionary& dict);
91 
92  //- Disallow default bitwise copy construct
94 
95  //- Disallow default bitwise assignment
96  void operator=(const liquidFilmThermo&);
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("liquid");
103 
104 
105  // Constructors
106 
107  //- Construct from surface film model and dictionary
109  (
111  const dictionary& dict
112  );
113 
114 
115  //- Destructor
116  virtual ~liquidFilmThermo();
117 
118 
119  // Member Functions
120 
121  //- Return the specie name
122  virtual const word& name() const;
123 
124 
125  // Elemental access
126 
127  //- Return density [kg/m3]
128  virtual scalar rho(const scalar p, const scalar T) const;
129 
130  //- Return dynamic viscosity [Pa.s]
131  virtual scalar mu(const scalar p, const scalar T) const;
132 
133  //- Return surface tension [kg/s2]
134  virtual scalar sigma(const scalar p, const scalar T) const;
135 
136  //- Return specific heat capacity [J/kg/K]
137  virtual scalar Cp(const scalar p, const scalar T) const;
138 
139  //- Return thermal conductivity [W/m/K]
140  virtual scalar kappa(const scalar p, const scalar T) const;
141 
142  //- Return diffusivity [m2/s]
143  virtual scalar D(const scalar p, const scalar T) const;
144 
145  //- Return latent heat [J/kg]
146  virtual scalar hl(const scalar p, const scalar T) const;
147 
148  //- Return vapour pressure [Pa]
149  virtual scalar pv(const scalar p, const scalar T) const;
150 
151  //- Return molecular weight [kg/kmol]
152  virtual scalar W() const;
153 
154  //- Return boiling temperature [K]
155  virtual scalar Tb(const scalar p) const;
156 
157 
158  // Field access
159 
160  //- Return density [kg/m3]
161  virtual tmp<volScalarField> rho() const;
162 
163  //- Return dynamic viscosity [Pa.s]
164  virtual tmp<volScalarField> mu() const;
165 
166  //- Return surface tension [kg/s2]
167  virtual tmp<volScalarField> sigma() const;
168 
169  //- Return specific heat capacity [J/kg/K]
170  virtual tmp<volScalarField> Cp() const;
171 
172  //- Return thermal conductivity [W/m/K]
173  virtual tmp<volScalarField> kappa() const;
174 };
175 
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 } // End namespace surfaceFilmModels
180 } // End namespace regionModels
181 } // End namespace Foam
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
virtual tmp< volScalarField > mu() const
Return dynamic viscosity [Pa.s].
virtual tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
virtual scalar W() const
Return molecular weight [kg/kmol].
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual const word & name() const
Return the specie name.
void operator=(const liquidFilmThermo &)
Disallow default bitwise assignment.
liquidFilmThermo(const liquidFilmThermo &)
Disallow default bitwise copy construct.
virtual tmp< volScalarField > sigma() const
Return surface tension [kg/s2].
const liquidProperties * liquidPtr_
Pointer to the liquid properties.
bool useReferenceValues_
Flag to indicate that reference values of p and T should be used.
virtual tmp< volScalarField > rho() const
Return density [kg/m3].
void initLiquid(const dictionary &dict)
Initialise the liquid pointer.
A class for handling words, derived from string.
Definition: word.H:59
virtual scalar hl(const scalar p, const scalar T) const
Return latent heat [J/kg].
virtual scalar D(const scalar p, const scalar T) const
Return diffusivity [m2/s].
The thermophysical properties of a liquidProperties.
virtual scalar pv(const scalar p, const scalar T) const
Return vapour pressure [Pa].
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const surfaceFilmModel & owner() const
Return const access to the owner surface film model.
TypeName("liquid")
Runtime type information.
virtual scalar Tb(const scalar p) const
Return boiling temperature [K].
const thermoSingleLayer & thermoFilm() const
Return a reference to a thermo film.
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:54
virtual tmp< volScalarField > kappa() const
Return thermal conductivity [W/m/K].
Namespace for OpenFOAM.
bool ownLiquid_
Flag to indicate that model owns the liquid object.