Commit Graph

157 Commits

Author SHA1 Message Date
Arne Morten Kvarving
a4c0af09d9 fixed: do not use Opm:: prefix when inside namespace Opm 2021-05-05 11:59:18 +02:00
Bård Skaflestad
f273e06c66
Merge pull request #3198 from akva2/janitoring
Remove some unused members and quell some warnings
2021-04-30 15:08:48 +02:00
Arne Morten Kvarving
3c77b97cae MultisegmentWellContribution: remove unused members 2021-04-30 13:09:25 +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
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
c23094b299 make another throw tread safe 2021-02-24 15:54:02 +01:00
Kai Bao
f00b4d9aa8
Merge pull request #3059 from alfbr/fix-error
Do not report confusing error
2021-02-23 14:21:59 +01:00
Alf Birger Rustad
034dab84f9 Messages sent to debug file 2021-02-23 12:17:51 +01:00
Joakim Hove
fda1d65494 Pass table argument to VFP getFLo() 2021-02-15 22:21:56 +01:00
Alf Birger Rustad
40800da0a8 Do not report confusing error 2021-02-11 23:48:30 +01:00
Kai Bao
e77f8b2f7d
Merge pull request #2997 from totto82/avoidDoubleCopy
dont copy the well model in computeWellPotentials
2021-01-28 11:45:41 +01:00
Joakim Hove
e4789d4eb7 Use std::reference_wrapper for VFP tables 2021-01-26 07:56:59 +01:00
Atgeirr Flø Rasmussen
18a8d78f02
Merge pull request #3008 from GitPaean/cleaningup_after_aicd_pr
refactoring the pressure assemble equations for ICD
2021-01-22 08:26:16 +01:00
Tor Harald Sandve
91ab0f4d93 fix phase index for WELLPI for MSW 2021-01-21 11:58:24 +01:00
Kai Bao
00ca6dc492 putting all the pressure assmeble function to one function
assemblePressureEq for MSW
2021-01-08 16:46:32 +01:00
Kai Bao
2dc63b7a57 putting the three ICD assembleEq function to be one
to reduce the code duplication.
2021-01-08 15:09:27 +01:00
Tor Harald Sandve
967f99500c dont copy the well model in computeWellPotentials 2020-12-22 09:25:56 +01:00
Tor Harald Sandve
273538e1f4 some cleanup 2020-12-16 12:58:17 +01:00
Tor Harald Sandve
30ce605713 use the old initSegmentRates when opening up wells 2020-12-15 15:15:59 +01:00
Tor Harald Sandve
d027205c34 Initial well rates with the well potentials and scale the segment rates
Initialize the well rates with well potentials when computing rates from bhp or bhp(thp)
The bhp was already initialized.

Scale the segment rates and pressure to adapt to changes in well rate and bhp

Improves convergence of the well potential calculations
2020-12-15 08:39:22 +01:00
Tor Harald Sandve
5fb73c9714 Only check well operability for wells under THP and BHP limits 2020-12-08 12:38:25 +01:00
Tor Harald Sandve
8ca9cc241a remove unused warnings 2020-12-08 12:38:25 +01:00
Tor Harald Sandve
bc04fb68ef check the sum not individual phases for operability 2020-12-08 12:38:25 +01:00
Tor Harald Sandve
90050372ae keep msw wells open even if bhp from thp fails 2020-12-08 12:38:25 +01:00
Tor Harald Sandve
a7664f9ea6 Add check for operability of MSW 2020-12-08 12:38:25 +01:00
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
61bebb2ec5 addressing reviewing comments for OPM/opm-simulators#2951 2020-12-03 15:23:14 +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
Markus Blatt
ab114b2e95 Use WellInterface::perf_data_ to calculate PI.
that simplifies the code a bit and will work with
distributed wells. Previously, we assumed that all
non-shut perforations are stored locally. That does
not hold any more.
2020-12-01 14:11:05 +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
92589a697b PI/II Loop: Switch Order of Injection/Production Branches
For readability reasons.

Suggested by: [at]atgeirr
2020-11-24 21:53:58 +01:00
Bård Skaflestad
c8a43b982c PI/II Loop: Check That We Process All Active Connections
Assert that the 'subsetPerfID' is equal to number_of_perforations_
at the end of the loop.

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
Arne Morten Kvarving
a95cc3dcbc fixed: signed/unsigned comparison warnings 2020-11-19 11:03:06 +01:00
Atgeirr Flø Rasmussen
d69dbf598e Response to review comments. 2020-11-17 12:53:04 +01:00
Atgeirr Flø Rasmussen
82ecb1e7cd Implement addWellContributions() for MultisegmentWell. 2020-11-16 11:42:29 +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
Atgeirr Flø Rasmussen
52c695937b Implement extended network model. 2020-10-15 10:54:03 +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
Tor Harald Sandve
165fa96250
Merge pull request #2824 from hakonhagland/gas_lift3
Implements support for gas lift optimization.
2020-10-02 14:48:27 +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
Markus Blatt
d30f6d272b [gpu] Support UMFPack with DUNE 2.7
The index type changed from int to long int with 2.7.
2020-09-30 20:10:21 +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