mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Well testing of gas lift wells
Assign a maximum ALQ value to each GLIFT producer when doing well testing in beginTimeStep(). This allows the well to be considered open. Then, later in the timestep, when assemble() is called, the full gas lift optimization procedure can adjust the ALQ to its correct value. It is also observed that in some cases when gas lift is switched off by setting ALQ to zero, and later in the schedule is switched back on again, it might not be possible to determine bhp from thp for low small ALQ values. Instead of aborting the gas lift optimization, we should try increasing ALQ until we get convergence or until the maximum ALQ for the well is reached.
This commit is contained in:
@@ -332,6 +332,9 @@ namespace Opm
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->isProducer()) {
|
||||
gliftBeginTimeStepWellTestUpdateALQ(simulator, well_state_copy, deferred_logger);
|
||||
}
|
||||
updateWellOperability(simulator, well_state_copy, deferred_logger);
|
||||
if ( !this->isOperableAndSolvable() ) {
|
||||
const auto msg = fmt::format("WTEST: Well {} is not operable (physical)", this->name());
|
||||
@@ -585,7 +588,49 @@ namespace Opm
|
||||
updateWellOperability(ebos_simulator, well_state, deferred_logger);
|
||||
}
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
WellInterface<TypeTag>::
|
||||
gliftBeginTimeStepWellTestUpdateALQ(const Simulator& ebos_simulator,
|
||||
WellState& well_state,
|
||||
DeferredLogger& deferred_logger)
|
||||
{
|
||||
const auto& summary_state = ebos_simulator.vanguard().summaryState();
|
||||
const auto& well_name = this->name();
|
||||
if (!this->wellHasTHPConstraints(summary_state)) {
|
||||
const std::string msg = fmt::format("GLIFT WTEST: Well {} does not have THP constraints", well_name);
|
||||
deferred_logger.info(msg);
|
||||
return;
|
||||
}
|
||||
const auto& well_ecl = this->wellEcl();
|
||||
const auto& schedule = ebos_simulator.vanguard().schedule();
|
||||
auto report_step_idx = ebos_simulator.episodeIndex();
|
||||
const auto& glo = schedule.glo(report_step_idx);
|
||||
if (!glo.has_well(well_name)) {
|
||||
const std::string msg = fmt::format(
|
||||
"GLIFT WTEST: Well {} : Gas Lift not activated: "
|
||||
"WLIFTOPT is probably missing. Skipping.", well_name);
|
||||
deferred_logger.info(msg);
|
||||
return;
|
||||
}
|
||||
const auto& gl_well = glo.well(well_name);
|
||||
auto& max_alq_optional = gl_well.max_rate();
|
||||
double max_alq;
|
||||
if (max_alq_optional) {
|
||||
max_alq = *max_alq_optional;
|
||||
}
|
||||
else {
|
||||
const auto& controls = well_ecl.productionControls(summary_state);
|
||||
const auto& table = this->vfpProperties()->getProd()->getTable(controls.vfp_table_number);
|
||||
const auto& alq_values = table.getALQAxis();
|
||||
max_alq = alq_values.back();
|
||||
}
|
||||
well_state.setALQ(well_name, max_alq);
|
||||
const std::string msg = fmt::format(
|
||||
"GLIFT WTEST: Well {} : Setting ALQ to max value: {}",
|
||||
well_name, max_alq);
|
||||
deferred_logger.info(msg);
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user