Commit Graph

72 Commits

Author SHA1 Message Date
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
Tor Harald Sandve
8283b53f3b only compute Bavg once pr timestep and use the stored variable instead of passing it around 2021-03-23 15:30:36 +01:00
Joakim Hove
9662d4019e Use enum Well::Status to indicate well status instead of bool 2021-03-20 20:33:28 +01:00
Tor Harald Sandve
58fa3eaf31 replace asserts with OPM_DEFLOG_THROW 2021-03-18 11:58:05 +01:00
Tor Harald Sandve
4f55c25607 add support for POTN in WECON 2021-03-03 10:31:57 +01:00
Arne Morten Kvarving
77692c1f99 quell unused parameter warning 2021-01-28 12:52:19 +01:00
Kai Bao
d8f8b9f0cc
Merge pull request #3028 from totto82/quarryPerfLengthAndRadius
get connection length and radius from the connection object
2021-01-28 11:21:21 +01:00
Bård Skaflestad
7684f22073
Merge pull request #3000 from totto82/substituteSolveWellEq
substitute solveWellEq with inner iterations and initial solve
2021-01-26 09:59:37 +01:00
Tor Harald Sandve
9277b2edee get connection length and radius from the connection object 2021-01-25 14:08:59 +01:00
Tor Harald Sandve
036a021c63 fix well model for gasoil thermal 2021-01-21 11:37:25 +01:00
Tor Harald Sandve
27bea2fa4f Solve well equation for the first iteration 2021-01-18 15:12:17 +01:00
Tor Harald Sandve
fbcd230eb2 substitute solveWellEq with one inner solve for newly opened wells 2021-01-18 15:12:17 +01:00
Joakim Hove
17fcdfc87a Use ScheduleState to handle VFP propertes + simplifications 2021-01-14 19:22:34 +01:00
Tor Harald Sandve
a7664f9ea6 Add check for operability of MSW 2020-12-08 12:38:25 +01:00
Markus Blatt
2e5b1c8d54 Use reference for WellInterface::parallel_well_info_ 2020-12-04 13:24:31 +01:00
Markus Blatt
8ee58096ba Make the parallel reduction when applying the Wells.
The B matrix is basically a component-wise multiplication
with a vector followed by a parallel reduction. We do that
reduction to all ranks computing for the well to save the
broadcast when applying C^T.
2020-12-03 11:10:36 +01:00
Bård Skaflestad
75156cd872 Unconditionally Calculate PI at End of Timestep
This commit ensures that we calculate the well and connection level
per-phase steady-state productivity index (PI) at the end of a
completed time step (triggered from endTimeStep()).

We add a new data member,

    BlackoilWellModel<>::prod_index_calc_

which holds one WellProdIndexCalculator for each of the process'
local wells and a new interface member function

    WellInterface::updateProductivityIndex

which uses a per-well PI calculator to actually compute the PI
values and store those in the WellState.  Implement this member
function for both StandardWell and MultisegmentWell.  Were it not
for 'getMobility' existing only in the derived classes, the two
equal implementations could be merged and moved to the interface.

We also add a new data member to the WellStateFullyImplicitBlackoil
to hold the connection-level PI values.  Finally, remove the
conditional PI calculation from StandardWell's well equation
assembly routine.
2020-11-24 21:53:58 +01:00
Atgeirr Flø Rasmussen
8a5203814b Make consistent use of const for alq-related state.
A const well state was passed to functions that were modifying it by
calling setALQ(). Now the setALQ() method is made non-const, mutable
references to the well state are passed where sensible. The getALQ()
method uses map::at() instead of map::operator[] and no longer modifies
current_alq_. With this, it is now easy to see which methods modify the
well state and which don't. The alq-related members in the
WellStateFullyImplicitBlackoil class are no longer 'mutable'-qualified.
2020-11-19 10:09:52 +01:00
Ove Sævareid
0f7e66e151 Alternative solvent extension for the black oil model. 2020-11-17 12:33:19 +01:00
Atgeirr Flø Rasmussen
cb928f90f0 Refactor per-perforation code into separate function.
Also make some methods const.
2020-11-16 11:19:03 +01:00
Markus Blatt
049aaad326 Adds original ECL index of well connection to PerforationData
and use it in the WellInterface instead of creating a vector
with these indices there. The original approach recreates
information in another path of the well and assumes that all
connections are in a process's local partition. That assumption
does not hold any more for distributed wells.
2020-11-12 17:21:37 +01:00
Atgeirr Flø Rasmussen
7e87ea3200 Refactor to put updateWellStateRates() in base class. 2020-10-15 14:15:05 +02:00
Atgeirr Flø Rasmussen
52c695937b Implement extended network model. 2020-10-15 10:54:03 +02:00
Håkon Hægland
d707967f58 Implements support for gas lift optimization.
Implements gas lift optimization for a single StandardWell. Support for
gas lift optimization for multi-segment wells, groups of wells and
networks is not implemented yet.

The keywords LIFTOPT, WLIFTOPT, and VFPPROD are used to supply parameters for
the optimization. Also adds support for summary output of liftgas
injection rate via keyword WGLIR.
2020-09-30 10:04:39 +02:00
Joakim Hove
0565d6f402 Remove unused #include of exceptions 2020-09-21 11:12:15 +02:00
Arne Morten Kvarving
914053ac3c changed: remove GET_PROP_VALUE macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
74fac38d85 changed: remove GET_PROP_TYPE / GET_PROP macro usage 2020-08-27 08:19:39 +02:00
Kai Bao
a38dc27bcb refactoring for iterateWellEquations 2020-08-11 09:10:19 +02:00
Kai Bao
11807747cb renaming solveWellEqUntilConverged to be iterateWellEquations 2020-08-11 09:10:19 +02:00
Tor Harald Sandve
fefa5c22ce make assembleWellEqIteration private 2020-08-11 09:10:19 +02:00
Tor Harald Sandve
fc45b1bd47 Add inner iterations for standard wells also 2020-08-11 09:10:19 +02:00
Tor Harald Sandve
cf702a5384 use relaxed tolerance for MSW when solution stagnates 2020-05-22 20:52:14 +02:00
Atgeirr Flø Rasmussen
e7e4cf6f20 Silence warnings and fix whitespace. 2020-04-08 10:41:20 +02:00
Tor Harald Sandve
66931b9cb7 Various fixes and refactoring.
- Communicate all well rates.
 - When changing controls, modify rates to satisfy failed constraint.
 - Ensure targets are positive.
 - Always solve for potentials for MSW (temporary fix).
2020-04-02 13:57:05 +02:00
Atgeirr Flø Rasmussen
3a5a8c23df Use generic control equation implementation. 2020-04-02 13:54:58 +02:00
Atgeirr Flø Rasmussen
766d02cacc Unify group control equation codes. 2020-04-02 13:54:58 +02:00
Atgeirr Flø Rasmussen
27f62399f5 Handle guide-rate based well constraints from groups. 2020-04-02 10:41:57 +02:00
Kai Bao
56580ad431 adding WGR support for WECON 2020-01-30 21:54:36 +01:00
Trine S. Mykkeltvedt
99e7785fb5 renamed saltwater-->brine and removed keywords from missingFeatures 2020-01-09 14:14:38 +01:00
Trine S. Mykkeltvedt
5749615bd8 addd simple salt/brine implementation 2020-01-09 14:14:38 +01:00
Atgeirr Flø Rasmussen
d4433b80b5 Improve/fix well potential calculations for MultiSegmentWell.
Includes fixes for bhp-based potentials, and an implementation for thp-based
potentials similar to that for StandardWell.
2019-12-04 11:01:45 +01:00
Atgeirr Flø Rasmussen
bddeaba880 Delete obsolete include directives and functions.
Also make other minor adjustments, in particular moving the function
getCubeDim() from WellsManagerDetail to WellHelpers.hpp.
2019-11-25 10:58:44 +01:00
Atgeirr Flø Rasmussen
87188f5862 Avoid using the Wells struct. 2019-11-25 08:36:18 +01:00
Joakim Hove
fce5d2f369 Rename Well2 -> Well and Group2 -> Group 2019-11-13 23:18:01 +01:00
Atgeirr Flø Rasmussen
a536b90891 Improve stopped wells logic and log messages. 2019-10-18 16:08:07 +02:00
Tor Harald Sandve
c21428419a support REIN for solvent 2019-10-18 16:08:07 +02:00
Tor Harald Sandve
f71d6c8623 implement proper guiderate support
Tested on simple problems including GUIDERAT
2019-10-18 16:08:07 +02:00
Tor Harald Sandve
53896ffca8 Use well and group controls from opm-common.
This PR remove the usage of well_control_ from opm-core
and instead uses the control classes for wells and groups
from opm-common.
This PR also removes the usage of the group classes from
opm-core.
2019-10-18 16:08:07 +02:00
Atgeirr Flø Rasmussen
5211217c94 Whitespace fixes (tabs->spaces, reformatted new files). 2019-10-11 15:57:51 +02:00
Halvor M. Nilsen
d873ae165d Enable single-phase runs. 2019-10-11 08:19:18 +02:00