ebos: use the average phase density for the gravity correction

this does *not* make more sense than using the cell densities, but it
looks like E100 does it that way. (so we do it the same in ebos.)
This commit is contained in:
Andreas Lauser 2015-11-04 13:38:51 +01:00
parent ce517e5e3d
commit 55c4bdf417

View File

@ -226,12 +226,13 @@ protected:
// do the gravity correction at the face's integration point
const Evaluation& rhoIn = intQuantsIn.fluidState().density(phaseIdx);
Scalar rhoEx = Toolbox::value(intQuantsEx.fluidState().density(phaseIdx));
Evaluation rhoAvg = (rhoIn + rhoEx)/2;
Evaluation pressureInterior = intQuantsIn.fluidState().pressure(phaseIdx);
Scalar pressureExterior = Toolbox::value(intQuantsEx.fluidState().pressure(phaseIdx));
Evaluation pressureExterior = Toolbox::value(intQuantsEx.fluidState().pressure(phaseIdx));
pressureInterior += - rhoIn*(g*distZIn);
pressureExterior += - rhoEx*(g*distZEx);
pressureInterior += - rhoAvg*(g*distZIn);
pressureExterior += - rhoAvg*(g*distZEx);
pressureDifferential_[phaseIdx] = pressureExterior - pressureInterior;