residualDiameter.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) 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::diameterModels::residualDiameter
26 
27 Description
28  A diameter model which switches form constant diameter to constant residual
29  diameter when the volume fraction of the phase is below residualAlpha.
30 
31  A typical use case for this is to set a small residual diameter to prevent
32  excessive phase velocities in regions where the phase volume fraction is
33  small.
34 
35 SourceFiles
36  residualDiameter.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef residualDiameter_H
41 #define residualDiameter_H
42 
43 #include "sphericalDiameter.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace diameterModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class residualDiameter Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class residualDiameter
57 :
58  public spherical
59 {
60  // Private data
61 
62  //- The diameter used when the volume fraction is above residualAlpha
64 
65  //- The diameter used when the volume fraction is below residualAlpha
66  dimensionedScalar dResidual_;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("residualDiameter");
73 
74 
75  // Constructors
76 
78  (
80  const phaseModel& phase
81  );
82 
83 
84  //- Destructor
85  virtual ~residualDiameter();
86 
87 
88  // Member Functions
89 
90  //- Get the diameter field
91  virtual tmp<volScalarField> d() const;
92 
93  //- Read diameterProperties dictionary
94  virtual bool read(const dictionary& diameterProperties);
95 };
96 
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 } // End namespace diameterModels
101 } // End namespace Foam
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 #endif
106 
107 // ************************************************************************* //
const phaseModel & phase() const
Return the phase.
const dictionary & diameterProperties() const
Return the phase diameter properties dictionary.
A diameter model which switches form constant diameter to constant residual diameter when the volume ...
TypeName("residualDiameter")
Runtime type information.
virtual bool read(const dictionary &diameterProperties)
Read diameterProperties dictionary.
virtual tmp< volScalarField > d() const
Get the diameter field.
residualDiameter(const dictionary &diameterProperties, const phaseModel &phase)
Base class for models which represent spherical diameter models, providing a common implementation of...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.