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-------------------------------------------------------------------------------
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
32SourceFiles
33 filmTurbulenceModel.C
34 filmTurbulenceModelNew.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef regionFaModels_filmTurbulenceModel_H
39#define regionFaModels_filmTurbulenceModel_H
40
41#include "areaFieldsFwd.H"
43#include "faMatrices.H"
44#include "liquidFilmBase.H"
45#include "fvMesh.H"
46#include "Enum.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52namespace regionModels
53{
54namespace areaSurfaceFilmModels
55{
56
57/*---------------------------------------------------------------------------*\
58 Class filmTurbulenceModel Declaration
59\*---------------------------------------------------------------------------*/
62{
63 // Private Member Functions
64
65 //- No copy construct
67
68 //- No copy assignment
69 void operator=(const filmTurbulenceModel&) = delete;
70
71
72public:
73
74 // Public Enumerations
75
76 //- Options for the friction models
78 {
83 };
84
85 //- Options for the shear stress models
87 {
88 msimple,
90 };
91
92
93protected:
94
95 // Protected Data
96
97 //- Reference to liquidFilmBase
98 const liquidFilmBase& film_;
99
100 //- Names for friction models
102
103 //- Names for shear stress models
105
106 //- Model dictionary
107 const dictionary dict_;
108
109 //- Method used
111
112 //- Shear method used
114
115 //- Name of density field (optional)
117
118 //- Reference density needed for incompressible calculations
119 scalar rhoRef_;
120
121
122public:
123
124 //- Runtime type information
125 TypeName("filmTurbulenceModel");
126
127
128 // Declare runtime constructor selection table
131 (
132 autoPtr,
135 (
137 const dictionary& dict
138 ),
139 (film, dict)
140 );
141
142
143 // Constructors
144
145 //- Construct from type name, dictionary and surface film model
147 (
148 const word& modelType,
150 const dictionary& dict
151 );
152
153
154 // Selectors
155
156 //- Return a reference to the selected injection model
158 (
160 const dictionary& dict
161 );
162
163
164 //- Destructor
165 virtual ~filmTurbulenceModel() = default;
166
167
168 // Member Functions
169
170 // Access
171
172 //- Return film
173 const liquidFilmBase& film() const;
174
175
176 // Turbulence
177
178 //- Return the effective viscous stress (laminar + turbulent)
180
181 //- Return primary region friction
183 (
185 ) const;
186
187 //- Return rho if specified otherwise rhoRef
188 tmp<volScalarField> rho() const;
189
190 //- Return the wall film surface friction
191 virtual tmp<areaScalarField> Cw() const;
192
193 //- Return the film turbulence viscosity
194 virtual tmp<areaScalarField> mut() const = 0;
195
196
197 // Evaluation
198
199 //- Correct/update the model
200 virtual void correct() = 0;
201
202 //- Return the source for the film momentum equation
203 virtual tmp<faVectorMatrix> Su(areaVectorField& U) const = 0;
204};
205
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209} // End namespace areaSurfaceFilmModels
210} // End namespace regionModels
211} // End namespace Foam
212
213// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214
215#endif
216
217// ************************************************************************* //
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:61
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
scalar rhoRef_
Reference density needed for incompressible calculations.
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)
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:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
zeroField Su
Definition: alphaSuSp.H:1
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#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:73