Commit Graph

23 Commits

Author SHA1 Message Date
Arne Morten Kvarving
4bdec3a58b avoid GasLiftOpt.hpp where possible
and add where necessary
2023-01-10 09:54:33 +01:00
Arne Morten Kvarving
e68d05a147 adapt to renamed GasLift(Group|Well) 2023-01-10 09:54:07 +01:00
Arne Morten Kvarving
a631762d17 GasLiftSingleWell: pull fmt in impl file
it is not used in the interface.
no real change to the code as such, but it better reflects the use.
2022-12-22 08:35:27 +01:00
Arne Morten Kvarving
e8152a1b65 changed: tidy up computeBhpAtThpLimitProdWithAlq interface
put deferred_logger at the end of the parameter list.
similar to the rest of this family of methods
2022-10-31 13:16:16 +01:00
Tor Harald Sandve
b072cc1d5d Allow for gaslift for wells that violate thp limit but are not allowed to switch 2022-09-16 10:49:03 +02:00
Håkon Hægland
fbd6c03dd6 Cleanup glift debugging output code 2022-03-24 12:42:46 +01:00
Håkon Hægland
3cf181b2ee Throw exception instead of using assert
Throw an exception if two-phase gas lift optimization is used for
other phases than oil and water.
2022-03-07 15:58:11 +01:00
Håkon Hægland
438a712e54 Gas lift optimization for two-phase oil-water.
Add gas lift optimization support for two-phase oil-water flow.
2022-03-07 15:19:43 +01:00
Håkon Hægland
c7aa43a82b Rename some methods and variables.
Renames some methods and variables to reflect that the well is no
longer necessarily a StandardWell. It can be either a MultisegmentWell
or a StandardWell. This should avoid confusion about the nature of
the variable.
2022-02-15 10:21:09 +01:00
Håkon Hægland
54160827de Add gaslift optimization support for MSW.
Implements gas lift optimization support for multisegmented wells (MSW).
2022-02-14 21:38:50 +01:00
Tor Harald Sandve
009134d037 Limit well rates to honor group rates
If a well is under a group that is limited by a target, it should use as little gaslift as possible.
The reduction algorithm will reduce the gaslift of the well as long as the groups potential is above the groups target.
2022-02-02 10:30:48 +01:00
Håkon Hægland
8810fa65af Cleanup code in GasLiftSingleWellGeneric
Introduces two new data types BasicRates and LimitedRates to capture
oil, gas, and water rates, and whether they have been limited by well
or group targets. This reduces the number of variables that are passed
to and returned from various methods and thus makes the code easier to
read.
2022-01-31 01:39:20 +01:00
Håkon Hægland
4970b0641e Improve debugging tools in gaslift code.
Introduces a gaslift debugging variable in ALQState in WellState. This
variable will persist between timesteps in contrast to when debugging
variables are defined in GasLiftSingleWell, GasLiftGroupState, or GasLiftStage2.

Currently only an integer variable debug_counter is added to ALQState,
which can be used as follows: First debugging is switched on globally
for BlackOilWellModel, GasLiftSingleWell, GasLiftGroupState, and
GasLiftStage2 by setting glift_debug to a true value in BlackOilWellModelGeneric.
Then, the following debugging code can be added to e.g. one of
GasLiftSingleWell, GasLiftGroupState, or GasLiftStage2 :

    auto count = debugUpdateGlobalCounter_();
    if (count == some_integer) {
        displayDebugMessage_("stop here");
    }

Here, the integer "some_integer" is determined typically by looking at
the debugging output of a previous run. This can be done since the
call to debugUpdateGlobalCounter_() will print out the current value
of the counter and then increment the counter by one. And it will be
easy to recognize these values in the debug ouput. If you find a place
in the output that looks suspect, just take a note of the counter
value in the output around that point and insert the value for
"some_integer", then after recompiling the code with the desired value
for "some_integer", it is now easy to set a breakpoint in GDB at the
line

    displayDebugMessage_("stop here").

shown in the above snippet. This should improve the ability to quickly
to set a breakpoint in GDB around at a given time and point in the simulation.
2022-01-23 20:37:26 +01:00
Tor Harald Sandve
50ab26c330 cleanup 2021-11-23 14:01:07 +00:00
Tor Harald Sandve
b5cdb1048a Mark wells with negative and trivial potentials as not operable
The simulator will try to compute potentials at every iterations to
try to reopen the well.
2021-11-22 08:44:17 +00:00
Tor Harald Sandve
60f59cd6e6 Potentially reduce gaslift when under well is under group control
Current implemention only support ORAT and GRAT controlled groups
2021-06-30 09:59:09 +02:00
Håkon Hægland
fbb24e2a5a Check group limits in gas lift stage 1.
Check group limits in gas lift stage 1 to avoid adding too much ALQ which must
anyway later be removed in stage 2. This should make the optimization
more efficient for small ALQ increment values. Also adds MPI support.
2021-06-16 12:00:54 +02:00
Joakim Hove
23180e06d2 Rename WellStateFullyImplicitBlackoil -> WellState 2021-05-21 15:07:21 +02:00
Arne Morten Kvarving
1614767362 GasLiftSingleWell: split typetag independent code to separate class 2021-05-21 09:09:10 +02:00
Arne Morten Kvarving
e8603dfea3 drop type alias GasLiftSingleWell::GLiftWellState 2021-05-20 14:12:41 +02:00
Håkon Hægland
ff3c7f2afb Try to silence a warning about an unused variable.
Added some more debug code, and initialized some boolean variables.

The jenkins build gives a warning about that '"alq_is_limited" may be
used uninitialized', though the warning is generated in another file
(GasLiftWellState.hpp, line #44) it could be (?) caused by the fact that
"alq_is_limited" might not be initialized before calling the constructor
in GasLiftSingleWell_impl.hpp line #963..
2021-03-30 15:42:33 +02:00
Håkon Hægland
cd85943352 Fix some warnings. 2021-03-30 15:41:46 +02:00
Håkon Hægland
434640fdf5 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).
2021-03-30 15:41:46 +02:00