rewriting of parts of SWEL code

This commit is contained in:
Jostein Alvestad
2020-11-24 15:56:32 +01:00
parent b22334f08a
commit fa1dbe2e28

View File

@@ -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];