From fa1dbe2e28faf73116dc4a4b796659bfb0808559 Mon Sep 17 00:00:00 2001 From: Jostein Alvestad Date: Tue, 24 Nov 2020 15:56:32 +0100 Subject: [PATCH] rewriting of parts of SWEL code --- src/opm/output/eclipse/AggregateWellData.cpp | 24 ++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/opm/output/eclipse/AggregateWellData.cpp b/src/opm/output/eclipse/AggregateWellData.cpp index 323e216c8..e16098632 100644 --- a/src/opm/output/eclipse/AggregateWellData.cpp +++ b/src/opm/output/eclipse/AggregateWellData.cpp @@ -517,17 +517,27 @@ namespace { const auto& pc = well.productionControls(smry); const auto& predMode = well.predictionMode(); - if ((pc.oil_rate != 0.0) || (!predMode)) { + if (predMode) { + if ((pc.oil_rate != 0.0)) { + sWell[Ix::OilRateTarget] = + swprop(M::liquid_surface_rate, pc.oil_rate); + } + + if ((pc.water_rate != 0.0)) { + sWell[Ix::WatRateTarget] = + swprop(M::liquid_surface_rate, pc.water_rate); + } + + if ((pc.gas_rate != 0.0)) { + sWell[Ix::GasRateTarget] = + swprop(M::gas_surface_rate, pc.gas_rate); + sWell[Ix::HistGasRateTarget] = sWell[Ix::GasRateTarget]; + } + } else { sWell[Ix::OilRateTarget] = swprop(M::liquid_surface_rate, pc.oil_rate); - } - - if ((pc.water_rate != 0.0) || (!predMode)) { sWell[Ix::WatRateTarget] = swprop(M::liquid_surface_rate, pc.water_rate); - } - - if ((pc.gas_rate != 0.0) || (!predMode)) { sWell[Ix::GasRateTarget] = swprop(M::gas_surface_rate, pc.gas_rate); sWell[Ix::HistGasRateTarget] = sWell[Ix::GasRateTarget];