sigma.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) 2022 Upstream CFD GmbH
9  Copyright (C) 2022 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::LESModels::sigma
29 
30 Group
31  grpLESTurbulence
32 
33 Description
34  The sigma SGS model.
35 
36  Reference:
37  \verbatim
38  Nicoud, F., Toda, H. B., Cabrit, O., Bose, S., & Lee, J. (2011).
39  Using singular values to build a subgrid-scale
40  model for large eddy simulations.
41  Physics of fluids, 23(8), 085106.
42  DOI:10.1063/1.3623274
43  \endverbatim
44 
45  The default model coefficients correspond to the following:
46  \verbatim
47  sigmaCoeffs
48  {
49  ck 0.094;
50  Csigma 1.68;
51  }
52  \endverbatim
53 
54 Note
55  The default value of the Csigma constant implemented was calibrated for
56  OpenFOAM using decaying isotropic turbulence and is slightly higher than
57  the value suggested in the reference publication.
58 
59 SourceFiles
60  sigma.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef Foam_LESModels_sigma_H
65 #define Foam_LESModels_sigma_H
66 
67 #include "LESModel.H"
68 #include "LESeddyViscosity.H"
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 namespace LESModels
75 {
76 
77 /*---------------------------------------------------------------------------*\
78  Class sigma Declaration
79 \*---------------------------------------------------------------------------*/
80 
81 template<class BasicTurbulenceModel>
82 class sigma
83 :
84  public LESeddyViscosity<BasicTurbulenceModel>
85 {
86  // Private Member Functions
87 
88  //- No copy construct
89  sigma(const sigma&) = delete;
90 
91  //- No copy assignment
92  void operator=(const sigma&) = delete;
93 
94 
95 protected:
96 
97  // Protected Data
98 
102 
103 
104  // Protected Member Functions
105 
106  //- Update the SGS eddy-viscosity
107  virtual void correctNut();
108 
109 
110 public:
111 
112  typedef typename BasicTurbulenceModel::alphaField alphaField;
113  typedef typename BasicTurbulenceModel::rhoField rhoField;
114  typedef typename BasicTurbulenceModel::transportModel transportModel;
116 
117  //- Runtime type information
118  TypeName("sigma");
119 
120 
121  // Constructors
122 
123  //- Construct from components
124  sigma
125  (
126  const alphaField& alpha,
127  const rhoField& rho,
128  const volVectorField& U,
129  const surfaceScalarField& alphaRhoPhi,
130  const surfaceScalarField& phi,
131  const transportModel& transport,
132  const word& propertiesName = turbulenceModel::propertiesName,
133  const word& type = typeName
134  );
135 
136 
137  //- Destructor
138  virtual ~sigma()
139  {}
140 
141 
142  // Member Functions
143 
144  //- Read model coefficients if they have changed
145  virtual bool read();
146 
147  //- Return SGS kinetic energy
148  virtual tmp<volScalarField> k() const;
149 
150  //- Return SGS disipation rate
151  virtual tmp<volScalarField> epsilon() const;
152 
153  //- Correct Eddy-Viscosity and related properties
154  virtual void correct();
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace LESModels
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #ifdef NoRepository
166  #include "sigma.C"
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Eddy viscosity LES SGS model base class.
BasicTurbulenceModel::transportModel transportModel
virtual void correct()
Correct Eddy-Viscosity and related properties.
Definition: sigma.C:154
virtual void correctNut()
Update the SGS eddy-viscosity.
Definition: sigma.C:36
BasicTurbulenceModel::rhoField rhoField
Definition: sigma.H:114
BasicTurbulenceModel::alphaField alphaField
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
virtual bool read()
Read model coefficients if they have changed.
Definition: sigma.C:114
static const word propertiesName
Default name of the turbulence properties dictionary.
dimensionedScalar Cw_
Definition: sigma.H:99
A class for handling words, derived from Foam::string.
Definition: word.H:63
BasicTurbulenceModel::transportModel transportModel
Definition: sigma.H:115
virtual tmp< volScalarField > epsilon() const
Return SGS disipation rate.
Definition: sigma.C:143
dimensionedScalar Csigma_
Definition: sigma.H:100
U
Definition: pEqn.H:72
virtual tmp< volScalarField > k() const
Return SGS kinetic energy.
Definition: sigma.C:130
TypeName("sigma")
Runtime type information.
BasicTurbulenceModel::rhoField rhoField
virtual ~sigma()
Destructor.
Definition: sigma.H:145
A class for managing temporary objects.
Definition: HashPtrTable.H:50
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
BasicTurbulenceModel::alphaField alphaField
Definition: sigma.H:113
dimensionedScalar Ck_
Definition: sigma.H:98
The sigma SGS model.
Definition: sigma.H:77
Namespace for OpenFOAM.