noFilm.C
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-2017 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 \*---------------------------------------------------------------------------*/
25 
26 #include "noFilm.H"
28 #include "volFields.H"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace regionModels
35 {
36 namespace surfaceFilmModels
37 {
38 
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 
41 defineTypeNameAndDebug(noFilm, 0);
42 addToRunTimeSelectionTable(surfaceFilmModel, noFilm, mesh);
43 
44 
45 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
46 
48 {
50  {
51  // no additional info to read
52  return true;
53  }
54  else
55  {
56  return false;
57  }
58 }
59 
60 
61 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
62 
63 noFilm::noFilm
64 (
65  const word& modelType,
66  const fvMesh& mesh,
67  const dimensionedVector& g,
68  const word& regionType
69 )
70 :
71  surfaceFilmModel(modelType, mesh, g, regionType)
72 {}
73 
74 
75 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
76 
78 {}
79 
80 
81 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
82 
84 (
85  const label,
86  const label,
87  const scalar,
88  const vector&,
89  const scalar,
90  const scalar
91 )
92 {}
93 
94 
96 {
98  << "delta field not available for " << type() << abort(FatalError);
99 
100  return volScalarField::null();
101 }
102 
103 
105 {
107  << "alpha field not available for " << type() << abort(FatalError);
108 
109  return volScalarField::null();
110 }
111 
112 
113 const volVectorField& noFilm::U() const
114 {
116  << "U field not available for " << type() << abort(FatalError);
117 
118  return volVectorField::null();
119 }
120 
121 
123 {
125  << "Us field not available for " << type() << abort(FatalError);
126 
127  return volVectorField::null();
128 }
129 
130 
132 {
134  << "Uw field not available for " << type() << abort(FatalError);
135 
136  return volVectorField::null();
137 }
138 
139 
141 {
143  << "rho field not available for " << type() << abort(FatalError);
144 
145  return volScalarField::null();
146 }
147 
148 
149 const volScalarField& noFilm::T() const
150 {
152  << "T field not available for " << type() << abort(FatalError);
153 
154  return volScalarField::null();
155 }
156 
157 
159 {
161  << "Ts field not available for " << type() << abort(FatalError);
162 
163  return volScalarField::null();
164 }
165 
166 
168 {
170  << "Tw field not available for " << type() << abort(FatalError);
171 
172  return volScalarField::null();
173 }
174 
175 
177 {
179  << "hs field not available for " << type() << abort(FatalError);
180 
181  return volScalarField::null();
182 }
183 
184 
186 {
188  << "Cp field not available for " << type() << abort(FatalError);
189 
190  return volScalarField::null();
191 }
192 
193 
195 {
197  << "kappa field not available for " << type() << abort(FatalError);
198 
199  return volScalarField::null();
200 }
201 
202 
204 {
206  << "sigma field not available for " << type() << abort(FatalError);
207 
208  return volScalarField::null();
209 }
210 
211 
213 {
214  return tmp<volScalarField>
215  (
216  new volScalarField
217  (
218  IOobject
219  (
220  "noFilm::primaryMassTrans",
221  time().timeName(),
222  primaryMesh(),
225  false
226  ),
227  primaryMesh(),
229  )
230  );
231 }
232 
233 
235 {
237  << "cloudMassTrans field not available for " << type()
238  << abort(FatalError);
239 
240  return volScalarField::null();
241 }
242 
243 
245 {
247  << "cloudDiameterTrans field not available for " << type()
248  << abort(FatalError);
249 
250  return volScalarField::null();
251 }
252 
253 
255 {
257  (
259  (
260  IOobject
261  (
262  "noFilm::Srho",
263  time().timeName(),
264  primaryMesh(),
267  false
268  ),
269  primaryMesh(),
271  )
272  );
273 }
274 
275 
277 {
279  (
281  (
282  IOobject
283  (
284  "noFilm::Srho(" + Foam::name(i) + ")",
285  time().timeName(),
286  primaryMesh(),
289  false
290  ),
291  primaryMesh(),
293  )
294  );
295 }
296 
297 
299 {
301  (
303  (
304  IOobject
305  (
306  "noFilm::Sh",
307  time().timeName(),
308  primaryMesh(),
311  false
312  ),
313  primaryMesh(),
315  )
316  );
317 }
318 
319 
320 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
321 
322 } // End namespace surfaceFilmModels
323 } // End namespace regionModels
324 } // End namespace Foam
325 
326 // ************************************************************************* //
virtual tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
Definition: noFilm.C:212
virtual const volScalarField & rho() const
Return the film density [kg/m3].
Definition: noFilm.C:140
virtual const volScalarField & cloudDiameterTrans() const
Return the parcel diameters originating from film.
Definition: noFilm.C:244
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 volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
Definition: noFilm.C:185
error FatalError
virtual const volVectorField & Us() const
Return the film surface velocity [m/s].
Definition: noFilm.C:122
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
virtual const volScalarField & hs() const
Return the film surface enthalpy [J/kg].
Definition: noFilm.C:176
virtual tmp< volScalarField::Internal > Srho() const
Return total mass source - Eulerian phase only.
Definition: noFilm.C:254
const dimensionedVector & g() const
Return the accleration due to gravity.
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
Definition: noFilm.C:158
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
virtual const volScalarField & delta() const
Return the film thickness [m].
Definition: noFilm.C:95
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
const dimensionSet dimVolume(pow3(dimLength))
Definition: dimensionSets.H:58
addToRunTimeSelectionTable(surfaceFilmModel, kinematicSingleLayer, mesh)
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
Definition: regionModelI.H:31
dynamicFvMesh & mesh
virtual const volVectorField & U() const
Return the film velocity [m/s].
Definition: noFilm.C:113
A class for handling words, derived from string.
Definition: word.H:59
virtual const volScalarField & T() const
Return the film mean temperature [K].
Definition: noFilm.C:149
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
Definition: noFilm.C:167
word timeName
Definition: getTimeIndex.H:3
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
Definition: noFilm.C:194
errorManip< error > abort(error &err)
Definition: errorManip.H:131
virtual const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered / [].
Definition: noFilm.C:104
virtual bool read()
Read control parameters from dictionary.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:485
const dimensionSet dimEnergy
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
virtual const volVectorField & Uw() const
Return the film wall velocity [m/s].
Definition: noFilm.C:131
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & sigma() const
Return const access to the surface tension / [m/s2].
Definition: noFilm.C:203
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual bool read()
Read control parameters from dictionary.
Definition: noFilm.C:47
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
virtual void addSources(const label patchi, const label facei, const scalar massSource, const vector &momentumSource, const scalar pressureSource, const scalar energySource)
External hook to add sources to the film.
Definition: noFilm.C:84
defineTypeNameAndDebug(kinematicSingleLayer, 0)
virtual const volScalarField & cloudMassTrans() const
Return the film mass available for transfer.
Definition: noFilm.C:234
virtual tmp< volScalarField::Internal > Sh() const
Return enthalpy source - Eulerian phase only.
Definition: noFilm.C:298
Namespace for OpenFOAM.