mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1867 from GitPaean/fixing_resv_prediction
not trying to update RESV target for prediction producers
This commit is contained in:
commit
8796935f7c
@ -1695,6 +1695,7 @@ namespace Opm {
|
|||||||
well_controls_iset_distr(ctrl, rctrl, & distr[0]);
|
well_controls_iset_distr(ctrl, rctrl, & distr[0]);
|
||||||
|
|
||||||
// for the WCONHIST wells, we need to calculate the RESV rates since it can not be specified directly
|
// for the WCONHIST wells, we need to calculate the RESV rates since it can not be specified directly
|
||||||
|
// for the WCONPROD wells, the rates are specified already, it is not necessary to update
|
||||||
if (is_producer) {
|
if (is_producer) {
|
||||||
const WellMap::const_iterator i = wmap.find(wells()->name[*rp]);
|
const WellMap::const_iterator i = wmap.find(wells()->name[*rp]);
|
||||||
|
|
||||||
@ -1703,21 +1704,23 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
const auto& wp = i->second;
|
const auto& wp = i->second;
|
||||||
const auto production_controls = wp.productionControls(summaryState);
|
const auto production_controls = wp.productionControls(summaryState);
|
||||||
// historical phase rates
|
if ( !production_controls.prediction_mode ) {
|
||||||
std::vector<double> hrates(np);
|
// historical phase rates
|
||||||
SimFIBODetails::historyRates(phase_usage_, production_controls, hrates);
|
std::vector<double> hrates(np);
|
||||||
|
SimFIBODetails::historyRates(phase_usage_, production_controls, hrates);
|
||||||
|
|
||||||
std::vector<double> hrates_resv(np);
|
std::vector<double> hrates_resv(np);
|
||||||
rateConverter_->calcReservoirVoidageRates(fipreg, pvtreg, hrates, hrates_resv);
|
rateConverter_->calcReservoirVoidageRates(fipreg, pvtreg, hrates, hrates_resv);
|
||||||
|
|
||||||
const double target = -std::accumulate(hrates_resv.begin(), hrates_resv.end(), 0.0);
|
const double target = -std::accumulate(hrates_resv.begin(), hrates_resv.end(), 0.0);
|
||||||
|
|
||||||
well_controls_iset_target(ctrl, rctrl, target);
|
well_controls_iset_target(ctrl, rctrl, target);
|
||||||
}
|
}
|
||||||
}
|
} // end of if (is_producer)
|
||||||
|
} // end of if if (0 <= rctrl)
|
||||||
}
|
}
|
||||||
}
|
} // end of for loop
|
||||||
}
|
} // end of if (! resv_wells.empty())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user