buoyantKEpsilon.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) 2014-2021 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::buoyantKEpsilon
26 
27 Description
28  Additional buoyancy generation/dissipation term applied to the
29  k and epsilon equations of the standard k-epsilon model.
30 
31  Reference:
32  \verbatim
33  Henkes, R.A.W.M., Van Der Vlugt, F.F. & Hoogendoorn, C.J. (1991).
34  Natural Convection Flow in a Square Cavity Calculated with
35  Low-Reynolds-Number Turbulence Models.
36  Int. J. Heat Mass Transfer, 34, 1543-1557.
37  \endverbatim
38 
39  This implementation is based on the density rather than temperature gradient
40  extending the applicability to systems in which the density gradient may be
41  generated by variation of composition rather than temperature. Further, the
42  1/Prt coefficient is replaced by Cg to provide more general control of
43  model.
44 
45  The default model coefficients are
46  \verbatim
47  buoyantKEpsilonCoeffs
48  {
49  Cg 1.0;
50  }
51  \endverbatim
52 
53 See also
54  Foam::RASModels::kEpsilon
55 
56 SourceFiles
57  buoyantKEpsilon.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef buoyantKEpsilon_H
62 #define buoyantKEpsilon_H
63 
64 #include "kEpsilon.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 namespace RASModels
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class buoyantKEpsilon Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 template<class BasicMomentumTransportModel>
78 class buoyantKEpsilon
79 :
80  public kEpsilon<BasicMomentumTransportModel>
81 {
82 protected:
83 
84  // Protected data
85 
86  // Model coefficients
87 
89 
90 
91  // Protected Member Functions
92 
93  tmp<volScalarField> Gcoef() const;
94 
95  virtual tmp<fvScalarMatrix> kSource() const;
96  virtual tmp<fvScalarMatrix> epsilonSource() const;
97 
98 
99 public:
100 
101  typedef typename BasicMomentumTransportModel::alphaField alphaField;
102  typedef typename BasicMomentumTransportModel::rhoField rhoField;
103 
104 
105  //- Runtime type information
106  TypeName("buoyantKEpsilon");
107 
108 
109  // Constructors
110 
111  //- Construct from components
113  (
114  const alphaField& alpha,
115  const rhoField& rho,
116  const volVectorField& U,
117  const surfaceScalarField& alphaRhoPhi,
118  const surfaceScalarField& phi,
119  const viscosity& viscosity,
120  const word& type = typeName
121  );
122 
123  //- Disallow default bitwise copy construction
124  buoyantKEpsilon(const buoyantKEpsilon&) = delete;
125 
126 
127  //- Destructor
128  virtual ~buoyantKEpsilon()
129  {}
130 
131 
132  // Member Functions
133 
134  //- Re-read model coefficients if they have changed
135  virtual bool read();
136 
137 
138  // Member Operators
139 
140  //- Disallow default bitwise assignment
141  void operator=(const buoyantKEpsilon&) = delete;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace RASModels
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #ifdef NoRepository
153  #include "buoyantKEpsilon.C"
154 #endif
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
Generic GeometricField class.
Additional buoyancy generation/dissipation term applied to the k and epsilon equations of the standar...
BasicMomentumTransportModel::alphaField alphaField
TypeName("buoyantKEpsilon")
Runtime type information.
virtual tmp< fvScalarMatrix > epsilonSource() const
virtual ~buoyantKEpsilon()
Destructor.
tmp< volScalarField > Gcoef() const
buoyantKEpsilon(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
void operator=(const buoyantKEpsilon &)=delete
Disallow default bitwise assignment.
virtual tmp< fvScalarMatrix > kSource() const
virtual bool read()
Re-read model coefficients if they have changed.
BasicMomentumTransportModel::rhoField rhoField
Standard k-epsilon turbulence model for incompressible and compressible flows including rapid distort...
Definition: kEpsilon.H:86
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