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-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 \*---------------------------------------------------------------------------*/
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  zeroGradientFvPatchScalarField::typeName
228  )
229  );
230 
231  return tgNorm;
232 }
233 
234 
236 {
237  tmp<volScalarField> tgNormClipped
238  (
239  new volScalarField
240  (
241  IOobject
242  (
243  "gNormClipped",
244  time().timeName(),
245  regionMesh(),
248  ),
249  g_ & nHat(),
250  zeroGradientFvPatchScalarField::typeName
251  )
252  );
253 
254  volScalarField& gNormClipped = tgNormClipped();
255  gNormClipped.min(0.0);
256 
257  return tgNormClipped;
258 }
259 
260 
262 {
263  tmp<volVectorField> tgTan
264  (
265  new volVectorField
266  (
267  IOobject
268  (
269  "gTan",
270  time().timeName(),
271  regionMesh(),
274  ),
275  g_ - nHat()*gNorm(),
276  zeroGradientFvPatchVectorField::typeName
277  )
278  );
279 
280  return tgTan;
281 }
282 
283 
284 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
285 
286 } // End namespace surfaceFilmModels
287 } // End namespace regionModels
288 } // End namespace Foam
289 
290 // ************************************************************************* //
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered / [].
label nCorr() const
Return the number of PISO correctors.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
const filmTurbulenceModel & turbulence() const
Turbulence.
const volScalarField & rhoPrimary() const
Density / [kg/m3].
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
const volScalarField & delta() const
Return const access to the film thickness / [m].
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< volScalarField > mass() const
Return the current film mass.
const volScalarField & mu() const
Return const access to the dynamic viscosity / [Pa.s].
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
Surface Interpolation.
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
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
virtual const volVectorField & nHat() const
Return the patch normal vectors.
const volVectorField & UPrimary() const
Velocity / [m/s].
Namespace for OpenFOAM.
tmp< volScalarField > deltaMass() const
Return the change in film mass due to sources/sinks.
label nNonOrthCorr_
Number of non-orthogonal correctors.
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
const volScalarField & muPrimary() const
Viscosity / [Pa.s].
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField...
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
const filmThermoModel & filmThermo() const
Film thermo.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
const volScalarField & sigma() const
Return const access to the surface tension / [m/s2].
const dimensionedScalar & deltaSmall() const
Return small delta.
surfaceScalarField phi_
Mass flux (includes film thickness) / [kg.m/s].
tmp< volScalarField > netMass() const
Return the net film mass available over the next integration.
volVectorField & USpPrimary()
Momementum / [kg/m/s2].
label nOuterCorr() const
Return the number of outer correctors.
tmp< volScalarField > gNorm() const
Return the gravity normal-to-patch component contribution.
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
label nNonOrthCorr() const
Return the number of non-orthogonal correctors.
dimensionedScalar pos(const dimensionedScalar &ds)
dimensionedScalar deltaT() const
Return time step.
Definition: TimeState.C:79
const volScalarField & pPrimary() const
Pressure / [Pa].
const Switch & momentumPredictor() const
Return the momentum predictor.
void min(const dimensioned< Type > &)
A class for managing temporary objects.
Definition: PtrList.H:118
const dimensionedVector & g_
Acceleration due to gravity [m/s2].
word timeName
Definition: getTimeIndex.H:3