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-2018 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/m3]
90  mutable thermoData rho0_;
91 
92  //- Dynamic viscosity [Pa.s]
93  mutable thermoData mu0_;
94 
95  //- Surface tension [kg/s2]
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  //- Disallow default bitwise copy construct
127 
128  //- Disallow default bitwise assignment
129  void operator=(const constantFilmThermo&);
130 
131 
132 public:
133 
134  //- Runtime type information
135  TypeName("constant");
136 
137 
138  // Constructors
139 
140  //- Construct from surface film model and dictionary
142  (
144  const dictionary& dict
145  );
146 
147 
148  //- Destructor
149  virtual ~constantFilmThermo();
150 
151 
152  // Member Functions
153 
154  //- Return the specie name
155  virtual const word& name() const;
156 
157 
158  // Elemental access
159 
160  //- Return density [kg/m3]
161  virtual scalar rho(const scalar p, const scalar T) const;
162 
163  //- Return dynamic viscosity [Pa.s]
164  virtual scalar mu(const scalar p, const scalar T) const;
165 
166  //- Return surface tension [kg/s2]
167  virtual scalar sigma(const scalar p, const scalar T) const;
168 
169  //- Return specific heat capacity [J/kg/K]
170  virtual scalar Cp(const scalar p, const scalar T) const;
171 
172  //- Return thermal conductivity [W/m/K]
173  virtual scalar kappa(const scalar p, const scalar T) const;
174 
175  //- Return diffusivity [m2/s]
176  virtual scalar D(const scalar p, const scalar T) const;
177 
178  //- Return latent heat [J/kg]
179  virtual scalar hl(const scalar p, const scalar T) const;
180 
181  //- Return vapour pressure [Pa]
182  virtual scalar pv(const scalar p, const scalar T) const;
183 
184  //- Return molecular weight [kg/kmol]
185  virtual scalar W() const;
186 
187  //- Return boiling temperature [K]
188  virtual scalar Tb(const scalar p) const;
189 
190 
191  // Field access
192 
193  //- Return density [kg/m3]
194  virtual tmp<volScalarField> rho() const;
195 
196  //- Return dynamic viscosity [Pa.s]
197  virtual tmp<volScalarField> mu() const;
198 
199  //- Return surface tension [kg/s2]
200  virtual tmp<volScalarField> sigma() const;
201 
202  //- Return specific heat capacity [J/kg/K]
203  virtual tmp<volScalarField> Cp() const;
204 
205  //- Return thermal conductivity [W/m/K]
206  virtual tmp<volScalarField> kappa() const;
207 };
208 
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 
212 } // End namespace surfaceFilmModels
213 } // End namespace regionModels
214 } // End namespace Foam
215 
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 
218 #endif
219 
220 // ************************************************************************* //
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.
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].
virtual tmp< volScalarField > sigma() const
Return surface tension [kg/s2].
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/m3].
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].