MRG: Integrated Foundation code to commit ba4dbed

This commit is contained in:
Andrew Heather
2017-03-23 12:11:49 +00:00
157 changed files with 1051 additions and 1718 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -681,6 +681,14 @@ void Foam::multiphaseMixture::solveAlphas
<< ' ' << max(sumAlpha).value()
<< endl;
// Correct the sum of the phase-fractions to avoid 'drift'
volScalarField sumCorr(1.0 - sumAlpha);
forAllIter(PtrDictionary<phase>, phases_, iter)
{
phase& alpha = iter();
alpha += alpha*sumCorr;
}
calcAlphas();
}