mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
More integration of VFP tables
This commit is contained in:
parent
f320b04c4d
commit
83f6b02941
@ -60,7 +60,8 @@ namespace Opm
|
|||||||
// 2. Assign bhp equal to bhp control, if
|
// 2. Assign bhp equal to bhp control, if
|
||||||
// applicable, otherwise assign equal to
|
// applicable, otherwise assign equal to
|
||||||
// first perforation cell pressure.
|
// first perforation cell pressure.
|
||||||
// thp set to thp control
|
// Similarly set thp to thp control, or
|
||||||
|
// -1e100 if not applicable
|
||||||
switch (well_controls_get_current_type(ctrl)) {
|
switch (well_controls_get_current_type(ctrl)) {
|
||||||
case BHP:
|
case BHP:
|
||||||
bhp_[w] = well_controls_get_current_target( ctrl );
|
bhp_[w] = well_controls_get_current_target( ctrl );
|
||||||
@ -72,6 +73,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
const int first_cell = wells->well_cells[wells->well_connpos[w]];
|
const int first_cell = wells->well_cells[wells->well_connpos[w]];
|
||||||
bhp_[w] = state.pressure()[first_cell];
|
bhp_[w] = state.pressure()[first_cell];
|
||||||
|
thp_[w] = -1e100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -100,12 +102,24 @@ namespace Opm
|
|||||||
// little above or below (depending on if
|
// little above or below (depending on if
|
||||||
// the well is an injector or producer)
|
// the well is an injector or producer)
|
||||||
// pressure in first perforation cell.
|
// pressure in first perforation cell.
|
||||||
if (well_controls_get_current_type(ctrl) == BHP) {
|
switch (well_controls_get_current_type(ctrl)) {
|
||||||
|
case BHP:
|
||||||
bhp_[w] = well_controls_get_current_target( ctrl );
|
bhp_[w] = well_controls_get_current_target( ctrl );
|
||||||
} else {
|
thp_[w] = -1e100;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case THP:
|
||||||
|
bhp_[w] = -1e100;
|
||||||
|
thp_[w] = well_controls_get_current_target( ctrl );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
const int first_cell = wells->well_cells[wells->well_connpos[w]];
|
const int first_cell = wells->well_cells[wells->well_connpos[w]];
|
||||||
const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99;
|
const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99;
|
||||||
bhp_[w] = safety_factor*state.pressure()[first_cell];
|
bhp_[w] = safety_factor*state.pressure()[first_cell];
|
||||||
|
thp_[w] = -1e100;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -678,6 +678,11 @@ namespace Opm
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case THP: {
|
||||||
|
//TODO: Implement support
|
||||||
|
OPM_THROW(std::invalid_argument, "THP not implemented in WellNode::conditionsMet.");
|
||||||
|
}
|
||||||
|
|
||||||
case RESERVOIR_RATE: {
|
case RESERVOIR_RATE: {
|
||||||
double my_rate = 0.0;
|
double my_rate = 0.0;
|
||||||
const double * ctrls_distr = well_controls_iget_distr( ctrls , ctrl_index );
|
const double * ctrls_distr = well_controls_iget_distr( ctrls , ctrl_index );
|
||||||
|
Loading…
Reference in New Issue
Block a user