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 // ************************************************************************* //
Foam::regionModels::surfaceFilmModels::constantFilmThermo::operator=
void operator=(const constantFilmThermo &)
Disallow default bitwise assignment.
Foam::regionModels::surfaceFilmModels::constantFilmThermo::hl0_
thermoData hl0_
Latent heat [J/kg].
Definition: constantFilmThermo.H:111
Foam::regionModels::surfaceFilmModels::constantFilmThermo::thermoData::name_
word name_
Definition: constantFilmThermo.H:62
filmThermoModel.H
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::regionModels::surfaceFilmModels::constantFilmThermo::thermoData
Definition: constantFilmThermo.H:59
Foam::regionModels::surfaceFilmModels::constantFilmThermo::mu
virtual tmp< volScalarField > mu() const
Return dynamic viscosity [Pa.s].
Definition: constantFilmThermo.C:284
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::regionModels::surfaceFilmModels::constantFilmThermo::rho
virtual tmp< volScalarField > rho() const
Return density [kg/m3].
Definition: constantFilmThermo.C:257
Foam::regionModels::surfaceFilmModels::constantFilmThermo::Cp
virtual tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
Definition: constantFilmThermo.C:338
Foam::regionModels::surfaceFilmModels::filmSubModelBase::owner
const surfaceFilmModel & owner() const
Return const access to the owner surface film model.
Definition: filmSubModelBaseI.H:37
Foam::regionModels::surfaceFilmModels::constantFilmThermo::Tb0_
thermoData Tb0_
Boiling temperature [K].
Definition: constantFilmThermo.H:120
Foam::regionModels::surfaceFilmModels::constantFilmThermo::thermoData::thermoData
thermoData()
Definition: constantFilmThermo.H:67
Foam::regionModels::surfaceFilmModels::constantFilmThermo::W0_
thermoData W0_
Molecular weight [kg/kmol].
Definition: constantFilmThermo.H:117
Foam::regionModels::surfaceFilmModels::constantFilmThermo::thermoData::value_
scalar value_
Definition: constantFilmThermo.H:63
Foam::regionModels::surfaceFilmModels::constantFilmThermo::D0_
thermoData D0_
Diffusivity [m2/s].
Definition: constantFilmThermo.H:108
Foam::regionModels::surfaceFilmModels::constantFilmThermo::thermoData::thermoData
thermoData(const word &n)
Definition: constantFilmThermo.H:73
Foam::regionModels::surfaceFilmModels::constantFilmThermo::pv0_
thermoData pv0_
Vapour pressure [Pa].
Definition: constantFilmThermo.H:114
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::subModelBase::dict
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
Foam::regionModels::surfaceFilmModels::constantFilmThermo::thermoData::set_
bool set_
Definition: constantFilmThermo.H:64
Foam::regionModels::surfaceFilmModels::constantFilmThermo::pv
virtual scalar pv(const scalar p, const scalar T) const
Return vapour pressure [Pa].
Definition: constantFilmThermo.C:218
Foam::regionModels::surfaceFilmModels::constantFilmThermo::D
virtual scalar D(const scalar p, const scalar T) const
Return diffusivity [m2/s].
Definition: constantFilmThermo.C:186
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::regionModels::surfaceFilmModels::constantFilmThermo::kappa0_
thermoData kappa0_
Thermal conductivity [W/m/K].
Definition: constantFilmThermo.H:105
Foam::regionModels::surfaceFilmModels::constantFilmThermo::sigma0_
thermoData sigma0_
Surface tension [kg/s2].
Definition: constantFilmThermo.H:99
Foam::regionModels::surfaceFilmModels::constantFilmThermo::name_
word name_
Specie name.
Definition: constantFilmThermo.H:90
Foam::regionModels::surfaceFilmModels::constantFilmThermo::mu0_
thermoData mu0_
Dynamic viscosity [Pa.s].
Definition: constantFilmThermo.H:96
dimensionSet.H
Foam::regionModels::surfaceFilmModels::constantFilmThermo::W
virtual scalar W() const
Return molecular weight [kg/kmol].
Definition: constantFilmThermo.C:233
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::regionModels::surfaceFilmModels::constantFilmThermo::rho0_
thermoData rho0_
Density [kg/m3].
Definition: constantFilmThermo.H:93
Foam::regionModels::surfaceFilmModels::filmThermoModel
Definition: filmThermoModel.H:54
Foam::regionModels::surfaceFilmModels::constantFilmThermo::constantFilmThermo
constantFilmThermo(const constantFilmThermo &)
Disallow default bitwise copy construct.
Foam::regionModels::surfaceFilmModels::constantFilmThermo::sigma
virtual tmp< volScalarField > sigma() const
Return surface tension [kg/s2].
Definition: constantFilmThermo.C:311
Foam::regionModels::surfaceFilmModels::constantFilmThermo::init
void init(thermoData &td)
Initialise thermoData object.
Definition: constantFilmThermo.C:50
Foam::regionModels::surfaceFilmModels::constantFilmThermo::Cp0_
thermoData Cp0_
Specific heat capacity [J/kg/K].
Definition: constantFilmThermo.H:102
Foam::regionModels::surfaceFilmModels::constantFilmThermo::hl
virtual scalar hl(const scalar p, const scalar T) const
Return latent heat [J/kg].
Definition: constantFilmThermo.C:202
Foam::regionModels::surfaceFilmModels::constantFilmThermo::Tb
virtual scalar Tb(const scalar p) const
Return boiling temperature [K].
Definition: constantFilmThermo.C:245
Foam::regionModels::surfaceFilmModels::constantFilmThermo
Definition: constantFilmThermo.H:53
Foam::regionModels::surfaceFilmModels::constantFilmThermo::kappa
virtual tmp< volScalarField > kappa() const
Return thermal conductivity [W/m/K].
Definition: constantFilmThermo.C:365
Foam::regionModels::surfaceFilmModels::constantFilmThermo::TypeName
TypeName("constant")
Runtime type information.
Foam::regionModels::surfaceFilmModels::surfaceFilmModel
Base class for surface film models.
Definition: surfaceFilmModel.H:61
Foam::regionModels::surfaceFilmModels::constantFilmThermo::~constantFilmThermo
virtual ~constantFilmThermo()
Destructor.
Definition: constantFilmThermo.C:93
Foam::regionModels::surfaceFilmModels::constantFilmThermo::name
virtual const word & name() const
Return the specie name.
Definition: constantFilmThermo.C:99