Loading...
Searching...
No Matches
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// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47}
48
50inline label kinematicSingleLayer::nOuterCorr() const
51{
52 return nOuterCorr_;
53}
54
56inline label kinematicSingleLayer::nCorr() const
57{
58 return nCorr_;
59}
60
62inline label kinematicSingleLayer::nNonOrthCorr() const
63{
64 return nNonOrthCorr_;
65}
66
69{
70 return deltaSmall_;
71}
72
74inline const volScalarField& kinematicSingleLayer::mu() const
75{
76 return mu_;
77}
78
81{
82 return sigma_;
83}
84
87{
88 return delta_;
89}
90
93{
94 return alpha_;
95}
96
101}
102
107}
108
113}
114
117{
118 return USp_;
119}
120
123{
124 return pSp_;
125}
126
129{
130 return rhoSp_;
131}
132
134inline const volVectorField& kinematicSingleLayer::USp() const
135{
136 return USp_;
137}
138
140inline const volScalarField& kinematicSingleLayer::pSp() const
141{
142 return pSp_;
143}
144
147{
148 return rhoSp_;
149}
150
153{
154 return UPrimary_;
155}
156
159{
160 return pPrimary_;
161}
162
165{
166 return rhoPrimary_;
167}
168
171{
172 return muPrimary_;
173}
174
177{
178 return *filmThermo_;
179}
180
185}
186
191}
192
195{
196 return *turbulence_;
197}
198
201{
202 return deltaRho_*magSf();
203}
204
207{
208 return rhoSp_*magSf()*time().deltaT();
209}
210
211
213{
215 (
216 "gNorm",
218 g_ & nHat()
219 );
220}
221
222
224{
225 auto tgNormClipped = volScalarField::New
226 (
227 "gNormClipped",
229 g_ & nHat()
230 );
231 auto& gNormClipped = tgNormClipped.ref();
233 gNormClipped.clamp_max(0);
234
235 return tgNormClipped;
236}
237
238
240{
242 (
243 "gTan",
245 g_ - nHat()*gNorm()
246 );
247}
248
249
251(
252 const label patchI
253) const
254{
255 const vectorField& nH = nHat().boundaryField()[patchI];
256 const vector& g = g_.value();
257 tmp<vectorField> tgTan(g - nH*(g & nH));
258
259 return tgTan;
260}
261
262
263// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
264
265} // End namespace surfaceFilmModels
266} // End namespace regionModels
267} // End namespace Foam
268
269// ************************************************************************* //
const uniformDimensionedVectorField & g
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
@ NO_REGISTER
Do not request registration (bool: false).
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition Switch.H:81
dimensionedScalar deltaT() const
Return time step.
Definition TimeStateI.H:61
const Type & value() const noexcept
Return const reference to value.
const Time & time() const noexcept
Return the reference to the time database.
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.
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.
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:75
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
Namespace for OpenFOAM.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Vector< scalar > vector
Definition vector.H:57