Commit Graph

95 Commits

Author SHA1 Message Date
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
Arne Morten Kvarving
73ccb42634 changed: make has_polymer contexpr
and use if constexpr to eliminate some code
2021-05-11 12:33:54 +02:00
Arne Morten Kvarving
a78c7e598d changed: make has_solvent and has_zFraction constexpr
and use if constexpr to eliminate some code
2021-05-11 12:28:10 +02:00
Bård Skaflestad
38292aca72
Merge pull request #3225 from totto82/refactorAssembleWellEq
Avoid code duplication
2021-05-10 12:27:52 +02:00
Tor Harald Sandve
80413e0794 add useInnerIteration method and move assembleWellEq to the well interface to avoid code duplication 2021-05-10 09:41:18 +02:00
Tor Harald Sandve
687a2ca977 Improve initialization of the well rates for trivial rates
This also applies for rates with opposite direction.
2021-05-06 08:48:30 +02:00
Tor Harald Sandve
70150ab212 Remove code duplication between STW and MSW 2021-04-30 09:27:35 +02:00
Joakim Hove
e1d117c59f Extract group state and create WGState to manage well & group state 2021-04-27 10:55:38 +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
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