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-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 "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 turbulence_();
188 }
189 
190 
192 {
193  return rho_*delta_*magSf();
194 }
195 
196 
198 {
199  return
201  *time().deltaT()
202  + rho_*delta_*magSf();
203 }
204 
205 
207 {
208  return rhoSp_*magSf()*time().deltaT();
209 }
210 
211 
213 {
214  tmp<volScalarField> tgNorm
215  (
216  new volScalarField
217  (
218  IOobject
219  (
220  "gNorm",
221  time().timeName(),
222  regionMesh(),
225  ),
226  g_ & nHat()
227  )
228  );
229 
230  return tgNorm;
231 }
232 
233 
235 {
236  tmp<volScalarField> tgNormClipped
237  (
238  new volScalarField
239  (
240  IOobject
241  (
242  "gNormClipped",
243  time().timeName(),
244  regionMesh(),
247  ),
248  g_ & nHat()
249  )
250  );
251 
252  volScalarField& gNormClipped = tgNormClipped.ref();
253  gNormClipped.min(0.0);
254 
255  return tgNormClipped;
256 }
257 
258 
260 {
261  tmp<volVectorField> tgTan
262  (
263  new volVectorField
264  (
265  IOobject
266  (
267  "gTan",
268  time().timeName(),
269  regionMesh(),
272  ),
273  g_ - nHat()*gNorm()
274  )
275  );
276 
277  return tgTan;
278 }
279 
280 
281 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
282 
283 } // End namespace surfaceFilmModels
284 } // End namespace regionModels
285 } // End namespace Foam
286 
287 // ************************************************************************* //
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField...
const volVectorField & UPrimary() const
Velocity / [m/s].
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
tmp< volScalarField > deltaMass() const
Return the change in film mass due to sources/sinks.
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
const filmThermoModel & filmThermo() const
Film thermo.
const volScalarField & muPrimary() const
Viscosity / [Pa.s].
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
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
label nCorr() const
Return the number of PISO correctors.
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
volVectorField & USpPrimary()
Momementum / [kg/m/s2].
const Switch & momentumPredictor() const
Return the momentum predictor.
dimensionedScalar pos(const dimensionedScalar &ds)
const dimensionedVector & g_
Acceleration due to gravity [m/s2].
label nOuterCorr() const
Return the number of outer correctors.
const volScalarField & delta() const
Return const access to the film thickness / [m].
tmp< volScalarField > gNorm() const
Return the gravity normal-to-patch component contribution.
word timeName
Definition: getTimeIndex.H:3
void min(const dimensioned< Type > &)
label nNonOrthCorr_
Number of non-orthogonal correctors.
label nNonOrthCorr() const
Return the number of non-orthogonal correctors.
const volScalarField & mu() const
Return const access to the dynamic viscosity / [Pa.s].
const volScalarField & sigma() const
Return const access to the surface tension / [m/s2].
virtual const volVectorField & nHat() const
Return the patch normal vectors.
const volScalarField & rhoPrimary() const
Density / [kg/m3].
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.
tmp< volScalarField > netMass() const
Return the net film mass available over the next integration.
tmp< volScalarField > mass() const
Return the current film mass.
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:53
const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered / [].
surfaceScalarField phi_
Mass flux (includes film thickness) / [kg.m/s].
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const dimensionedScalar & deltaSmall() const
Return small delta.
A class for managing temporary objects.
Definition: PtrList.H:54
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:174
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
const volScalarField & pPrimary() const
Pressure / [Pa].
Namespace for OpenFOAM.
const filmTurbulenceModel & turbulence() const
Turbulence.