#4914 Flow Diag : Improve robustness when reading PVT data

https://github.com/OPM/opm-flowdiagnostics-applications/pull/98
This commit is contained in:
Magne Sjaastad 2019-10-23 13:24:47 +02:00
parent cb7e948fef
commit 5930478a90
3 changed files with 15 additions and 0 deletions

View File

@ -608,6 +608,11 @@ fromECLOutput(const ECLInitFileData& init)
raw.numCols = 5; // [ x, 1/B, 1/(B*mu), d(1/B)/dx, d(1/(B*mu))/dx ]
raw.numTables = tabdims[ TABDIMS_NTPVTG_ITEM ]; // # PV{D,T}G tables
if (raw.numTables == 0)
{
return GPtr{};
}
const auto& lh = init.keywordData<bool>(LOGIHEAD_KW);
if (lh[ LOGIHEAD_RV_INDEX ]) {

View File

@ -809,6 +809,11 @@ fromECLOutput(const ECLInitFileData& init)
raw.numCols = 5; // [ Po, 1/B, 1/(B*mu), d(1/B)/dPo, d(1/(B*mu))/dPo ]
raw.numTables = tabdims[ TABDIMS_NTPVTO_ITEM ]; // # PVTO tables
if (raw.numTables == 0)
{
return OPtr{};
}
if (lh[ LOGIHEAD_RS_INDEX ]) {
// Dissolved gas flag set => Live Oil.
//

View File

@ -352,6 +352,11 @@ fromECLOutput(const ECLInitFileData& init)
raw.numCols = 5; // [ Pw, 1/B, Cw, 1/(B*mu), Cw - Cv ]
raw.numTables = tabdims[ TABDIMS_NTPVTW_ITEM ]; // # PVTW tables
if (raw.numTables == 0)
{
return WPtr{};
}
// Extract Full Table
{
const auto nTabElem =