Kunz.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) 2011-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::cavitationModels::Kunz
26 
27 Description
28  Kunz cavitation model.
29 
30  Slightly modified so that the condensation term is switched off when the
31  pressure is less than the saturation vapour pressure. This change allows
32  the condensation term to be formulated as a coefficient multiplying (p -
33  p_sat) so that it can be included as an implicit term in the pressure
34  equation.
35 
36  Reference:
37  \verbatim
38  Kunz, R. F., Boger, D. A., Stinebring, D. R., Chyczewski,
39  T. S., Lindau, J. W., Gibeling, H. J., ... & Govindan, T. (2000).
40  A preconditioned Navier–Stokes method for two-phase flows
41  with application to cavitation prediction.
42  Computers & Fluids, 29(8), 849-875.
43  \endverbatim
44 
45 Usage:
46  \table
47  Property | Description | Required | Default value
48  liquid | Name of the liquid phase | yes |
49  pSat | Saturation vapor pressure | yes |
50  Uinf | Free-stream velocity | yes |
51  tInf | Vaporisation/condensation time scale | yes |
52  Cv | Vapourisation rate coefficient | yes |
53  Cc | Condensation rate coefficient | yes |
54  \endtable
55 
56  Example:
57  \verbatim
58  model Kunz;
59 
60  liquid liquid;
61 
62  pSat 2300;
63 
64  UInf 20;
65  tInf 0.005; // L = 0.1 m
66  Cv 1000;
67  Cc 1000;
68  \endverbatim
69 
70 SourceFiles
71  Kunz.C
72 
73 \*---------------------------------------------------------------------------*/
74 
75 #ifndef Kunz_H
76 #define Kunz_H
77 
78 #include "cavitationModel.H"
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 namespace Foam
83 {
84 namespace cavitationModels
85 {
86 
87 /*---------------------------------------------------------------------------*\
88  Class Kunz
89 \*---------------------------------------------------------------------------*/
90 
91 class Kunz
92 :
93  public cavitationModel
94 {
95  // Private Data
96 
97  //- Free-stream velocity
98  dimensionedScalar UInf_;
99 
100  //- Vaporisation time scale
101  dimensionedScalar tInf_;
102 
103  //- Vaporisation rate coefficient
104  dimensionedScalar Cv_;
105 
106  //- Condensation rate coefficient
107  dimensionedScalar Cc_;
108 
109  //- Zero with pressure dimensions
110  dimensionedScalar p0_;
111 
112  dimensionedScalar mcCoeff_;
113 
114  dimensionedScalar mvCoeff_;
115 
116 
117 public:
118 
119  //- Runtime type information
120  TypeName("Kunz");
121 
122 
123  // Constructors
124 
125  //- Construct for phases
126  Kunz
127  (
128  const dictionary& dict,
129  const incompressibleTwoPhases& phases
130  );
131 
132 
133  //- Destructor
134  virtual ~Kunz()
135  {}
136 
137 
138  // Member Functions
139 
140  //- Return the mass condensation and vaporisation rates as a
141  // coefficient to multiply alphav for the condensation rate and a
142  // coefficient to multiply alphal for the vaporisation rate
144 
145  //- Return the mass condensation and vaporisation rates as coefficients
146  // to multiply (p - pSat)
148 
149  //- Correct the Kunz phaseChange model
150  virtual void correct();
151 
152  //- Read the dictionary and update
153  virtual bool read(const dictionary& dict);
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace cavitationModels
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:65
virtual ~Kunz()
Destructor.
Definition: Kunz.H:168
TypeName("Kunz")
Runtime type information.
virtual void correct()
Correct the Kunz phaseChange model.
Definition: Kunz.C:106
Kunz(const dictionary &dict, const incompressibleTwoPhases &phases)
Construct for phases.
Definition: Kunz.C:43
virtual bool read(const dictionary &dict)
Read the dictionary and update.
Definition: Kunz.C:110
virtual Pair< tmp< volScalarField::Internal > > mDotcvAlpha() const
Return the mass condensation and vaporisation rates as a.
Definition: Kunz.C:67
virtual Pair< tmp< volScalarField::Internal > > mDotcvP() const
Return the mass condensation and vaporisation rates as coefficients.
Definition: Kunz.C:87
Abstract base class for cavitation models.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Interface to two constant density phases.
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dictionary dict