multiphaseEulerFoam: Corrected the handling of drag for more than 2 phases

This commit is contained in:
Henry
2012-03-14 18:19:18 +00:00
parent f3fac5bbff
commit 0d0dfbafe3

View File

@ -76,6 +76,7 @@
+ fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi())
+ rAlphaAUfs[phasei]*(g & mesh.Sf())
);
mrfZones.relativeFlux(phiHbyAs[phasei]);
multiphaseSystem::dragModelTable::const_iterator dmIter =
@ -89,11 +90,20 @@
++dmIter, ++dcIter
)
{
const phaseModel *phase2Ptr = &dmIter()->phase2();
if (phase2Ptr == &phase)
const phaseModel *phase2Ptr = NULL;
if (&phase == &dmIter()->phase1())
{
phase2Ptr = &dmIter()->phase2();
}
else if (&phase == &dmIter()->phase2())
{
phase2Ptr = &dmIter()->phase1();
}
else
{
continue;
}
phiHbyAs[phasei] +=
fvc::interpolate