All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SSG.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-2022 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::SSG
26 
27 Description
28  Speziale, Sarkar and Gatski Reynolds-stress turbulence model for
29  incompressible and compressible flows.
30 
31  Reference:
32  \verbatim
33  Speziale, C. G., Sarkar, S., & Gatski, T. B. (1991).
34  Modelling the pressure–strain correlation of turbulence:
35  an invariant dynamical systems approach.
36  Journal of Fluid Mechanics, 227, 245-272.
37  \endverbatim
38 
39  Including the generalised gradient diffusion model of
40  Daly and Harlow:
41  \verbatim
42  Daly, B. J., & Harlow, F. H. (1970).
43  Transport equations in turbulence.
44  Physics of Fluids (1958-1988), 13(11), 2634-2649.
45  \endverbatim
46 
47  The default model coefficients are:
48  \verbatim
49  SSGCoeffs
50  {
51  Cmu 0.09;
52 
53  C1 3.4;
54  C1s 1.8;
55  C2 4.2;
56  C3 0.8;
57  C3s 1.3;
58  C4 1.25;
59  C5 0.4;
60 
61  Ceps1 1.44;
62  Ceps2 1.92;
63  Cs 0.25;
64  Ceps 0.15;
65 
66  couplingFactor 0.0;
67  }
68  \endverbatim
69 
70 SourceFiles
71  SSG.C
72 
73 \*---------------------------------------------------------------------------*/
74 
75 #ifndef SSG_H
76 #define SSG_H
77 
78 #include "RASModel.H"
79 #include "ReynoldsStress.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace RASModels
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class SSG Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 template<class BasicMomentumTransportModel>
93 class SSG
94 :
95  public ReynoldsStress<RASModel<BasicMomentumTransportModel>>
96 {
97 protected:
98 
99  // Protected data
100 
101  // Model coefficients
117 
118  // Fields
122 
123 
124  // Protected Member Functions
125 
126  //- Update the eddy-viscosity
127  virtual void correctNut();
128 
129  //- Source term for the epsilon equation
130  virtual tmp<fvScalarMatrix> epsilonSource() const;
131 
132 
133 public:
135  typedef typename BasicMomentumTransportModel::alphaField alphaField;
136  typedef typename BasicMomentumTransportModel::rhoField rhoField;
137 
138 
139  //- Runtime type information
140  TypeName("SSG");
141 
142 
143  // Constructors
144 
145  //- Construct from components
146  SSG
147  (
148  const alphaField& alpha,
149  const rhoField& rho,
150  const volVectorField& U,
151  const surfaceScalarField& alphaRhoPhi,
152  const surfaceScalarField& phi,
153  const viscosity& viscosity,
154  const word& type = typeName
155  );
156 
157  //- Disallow default bitwise copy construction
158  SSG(const SSG&) = delete;
159 
160 
161  //- Destructor
162  virtual ~SSG()
163  {}
164 
165 
166  // Member Functions
167 
168  //- Read model coefficients if they have changed
169  virtual bool read();
170 
171  //- Return the turbulence kinetic energy
172  virtual tmp<volScalarField> k() const
173  {
174  return k_;
175  }
176 
177  //- Return the turbulence kinetic energy dissipation rate
178  virtual tmp<volScalarField> epsilon() const
179  {
180  return epsilon_;
181  }
182 
183  //- Return the turbulence specific dissipation rate
184  virtual tmp<volScalarField> omega() const
185  {
186  return volScalarField::New
187  (
188  "omega",
189  epsilon_/(Cmu_*k_),
190  epsilon_.boundaryField().types()
191  );
192  }
193 
194  //- Return the effective diffusivity for R
196 
197  //- Return the effective diffusivity for epsilon
199 
200  //- Solve the turbulence equations and correct eddy-Viscosity and
201  // related properties
202  virtual void correct();
203 
204 
205  // Member Operators
206 
207  //- Disallow default bitwise assignment
208  void operator=(const SSG&) = delete;
209 };
210 
211 
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 
214 } // End namespace RASModels
215 } // End namespace Foam
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 #ifdef NoRepository
220  #include "SSG.C"
221 #endif
222 
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224 
225 #endif
226 
227 // ************************************************************************* //
BasicMomentumTransportModel::alphaField alphaField
Definition: SSG.H:134
dimensionedScalar C2_
Definition: SSG.H:106
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
Definition: SSG.C:265
U
Definition: pEqn.H:72
const Boundary & boundaryField() const
Return const-reference to the boundary field.
TypeName("SSG")
Runtime type information.
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: SSG.C:276
dimensionedScalar Ceps2_
Definition: SSG.H:113
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
wordList types() const
Return a list of the patch field types.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
dimensionedScalar C5_
Definition: SSG.H:110
dimensionedScalar C3_
Definition: SSG.H:107
dimensionedScalar C3s_
Definition: SSG.H:108
Speziale, Sarkar and Gatski Reynolds-stress turbulence model for incompressible and compressible flow...
Definition: SSG.H:92
dimensionedScalar Cmu_
Definition: SSG.H:102
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
Definition: SSG.C:287
dimensionedScalar C4_
Definition: SSG.H:109
void operator=(const SSG &)=delete
Disallow default bitwise assignment.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: SSG.H:177
dimensionedScalar Cs_
Definition: SSG.H:114
A class for handling words, derived from string.
Definition: word.H:59
volScalarField k_
Definition: SSG.H:119
phi
Definition: correctPhi.H:3
volScalarField epsilon_
Definition: SSG.H:120
SSG(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: SSG.C:67
virtual bool read()
Read model coefficients if they have changed.
Definition: SSG.C:237
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
dimensionedScalar Ceps_
Definition: SSG.H:115
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: SSG.H:183
BasicMomentumTransportModel::rhoField rhoField
Definition: SSG.H:135
dimensionedScalar C1s_
Definition: SSG.H:105
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: SSG.H:171
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< fvScalarMatrix > epsilonSource() const
Source term for the epsilon equation.
Definition: SSG.C:50
virtual void correctNut()
Update the eddy-viscosity.
Definition: SSG.C:41
dimensionedScalar Ceps1_
Definition: SSG.H:112
dimensionedScalar C1_
Definition: SSG.H:104
Namespace for OpenFOAM.
virtual ~SSG()
Destructor.
Definition: SSG.H:161
Reynolds-stress turbulence model base class.