WALE.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) 2015-2021 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::LESModels::WALE
26 
27 Description
28  The Wall-adapting local eddy-viscosity (WALE) SGS model.
29 
30  Reference:
31  \verbatim
32  Nicoud, F., & Ducros, F. (1999).
33  Subgrid-scale stress modelling based on the square of the velocity
34  gradient tensor.
35  Flow, Turbulence and Combustion, 62(3), 183-200.
36  \endverbatim
37 
38  The default model coefficients are
39  \verbatim
40  WALECoeffs
41  {
42  Ck 0.094;
43  Ce 1.048;e
44  Cw 0.325;
45  }
46  \endverbatim
47 
48 See also
49  Foam::LESModels::Smagorinsky
50 
51 SourceFiles
52  WALE.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef WALE_H
57 #define WALE_H
58 
59 #include "LESModel.H"
60 #include "LESeddyViscosity.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 namespace LESModels
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class WALE Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 template<class BasicMomentumTransportModel>
74 class WALE
75 :
76  public LESeddyViscosity<BasicMomentumTransportModel>
77 {
78 protected:
79 
80  // Protected data
81 
84 
85 
86  // Protected Member Functions
87 
88  //- Return the deviatoric symmetric part of the square of the given
89  // velocity gradient field
90  tmp<volSymmTensorField> Sd(const volTensorField& gradU) const;
91 
92  //- Return SGS kinetic energy
93  // calculated from the given velocity gradient
94  tmp<volScalarField> k(const volTensorField& gradU) const;
95 
96  //- Update the SGS eddy-viscosity
97  virtual void correctNut();
98 
99 
100 public:
102  typedef typename BasicMomentumTransportModel::alphaField alphaField;
103  typedef typename BasicMomentumTransportModel::rhoField rhoField;
104 
105 
106  //- Runtime type information
107  TypeName("WALE");
108 
109 
110  // Constructors
111 
112  //- Construct from components
113  WALE
114  (
115  const alphaField& alpha,
116  const rhoField& rho,
117  const volVectorField& U,
118  const surfaceScalarField& alphaRhoPhi,
119  const surfaceScalarField& phi,
120  const viscosity& viscosity,
121  const word& type = typeName
122  );
123 
124  //- Disallow default bitwise copy construction
125  WALE(const WALE&) = delete;
126 
127 
128  //- Destructor
129  virtual ~WALE()
130  {}
131 
132 
133  // Member Functions
134 
135  //- Read model coefficients if they have changed
136  virtual bool read();
137 
138  //- Return SGS kinetic energy
139  virtual tmp<volScalarField> k() const
140  {
141  return k(fvc::grad(this->U_));
142  }
143 
144  //- Return sub-grid disipation rate
145  virtual tmp<volScalarField> epsilon() const;
146 
147  //- Correct Eddy-Viscosity and related properties
148  virtual void correct();
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const WALE&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace LESModels
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #ifdef NoRepository
166  #include "WALE.C"
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
virtual bool read()
Read model coefficients if they have changed.
Definition: WALE.C:145
Eddy viscosity LES SGS model base class.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcGrad.C:52
U
Definition: pEqn.H:72
virtual ~WALE()
Destructor.
Definition: WALE.H:128
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
virtual tmp< volScalarField > epsilon() const
Return sub-grid disipation rate.
Definition: WALE.C:162
virtual void correctNut()
Update the SGS eddy-viscosity.
Definition: WALE.C:82
tmp< volSymmTensorField > Sd(const volTensorField &gradU) const
Return the deviatoric symmetric part of the square of the given.
Definition: WALE.C:41
BasicMomentumTransportModel::rhoField rhoField
Definition: WALE.H:102
A class for handling words, derived from string.
Definition: word.H:59
TypeName("WALE")
Runtime type information.
void operator=(const WALE &)=delete
Disallow default bitwise assignment.
phi
Definition: correctPhi.H:3
dimensionedScalar Cw_
Definition: WALE.H:82
dimensionedScalar Ck_
Definition: WALE.H:81
WALE(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
Definition: WALE.C:94
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
The Wall-adapting local eddy-viscosity (WALE) SGS model.
Definition: WALE.H:73
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
virtual void correct()
Correct Eddy-Viscosity and related properties.
Definition: WALE.C:175
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volScalarField > k() const
Return SGS kinetic energy.
Definition: WALE.H:138
Namespace for OpenFOAM.
BasicMomentumTransportModel::alphaField alphaField
Definition: WALE.H:101