From 8b94e7b0ebaa9b92fdf5081c545e5b0b2a49e24e Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 20 Oct 2015 16:08:11 +0200 Subject: [PATCH] Make the code more readable --- opm/core/props/pvt/PvtLiveGas.cpp | 41 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/opm/core/props/pvt/PvtLiveGas.cpp b/opm/core/props/pvt/PvtLiveGas.cpp index 2bb4ec23..306f9acb 100644 --- a/opm/core/props/pvt/PvtLiveGas.cpp +++ b/opm/core/props/pvt/PvtLiveGas.cpp @@ -96,7 +96,7 @@ namespace Opm // Complete undersaturated tables by extrapolating from existing data int iNext = -1; - for (int i=0; i 1) { continue; @@ -107,27 +107,34 @@ namespace Opm while (iNext < sz && undersat_gas_tables_[pvtTableIdx][iNext][0].size() < 2) { ++iNext; } - if (iNext == sz) OPM_THROW(std::runtime_error,"Unable to complete undersaturated table."); + if (iNext == sz) { + OPM_THROW(std::runtime_error,"Unable to complete undersaturated table."); + } } - // Add undersaturated data to current record while maintaining compressibility and viscosibility - // TODO: How to add 1/(B*mu) in this way? + // Undersaturated data is added to the current record in the same way as for liveoil. + // It is unclear whether this expantion maintains the compressibility and viscosibility, + // but it seems like it reproduces eclipse results for spe3. typedef std::vector > >::size_type sz_t; - for (sz_t j=1; j