From be293962b6dc6207897d6e146ce1502eadb763d3 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Fri, 9 Oct 2015 12:33:33 +0200 Subject: [PATCH] changing the perforation pressure initialization to make it slightly different from the pressure of the perforation cell to avoid NaN for cqt_is. anotehr way can be initialized them related to the bhp of the well. some tests will be performed in the future. --- opm/autodiff/WellStateMultiSegment.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opm/autodiff/WellStateMultiSegment.hpp b/opm/autodiff/WellStateMultiSegment.hpp index 5ce218bb5..e80d2402f 100644 --- a/opm/autodiff/WellStateMultiSegment.hpp +++ b/opm/autodiff/WellStateMultiSegment.hpp @@ -208,7 +208,8 @@ namespace Opm for (int p = 0; p < np; ++p) { perfPhaseRates()[np * (i + start_perforation) + p] = wellRates()[np * w + p] / double(number_of_perforations); } - perfPress()[i + start_perforation] = state.pressure()[wells[w]->wellCells()[i]]; + const double safety_factor = (wells[w]->wellType() == INJECTOR) ? 1.01 : 0.99; + perfPress()[i + start_perforation] = safety_factor * state.pressure()[wells[w]->wellCells()[i]]; } // 5. Segment rates and pressures