Commit Graph

53 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
83a6c2abae
Merge pull request #2947 from blattms/fix-parallel-well-red
Prepares for apply distributed standard wells.
2020-12-04 20:32:30 +01:00
Kai Bao
6e8394eba6 supporting WSEGAICD 2020-12-03 15:23:14 +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
bd79d4b9d5 PI/II: Switch to Using Values Only
We don't need to do the calculations in terms of EvalWell when we're
going to reduce this to the .value() before calling the PI/II
calculation routine.  We can also get by with a simpler approach to
computing the II by assuming we always inject pure phases and no
cross flow in injectors.

Suggested by: [at]atgeirr
2020-11-24 21:53:58 +01:00
Bård Skaflestad
a46a732f9e PI: Treat Production Differently From Injection
This commit makes the PI/II calculation more closely mirror the
approach taken when computing connection flow rates.  In particular,
we switch to using total mobility, mixing and volume ratios for
injecting connections while producing connections continue to use
the phase mobilities and formation volume factors derived from
conditions in the connecting cells.  We also include dissolved
gas/oil ratios and vaporised oil/gas ratios in order to fully
capture the surface flow conditions.

We split the handling of producing/injecting connections out to
separate helper functions in order to make the overall logic in
updateProductivityIndex() more manageable.ex() more manageable.
2020-11-24 21:53:58 +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
Atgeirr Flø Rasmussen
8eb4d1dc70 Implemented computeCurrentWellRates() for multisegment wells.
Also add effect of rock compressibility on well connection transmissibility factors,
which was added to StandardWell earlier but not MultisegmentWell.
2020-10-15 16:24:55 +02:00
Atgeirr Flø Rasmussen
7e87ea3200 Refactor to put updateWellStateRates() in base class. 2020-10-15 14:15:05 +02:00
Kai Bao
64746e21bf
Merge pull request #2826 from akva2/janitoring
fixed: make some indices constexpr
2020-10-06 11:21:40 +02:00
Håkon Hægland
c0b493c4ce Fix inconsistent-missing-override warnings 2020-10-03 10:43:09 +02:00
Arne Morten Kvarving
7ffceeba57 fixed: make some indices constexpr
also use the bool conditions for conditional deref'ing with the indices.
this helps avoid maybe uninitialized warnings with gcc
2020-10-01 11:46:31 +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
Tor Harald Sandve
c2c009ecb6 clean-up based on review 2020-09-14 15:42:48 +02:00
Tor Harald Sandve
1a7b617074 guards against non-exsisting phases 2020-09-14 14:44:16 +02:00
Tor Harald Sandve
a323487b3b Fix the equation index for 2p oil-water simulations 2020-09-14 14:44:16 +02:00
Arne Morten Kvarving
914053ac3c changed: remove GET_PROP_VALUE macro usage 2020-08-27 13:01:51 +02:00
Markus Blatt
7261759065 Reuse UMFPack decomposition whenever possible.
We hold a shared pointer to the umpfack solver that gets reset
whenever the matrix is changed. When applying the decomposition
we will be recomputed if the solver pointer is null.
2020-08-18 17:55:50 +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
T.D. (Tongdong) Qiu
8913e1d057 Make sure OpenCL can be used without CUDA 2020-06-25 18:44:49 +02:00
Tor Harald Sandve
43d434d42e trivial clean up 2020-06-17 08:39:19 +02:00
Joakim Hove
5b940836ec Remove MultisegmentWell::calculateSICDFlowScalingFactors() 2020-06-04 14:13:14 +02:00
Tor Harald Sandve
cf702a5384 use relaxed tolerance for MSW when solution stagnates 2020-05-22 20:52:14 +02:00
T.D. (Tongdong) Qiu
04ee2be348 cusparseSolver can now handle MultisegmentWells, they are actually applied on CPU via SuiteSparse/UMFPACK 2020-05-15 16:40:34 +02:00
Kai Bao
251c09a288 adding the several pressure drop values to WellState for MSW
segpress_ and segrates_ are renamed to help the name style.
2020-04-17 00:38:38 +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
Joakim Hove
9268bcb2ac InjectorType enum is moved out from Well class 2020-03-03 09:08:02 +01:00
Arne Morten Kvarving
bea2459c65 replace boost::optional with std::optional 2020-02-19 11:20:16 +01:00
Kai Bao
61ed33c458 implementing the support for WSEGVALV 2019-12-11 14:43:09 +01:00
Kai Bao
196e997e79 various fixes and improvements 2019-12-06 10:15:11 +01:00
Kai Bao
cc77c0e826 importing the old WSEGSICD implementation
with small adjustments to make it compile
2019-12-06 10:14:20 +01:00
Atgeirr Flø Rasmussen
d96e0a2478 Refactor solving functions to take control objects directly.
This allows us to avoid some very hacky manipulation of the Well object.
2019-12-05 12:40:35 +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
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
Tor Harald Sandve
159f36ff85 add openCrossFlowAvoidSingularity functionality for MSW 2019-11-07 14:01:21 +01:00
Tor Harald Sandve
abbff074b4 add support for thp control in MSW 2019-11-01 10:04:44 +01: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
Robert Kloefkorn
f708286111 [cleanup][Wells] Consequently use SparseMatrixAdapter in addWellContributions. 2019-10-09 10:27:38 +02:00
Joakim Hove
3d36565db7 Adapt to enum changes 2019-09-03 22:18:34 +02:00
Kai Bao
f40c1cc12f throw when calling addWellContributions() for MSW 2019-08-15 11:29:30 +02:00
Kai Bao
53b15527c2 fixing warnings under simulator/wells 2019-06-26 09:52:38 +02:00
Atgeirr Flø Rasmussen
ff2965e346
Merge pull request #1862 from GitPaean/fixing_multisegment_wells_cleaning_up_restarting_test_1
adding function updateUpwindingSegments() for MSW
2019-05-29 10:09:08 +02:00
Kai Bao
236e4d7e33 adding function updateUpwindingSegments() for MSW
to update the upwinding segment for each segment based on flow direction
2019-05-28 12:35:59 +02:00
Tor Harald Sandve
613473082f Address PR comments 2019-05-24 16:45:27 +02:00
Tor Harald Sandve
821794b0ad Add well potential output to MSW
The common part is moved to the well interface class
This commit also adds iterations to the standardWells
well potential calculations to improve the results
2019-05-23 15:32:48 +02:00