VoFTurbulenceDamping.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2021-2022 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 Class
25  Foam::fv::VoFTurbulenceDamping
26 
27 Description
28  Free-surface turbulence damping function
29 
30  Adds an extra source term to the mixture or phase epsilon or omega
31  equation to reduce turbulence generated near a free-surface. The
32  implementation is based on
33 
34  Reference:
35  \verbatim
36  Frederix, E. M. A., Mathur, A., Dovizio, D., Geurts, B. J.,
37  & Komen, E. M. J. (2018).
38  Reynolds-averaged modeling of turbulence damping
39  near a large-scale interface in two-phase flow.
40  Nuclear engineering and design, 333, 122-130.
41  \endverbatim
42 
43  but with an improved formulation for the coefficient \c A appropriate for
44  unstructured meshes including those with split-cell refinement patterns.
45  However the dimensioned length-scale coefficient \c delta remains and must
46  be set appropriately for the case by performing test runs and comparing with
47  known results. Clearly this model is far from general and more research is
48  needed in order that \c delta can be obtained directly from the interface
49  flow and turbulence conditions.
50 
51 Usage
52  Example usage:
53  \verbatim
54  VoFTurbulenceDamping
55  {
56  type VoFTurbulenceDamping;
57 
58  libs ("libVoFTurbulenceDamping.so");
59 
60  // Interface turbulence damping length scale
61  // This is a required input as described in section 3.3 of the paper
62  delta 1e-4;
63 
64  // phase water; // Optional phase name
65  }
66  \endverbatim
67 
68 SourceFiles
69  VoFTurbulenceDamping.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef VoFTurbulenceDamping_H
74 #define VoFTurbulenceDamping_H
75 
76 #include "fvModel.H"
77 #include "volFields.H"
78 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80 
81 namespace Foam
82 {
83 
84 class incompressibleTwoPhaseMixture;
85 class interfaceProperties;
86 class incompressibleMomentumTransportModel;
87 
88 namespace fv
89 {
90 
91 /*---------------------------------------------------------------------------*\
92  Class VoFTurbulenceDamping Declaration
93 \*---------------------------------------------------------------------------*/
94 
95 class VoFTurbulenceDamping
96 :
97  public fvModel
98 {
99  // Private Data
100 
101  //- The name of the Lagrangian phase
102  word phaseName_;
103 
104  //- Field name
105  word fieldName_;
106 
107  //- Interface turbulence damping length scale
108  // This is a required input as described in section 3.3 of the paper
109  dimensionedScalar delta_;
110 
111  //- Reference to the mixture properties
112  const incompressibleTwoPhaseMixture& mixture_;
113 
114  //- Reference to the interface properties
115  const interfaceProperties& interface_;
116 
117  //- Reference to the mixture turbulence model
118  const incompressibleMomentumTransportModel& turbulence_;
119 
120  // Turbulence model coefficients
121 
122  dimensionedScalar C2_;
123  dimensionedScalar betaStar_;
124  dimensionedScalar beta_;
125 
126 
127 public:
128 
129  //- Runtime type information
130  TypeName("VoFTurbulenceDamping");
131 
132 
133  // Constructors
134 
135  //- Construct from explicit source name and mesh
137  (
138  const word& sourceName,
139  const word& modelType,
140  const dictionary& dict,
141  const fvMesh& mesh
142  );
143 
144  //- Disallow default bitwise copy construction
146  (
147  const VoFTurbulenceDamping&
148  ) = delete;
149 
150 
151  // Member Functions
152 
153  //- Return the list of fields for which the option adds source term
154  // to the transport equation
155  virtual wordList addSupFields() const;
156 
157  //- Add explicit contribution to epsilon or omega equation
158  virtual void addSup
159  (
160  fvMatrix<scalar>& eqn,
161  const word& fieldName
162  ) const;
163 
164  //- Add explicit contribution to phase epsilon or omega equation
165  virtual void addSup
166  (
167  const volScalarField& alpha,
168  const volScalarField& rho,
169  fvMatrix<scalar>& eqn,
170  const word& fieldName
171  ) const;
172 
173 
174  // Mesh changes
175 
176  //- Update topology using the given map
177  virtual void topoChange(const polyTopoChangeMap&);
178 
179  //- Update from another mesh using the given map
180  virtual void mapMesh(const polyMeshMap&);
181 
182  //- Redistribute or update using the given distribution map
183  virtual void distribute(const polyDistributionMap&);
184 
185  //- Update for mesh motion
186  virtual bool movePoints();
187 
188 
189  // Member Operators
190 
191  //- Disallow default bitwise assignment
192  void operator=(const VoFTurbulenceDamping&) = delete;
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace fv
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #endif
204 
205 // ************************************************************************* //
dictionary dict
virtual bool movePoints()
Update for mesh motion.
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const word &fieldName) const
Add explicit contribution to epsilon or omega equation.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
TypeName("VoFTurbulenceDamping")
Runtime type information.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
VoFTurbulenceDamping(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
labelList fv(nPoints)
void operator=(const VoFTurbulenceDamping &)=delete
Disallow default bitwise assignment.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
List< word > wordList
A List of words.
Definition: fileName.H:54
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
Namespace for OpenFOAM.