mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1064 from GitPaean/fixing_thp_initialization
when no THP control/limit, thp value will be set to zero.
This commit is contained in:
commit
81ebba2df8
@ -171,6 +171,22 @@ namespace Opm
|
|||||||
currentControls()[ newIndex ] = 0;
|
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