VoFCavitation.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) 2022-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::fv::compressible::VoFCavitation
26 
27 Description
28  Cavitation fvModel
29 
30 Usage
31  Example usage:
32  \verbatim
33  VoFCavitation
34  {
35  type VoFCavitation;
36 
37  model SchnerrSauer;
38 
39  KunzCoeffs
40  {
41  pSat 2300; // Saturation pressure
42 
43  UInf 20.0;
44  tInf 0.005; // L = 0.1 m
45  Cc 1000;
46  Cv 1000;
47  }
48 
49  MerkleCoeffs
50  {
51  pSat 2300; // Saturation pressure
52 
53  UInf 20.0;
54  tInf 0.005; // L = 0.1 m
55  Cc 80;
56  Cv 1e-03;
57  }
58 
59  SchnerrSauerCoeffs
60  {
61  pSat 2300; // Saturation pressure
62 
63  n 1.6e+13;
64  dNuc 2.0e-06;
65  Cc 1;
66  Cv 1;
67  }
68  }
69  \endverbatim
70 
71 SourceFiles
72  VoFCavitation.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef VoFCavitation_H
77 #define VoFCavitation_H
78 
79 #include "fvModel.H"
80 #include "cavitationModel.H"
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 
87 class compressibleTwoPhaseVoFMixture;
88 
89 namespace fv
90 {
91 namespace compressible
92 {
93 
94 /*---------------------------------------------------------------------------*\
95  Class VoFCavitation Declaration
96 \*---------------------------------------------------------------------------*/
97 
98 class VoFCavitation
99 :
100  public fvModel
101 {
102  // Private Data
103 
104  //- Reference to the mixture properties
105  const compressibleTwoPhaseVoFMixture& mixture_;
106 
107  //- The cavitation model
109 
110 
111 public:
112 
113  //- Runtime type information
114  TypeName("compressible::VoFCavitation");
115 
116 
117  // Constructors
118 
119  //- Construct from explicit source name and mesh
121  (
122  const word& sourceName,
123  const word& modelType,
124  const fvMesh& mesh,
125  const dictionary& dict
126  );
127 
128  //- Disallow default bitwise copy construction
130  (
131  const VoFCavitation&
132  ) = delete;
133 
134 
135  // Member Functions
136 
137  //- Return the list of fields for which the option adds source term
138  // to the transport equation
139  virtual wordList addSupFields() const;
140 
141  //- Add a source to the phase continuity equation
142  virtual void addSup
143  (
144  const volScalarField& alpha,
145  const volScalarField& rho,
146  fvMatrix<scalar>& eqn
147  ) const;
148 
149 
150  // Mesh changes
151 
152  //- Update topology using the given map
153  virtual void topoChange(const polyTopoChangeMap&);
154 
155  //- Update from another mesh using the given map
156  virtual void mapMesh(const polyMeshMap&);
157 
158  //- Redistribute or update using the given distribution map
159  virtual void distribute(const polyDistributionMap&);
160 
161  //- Update for mesh motion
162  virtual bool movePoints();
163 
164 
165  //- Correct the cavitation model
166  virtual void correct();
167 
168 
169  // Member Operators
170 
171  //- Disallow default bitwise assignment
172  void operator=(const VoFCavitation&) = delete;
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace compressible
179 } // End namespace fv
180 } // End namespace Foam
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #endif
185 
186 // ************************************************************************* //
Generic GeometricField class.
Class to represent a mixture of two rhoFluidThermo-based phases.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Finite volume model abstract base class.
Definition: fvModel.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:53
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
Definition: VoFCavitation.C:78
virtual void correct()
Correct the cavitation model.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
TypeName("compressible::VoFCavitation")
Runtime type information.
virtual void addSup(const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn) const
Add a source to the phase continuity equation.
Definition: VoFCavitation.C:89
void operator=(const VoFCavitation &)=delete
Disallow default bitwise assignment.
VoFCavitation(const word &sourceName, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
Definition: VoFCavitation.C:55
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Definition: word.H:62
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict