Commit 1d4bedae authored by Henry Weller's avatar Henry Weller
Browse files

surfaceFilmModels::BrunDrippingInjection: New dripping model based on the...

surfaceFilmModels::BrunDrippingInjection: New dripping model based on the Rayleigh-Taylor stability analysis
of film flow on an inclined plane by Brun et.al.

    Brun, P. T., Damiano, A., Rieu, P., Balestra, G., & Gallaire, F. (2015).
    Rayleigh-Taylor instability under an inclined plane.
    Physics of Fluids (1994-present), 27(8), 084107.
parent 1467bf24
......@@ -20,6 +20,7 @@ $(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModelNew.C
$(KINEMATICMODELS)/injectionModel/injectionModelList/injectionModelList.C
$(KINEMATICMODELS)/injectionModel/drippingInjection/drippingInjection.C
$(KINEMATICMODELS)/injectionModel/BrunDrippingInjection/BrunDrippingInjection.C
$(KINEMATICMODELS)/injectionModel/patchInjection/patchInjection.C
$(KINEMATICMODELS)/injectionModel/curvatureSeparation/curvatureSeparation.C
......
......@@ -340,7 +340,7 @@ public:
//- Return const access to the dynamic viscosity / [Pa.s]
inline const volScalarField& mu() const;
//- Return const access to the surface tension / [m/s2]
//- Return const access to the surface tension / [kg/s2]
inline const volScalarField& sigma() const;
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 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/>.
\*---------------------------------------------------------------------------*/
#include "BrunDrippingInjection.H"
#include "addToRunTimeSelectionTable.H"
#include "fvMesh.H"
#include "Time.H"
#include "mathematicalConstants.H"
#include "Random.H"
#include "volFields.H"
#include "kinematicSingleLayer.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace regionModels
{
namespace surfaceFilmModels
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(BrunDrippingInjection, 0);
addToRunTimeSelectionTable(injectionModel, BrunDrippingInjection, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
BrunDrippingInjection::BrunDrippingInjection
(
surfaceFilmModel& owner,
const dictionary& dict
)
:
injectionModel(type(), owner, dict),
ubarStar_(coeffDict_.lookupOrDefault("ubarStar", 1.62208)),
deltaStable_(readScalar(coeffDict_.lookup("deltaStable"))),
particlesPerParcel_(readScalar(coeffDict_.lookup("particlesPerParcel"))),
rndGen_(label(0), -1),
parcelDistribution_
(
distributionModels::distributionModel::New
(
coeffDict_.subDict("parcelDistribution"),
rndGen_
)
),
diameter_(owner.regionMesh().nCells(), -1.0)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
BrunDrippingInjection::~BrunDrippingInjection()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void BrunDrippingInjection::correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
)
{
const kinematicSingleLayer& film =
refCast<const kinematicSingleLayer>(this->owner());
const scalar pi = constant::mathematical::pi;
// Calculate available dripping mass
tmp<volScalarField> tsinAlpha(film.gNorm()/mag(film.g()));
const scalarField& sinAlpha = tsinAlpha();
const scalarField& magSf = film.magSf();
const scalarField& delta = film.delta();
const scalarField& rho = film.rho();
const scalarField& sigma = film.sigma();
const scalar magg = mag(film.g().value());
scalarField massDrip(film.regionMesh().nCells(), 0.0);
forAll(delta, i)
{
if (sinAlpha[i] > SMALL && delta[i] > deltaStable_)
{
scalar lc = sqrt(sigma[i]/(rho[i]*magg));
scalar deltaStable = max
(
3*lc*sqrt(1 - sqr(sinAlpha[i]))
/(ubarStar_*sqrt(sinAlpha[i])*sinAlpha[i]),
deltaStable_
);
Info<< delta[i] << " " << deltaStable << endl;
if (delta[i] > deltaStable)
{
const scalar ddelta = max(0.0, delta[i] - deltaStable);
massDrip[i] +=
min(availableMass[i], max(0.0, ddelta*rho[i]*magSf[i]));
}
}
}
// Collect the data to be transferred
forAll(massDrip, celli)
{
if (massDrip[celli] > 0)
{
// Set new particle diameter if not already set
if (diameter_[celli] < 0)
{
diameter_[celli] = parcelDistribution_->sample();
}
scalar& diam = diameter_[celli];
scalar rhoc = rho[celli];
scalar minMass = particlesPerParcel_*rhoc*pi/6*pow3(diam);
if (massDrip[celli] > minMass)
{
// All drip mass can be injected
massToInject[celli] += massDrip[celli];
availableMass[celli] -= massDrip[celli];
// Set particle diameter
diameterToInject[celli] = diam;
// Retrieve new particle diameter sample
diam = parcelDistribution_->sample();
addToInjectedMass(massDrip[celli]);
}
else
{
// Particle mass below minimum threshold - cannot be injected
massToInject[celli] = 0;
diameterToInject[celli] = 0;
}
}
else
{
massToInject[celli] = 0;
diameterToInject[celli] = 0;
}
}
injectionModel::correct();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace surfaceFilmModels
} // End namespace regionModels
} // End namespace Foam
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 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::BrunDrippingInjection
Description
Film Dripping mass transfer model.
If the film thickness exceeds the critical value needed to generate a valid
parcel, the equivalent mass is removed from the film. The critical film
thickness is calculated from the Rayleigh-Taylor stability analysis
of film flow on an inclined plane by Brun et.al.
Reference:
\verbatim
Brun, P. T., Damiano, A., Rieu, P., Balestra, G., & Gallaire, F. (2015).
Rayleigh-Taylor instability under an inclined plane.
Physics of Fluids (1994-present), 27(8), 084107.
\endverbatim
New parcel diameters are sampled from a PDF.
SourceFiles
BrunDrippingInjection.C
\*---------------------------------------------------------------------------*/
#ifndef BrunDrippingInjection_H
#define BrunDrippingInjection_H
#include "injectionModel.H"
#include "distributionModel.H"
#include "cachedRandom.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace regionModels
{
namespace surfaceFilmModels
{
/*---------------------------------------------------------------------------*\
Class BrunDrippingInjection Declaration
\*---------------------------------------------------------------------------*/
class BrunDrippingInjection
:
public injectionModel
{
// Private member functions
//- Disallow default bitwise copy construct
BrunDrippingInjection(const BrunDrippingInjection&);
//- Disallow default bitwise assignment
void operator=(const BrunDrippingInjection&);
protected:
// Protected data
//- Critical non-dimensional interface velocity
// Coefficient in the film angle stability function
// defaults to 1.62208
scalar ubarStar_;
//- Stable film thickness - drips only formed if thickness
// execeeds this threhold value
scalar deltaStable_;
//- Number of particles per parcel
scalar particlesPerParcel_;
//- Random number generator
cachedRandom rndGen_;
//- Parcel size PDF model
const autoPtr<distributionModels::distributionModel>
parcelDistribution_;
//- Diameters of particles to inject into the dripping
scalarList diameter_;
public:
//- Runtime type information
TypeName("BrunDrippingInjection");
// Constructors
//- Construct from surface film model
BrunDrippingInjection
(
surfaceFilmModel& owner,
const dictionary& dict
);
//- Destructor
virtual ~BrunDrippingInjection();
// Member Functions
//- Correct
virtual void correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace surfaceFilmModels
} // End namespace regionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment