SpalartAllmarasDES.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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
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::SpalartAllmarasDES
26 
27 Group
28  grpDESTurbulence
29 
30 Description
31  SpalartAllmarasDES DES turbulence model for incompressible and
32  compressible flows
33 
34  Reference:
35  \verbatim
36  Spalart, P. R., Jou, W. H., Strelets, M., & Allmaras, S. R. (1997).
37  Comments on the feasibility of LES for wings, and on a hybrid
38  RANS/LES approach.
39  Advances in DNS/LES, 1, 4-8.
40  \endverbatim
41 
42  Including the low Reynolds number correction documented in
43  \verbatim
44  Spalart, P. R., Deck, S., Shur, M.L., Squires, K.D., Strelets, M.Kh,
45  Travin, A. (2006).
46  A new version of detached-eddy simulation, resistant to ambiguous grid
47  densities.
48  Theor. Comput. Fluid Dyn., 20, 181-195.
49  \endverbatim
50 
51 SourceFiles
52  SpalartAllmarasDES.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef SpalartAllmarasDES_H
57 #define SpalartAllmarasDES_H
58 
59 #include "DESModel.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 namespace LESModels
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class SpalartAllmarasDES Declaration
70 \*---------------------------------------------------------------------------*/
71 
72 template<class BasicTurbulenceModel>
74 :
75  public DESModel<BasicTurbulenceModel>
76 {
77  // Private Member Functions
78 
79  // Disallow default bitwise copy construct and assignment
82 
83 
84 protected:
85 
86  // Protected data
87 
88  // Model constants
89 
92 
102 
103 
104  // Low Reynolds number correction
105 
110 
111 
112  // Fields
113 
115 
116  //- Wall distance
117  // Note: different to wall distance in parent RASModel
118  // which is for near-wall cells only
119  const volScalarField& y_;
120 
121 
122  // Protected Member Functions
123 
124  tmp<volScalarField> chi() const;
125 
127 
129  (
130  const volScalarField& chi,
131  const volScalarField& fv1
132  ) const;
133 
135 
136  tmp<volScalarField> Omega(const volTensorField& gradU) const;
137 
139  (
140  const volScalarField& chi,
141  const volScalarField& fv1,
142  const volScalarField& Omega,
143  const volScalarField& dTilda
144  ) const;
145 
147  (
148  const volScalarField& nur,
149  const volScalarField& Omega,
150  const volScalarField& dTilda
151  ) const;
152 
154  (
155  const volScalarField& Omega,
156  const volScalarField& dTilda
157  ) const;
158 
160  (
161  const volScalarField& chi,
162  const volScalarField& fv1
163  ) const;
164 
165  //- Length scale
167  (
168  const volScalarField& chi,
169  const volScalarField& fv1,
170  const volTensorField& gradU
171  ) const;
172 
173  void correctNut(const volScalarField& fv1);
174  virtual void correctNut();
175 
176 
177 public:
178 
179  typedef typename BasicTurbulenceModel::alphaField alphaField;
180  typedef typename BasicTurbulenceModel::rhoField rhoField;
181  typedef typename BasicTurbulenceModel::transportModel transportModel;
182 
183 
184  //- Runtime type information
185  TypeName("SpalartAllmarasDES");
186 
187 
188  // Constructors
189 
190  //- Construct from components
192  (
193  const alphaField& alpha,
194  const rhoField& rho,
195  const volVectorField& U,
196  const surfaceScalarField& alphaRhoPhi,
197  const surfaceScalarField& phi,
198  const transportModel& transport,
199  const word& propertiesName = turbulenceModel::propertiesName,
200  const word& type = typeName
201  );
202 
203 
204  //- Destructor
205  virtual ~SpalartAllmarasDES()
206  {}
207 
208 
209  // Member Functions
210 
211  //- Re-read model coefficients if they have changed
212  virtual bool read();
213 
214  //- Return the effective diffusivity for nuTilda
216 
217  //- Return SGS kinetic energy
218  virtual tmp<volScalarField> k() const;
219 
221  {
222  return nuTilda_;
223  }
224 
225  //- Return the LES field indicator
226  virtual tmp<volScalarField> LESRegion() const;
227 
228  //- Correct nuTilda and related properties
229  virtual void correct();
230 };
231 
232 
233 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 
235 } // End namespace LESModels
236 } // End namespace Foam
237 
238 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
239 
240 #ifdef NoRepository
241 # include "SpalartAllmarasDES.C"
242 #endif
243 
244 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
245 
246 #endif
247 
248 // ************************************************************************* //
Foam::LESModels::SpalartAllmarasDES::Cb2_
dimensionedScalar Cb2_
Definition: SpalartAllmarasDES.H:93
Foam::LESModels::SpalartAllmarasDES::Stilda
tmp< volScalarField > Stilda(const volScalarField &chi, const volScalarField &fv1, const volScalarField &Omega, const volScalarField &dTilda) const
Definition: SpalartAllmarasDES.C:88
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
Foam::LESModels::SpalartAllmarasDES::Cs_
dimensionedScalar Cs_
Definition: SpalartAllmarasDES.H:98
Foam::LESModels::SpalartAllmarasDES::~SpalartAllmarasDES
virtual ~SpalartAllmarasDES()
Destructor.
Definition: SpalartAllmarasDES.H:204
Foam::LESModels::SpalartAllmarasDES::CDES_
dimensionedScalar CDES_
Definition: SpalartAllmarasDES.H:99
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::LESModels::SpalartAllmarasDES::Cw2_
dimensionedScalar Cw2_
Definition: SpalartAllmarasDES.H:95
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::LESModels::SpalartAllmarasDES::DnuTildaEff
tmp< volScalarField > DnuTildaEff() const
Return the effective diffusivity for nuTilda.
Definition: SpalartAllmarasDES.C:446
Foam::LESModels::SpalartAllmarasDES::Ct4_
dimensionedScalar Ct4_
Definition: SpalartAllmarasDES.H:107
Foam::LESModels::SpalartAllmarasDES::Ct3_
dimensionedScalar Ct3_
Definition: SpalartAllmarasDES.H:106
Foam::LESModels::SpalartAllmarasDES::Cw3_
dimensionedScalar Cw3_
Definition: SpalartAllmarasDES.H:96
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::LESModels::SpalartAllmarasDES::fv2
tmp< volScalarField > fv2(const volScalarField &chi, const volScalarField &fv1) const
Definition: SpalartAllmarasDES.C:57
Foam::LESModels::SpalartAllmarasDES::TypeName
TypeName("SpalartAllmarasDES")
Runtime type information.
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:97
Foam::LESModels::SpalartAllmarasDES
SpalartAllmarasDES DES turbulence model for incompressible and compressible flows.
Definition: SpalartAllmarasDES.H:72
Foam::LESModels::SpalartAllmarasDES::r
tmp< volScalarField > r(const volScalarField &nur, const volScalarField &Omega, const volScalarField &dTilda) const
Definition: SpalartAllmarasDES.C:109
Foam::LESModels::DESModel::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: DESModel.H:71
Foam::LESModels::SpalartAllmarasDES::nuTilda_
volScalarField nuTilda_
Definition: SpalartAllmarasDES.H:113
Foam::LESModels::SpalartAllmarasDES::kappa_
dimensionedScalar kappa_
Definition: SpalartAllmarasDES.H:90
Foam::LESModels::SpalartAllmarasDES::operator=
SpalartAllmarasDES & operator=(const SpalartAllmarasDES &)
DESModel.H
U
U
Definition: pEqn.H:46
Foam::LESModels::SpalartAllmarasDES::lowReCorrection_
Switch lowReCorrection_
Definition: SpalartAllmarasDES.H:105
Foam::LESModels::SpalartAllmarasDES::nuTilda
tmp< volScalarField > nuTilda() const
Definition: SpalartAllmarasDES.H:219
Foam::LESModels::SpalartAllmarasDES::chi
tmp< volScalarField > chi() const
Definition: SpalartAllmarasDES.C:38
Foam::LESModels::SpalartAllmarasDES::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: SpalartAllmarasDES.H:180
Foam::LESModels::SpalartAllmarasDES::LESRegion
virtual tmp< volScalarField > LESRegion() const
Return the LES field indicator.
Definition: SpalartAllmarasDES.C:465
Foam::LESModels::SpalartAllmarasDES::fwStar_
dimensionedScalar fwStar_
Definition: SpalartAllmarasDES.H:108
Foam::LESModels::SpalartAllmarasDES::k
virtual tmp< volScalarField > k() const
Return SGS kinetic energy.
Definition: SpalartAllmarasDES.C:456
Foam::LESModels::SpalartAllmarasDES::Cv1_
dimensionedScalar Cv1_
Definition: SpalartAllmarasDES.H:97
Foam::LESModels::SpalartAllmarasDES::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: SpalartAllmarasDES.C:412
Foam::LESModels::SpalartAllmarasDES::Cw1_
dimensionedScalar Cw1_
Definition: SpalartAllmarasDES.H:94
Foam::LESModels::SpalartAllmarasDES::sigmaNut_
dimensionedScalar sigmaNut_
Definition: SpalartAllmarasDES.H:89
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam::LESModels::DESModel::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: DESModel.H:72
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
rho
rho
Definition: pEqn.H:3
Foam::LESModels::SpalartAllmarasDES::psi
tmp< volScalarField > psi(const volScalarField &chi, const volScalarField &fv1) const
Definition: SpalartAllmarasDES.C:153
Foam::LESModels::SpalartAllmarasDES::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: SpalartAllmarasDES.H:178
Foam::LESModels::SpalartAllmarasDES::ft2
tmp< volScalarField > ft2(const volScalarField &chi) const
Definition: SpalartAllmarasDES.C:68
Foam::LESModels::SpalartAllmarasDES::dTilda
virtual tmp< volScalarField > dTilda(const volScalarField &chi, const volScalarField &fv1, const volTensorField &gradU) const
Length scale.
Definition: SpalartAllmarasDES.C:200
Foam::LESModels::DESModel::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: DESModel.H:70
Foam::LESModels::SpalartAllmarasDES::ck_
dimensionedScalar ck_
Definition: SpalartAllmarasDES.H:100
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::LESModels::SpalartAllmarasDES::SpalartAllmarasDES
SpalartAllmarasDES(const SpalartAllmarasDES &)
Foam::LESModels::SpalartAllmarasDES::correct
virtual void correct()
Correct nuTilda and related properties.
Definition: SpalartAllmarasDES.C:491
Foam::LESModels::SpalartAllmarasDES::fv1
tmp< volScalarField > fv1(const volScalarField &chi) const
Definition: SpalartAllmarasDES.C:46
Foam::LESModels::SpalartAllmarasDES::Cb1_
dimensionedScalar Cb1_
Definition: SpalartAllmarasDES.H:92
Foam::LESModels::SpalartAllmarasDES::fw
tmp< volScalarField > fw(const volScalarField &Omega, const volScalarField &dTilda) const
Definition: SpalartAllmarasDES.C:139
Foam::LESModels::SpalartAllmarasDES::Omega
tmp< volScalarField > Omega(const volTensorField &gradU) const
Definition: SpalartAllmarasDES.C:78
Foam::LESModels::SpalartAllmarasDES::y_
const volScalarField & y_
Wall distance.
Definition: SpalartAllmarasDES.H:118
SpalartAllmarasDES.C
Foam::LESModels::SpalartAllmarasDES::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: SpalartAllmarasDES.H:179
Foam::LESModels::SpalartAllmarasDES::correctNut
virtual void correctNut()
Definition: SpalartAllmarasDES.C:226
Foam::LESModels::DESModel
Definition: DESModel.H:51