Fix bug in saturation initialisation.

We shall only use gas-water capillary to initialise when we would get
unphysical saturations otherwise.
This commit is contained in:
Atgeirr Flø Rasmussen 2014-02-21 14:47:14 +01:00 committed by Andreas Lauser
parent 0a8ae66046
commit 9d2eed7e5a

View File

@ -796,9 +796,10 @@ namespace Opm
sg = satFromPc(props, gaspos, cell, pcog, increasing); sg = satFromPc(props, gaspos, cell, pcog, increasing);
phase_saturations[gaspos][local_index] = sg; phase_saturations[gaspos][local_index] = sg;
} }
if (gas && water && sg > smin[gaspos] && sw > smin[waterpos]) { if (gas && water && (sg + sw > 1.0)) {
// Overlapping gas-oil and oil-water transition // Overlapping gas-oil and oil-water transition
// zones. Must recalculate using gas-water // zones can lead to unphysical saturations when
// treated as above. Must recalculate using gas-water
// capillary pressure. // capillary pressure.
const double pcgw = phase_pressures[gaspos][local_index] - phase_pressures[waterpos][local_index]; const double pcgw = phase_pressures[gaspos][local_index] - phase_pressures[waterpos][local_index];
sw = satFromSumOfPcs(props, waterpos, gaspos, cell, pcgw); sw = satFromSumOfPcs(props, waterpos, gaspos, cell, pcgw);