From e3c066cd0240fe94b0dccb76ab4d46826c02f497 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 20 Oct 2015 13:37:44 +0200 Subject: [PATCH] implement determining the threshold pressure from the initial condition This needs to be done if a equilibration region transition is mentioned by the THPRES keyword, but no value is given for this record in the third item. (it seems that this is used quite frequently.) Also, the approach taken by this patch also does not collide with the restart machinery as far as I can see. This is because the initial condition is applied by the simulator before the state at the restart time is loaded. (I interpreted the code that way, but I could be wrong, could anyone verify this?) since it is pretty elaborate to calculate initial condition, this patch is pretty messy. I also do not know if Eclipse does include capillary pressure in this calculation or not (this patch does). Huge kudos go to [at]totto82 for reviewing, testing and debugging this. --- opm/core/props/BlackoilPropertiesFromDeck.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opm/core/props/BlackoilPropertiesFromDeck.hpp b/opm/core/props/BlackoilPropertiesFromDeck.hpp index 3aaa601ce..fb37a7f89 100644 --- a/opm/core/props/BlackoilPropertiesFromDeck.hpp +++ b/opm/core/props/BlackoilPropertiesFromDeck.hpp @@ -233,6 +233,12 @@ namespace Opm const double pcow, double & swat); + // return a reference to the "raw" PVT fluid object for a phase. + const PvtInterface& pvt(int phaseIdx) const + { + return pvt_.pvt(phaseIdx); + } + private: int getTableIndex_(const int* pvtTableIdx, int cellIdx) const {