incompressibleTwoPhaseInteractingMixture.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) 2014-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::incompressibleTwoPhaseInteractingMixture
26 
27 Description
28  A two-phase incompressible transportModel for interacting phases
29  requiring the direct evaluation of the mixture viscosity,
30  e.g. activated sludge or slurry.
31 
32 SourceFiles
33  incompressibleTwoPhaseInteractingMixture.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef incompressibleTwoPhaseInteractingMixture_H
38 #define incompressibleTwoPhaseInteractingMixture_H
39 
40 #include "twoPhaseMixture.H"
41 #include "viscosityModel.H"
43 #include "IOMRFZoneList.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 class mixtureViscosityModel;
51 class relativeVelocityModel;
52 
53 /*---------------------------------------------------------------------------*\
54  Class incompressibleTwoPhaseInteractingMixture Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public twoPhaseMixture,
60  public viscosity
61 {
62  // Private data
63 
64  volVectorField& U_;
65 
67  autoPtr<viscosityModel> nucModel_;
68 
69  dimensionedScalar rhod_;
70  dimensionedScalar rhoc_;
71 
72  //- Optional diameter of the dispersed phase particles
74 
75  //- Optional maximum dispersed phase-fraction (e.g. packing limit)
76  scalar alphaMax_;
77 
78  //- Optional MRF zones
79  IOMRFZoneList MRF_;
80 
81  volScalarField mu_;
82 
83  //- Dispersed phase relative velocity model
85 
86 
87 public:
88 
89  TypeName("incompressibleTwoPhaseInteractingMixture");
90 
91 
92  // Constructors
93 
94  //- Construct from components
96  (
98  const surfaceScalarField& phi,
100  );
101 
102 
103  //- Destructor
105 
106 
107  // Member Functions
108 
109  //- Return const-access to the continuous phase-fraction
110  const volScalarField& alphac() const;
111 
112  //- Return const-access to the dispersed phase-fraction
113  const volScalarField& alphad() const;
114 
115  //- Return const-access to the mixture viscosityModel
116  const mixtureViscosityModel& muModel() const;
117 
118  //- Return const-access to the continuous-phase viscosityModel
119  const viscosityModel& nucModel() const;
120 
121  //- Return const-access to the dispersed-phase density
122  const dimensionedScalar& rhod() const;
123 
124  //- Return const-access to continuous-phase density
125  const dimensionedScalar& rhoc() const;
126 
127  //- Return the diameter of the dispersed-phase particles
128  const dimensionedScalar& dd() const;
129 
130  //- Optional maximum phase-fraction (e.g. packing limit)
131  // Defaults to 1
132  scalar alphaMax() const;
133 
134  //- Return const-access to the mixture velocity
135  const volVectorField& U() const;
136 
137  //- Return MRF zones
138  const IOMRFZoneList& MRF() const;
139 
140  //- Return the dynamic mixture viscosity
141  tmp<volScalarField> mu() const;
142 
143  //- Return the dynamic mixture viscosity for patch
144  virtual tmp<scalarField> mu(const label patchi) const;
145 
146  //- Return the mixture density
147  virtual tmp<volScalarField> rho() const;
148 
149  //- Return the mixture density for patch
150  virtual tmp<scalarField> rho(const label patchi) const;
151 
152  //- Return the mixture viscosity
153  virtual tmp<volScalarField> nu() const;
154 
155  //- Return the mixture viscosity for patch
156  virtual tmp<scalarField> nu(const label patchi) const;
157 
158  //- Return the diffusion velocity of the dispersed phase
159  const volVectorField& Udm() const;
160 
161  //- Return the div stress tensor due to the phase transport
163 
164  //- Correct the laminar viscosity
165  virtual void correct();
166 
167  //- Read base phaseProperties dictionary
168  virtual bool read();
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #endif
179 
180 // ************************************************************************* //
virtual void correct()
Correct the laminar viscosity.
A two-phase incompressible transportModel for interacting phases requiring the direct evaluation of t...
virtual bool read()
Read base phaseProperties dictionary.
const volScalarField & alphad() const
Return const-access to the dispersed phase-fraction.
const dimensionedScalar & rhoc() const
Return const-access to continuous-phase density.
const IOMRFZoneList & MRF() const
Return MRF zones.
Generic GeometricField class.
virtual ~incompressibleTwoPhaseInteractingMixture()
Destructor.
const dimensionedScalar & rhod() const
Return const-access to the dispersed-phase density.
An abstract base class for Newtonian viscosity models.
const volVectorField & U() const
Return const-access to the mixture velocity.
scalar alphaMax() const
Optional maximum phase-fraction (e.g. packing limit)
TypeName("incompressibleTwoPhaseInteractingMixture")
virtual tmp< volScalarField > nu() const
Return the mixture viscosity.
incompressibleTwoPhaseInteractingMixture(volVectorField &U, const surfaceScalarField &phi, const uniformDimensionedVectorField &g)
Construct from components.
An abstract base class for incompressible mixtureViscosityModels.
phi
Definition: correctPhi.H:3
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
tmp< volVectorField > divTauDm() const
Return the div stress tensor due to the phase transport.
const dimensionedScalar & dd() const
Return the diameter of the dispersed-phase particles.
label patchi
const volVectorField & Udm() const
Return the diffusion velocity of the dispersed phase.
A two-phase mixture model.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
const mixtureViscosityModel & muModel() const
Return const-access to the mixture viscosityModel.
A class for managing temporary objects.
Definition: PtrList.H:53
const dimensionedVector & g
const viscosityModel & nucModel() const
Return const-access to the continuous-phase viscosityModel.
List of MRF zones with IO functionality. MRF zones are specified by a list of dictionary entries...
Definition: IOMRFZoneList.H:64
tmp< volScalarField > mu() const
Return the dynamic mixture viscosity.
const volScalarField & alphac() const
Return const-access to the continuous phase-fraction.
virtual tmp< volScalarField > rho() const
Return the mixture density.
Namespace for OpenFOAM.