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-2023 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  // Interface turbulence damping length scale
59  // This is a required input as described in section 3.3 of the paper
60  delta 1e-4;
61 
62  // phase water; // Optional phase name
63  }
64  \endverbatim
65 
66 SourceFiles
67  VoFTurbulenceDamping.C
68 
69 \*---------------------------------------------------------------------------*/
70 
71 #ifndef VoFTurbulenceDamping_H
72 #define VoFTurbulenceDamping_H
73 
74 #include "fvModel.H"
75 #include "volFields.H"
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 namespace Foam
80 {
81 
82 class incompressibleTwoPhaseVoFMixture;
83 class incompressibleMomentumTransportModel;
84 
85 namespace fv
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class VoFTurbulenceDamping Declaration
90 \*---------------------------------------------------------------------------*/
91 
93 :
94  public fvModel
95 {
96  // Private Data
97 
98  //- The name of the VoF phase
99  word phaseName_;
100 
101  //- Field name
102  word fieldName_;
103 
104  //- Interface turbulence damping length scale
105  // This is a required input as described in section 3.3 of the paper
106  dimensionedScalar delta_;
107 
108  //- Reference to the mixture properties
109  const incompressibleTwoPhaseVoFMixture& mixture_;
110 
111  //- Reference to the mixture turbulence model
112  const incompressibleMomentumTransportModel& turbulence_;
113 
114  // Turbulence model coefficients
115 
116  dimensionedScalar C2_;
117  dimensionedScalar betaStar_;
118  dimensionedScalar beta_;
119 
120 
121 public:
122 
123  //- Runtime type information
124  TypeName("VoFTurbulenceDamping");
125 
126 
127  // Constructors
128 
129  //- Construct from explicit source name and mesh
131  (
132  const word& sourceName,
133  const word& modelType,
134  const fvMesh& mesh,
135  const dictionary& dict
136  );
137 
138  //- Disallow default bitwise copy construction
140  (
141  const VoFTurbulenceDamping&
142  ) = delete;
143 
144 
145  // Member Functions
146 
147  // Checks
148 
149  //- Return the list of fields for which the option adds source term
150  // to the transport equation
151  virtual wordList addSupFields() const;
152 
153 
154  // Sources
155 
156  //- Add explicit contribution to epsilon or omega equation
157  virtual void addSup
158  (
159  const volScalarField& field,
160  fvMatrix<scalar>& eqn
161  ) const;
162 
163  //- Add explicit contribution to phase epsilon or omega equation
164  virtual void addSup
165  (
166  const volScalarField& alpha,
167  const volScalarField& rho,
168  const volScalarField& field,
169  fvMatrix<scalar>& eqn
170  ) const;
171 
172 
173  // Mesh changes
174 
175  //- Update topology using the given map
176  virtual void topoChange(const polyTopoChangeMap&);
177 
178  //- Update from another mesh using the given map
179  virtual void mapMesh(const polyMeshMap&);
180 
181  //- Redistribute or update using the given distribution map
182  virtual void distribute(const polyDistributionMap&);
183 
184  //- Update for mesh motion
185  virtual bool movePoints();
186 
187 
188  // Member Operators
189 
190  //- Disallow default bitwise assignment
191  void operator=(const VoFTurbulenceDamping&) = delete;
192 };
193 
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 } // End namespace fv
198 } // End namespace Foam
199 
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 
202 #endif
203 
204 // ************************************************************************* //
Generic GeometricField class.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Finite volume model abstract base class.
Definition: fvModel.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:53
Free-surface turbulence damping function.
virtual bool movePoints()
Update for mesh motion.
TypeName("VoFTurbulenceDamping")
Runtime type information.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
VoFTurbulenceDamping(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual void addSup(const volScalarField &field, fvMatrix< scalar > &eqn) const
Add explicit contribution to epsilon or omega equation.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void operator=(const VoFTurbulenceDamping &)=delete
Disallow default bitwise assignment.
Base class for single-phase incompressible turbulence models.
Class to represent a mixture of two constant density phases.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Definition: word.H:62
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict