twoPhaseEulerFoam: Added experimental face-based momentum equation formulation

This formulation provides C-grid like pressure-flux staggering on an
unstructured mesh which is hugely beneficial for Euler-Euler multiphase
equations as it allows for all forces to be treated in a consistent
manner on the cell-faces which provides better balance, stability and
accuracy.  However, to achieve face-force consistency the momentum
transport terms must be interpolated to the faces reducing accuracy of
this part of the system but this is offset by the increase in accuracy
of the force-balance.

Currently it is not clear if this face-based momentum equation
formulation is preferable for all Euler-Euler simulations so I have
included it on a switch to allow evaluation and comparison with the
previous cell-based formulation.  To try the new algorithm simply switch
it on, e.g.:

PIMPLE
{
    nOuterCorrectors 3;
    nCorrectors      1;
    nNonOrthogonalCorrectors 0;
    faceMomentum     yes;
}

It is proving particularly good for bubbly flows, eliminating the
staggering patterns often seen in the air velocity field with the
previous algorithm, removing other spurious numerical artifacts in the
velocity fields and improving stability and allowing larger time-steps
For particle-gas flows the advantage is noticeable but not nearly as
pronounced as in the bubbly flow cases.

Please test the new algorithm on your cases and provide feedback.

Henry G. Weller
CFD Direct
This commit is contained in:
Henry
2015-04-27 21:33:58 +01:00
parent 69d46a7e44
commit fc6b44ee3c
36 changed files with 1098 additions and 236 deletions

View File

@ -26,7 +26,6 @@ License
#include "twoPhaseSystem.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "BlendedInterfacialModel.H"
#include "dragModel.H"
#include "virtualMassModel.H"
#include "heatTransferModel.H"
#include "liftModel.H"
@ -48,6 +47,15 @@ License
#include "blendingMethod.H"
#include "HashPtrTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
Foam::dimensionedScalar Foam::twoPhaseSystem::zeroResidualAlpha_
(
"zeroResidualAlpha", dimless, 0
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::twoPhaseSystem::twoPhaseSystem
@ -299,46 +307,49 @@ Foam::tmp<Foam::surfaceScalarField> Foam::twoPhaseSystem::calcPhi() const
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::dragCoeff() const
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::Kd() const
{
return drag_->K();
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::virtualMassCoeff() const
Foam::tmp<Foam::surfaceScalarField> Foam::twoPhaseSystem::Kdf() const
{
return drag_->Kf();
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::Vm() const
{
return virtualMass_->K();
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::heatTransferCoeff() const
Foam::tmp<Foam::surfaceScalarField> Foam::twoPhaseSystem::Vmf() const
{
return virtualMass_->Kf();
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::Kh() const
{
return heatTransfer_->K();
}
Foam::tmp<Foam::volVectorField> Foam::twoPhaseSystem::liftForce() const
Foam::tmp<Foam::volVectorField> Foam::twoPhaseSystem::F() const
{
return lift_->F<vector>();
return lift_->F<vector>() + wallLubrication_->F<vector>();
}
Foam::tmp<Foam::volVectorField>
Foam::twoPhaseSystem::wallLubricationForce() const
Foam::tmp<Foam::surfaceScalarField> Foam::twoPhaseSystem::Ff() const
{
return wallLubrication_->F<vector>();
return lift_->Ff() + wallLubrication_->Ff();
}
Foam::tmp<Foam::volVectorField>
Foam::twoPhaseSystem::turbulentDispersionForce() const
{
return turbulentDispersion_->F<vector>();
}
Foam::tmp<Foam::volScalarField>
Foam::twoPhaseSystem::turbulentDiffusivity() const
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::D() const
{
return turbulentDispersion_->D();
}
@ -354,6 +365,13 @@ void Foam::twoPhaseSystem::solve()
const surfaceScalarField& phi1 = phase1_.phi();
const surfaceScalarField& phi2 = phase2_.phi();
Switch faceMomentum
(
//pimple.dict().lookupOrDefault<Switch>("faceMomentum", false)
mesh_.solutionDict().subDict("PIMPLE")
.lookupOrDefault<Switch>("faceMomentum", false)
);
const dictionary& alphaControls = mesh_.solverDict
(
alpha1.name()
@ -381,18 +399,40 @@ void Foam::twoPhaseSystem::solve()
if (implicitPhasePressure)
{
const volScalarField& rAU1 = mesh_.lookupObject<volScalarField>
(
IOobject::groupName("rAU", phase1_.name())
);
const volScalarField& rAU2 = mesh_.lookupObject<volScalarField>
(
IOobject::groupName("rAU", phase2_.name())
);
if (faceMomentum)
{
const surfaceScalarField& rAU1f =
mesh_.lookupObject<surfaceScalarField>
(
IOobject::groupName("rAUf", phase1_.name())
);
const surfaceScalarField& rAU2f =
mesh_.lookupObject<surfaceScalarField>
(
IOobject::groupName("rAUf", phase2_.name())
);
pPrimeByA =
fvc::interpolate(rAU1*phase1_.turbulence().pPrime())
+ fvc::interpolate(rAU2*phase2_.turbulence().pPrime());
volScalarField D(this->D());
pPrimeByA =
rAU1f*fvc::interpolate(D + phase1_.turbulence().pPrime())
+ rAU2f*fvc::interpolate(D + phase2_.turbulence().pPrime());
}
else
{
const volScalarField& rAU1 = mesh_.lookupObject<volScalarField>
(
IOobject::groupName("rAU", phase1_.name())
);
const volScalarField& rAU2 = mesh_.lookupObject<volScalarField>
(
IOobject::groupName("rAU", phase2_.name())
);
pPrimeByA =
fvc::interpolate(rAU1*phase1_.turbulence().pPrime())
+ fvc::interpolate(rAU2*phase2_.turbulence().pPrime());
}
surfaceScalarField phiP
(
@ -596,8 +636,21 @@ bool Foam::twoPhaseSystem::read()
}
const Foam::dragModel&
Foam::twoPhaseSystem::drag(const phaseModel& phase) const
const Foam::dimensionedScalar&
Foam::twoPhaseSystem::residualAlpha(const phaseModel& phase) const
{
if (drag_->hasModel(phase))
{
return drag_->phaseModel(phase).residualAlpha();
}
else
{
return zeroResidualAlpha_;
}
}
const Foam::dragModel& Foam::twoPhaseSystem::drag(const phaseModel& phase) const
{
return drag_->phaseModel(phase);
}