Commit 454df842 authored by Henry Weller's avatar Henry Weller
Browse files

BrunDrippingInjection: Simplified implementation

parent 8d564f1b
......@@ -85,13 +85,14 @@ void BrunDrippingInjection::correct
const scalarField& sigma = film.sigma();
const scalar magg = mag(film.g().value());
scalarField massDrip(film.regionMesh().nCells(), scalar(0));
forAll(delta, celli)
{
bool dripping = false;
if (sinAlpha[celli] > SMALL && delta[celli] > deltaStable_)
{
const scalar lc = sqrt(sigma[celli]/(rho[celli]*magg));
const scalar rhoc = rho[celli];
const scalar lc = sqrt(sigma[celli]/(rhoc*magg));
const scalar deltaStable = max
(
3*lc*sqrt(1 - sqr(sinAlpha[celli]))
......@@ -102,35 +103,30 @@ void BrunDrippingInjection::correct
if (delta[celli] > deltaStable)
{
const scalar ddelta = max(delta[celli] - deltaStable, 0);
massDrip[celli] +=
min
(
availableMass[celli],
max(ddelta*rho[celli]*magSf[celli], 0)
);
}
}
}
// Collect the data to be transferred
forAll(massDrip, celli)
{
if (massDrip[celli] > 0)
{
const scalar rhoc = rho[celli];
const scalar diam = dCoeff_*sqrt(sigma[celli]/(rhoc*magg));
diameter_[celli] = diam;
const scalar massDrip =
min(availableMass[celli], max(ddelta*rhoc*magSf[celli], 0));
if (massDrip > 0)
{
const scalar diam = dCoeff_*lc;
diameter_[celli] = diam;
massToInject[celli] += massDrip[celli];
availableMass[celli] -= massDrip[celli];
massToInject[celli] += massDrip;
availableMass[celli] -= massDrip;
diameterToInject[celli] = diam;
addToInjectedMass(massDrip[celli]);
diameterToInject[celli] = diam;
addToInjectedMass(massDrip);
dripping = true;
}
}
}
else
if (!dripping)
{
massToInject[celli] = 0;
diameterToInject[celli] = 0;
massToInject[celli] = 0;
}
}
......
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