mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
support none trivial item 3 in LIFTOPT. i.e. not optimize gaslift every timestep
This commit is contained in:
@@ -460,6 +460,8 @@ protected:
|
|||||||
|
|
||||||
bool glift_debug = false;
|
bool glift_debug = false;
|
||||||
|
|
||||||
|
double last_glift_opt_time_ = -1.0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WellInterfaceGeneric* getGenWell(const std::string& well_name);
|
WellInterfaceGeneric* getGenWell(const std::string& well_name);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -861,7 +861,19 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
maybeDoGasLiftOptimize(DeferredLogger& deferred_logger)
|
maybeDoGasLiftOptimize(DeferredLogger& deferred_logger)
|
||||||
{
|
{
|
||||||
const bool do_glift_optimization = true;
|
bool do_glift_optimization = false;
|
||||||
|
|
||||||
|
const double simulation_time = ebosSimulator_.time();
|
||||||
|
const double min_wait = ebosSimulator_.vanguard().schedule().glo(ebosSimulator_.episodeIndex()).min_wait();
|
||||||
|
// We only optimize if a min_wait time has past.
|
||||||
|
// If all_newton is true we still want to optimize several times pr timestep
|
||||||
|
// i.e. we also optimize if check simulation_time == last_glift_opt_time_
|
||||||
|
// that is when the last_glift_opt_time is already updated with the current time step
|
||||||
|
if ( simulation_time == last_glift_opt_time_ || simulation_time >= (last_glift_opt_time_ + min_wait)) {
|
||||||
|
do_glift_optimization = true;
|
||||||
|
last_glift_opt_time_ = simulation_time;
|
||||||
|
}
|
||||||
|
|
||||||
if (do_glift_optimization) {
|
if (do_glift_optimization) {
|
||||||
GLiftOptWells glift_wells;
|
GLiftOptWells glift_wells;
|
||||||
GLiftProdWells prod_wells;
|
GLiftProdWells prod_wells;
|
||||||
|
|||||||
Reference in New Issue
Block a user