More integration of VFP tables

This commit is contained in:
babrodtk committed 2015-08-19 13:10:48 +02:00
1 parent 1dab5351c2
commit e05b7778d7
2 files changed
+26 -7

No files matched your search

+21 -7
View File
@@ -60,7 +60,8 @@ namespace Opm
// 2. Assign bhp equal to bhp control, if
// applicable, otherwise assign equal to
// 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)) {
case BHP:
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]];
bhp_[w] = state.pressure()[first_cell];
thp_[w] = -1e100;
}
}
} else {
@@ -100,12 +102,24 @@ namespace Opm
// little above or below (depending on if
// the well is an injector or producer)
// pressure in first perforation cell.
if (well_controls_get_current_type(ctrl) == BHP) {
bhp_[w] = well_controls_get_current_target( ctrl );
} else {
const int first_cell = wells->well_cells[wells->well_connpos[w]];
const double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99;
bhp_[w] = safety_factor*state.pressure()[first_cell];
switch (well_controls_get_current_type(ctrl)) {
case BHP:
bhp_[w] = well_controls_get_current_target( ctrl );
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 double safety_factor = (wells->type[w] == INJECTOR) ? 1.01 : 0.99;
bhp_[w] = safety_factor*state.pressure()[first_cell];
thp_[w] = -1e100;
}
}
}
}
+5
View File
@@ -678,6 +678,11 @@ namespace Opm
break;
}
case THP: {
//TODO: Implement support
OPM_THROW(std::invalid_argument, "THP not implemented in WellNode::conditionsMet.");
}
case RESERVOIR_RATE: {
double my_rate = 0.0;
const double * ctrls_distr = well_controls_iget_distr( ctrls , ctrl_index );