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 ("libmultiphaseEulerFvModels.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 addAlphaRhoSup
116  (
117  const volScalarField& alpha,
118  const volScalarField& rho,
119  const volScalarField& field,
120  fvMatrix<scalar>& eqn,
123  ) const;
124 
125 
126 public:
127 
128  //- Runtime type information
129  TypeName("phaseTurbulenceStabilisation");
130 
131 
132  // Constructors
133 
134  //- Construct from explicit source name and mesh
136  (
137  const word& sourceName,
138  const word& modelType,
139  const fvMesh& mesh,
140  const dictionary& dict
141  );
142 
143  //- Disallow default bitwise copy construction
145  (
147  ) = delete;
148 
149 
150  // Member Functions
151 
152  // Checks
153 
154  //- Return the list of fields for which the option adds source term
155  // to the transport equation
156  virtual wordList addSupFields() const;
157 
158 
159  // Sources
160 
161  //- Add contribution to phase k, epsilon or omega equation
162  virtual void addSup
163  (
164  const volScalarField& alpha,
165  const volScalarField& rho,
166  const volScalarField& field,
167  fvMatrix<scalar>& eqn
168  ) const;
169 
170 
171  // Mesh changes
172 
173  //- Update topology using the given map
174  virtual void topoChange(const polyTopoChangeMap&);
175 
176  //- Update from another mesh using the given map
177  virtual void mapMesh(const polyMeshMap&);
178 
179  //- Redistribute or update using the given distribution map
180  virtual void distribute(const polyDistributionMap&);
181 
182  //- Update for mesh motion
183  virtual bool movePoints();
184 
185 
186  // Member Operators
187 
188  //- Disallow default bitwise assignment
189  void operator=(const phaseTurbulenceStabilisation&) = delete;
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace fv
196 } // End namespace Foam
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #endif
201 
202 // ************************************************************************* //
Generic GeometricField class.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
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:99
Finite volume model abstract base class.
Definition: fvModel.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:53
virtual void addSup(const volScalarField &alpha, const volScalarField &rho, const volScalarField &field, fvMatrix< scalar > &eqn) const
Add contribution to phase k, epsilon or omega equation.
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