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-2015 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 
131 inline const volVectorField& kinematicSingleLayer::USp() const
132 {
133  return USp_;
134 }
135 
136 
137 inline const volScalarField& kinematicSingleLayer::pSp() const
138 {
139  return pSp_;
140 }
141 
142 
143 inline const volScalarField& kinematicSingleLayer::rhoSp() const
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 deltaRho_*magSf();
194 }
195 
196 
198 {
199  return
201  *time().deltaT()
202  + deltaRho_*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 
284 (
285  const label patchI
286 ) const
287 {
288  const vectorField& nH = nHat().boundaryField()[patchI];
289  const vector& g = g_.value();
290  tmp<vectorField> tgTan(new vectorField(g - nH*(g & nH)));
291 
292  return tgTan;
293 }
294 
295 
296 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
297 
298 } // End namespace surfaceFilmModels
299 } // End namespace regionModels
300 } // End namespace Foam
301 
302 // ************************************************************************* //
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::rhoSpPrimary_
volScalarField rhoSpPrimary_
Mass / [kg/m2/s].
Definition: kinematicSingleLayer.H:182
Foam::fvc::surfaceSum
tmp< GeometricField< Type, fvPatchField, volMesh > > surfaceSum(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcSurfaceIntegrate.C:138
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
filmThermoModel.H
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::USpPrimary_
volVectorField USpPrimary_
Momementum / [kg/m/s2].
Definition: kinematicSingleLayer.H:176
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::USp_
volVectorField USp_
Momementum / [kg/m/s2].
Definition: kinematicSingleLayer.H:163
Foam::TimeState::deltaT
dimensionedScalar deltaT() const
Return time step.
Definition: TimeState.C:79
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::turbulence
const filmTurbulenceModel & turbulence() const
Turbulence.
Definition: kinematicSingleLayerI.H:185
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::injection_
injectionModelList injection_
Cloud injection.
Definition: kinematicSingleLayer.H:210
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::turbulence_
autoPtr< filmTurbulenceModel > turbulence_
Turbulence model.
Definition: kinematicSingleLayer.H:213
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::filmThermo_
autoPtr< filmThermoModel > filmThermo_
Film thermo model.
Definition: kinematicSingleLayer.H:204
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::deltaSmall_
const dimensionedScalar deltaSmall_
Small delta.
Definition: kinematicSingleLayer.H:100
Foam::fvc::interpolate
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
Definition: surfaceInterpolate.C:110
Foam::regionModels::surfaceFilmModels::filmTurbulenceModel
Base class for film turbulence models.
Definition: filmTurbulenceModel.H:56
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::nCorr
label nCorr() const
Return the number of PISO correctors.
Definition: kinematicSingleLayerI.H:53
Foam::regionModels::regionModel::time
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::mu
const volScalarField & mu() const
Return const access to the dynamic viscosity / [Pa.s].
Definition: kinematicSingleLayerI.H:71
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::sigma_
volScalarField sigma_
Surface tension / [m/s2].
Definition: kinematicSingleLayer.H:117
g
const dimensionedVector & g
Definition: setRegionFluidFields.H:33
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::UPrimary
const volVectorField & UPrimary() const
Velocity / [m/s].
Definition: kinematicSingleLayerI.H:149
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::pPrimary_
volScalarField pPrimary_
Pressure / [Pa].
Definition: kinematicSingleLayer.H:192
Foam::IOobject::NO_WRITE
@ NO_WRITE
Definition: IOobject.H:118
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::deltaSmall
const dimensionedScalar & deltaSmall() const
Return small delta.
Definition: kinematicSingleLayerI.H:65
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::muPrimary_
volScalarField muPrimary_
Viscosity / [Pa.s].
Definition: kinematicSingleLayer.H:198
Foam::vectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
Definition: primitiveFieldsFwd.H:49
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::gNormClipped
tmp< volScalarField > gNormClipped() const
Return the gravity normal-to-patch component contribution.
Definition: kinematicSingleLayerI.H:235
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::rhoPrimary
const volScalarField & rhoPrimary() const
Density / [kg/m3].
Definition: kinematicSingleLayerI.H:161
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::injection
injectionModelList & injection()
Injection.
Definition: kinematicSingleLayerI.H:179
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::deltaRho_
volScalarField deltaRho_
Film thickness*density (helper field) / [kg/m2].
Definition: kinematicSingleLayer.H:138
Foam::label
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
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::gNorm
tmp< volScalarField > gNorm() const
Return the gravity normal-to-patch component contribution.
Definition: kinematicSingleLayerI.H:212
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::delta_
volScalarField delta_
Film thickness / [m].
Definition: kinematicSingleLayer.H:123
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::deltaMass
tmp< volScalarField > deltaMass() const
Return the change in film mass due to sources/sinks.
Definition: kinematicSingleLayerI.H:206
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::USpPrimary
volVectorField & USpPrimary()
Momementum / [kg/m/s2].
Definition: kinematicSingleLayerI.H:95
Foam::IOobject::NO_READ
@ NO_READ
Definition: IOobject.H:111
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::filmThermo
const filmThermoModel & filmThermo() const
Film thermo.
Definition: kinematicSingleLayerI.H:173
Foam::regionModels::singleLayerRegion::magSf
virtual const volScalarField & magSf() const
Return the face area magnitudes / [m2].
Definition: singleLayerRegion.C:220
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::gTan
tmp< volVectorField > gTan() const
Return the gravity tangential component contributions.
Definition: kinematicSingleLayerI.H:261
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::momentumPredictor
const Switch & momentumPredictor() const
Return the momentum predictor.
Definition: kinematicSingleLayerI.H:41
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::pPrimary
const volScalarField & pPrimary() const
Pressure / [Pa].
Definition: kinematicSingleLayerI.H:155
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::USp
volVectorField & USp()
Momentum / [kg/m/s2].
Definition: kinematicSingleLayerI.H:113
fvcSurfaceIntegrate.H
Surface integrate surfaceField creating a volField. Surface sum a surfaceField creating a volField.
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::muPrimary
const volScalarField & muPrimary() const
Viscosity / [Pa.s].
Definition: kinematicSingleLayerI.H:167
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::momentumPredictor_
Switch momentumPredictor_
Momentum predictor.
Definition: kinematicSingleLayer.H:85
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
surfaceInterpolate.H
Surface Interpolation.
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::nNonOrthCorr
label nNonOrthCorr() const
Return the number of non-orthogonal correctors.
Definition: kinematicSingleLayerI.H:59
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::nCorr_
label nCorr_
Number of PISO-like correctors.
Definition: kinematicSingleLayer.H:91
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::mass
tmp< volScalarField > mass() const
Return the current film mass.
Definition: kinematicSingleLayerI.H:191
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::UPrimary_
volVectorField UPrimary_
Velocity / [m/s].
Definition: kinematicSingleLayer.H:189
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::pSp_
volScalarField pSp_
Pressure / [Pa].
Definition: kinematicSingleLayer.H:166
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::phi_
surfaceScalarField phi_
Mass flux (includes film thickness) / [kg.m/s].
Definition: kinematicSingleLayer.H:141
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::sigma
const volScalarField & sigma() const
Return const access to the surface tension / [m/s2].
Definition: kinematicSingleLayerI.H:77
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::pSp
volScalarField & pSp()
Pressure / [Pa].
Definition: kinematicSingleLayerI.H:119
Foam::regionModels::surfaceFilmModels::surfaceFilmModel::g_
const dimensionedVector & g_
Acceleration due to gravity [m/s2].
Definition: surfaceFilmModel.H:82
Foam::regionModels::surfaceFilmModels::injectionModelList
Definition: injectionModelList.H:54
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::rhoSpPrimary
volScalarField & rhoSpPrimary()
Mass / [kg/m2/s].
Definition: kinematicSingleLayerI.H:107
Foam::regionModels::surfaceFilmModels::filmThermoModel
Definition: filmThermoModel.H:54
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::alpha_
volScalarField alpha_
Film coverage indicator, 1 = covered, 0 = uncovered / [].
Definition: kinematicSingleLayer.H:126
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::pSpPrimary_
volScalarField pSpPrimary_
Pressure / [Pa].
Definition: kinematicSingleLayer.H:179
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::mu_
volScalarField mu_
Dynamic viscosity / [Pa.s].
Definition: kinematicSingleLayer.H:114
Foam::Vector< scalar >
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::nNonOrthCorr_
label nNonOrthCorr_
Number of non-orthogonal correctors.
Definition: kinematicSingleLayer.H:94
Foam::regionModels::singleLayerRegion::nHat
virtual const volVectorField & nHat() const
Return the patch normal vectors.
Definition: singleLayerRegion.C:207
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::rhoPrimary_
volScalarField rhoPrimary_
Density / [kg/m3].
Definition: kinematicSingleLayer.H:195
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::delta
const volScalarField & delta() const
Return const access to the film thickness / [m].
Definition: kinematicSingleLayerI.H:83
timeName
word timeName
Definition: getTimeIndex.H:3
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::alpha
const volScalarField & alpha() const
Return the film coverage, 1 = covered, 0 = uncovered / [].
Definition: kinematicSingleLayerI.H:89
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::netMass
tmp< volScalarField > netMass() const
Return the net film mass available over the next integration.
Definition: kinematicSingleLayerI.H:197
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::rhoSp_
volScalarField rhoSp_
Mass / [kg/m2/s].
Definition: kinematicSingleLayer.H:169
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::rhoSp
volScalarField & rhoSp()
Mass / [kg/m2/s].
Definition: kinematicSingleLayerI.H:125
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::pSpPrimary
volScalarField & pSpPrimary()
Pressure / [Pa].
Definition: kinematicSingleLayerI.H:101
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::nOuterCorr_
label nOuterCorr_
Number of outer correctors.
Definition: kinematicSingleLayer.H:88
Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::nOuterCorr
label nOuterCorr() const
Return the number of outer correctors.
Definition: kinematicSingleLayerI.H:47
Foam::regionModels::regionModel::regionMesh
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:61
Foam::pos
dimensionedScalar pos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:190