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