continuousGasKEpsilon.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::RASModels::continuousGasKEpsilon
26 
27 Description
28  k-epsilon model for the gas-phase in a two-phase system
29  supporting phase-inversion.
30 
31  In the limit that the gas-phase fraction approaches zero a contribution from
32  the other phase is blended into the k and epsilon equations up to the
33  phase-fraction of alphaInversion at which point phase-inversion is
34  considered to have occurred and the model reverts to the pure single-phase
35  form.
36 
37  This model is unpublished and is provided as a stable numerical framework
38  on which a more physical model may be built.
39 
40  The default model coefficients are
41  \verbatim
42  continuousGasKEpsilonCoeffs
43  {
44  Cmu 0.09;
45  C1 1.44;
46  C2 1.92;
47  C3 0;
48  sigmak 1.0;
49  sigmaEps 1.3;
50  alphaInversion 0.7;
51  }
52  \endverbatim
53 
54 SourceFiles
55  continuousGasKEpsilon.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef continuousGasKEpsilon_H
60 #define continuousGasKEpsilon_H
61 
62 #include "kEpsilon.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace RASModels
69 {
70 
71 /*---------------------------------------------------------------------------*\
72  Class continuousGasKEpsilon Declaration
73 \*---------------------------------------------------------------------------*/
74 
75 template<class BasicMomentumTransportModel>
77 :
78  public kEpsilon<BasicMomentumTransportModel>
79 {
80  // Private Data
81 
82  mutable const momentumTransportModel *liquidTurbulencePtr_;
83 
84  volScalarField nutEff_;
85 
86 
87 protected:
88 
89  // Protected data
90 
91  // Model coefficients
92 
94 
95 
96  // Protected Member Functions
97 
98  virtual void correctNut();
100  virtual tmp<fvScalarMatrix> kSource() const;
101  virtual tmp<fvScalarMatrix> epsilonSource() const;
102 
103 
104 public:
105 
106  typedef typename BasicMomentumTransportModel::alphaField alphaField;
107  typedef typename BasicMomentumTransportModel::rhoField rhoField;
108 
109 
110  //- Runtime type information
111  TypeName("continuousGasKEpsilon");
112 
113 
114  // Constructors
115 
116  //- Construct from components
118  (
119  const alphaField& alpha,
120  const rhoField& rho,
121  const volVectorField& U,
122  const surfaceScalarField& alphaRhoPhi,
123  const surfaceScalarField& phi,
124  const viscosity& viscosity,
125  const word& type = typeName
126  );
127 
128  //- Disallow default bitwise copy construction
130 
131 
132  //- Destructor
133  virtual ~continuousGasKEpsilon()
134  {}
135 
136 
137  // Member Functions
138 
139  //- Re-read model coefficients if they have changed
140  virtual bool read();
141 
142  //- Return the turbulence model for the liquid phase
144 
145  //- Return the effective viscosity
146  virtual tmp<volScalarField> nuEff() const;
147 
148  //- Return the effective density for the stress
149  virtual tmp<volScalarField> rhoEff() const;
150 
151  //- Return the stress tensor [m^2/s^2]
152  virtual tmp<volSymmTensorField> sigma() const;
153 
154 
155  // Member Operators
156 
157  //- Disallow default bitwise assignment
158  void operator=(const continuousGasKEpsilon&) = delete;
159 };
160 
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 } // End namespace RASModels
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #ifdef NoRepository
170  #include "continuousGasKEpsilon.C"
171 #endif
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
Generic GeometricField class.
k-epsilon model for the gas-phase in a two-phase system supporting phase-inversion.
BasicMomentumTransportModel::alphaField alphaField
virtual tmp< fvScalarMatrix > epsilonSource() const
virtual tmp< volSymmTensorField > sigma() const
Return the stress tensor [m^2/s^2].
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
TypeName("continuousGasKEpsilon")
Runtime type information.
tmp< volScalarField > phaseTransferCoeff() const
virtual tmp< volScalarField > rhoEff() const
Return the effective density for the stress.
virtual tmp< fvScalarMatrix > kSource() const
void operator=(const continuousGasKEpsilon &)=delete
Disallow default bitwise assignment.
continuousGasKEpsilon(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.
const momentumTransportModel & liquidTurbulence() const
Return the turbulence model for the liquid phase.
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
BasicMomentumTransportModel::alphaField alphaField
BasicMomentumTransportModel::rhoField rhoField
Abstract base class for turbulence models (RAS, LES and laminar).
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