mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
do not assign non-zero THP value when no THP involved.
This commit is contained in:
parent
f4a3e90d3b
commit
bdb9d8fcd6
@ -104,13 +104,6 @@ namespace Opm
|
||||
const int first_cell = wells->well_cells[wells->well_connpos[w]];
|
||||
bhp_[w] = state.pressure()[first_cell];
|
||||
}
|
||||
// 3. Thp: assign thp equal to thp control, if applicable,
|
||||
// otherwise assign equal to bhp value.
|
||||
if (well_controls_get_current_type(ctrl) == THP) {
|
||||
thp_[w] = well_controls_get_current_target( ctrl );
|
||||
} else {
|
||||
thp_[w] = bhp_[w];
|
||||
}
|
||||
} else {
|
||||
// Open well:
|
||||
// 1. Rates: initialize well rates to match controls
|
||||
@ -145,13 +138,16 @@ namespace Opm
|
||||
const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99;
|
||||
bhp_[w] = safety_factor*state.pressure()[first_cell];
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Thp: assign thp equal to thp control, if applicable,
|
||||
// otherwise assign equal to bhp value.
|
||||
if (well_controls_get_current_type(ctrl) == THP) {
|
||||
thp_[w] = well_controls_get_current_target( ctrl );
|
||||
} else {
|
||||
thp_[w] = bhp_[w];
|
||||
// 3. Thp: assign thp equal to thp target/limit, if applicable,
|
||||
// otherwise keep it zero. Basically, the value should not be used
|
||||
// in the simulation at all.
|
||||
const int nwc = well_controls_get_num(ctrl);
|
||||
for (int ctrl_index = 0; ctrl_index < nwc; ++ctrl_index) {
|
||||
if (well_controls_iget_type(ctrl, ctrl_index) == THP) {
|
||||
thp_[w] = well_controls_iget_target(ctrl, ctrl_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user