mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 23:43:28 -06:00
Only restrict oscillation for iter > nupcol
This commit is contained in:
parent
128e80ec7a
commit
738eb761c2
@ -213,8 +213,10 @@ namespace Opm
|
|||||||
from = WellProducerCMode2String(ws.production_cmode);
|
from = WellProducerCMode2String(ws.production_cmode);
|
||||||
}
|
}
|
||||||
bool oscillating = std::count(this->well_control_log_.begin(), this->well_control_log_.end(), from) >= this->param_.max_number_of_well_switches_;
|
bool oscillating = std::count(this->well_control_log_.begin(), this->well_control_log_.end(), from) >= this->param_.max_number_of_well_switches_;
|
||||||
|
const int episodeIdx = simulator.episodeIndex();
|
||||||
if (oscillating) {
|
const int iterationIdx = simulator.model().newtonMethod().numIterations();
|
||||||
|
const int nupcol = schedule[episodeIdx].nupcol();
|
||||||
|
if (oscillating && iterationIdx > nupcol) {
|
||||||
// only output frist time
|
// only output frist time
|
||||||
bool output = std::count(this->well_control_log_.begin(), this->well_control_log_.end(), from) == this->param_.max_number_of_well_switches_;
|
bool output = std::count(this->well_control_log_.begin(), this->well_control_log_.end(), from) == this->param_.max_number_of_well_switches_;
|
||||||
if (output) {
|
if (output) {
|
||||||
|
Loading…
Reference in New Issue
Block a user