SchnerrSauer.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-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::compressible::cavitationModels::SchnerrSauer
26 
27 Description
28  SchnerrSauer cavitation model.
29 
30  Reference:
31  \verbatim
32  Schnerr, G. H., & Sauer, J. (2001, May).
33  Physical and numerical modeling of unsteady cavitation dynamics.
34  In Fourth international conference on multiphase flow (Vol. 1).
35  New Orleans, LO, USA: ICMF New Orleans.
36  \endverbatim
37 
38 Usage:
39  \table
40  Property | Description | Required | Default value
41  liquid | Name of the liquid phase | yes |
42  pSat | Saturation vapor pressure | yes |
43  Uinf | Free-stream velocity | yes |
44  n | Bubble number density | yes |
45  dNuc | Nucleation site diameter | yes |
46  Cv | Vapourisation rate coefficient | yes |
47  Cc | Condensation rate coefficient | yes |
48  \endtable
49 
50  Example:
51  \verbatim
52  model SchnerrSauer;
53 
54  liquid liquid;
55 
56  pSat 2300;
57 
58  n 1.6e+13;
59  dNuc 2e-6;
60  Cv 1;
61  Cc 1;
62  \endverbatim
63 
64 SourceFiles
65  SchnerrSauer.C
66 
67 \*---------------------------------------------------------------------------*/
68 
69 #ifndef SchnerrSauer_H
70 #define SchnerrSauer_H
71 
72 #include "cavitationModel.H"
73 
74 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
75 
76 namespace Foam
77 {
78 namespace compressible
79 {
80 namespace cavitationModels
81 {
82 
83 /*---------------------------------------------------------------------------*\
84  Class SchnerrSauer
85 \*---------------------------------------------------------------------------*/
86 
87 class SchnerrSauer
88 :
89  public cavitationModel
90 {
91  // Private Data
92 
93  //- Bubble number density
95 
96  //- Nucleation site diameter
97  dimensionedScalar dNuc_;
98 
99  //- Vaporisation rate coefficient
100  dimensionedScalar Cv_;
101 
102  //- Condensation rate coefficient
103  dimensionedScalar Cc_;
104 
105  //- Zero with pressure dimensions
106  dimensionedScalar p0_;
107 
108 
109  // Private Member functions
110 
111  //- Nucleation site volume-fraction
112  dimensionedScalar alphaNuc() const;
113 
114  //- Reciprocal bubble radius
115  tmp<volScalarField::Internal> rRb
116  (
117  const volScalarField::Internal& limitedAlphal
118  ) const;
119 
120  //- Part of the condensation and vaporisation rates
121  tmp<volScalarField::Internal> pCoeff
122  (
124  const volScalarField::Internal& pSat
125  ) const;
126 
127 
128 public:
129 
130  //- Runtime type information
131  TypeName("SchnerrSauer");
132 
133 
134  // Constructors
135 
136  //- Construct for phases
138  (
139  const dictionary& dict,
140  const compressibleTwoPhases& phases,
141  const label liquidIndex
142  );
143 
144 
145  //- Destructor
146  virtual ~SchnerrSauer()
147  {}
148 
149 
150  // Member Functions
151 
152  //- Return the mass condensation and vaporisation rates as a
153  // coefficient to multiply alphav for the condensation rate and a
154  // coefficient to multiply alphal for the vaporisation rate
156 
157  //- Return the mass condensation and vaporisation rates as coefficients
158  // to multiply (p - pSat)
160 
161  //- Correct the SchnerrSauer phaseChange model
162  virtual void correct();
163 
164  //- Read the dictionary and update
165  virtual bool read(const dictionary& dict);
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace cavitationModels
172 } // End namespace compressible
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
An ordered pair of two objects of type <Type> with first() and second() elements.
Definition: Pair.H:66
virtual Pair< tmp< volScalarField::Internal > > mDotcvAlphal() const
Return the mass condensation and vaporisation rates as a.
Definition: SchnerrSauer.C:121
virtual void correct()
Correct the SchnerrSauer phaseChange model.
Definition: SchnerrSauer.C:171
TypeName("SchnerrSauer")
Runtime type information.
virtual bool read(const dictionary &dict)
Read the dictionary and update.
Definition: SchnerrSauer.C:176
virtual Pair< tmp< volScalarField::Internal > > mDotcvP() const
Return the mass condensation and vaporisation rates as coefficients.
Definition: SchnerrSauer.C:146
SchnerrSauer(const dictionary &dict, const compressibleTwoPhases &phases, const label liquidIndex)
Construct for phases.
Definition: SchnerrSauer.C:53
Abstract base class for cavitation models.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dictionary dict
volScalarField & p