Loading...
Searching...
No Matches
BrunDrippingInjection.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 OpenFOAM Foundation
9 Copyright (C) 2020-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
31
32// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33
34namespace Foam
35{
36namespace regionModels
39{
40
41// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
42
45(
47 BrunDrippingInjection,
49);
50
51
52// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
53
54BrunDrippingInjection::BrunDrippingInjection
55(
57 const dictionary& dict
58)
59:
60 injectionModel(type(), film, dict),
62 (
63 coeffDict_.getCheckOrDefault<scalar>
64 (
65 "ubarStar",
66 1.62208,
67 scalarMinMax::ge(SMALL)
68 )
69 ),
70 dCoeff_(coeffDict_.getOrDefault<scalar>("dCoeff", 3.3)),
71 deltaStable_(coeffDict_.getOrDefault<scalar>("deltaStable", 0)),
72 diameter_(film.regionMesh().nFaces(), -1.0)
73{}
74
75
76// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
77
79(
80 scalarField& availableMass,
81 scalarField& massToInject,
82 scalarField& diameterToInject
83)
84{
85 // Calculate available dripping mass
86 tmp<areaScalarField> tsinAlpha = -film().gn()/mag(film().g());
87 const scalarField& sinAlpha = tsinAlpha();
88
89 const areaScalarField& delta = film().h();
90 const areaScalarField& rho = film().rho();
91 const areaScalarField& sigma = film().sigma();
92 const scalar magg = mag(film().g().value());
93
94 forAll(delta, facei)
95 {
96 bool dripping = false;
97
98 if (sinAlpha[facei] > SMALL && delta[facei] > deltaStable_)
99 {
100 const scalar rhoc = rho[facei];
101 const scalar lc = sqrt(sigma[facei]/(rhoc*magg));
102 const scalar deltaStable = max
103 (
104 3*lc*sqrt(1 - sqr(sinAlpha[facei]))
105 /(ubarStar_*sqrt(sinAlpha[facei])*sinAlpha[facei]),
107 );
108
109 if (delta[facei] > deltaStable)
110 {
111 const scalar massDrip =
112 availableMass[facei]*(delta[facei] - deltaStable);
113
114 if (massDrip > 0)
115 {
116 const scalar diam = dCoeff_*lc;
117 diameter_[facei] = diam;
118
119 massToInject[facei] += massDrip;
120 availableMass[facei] -= massDrip;
121
122 diameterToInject[facei] = diam;
123 addToInjectedMass(massDrip);
124
125 dripping = true;
126 }
127 }
128 }
129
130 if (!dripping)
131 {
132 diameterToInject[facei] = 0;
133 massToInject[facei] = 0;
134 }
135 }
136
138}
139
140
141// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142
143} // End namespace areaSurfaceFilmModels
144} // End namespace regionModels
145} // End namespace Foam
146
147// ************************************************************************* //
scalar delta
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
const uniformDimensionedVectorField & g
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
scalar dCoeff_
Coefficient relating the diameter of the drops formed to the capillary length.
scalar deltaStable_
Stable film thickness - drips only formed if thickness exceeds this threshold value.
scalar ubarStar_
Critical non-dimensional interface velocity.
scalarList diameter_
Diameters of particles to inject into the dripping.
const liquidFilmBase & film() const
Return const access to the film surface film model.
Base class for film injection models, handling mass transfer from the film.
void addToInjectedMass(const scalar dMass)
Add to injected mass.
virtual const areaScalarField & sigma() const =0
Access const reference sigma.
const areaScalarField & gn() const noexcept
Access const reference gn.
virtual const areaScalarField & rho() const =0
Access const reference rho.
const areaScalarField & h() const noexcept
Access const reference h.
const dictionary coeffDict_
Coefficients dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
A class for managing temporary objects.
Definition tmp.H:75
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
Namespace for OpenFOAM.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition hashSets.C:40
dimensionedSymmTensor sqr(const dimensionedVector &dv)
MinMax< scalar > scalarMinMax
A scalar min/max range.
Definition MinMax.H:97
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
#define forAll(list, i)
Loop across all elements in list.
Definition stdFoam.H:299