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