compressibleVoFphase.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::compressibleVoFphase
26 
27 Description
28  Single compressible phase derived from the VoFphase.
29 
30  Used in compressibleMultiphaseVoFMixture for multiphase
31  interface-capturing simulations.
32 
33 SourceFiles
34  compressibleVoFphase.C
35 
36 See also
37  Foam::VoFphase
38  Foam::compressibleMultiphaseVoFMixture
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef compressibleVoFphase_H
43 #define compressibleVoFphase_H
44 
45 #include "VoFphase.H"
46 #include "rhoFluidThermo.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class compressibleVoFphase Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public VoFphase
60 {
61  // Private Data
62 
63  //- Phase thermo
65 
66  //- Phase compressibility contribution
68 
69 
70 public:
71 
72  // Constructors
73 
74  //- Construct from components
76  (
77  const word& name,
78  const fvMesh& mesh,
79  const volScalarField& T
80  );
81 
82  //- Return clone
83  virtual autoPtr<VoFphase> clone() const;
84 
85  //- Return a pointer to a new compressibleVoFphase
86  // created on freestore from Istream
87  class iNew
88  :
89  public VoFphase::iNew
90  {
91  const volScalarField& T_;
92 
93  public:
94 
95  iNew(const fvMesh& mesh, const volScalarField& T)
96  :
97  VoFphase::iNew(mesh),
98  T_(T)
99  {}
100 
101  virtual autoPtr<VoFphase> operator()(Istream& is) const
102  {
103  const word name(is);
104 
105  return autoPtr<VoFphase>
106  (
108  );
109  }
110  };
111 
112 
113  // Member Functions
114 
115  //- Return const-access to phase rhoFluidThermo
116  const rhoFluidThermo& thermo() const
117  {
118  return thermo_();
119  }
120 
121  //- Return access to phase rhoFluidThermo
123  {
124  return thermo_();
125  }
126 
127  //- Return const-access to phase divergence
128  const volScalarField::Internal& vDot() const
129  {
130  return vDot_;
131  }
132 
133  //- Return access to phase divergence
135  {
136  return vDot_;
137  }
138 
139  void correct
140  (
141  const volScalarField& p,
142  const volScalarField& T
143  );
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Mesh & mesh() const
Return mesh.
Generic GeometricField class.
tmp< GeometricField< Type, GeoMesh, Field > > T() const
Return transpose (only if it is a tensor field)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
Return a pointer to a new VoFphase.
Definition: VoFphase.H:77
const fvMesh & mesh_
Definition: VoFphase.H:80
Single incompressible VoFphase derived from the phase-fraction. Used as part of the multiPhaseMixture...
Definition: VoFphase.H:53
const word & name() const
Definition: VoFphase.H:98
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Return a pointer to a new compressibleVoFphase.
virtual autoPtr< VoFphase > operator()(Istream &is) const
iNew(const fvMesh &mesh, const volScalarField &T)
Single compressible phase derived from the VoFphase.
compressibleVoFphase(const word &name, const fvMesh &mesh, const volScalarField &T)
Construct from components.
void correct(const volScalarField &p, const volScalarField &T)
virtual autoPtr< VoFphase > clone() const
Return clone.
const volScalarField::Internal & vDot() const
Return const-access to phase divergence.
const rhoFluidThermo & thermo() const
Return const-access to phase rhoFluidThermo.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
Base-class for fluid thermodynamic properties based on density.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
volScalarField & p