SpalartAllmarasIDDES.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::LESModels::SpalartAllmarasIDDES
29 
30 Group
31  grpDESTurbulence
32 
33 Description
34  SpalartAllmaras IDDES turbulence model
35  for incompressible and compressible flows.
36 
37  Reference:
38  \verbatim
39  Shur, M. L., Spalart, P. R., Strelets, M. K., & Travin, A. K. (2008).
40  A hybrid RANS-LES approach with delayed-DES
41  and wall-modelled LES capabilities.
42  International journal of heat and fluid flow, 29(6), 1638-1649.
43  DOI:10.1016/j.ijheatfluidflow.2008.07.001
44  \endverbatim
45 
46 SourceFiles
47  SpalartAllmarasIDDES.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef Foam_SpalartAllmarasIDDES_H
52 #define Foam_SpalartAllmarasIDDES_H
53 
54 #include "SpalartAllmarasDES.H"
55 #include "IDDESDelta.H"
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 namespace LESModels
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class SpalartAllmarasIDDES Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 template<class BasicTurbulenceModel>
70 :
71  public SpalartAllmarasDES<BasicTurbulenceModel>
72 {
73  // Private Member Functions
74 
75  //- Check that the supplied delta is an IDDESDelta
76  const IDDESDelta& setDelta() const;
77 
78  tmp<volScalarField> alpha() const;
79 
80  tmp<volScalarField> ft(const volScalarField& magGradU) const;
81 
82  tmp<volScalarField> fl(const volScalarField& magGradU) const;
83 
84  //- Delay function
85  tmp<volScalarField> fdt(const volScalarField& magGradU) const;
86 
87  //- No copy construct
89 
90  //- No copy assignment
91  void operator=(const SpalartAllmarasIDDES&) = delete;
92 
93 
94 protected:
95 
96  // Protected Data
97 
98  // Model coefficients
99 
107  //- IDDES delta
108  const IDDESDelta& IDDESDelta_;
109 
110 
111  // Protected Member Functions
112 
113  //- Return the length scale
115  (
116  const volScalarField& chi,
117  const volScalarField& fv1,
118  const volTensorField& gradU
119  ) const;
120 
121 
122 public:
123 
124  typedef typename BasicTurbulenceModel::alphaField alphaField;
125  typedef typename BasicTurbulenceModel::rhoField rhoField;
126  typedef typename BasicTurbulenceModel::transportModel transportModel;
127 
128 
129  //- Runtime type information
130  TypeName("SpalartAllmarasIDDES");
133  // Constructors
134 
135  //- Construct from components
137  (
138  const alphaField& alpha,
139  const rhoField& rho,
140  const volVectorField& U,
141  const surfaceScalarField& alphaRhoPhi,
142  const surfaceScalarField& phi,
143  const transportModel& transport,
144  const word& propertiesName = turbulenceModel::propertiesName,
145  const word& type = typeName
146  );
147 
148 
149  //- Destructor
150  virtual ~SpalartAllmarasIDDES() = default;
151 
152 
153  // Member Functions
154 
155  //- Re-read model coefficients if they have changed
156  virtual bool read();
157 
158  //- Return the shielding function
159  virtual tmp<volScalarField> fd() const;
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace LESModels
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #ifdef NoRepository
171  #include "SpalartAllmarasIDDES.C"
172 #endif
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
BasicTurbulenceModel::rhoField rhoField
virtual tmp< volScalarField > dTilda(const volScalarField &chi, const volScalarField &fv1, const volTensorField &gradU) const
Return the length scale.
const IDDESDelta & IDDESDelta_
IDDES delta.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Definition: Switch.H:77
SpalartAllmarasDES DES turbulence model for incompressible and compressible flows.
virtual bool read()
Re-read model coefficients if they have changed.
SpalartAllmaras IDDES turbulence model for incompressible and compressible flows. ...
BasicTurbulenceModel::transportModel transportModel
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
BasicTurbulenceModel::alphaField alphaField
virtual ~SpalartAllmarasIDDES()=default
Destructor.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
Definition: word.H:63
virtual tmp< volScalarField > fd() const
Return the shielding function.
BasicTurbulenceModel::rhoField rhoField
U
Definition: pEqn.H:72
TypeName("SpalartAllmarasIDDES")
Runtime type information.
BasicTurbulenceModel::transportModel transportModel
BasicTurbulenceModel::alphaField alphaField
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.