compressibleMultiphaseVoFMixture.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::compressibleMultiphaseVoFMixture
26 
27 Description
28  Compressible multiphase mixture for interface-capturing simulations.
29 
30  Derived from viscosity so that it can be used in conjunction with the
31  compressible turbulence models.
32 
33  Surface tension and contact-angle is handled for the interface between each
34  phase-pair.
35 
36 SourceFiles
37  compressibleMultiphaseVoFMixture.C
38 
39 See also
40  Foam::multiphaseVoFMixture
41  Foam::compressibleVoFphase
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef compressibleMultiphaseVoFMixture_H
46 #define compressibleMultiphaseVoFMixture_H
47 
49 #include "multiphaseVoFMixture.H"
50 #include "viscosity.H"
51 #include "UPtrListDictionary.H"
52 #include "compressibleVoFphase.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  Class compressibleMultiphaseVoFMixture Declaration
61 \*---------------------------------------------------------------------------*/
62 
64 :
66  public multiphaseVoFMixture,
67  public viscosity
68 {
69  // Private Data
70 
71  //- Dictionary of phases
73 
74  volScalarField rho_;
75 
76 
77 public:
78 
79  TypeName("compressibleMultiphaseVoFMixture");
80 
81 
82  // Constructors
83 
84  //- Construct from fvMesh
86 
87 
88  //- Destructor
90  {}
91 
92 
93  // Member Functions
94 
95  //- Return the phases
97  {
98  return phases_;
99  }
100 
101  //- Return the mixture density
102  virtual const volScalarField& rho() const
103  {
104  return rho_;
105  }
106 
107  //- Return true if all phases are incompressible
108  bool incompressible() const;
109 
110  //- Return the kinematic laminar viscosity
111  virtual tmp<volScalarField> nu() const;
112 
113  //- Return the laminar viscosity for patch
114  virtual tmp<scalarField> nu(const label patchi) const;
115 
116  //- Return the face-interpolated dynamic laminar viscosity
118 
119  //- Return the mixture compressibility/density
120  virtual tmp<volScalarField> psiByRho() const;
121 
122  //- Correct the thermodynamics of each phase
123  virtual void correctThermo();
124 
125  //- Return the effective temperature transport coefficient
126  // derived from the phase internal energy equations i.e. <kappa/Cv>
128  (
129  const volScalarField& nut
130  ) const;
131 
132  //- Return the phase-averaged reciprocal Cv
133  tmp<volScalarField> rCv() const;
134 
135  //- Update properties
136  virtual void correct();
137 
138  //- Update densities for given pressure change
139  void correctRho(const volScalarField& dp);
140 };
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #endif
150 
151 // ************************************************************************* //
Generic GeometricField class.
Template dictionary class which manages the storage associated with it.
Compressible multiphase mixture for interface-capturing simulations.
tmp< volScalarField > rCv() const
Return the phase-averaged reciprocal Cv.
virtual void correctThermo()
Correct the thermodynamics of each phase.
UPtrListDictionary< compressibleVoFphase > & phases()
Return the phases.
virtual tmp< volScalarField > nu() const
Return the kinematic laminar viscosity.
virtual tmp< volScalarField > alphaEff(const volScalarField &nut) const
Return the effective temperature transport coefficient.
virtual tmp< volScalarField > psiByRho() const
Return the mixture compressibility/density.
virtual const volScalarField & rho() const
Return the mixture density.
TypeName("compressibleMultiphaseVoFMixture")
tmp< surfaceScalarField > nuf() const
Return the face-interpolated dynamic laminar viscosity.
compressibleMultiphaseVoFMixture(const fvMesh &mesh)
Construct from fvMesh.
void correctRho(const volScalarField &dp)
Update densities for given pressure change.
bool incompressible() const
Return true if all phases are incompressible.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Multiphase VoF mixture with support for interface properties.
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
const scalar nut
label patchi
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59