LESeddyViscosity.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) 2013-2019 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::LESModels::LESeddyViscosity
26 
27 Description
28  Eddy viscosity LES SGS model base class
29 
30 SourceFiles
31  LESeddyViscosity.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef LESeddyViscosity_H
36 #define LESeddyViscosity_H
37 
38 #include "LESModel.H"
39 #include "eddyViscosity.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace LESModels
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class LESeddyViscosity Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class BasicTurbulenceModel>
53 class LESeddyViscosity
54 :
55  public eddyViscosity<LESModel<BasicTurbulenceModel>>
56 {
57 protected:
58 
59  // Protected data
60 
62 
63 
64 public:
65 
66  typedef typename BasicTurbulenceModel::alphaField alphaField;
67  typedef typename BasicTurbulenceModel::rhoField rhoField;
68  typedef typename BasicTurbulenceModel::transportModel transportModel;
69 
70 
71  // Constructors
72 
73  //- Construct from components
75  (
76  const word& type,
77  const alphaField& alpha,
78  const rhoField& rho,
79  const volVectorField& U,
80  const surfaceScalarField& alphaRhoPhi,
81  const surfaceScalarField& phi,
82  const transportModel& transport,
83  const word& propertiesName = turbulenceModel::propertiesName
84  );
85 
86  //- Disallow default bitwise copy construction
87  LESeddyViscosity(const LESeddyViscosity&) = delete;
88 
89 
90  //- Destructor
91  virtual ~LESeddyViscosity()
92  {}
93 
94 
95  // Member Functions
96 
97  //- Read model coefficients if they have changed
98  virtual bool read();
99 
100  //- Return sub-grid disipation rate
101  virtual tmp<volScalarField> epsilon() const;
102 
103 
104  // Member Operators
105 
106  //- Disallow default bitwise assignment
107  void operator=(const LESeddyViscosity&) = delete;
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace LESModels
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #ifdef NoRepository
119  #include "LESeddyViscosity.C"
120 #endif
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
Eddy viscosity LES SGS model base class.
virtual ~LESeddyViscosity()
Destructor.
surfaceScalarField & phi
BasicTurbulenceModel::transportModel transportModel
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:49
BasicTurbulenceModel::alphaField alphaField
void operator=(const LESeddyViscosity &)=delete
Disallow default bitwise assignment.
virtual tmp< volScalarField > epsilon() const
Return sub-grid disipation rate.
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
Definition: word.H:59
virtual bool read()
Read model coefficients if they have changed.
U
Definition: pEqn.H:72
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
BasicTurbulenceModel::rhoField rhoField
LESeddyViscosity(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName)
Construct from components.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.