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 compressible::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  // Checks
150 
151  //- Return the list of fields for which the option adds source term
152  // to the transport equation
153  virtual wordList addSupFields() const;
154 
155 
156  // Sources
157 
158  //- Add explicit contribution to epsilon or omega equation
159  virtual void addSup
160  (
161  const volScalarField& rho,
162  const volScalarField& field,
163  fvMatrix<scalar>& eqn
164  ) const;
165 
166  //- Add explicit contribution to phase epsilon or omega equation
167  virtual void addSup
168  (
169  const volScalarField& alpha,
170  const volScalarField& rho,
171  const volScalarField& field,
172  fvMatrix<scalar>& eqn
173  ) const;
174 
175 
176  // Mesh changes
177 
178  //- Update topology using the given map
179  virtual void topoChange(const polyTopoChangeMap&);
180 
181  //- Update from another mesh using the given map
182  virtual void mapMesh(const polyMeshMap&);
183 
184  //- Redistribute or update using the given distribution map
185  virtual void distribute(const polyDistributionMap&);
186 
187  //- Update for mesh motion
188  virtual bool movePoints();
189 
190 
191  // Member Operators
192 
193  //- Disallow default bitwise assignment
194  void operator=(const VoFTurbulenceDamping&) = delete;
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace compressible
201 } // End namespace fv
202 } // End namespace Foam
203 
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 
206 #endif
207 
208 // ************************************************************************* //
Generic GeometricField class.
Base class for single-phase compressible turbulence models.
Class to represent a mixture of two rhoFluidThermo-based phases.
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 momentumTransport damping function.
virtual bool movePoints()
Update for mesh motion.
virtual void addSup(const volScalarField &rho, const volScalarField &field, fvMatrix< scalar > &eqn) const
Add explicit contribution to epsilon or omega equation.
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 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