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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::regionModels::surfaceFilmModels::liquidFilmThermo
28 
29 Description
30  Liquid thermo model
31 
32 SourceFiles
33  liquidFilmThermo.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef liquidFilmThermo_H
38 #define liquidFilmThermo_H
39 
40 #include "filmThermoModel.H"
41 #include "liquidProperties.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace regionModels
48 {
49 namespace surfaceFilmModels
50 {
51 
52 // Forward class declarations
53 class thermoSingleLayer;
54 
55 /*---------------------------------------------------------------------------*\
56  Class liquidFilmThermo Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class liquidFilmThermo
60 :
61  public filmThermoModel
62 {
63 protected:
64 
65  // Protected data
66 
67  //- Liquid name
68  word name_;
69 
70  //- Pointer to the liquid properties
72 
73  //- Flag to indicate that model owns the liquid object
74  bool ownLiquid_;
75 
76  //- Flag to indicate that reference values of p and T should be used
78 
79  //- Reference pressure [pa]
80  scalar pRef_;
81 
82  //- Reference temperature [K]
83  scalar TRef_;
84 
85 
86  // Protected member functions
87 
88  //- Return a reference to a thermo film
89  const thermoSingleLayer& thermoFilm() const;
90 
91  //- Initialise the liquid pointer
92  void initLiquid(const dictionary& dict);
93 
94  //- No copy construct
95  liquidFilmThermo(const liquidFilmThermo&) = delete;
96 
97  //- No copy assignment
98  void operator=(const liquidFilmThermo&) = delete;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("liquid");
105 
106 
107  // Constructors
108 
109  //- Construct from surface film model and dictionary
111  (
113  const dictionary& dict
114  );
115 
116 
117  //- Destructor
118  virtual ~liquidFilmThermo();
119 
120 
121  // Member Functions
122 
123  //- Return the specie name
124  virtual const word& name() const;
125 
126 
127  // Elemental access
128 
129  //- Return density [kg/m3]
130  virtual scalar rho(const scalar p, const scalar T) const;
131 
132  //- Return dynamic viscosity [Pa.s]
133  virtual scalar mu(const scalar p, const scalar T) const;
134 
135  //- Return surface tension [kg/s2]
136  virtual scalar sigma(const scalar p, const scalar T) const;
137 
138  //- Return specific heat capacity [J/kg/K]
139  virtual scalar Cp(const scalar p, const scalar T) const;
140 
141  //- Return thermal conductivity [W/m/K]
142  virtual scalar kappa(const scalar p, const scalar T) const;
143 
144  //- Return diffusivity [m2/s]
145  virtual scalar D(const scalar p, const scalar T) const;
146 
147  //- Return latent heat [J/kg]
148  virtual scalar hl(const scalar p, const scalar T) const;
149 
150  //- Return vapour pressure [Pa]
151  virtual scalar pv(const scalar p, const scalar T) const;
152 
153  //- Return molecular weight [kg/kmol]
154  virtual scalar W() const;
155 
156  //- Return boiling temperature [K]
157  virtual scalar Tb(const scalar p) const;
158 
159 
160  // Field access
161 
162  //- Return density [kg/m3]
163  virtual tmp<volScalarField> rho() const;
164 
165  //- Return dynamic viscosity [Pa.s]
166  virtual tmp<volScalarField> mu() const;
167 
168  //- Return surface tension [kg/s2]
169  virtual tmp<volScalarField> sigma() const;
170 
171  //- Return specific heat capacity [J/kg/K]
172  virtual tmp<volScalarField> Cp() const;
173 
174  //- Return thermal conductivity [W/m/K]
175  virtual tmp<volScalarField> kappa() const;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace surfaceFilmModels
182 } // End namespace regionModels
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
p
volScalarField & p
Definition: createFieldRefs.H:8
filmThermoModel.H
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::TypeName
TypeName("liquid")
Runtime type information.
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::thermoFilm
const thermoSingleLayer & thermoFilm() const
Return a reference to a thermo film.
Definition: liquidFilmThermo.C:58
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::pRef_
scalar pRef_
Reference pressure [pa].
Definition: liquidFilmThermo.H:79
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::name
virtual const word & name() const
Return the specie name.
Definition: liquidFilmThermo.C:147
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::kappa
virtual tmp< volScalarField > kappa() const
Return thermal conductivity [W/m/K].
Definition: liquidFilmThermo.C:425
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::operator=
void operator=(const liquidFilmThermo &)=delete
No copy assignment.
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::D
virtual scalar D(const scalar p, const scalar T) const
Return diffusivity [m2/s].
Definition: liquidFilmThermo.C:204
Foam::regionModels::surfaceFilmModels::filmSubModelBase::film
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
Definition: filmSubModelBaseI.H:39
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::sigma
virtual tmp< volScalarField > sigma() const
Return surface tension [kg/s2].
Definition: liquidFilmThermo.C:335
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::rho
virtual tmp< volScalarField > rho() const
Return density [kg/m3].
Definition: liquidFilmThermo.C:245
Foam::regionModels::surfaceFilmModels::liquidFilmThermo
Liquid thermo model.
Definition: liquidFilmThermo.H:58
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::ownLiquid_
bool ownLiquid_
Flag to indicate that model owns the liquid object.
Definition: liquidFilmThermo.H:73
Foam::liquidProperties
The thermophysical properties of a liquid.
Definition: liquidProperties.H:51
Foam::regionModels::surfaceFilmModels::thermoSingleLayer
Thermodynamic form of single-cell layer surface film model.
Definition: thermoSingleLayer.H:67
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::initLiquid
void initLiquid(const dictionary &dict)
Initialise the liquid pointer.
Definition: liquidFilmThermo.C:74
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::Cp
virtual tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
Definition: liquidFilmThermo.C:380
Foam::regionModels::surfaceFilmModels::surfaceFilmRegionModel
Base class for surface film models.
Definition: surfaceFilmRegionModel.H:55
Foam::subModelBase::dict
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::mu
virtual tmp< volScalarField > mu() const
Return dynamic viscosity [Pa.s].
Definition: liquidFilmThermo.C:290
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::liquidPtr_
const liquidProperties * liquidPtr_
Pointer to the liquid properties.
Definition: liquidFilmThermo.H:70
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::hl
virtual scalar hl(const scalar p, const scalar T) const
Return latent heat [J/kg].
Definition: liquidFilmThermo.C:214
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
liquidProperties.H
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::Tb
virtual scalar Tb(const scalar p) const
Return boiling temperature [K].
Definition: liquidFilmThermo.C:239
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::useReferenceValues_
bool useReferenceValues_
Flag to indicate that reference values of p and T should be used.
Definition: liquidFilmThermo.H:76
Foam::regionModels::surfaceFilmModels::filmThermoModel
Base class for film thermo models.
Definition: filmThermoModel.H:56
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::TRef_
scalar TRef_
Reference temperature [K].
Definition: liquidFilmThermo.H:82
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::W
virtual scalar W() const
Return molecular weight [kg/kmol].
Definition: liquidFilmThermo.C:233
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::name_
word name_
Liquid name.
Definition: liquidFilmThermo.H:67
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::~liquidFilmThermo
virtual ~liquidFilmThermo()
Destructor.
Definition: liquidFilmThermo.C:136
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::pv
virtual scalar pv(const scalar p, const scalar T) const
Return vapour pressure [Pa].
Definition: liquidFilmThermo.C:224
Foam::regionModels::surfaceFilmModels::liquidFilmThermo::liquidFilmThermo
liquidFilmThermo(const liquidFilmThermo &)=delete
No copy construct.