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::compressible::VoFTurbulenceDamping
26 
27 Description
28  Free-surface momentumTransport damping function
29 
30  Adds an extra source term to the mixture or phase epsilon or omega
31  equation to reduce momentumTransport 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 momentumTransport 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 momentumTransport conditions.
50 
51 Usage
52  Example usage:
53  \verbatim
54  VoFTurbulenceDamping
55  {
56  type VoFTurbulenceDamping;
57 
58  // Interface momentumTransport 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 compressibleTwoPhaseVoFMixture;
83 class compressibleMomentumTransportModel;
84 
85 namespace fv
86 {
87 namespace compressible
88 {
89 
90 /*---------------------------------------------------------------------------*\
91  Class VoFTurbulenceDamping Declaration
92 \*---------------------------------------------------------------------------*/
93 
95 :
96  public fvModel
97 {
98  // Private Data
99 
100  //- The name of the Lagrangian phase
101  word phaseName_;
102 
103  //- Field name
104  word fieldName_;
105 
106  //- Interface momentumTransport damping length scale
107  // This is a required input as described in section 3.3 of the paper
108  dimensionedScalar delta_;
109 
110  //- Reference to the mixture properties
111  const compressibleTwoPhaseVoFMixture& mixture_;
112 
113  //- Reference to the mixture momentumTransport model
114  const compressibleMomentumTransportModel& momentumTransport_;
115 
116  // Turbulence model coefficients
117 
118  dimensionedScalar C2_;
119  dimensionedScalar betaStar_;
120  dimensionedScalar beta_;
121 
122 
123 public:
124 
125  //- Runtime type information
126  TypeName("compressible::VoFTurbulenceDamping");
127 
128 
129  // Constructors
130 
131  //- Construct from explicit source name and mesh
133  (
134  const word& sourceName,
135  const word& modelType,
136  const fvMesh& mesh,
137  const dictionary& dict
138  );
139 
140  //- Disallow default bitwise copy construction
142  (
143  const VoFTurbulenceDamping&
144  ) = delete;
145 
146 
147  // Member Functions
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  //- Add explicit contribution to epsilon or omega equation
154  virtual void addSup
155  (
156  const volScalarField& rho,
157  fvMatrix<scalar>& eqn,
158  const word& fieldName
159  ) const;
160 
161  //- Add explicit contribution to phase epsilon or omega equation
162  virtual void addSup
163  (
164  const volScalarField& alpha,
165  const volScalarField& rho,
166  fvMatrix<scalar>& eqn,
167  const word& fieldName
168  ) const;
169 
170 
171  // Mesh changes
172 
173  //- Update topology using the given map
174  virtual void topoChange(const polyTopoChangeMap&);
175 
176  //- Update from another mesh using the given map
177  virtual void mapMesh(const polyMeshMap&);
178 
179  //- Redistribute or update using the given distribution map
180  virtual void distribute(const polyDistributionMap&);
181 
182  //- Update for mesh motion
183  virtual bool movePoints();
184 
185 
186  // Member Operators
187 
188  //- Disallow default bitwise assignment
189  void operator=(const VoFTurbulenceDamping&) = delete;
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace compressible
196 } // End namespace fv
197 } // End namespace Foam
198 
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 
201 #endif
202 
203 // ************************************************************************* //
Generic GeometricField class.
Base class for single-phase compressible turbulence models.
Class to represent a mixture of two rhoThermo-based phases.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
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:101
Finite volume model abstract base class.
Definition: fvModel.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
Free-surface momentumTransport 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.
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const word &fieldName) const
Add explicit contribution to epsilon or omega equation.
VoFTurbulenceDamping(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
TypeName("compressible::VoFTurbulenceDamping")
Runtime type information.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void operator=(const VoFTurbulenceDamping &)=delete
Disallow default bitwise assignment.
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