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 -------------------------------------------------------------------------------
11 License
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 
35 namespace Foam
36 {
37 namespace regionModels
38 {
39 namespace surfaceFilmModels
40 {
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
45 {
46  return momentumPredictor_;
47 }
48 
49 
50 inline label kinematicSingleLayer::nOuterCorr() const
51 {
52  return nOuterCorr_;
53 }
54 
55 
56 inline label kinematicSingleLayer::nCorr() const
57 {
58  return nCorr_;
59 }
60 
61 
62 inline label kinematicSingleLayer::nNonOrthCorr() const
63 {
64  return nNonOrthCorr_;
65 }
66 
67 
69 {
70  return deltaSmall_;
71 }
72 
73 
74 inline const volScalarField& kinematicSingleLayer::mu() const
75 {
76  return mu_;
77 }
78 
79 
80 inline const volScalarField& kinematicSingleLayer::sigma() const
81 {
82  return sigma_;
83 }
84 
85 
86 inline const volScalarField& kinematicSingleLayer::delta() const
87 {
88  return delta_;
89 }
90 
91 
92 inline const volScalarField& kinematicSingleLayer::alpha() const
93 {
94  return alpha_;
95 }
96 
97 
99 {
100  return USpPrimary_;
101 }
102 
105 {
106  return pSpPrimary_;
107 }
108 
111 {
112  return rhoSpPrimary_;
113 }
114 
117 {
118  return USp_;
119 }
120 
123 {
124  return pSp_;
125 }
126 
129 {
130  return rhoSp_;
131 }
132 
134 inline const volVectorField& kinematicSingleLayer::USp() const
135 {
136  return USp_;
137 }
138 
140 inline const volScalarField& kinematicSingleLayer::pSp() const
141 {
142  return pSp_;
143 }
144 
146 inline const volScalarField& kinematicSingleLayer::rhoSp() const
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 
183 {
184  return injection_;
185 }
186 
189 {
190  return transfer_;
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 {
214  return volScalarField::New
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 {
241  return volVectorField::New
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 // ************************************************************************* //
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
List container for film injection models.
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField...
const Type & value() const noexcept
Return const reference to value.
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
label nOuterCorr() const
Return the number of outer correctors.
label nCorr() const
Return the number of PISO correctors.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Definition: Switch.H:77
tmp< volScalarField > gNorm() const
Return the gravity normal-to-patch component contribution.
const volScalarField & rhoPrimary() const
Density [kg/m3].
tmp< volScalarField > deltaMass() const
Return the change in film mass due to sources/sinks.
volScalarField deltaRho_
Film thickness*density (helper field) [kg/m2].
const volScalarField & muPrimary() const
Viscosity [Pa.s].
const filmThermoModel & filmThermo() const
Film thermo.
const volVectorField & UPrimary() const
Velocity [m/s].
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.
label nNonOrthCorr_
Number of non-orthogonal correctors.
const volScalarField & pPrimary() const
Pressure [Pa].
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())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
const dimensionedVector & g() const
Return the acceleration due to gravity.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const volScalarField & delta() const
Return const access to the film thickness [m].
transferModelList transfer_
Transfer with the continuous phase.
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
Switch momentumPredictor() const
Return the momentum predictor.
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 [].
const dimensionedVector & g_
Acceleration due to gravity [m/s2].
A class for managing temporary objects.
Definition: HashPtrTable.H:50
const filmTurbulenceModel & turbulence() const
Turbulence.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Do not request registration (bool: false)
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:61
const Time & time() const noexcept
Return the reference to the time database.
Definition: regionModel.H:244
const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered [].
Namespace for OpenFOAM.