interfaceTurbulenceDamping.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) 2022-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::interfaceTurbulenceDamping
26 
27 Description
28  Free-surface phase 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  interfaceTurbulenceDamping
55  {
56  type interfaceTurbulenceDamping;
57 
58  libs ("libmultiphaseEulerFvModels.so");
59 
60  phase water;
61 
62  // Interface turbulence damping length scale
63  // This is a required input as described in section 3.3 of the paper
64  delta 1e-4;
65  }
66  \endverbatim
67 
68 SourceFiles
69  interfaceTurbulenceDamping.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef interfaceTurbulenceDamping_H
74 #define interfaceTurbulenceDamping_H
75 
76 #include "fvModel.H"
77 #include "phaseSystem.H"
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 namespace Foam
83 {
84 namespace fv
85 {
86 
87 /*---------------------------------------------------------------------------*\
88  Class interfaceTurbulenceDamping Declaration
89 \*---------------------------------------------------------------------------*/
90 
92 :
93  public fvModel
94 {
95  // Private Data
96 
97  //- The name of the phase
98  word phaseName_;
99 
100  //- Field name
101  word fieldName_;
102 
103  //- Interface turbulence damping length scale
104  // This is a required input as described in section 3.3 of the paper
105  dimensionedScalar delta_;
106 
107  //- Reference to the phase
108  const phaseModel& phase_;
109 
110  //- Reference to the mixture turbulence model
112 
113  // Turbulence model coefficients
114 
115  dimensionedScalar C2_;
116  dimensionedScalar betaStar_;
117  dimensionedScalar beta_;
118 
119 
120  // Private Member Functions
121 
122  //- Interface fraction in a cell
123  tmp<volScalarField::Internal> interfaceFraction
124  (
125  const volScalarField& alpha
126  ) const;
127 
128  //- Add explicit contribution to incompressible or compressible
129  // mixture epsilon or omega equation
130  template<class RhoType>
131  void addRhoSup
132  (
133  const RhoType& rho,
134  const volScalarField& field,
135  fvMatrix<scalar>& eqn
136  ) const;
137 
138 
139 public:
140 
141  //- Runtime type information
142  TypeName("interfaceTurbulenceDamping");
143 
144 
145  // Constructors
146 
147  //- Construct from explicit source name and mesh
149  (
150  const word& sourceName,
151  const word& modelType,
152  const fvMesh& mesh,
153  const dictionary& dict
154  );
155 
156  //- Disallow default bitwise copy construction
158  (
160  ) = delete;
161 
162 
163  // Member Functions
164 
165  // Checks
166 
167  //- Return the list of fields for which the option adds source term
168  // to the transport equation
169  virtual wordList addSupFields() const;
170 
171 
172  // Sources
173 
174  //- Add source to mixture epsilon or omega equation
175  virtual void addSup
176  (
177  const volScalarField& field,
178  fvMatrix<scalar>& eqn
179  ) const;
180 
181  //- Add source to compressible mixture epsilon or omega equation
182  virtual void addSup
183  (
184  const volScalarField& rho,
185  const volScalarField& field,
186  fvMatrix<scalar>& eqn
187  ) const;
188 
189  //- Add source to phase epsilon or omega equation
190  virtual void addSup
191  (
192  const volScalarField& alpha,
193  const volScalarField& rho,
194  const volScalarField& field,
195  fvMatrix<scalar>& eqn
196  ) const;
197 
198 
199  // Mesh changes
200 
201  //- Update topology using the given map
202  virtual void topoChange(const polyTopoChangeMap&);
203 
204  //- Update from another mesh using the given map
205  virtual void mapMesh(const polyMeshMap&);
206 
207  //- Redistribute or update using the given distribution map
208  virtual void distribute(const polyDistributionMap&);
209 
210  //- Update for mesh motion
211  virtual bool movePoints();
212 
213 
214  // Member Operators
215 
216  //- Disallow default bitwise assignment
217  void operator=(const interfaceTurbulenceDamping&) = delete;
218 };
219 
220 
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222 
223 } // End namespace fv
224 } // End namespace Foam
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 #endif
229 
230 // ************************************************************************* //
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 phase turbulence damping function.
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
void operator=(const interfaceTurbulenceDamping &)=delete
Disallow default bitwise assignment.
virtual void addSup(const volScalarField &field, fvMatrix< scalar > &eqn) const
Add source to mixture 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.
TypeName("interfaceTurbulenceDamping")
Runtime type information.
interfaceTurbulenceDamping(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
Templated abstract base class for multiphase compressible turbulence models.
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 managing temporary objects.
Definition: tmp.H:55
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