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-2022 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 BasicMomentumTransportModel>
53 class LESeddyViscosity
54 :
55  public eddyViscosity<LESModel<BasicMomentumTransportModel>>
56 {
57 protected:
58 
59  // Protected data
60 
63 
64 
65 public:
66 
67  typedef typename BasicMomentumTransportModel::alphaField alphaField;
68  typedef typename BasicMomentumTransportModel::rhoField rhoField;
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 viscosity& viscosity
83  );
84 
85  //- Disallow default bitwise copy construction
86  LESeddyViscosity(const LESeddyViscosity&) = delete;
87 
88 
89  //- Destructor
90  virtual ~LESeddyViscosity()
91  {}
92 
93 
94  // Member Functions
95 
96  //- Read model coefficients if they have changed
97  virtual bool read();
98 
99  //- Return sub-grid disipation rate
100  virtual tmp<volScalarField> epsilon() const;
101 
102  //- Return the turbulence specific dissipation rate
103  virtual tmp<volScalarField> omega() const;
104 
105 
106  // Member Operators
107 
108  //- Disallow default bitwise assignment
109  void operator=(const LESeddyViscosity&) = delete;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace LESModels
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #ifdef NoRepository
121  #include "LESeddyViscosity.C"
122 #endif
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Generic GeometricField class.
Eddy viscosity LES SGS model base class.
BasicMomentumTransportModel::alphaField alphaField
LESeddyViscosity(const word &type, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
void operator=(const LESeddyViscosity &)=delete
Disallow default bitwise assignment.
virtual tmp< volScalarField > epsilon() const
Return sub-grid disipation rate.
virtual ~LESeddyViscosity()
Destructor.
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
virtual bool read()
Read model coefficients if they have changed.
BasicMomentumTransportModel::rhoField rhoField
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:52
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488