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-2025 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  //- Mixture density
75  volScalarField rho_;
76 
77  //- Mixture viscosity
78  volScalarField nu_;
79 
80 
81 public:
82 
83  TypeName("compressibleMultiphaseVoFMixture");
84 
85 
86  // Constructors
87 
88  //- Construct from fvMesh
90 
91 
92  //- Destructor
94  {}
95 
96 
97  // Member Functions
98 
99  //- Return the phases
101  {
102  return phases_;
103  }
104 
105  //- Return the mixture density
106  virtual const volScalarField& rho() const
107  {
108  return rho_;
109  }
110 
111  //- Return true if all phases are incompressible
112  bool incompressible() const;
113 
114  //- Kinematic viscosity of mixture [m^2/s]
115  virtual tmp<volScalarField> nu() const
116  {
117  return nu_;
118  }
119 
120  //- Kinematic viscosity of mixture for patch [m^2/s]
121  virtual tmp<scalarField> nu(const label patchi) const
122  {
123  return nu_.boundaryField()[patchi];
124  }
125 
126  //- Return the mixture compressibility/density
127  virtual tmp<volScalarField> psiByRho() const;
128 
129  //- Correct the thermodynamics of each phase
130  virtual void correctThermo();
131 
132  //- Return the effective temperature transport coefficient
133  // derived from the phase internal energy equations i.e. <kappa/Cv>
135  (
136  const volScalarField& nut
137  ) const;
138 
139  //- Return the phase-averaged reciprocal Cv
140  tmp<volScalarField> rCv() const;
141 
142  //- Update properties
143  virtual void correct();
144 
145  //- Update densities for given pressure change
146  void correctRho(const volScalarField& dp);
147 };
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace Foam
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
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
Kinematic viscosity of mixture [m^2/s].
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")
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:96
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
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
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