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-2016 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  // do nothing
94 }
95 
96 
98 {
100  << "delta field not available for " << type() << abort(FatalError);
101 
102  return volScalarField::null();
103 }
104 
105 
107 {
109  << "alpha field not available for " << type() << abort(FatalError);
110 
111  return volScalarField::null();
112 }
113 
114 
115 const volVectorField& noFilm::U() const
116 {
118  << "U field not available for " << type() << abort(FatalError);
119 
120  return volVectorField::null();
121 }
122 
123 
125 {
127  << "Us field not available for " << type() << abort(FatalError);
128 
129  return volVectorField::null();
130 }
131 
132 
134 {
136  << "Uw field not available for " << type() << abort(FatalError);
137 
138  return volVectorField::null();
139 }
140 
141 
143 {
145  << "rho field not available for " << type() << abort(FatalError);
146 
147  return volScalarField::null();
148 }
149 
150 
151 const volScalarField& noFilm::T() const
152 {
154  << "T field not available for " << type() << abort(FatalError);
155 
156  return volScalarField::null();
157 }
158 
159 
161 {
163  << "Ts field not available for " << type() << abort(FatalError);
164 
165  return volScalarField::null();
166 }
167 
168 
170 {
172  << "Tw field not available for " << type() << abort(FatalError);
173 
174  return volScalarField::null();
175 }
176 
177 
179 {
181  << "Cp field not available for " << type() << abort(FatalError);
182 
183  return volScalarField::null();
184 }
185 
186 
188 {
190  << "kappa field not available for " << type() << abort(FatalError);
191 
192  return volScalarField::null();
193 }
194 
195 
197 {
199  << "sigma field not available for " << type() << abort(FatalError);
200 
201  return volScalarField::null();
202 }
203 
204 
206 {
207  return tmp<volScalarField>
208  (
209  new volScalarField
210  (
211  IOobject
212  (
213  "noFilm::primaryMassTrans",
214  time().timeName(),
215  primaryMesh(),
218  false
219  ),
220  primaryMesh(),
222  )
223  );
224 }
225 
226 
228 {
230  << "cloudMassTrans field not available for " << type()
231  << abort(FatalError);
232 
233  return volScalarField::null();
234 }
235 
236 
238 {
240  << "cloudDiameterTrans field not available for " << type()
241  << abort(FatalError);
242 
243  return volScalarField::null();
244 }
245 
246 
248 {
250  (
252  (
253  IOobject
254  (
255  "noFilm::Srho",
256  time().timeName(),
257  primaryMesh(),
260  false
261  ),
262  primaryMesh(),
264  )
265  );
266 }
267 
268 
270 {
272  (
274  (
275  IOobject
276  (
277  "noFilm::Srho(" + Foam::name(i) + ")",
278  time().timeName(),
279  primaryMesh(),
282  false
283  ),
284  primaryMesh(),
286  )
287  );
288 }
289 
290 
292 {
294  (
296  (
297  IOobject
298  (
299  "noFilm::Sh",
300  time().timeName(),
301  primaryMesh(),
304  false
305  ),
306  primaryMesh(),
308  )
309  );
310 }
311 
312 
313 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
314 
315 } // End namespace surfaceFilmModels
316 } // End namespace regionModels
317 } // End namespace Foam
318 
319 // ************************************************************************* //
virtual const volVectorField & Uw() const
Return the film wall velocity [m/s].
Definition: noFilm.C:133
virtual tmp< DimensionedField< scalar, volMesh > > Sh() const
Return enthalpy source - Eulerian phase only.
Definition: noFilm.C:291
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
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
virtual const volScalarField & Tw() const
Return the film wall temperature [K].
Definition: noFilm.C:169
error FatalError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
virtual const volScalarField & Cp() const
Return the film specific heat capacity [J/kg/K].
Definition: noFilm.C:178
virtual const volScalarField & T() const
Return the film mean temperature [K].
Definition: noFilm.C:151
IOobject(const word &name, const fileName &instance, const objectRegistry &registry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
Definition: IOobject.C:114
virtual const volScalarField & delta() const
Return the film thickness [m].
Definition: noFilm.C:97
const dimensionedVector & g() const
Return the accleration due to gravity.
virtual const volScalarField & cloudMassTrans() const
Return the film mass available for transfer.
Definition: noFilm.C:227
virtual const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered / [].
Definition: noFilm.C:106
virtual const volScalarField & kappa() const
Return the film thermal conductivity [W/m/K].
Definition: noFilm.C:187
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)
dynamicFvMesh & mesh
virtual const volVectorField & Us() const
Return the film surface velocity [m/s].
Definition: noFilm.C:124
A class for handling words, derived from string.
Definition: word.H:59
virtual const volScalarField & Ts() const
Return the film surface temperature [K].
Definition: noFilm.C:160
virtual const volScalarField & rho() const
Return the film density [kg/m3].
Definition: noFilm.C:142
word timeName
Definition: getTimeIndex.H:3
errorManip< error > abort(error &err)
Definition: errorManip.H:131
virtual bool read()
Read control parameters from dictionary.
virtual tmp< DimensionedField< scalar, volMesh > > Srho() const
Return total mass source - Eulerian phase only.
Definition: noFilm.C:247
virtual const volScalarField & cloudDiameterTrans() const
Return the parcel diameters originating from film.
Definition: noFilm.C:237
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
const dimensionSet dimEnergy
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
const volScalarField & sigma() const
Return const access to the surface tension / [m/s2].
Definition: noFilm.C:196
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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
virtual const volVectorField & U() const
Return the film velocity [m/s].
Definition: noFilm.C:115
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:49
A class for managing temporary objects.
Definition: PtrList.H:54
const fvMesh & primaryMesh() const
Return the reference to the primary mesh database.
Definition: regionModelI.H:31
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
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 tmp< volScalarField > primaryMassTrans() const
Return mass transfer source - Eulerian phase only.
Definition: noFilm.C:205
Namespace for OpenFOAM.