File size: 11,679 Bytes
5a600cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Copyright (C) 2024-2026 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

Class
    Foam::fv::wallBoiling

Description
    Model for nucleate wall boiling between two phases on the surface of a
    number of wall patches.

    This model implements a version of the well-known RPI wall boiling model
    (Kurul & Podowski, 1991). The model is based on an implementation described
    in Peltola et al. (2019) and is similar to the model described by Peltola &
    Pättikangas (2012).

    References:
    \verbatim
        Kurul, N., & Podowski, M.Z. (1991).
        On the modeling of multidimensional effects in boiling channels.
        ANS. Proc. National Heat Transfer Con. Minneapolis, Minnesota, USA,
        1991.
        ISBN: 0-89448-162-1, pp. 30-40.
    \endverbatim

    \verbatim
        Peltola, J., Pättikangas, T., Bainbridge, W., Lehnigk, R., Schlegel, F.
        (2019).
        On Development and validation of subcooled nucleate boiling models for
        OpenFOAM Foundation Release.
        NURETH-18 Conference Proceedings, Portland, Oregon, United States, 2019.
    \endverbatim

    \verbatim
        Peltola, J., & Pättikangas, T.J.H. (2012).
        Development and validation of a boiling model for OpenFOAM multiphase
        solver.
        CFD4NRS-4 Conference Proceedings, Daejeon, Korea, 2012.
        paper 59.
    \endverbatim

Usage
    Example usage:
    \verbatim
    wallBoiling
    {
        type            wallBoiling;
        libs            ("libmultiphaseEulerFvModels.so");

        // Note: Order is important. This model is one-way. It turns liquid
        // into vapour. The phases should be specified in this order.
        phases          (water steam);

        energySemiImplicit no;

        saturationTemperature
        {
            type            constant;
            value           372.76;
        }

        partitioningModel
        {
            type            Lavieville;
            alphaCrit       0.2;
        }

        nucleationSiteModel
        {
            type            LemmertChawla;
            Cn              1;
            NRef            30000000;
            deltaTRef       10;
        }

        departureDiameterModel
        {
            type            TolubinskiKostanchuk;
            dRef            0.00024;
            dMax            0.0014;
            dMin            1e-06;
        }

        departureFrequencyModel
        {
            type            KocamustafaogullariIshii;
            Cf              1.18;
        }
    }
    \endverbatim

    In addition to the above fvModel specification, wall patches on which
    boiling is to be calculated should have an alphatPhaseChangeWallFunction
    boundary condition applied to the turbulent thermal diffusivity field.

See also
    Foam::alphatPhaseChangeWallFunctionFvPatchScalarField

SourceFiles
    wallBoiling.C

\*---------------------------------------------------------------------------*/

#ifndef wallBoiling_H
#define wallBoiling_H

#include "wallPhaseChange.H"
#include "nucleation.H"
#include "phaseSystem.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

// Forward declaration of classes
namespace wallBoilingModels
{
    class partitioningModel;
    class nucleationSiteModel;
    class departureDiameterModel;
    class departureFrequencyModel;
}

class wallBoilingPhaseChangeRateFvPatchScalarField;

namespace fv
{

/*---------------------------------------------------------------------------*\
              Class wallBoiling Declaration
\*---------------------------------------------------------------------------*/

class wallBoiling
:
    public wallPhaseChange,
    public nucleation
{
private:

    // Private classes

        //- Struct to hold properties that are held constant during the
        //  iterative solution procedure
        struct laggedProperties;


    // Private Data

        //- Reference to the liquid phase
        const phaseModel& liquid_;

        //- Reference to the vapour phase
        const phaseModel& vapour_;

        //- Reference to the liquid turbulent thermal diffusivity
        const volScalarField& alphatLiquid_;

        //- Reference to the vapour turbulent thermal diffusivity
        const volScalarField& alphatVapour_;

        //- Reference to the field associated with the pressure equation
        const volScalarField& p_rgh_;

        //- Solution tolerance
        scalar tolerance_;

        //- Estimate liquid temperature using logarithmic wall function?
        bool liquidTemperatureWallFunction_;

        //- Turbulent Prandtl number
        scalar Prt_;

        //- Bubble waiting time ratio
        scalar bubbleWaitingTimeRatio_;

        //- Saturation temperature as a function of pressure
        autoPtr<Function1<scalar>> Tsat_;

        //- Run-time selected heat flux partitioning model
        autoPtr<wallBoilingModels::partitioningModel> partitioningModel_;

        //- Run-time selected nucleation site density model
        autoPtr<wallBoilingModels::nucleationSiteModel> nucleationSiteModel_;

        //- Run-time selected bubble departure diameter model
        autoPtr<wallBoilingModels::departureDiameterModel>
            departureDiameterModel_;

        //- Run-time selected bubble departure frequency model
        autoPtr<wallBoilingModels::departureFrequencyModel>
            departureFrequencyModel_;

        //- Counter for the evaluations of the pressure equation sources
        mutable label pressureEquationIndex_;

        //- The phase change rate
        mutable volScalarField mDot_;


    // Private Member Functions

        //- Non-virtual read
        void readCoeffs(const dictionary& dict);

        //- Get the liquid temperature patch field and the parameters
        //  associated with its boundary condition that are necessary for
        //  approximately evaluating the boundary condition's heat flux at
        //  a given wall temperature.
        const fvPatchScalarField& getLiquidTemperaturePatchField
        (
            const laggedProperties& lagProps,
            scalarField& isFixed,
            scalarField& h,
            scalarField& hTaPlusQa
        ) const;

        //- Calculate the boiling for the given wall temperature. Return
        //  the total sum of all heat fluxes. Set the properties passed by
        //  non-const reference. Used by the functions below.
        tmp<scalarField> calcBoiling
        (
            const laggedProperties& lagProps,
            const scalarField& TLiquid,
            const scalarField& wetFraction,
            scalarField& dDeparture,
            scalarField& fDeparture,
            scalarField& nucleationSiteDensity,
            scalarField& qQuenching,
            scalarField& qEvaporative,
            scalarField& mDot
        ) const;

        //- Calculate the boiling for the given wall temperature. Return
        //  the total sum of all heat fluxes. Use this to solve the balance
        //  between the heat fluxes specified by the boiling models and the
        //  temperature boundary condition without changing the stored
        //  boiling state.
        tmp<scalarField> calcBoiling
        (
            const wallBoilingPhaseChangeRateFvPatchScalarField& mDot,
            const laggedProperties& lagProps,
            const scalarField& TLiquid
        ) const;

        //- Calculate the boiling for the given wall temperature. Return
        //  the total sum of all heat fluxes. Also set the stored boiling
        //  state. Use this after solving with the final wall temperature
        //  to set the boiling state.
        tmp<scalarField> evaluateBoiling
        (
            wallBoilingPhaseChangeRateFvPatchScalarField& mDot,
            const laggedProperties& lagProps,
            const scalarField& TLiquid
        ) const;

        //- Correct the phase change rate
        void correctMDot() const;


public:

    //- Runtime type information
    TypeName("wallBoiling");


    // Constructors

        //- Construct from explicit source name and mesh
        wallBoiling
        (
            const word& name,
            const word& modelType,
            const fvMesh& mesh,
            const dictionary& dict
        );


    // Member Functions

        // Access

            //- Return a mask indicating whether phase change is occurring
            virtual const scalarField& active(const label) const;

            //- Access the turbulent thermal diffusivities for a patch
            virtual Pair<const scalarField&> alphats(const label) const;


        // Evaluation

            //- Return the fraction of the latent heat that is transferred into
            //  the second phase
            virtual tmp<DimensionedField<scalar, fvMesh>> Lfraction() const;

            //- Return the diameter of nuclei
            virtual tmp<DimensionedField<scalar, fvMesh>> d() const;

            //- Return the number rate at which nuclei are generated
            virtual tmp<DimensionedField<scalar, fvMesh>> nDot() const;

            //- Return the nucleation time scale
            virtual tmp<DimensionedField<scalar, fvMesh>> tau() const;


        // Sources

            //- Return the mass transfer rate
            virtual tmp<DimensionedField<scalar, fvMesh>> mDot() const;

            //- Return the mass transfer rate for the given patch
            const wallBoilingPhaseChangeRateFvPatchScalarField& mDotPf
            (
                const label patchi
            ) const;

            //- Return the mass transfer rate for the given patch
            wallBoilingPhaseChangeRateFvPatchScalarField& mDotPfRef
            (
                const label patchi
            ) const;

            //- Use phaseChange's source functions
            using phaseChange::addSup;

            //- Override the pressure equation to add the mass transfer rate
            //  linearised in the pressure
            void addSup
            (
                const volScalarField& alpha,
                const volScalarField& rho,
                fvMatrix<scalar>& eqn
            ) const;


        //- Correct the fvModel
        virtual void correct();


        // IO

            //- Read source dictionary
            virtual bool read(const dictionary& dict);
};


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace fv
} // End namespace Foam

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif

// ************************************************************************* //