mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
ce517e5e3d
commit
55c4bdf417
@ -226,12 +226,13 @@ protected:
|
|||||||
// do the gravity correction at the face's integration point
|
// do the gravity correction at the face's integration point
|
||||||
const Evaluation& rhoIn = intQuantsIn.fluidState().density(phaseIdx);
|
const Evaluation& rhoIn = intQuantsIn.fluidState().density(phaseIdx);
|
||||||
Scalar rhoEx = Toolbox::value(intQuantsEx.fluidState().density(phaseIdx));
|
Scalar rhoEx = Toolbox::value(intQuantsEx.fluidState().density(phaseIdx));
|
||||||
|
Evaluation rhoAvg = (rhoIn + rhoEx)/2;
|
||||||
|
|
||||||
Evaluation pressureInterior = intQuantsIn.fluidState().pressure(phaseIdx);
|
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);
|
pressureInterior += - rhoAvg*(g*distZIn);
|
||||||
pressureExterior += - rhoEx*(g*distZEx);
|
pressureExterior += - rhoAvg*(g*distZEx);
|
||||||
|
|
||||||
pressureDifferential_[phaseIdx] = pressureExterior - pressureInterior;
|
pressureDifferential_[phaseIdx] = pressureExterior - pressureInterior;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user