Commit Graph

129 Commits

Author SHA1 Message Date
Håkon Hægland
11907495c1 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.
2022-04-20 10:51:34 +02: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
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
Joakim Hove
6b92443cb4 Downstream filesystem reorganisation in opm-common 2022-01-02 14:33:34 +01:00
Tor Harald Sandve
1baee5ec9b
Merge pull request #3715 from goncalvesmachadoc/vapwat
update parameters BlackoilFluidSystem
2021-12-09 15:37:49 +01:00
Tor Harald Sandve
2c17b1942c Move getPerfCellPressure to wellInterface
The cell pressure is independent of well model and belongs to the interface
This should move the MSW model one step closer to supporting GasWater cases
2021-11-30 10:48:02 +00:00
goncalvesmachadoc
90380c35ad update parameters BlackoilFluidSystem
fix

update parameters BlackoilFluidSystem
2021-11-29 16:38:43 +01:00
Tor Harald Sandve
160c80b574 check operability history wells 2021-10-18 09:21:04 +02:00
Tor Harald Sandve
1c9c5c484b check operability injectors 2021-10-15 12:32:02 +02:00
Tor Harald Sandve
70c9d2e237
Merge pull request #3590 from daavid00/micp-2021-10
micp
2021-10-14 22:28:28 +02:00
daavid00
48b175904a first version of micp implementation in flow 2021-10-14 17:44:57 +02:00
Tor Harald Sandve
83ef3730b2 make multiple well control switching output more readable 2021-10-14 09:40:34 +02:00
Tor Harald Sandve
afdfe55bbc restrict maximum number of times a well can switch to the same control 2021-10-04 10:12:39 +02:00
Tor Harald Sandve
c790b14753 Make WTEST more robust
Only open wells that are solvable, operable and economical
2021-09-28 10:07:12 +02:00
Tor Harald Sandve
3b7cf9a565
Merge pull request #3506 from totto82/relaxWell
relax well convergence for the last newton iterations
2021-09-08 10:46:14 +02:00
Tor Harald Sandve
f3513a31eb add option for relaxed well convergence for the last netwon iterations 2021-09-08 09:58:14 +02:00
Arne Morten Kvarving
2b1ac22c99 drop aliases for Indices entries
using Indices directly more clearly shows where the data comes
from without having to hop through hoops to do so.
2021-09-06 12:49:01 +02:00
Paul Egberts
8e8f6c5ff2 fix compositionSwitchEnabled declaration. For gas-water it is disabled 2021-08-01 21:02:07 +02:00
Tor Harald Sandve
a00c42c673 compute potentials for newly opened wells due to testing 2021-06-30 13:13:56 +02: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
Tor Harald Sandve
5368343512 handle GRUP in wellState from target 2021-06-23 14:46:35 +02:00
Atgeirr Flø Rasmussen
8c5a6b12d5
Merge pull request #3158 from totto82/operability_solve
shut/stop unsolvable wells
2021-06-18 10:13:14 +02:00
Tor Harald Sandve
161c6cb1f8
Merge pull request #3385 from totto82/fixMSWtarget
Change wellStateFromTarget to virtual to make sure the MSW part is run
2021-06-17 13:03:33 +02:00
Tor Harald Sandve
b5e29684f2 shut/stop unsolvable wells 2021-06-17 11:50:31 +02:00
Håkon Hægland
860cfd9fb5 Fix some sign compare warnings. 2021-06-17 10:44:32 +02:00
Tor Harald Sandve
eb4e25c3f6 Change wellStateFromTarget to virtual to make sure the MSW part is run 2021-06-16 15:53:34 +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
Tor Harald Sandve
5686d90c61
Merge pull request #3350 from totto82/maxNiWi
Change the inner iterations logic
2021-06-10 19:49:23 +02:00
Joakim Hove
023edc67e5 Remove first perf member from Well classes 2021-06-08 14:24:26 +02:00
Arne Morten Kvarving
4c09b5dde3 add WellInterfaceEval 2021-06-07 08:26:43 +02:00
Arne Morten Kvarving
29842ff9a2 add WellInterfaceIndices
while not a lot of class in this layer, having it helps
in downstream well code.
2021-06-07 08:26:43 +02:00
Arne Morten Kvarving
1fb68c59e2 changed: move fluidsystem-only dependent method to WellInterfaceFluidSystem 2021-06-07 08:25:59 +02:00
Joakim Hove
32a6f32660 Use WellContainer to manage perf phase rate 2021-06-05 07:50:56 +02:00
Tor Harald Sandve
3ca6e215dc Change the inner iterations logic
This replace the Boolean switch to enable inner iterations with a
int that controls for which maximum number of newton iterations
inner iterations applies.

Default is set to 3
2021-06-04 10:51:15 +02:00
Arne Morten Kvarving
0f7967f86a cosmetics: do not indent for namespace 2021-05-27 14:22:14 +02:00
Arne Morten Kvarving
3aa2b38832 changed: split out FluidSystem only dependent code from WellInterface
this allows using explicit template instantation to only build
this code once for each FluidSystem
2021-05-27 14:22:14 +02:00
Joakim Hove
23180e06d2 Rename WellStateFullyImplicitBlackoil -> WellState 2021-05-21 15:07:21 +02:00
Joakim Hove
506a349085
Use wellcontainer2 (#3255)
Use WellContainer<> to manage members in WellState
2021-05-20 16:16:12 +02:00
Joakim Hove
3de4213c8c
Merge pull request #3236 from akva2/wellinterface_generic_split
changed: split out non-typetag dependent code from WellInterface
2021-05-19 14:46:56 +02:00
Arne Morten Kvarving
0f4bb49ed9 changed: split out non-typetag dependent code from WellInterface 2021-05-19 09:25:03 +02:00
Arne Morten Kvarving
db668e8d80 make has_energy constexpr and use if constexpr to eliminate code 2021-05-18 15:04:47 +02:00
Arne Morten Kvarving
268201eeb1 make has_polymermw constexpr and use if constexpr to eliminate code 2021-05-18 15:04:47 +02:00
Arne Morten Kvarving
1568479d3d fix function name
Frations -> Fractions
2021-05-12 10:50:46 +02:00
Arne Morten Kvarving
9758cd4f92 replace typedefs with using statements 2021-05-12 09:06:37 +02:00
Arne Morten Kvarving
ab4772aba8 fixed: use Scalar type from TypeTag 2021-05-12 09:02:29 +02:00
Arne Morten Kvarving
d5cdbf38d6 remove Opm:: prefix for symbols
we are already in the Opm:: namespace
2021-05-12 08:57:07 +02:00
Arne Morten Kvarving
9de5d077f6 remove unused modestring array 2021-05-12 08:47:49 +02:00
Arne Morten Kvarving
539c83687c changed: (re)move unnecessary includes 2021-05-12 08:47:22 +02:00
Arne Morten Kvarving
ceb9bb4311 changed: make has_brine contexpr
and use if constexpr to eliminate some code
2021-05-11 12:52:44 +02:00
Arne Morten Kvarving
f48ee17d59 changed: make has_foam contexpr
and use if constexpr to eliminate some code
2021-05-11 12:46:54 +02:00