phaseTurbulenceStabilisation.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) 2022-2023 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::fv::phaseTurbulenceStabilisation
26 
27 Description
28  Phase turbulence stabilisation
29 
30  In the limit of a phase-fraction->0 the turbulence properties cannot be
31  obtained from the phase turbulence model, coupling to the other phase/phases
32  is required. The phaseTurbulenceStabilisation fvModel stabilises the phase
33  turbulence properties by adding transfer terms from the corresponding
34  properties of the other phases when the phase-fraction is less than the
35  specified \c alphaInversion. This implementation is a generalisation of
36  the approach used in the Foam::RASModels::LaheyKEpsilon and
37  Foam::RASModels::continuousGasKEpsilon models to handle phase-inversion and
38  free-surface flow and can be used with any combination of RAS turbulence
39  models.
40 
41  To stabilise the solution of the phase turbulence equations \c
42  alphaInversion can be set to a small value e.g. 1e-2, but unless the phase
43  turbulence model is specifically designed to handle phase-inversion and both
44  continuous and dispersed regimes it may be useful to set \c alphaInversion
45  to a higher value, corresponding to the phase-fraction at which transition
46  from continuous to dispersed happens and effectively use the turbulence
47  properties of the other phase when the phase is dispersed. This is of
48  course an approximation to the real system and if accurate handling of both
49  the continuous and dispersed phase regimes is required specially developed
50  models should be used.
51 
52 Usage
53  Example usage:
54  \verbatim
55  phaseTurbulenceStabilisation
56  {
57  type phaseTurbulenceStabilisation;
58 
59  libs ("libmultiphaseEulerFoamFvModels.so");
60 
61  phase air;
62 
63  alphaInversion 0.1;
64  }
65  \endverbatim
66 
67 SourceFiles
68  phaseTurbulenceStabilisation.C
69 
70 \*---------------------------------------------------------------------------*/
71 
72 #ifndef phaseTurbulenceStabilisation_H
73 #define phaseTurbulenceStabilisation_H
74 
75 #include "fvModel.H"
76 #include "phaseModel.H"
78 
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
80 
81 namespace Foam
82 {
83 namespace fv
84 {
85 
86 /*---------------------------------------------------------------------------*\
87  Class phaseTurbulenceStabilisation Declaration
88 \*---------------------------------------------------------------------------*/
89 
91 :
92  public fvModel
93 {
94  // Private Data
95 
96  //- The name of the Lagrangian phase
97  word phaseName_;
98 
99  //- Field names
100  wordList fieldNames_;
101 
102  //- Phase-fraction below which turbulence property blending is applied
103  dimensionedScalar alphaInversion_;
104 
105  //- Reference to the phase
106  const phaseModel& phase_;
107 
108  //- Reference to the mixture turbulence model
110 
111 
112  // Private Member Functions
113 
114  //- Add contribution to phase psi equation
115  void addSup
116  (
117  const volScalarField& alpha,
118  const volScalarField& rho,
119  fvMatrix<scalar>& eqn,
122  ) const;
123 
124 
125 public:
126 
127  //- Runtime type information
128  TypeName("phaseTurbulenceStabilisation");
129 
130 
131  // Constructors
132 
133  //- Construct from explicit source name and mesh
135  (
136  const word& sourceName,
137  const word& modelType,
138  const fvMesh& mesh,
139  const dictionary& dict
140  );
141 
142  //- Disallow default bitwise copy construction
144  (
146  ) = delete;
147 
148 
149  // Member Functions
150 
151  //- Return the list of fields for which the option adds source term
152  // to the transport equation
153  virtual wordList addSupFields() const;
154 
155  using fvModel::addSup;
156 
157  //- Add contribution to phase k, epsilon or omega equation
158  virtual void addSup
159  (
160  const volScalarField& alpha,
161  const volScalarField& rho,
162  fvMatrix<scalar>& eqn,
163  const word& fieldName
164  ) const;
165 
166 
167  // Mesh changes
168 
169  //- Update topology using the given map
170  virtual void topoChange(const polyTopoChangeMap&);
171 
172  //- Update from another mesh using the given map
173  virtual void mapMesh(const polyMeshMap&);
174 
175  //- Redistribute or update using the given distribution map
176  virtual void distribute(const polyDistributionMap&);
177 
178  //- Update for mesh motion
179  virtual bool movePoints();
180 
181 
182  // Member Operators
183 
184  //- Disallow default bitwise assignment
185  void operator=(const phaseTurbulenceStabilisation&) = delete;
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace fv
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #endif
197 
198 // ************************************************************************* //
Generic GeometricField class.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Finite volume model abstract base class.
Definition: fvModel.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
TypeName("phaseTurbulenceStabilisation")
Runtime type information.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
phaseTurbulenceStabilisation(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
void operator=(const phaseTurbulenceStabilisation &)=delete
Disallow default bitwise assignment.
Templated abstract base class for multiphase compressible turbulence models.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
const volScalarField & psi
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict