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 
108 
109  //- The name of the VoF phase-fraction
110  word alphaName_;
111 
112 
113 public:
114 
115  //- Runtime type information
116  TypeName("compressible::VoFCavitation");
117 
118 
119  // Constructors
120 
121  //- Construct from explicit source name and mesh
123  (
124  const word& sourceName,
125  const word& modelType,
126  const fvMesh& mesh,
127  const dictionary& dict
128  );
129 
130  //- Disallow default bitwise copy construction
132  (
133  const VoFCavitation&
134  ) = delete;
135 
136 
137  // Member Functions
138 
139  //- Return the list of fields for which the option adds source term
140  // to the transport equation
141  virtual wordList addSupFields() const;
142 
143  //- Add implicit/explicit contributions to VoF phase-fraction equation
144  virtual void addSup
145  (
146  fvMatrix<scalar>& eqn,
147  const word& fieldName
148  ) const;
149 
150  //- Add implicit/explicit contributions to p_rgh equation
151  virtual void addSup
152  (
153  const volScalarField& psi,
154  fvMatrix<scalar>& eqn,
155  const word& fieldName
156  ) const;
157 
158 
159  // Mesh changes
160 
161  //- Update topology using the given map
162  virtual void topoChange(const polyTopoChangeMap&);
163 
164  //- Update from another mesh using the given map
165  virtual void mapMesh(const polyMeshMap&);
166 
167  //- Redistribute or update using the given distribution map
168  virtual void distribute(const polyDistributionMap&);
169 
170  //- Update for mesh motion
171  virtual bool movePoints();
172 
173 
174  //- Correct the cavitation model
175  virtual void correct();
176 
177 
178  // Member Operators
179 
180  //- Disallow default bitwise assignment
181  void operator=(const VoFCavitation&) = delete;
182 };
183 
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 } // End namespace compressible
188 } // End namespace fv
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
Generic GeometricField class.
Class to represent a mixture of two rhoThermo-based phases.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
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:101
Finite volume model abstract base class.
Definition: fvModel.H:59
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
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:80
virtual void correct()
Correct the cavitation model.
virtual void addSup(fvMatrix< scalar > &eqn, const word &fieldName) const
Add implicit/explicit contributions to VoF phase-fraction equation.
Definition: VoFCavitation.C:87
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.
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
const volScalarField & psi
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict