SSG.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) 2015-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2020 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::RASModels::SSG
29 
30 Group
31  grpRASTurbulence
32 
33 Description
34  Speziale, Sarkar and Gatski Reynolds-stress turbulence model for
35  incompressible and compressible flows.
36 
37  Reference:
38  \verbatim
39  Speziale, C. G., Sarkar, S., & Gatski, T. B. (1991).
40  Modelling the pressure-strain correlation of turbulence:
41  an invariant dynamical systems approach.
42  Journal of Fluid Mechanics, 227, 245-272.
43  \endverbatim
44 
45  Including the generalized gradient diffusion model of
46  Daly and Harlow:
47  \verbatim
48  Daly, B. J., & Harlow, F. H. (1970).
49  Transport equations in turbulence.
50  Physics of Fluids (1958-1988), 13(11), 2634-2649.
51  \endverbatim
52 
53  The default model coefficients are:
54  \verbatim
55  SSGCoeffs
56  {
57  Cmu 0.09;
58 
59  C1 3.4;
60  C1s 1.8;
61  C2 4.2;
62  C3 0.8;
63  C3s 1.3;
64  C4 1.25;
65  C5 0.4;
66 
67  Ceps1 1.44;
68  Ceps2 1.92;
69  Cs 0.25;
70  Ceps 0.15;
71 
72  couplingFactor 0.0;
73  }
74  \endverbatim
75 
76 SourceFiles
77  SSG.C
78 
79 \*---------------------------------------------------------------------------*/
80 
81 #ifndef SSG_H
82 #define SSG_H
83 
84 #include "RASModel.H"
85 #include "ReynoldsStress.H"
86 
87 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88 
89 namespace Foam
90 {
91 namespace RASModels
92 {
93 
94 /*---------------------------------------------------------------------------*\
95  Class SSG Declaration
96 \*---------------------------------------------------------------------------*/
97 
98 template<class BasicTurbulenceModel>
99 class SSG
100 :
101  public ReynoldsStress<RASModel<BasicTurbulenceModel>>
102 {
103  // Private Member Functions
104 
105  //- No copy construct
106  SSG(const SSG&) = delete;
107 
108  //- No copy assignment
109  void operator=(const SSG&) = delete;
110 
111 
112 protected:
113 
114  // Protected data
115 
116  // Model coefficients
117 
119 
127 
132 
133  // Fields
134 
137 
138 
139  // Protected Member Functions
140 
141  //- Update the eddy-viscosity
142  virtual void correctNut();
143 
144 
145 public:
146 
147  typedef typename BasicTurbulenceModel::alphaField alphaField;
148  typedef typename BasicTurbulenceModel::rhoField rhoField;
149  typedef typename BasicTurbulenceModel::transportModel transportModel;
150 
151 
152  //- Runtime type information
153  TypeName("SSG");
154 
155 
156  // Constructors
157 
158  //- Construct from components
159  SSG
160  (
161  const alphaField& alpha,
162  const rhoField& rho,
163  const volVectorField& U,
164  const surfaceScalarField& alphaRhoPhi,
165  const surfaceScalarField& phi,
166  const transportModel& transport,
167  const word& propertiesName = turbulenceModel::propertiesName,
168  const word& type = typeName
169  );
170 
171 
172  //- Destructor
173  virtual ~SSG() = default;
174 
175 
176  // Member Functions
177 
178  //- Read model coefficients if they have changed
179  virtual bool read();
180 
181  //- Return the turbulence kinetic energy
182  virtual tmp<volScalarField> k() const
183  {
184  return k_;
185  }
186 
187  //- Return the turbulence kinetic energy dissipation rate
188  virtual tmp<volScalarField> epsilon() const
189  {
190  return epsilon_;
191  }
192 
193  //- Return the (estimated) specific dissipation rate
194  virtual tmp<volScalarField> omega() const
195  {
197  (
198  IOobject
199  (
200  IOobject::groupName("omega", this->alphaRhoPhi_.group()),
201  this->runTime_.timeName(),
202  this->mesh_
203  ),
204  epsilon_/(Cmu_*k_)
205  );
206  }
207 
208  //- Return the effective diffusivity for R
210 
211  //- Return the effective diffusivity for epsilon
213 
214  //- Solve the turbulence equations and correct eddy-Viscosity and
215  // related properties
216  virtual void correct();
217 };
218 
219 
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221 
222 } // End namespace RASModels
223 } // End namespace Foam
224 
225 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226 
227 #ifdef NoRepository
228  #include "SSG.C"
229 #endif
230 
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232 
233 #endif
234 
235 // ************************************************************************* //
Foam::RASModels::SSG::omega
virtual tmp< volScalarField > omega() const
Return the (estimated) specific dissipation rate.
Definition: SSG.H:193
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::RASModels::SSG::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: SSG.H:147
Foam::RASModels::SSG::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: SSG.H:187
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::RASModels::SSG::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: SSG.H:181
rho
rho
Definition: readInitialConditions.H:88
Foam::RASModels::SSG::TypeName
TypeName("SSG")
Runtime type information.
Foam::RASModels::SSG::C1s_
dimensionedScalar C1s_
Definition: SSG.H:120
Foam::RASModels::SSG::C5_
dimensionedScalar C5_
Definition: SSG.H:125
Foam::RASModels::SSG::C2_
dimensionedScalar C2_
Definition: SSG.H:121
Foam::RASModels::SSG::Ceps1_
dimensionedScalar Ceps1_
Definition: SSG.H:127
ReynoldsStress.H
Foam::ReynoldsStress
Reynolds-stress turbulence model base class.
Definition: ReynoldsStress.H:53
Foam::RASModels::SSG::Ceps_
dimensionedScalar Ceps_
Definition: SSG.H:130
Foam::RASModels::SSG::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: SSG.H:146
Foam::RASModels::SSG::epsilon_
volScalarField epsilon_
Definition: SSG.H:135
Foam::RASModels::SSG::C3_
dimensionedScalar C3_
Definition: SSG.H:122
Foam::RASModels::SSG::Cs_
dimensionedScalar Cs_
Definition: SSG.H:129
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::RASModels::SSG::Cmu_
dimensionedScalar Cmu_
Definition: SSG.H:117
Foam::RASModel::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: RASModel.H:97
RASModel.H
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::RASModel::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: RASModel.H:96
Foam::RASModel::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: RASModel.H:98
U
U
Definition: pEqn.H:72
Foam::RASModels::SSG::DREff
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
Definition: SSG.C:255
Foam::RASModels::SSG::~SSG
virtual ~SSG()=default
Destructor.
Foam::RASModels::SSG::k_
volScalarField k_
Definition: SSG.H:134
Foam::RASModels::SSG::correctNut
virtual void correctNut()
Update the eddy-viscosity.
Definition: SSG.C:43
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::RASModels::SSG::read
virtual bool read()
Read model coefficients if they have changed.
Definition: SSG.C:229
Foam::RASModels::SSG
Speziale, Sarkar and Gatski Reynolds-stress turbulence model for incompressible and compressible flow...
Definition: SSG.H:98
Foam::RASModels::SSG::C4_
dimensionedScalar C4_
Definition: SSG.H:124
Foam::RASModels::SSG::Ceps2_
dimensionedScalar Ceps2_
Definition: SSG.H:128
Foam::RASModels::SSG::C1_
dimensionedScalar C1_
Definition: SSG.H:119
SSG.C
Foam::IOobject::groupName
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Foam::RASModels::SSG::C3s_
dimensionedScalar C3s_
Definition: SSG.H:123
Foam::RASModels::SSG::correct
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
Definition: SSG.C:283
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::RASModels::SSG::DepsilonEff
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: SSG.C:269
Foam::RASModels::SSG::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: SSG.H:148