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
Markus Blatt
49ed3d6468
Removes rest of the commented out code introduced with applyUMFPack.
2020-08-20 10:17:33 +02:00
Markus Blatt
0c0be3a941
Reset duneDSolver only once.
2020-08-18 17:55:50 +02:00
Markus Blatt
ae8e2fb8c2
Removed commented out code from MSWell.
2020-08-18 17:55:50 +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
fc45b1bd47
Add inner iterations for standard wells also
2020-08-11 09:10:19 +02:00
Markus Blatt
faaee51d09
Merge pull request #2682 from Tongdongq/openclSolver
...
Added openclSolver
2020-07-10 13:38:32 +02:00
Tor Harald Sandve
88ee892fdf
pass the saltConcentration to the waterPVT
2020-07-02 13:44:01 +02:00
Tor Harald Sandve
6a7e816368
Add brine to output
2020-06-30 14:15:54 +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
Tor Harald Sandve
e9d040a284
Fix upwining for friction, acceleration, valve and SIGD for MSW
...
Note 1:
The rate vectors used for the pressure equation now contains derivatives wrt to the upwind segment for fractions.
To make sure derivatives wrt. to different segmens gets mixed we disregard the derivatives for the properties (density, viscosity) evaluated at the upwind segment.
Note 2:
A factor 2 is added to the velocity head term similar as in the friction term
Note 3:
A sign change is added to the acceleration term for massrates > 0. Is this correct. It seems like the reference simulator does this.
2020-06-17 08:39:19 +02:00
Joakim Hove
baba9b6773
Merge pull request #2642 from joakim-hove/icd-variant
...
Use std::variant access to Segment::icd
2020-06-11 11:32:08 +02:00
Joakim Hove
be5f3ff2e1
Use std::variant access to Segment::icd
2020-06-10 20:41:14 +02:00
Kai Bao
23a9f4732b
Merge pull request #2666 from atgeirr/msw-log-output-cleanup
...
Prettifying and reducing log output from MSW.
2020-06-10 19:44:01 +02:00
Atgeirr Flø Rasmussen
dd8e42958a
Prettifying and reducing log output from MSW.
2020-06-10 16:36:17 +02:00
Joakim Hove
5b940836ec
Remove MultisegmentWell::calculateSICDFlowScalingFactors()
2020-06-04 14:13:14 +02:00
Atgeirr Flø Rasmussen
6f1a159adc
Merge pull request #2611 from totto82/improveConvergenceMSW
...
Improve convergence msw
2020-05-30 17:00:30 +02:00
Tor Harald Sandve
b11d805e45
fix output message
2020-05-29 15:40:44 +02:00
Joakim Hove
195d2b1c21
Rename SpiralICD -> SICD
2020-05-28 11:10:51 +02:00
Tor Harald Sandve
8a5c9e82df
add run time parameters for msw convergence tuning. Default values are set to minimize convergence failures for model2 based tests. These parameters are also tested on bigger models with good results
2020-05-22 20:52:14 +02:00
Tor Harald Sandve
ec7c6e236d
increase segment volume to stabilize to improve convergence
2020-05-22 20:52:14 +02:00
Tor Harald Sandve
d49c590879
apply the relaxtion factor on the pressure change not the max pressure change limit
2020-05-22 20:52: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
98a8dac155
Passing std::vectors to pass data for C and B faster. Variables for D are initialized in initializer list.
2020-05-21 11:41:15 +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
Tor Harald Sandve
904353367d
compute initial volume fractions on the well copies also
2020-05-08 19:29:20 +02:00
Joakim Hove
da5042c538
Update connection <-> segment implementation
2020-04-30 14:53:35 +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
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
Tor Harald Sandve
92ee56c3b3
scale guiderate by current well rate
2020-04-02 13:54:47 +02:00
Atgeirr Flø Rasmussen
27f62399f5
Handle guide-rate based well constraints from groups.
2020-04-02 10:41:57 +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
Joakim Hove
150dc54e79
Merge pull request #2298 from totto82/muliple-group-inj-phases
...
Allow for multiple group injection phases
2020-02-14 10:31:45 +01:00
Joakim Hove
3ff6279eea
Remove unused members when serializing WellSegments
2020-02-13 08:47:24 +01:00
Tor Harald Sandve
2d2ec82640
fix MPI
2020-02-11 09:33:58 +01:00
Tor Harald Sandve
e39e327451
fix 2p
2020-02-11 09:33:58 +01:00
Tor Harald Sandve
469ffa2cbe
allow for multiple group injection phases
2020-02-11 09:30:19 +01:00
Atgeirr Flø Rasmussen
63a2460ed4
Bugfix: correct well efficiency factors for MSW
...
With this, the conservation equations for the mswell are in terms of
effective flows. This is similar to the treatment for standard wells.
The alternative (formulating the equations in full rates) could be
better and clearer in the long run.
2019-12-23 12:37:20 +01:00
Arne Morten Kvarving
c14a991b25
Merge pull request #2235 from totto82/wellEffFix
...
Fix bug in the well efficiency factor
2019-12-20 08:31:16 +01:00
Tor Harald Sandve
29c2a3da3f
only count group under group control when accumulating the group potentials
2019-12-18 11:40:06 +01:00
Tor Harald Sandve
6aafdba80d
fix well efficency factor
2019-12-18 10:29:04 +01:00
Atgeirr Flø Rasmussen
f769b97198
Merge pull request #2225 from atgeirr/fix-zero-wconprod
...
Shut wells under zero WCONPROD when disallowing crossflow
2019-12-13 14:41:52 +01:00
Atgeirr Flø Rasmussen
a89e8f6457
Complain less about missing operability checking.
...
Do not give a warning for production wells or history wells,
respect the EnableWellOperabilityCheck flag. This is identical
to the behaviour of StandardWell. There will now only be a
warning for producers in prediction mode.
2019-12-13 11:00:01 +01:00
Kai Bao
61ed33c458
implementing the support for WSEGVALV
2019-12-11 14:43:09 +01:00
Atgeirr Flø Rasmussen
52b9ecbfd5
Merge pull request #2210 from totto82/gconsalesump
...
Support for Gconsale and Gconsump
2019-12-06 15:01:49 +01:00
Kai Bao
799997d70a
fixing a mistake was introduced when rebasing
2019-12-06 10:34:58 +01:00
Kai Bao
ab9d175e8d
addressing the reviewing comments for PR#2178
2019-12-06 10:15:12 +01:00
Kai Bao
196e997e79
various fixes and improvements
2019-12-06 10:15:11 +01:00
Kai Bao
3d7f0efe07
various fixes.
...
the most important one is that the formulation is changed in the recent
version
2019-12-06 10:14:20 +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
Bård Skaflestad
c256bfdfa4
Merge pull request #2170 from atgeirr/msw-thp-potential
...
Compute well potential of multi-segment wells with a THP constraint
2019-12-06 10:02:50 +01:00
Tor Harald Sandve
4d8d9a7a05
Fix vrep
2019-12-06 09:04:50 +01:00
Tor Harald Sandve
876f5587e5
Add GCONSALE and fix conversion from UDA
2019-12-05 13:08:17 +01:00
Tor Harald Sandve
615e4422b9
BUGFIX REIN
2019-12-05 13:08:17 +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
Tor Harald Sandve
c930ac9858
fix spelling
2019-12-04 11:39:26 +01:00
Tor Harald Sandve
9e64896054
fix issue when GRUP is used in WCONPROD and WCONINJE and NONE group control
...
Use a bhp control when a well is controlled by a unvalied group control
2019-12-04 11:37:00 +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
95f013bd96
fixup review comments. including bug in updateGroupTargetReduction
2019-11-08 14:07:12 +01:00
Tor Harald Sandve
159f36ff85
add openCrossFlowAvoidSingularity functionality for MSW
2019-11-07 14:01:21 +01:00
Tor Harald Sandve
008eb17693
Support nupcol
...
Only update groupTargetReduction, group REIN rates and group VREP rates when iteration < nupcol
2019-11-06 10:23:30 +01:00
Atgeirr Flø Rasmussen
672835710b
Merge pull request #2140 from totto82/fixGroupProd
...
Fix for hierarchy of production groups.
2019-11-05 16:15:29 +01:00
Tor Harald Sandve
485bbfe010
fix group prod
2019-11-05 15:04:26 +01:00
Tor Harald Sandve
fb815e78e6
compute resv rates for MSW
2019-11-05 13:11:03 +01:00
Atgeirr Flø Rasmussen
bc71341462
Merge pull request #2125 from totto82/mswThp
...
add support for thp control in MSW
2019-11-04 11:25:20 +01:00
Tor Harald Sandve
375d936ecd
Support custom vrep and rein group
2019-11-01 14:57:50 +01:00
Tor Harald Sandve
abbff074b4
add support for thp control in MSW
2019-11-01 10:04:44 +01:00
Tor Harald Sandve
9a3ce14885
scale the gas equation, not the control
2019-10-24 10:54:50 +02:00
Tor Harald Sandve
e1f09d89cd
Scale MSW injector
2019-10-24 10:18:16 +02:00
Arne Morten Kvarving
af2e150118
fixed: missing break
2019-10-18 16:08:07 +02:00
Arne Morten Kvarving
17a6861f09
quell unused parameter warning
2019-10-18 16:08:07 +02:00
Arne Morten Kvarving
33dee9f7f8
quell shadowing warnings
2019-10-18 16:08:07 +02:00
Tor Harald Sandve
5e1ec249cd
don't count wells not under group controll when computing guiderates
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
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
Atgeirr Flø Rasmussen
fdcfa8f0ff
Merge pull request #1955 from GitPaean/well_potential_improvements
...
using self-copying when calculating well potentials
2019-08-21 15:31:09 +02:00
Kai Bao
f40c1cc12f
throw when calling addWellContributions() for MSW
2019-08-15 11:29:30 +02:00
Kai Bao
4d8afb8539
using self-copying when calculating well potentials
...
in order to re-use the existing well model in stead of re-creating new
ones. The latter way really complicates the function createWellContainer
in BlackWellModel.
2019-08-09 10:02:28 +02:00
Kai Bao
dfe22cb1a4
Merge pull request #1901 from totto82/fixMSWThrow
...
Make sure rvmax and rsmax is non-negtive in the getSurfaceVolume for MSW
2019-06-27 15:41:45 +02:00
Kai Bao
53b15527c2
fixing warnings under simulator/wells
2019-06-26 09:52:38 +02:00
Tor Harald Sandve
337ad8a046
Make sure rvmax and rsmax is non-negtive in the getSurfaceVoluem for MSW
...
Negative values can happen if the pressure is outside the table range
2019-06-21 08:15:30 +02:00
Tor Harald Sandve
a7f718a368
Some clean-up adressing PR comments
2019-06-19 09:13:38 +02:00
Tor Harald Sandve
5c7cfd8c21
fix scaling of gas injector
2019-06-17 08:40:44 +02:00
Tor Harald Sandve
22af6e563c
fix upwinding for injector
2019-06-17 08:40:44 +02:00
Tor Harald Sandve
c39cec55fe
fix control eq inj
2019-06-17 08:40:44 +02:00
Kai Bao
8fd1a8b7da
assert pressure derivative in getSegmentRateUpwinding is zero
2019-05-31 12:51:50 +02:00
Kai Bao
5aacda1880
adding some comments about getSegmentRateUpwinding()
2019-05-31 11:22:35 +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
Joakim Hove
b6840db604
Use new well implementation Well2 from opm-common
2019-05-22 21:47:45 +02:00
Kai Bao
080e840f2f
using tolerance_wells_ for BHP control tolerance for MSW
2019-05-16 12:20:35 +02:00
Kai Bao
28f0274fb5
fixing bugs spotted in the review comments
2019-05-15 16:28:18 +02:00
Kai Bao
4593453d10
adding function checkConvergenceControlEq to refactor getWellConvergence
...
only functional change is that rate control or BHP control has different
tolerance for MSW now.
2019-05-15 16:28:18 +02:00
Kai Bao
8c96aeebbe
updating well control during iterateWellEquations in MSW
2019-05-10 14:56:20 +02:00
Atgeirr Flø Rasmussen
c17adf788f
Moved files to opm/simulators/ subdirs.
2019-05-08 12:58:19 +02:00