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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "filmThermoModel.H"
30#include "surfaceInterpolate.H"
31#include "fvcSurfaceIntegrate.H"
32
33// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34
35namespace Foam
36{
37namespace regionModels
38{
39namespace surfaceFilmModels
40{
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
45{
46 return momentumPredictor_;
47}
48
49
51{
52 return nOuterCorr_;
53}
54
55
56inline label kinematicSingleLayer::nCorr() const
57{
58 return nCorr_;
59}
60
61
63{
64 return nNonOrthCorr_;
65}
66
67
69{
70 return deltaSmall_;
71}
72
73
75{
76 return mu_;
77}
78
79
81{
82 return sigma_;
83}
84
85
87{
88 return delta_;
89}
90
91
93{
94 return alpha_;
95}
96
97
99{
100 return USpPrimary_;
101}
102
103
105{
106 return pSpPrimary_;
107}
108
109
111{
112 return rhoSpPrimary_;
113}
114
115
117{
118 return USp_;
119}
120
121
123{
124 return pSp_;
125}
126
127
129{
130 return rhoSp_;
131}
132
133
135{
136 return USp_;
137}
138
139
141{
142 return pSp_;
143}
144
145
147{
148 return rhoSp_;
149}
150
151
153{
154 return UPrimary_;
155}
156
157
159{
160 return pPrimary_;
161}
162
163
165{
166 return rhoPrimary_;
167}
168
169
171{
172 return muPrimary_;
173}
174
175
177{
178 return *filmThermo_;
179}
180
181
183{
184 return injection_;
185}
186
187
189{
190 return transfer_;
191}
192
193
195{
196 return *turbulence_;
197}
198
199
201{
202 return deltaRho_*magSf();
203}
204
205
207{
208 return rhoSp_*magSf()*time().deltaT();
209}
210
211
213{
215 (
217 (
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 (
239 (
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{
262 (
264 (
266 (
267 "gTan",
268 time().timeName(),
269 regionMesh(),
272 ),
273 g_ - nHat()*gNorm()
274 )
275 );
276
277 return tgTan;
278}
279
281(
282 const label patchI
283) const
284{
285 const vectorField& nH = nHat().boundaryField()[patchI];
286 const vector& g = g_.value();
287 tmp<vectorField> tgTan(new vectorField(g - nH*(g & nH)));
288
289 return tgTan;
290}
291
292
293// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
294
295} // End namespace surfaceFilmModels
296} // End namespace regionModels
297} // End namespace Foam
298
299// ************************************************************************* //
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:55
const Type & value() const
Return const reference to value.
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:40
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:64
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
virtual const volVectorField & nHat() const
Return the patch normal vectors.
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
label nOuterCorr() const
Return the number of outer correctors.
const filmTurbulenceModel & turbulence() const
Turbulence.
const volScalarField & mu() const
Return const access to the dynamic viscosity [Pa.s].
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
const volScalarField & sigma() const
Return const access to the surface tension [kg/s2].
const volScalarField & muPrimary() const
Viscosity [Pa.s].
tmp< volScalarField > mass() const
Return the current film mass.
tmp< volScalarField > deltaMass() const
Return the change in film mass due to sources/sinks.
label nNonOrthCorr() const
Return the number of non-orthogonal correctors.
const filmThermoModel & filmThermo() const
Film thermo.
volScalarField deltaRho_
Film thickness*density (helper field) [kg/m2].
transferModelList transfer_
Transfer with the continuous phase.
label nCorr() const
Return the number of PISO correctors.
const volScalarField & rhoPrimary() const
Density [kg/m3].
const volVectorField & UPrimary() const
Velocity [m/s].
const dimensionedScalar & deltaSmall() const
Return small delta.
const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered [].
const volScalarField & delta() const
Return const access to the film thickness [m].
Switch momentumPredictor() const
Return the momentum predictor.
const volScalarField & pPrimary() const
Pressure [Pa].
tmp< volScalarField > gNorm() const
Return the gravity normal-to-patch component contribution.
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
label nNonOrthCorr_
Number of non-orthogonal correctors.
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered [].
const dimensionedVector & g_
Acceleration due to gravity [m/s2].
const dimensionedVector & g() const
Return the acceleration due to gravity.
A class for managing temporary objects.
Definition: tmp.H:65
T & ref() const
Definition: tmpI.H:227
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
word timeName
Definition: getTimeIndex.H:3
Namespace for OpenFOAM.
Field< vector > vectorField
Specialisation of Field<T> for vector.