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-2021 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::regionModels::areaSurfaceFilmModels::filmTurbulenceModel
28 
29 Description
30  Base class for film turbulence models
31 
32 Usage
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 
95 SourceFiles
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 
109 namespace Foam
110 {
111 namespace regionModels
112 {
113 namespace areaSurfaceFilmModels
114 {
115 
116 /*---------------------------------------------------------------------------*\
117  Class filmTurbulenceModel Declaration
118 \*---------------------------------------------------------------------------*/
119 
120 class filmTurbulenceModel
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 
131 public:
132 
133  // Public Enumerations
134 
135  //- Options for the friction models
136  enum frictionMethodType
137  {
142  };
143 
144  //- Options for the shear stress models
145  enum shearMethodType
146  {
147  msimple,
149  };
150 
151 
152 protected:
153 
154  // Protected Data
155 
156  //- Reference to liquidFilmBase
157  const liquidFilmBase& film_;
158 
159  //- Names for friction models
161 
162  //- Names for shear stress models
164 
165  //- Model dictionary
166  const dictionary dict_;
167 
168  //- Friction model
170 
171  //- Shear-stress model
173 
174  //- Name of density field
175  word rhoName_;
176 
177  //- Reference density needed for incompressible calculations
178  scalar rhoRef_;
179 
180 
181 public:
182 
183  //- Runtime type information
184  TypeName("filmTurbulenceModel");
185 
186 
187  // Declare runtime constructor selection table
188 
190  (
194  (
197  ),
198  (film, dict)
199  );
200 
201 
202  // Constructors
203 
204  //- Construct from type name, dictionary and surface film model
206  (
207  const word& modelType,
209  const dictionary& dict
210  );
211 
212 
213  // Selectors
214 
215  //- Return a reference to the selected injection model
217  (
219  const dictionary& dict
220  );
222 
223  //- Destructor
224  virtual ~filmTurbulenceModel() = default;
225 
227  // Member Functions
228 
229  // Access
230 
231  //- Return film
232  const liquidFilmBase& film() const;
233 
234 
235  // Turbulence
237  //- Return the effective viscous stress (laminar + turbulent)
239 
240  //- Return primary region friction
242  (
244  ) const;
245 
246  //- Return rho if specified otherwise rhoRef
247  tmp<volScalarField> rho() const;
248 
249  //- Return the wall film surface friction
250  virtual tmp<areaScalarField> Cw() const;
252  //- Return the film turbulence viscosity
253  virtual tmp<areaScalarField> mut() const = 0;
254 
255 
256  // Evaluation
257 
258  //- Correct/update the model
259  virtual void correct() = 0;
260 
261  //- Return the source for the film momentum equation
262  virtual tmp<faVectorMatrix> Su(areaVectorField& U) const = 0;
263 };
264 
265 
266 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
267 
268 } // End namespace areaSurfaceFilmModels
269 } // End namespace regionModels
270 } // End namespace Foam
271 
272 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
273 
274 #endif
275 
276 // ************************************************************************* //
dictionary dict
static const Enum< shearMethodType > shearMethodTypeNames_
Names for shear stress models.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
tmp< faVectorMatrix > primaryRegionFriction(areaVectorField &U) const
Return primary region friction.
static const Enum< frictionMethodType > frictionMethodTypeNames_
Names for friction models.
virtual tmp< areaScalarField > mut() const =0
Return the film turbulence viscosity.
static autoPtr< filmTurbulenceModel > New(liquidFilmBase &film, const dictionary &dict)
Return a reference to the selected injection model.
tmp< volSymmTensorField > devRhoReff() const
Return the effective viscous stress (laminar + turbulent)
const liquidFilmBase & film_
Reference to liquidFilmBase.
A class for handling words, derived from Foam::string.
Definition: word.H:63
virtual tmp< faVectorMatrix > Su(areaVectorField &U) const =0
Return the source for the film momentum equation.
declareRunTimeSelectionTable(autoPtr, filmTurbulenceModel, dictionary,(liquidFilmBase &film, const dictionary &dict),(film, dict))
virtual void correct()=0
Correct/update the model.
tmp< volScalarField > rho() const
Return rho if specified otherwise rhoRef.
virtual tmp< areaScalarField > Cw() const
Return the wall film surface friction.
scalar rhoRef_
Reference density needed for incompressible calculations.
U
Definition: pEqn.H:72
TypeName("filmTurbulenceModel")
Runtime type information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Forwards and collection of common area field types.
Namespace for OpenFOAM.