kinematicSingleLayerI.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-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 "filmThermoModel.H"
27 #include "surfaceInterpolate.H"
28 #include "fvcSurfaceIntegrate.H"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace regionModels
35 {
36 namespace surfaceFilmModels
37 {
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
42 {
43  return momentumPredictor_;
44 }
45 
46 
48 {
49  return nOuterCorr_;
50 }
51 
52 
54 {
55  return nCorr_;
56 }
57 
58 
60 {
61  return nNonOrthCorr_;
62 }
63 
64 
66 {
67  return deltaSmall_;
68 }
69 
70 
72 {
73  return mu_;
74 }
75 
76 
78 {
79  return sigma_;
80 }
81 
82 
84 {
85  return delta_;
86 }
87 
88 
90 {
91  return alpha_;
92 }
93 
94 
96 {
97  return USpPrimary_;
98 }
99 
100 
102 {
103  return pSpPrimary_;
104 }
105 
106 
108 {
109  return rhoSpPrimary_;
110 }
111 
112 
114 {
115  return USp_;
116 }
117 
118 
120 {
121  return pSp_;
122 }
123 
124 
126 {
127  return rhoSp_;
128 }
129 
130 
132 {
133  return USp_;
134 }
135 
136 
138 {
139  return pSp_;
140 }
141 
142 
144 {
145  return rhoSp_;
146 }
147 
148 
150 {
151  return UPrimary_;
152 }
153 
154 
156 {
157  return pPrimary_;
158 }
159 
160 
162 {
163  return rhoPrimary_;
164 }
165 
166 
168 {
169  return muPrimary_;
170 }
171 
172 
174 {
175  return filmThermo_();
176 }
177 
178 
180 {
181  return injection_;
182 }
183 
184 
186 {
187  return transfer_;
188 }
189 
190 
192 {
193  return turbulence_();
194 }
195 
196 
198 {
199  return rho_*delta_*magSf();
200 }
201 
202 
204 {
205  return
207  (
209  )*time().deltaT()
210  + rho_*delta_*magSf();
211 }
212 
213 
215 {
216  return rhoSp_*magSf()*time().deltaT();
217 }
218 
219 
221 {
222  tmp<volScalarField> tgNorm
223  (
224  new volScalarField
225  (
226  IOobject
227  (
228  "gNorm",
229  time().timeName(),
230  regionMesh(),
233  ),
234  g_ & nHat()
235  )
236  );
237 
238  return tgNorm;
239 }
240 
241 
243 {
244  tmp<volScalarField> tgNormClipped
245  (
246  new volScalarField
247  (
248  IOobject
249  (
250  "gNormClipped",
251  time().timeName(),
252  regionMesh(),
255  ),
256  g_ & nHat()
257  )
258  );
259 
260  volScalarField& gNormClipped = tgNormClipped.ref();
261  gNormClipped.min(0.0);
262 
263  return tgNormClipped;
264 }
265 
266 
268 {
269  tmp<volVectorField> tgTan
270  (
271  new volVectorField
272  (
273  IOobject
274  (
275  "gTan",
276  time().timeName(),
277  regionMesh(),
280  ),
281  g_ - nHat()*gNorm()
282  )
283  );
284 
285  return tgTan;
286 }
287 
288 
289 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
290 
291 } // End namespace surfaceFilmModels
292 } // End namespace regionModels
293 } // End namespace Foam
294 
295 // ************************************************************************* //
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField...
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
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
label nOuterCorr() const
Return the number of outer correctors.
label nCorr() const
Return the number of PISO correctors.
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
tmp< volScalarField > gNorm() const
Return the gravity normal-to-patch component contribution.
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
const volScalarField & rhoPrimary() const
Density [kg/m3].
const Switch & momentumPredictor() const
Return the momentum predictor.
tmp< volScalarField > deltaMass() const
Return the change in film mass due to sources/sinks.
const volScalarField & muPrimary() const
Viscosity [Pa.s].
const filmThermoModel & filmThermo() const
Film thermo.
const volVectorField & UPrimary() const
Velocity [m/s].
const dimensionedVector & g_
Acceleration due to gravity [m/s2].
const volScalarField & mu() const
Return const access to the dynamic viscosity [Pa.s].
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
tmp< volScalarField > mass() const
Return the current film mass.
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
const dimensionedScalar & deltaSmall() const
Return small delta.
virtual const volVectorField & nHat() const
Return the patch normal vectors.
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
word timeName
Definition: getTimeIndex.H:3
void min(const dimensioned< Type > &)
label nNonOrthCorr_
Number of non-orthogonal correctors.
const volScalarField & pPrimary() const
Pressure [Pa].
dimensionedScalar pos0(const dimensionedScalar &ds)
const volScalarField & delta() const
Return const access to the film thickness [m].
transferModelList transfer_
Transfer with the continuous phase.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
surfaceScalarField phi_
Mass flux (includes film thickness) [kg.m/s].
const volScalarField & sigma() const
Return const access to the surface tension [kg/s2].
label nNonOrthCorr() const
Return the number of non-orthogonal correctors.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered [].
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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
const filmTurbulenceModel & turbulence() const
Turbulence.
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:53
const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered [].
Namespace for OpenFOAM.
tmp< volScalarField > netMass() const
Return the net film mass available over the next integration.