Loading...
Searching...
No Matches
filmTurbulenceModel.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) 2020-2025 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::regionModels::areaSurfaceFilmModels::filmTurbulenceModel
28
29Description
30 Base class for film turbulence models
31
32Usage
33 Example of the model specification:
34 \verbatim
35 {
36 // Mandatory entries
37 turbulence <model>;
38
39 <model>Coeffs
40 {
41 // Mandatory entries
42 friction <word>;
43 shearStress <word>;
44
45 // Optional entries
46 rho <word>;
47
48 // Conditional entries
49
50 // if rho=rhoInf
51 rhoInf <scalar>;
52
53 // if friction=DarcyWeisbach
54 DarcyWeisbach <scalar>;
55
56 // if friction=ManningStrickler
57 n <scalar>;
58
59 // if shearStress=simple
60 Cf <scalar>;
61 }
62
63 // Inherited entries
64 ...
65 }
66 \endverbatim
67
68 where the entries mean:
69 \table
70 Property | Description | Type | Reqd | Deflt
71 turbulence | Model name | word | yes | -
72 friction | Friction model | word | yes | -
73 shearStress | Shear-stress model | word | yes | -
74 rho | Name of density field | word | no | rho
75 rhoInf | Reference density | scalar | choice | -
76 DarcyWeisbach | Friction-model constant | scalar | choice | -
77 n | Friction-model constant | scalar | choice | -
78 Cf | Skin-friction coefficient | scalar | choice | -
79 \endtable
80
81 Options for the \c friction entry:
82 \verbatim
83 quadraticProfile | Quadratic-profile model
84 linearProfile | Linear-profile model
85 DarcyWeisbach | Darcy-Weisbach model
86 ManningStrickler | Manning-Strickler model
87 \endverbatim
88
89 Options for the \c shearStress entry:
90 \verbatim
91 simple | Skin-friction coefficient model
92 wallFunction | Wall-function model
93 \endverbatim
94
95SourceFiles
96 filmTurbulenceModel.C
97 filmTurbulenceModelNew.C
98
99\*---------------------------------------------------------------------------*/
100
101#ifndef regionFaModels_filmTurbulenceModel_H
102#define regionFaModels_filmTurbulenceModel_H
103
104#include "areaFieldsFwd.H"
105#include "liquidFilmBase.H"
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109namespace Foam
110{
111namespace regionModels
112{
113namespace areaSurfaceFilmModels
114{
115
116/*---------------------------------------------------------------------------*\
117 Class filmTurbulenceModel Declaration
118\*---------------------------------------------------------------------------*/
119
121{
122 // Private Member Functions
123
124 //- No copy construct
125 filmTurbulenceModel(const filmTurbulenceModel&) = delete;
126
127 //- No copy assignment
128 void operator=(const filmTurbulenceModel&) = delete;
129
130
131public:
132
133 // Public Enumerations
134
135 //- Options for the friction models
137 {
142 };
143
144 //- Options for the shear stress models
145 enum shearMethodType
146 {
147 msimple,
149 };
150
151
152protected:
153
154 // Protected Data
155
156 //- Reference to liquidFilmBase
157 const liquidFilmBase& film_;
158
159 //- Names for friction models
160 static const Enum<frictionMethodType> frictionMethodTypeNames_;
161
162 //- Names for shear stress models
163 static const Enum<shearMethodType> shearMethodTypeNames_;
164
165 //- Model dictionary
166 const dictionary dict_;
167
168 //- Friction model
170
171 //- Shear-stress model
173
174 //- Name of density field
176
177 //- Reference density needed for incompressible calculations
178 scalar rhoRef_;
179
180 //- Wall film-surface friction field
182
183 //- Darcy-Weisbach model field
185
186
187public:
188
189 //- Runtime type information
190 TypeName("filmTurbulenceModel");
192
193 // Declare runtime constructor selection table
197 autoPtr,
198 filmTurbulenceModel,
200 (
203 ),
205 );
206
207
208 // Constructors
209
210 //- Construct from type name, dictionary and surface film model
211 filmTurbulenceModel
212 (
213 const word& modelType,
215 const dictionary& dict
216 );
217
218
219 // Selectors
220
221 //- Return a reference to the selected injection model
223 (
225 const dictionary& dict
226 );
227
228
229 //- Destructor
230 virtual ~filmTurbulenceModel() = default;
232
233 // Member Functions
234
235 // Access
237 //- Return film
238 const liquidFilmBase& film() const;
239
240
241 // Turbulence
242
243 //- Return the effective viscous stress (laminar + turbulent)
245
246 //- Return primary region friction
248 (
250 ) const;
252 //- Return rho if specified otherwise rhoRef
253 tmp<volScalarField> rho() const;
254
255 //- Return the wall film surface friction
256 virtual tmp<areaScalarField> Cw() const;
257
258 //- Return the film turbulence viscosity
259 virtual tmp<areaScalarField> mut() const = 0;
260
262 // Evaluation
263
264 //- Correct/update the model
265 virtual void correct() = 0;
266
267 //- Return the source for the film momentum equation
268 virtual tmp<faVectorMatrix> Su(areaVectorField& U) const = 0;
270
271
272// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
273
274} // End namespace areaSurfaceFilmModels
275} // End namespace regionModels
276} // End namespace Foam
277
278// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
279
280#endif
281
282// ************************************************************************* //
Forwards and collection of common area field types.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition Enum.H:57
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
scalar rhoRef_
Reference density needed for incompressible calculations.
autoPtr< areaScalarField > dwfPtr_
Darcy-Weisbach model field.
virtual tmp< areaScalarField > mut() const =0
Return the film turbulence viscosity.
static const Enum< frictionMethodType > frictionMethodTypeNames_
Names for friction models.
tmp< faVectorMatrix > primaryRegionFriction(areaVectorField &U) const
Return primary region friction.
static const Enum< shearMethodType > shearMethodTypeNames_
Names for shear stress models.
tmp< volSymmTensorField > devRhoReff() const
Return the effective viscous stress (laminar + turbulent).
autoPtr< areaScalarField > CwPtr_
Wall film-surface friction field.
virtual tmp< faVectorMatrix > Su(areaVectorField &U) const =0
Return the source for the film momentum equation.
tmp< volScalarField > rho() const
Return rho if specified otherwise rhoRef.
TypeName("filmTurbulenceModel")
Runtime type information.
const liquidFilmBase & film_
Reference to liquidFilmBase.
virtual void correct()=0
Correct/update the model.
static autoPtr< filmTurbulenceModel > New(liquidFilmBase &film, const dictionary &dict)
Return a reference to the selected injection model.
virtual tmp< areaScalarField > Cw() const
Return the wall film surface friction.
declareRunTimeSelectionTable(autoPtr, filmTurbulenceModel, dictionary,(liquidFilmBase &film, const dictionary &dict),(film, dict))
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
U
Definition pEqn.H:72
zeroField Su
Definition alphaSuSp.H:1
Namespace for OpenFOAM.
GeometricField< vector, faPatchField, areaMesh > areaVectorField
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68