reactingMultiphaseEulerFoam: Limited phase-fractions

for consistency with reactingTwoPhaseEulerFoam and to ensure correct operation
of models requiring formal boundedness of phase-fractions.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2589
This commit is contained in:
Henry Weller
2017-06-26 16:24:57 +01:00
committed by Andrew Heather
parent 7b2d419157
commit cc9ffdffbb
4 changed files with 25 additions and 3 deletions

View File

@ -699,6 +699,9 @@ void Foam::multiphaseSystem::solve()
{
phaseModel& phase = phases()[phasei];
phase.alphaRhoPhi() = fvc::interpolate(phase.rho())*phase.alphaPhi();
// Ensure the phase-fractions are bounded
phase.maxMin(0, 1);
}
calcAlphas();

View File

@ -403,8 +403,7 @@ void Foam::twoPhaseSystem::solve()
<< endl;
// Ensure the phase-fractions are bounded
alpha1.max(0);
alpha1.min(1);
alpha1.maxMin(0, 1);
// Update the phase-fraction of the other phase
alpha2 = scalar(1) - alpha1;