mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
when no THP control/limit, thp value will be set to zero.
It provides a strategy to reset the zero thp value when no thp control is involved anymore.
This commit is contained in:
parent
d8aa0b7ddf
commit
4129928be4
@ -171,6 +171,22 @@ namespace Opm
|
||||
currentControls()[ newIndex ] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If in the new step, there is no THP related target/limit anymore, its thp value should be
|
||||
// set to zero.
|
||||
const WellControls* ctrl = wells->ctrls[w];
|
||||
const int nwc = well_controls_get_num(ctrl);
|
||||
int ctrl_index = 0;
|
||||
for (; ctrl_index < nwc; ++ctrl_index) {
|
||||
if (well_controls_iget_type(ctrl, ctrl_index) == THP) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// not finding any thp related control/limits
|
||||
if (ctrl_index == nwc) {
|
||||
thp()[w] = 0.;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user