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 ("libcompressibleVoFTurbulenceDamping.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 compressibleTwoPhaseMixture;
85 class interfaceProperties;
86 class compressibleMomentumTransportModel;
87 
88 namespace fv
89 {
90 
91 /*---------------------------------------------------------------------------*\
92  Class VoFTurbulenceDamping Declaration
93 \*---------------------------------------------------------------------------*/
94 
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 compressibleTwoPhaseMixture& mixture_;
113 
114  //- Reference to the interface properties
115  const interfaceProperties& interface_;
116 
117  //- Reference to the mixture turbulence model
118  const compressibleMomentumTransportModel& 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  const volScalarField& rho,
161  fvMatrix<scalar>& eqn,
162  const word& fieldName
163  ) const;
164 
165  //- Add explicit contribution to phase epsilon or omega equation
166  virtual void addSup
167  (
168  const volScalarField& alpha,
169  const volScalarField& rho,
170  fvMatrix<scalar>& eqn,
171  const word& fieldName
172  ) const;
173 
174 
175  // Mesh changes
176 
177  //- Update topology using the given map
178  virtual void topoChange(const polyTopoChangeMap&);
179 
180  //- Update from another mesh using the given map
181  virtual void mapMesh(const polyMeshMap&);
182 
183  //- Redistribute or update using the given distribution map
184  virtual void distribute(const polyDistributionMap&);
185 
186  //- Update for mesh motion
187  virtual bool movePoints();
188 
189 
190  // Member Operators
191 
192  //- Disallow default bitwise assignment
193  void operator=(const VoFTurbulenceDamping&) = delete;
194 };
195 
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 } // End namespace fv
200 } // End namespace Foam
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 #endif
205 
206 // ************************************************************************* //
dictionary dict
virtual bool movePoints()
Update for mesh motion.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
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))
Finite volume model abstract base class.
Definition: fvModel.H:57
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
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Contains the interface properties.
void operator=(const VoFTurbulenceDamping &)=delete
Disallow default bitwise assignment.
Free-surface turbulence damping function.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:72
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.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
Thermophysical properties class for a mixture of two rhoThermo including interfaceProperties for VoF ...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:50
Base class for single-phase compressible turbulence models.
Namespace for OpenFOAM.