multiphaseStabilizedTurbulence.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2019-2020 OpenCFD Ltd
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::fv::multiphaseStabilizedTurbulence
28 
29 Group
30  grpFvOptionsSources
31 
32 Description
33  Applies corrections to the turbulent kinetic energy equation (i.e. \c k)
34  and turbulent viscosity field (i.e. \c nut) for incompressible multiphase
35  flow cases.
36 
37  Turbulent kinetic energy is over-predicted in VOF solvers at the phase
38  interface and throughout the water column in nearly-potential flow regions
39  beneath surface waves.
40 
41  References:
42  \verbatim
43  Buoyancy source term in turbulent kinetic energy equation:
44  Devolder, B., Rauwoens, P., and Troch, P. (2017).
45  Application of a buoyancy-modified k-w SST turbulence model to
46  simulate wave run-up around a monopile subjected to regular waves
47  using OpenFOAM.
48  Coastal Engineering, 125, 81-94.
49  DOI:10.1016/j.coastaleng.2017.04.004
50 
51  Correction to turbulent viscosity:
52  Larsen, B.E. and Fuhrman, D.R. (2018).
53  On the over-production of turbulence beneath surface waves in
54  Reynolds-averaged Navier-Stokes models
55  J. Fluid Mech, 853, 419-460.
56  DOI:10.1017/jfm.2018.577
57  \endverbatim
58 
59  Sources applied to:
60  \verbatim
61  k | Turbulent kinetic energy [m2/s2]
62  nut | Turbulent viscosity [m/s2]
63  \endverbatim
64 
65  Required fields:
66  \verbatim
67  epsilon | Turbulent kinetic energy dissipation rate [m2/s3]
68  k | Turbulent kinetic energy [m2/s2]
69  nut | Turbulent viscosity [m/s2]
70  \endverbatim
71 
72 Usage
73  Minimal example by using \c constant/fvOptions:
74  \verbatim
75  multiphaseStabilizedTurbulence1
76  {
77  // Mandatory entries (unmodifiable)
78  type multiphaseStabilizedTurbulence;
79 
80  // Optional entries (unmodifiable)
81  rho <rhoName>;
82  Cmu 0.09; // from k-epsilon model
83  C 1.51; // from k-omega model
84  lambda2 0.1; // A value of 0 sets the nut correction to 0
85  alpha 1.36; // 1/Prt
86 
87  // Mandatory/Optional (inherited) entries
88  ...
89  }
90  \endverbatim
91 
92  where the entries mean:
93  \table
94  Property | Description | Type | Reqd | Dflt
95  type | Type name: multiphaseStabilizedTurbulence | word | yes | -
96  rho | Name of operand density field | word | yes | rho
97  Cmu | Model coefficient | scalar | no | 0.09
98  C | Model coefficient | scalar | no | 1.51
99  lambda2 | Ratio of nut correction | scalar | no | 0.1
100  alpha | Inverse of turbulent Prandtl number | scalar | no | 1.36
101  \endtable
102 
103  The inherited entries are elaborated in:
104  - \link fvOption.H \endlink
105 
106 Note
107  - The model C coefficient for the k-epsilon model equates to C2/C1 = 1.33;
108  the (default) value of 1.51 comes from the k-omega model and is more
109  conservative.
110  - Only applicable to epsilon-based turbulence closure models.
111 
112 SourceFiles
113  multiphaseStabilizedTurbulence.C
114 
115 \*---------------------------------------------------------------------------*/
116 
117 #ifndef fv_multiphaseStabilizedTurbulence_H
118 #define fv_multiphaseStabilizedTurbulence_H
119 
120 #include "fvOption.H"
121 #include "dimensionedScalar.H"
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 namespace Foam
126 {
127 namespace fv
128 {
129 
130 /*---------------------------------------------------------------------------*\
131  Class multiphaseStabilizedTurbulence Declaration
132 \*---------------------------------------------------------------------------*/
133 
134 class multiphaseStabilizedTurbulence
135 :
136  public fv::option
137 {
138  // Private Data
139 
140  //- Name of density field
141  const word rhoName_;
142 
143 
144  // Model coefficients
145 
146  //- k-epsilon model Cmu coefficient
147  dimensionedScalar Cmu_;
148 
149  //- Model coefficient
150  // For k-epsilon models this equates to C2/C1 = 1.33 and for
151  // k-omega = 1.51. Here the default is the more conservative 1.51
153 
154  //- lambda2 coefficient; default = 0.1
155  dimensionedScalar lambda2_;
156 
157  //- Buoyancy coefficient
158  dimensionedScalar alpha_;
159 
160 
161 public:
162 
163  //- Runtime type information
164  TypeName("multiphaseStabilizedTurbulence");
165 
166 
167  // Constructors
168 
169  //- Construct from explicit source name and mesh
171  (
172  const word& sourceName,
173  const word& modelType,
174  const dictionary& dict,
175  const fvMesh& mesh
176  );
177 
178  //- No copy construct
180  (
182  ) = delete;
183 
184  //- No copy assignment
185  void operator=(const multiphaseStabilizedTurbulence&) = delete;
186 
187 
188  //- Destructor
189  virtual ~multiphaseStabilizedTurbulence() = default;
190 
191 
192  // Member Functions
193 
194  //- Add explicit contribution to compressible k equation
195  virtual void addSup
196  (
197  const volScalarField& rho,
198  fvMatrix<scalar>& eqn,
199  const label fieldi
200  );
201 
202  //- Add explicit contribution to incompressible k equation
203  virtual void addSup
204  (
205  fvMatrix<scalar>& eqn,
206  const label fieldi
207  );
208 
209  //- Correct the turbulent viscosity
210  virtual void correct(volScalarField& field);
211 
212  //- Read source dictionary
213  virtual bool read(const dictionary& dict)
214  {
215  return true;
216  }
217 };
218 
219 
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221 
222 } // End namespace fv
223 } // End namespace Foam
224 
225 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226 
227 #endif
228 
229 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fv::multiphaseStabilizedTurbulence
Applies corrections to the turbulent kinetic energy equation (i.e. k) and turbulent viscosity field (...
Definition: multiphaseStabilizedTurbulence.H:175
Foam::fv::multiphaseStabilizedTurbulence::~multiphaseStabilizedTurbulence
virtual ~multiphaseStabilizedTurbulence()=default
Destructor.
Foam::fv::multiphaseStabilizedTurbulence::TypeName
TypeName("multiphaseStabilizedTurbulence")
Runtime type information.
rho
rho
Definition: readInitialConditions.H:88
Foam::fv::multiphaseStabilizedTurbulence::read
virtual bool read(const dictionary &dict)
Read source dictionary.
Definition: multiphaseStabilizedTurbulence.H:254
Foam::fv::option
Base abstract class for handling finite volume options (i.e. fvOption).
Definition: fvOption.H:126
Foam::fv::multiphaseStabilizedTurbulence::operator=
void operator=(const multiphaseStabilizedTurbulence &)=delete
No copy assignment.
Foam::fv::multiphaseStabilizedTurbulence::multiphaseStabilizedTurbulence
multiphaseStabilizedTurbulence(const word &sourceName, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from explicit source name and mesh.
Definition: multiphaseStabilizedTurbulence.C:53
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
field
rDeltaTY field()
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fv::multiphaseStabilizedTurbulence::correct
virtual void correct(volScalarField &field)
Correct the turbulent viscosity.
Definition: multiphaseStabilizedTurbulence.C:196
Foam::dimensioned< scalar >
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
dimensionedScalar.H
Foam::fv::multiphaseStabilizedTurbulence::addSup
virtual void addSup(const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
Add explicit contribution to compressible k equation.
Definition: multiphaseStabilizedTurbulence.C:133
Foam::fv::option::mesh
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
fvOption.H
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::GeometricField< scalar, fvPatchField, volMesh >