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-2018 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 generalized 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 BasicTurbulenceModel>
93 class SSG
94 :
95  public ReynoldsStress<RASModel<BasicTurbulenceModel>>
96 {
97  // Private Member Functions
98 
99  // Disallow default bitwise copy construct and assignment
100  SSG(const SSG&);
101  void operator=(const SSG&);
102 
103 
104 protected:
105 
106  // Protected data
107 
108  // Model coefficients
124 
125  // Fields
129 
130 
131  // Protected Member Functions
132 
133  //- Update the eddy-viscosity
134  virtual void correctNut();
135 
136 
137 public:
139  typedef typename BasicTurbulenceModel::alphaField alphaField;
140  typedef typename BasicTurbulenceModel::rhoField rhoField;
141  typedef typename BasicTurbulenceModel::transportModel transportModel;
142 
143 
144  //- Runtime type information
145  TypeName("SSG");
146 
147 
148  // Constructors
149 
150  //- Construct from components
151  SSG
152  (
153  const alphaField& alpha,
154  const rhoField& rho,
155  const volVectorField& U,
156  const surfaceScalarField& alphaRhoPhi,
157  const surfaceScalarField& phi,
158  const transportModel& transport,
159  const word& propertiesName = turbulenceModel::propertiesName,
160  const word& type = typeName
161  );
162 
163 
164  //- Destructor
165  virtual ~SSG()
166  {}
167 
168 
169  // Member Functions
170 
171  //- Read model coefficients if they have changed
172  virtual bool read();
173 
174  //- Return the turbulence kinetic energy
175  virtual tmp<volScalarField> k() const
176  {
177  return k_;
178  }
179 
180  //- Return the turbulence kinetic energy dissipation rate
181  virtual tmp<volScalarField> epsilon() const
182  {
183  return epsilon_;
184  }
185 
186  //- Return the effective diffusivity for R
188 
189  //- Return the effective diffusivity for epsilon
191 
192  //- Solve the turbulence equations and correct eddy-Viscosity and
193  // related properties
194  virtual void correct();
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace RASModels
201 } // End namespace Foam
202 
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 
205 #ifdef NoRepository
206  #include "SSG.C"
207 #endif
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 #endif
212 
213 // ************************************************************************* //
dimensionedScalar C2_
Definition: SSG.H:113
surfaceScalarField & phi
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
Definition: SSG.C:254
TypeName("SSG")
Runtime type information.
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: SSG.C:268
dimensionedScalar Ceps2_
Definition: SSG.H:120
dimensionedScalar C5_
Definition: SSG.H:117
dimensionedScalar C3_
Definition: SSG.H:114
dimensionedScalar C3s_
Definition: SSG.H:115
Speziale, Sarkar and Gatski Reynolds-stress turbulence model for incompressible and compressible flow...
Definition: SSG.H:92
dimensionedScalar Cmu_
Definition: SSG.H:109
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
Definition: SSG.C:282
dimensionedScalar C4_
Definition: SSG.H:116
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: SSG.H:180
dimensionedScalar Cs_
Definition: SSG.H:121
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:126
volScalarField epsilon_
Definition: SSG.H:127
BasicTurbulenceModel::alphaField alphaField
Definition: SSG.H:138
virtual bool read()
Read model coefficients if they have changed.
Definition: SSG.C:226
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:481
U
Definition: pEqn.H:72
BasicTurbulenceModel::rhoField rhoField
Definition: SSG.H:139
dimensionedScalar Ceps_
Definition: SSG.H:122
BasicTurbulenceModel::transportModel transportModel
Definition: SSG.H:140
dimensionedScalar C1s_
Definition: SSG.H:112
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: SSG.H:174
A class for managing temporary objects.
Definition: PtrList.H:53
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:119
dimensionedScalar C1_
Definition: SSG.H:111
Namespace for OpenFOAM.
virtual ~SSG()
Destructor.
Definition: SSG.H:164
Reynolds-stress turbulence model base class.