surfaceFilmModel.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) 2011-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::regionModels::surfaceFilmModels::surfaceFilmModel
26 
27 Description
28  Base class for surface film models
29 
30 SourceFiles
31  surfaceFilmModelI.H
32  surfaceFilmModel.C
33  surfaceFilmModelNew.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef surfaceFilmModel_H
38 #define surfaceFilmModel_H
39 
40 #include "singleLayerRegion.H"
41 
42 #include "dimensionedVector.H"
43 #include "runTimeSelectionTables.H"
44 #include "volFieldsFwd.H"
45 #include "DimensionedField.H"
46 #include "labelList.H"
47 #include "NamedEnum.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace regionModels
54 {
55 namespace surfaceFilmModels
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class surfaceFilmModel Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class surfaceFilmModel
63 :
64  public singleLayerRegion
65 {
66 
67 private:
68 
69  // Private Member Functions
70 
71  //- Disallow default bitwise copy construct
73 
74  //- Disallow default bitwise assignment
75  void operator=(const surfaceFilmModel&);
76 
77 
78 protected:
79 
80  // Protected data
81 
82  //- Acceleration due to gravity [m/s2]
83  const dimensionedVector& g_;
84 
85 
86  // Protected member functions
87 
88  //- Read control parameters from dictionary
89  virtual bool read();
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("surfaceFilmModel");
96 
97 
98  // Declare runtime constructor selection table
99 
101  (
102  autoPtr,
104  mesh,
105  (
106  const word& modelType,
107  const fvMesh& mesh,
108  const dimensionedVector& g,
109  const word& regionType
110  ),
111  (modelType, mesh, g, regionType)
112  );
113 
114  // Constructors
115 
116  //- Construct from type name, mesh and gravity vector
118  (
119  const word& modelType,
120  const fvMesh& mesh,
121  const dimensionedVector& g,
122  const word& regionType
123  );
124 
125 
126  // Selectors
127 
128  //- Return a reference to the selected surface film model
130  (
131  const fvMesh& mesh,
132  const dimensionedVector& g,
133  const word& regionType = "surfaceFilm"
134  );
135 
136 
137  //- Destructor
138  virtual ~surfaceFilmModel();
139 
140 
141  // Member Functions
142 
143  // Access
144 
145  //- Return the accleration due to gravity
146  inline const dimensionedVector& g() const;
147 
148  //- External hook to add sources to the film
149  virtual void addSources
150  (
151  const label patchI,
152  const label faceI,
153  const scalar massSource,
154  const vector& momentumSource,
155  const scalar pressureSource,
156  const scalar energySource
157  ) = 0;
158 
159 
160  // Solution parameters
161 
162  //- Courant number evaluation
163  virtual scalar CourantNumber() const;
164 
165 
166  // Fields
167 
168  //- Return the film thickness [m]
169  virtual const volScalarField& delta() const = 0;
170 
171  //- Return the film coverage, 1 = covered, 0 = uncovered / []
172  virtual const volScalarField& alpha() const = 0;
173 
174  //- Return the film velocity [m/s]
175  virtual const volVectorField& U() const = 0;
176 
177  //- Return the film surface velocity [m/s]
178  virtual const volVectorField& Us() const = 0;
179 
180  //- Return the film wall velocity [m/s]
181  virtual const volVectorField& Uw() const = 0;
182 
183  //- Return the film density [kg/m3]
184  virtual const volScalarField& rho() const = 0;
185 
186  //- Return the film mean temperature [K]
187  virtual const volScalarField& T() const = 0;
188 
189  //- Return the film surface temperature [K]
190  virtual const volScalarField& Ts() const = 0;
191 
192  //- Return the film wall temperature [K]
193  virtual const volScalarField& Tw() const = 0;
194 
195  //- Return the film specific heat capacity [J/kg/K]
196  virtual const volScalarField& Cp() const = 0;
197 
198  //- Return the film thermal conductivity [W/m/K]
199  virtual const volScalarField& kappa() const = 0;
200 
201  //- Return the film surface tension [N/m]
202  virtual const volScalarField& sigma() const = 0;
203 
204 
205  // Transfer fields - to the primary region
206 
207  //- Return mass transfer source - Eulerian phase only
208  virtual tmp<volScalarField> primaryMassTrans() const = 0;
209 
210  //- Return the film mass available for transfer
211  virtual const volScalarField& cloudMassTrans() const = 0;
212 
213  //- Return the parcel diameters originating from film
214  virtual const volScalarField& cloudDiameterTrans() const = 0;
215 
216 
217  // Source fields
218 
219  // Mapped into primary region
220 
221  //- Return total mass source - Eulerian phase only
223 
224  //- Return mass source for specie i - Eulerian phase only
226  (
227  const label i
228  ) const;
229 
230  //- Return enthalpy source - Eulerian phase only
231  virtual tmp<DimensionedField<scalar, volMesh> > Sh() const;
232 };
233 
234 
235 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236 
237 } // End namespace surfaceFilmModels
238 } // End namespace regionModels
239 } // End namespace Foam
240 
241 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
242 
243 #include "surfaceFilmModelI.H"
244 
245 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
246 
247 #endif
248 
249 // ************************************************************************* //
virtual const volScalarField & rho() const =0
Return the film density [kg/m3].
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
static autoPtr< surfaceFilmModel > New(const fvMesh &mesh, const dimensionedVector &g, const word &regionType="surfaceFilm")
Return a reference to the selected surface film model.
virtual const volScalarField & cloudMassTrans() const =0
Return the film mass available for transfer.
const dimensionedVector & g() const
Return the accleration due to gravity.
Macros to ease declaration of run-time selection tables.
A class for handling words, derived from string.
Definition: word.H:59
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
virtual const volVectorField & U() const =0
Return the film velocity [m/s].
dynamicFvMesh & mesh
virtual const volScalarField & Ts() const =0
Return the film surface temperature [K].
declareRunTimeSelectionTable(autoPtr, surfaceFilmModel, mesh,( const word &modelType, const fvMesh &mesh, const dimensionedVector &g, const word &regionType ),(modelType, mesh, g, regionType))
virtual const volVectorField & Uw() const =0
Return the film wall velocity [m/s].
virtual bool read()
Read control parameters from dictionary.
Namespace for OpenFOAM.
virtual const volScalarField & Tw() const =0
Return the film wall temperature [K].
virtual scalar CourantNumber() const
Courant number evaluation.
virtual const volScalarField & alpha() const =0
Return the film coverage, 1 = covered, 0 = uncovered / [].
virtual tmp< volScalarField > primaryMassTrans() const =0
Return mass transfer source - Eulerian phase only.
virtual const volScalarField & sigma() const =0
Return the film surface tension [N/m].
virtual const volScalarField & T() const =0
Return the film mean temperature [K].
virtual void addSources(const label patchI, const label faceI, const scalar massSource, const vector &momentumSource, const scalar pressureSource, const scalar energySource)=0
External hook to add sources to the film.
virtual const volScalarField & cloudDiameterTrans() const =0
Return the parcel diameters originating from film.
virtual const volScalarField & delta() const =0
Return the film thickness [m].
virtual const volScalarField & kappa() const =0
Return the film thermal conductivity [W/m/K].
virtual const volVectorField & Us() const =0
Return the film surface velocity [m/s].
TypeName("surfaceFilmModel")
Runtime type information.
virtual tmp< DimensionedField< scalar, volMesh > > Sh() const
Return enthalpy source - Eulerian phase only.
virtual const volScalarField & Cp() const =0
Return the film specific heat capacity [J/kg/K].
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
A class for managing temporary objects.
Definition: PtrList.H:118
const dimensionedVector & g_
Acceleration due to gravity [m/s2].