v2f.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) 2012-2018 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::RASModels::v2f
26 
27 Description
28  Lien and Kalitzin's v2-f turbulence model for incompressible and
29  compressible flows, with a limit imposed on the turbulent viscosity given
30  by Davidson et al.
31 
32  The model solves for turbulence kinetic energy k and turbulence dissipation
33  rate epsilon, with additional equations for the turbulence stress normal to
34  streamlines, v2, and elliptic damping function, f.
35 
36  The variant implemented employs N=6, such that f=0 on walls.
37 
38  Wall boundary conditions are:
39 
40  k = kLowReWallFunction
41  epsilon = epsilonWallFunction
42  v2 = v2WallFunction
43  f = fWallFunction
44 
45  These are applicable to both low- and high-Reynolds number flows.
46 
47  Inlet values can be approximated by:
48 
49  v2 = 2/3 k
50  f = zero-gradient
51 
52  References:
53  \verbatim
54  Lien, F. S., & Kalitzin, G. (2001).
55  Computations of transonic flow with the v2f turbulence model.
56  International Journal of Heat and Fluid Flow, 22(1), 53-61.
57 
58  Davidson, L., Nielsen, P., & Sveningsson, A. (2003).
59  Modifications of the v2-f model for computing the flow in a
60  3D wall jet.
61  Turbulence, Heat and Mass Transfer, 4, 577-584
62  \endverbatim
63 
64  The default model coefficients are
65  \verbatim
66  v2fCoeffs
67  {
68  Cmu 0.22;
69  CmuKEps 0.09;
70  C1 1.4;
71  C2 0.3;
72  CL 0.23;
73  Ceta 70;
74  Ceps2 1.9;
75  Ceps3 -0.33;
76  sigmaEps 1.3;
77  sigmaK 1;
78  }
79  \endverbatim
80 
81 Note
82  If the kLowReWallFunction is employed, a velocity variant of the turbulent
83  viscosity wall function should be used, e.g. nutUWallFunction. Turbulence
84  k variants (nutk...) for this case will not behave correctly.
85 
86 See also
87  Foam::RASModels::v2fBase
88  Foam::RASModels::kEpsilon
89  Foam::kLowReWallFunctionFvPatchScalarField
90  Foam::epsilonWallFunctionFvPatchScalarField
91  Foam::v2WallFunctionFvPatchScalarField
92  Foam::fWallFunctionFvPatchScalarField
93 
94 SourceFiles
95  v2f.C
96 
97 \*---------------------------------------------------------------------------*/
98 
99 #ifndef v2f_H
100 #define v2f_H
101 
102 #include "v2fBase.H"
103 #include "RASModel.H"
104 #include "eddyViscosity.H"
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 namespace Foam
109 {
110 namespace RASModels
111 {
112 
113 /*---------------------------------------------------------------------------*\
114  Class v2f Declaration
115 \*---------------------------------------------------------------------------*/
116 
117 template<class BasicTurbulenceModel>
118 class v2f
119 :
120  public eddyViscosity<RASModel<BasicTurbulenceModel>>,
121  public v2fBase
122 {
123 
124 protected:
125 
126  // Protected data
127 
128  // Model coefficients
140 
141 
142  // Fields
143 
144  //- Turbulence kinetic energy
146 
147  //- Turbulence dissipation
149 
150  //- Turbulence stress normal to streamlines
152 
153  //- Damping function
155 
156 
157  // Bounding values
161 
162 
163  // Protected Member Functions
164 
165  virtual void correctNut();
166 
167  //- Return time scale, Ts
168  tmp<volScalarField> Ts() const;
169 
170  //- Return length scale, Ls
171  tmp<volScalarField> Ls() const;
172 
173 
174 public:
176  typedef typename BasicTurbulenceModel::alphaField alphaField;
177  typedef typename BasicTurbulenceModel::rhoField rhoField;
178  typedef typename BasicTurbulenceModel::transportModel transportModel;
179 
180 
181  //- Runtime type information
182  TypeName("v2f");
183 
184 
185  // Constructors
186 
187  //- Construct from components
188  v2f
189  (
190  const alphaField& alpha,
191  const rhoField& rho,
192  const volVectorField& U,
193  const surfaceScalarField& alphaRhoPhi,
194  const surfaceScalarField& phi,
195  const transportModel& transport,
196  const word& propertiesName = turbulenceModel::propertiesName,
197  const word& type = typeName
198  );
199 
200 
201  //- Destructor
202  virtual ~v2f()
203  {}
204 
205 
206  // Member Functions
207 
208  //- Read RASProperties dictionary
209  virtual bool read();
210 
211  //- Return the effective diffusivity for k
212  tmp<volScalarField> DkEff() const
213  {
214  return tmp<volScalarField>
215  (
216  new volScalarField
217  (
218  "DkEff",
219  this->nut_/sigmaK_ + this->nu()
220  )
221  );
222  }
223 
224  //- Return the effective diffusivity for epsilon
226  {
227  return tmp<volScalarField>
228  (
229  new volScalarField
230  (
231  "DepsilonEff",
232  this->nut_/sigmaEps_ + this->nu()
233  )
234  );
235  }
236 
237  //- Return the turbulence kinetic energy
238  virtual tmp<volScalarField> k() const
239  {
240  return k_;
241  }
242 
243  //- Return the turbulence kinetic energy dissipation rate
244  virtual tmp<volScalarField> epsilon() const
245  {
246  return epsilon_;
247  }
248 
249  //- Return turbulence stress normal to streamlines
250  virtual tmp<volScalarField> v2() const
251  {
252  return v2_;
253  }
254 
255  //- Return the damping function
256  virtual tmp<volScalarField> f() const
257  {
258  return f_;
259  }
260 
261  //- Solve the turbulence equations and correct the turbulence viscosity
262  virtual void correct();
263 };
264 
265 
266 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
267 
268 } // End namespace RASModels
269 } // End namespace Foam
270 
271 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
272 
273 #ifdef NoRepository
274  #include "v2f.C"
275 #endif
276 
277 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
278 
279 #endif
280 
281 // ************************************************************************* //
dimensionedScalar v2Min_
Definition: v2f.H:158
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: v2f.H:237
surfaceScalarField & phi
dimensionedScalar sigmaEps_
Definition: v2f.H:138
dimensionedScalar Ceta_
Definition: v2f.H:134
dimensionedScalar C1_
Definition: v2f.H:131
volScalarField k_
Turbulence kinetic energy.
Definition: v2f.H:144
dimensionedScalar Ceps3_
Definition: v2f.H:136
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:49
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: v2f.H:243
dimensionedScalar CL_
Definition: v2f.H:133
tmp< volScalarField > Ls() const
Return length scale, Ls.
Definition: v2f.C:47
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Abstract base-class for v2-f models to provide BCs access to the v2 and f fields. ...
Definition: v2fBase.H:54
volScalarField v2_
Turbulence stress normal to streamlines.
Definition: v2f.H:150
dimensionedScalar fMin_
Definition: v2f.H:159
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
Definition: word.H:59
virtual ~v2f()
Destructor.
Definition: v2f.H:201
virtual tmp< volScalarField > v2() const
Return turbulence stress normal to streamlines.
Definition: v2f.H:249
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: v2f.C:276
dimensionedScalar CmuKEps_
Definition: v2f.H:130
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: v2f.H:211
v2f(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName, const word &type=typeName)
Construct from components.
Definition: v2f.C:70
virtual void correctNut()
Definition: v2f.C:56
BasicTurbulenceModel::transportModel transportModel
Definition: v2f.H:177
volScalarField f_
Damping function.
Definition: v2f.H:153
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:481
TypeName("v2f")
Runtime type information.
dimensionedScalar Cmu_
Definition: v2f.H:129
BasicTurbulenceModel::rhoField rhoField
Definition: v2f.H:176
U
Definition: pEqn.H:72
virtual tmp< volScalarField > f() const
Return the damping function.
Definition: v2f.H:255
Lien and Kalitzin&#39;s v2-f turbulence model for incompressible and compressible flows, with a limit imposed on the turbulent viscosity given by Davidson et al.
Definition: v2f.H:117
virtual bool read()
Read RASProperties dictionary.
Definition: v2f.C:251
BasicTurbulenceModel::alphaField alphaField
Definition: v2f.H:175
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: v2f.H:224
A class for managing temporary objects.
Definition: PtrList.H:53
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
dimensionedScalar C2_
Definition: v2f.H:132
dimensionedScalar Ceps2_
Definition: v2f.H:135
volScalarField & nu
volScalarField epsilon_
Turbulence dissipation.
Definition: v2f.H:147
dimensionedScalar sigmaK_
Definition: v2f.H:137
Namespace for OpenFOAM.
tmp< volScalarField > Ts() const
Return time scale, Ts.
Definition: v2f.C:40