Loading...
Searching...
No Matches
SpalartAllmaras.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-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::RASModels::SpalartAllmaras
29
30Group
31 grpRASTurbulence
32
33Description
34 Spalart-Allmaras one-transport-equation linear-eddy-viscosity turbulence
35 closure model for incompressible and compressible external flows.
36
37 Required fields
38 \verbatim
39 nuTilda | Modified kinematic viscosity [m2/s]
40 \endverbatim
41
42 References:
43 \verbatim
44 Standard model:
45 Spalart, P.R., & Allmaras, S.R. (1994).
46 A one-equation turbulence model for aerodynamic flows.
47 La Recherche Aerospatiale, 1, 5-21.
48
49 Standard model without trip and ft2 terms (tag:R):
50 Rumsey, C. (2020).
51 The Spalart-Allmaras Turbulence Model.
52 Spalart-Allmaras One-Equation Model without ft2 Term (SA-noft2).
53 https://turbmodels.larc.nasa.gov/spalart.html#sanoft2
54 (Retrieved:12-01-2021).
55 \endverbatim
56
57Usage
58 Example by using \c constant/turbulenceProperties:
59 \verbatim
60 RAS
61 {
62 // Mandatory entries (unmodifiable)
63 RASModel SpalartAllmaras;
64
65 // Optional entries (runtime modifiable)
66 turbulence on;
67 printCoeffs on;
68
69 SpalartAllmarasCoeffs
70 {
71 sigmaNut 0.66666;
72 kappa 0.41;
73 Cb1 0.1355;
74 Cb2 0.622;
75 Cw2 0.3;
76 Cw3 2.0;
77 Cv1 7.1;
78 Cs 0.3;
79 }
80 }
81 \endverbatim
82
83Note
84 - The model is implemented without the trip-term since the model has almost
85 always been used in fully turbulent applications rather than those where
86 laminar-turbulent transition occurs.
87 - The \c Stilda generation term should never be allowed to be zero or negative
88 to avoid potential numerical issues and unphysical results for complex
89 flows. To this end, a limiter proposed by Spalart (R:Note-1(b)) is applied
90 onto \c Stilda where \c Stilda is clipped at \c Cs*Omega with the default
91 value of \c Cs=0.3.
92 - The model does not produce \c k, \c epsilon or \c omega. Nevertheless,
93 these quantities can be estimated by using an approximate expressions for
94 turbulent kinetic energy and dissipation rate reported in (B:Eq. 4.50).
95
96SourceFiles
97 SpalartAllmaras.C
98
99\*---------------------------------------------------------------------------*/
100
101#ifndef Foam_SpalartAllmaras_H
102#define Foam_SpalartAllmaras_H
103
104#include "RASModel.H"
105#include "eddyViscosity.H"
106#include "SpalartAllmarasBase.H"
107
108// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109
110namespace Foam
111{
112namespace RASModels
113{
114
115/*---------------------------------------------------------------------------*\
116 Class SpalartAllmaras Declaration
117\*---------------------------------------------------------------------------*/
118
119template<class BasicTurbulenceModel>
120class SpalartAllmaras
121:
122 public SpalartAllmarasBase<eddyViscosity<RASModel<BasicTurbulenceModel>>>
123{
124 // Private Member Functions
125
126 //- No copy construct
127 SpalartAllmaras(const SpalartAllmaras&) = delete;
128
129 //- No copy assignment
130 void operator=(const SpalartAllmaras&) = delete;
131
132
133protected:
134
135 // Protected Member Functions
136
137 //- Return the length scale
140 const volScalarField& chi,
141 const volScalarField& fv1,
142 const volTensorField& gradU
143 ) const;
144
145 virtual void correctNut();
147
148public:
149
150 typedef typename BasicTurbulenceModel::alphaField alphaField;
151 typedef typename BasicTurbulenceModel::rhoField rhoField;
152 typedef typename BasicTurbulenceModel::transportModel transportModel;
154
155 //- Runtime type information
156 TypeName("SpalartAllmaras");
157
158
159 // Constructors
160
161 //- Construct from components
162 SpalartAllmaras
163 (
164 const alphaField& alpha,
165 const rhoField& rho,
166 const volVectorField& U,
167 const surfaceScalarField& alphaRhoPhi,
168 const surfaceScalarField& phi,
169 const transportModel& transport,
170 const word& propertiesName = turbulenceModel::propertiesName,
171 const word& type = typeName
172 );
173
174
175 //- Destructor
176 virtual ~SpalartAllmaras() = default;
177};
178
179
180// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181
182} // End namespace RASModels
183} // End namespace Foam
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187#ifdef NoRepository
188 #include "SpalartAllmaras.C"
189#endif
190
191// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192
193#endif
194
195// ************************************************************************* //
Foam::EddyDiffusivity< Foam::fluidThermoCompressibleTurbulenceModel >::alphaField alphaField
Foam::EddyDiffusivity< Foam::fluidThermoCompressibleTurbulenceModel >::rhoField rhoField
TypeName("SpalartAllmaras")
Runtime type information.
virtual tmp< volScalarField > dTilda(const volScalarField &chi, const volScalarField &fv1, const volTensorField &gradU) const
Return the length scale.
Foam::EddyDiffusivity< Foam::fluidThermoCompressibleTurbulenceModel >::transportModel transportModel
SpalartAllmaras(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.
virtual ~SpalartAllmaras()=default
Destructor.
tmp< volScalarField > chi() const
tmp< volScalarField > fv1(const volScalarField &chi) const
A class for managing temporary objects.
Definition tmp.H:75
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
Definition word.H:66
U
Definition pEqn.H:72
Namespace for OpenFOAM.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
GeometricField< tensor, fvPatchField, volMesh > volTensorField
volScalarField & alpha
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68