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::compressible::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 compressible
85 {
86 namespace cavitationModels
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class Kunz
91 \*---------------------------------------------------------------------------*/
92 
93 class Kunz
94 :
95  public cavitationModel
96 {
97  // Private Data
98 
99  //- Free-stream velocity
100  dimensionedScalar UInf_;
101 
102  //- Vaporisation time scale
103  dimensionedScalar tInf_;
104 
105  //- Vaporisation rate coefficient
106  dimensionedScalar Cv_;
107 
108  //- Condensation rate coefficient
109  dimensionedScalar Cc_;
110 
111  //- Zero with pressure dimensions
112  dimensionedScalar p0_;
113 
114 
115  // Private Member functions
116 
117  tmp<volScalarField::Internal> mvCoeff() const;
118 
119  tmp<volScalarField::Internal> mcCoeff() const;
120 
121 
122 public:
123 
124  //- Runtime type information
125  TypeName("Kunz");
126 
127 
128  // Constructors
129 
130  //- Construct for phases
131  Kunz
132  (
133  const dictionary& dict,
134  const compressibleTwoPhases& phases
135  );
136 
137 
138  //- Destructor
139  virtual ~Kunz()
140  {}
141 
142 
143  // Member Functions
144 
145  //- Return the mass condensation and vaporisation rates as a
146  // coefficient to multiply alphav for the condensation rate and a
147  // coefficient to multiply alphal for the vaporisation rate
149 
150  //- Return the mass condensation and vaporisation rates as coefficients
151  // to multiply (p - pSat)
153 
154  //- Correct the Kunz phaseChange model
155  virtual void correct();
156 
157  //- Read the dictionary and update
158  virtual bool read(const dictionary& dict);
159 };
160 
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 } // End namespace cavitationModels
165 } // End namespace compressible
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:65
TypeName("Kunz")
Runtime type information.
virtual Pair< tmp< volScalarField::Internal > > mDotcvAlphal() const
Return the mass condensation and vaporisation rates as a.
Definition: Kunz.C:82
virtual void correct()
Correct the Kunz phaseChange model.
Definition: Kunz.C:132
virtual bool read(const dictionary &dict)
Read the dictionary and update.
Definition: Kunz.C:137
Kunz(const dictionary &dict, const compressibleTwoPhases &phases)
Construct for phases.
Definition: Kunz.C:47
virtual Pair< tmp< volScalarField::Internal > > mDotcvP() const
Return the mass condensation and vaporisation rates as coefficients.
Definition: Kunz.C:105
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
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dictionary dict