Implements gas lift optimization for groups.

Extends PR #2824 to include support for GLIFTOPT (item 2, maximum lift
gas supply for a group) and group production constraints.

The optimization is split into two phases. First the wells are optimized
separately (as in PR #2824). In this phase LIFTOPT and WLIFTOPT constraints
(e.g. maxmimum lift gas injection for a well, minimum economic gradient) are
considered together with well production constraints.

Then, in the next phase the wells are optimized in groups. Here, the ALQ
distribution from the first phase is used as a starting point. If a group
has any production rate constraints, and/or a limit on its total rate of
lift gas supply, lift gas is redistributed to the wells that gain the most
benefit from it by considering which wells that currently has the largest
weighted incremental gradient (i.e. increase in oil rate compared to
increase in ALQ).
This commit is contained in:
Håkon Hægland
2021-03-03 13:59:26 +01:00
parent 41063bc735
commit 434640fdf5
16 changed files with 3185 additions and 1012 deletions

View File

@@ -27,11 +27,13 @@
#include <opm/simulators/linalg/bda/WellContributions.hpp>
#endif
#include <opm/simulators/wells/GasLiftRuntime.hpp>
#include <opm/simulators/wells/RateConverter.hpp>
#include <opm/simulators/wells/VFPInjProperties.hpp>
#include <opm/simulators/wells/VFPProdProperties.hpp>
#include <opm/simulators/wells/WellInterface.hpp>
#include <opm/simulators/wells/WellProdIndexCalculator.hpp>
#include <opm/simulators/wells/ParallelWellInfo.hpp>
#include <opm/simulators/wells/GasLiftSingleWell.hpp>
#include <opm/models/blackoil/blackoilpolymermodules.hh>
#include <opm/models/blackoil/blackoilsolventmodules.hh>
@@ -46,6 +48,7 @@
#include <dune/common/dynvector.hh>
#include <dune/common/dynmatrix.hh>
#include <memory>
#include <optional>
#include <fmt/format.h>
@@ -73,7 +76,10 @@ namespace Opm
using typename Base::SparseMatrixAdapter;
using typename Base::FluidState;
using typename Base::RateVector;
using GasLiftHandler = Opm::GasLiftRuntime<TypeTag>;
using typename Base::GasLiftSingleWell;
using typename Base::GLiftOptWells;
using typename Base::GLiftProdWells;
using typename Base::GLiftWellStateMap;
using Base::numEq;
using Base::numPhases;
@@ -250,10 +256,13 @@ namespace Opm
DeferredLogger& deferred_logger
) const;
virtual void maybeDoGasLiftOptimization (
virtual void gasLiftOptimizationStage1 (
WellState& well_state,
const Simulator& ebosSimulator,
DeferredLogger& deferred_logger
DeferredLogger& deferred_logger,
GLiftProdWells &prod_wells,
GLiftOptWells &glift_wells,
GLiftWellStateMap &state_map
) const override;
bool checkGliftNewtonIterationIdxOk(
@@ -399,6 +408,9 @@ namespace Opm
// Enable GLIFT debug mode. This will enable output of logging messages.
bool glift_debug = false;
// Optimize only wells under THP control
bool glift_optimize_only_thp_wells = true;
const EvalWell& getBhp() const;
EvalWell getQs(const int comp_idx) const;