From 9d2eed7e5ae2f08242c5554bebddc936709bc7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 21 Feb 2014 14:47:14 +0100 Subject: [PATCH] Fix bug in saturation initialisation. We shall only use gas-water capillary to initialise when we would get unphysical saturations otherwise. --- opm/core/simulator/initStateEquil.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index e3460bc97..8e2b561ff 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -796,9 +796,10 @@ namespace Opm sg = satFromPc(props, gaspos, cell, pcog, increasing); 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 - // zones. Must recalculate using gas-water + // zones can lead to unphysical saturations when + // treated as above. Must recalculate using gas-water // capillary pressure. const double pcgw = phase_pressures[gaspos][local_index] - phase_pressures[waterpos][local_index]; sw = satFromSumOfPcs(props, waterpos, gaspos, cell, pcgw);