continuousGasKEqn.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) 2013-2016 OpenFOAM Foundation
9  Copyright (C) 2019 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::continuousGasKEqn
29 
30 Group
31  grpLESTurbulence
32 
33 Description
34  One-equation SGS model for the gas-phase in a two-phase system
35  supporting phase-inversion.
36 
37  In the limit that the gas-phase fraction approaches zero a contribution from
38  the other phase is blended into the k-equation up to the phase-fraction of
39  alphaInversion at which point phase-inversion is considered to have occurred
40  and the model reverts to the pure single-phase form.
41 
42  This model is unpublished and is provided as a stable numerical framework
43  on which a more physical model may be built.
44 
45  The default model coefficients are
46  \verbatim
47  continuousKEqnCoeffs
48  {
49  Ck 0.094;
50  Ce 1.048;
51  alphaInversion 0.7;
52  }
53  \endverbatim
54 
55 SourceFiles
56  continuousGasKEqn.C
57 
58 \*---------------------------------------------------------------------------*/
59 
60 #ifndef continuousGasKEqn_H
61 #define continuousGasKEqn_H
62 
63 #include "kEqn.H"
64 
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 
67 namespace Foam
68 {
69 namespace LESModels
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class continuousGasKEqn Declaration
74 \*---------------------------------------------------------------------------*/
75 
76 template<class BasicTurbulenceModel>
78 :
79  public kEqn<BasicTurbulenceModel>
80 {
81  // Private data
82 
83  mutable const turbulenceModel *liquidTurbulencePtr_;
84 
85 
86  // Private Member Functions
87 
88  //- No copy construct
89  continuousGasKEqn(const continuousGasKEqn&) = delete;
90 
91  //- No copy assignment
92  void operator=(const continuousGasKEqn&) = delete;
93 
94 
95 protected:
96 
97  // Protected data
98 
99  // Model coefficients
100 
102 
103 
104  // Protected Member Functions
105 
106  //- Return the turbulence model for the liquid phase
107  const turbulenceModel& liquidTurbulence() const;
108 
110  virtual tmp<fvScalarMatrix> kSource() const;
111 
112 
113 public:
114 
115  typedef typename BasicTurbulenceModel::alphaField alphaField;
116  typedef typename BasicTurbulenceModel::rhoField rhoField;
117  typedef typename BasicTurbulenceModel::transportModel transportModel;
118 
119 
120  //- Runtime type information
121  TypeName("continuousGasKEqn");
122 
123 
124  // Constructors
125 
126  //- Construct from components
128  (
129  const alphaField& alpha,
130  const rhoField& rho,
131  const volVectorField& U,
132  const surfaceScalarField& alphaRhoPhi,
133  const surfaceScalarField& phi,
134  const transportModel& transport,
135  const word& propertiesName = turbulenceModel::propertiesName,
136  const word& type = typeName
137  );
138 
139 
140  //- Destructor
141  virtual ~continuousGasKEqn() = default;
142 
143 
144  // Member Functions
145 
146  //- Read model coefficients if they have changed
147  virtual bool read();
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace LESModels
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #ifdef NoRepository
159  #include "continuousGasKEqn.C"
160 #endif
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
Foam::LESModels::continuousGasKEqn::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: continuousGasKEqn.H:114
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::LESModels::continuousGasKEqn::~continuousGasKEqn
virtual ~continuousGasKEqn()=default
Destructor.
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::LESModels::continuousGasKEqn::kSource
virtual tmp< fvScalarMatrix > kSource() const
Definition: continuousGasKEqn.C:154
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
continuousGasKEqn.C
Foam::LESModels::continuousGasKEqn::read
virtual bool read()
Read model coefficients if they have changed.
Definition: continuousGasKEqn.C:88
rho
rho
Definition: readInitialConditions.H:88
Foam::LESModels::continuousGasKEqn
One-equation SGS model for the gas-phase in a two-phase system supporting phase-inversion.
Definition: continuousGasKEqn.H:76
Foam::LESModels::kEqn
One equation eddy-viscosity model.
Definition: kEqn.H:77
Foam::LESModels::continuousGasKEqn::phaseTransferCoeff
tmp< volScalarField > phaseTransferCoeff() const
Definition: continuousGasKEqn.C:131
Foam::LESModels::continuousGasKEqn::liquidTurbulence
const turbulenceModel & liquidTurbulence() const
Return the turbulence model for the liquid phase.
Definition: continuousGasKEqn.C:103
Foam::LESModels::continuousGasKEqn::TypeName
TypeName("continuousGasKEqn")
Runtime type information.
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::turbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: turbulenceModel.H:63
kEqn.H
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::LESModels::continuousGasKEqn::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: continuousGasKEqn.H:115
U
U
Definition: pEqn.H:72
Foam::LESModels::continuousGasKEqn::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: continuousGasKEqn.H:116
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::LESModels::continuousGasKEqn::alphaInversion_
dimensionedScalar alphaInversion_
Definition: continuousGasKEqn.H:100
Foam::GeometricField< vector, fvPatchField, volMesh >