constantFilmThermo.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) 2013-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::regionModels::surfaceFilmModels::constantFilmThermo
26 
27 Description
28  Constant thermo model
29 
30 SourceFiles
31  constantFilmThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef constantFilmThermo_H
36 #define constantFilmThermo_H
37 
38 #include "filmThermoModel.H"
39 #include "dimensionSet.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace regionModels
46 {
47 namespace surfaceFilmModels
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class constantFilmThermo Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public filmThermoModel
57 {
58 public:
59 
60  struct thermoData
61  {
63  scalar value_;
64  bool set_;
65 
66  thermoData()
67  :
68  name_("unknown"),
69  value_(0.0),
70  set_(false)
71  {}
72 
73  thermoData(const word& n)
74  :
75  name_(n),
76  value_(0.0),
77  set_(false)
78  {}
79  };
80 
81 
82 private:
83 
84  // Private Data
85 
86  //- Specie name
87  word name_;
88 
89  //- Density [kg/m^3]
90  mutable thermoData rho0_;
91 
92  //- Dynamic viscosity [Pa.s]
93  mutable thermoData mu0_;
94 
95  //- Surface tension [kg/s^2]
96  mutable thermoData sigma0_;
97 
98  //- Specific heat capacity [J/kg/K]
99  mutable thermoData Cp0_;
100 
101  //- Thermal conductivity [W/m/K]
102  mutable thermoData kappa0_;
103 
104  //- Diffusivity [m2/s]
105  mutable thermoData D0_;
106 
107  //- Latent heat [J/kg]
108  mutable thermoData hl0_;
109 
110  //- Vapour pressure [Pa]
111  mutable thermoData pv0_;
112 
113  //- Molecular weight [kg/kmol]
114  mutable thermoData W0_;
115 
116  //- Boiling temperature [K]
117  mutable thermoData Tb0_;
118 
119 
120  // Private Member Functions
121 
122  //- Initialise thermoData object
123  void init(thermoData& td);
124 
125 
126 public:
127 
128  //- Runtime type information
129  TypeName("constant");
130 
131 
132  // Constructors
133 
134  //- Construct from surface film model and dictionary
136  (
138  const dictionary& dict
139  );
140 
141  //- Disallow default bitwise copy construction
142  constantFilmThermo(const constantFilmThermo&) = delete;
143 
144 
145  //- Destructor
146  virtual ~constantFilmThermo();
147 
148 
149  // Member Functions
150 
151  //- Return the specie name
152  virtual const word& name() const;
153 
154 
155  // Elemental access
156 
157  //- Return density [kg/m^3]
158  virtual scalar rho(const scalar p, const scalar T) const;
159 
160  //- Return dynamic viscosity [Pa.s]
161  virtual scalar mu(const scalar p, const scalar T) const;
162 
163  //- Return surface tension [kg/s^2]
164  virtual scalar sigma(const scalar p, const scalar T) const;
165 
166  //- Return specific heat capacity [J/kg/K]
167  virtual scalar Cp(const scalar p, const scalar T) const;
168 
169  //- Return thermal conductivity [W/m/K]
170  virtual scalar kappa(const scalar p, const scalar T) const;
171 
172  //- Return diffusivity [m2/s]
173  virtual scalar D(const scalar p, const scalar T) const;
174 
175  //- Return latent heat [J/kg]
176  virtual scalar hl(const scalar p, const scalar T) const;
177 
178  //- Return vapour pressure [Pa]
179  virtual scalar pv(const scalar p, const scalar T) const;
180 
181  //- Return molecular weight [kg/kmol]
182  virtual scalar W() const;
183 
184  //- Return boiling temperature [K]
185  virtual scalar Tb(const scalar p) const;
186 
187 
188  // Field access
189 
190  //- Return density [kg/m^3]
191  virtual tmp<volScalarField> rho() const;
192 
193  //- Return dynamic viscosity [Pa.s]
194  virtual tmp<volScalarField> mu() const;
195 
196  //- Return surface tension [kg/s^2]
197  virtual tmp<volScalarField> sigma() const;
198 
199  //- Return specific heat capacity [J/kg/K]
200  virtual tmp<volScalarField> Cp() const;
201 
202  //- Return thermal conductivity [W/m/K]
203  virtual tmp<volScalarField> kappa() const;
204 
205 
206  // Member Operators
207 
208  //- Disallow default bitwise assignment
209  void operator=(const constantFilmThermo&) = delete;
210 };
211 
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 } // End namespace surfaceFilmModels
216 } // End namespace regionModels
217 } // End namespace Foam
218 
219 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220 
221 #endif
222 
223 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
void operator=(const constantFilmThermo &)=delete
Disallow default bitwise assignment.
virtual const word & name() const
Return the specie name.
virtual scalar Tb(const scalar p) const
Return boiling temperature [K].
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
virtual scalar D(const scalar p, const scalar T) const
Return diffusivity [m2/s].
virtual tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
A class for handling words, derived from string.
Definition: word.H:59
virtual scalar W() const
Return molecular weight [kg/kmol].
constantFilmThermo(surfaceFilmRegionModel &film, const dictionary &dict)
Construct from surface film model and dictionary.
virtual tmp< volScalarField > sigma() const
Return surface tension [kg/s^2].
TypeName("constant")
Runtime type information.
virtual tmp< volScalarField > mu() const
Return dynamic viscosity [Pa.s].
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual tmp< volScalarField > rho() const
Return density [kg/m^3].
virtual scalar hl(const scalar p, const scalar T) const
Return latent heat [J/kg].
virtual tmp< volScalarField > kappa() const
Return thermal conductivity [W/m/K].
label n
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
virtual scalar pv(const scalar p, const scalar T) const
Return vapour pressure [Pa].