Commit Graph

3437 Commits

Author SHA1 Message Date
hnil
da572d1f60 -Fixed buges related to cpr with wells.
- change interfaces to have access to pressureVarIndex
- added option in cmake files to propagate checking in dune-istl
2022-06-08 17:02:02 +02:00
Atgeirr Flø Rasmussen
fef06a77af Updated for upstream changes. 2022-06-08 17:02:02 +02:00
hnil
f3acfcde0b Adding functions for pressure system manipulation to well models.
Also add well-aware operator and transfer policy.
This will be used for CPR with custom operators.
2022-06-08 17:01:33 +02:00
Bård Skaflestad
e6dff88eb7 Temporarily Limit Block-Jacobi Partitioner to OpenCL Only
The block-Jacobi partitioner (commit e360c00b7) uses grid interfaces
that are only available in CpGrid and this blocks introducing other
grid managers such as ALUGrid.  Since the partitioner was only added
for OpenCL, guard special purposes accesses with HAVE_OPENCL.

This is a temporary measure and we will venture to restore the
partitioner later, although possibly restricted to CpGrid only.
2022-06-08 16:14:39 +02:00
Bård Skaflestad
b593baff2f
Merge pull request #3926 from totto82/fix_operability
Fix well operability
2022-06-08 16:09:02 +02:00
Tor Harald Sandve
1f876d1800 implement rsrv item 10 WCONINJE
MSW not supported yet
2022-06-08 13:55:29 +02:00
Tor Harald Sandve
46c8aa3306 fix hydrostatic correction for branched wells in IPR 2022-06-08 12:29:05 +02:00
Markus Blatt
ac59429e01
Merge pull request #3935 from Tongdongq/fix-replace-zero-diagonal
Fix: zeros were not replaced correctly in the diagonal for GPU
2022-06-08 12:28:30 +02:00
Tong Dong Qiu
91a54645fb Fix: zeros were not replaced correctly in the diagonal
And minor changes
2022-06-08 10:00:22 +02:00
Tor Harald Sandve
3adaa1b987 fix component/phase mixup 2022-06-07 14:14:13 +02:00
Tor Harald Sandve
e965dac3ee Only flag a bhp producer/injector operable if the sum of IPR are negative/positive 2022-06-07 10:47:22 +02:00
Tor Harald Sandve
147fe77779
Merge pull request #3934 from totto82/stopnocross
stopped wells where cross flow is not allowed are not added to the container
2022-06-07 10:36:07 +02:00
Tor Harald Sandve
cec8e7c724
Merge pull request #3924 from totto82/steeringBHPtoHighestRate
Steer bhp towards the solution with the highest production rate
2022-06-07 10:35:53 +02:00
Tor Harald Sandve
6cc71375b4 stopped wells where cross flow is not allowed are not added to the container 2022-06-07 10:01:02 +02:00
Bård Skaflestad
be4221ea92
Merge pull request #3869 from plgbrts/vapoilwat
adding three-phase simulator including water evaporation and salt precipitation
2022-05-25 15:33:53 +02:00
Tor Harald Sandve
6f410e7b03 Steer bhp towards the solution with the highest production rate 2022-05-25 15:30:36 +02:00
Tor Harald Sandve
cce9e2d0b3
Merge pull request #3910 from hakonhagland/python_rates2
Dynamically update Opm::Schedule from Python
2022-05-25 08:42:13 +02:00
Bård Skaflestad
252d0afe8e Emit Actual Message on Input Failure
This gives more information to the user and hopefully aids them in
resolving the underlying issue.
2022-05-20 16:30:19 +02:00
Markus Blatt
02aaec82f7
Merge pull request #3815 from Tongdongq/subdomain-matrix-for-opencl
Subdomain matrix for opencl ILU preconditioner
2022-05-20 16:05:14 +02:00
Kai Bao
15bf35ffe0 removing unused well_state0 in iterateWellEqWithControl
for MSW.
2022-05-18 10:18:35 +02:00
Paul Egberts
a255613452
Merge branch 'master' into vapoilwat 2022-05-11 11:55:54 +02:00
Paul Egberts
6fe10a3e23 add throw for case msw is true and vapwat is true 2022-05-11 11:50:54 +02:00
Håkon Hægland
91ac3a2a32 Dynamically update schedule from Python
Adds some methods that enables Opm::Schedule to be dynamically modified
from Python. A test case in test_schedule.py illustrates the use case.
2022-05-05 13:10:39 +02:00
Tong Dong Qiu
b00d31042c Check if memory for nnzs is contiguous 2022-05-04 16:15:57 +02:00
Tor Harald Sandve
ea82bebb3a
Merge pull request #3909 from totto82/fix_reg_msw
reset regularize_ before starting the inner iterations
2022-05-03 13:44:00 +02:00
Paul Egberts
5a23084846 restored MultisegmentWellEval.cpp 2022-05-03 11:54:41 +02:00
Tor Harald Sandve
dfe0982286 reset regularize_ before starting the inner iterations 2022-05-03 08:25:26 +02:00
Kai Bao
57d8f1aa24 update primary variables in prepareTimeStep
it should not change running results.
2022-05-02 13:47:16 +02:00
Tor Harald Sandve
6bf90c9ebe change default reg factor for MSW to 100 2022-05-02 09:41:43 +02:00
Tor Harald Sandve
74d8db36c5
Merge pull request #3859 from totto82/default_strict
use a relaxed (but not too relaxed) well tolerance when iter>6
2022-04-29 15:53:53 +02:00
Kai Bao
7145ec32ee renaming function updateWellState
to updatePrimaryVariablesNewton

this should be a fallout during the well code refactoring
2022-04-29 12:55:54 +02:00
Arne Morten Kvarving
7edca13df6 fixed: add missing config.h include 2022-04-28 11:38:02 +02:00
Markus Blatt
51d8c9536e Spelling fix geomtry -> geometry.
Actually one should rename the function used from opm-common, too.
But that is for later...
2022-04-27 20:52:30 +02:00
Markus Blatt
c66fb8a93d Added support for water-only and water-only + thermal to flow.
Also run the onephase tests with flow now.
2022-04-26 17:07:09 +02:00
Tor Harald Sandve
52fca6c91d use a relaxed (but not too relaxed) well tolerance when iter>6
also shut unsolvable wells during iterations as default

Note however that getWellConvergence return false if a well is unsolvable
i.e. it will cut the timestep and redo the iteration if the well is unsolvable
and only shut it completly if the time step is below the
MinTimeStepBeforeShuttingProblematicWellsInDays (default 0.01 days)
2022-04-26 10:55:22 +02:00
Tor Harald Sandve
4b5a53eaeb
Merge pull request #3887 from totto82/init_alt_eps
use alternative init for wells with all rates less than eps
2022-04-26 10:46:19 +02:00
Tor Harald Sandve
bd145913e8 use alternative init for wells with all rates less than eps 2022-04-26 09:32:18 +02:00
Atgeirr Flø Rasmussen
75ccd88f4f
Merge pull request #3888 from totto82/stop_tgr2
fix trivial group target
2022-04-26 08:34:06 +02:00
Atgeirr Flø Rasmussen
374b25639e
Merge pull request #3872 from totto82/fix_stop_inoperable
Fix STOP in combination with inoperable/unsolvable
2022-04-25 10:31:02 +02:00
Tor Harald Sandve
d00a2e2341 fix trivial group target 2022-04-25 08:10:19 +02:00
Markus Blatt
d58e11d591
Merge pull request #3875 from OPMUSER/Radial-Spider-Grid-Update-Backport-Candidate
Radial and Spider Grid Keywords Not Supported
2022-04-22 14:24:54 +02:00
Tor Harald Sandve
92175cf094 Fix STOP in combination with inoperable/unsolvable 2022-04-22 09:15:09 +02:00
Tor Harald Sandve
c8bef3bcd5 only check if wells has negative potentials if check_well_operabilty=true(default) 2022-04-22 08:19:33 +02:00
Tong Dong Qiu
cb1ee68967 Fix ILU0 creation for NONE reordering 2022-04-21 17:19:02 +02:00
Tong Dong Qiu
50d7c0f61d Tweak verbosity for opencl 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
68b604c85f Speed up reordering for opencl 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
fc298d8f9c Allow cusparseSolver to use jacMatrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
4db112cafa Use row_wise mode to build jacMatrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
1a1bc24bef Delay creating sparsity pattern for jacobi Matrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
2683019280 Bugfix: set vector size for MSwells was removed during refactoring 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
448af67ce6 Merge duplicate functions 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
6ca5f167b2 Allow BISAI to use jacMatrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
6f89629f92 Fix wrong print, remove unused variables 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
1cec56fa68 Use implicit mode to build jacMatrix
Fix print variable
2022-04-21 17:19:01 +02:00
Tong Dong Qiu
550ce92902 Faster copying to jacMatrix 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
3797b7297d Merge some duplicate functions 2022-04-21 17:19:01 +02:00
Tong Dong Qiu
d963820e48 Pass BlockedMatrix to BdaSolvers 2022-04-21 17:19:00 +02:00
Tong Dong Qiu
7f5322f7d4 Store a BlockedMatrix in BdaBridge 2022-04-21 17:19:00 +02:00
Tong Dong Qiu
9dec714590 Allow to use jacobi matrix for ILU with CPR
Fix whitespace
2022-04-21 17:19:00 +02:00
Tong Dong Qiu
61f693dbaf reenable normal opencl
Rebased
2022-04-21 17:18:54 +02:00
Tong Dong Qiu
dee5e16fb8 subdomain matrix for opencl
Rebased
2022-04-21 17:18:40 +02:00
Tong Dong Qiu
e360c00b73 add block-jacobi partitioner option. Add block-jacobi matrix for use in OpenCL preconditioner
Rebased
2022-04-21 17:18:32 +02:00
Tor Harald Sandve
969dff4ede
Merge pull request #3864 from totto82/regMSW
regularize MSW equation when iter > strict_inner_iter
2022-04-21 09:15:15 +02:00
Tor Harald Sandve
03c1884533
Merge pull request #3873 from totto82/aprox_thp
tighten approximated solution bhpFromThpLimit from 3 to 0.1 bar
2022-04-21 08:56:57 +02:00
Tor Harald Sandve
fd6cf1ccbd regularize MSW equation when iter > strict_inner_iter 2022-04-21 08:44:50 +02:00
Håkon Hægland
9d04895ddb Fix assertion error for 2p oil water
VFP calculations for two phase gas lift does not work unless the
rates are adpated to include a zero gas rate.
2022-04-20 21:47:15 +02:00
Håkon Hægland
11907495c1 Well testing of gas lift wells
Assign a maximum ALQ value to each GLIFT producer when doing well testing
in beginTimeStep(). This allows the well to be considered open. Then,
later in the timestep, when assemble() is called, the full gas lift
optimization procedure can adjust the ALQ to its correct value.

It is also observed that in some cases when gas lift is switched off by
setting ALQ to zero, and later in the schedule is switched back on again,
it might not be possible to determine bhp from thp for low small ALQ values.
Instead of aborting the gas lift optimization, we should try increasing
ALQ until we get convergence or until the maximum ALQ for the well is
reached.
2022-04-20 10:51:34 +02:00
OPMUSER
89461ed058 Radial and Spider Grid Keywords Not Supported
Add the DR, DTHETA and OUTRAD keywords as unsupported keywords with messages to enable the user to debug the input deck.

Back port candidate for release.
2022-04-20 14:19:56 +08:00
Tor Harald Sandve
a1d11540a6 tighten approximated solution bhpFromThpLimit from 3 to 0.1 bar 2022-04-19 14:21:20 +02:00
Paul Egberts
17f2365406 clean up comments 2022-04-11 22:15:35 +02:00
Paul Egberts
c2fa5fc5a8 adding three-phase simulator including water evaporation and saltpreciopitation 2022-04-11 21:56:44 +02:00
Tor Harald Sandve
edf8786a58 avoid throw for nan residuals instead return well as unconverged 2022-04-11 09:52:25 +02:00
Markus Blatt
ff410d268a
Merge pull request #3863 from totto82/unsolvable_fix
fix to --shut-unsolvable-wells=true option
2022-04-11 07:33:46 +02:00
Paul Egberts
ab3be6dce4 adjustments to account for vaporized water 2022-04-08 22:36:39 +02:00
Tor Harald Sandve
6f29bf715c
Merge pull request #3778 from GitPaean/always_inner
[testing] always using inner iterations for testing purpose.
2022-04-08 15:44:33 +02:00
Tor Harald Sandve
e501a84958 support item 4 wvfpexp 2022-04-08 08:43:13 +02:00
Tor Harald Sandve
0c9bb3990e
Merge pull request #3830 from plgbrts/vapwat
Adding explicit input specification of water-gas ratio (RVW) and RVW output plus simulator gas-water system with salt precipitation and water evaporation for
2022-04-07 09:03:26 +02:00
Markus Blatt
282951dc44
Merge pull request #3848 from blattms/binary-package-version-no-buildtime
Use empty string for buildtime if BUILD_TIMESTAMP is not set.
2022-04-05 14:54:58 +02:00
Tor Harald Sandve
e2e0ec9dd9 fix to --shut-unsolvable-wells=true option 2022-04-05 14:42:27 +02:00
Tor Harald Sandve
fba9046201 Some more clean-up based on review 2022-04-04 11:37:31 +02:00
Tor Harald Sandve
69ffed06de Address comments from review
1) Add debug messages
2) Fix bug of missing else in the code
2022-04-04 08:24:32 +02:00
Tor Harald Sandve
5b53fcd8a6 guard against d = 0 2022-04-04 08:24:32 +02:00
Tor Harald Sandve
2e91d2f353 Do not throw when d = 0 instead continue with rs/rv = 0 2022-04-04 08:24:32 +02:00
Atgeirr Flø Rasmussen
245a87e296
Merge pull request #3851 from totto82/doublecheckecon
Avoid premature closing of wells due to econ limits
2022-04-01 10:01:47 +02:00
Kai Bao
aa633ff98f reconstructing the if structure for has_energy
in StandardWell<TypeTag>::
    calculateSinglePerf()
2022-03-31 22:38:55 +02:00
Tor Harald Sandve
8909b259d0 don't shut wells due to ratio when rate is negative 2022-03-28 10:50:15 +02:00
Tor Harald Sandve
71acf4e056 Double check econ potential limits
Sometimes the potentials are inaccurate as a safty measure we
also check that the rates are violated.
The rates are supposed to be less or equal to the potentials.
2022-03-28 10:50:15 +02:00
Bård Skaflestad
dfdfbbd7d7 Don't Process Corner-Point Data If No Valid Cell Geometry
If no cell has a valid corner-point geometry, typically caused by
using GDFILE to read non-finite data such as all ZCORN = -1.0E+20,
then we must not attempt to generate a grid structure.  If we do, we
will typically just fail somewhere deep down in the corner-point
processing code and generate a diagnostic message that's hard to
decipher.

With this commit we instead output a diagnostic message of the form

    Failed to create valid EclipseState object.
    Exception caught: No active cell in input grid has valid/finite cell geometry
    Please check geometry keywords, especially if grid is imported through GDFILE

This may not be a lot better than the original diagnostic

    Processing grid
    flow: ${ROOT}/opm-grid/opm/grid/cpgpreprocess/preprocess.c:768: is_lefthanded: Assertion `! searching' failed.
    Aborted (core dumped)

but does at least suggest that the grid data may be faulty.
2022-03-25 14:35:55 +01:00
Bård Skaflestad
0cd2ce6589
Merge pull request #3824 from totto82/notswitchthp
Avoid switching to thp control if production is decreasing or injection is increasing
2022-03-25 14:34:30 +01:00
Tor Harald Sandve
f4d81e33f1 Avoid switching to thp control if it results in higher rates 2022-03-25 09:12:15 +01:00
Tor Harald Sandve
2d6794f077
Merge pull request #3849 from hakonhagland/glift_debug_rank
Cleanup gaslift debugging output code
2022-03-24 14:13:33 +01:00
Håkon Hægland
a3c131955f Omit one redundant debugging message 2022-03-24 13:47:57 +01:00
Håkon Hægland
fbd6c03dd6 Cleanup glift debugging output code 2022-03-24 12:42:46 +01:00
Tor Harald Sandve
32dfdc6198 improve initialization msw new wells 2022-03-24 09:53:46 +01:00
Markus Blatt
08fd5da6a7 Use empty string for buildtime if BUILD_TIMESTAMP is not set.
In combination with the relevant changes in opm-common this
prevent flow in binary Linux packages from having a timestamp in the
executable that changes with every rebuild.

With the changes in opm-common  one can now set the variable
OPM_BINARY_PACKAGE_VERSION to a meaningful version string (Debian
11.2: 2021.10-4). If that is done and flow is built from tarballs it
will now not have a time stamp and print the package version to the
PRT file. E.g.

Flow Version     =  2021.10 (Debian 11.2: 2021.10-1)
2022-03-23 22:46:40 +01:00
Tor Harald Sandve
519b5dd8cc
Merge pull request #3810 from totto82/refactor_bhpFromThpLimit_1
Refactor bhp from thp limit
2022-03-22 13:57:52 +01:00
Tor Harald Sandve
c067e5fafd
Merge pull request #3834 from totto82/avoid_closing
Handle case where bhp target is violated
2022-03-22 11:56:21 +01:00
Tor Harald Sandve
7d5a0a74eb Handle case where bhp target is violated 2022-03-21 09:52:41 +01:00
Kai Bao
e05a0b276e fixing the scaling of segment rates
when initial segment rate is zero.
2022-03-14 14:01:24 +01:00
Kai Bao
ccfd4152d3 using addition to update segment pressure
when bhp is changed. It is much safer and more reasonable.

using multiplication is more likely to result in dramatic values.
2022-03-09 14:23:59 +01:00
Håkon Hægland
3cf181b2ee Throw exception instead of using assert
Throw an exception if two-phase gas lift optimization is used for
other phases than oil and water.
2022-03-07 15:58:11 +01:00
Håkon Hægland
438a712e54 Gas lift optimization for two-phase oil-water.
Add gas lift optimization support for two-phase oil-water flow.
2022-03-07 15:19:43 +01:00
Paul Egberts
390a5a4b82 clean up 2022-03-06 21:02:22 +01:00
Paul Egberts
797fdc278b water-gas ratio input and output plus simulator for salt precipitation and water evaporation 2022-03-01 20:52:43 +01:00
Tor Harald Sandve
8cfbe1d791
Merge pull request #3816 from totto82/control_well_testing
Set well control to thp or bhp in well testing
2022-02-23 10:36:17 +01:00
Markus Blatt
1d44a4beac
Merge pull request #3817 from bska/fix-pedantic-warning
Remove Extraneous Semicolon
2022-02-18 10:10:44 +01:00
Bård Skaflestad
e1d55d4017 Remove Extraneous Semicolon
This generates warnings when using GCC's "-Wpedantic" option.
2022-02-17 23:13:31 +01:00
Tor Harald Sandve
b931c5ef97 Check if guiderate is violated
If guiderate is violated change to group controll.
Note that a factor 1.01 is added to minimize oscilations.
Fix missing  multiplication with group efficiency when accumulating guiderates
2022-02-17 10:41:43 +01:00
Tor Harald Sandve
d8934ea7a9 Set well control to thp or bhp in well testing 2022-02-17 09:01:32 +01:00
Tor Harald Sandve
418880730e cleanup2 2022-02-15 12:43:58 +01:00
Tor Harald Sandve
cb99a2fc74 check also the validity of the iterated solution 2022-02-15 12:39:42 +01:00
Tor Harald Sandve
650416c647 cleanup 2022-02-15 12:39:42 +01:00
Tor Harald Sandve
e0573e99b1 iterate in computeBhpAtThpLimitProdWithAlq if no solution or potentials are negative 2022-02-15 12:39:42 +01:00
Tor Harald Sandve
ec08f80405 Refactor out the solving algorithm of bhp from thp via VFP to make it usable for injectors 2022-02-15 12:39:42 +01:00
Tor Harald Sandve
1001d35418 Move computeBhpAtThpLimitProd MSW code to common and apply it for both MSW and STW
The computeBhpAtThpLimitProd for MSW is faster and sufficiently robust and should also be used by STW
2022-02-15 12:39:42 +01:00
Håkon Hægland
c7aa43a82b Rename some methods and variables.
Renames some methods and variables to reflect that the well is no
longer necessarily a StandardWell. It can be either a MultisegmentWell
or a StandardWell. This should avoid confusion about the nature of
the variable.
2022-02-15 10:21:09 +01:00
Håkon Hægland
54160827de Add gaslift optimization support for MSW.
Implements gas lift optimization support for multisegmented wells (MSW).
2022-02-14 21:38:50 +01:00
Markus Blatt
a520733d5b
Merge pull request #3774 from plgbrts/expli-salt
allow for explicit initialization of SALT and SALTP
2022-02-11 14:35:57 +01:00
Tor Harald Sandve
0c8d0764d6 update well potensials in well state along with alq and update guide rates accordingly 2022-02-08 15:46:08 +01:00
Bård Skaflestad
57cc18cf1b
Merge pull request #3797 from totto82/add_total_gas
Add support for maximum total gas (alq + gas rate) in GLIFTOPT
2022-02-04 10:33:38 +01:00
Bård Skaflestad
e6ad6ec496
Merge pull request #3801 from totto82/add_performa
Add more performance summary output
2022-02-03 17:15:05 +01:00
Tor Harald Sandve
ad799b3e80 Add more performance summary output
This commit ads: NEWTON, MLINEARS, MSUMLINS, MSUMNEWT, NLINEARS, NLINSMIN, NLINSMAX
2022-02-03 15:03:37 +01:00
Markus Blatt
3b8501469c
Merge pull request #3800 from Tongdongq/move-gpu-files
Move gpu files
2022-02-03 12:55:41 +01:00
Tor Harald Sandve
bb99d1437b reduce alq when alq + gas production target is violated 2022-02-03 12:11:03 +01:00
Tong Dong Qiu
c1cbf7a00f Fix ChowPatelIlu compilation errors,
introduced in recent PR
2022-02-03 10:42:27 +01:00
Tong Dong Qiu
6c8ada4cd2 Reduced header inclusion and updated comments 2022-02-03 10:42:22 +01:00
Tor Harald Sandve
0b923e505a Add support for maximum total gas (alq + gas rate) in GLIFTOPT
Dont increase gaslift if the groups alq + gas production rate is above the given target
2022-02-02 10:54:32 +01:00
Tor Harald Sandve
009134d037 Limit well rates to honor group rates
If a well is under a group that is limited by a target, it should use as little gaslift as possible.
The reduction algorithm will reduce the gaslift of the well as long as the groups potential is above the groups target.
2022-02-02 10:30:48 +01:00
Tong Dong Qiu
275bfe2da4 Move cuda files to separate folder 2022-02-02 09:28:41 +01:00
Tong Dong Qiu
e81ca0526e Move opencl files to separate folder 2022-02-01 16:51:32 +01:00
Tor Harald Sandve
29ec104bb6
Merge pull request #3780 from hakonhagland/glift_swg_fx8
Refactor code in GasLiftSingleWellGeneric.cpp (part 3)
2022-02-01 11:11:17 +01:00
Håkon Hægland
65c323e1a4 Replace assert with warning.
Replace assert with warning when group rates exceeds target.
2022-01-31 01:52:36 +01:00
Håkon Hægland
8810fa65af Cleanup code in GasLiftSingleWellGeneric
Introduces two new data types BasicRates and LimitedRates to capture
oil, gas, and water rates, and whether they have been limited by well
or group targets. This reduces the number of variables that are passed
to and returned from various methods and thus makes the code easier to
read.
2022-01-31 01:39:20 +01:00
Markus Blatt
4407fdd3db std::regex_replace use $n for referencing and not \n. 2022-01-27 17:22:09 +01:00
Markus Blatt
710d648eda Prevent multiple *.?.dbg/prt files in production crashed parallel runs.
There was a fallout when skipping concating these files to the
default ones (PR #1708). We should also have deactivated creating
these files at all. As a result these files appeared in all parallel
runs that were aborted.

This change now prevents creating and logging to these files in
parallel in a default
run (--enable-parallel-logging-fallout-warning=false).

Developers can still activate logging and concating to see whether
everything is only logged on the io process by passing
--enable-parallel-logging-fallout-warning=true.

Closes 3725
2022-01-27 17:21:29 +01:00
Håkon Hægland
a14ed57921 Silence reorder warning in GasLiftCommon 2022-01-25 13:31:49 +01:00
Håkon Hægland
4970b0641e Improve debugging tools in gaslift code.
Introduces a gaslift debugging variable in ALQState in WellState. This
variable will persist between timesteps in contrast to when debugging
variables are defined in GasLiftSingleWell, GasLiftGroupState, or GasLiftStage2.

Currently only an integer variable debug_counter is added to ALQState,
which can be used as follows: First debugging is switched on globally
for BlackOilWellModel, GasLiftSingleWell, GasLiftGroupState, and
GasLiftStage2 by setting glift_debug to a true value in BlackOilWellModelGeneric.
Then, the following debugging code can be added to e.g. one of
GasLiftSingleWell, GasLiftGroupState, or GasLiftStage2 :

    auto count = debugUpdateGlobalCounter_();
    if (count == some_integer) {
        displayDebugMessage_("stop here");
    }

Here, the integer "some_integer" is determined typically by looking at
the debugging output of a previous run. This can be done since the
call to debugUpdateGlobalCounter_() will print out the current value
of the counter and then increment the counter by one. And it will be
easy to recognize these values in the debug ouput. If you find a place
in the output that looks suspect, just take a note of the counter
value in the output around that point and insert the value for
"some_integer", then after recompiling the code with the desired value
for "some_integer", it is now easy to set a breakpoint in GDB at the
line

    displayDebugMessage_("stop here").

shown in the above snippet. This should improve the ability to quickly
to set a breakpoint in GDB around at a given time and point in the simulation.
2022-01-23 20:37:26 +01:00
Tor Harald Sandve
2fdff5c1e4
Merge pull request #3758 from totto82/fixAssertInWECON
Handle case where no completions have ratio above the limit while the well has
2022-01-21 12:31:11 +01:00
Tor Harald Sandve
6fee9173c0 Remove assert in ratio check for completions
Handle special cases with injection or trivial completion rates and all completions have ratio below the limit while the well has
above
2022-01-21 10:51:40 +01:00
Kai Bao
086b8aab7d only multisegment wells will alway inner iteration 2022-01-21 10:43:36 +01:00
Kai Bao
0000df18a4 always using inner iterations for testing purpose. 2022-01-21 10:43:36 +01:00
Bård Skaflestad
9fc9f5421c
Merge pull request #3771 from totto82/fixUpdateGR
Update guiderates after with new rates from newly opened wells
2022-01-21 10:33:00 +01:00
Tor Harald Sandve
d1c2032e73 Update guiderates after with new rates from newly opened wells 2022-01-21 09:15:00 +01:00
Atgeirr Flø Rasmussen
357ba55de5
Merge pull request #3773 from GitPaean/return_zero_thp_zero_rate_inj
return zero thp value for extremely small injection rate
2022-01-20 14:49:25 +01:00
Tor Harald Sandve
a57f92527f
Merge pull request #3777 from totto82/support_min_wait_glift
support none trivial item 3 in LIFTOPT.
2022-01-19 14:58:50 +01:00
Atgeirr Flø Rasmussen
9f7d4f2fc2
Merge pull request #3760 from GitPaean/thp_fixing_model_2
fixing the failure that bhp could not be calculated with thp limit
2022-01-19 12:48:39 +01:00
Tor Harald Sandve
c3571c50a3 support none trivial item 3 in LIFTOPT. i.e. not optimize gaslift every timestep 2022-01-19 10:14:47 +01:00
Markus Blatt
3db9a4e3e5
Merge pull request #3750 from ducbueno/isai-ilu
Adds IncompleteSAI preconditioner to openclSolver
2022-01-18 12:38:39 +01:00
Tor Harald Sandve
bf77bbbc10
Merge pull request #3759 from plgbrts/saltp
Enable salt precipitation/dissolution
2022-01-18 12:02:32 +01:00
Paul Egberts
590920db6b allow for explicit initialization of SALT (salt concentration) and SALTP (precipitated salt) 2022-01-18 11:12:43 +01:00
Kai Bao
913ad21733 return zero thp value for extremely small injection rate
it is a finding from one of the test case.
2022-01-18 10:12:20 +01:00
Eduardo Bueno
1df9d2e51f Adds BISAI preconditioner to openclSolver 2022-01-17 13:57:29 -03:00
Arne Morten Kvarving
a82ad816c7 add fallback return (control reaches end of non-void function) 2022-01-17 13:59:47 +01:00
Paul Egberts
98c8e691c3 Allow for brine and precipitation/dissolution of salt 2022-01-14 11:46:40 +01:00
Paul Egberts
f69aa171fe removed some salt-precipitation related keywords from the unsupported keyword list 2022-01-14 11:46:39 +01:00
Bård Skaflestad
3317f10c4a
Merge pull request #3729 from goncalvesmachadoc/gaswater_brine
allow for gas-water + brine
2022-01-12 12:31:34 +01:00
Markus Blatt
790fa8044e
Merge pull request #3755 from blattms/fix-opencl-apply-stdwells-rebased
Fix opencl apply stdwells rebased (replaces #3746)
2022-01-11 19:18:03 +01:00
goncalvesmachadoc
300f536a19 add exit_failure for water+brine case 2022-01-11 14:23:37 +01:00
Bård Skaflestad
abf92eed52 Accumulate Dissolved Gas and Vaporized Oil Flow Rates Across Ranks
This is needed to get consistent estimates for the summary vectors

  * {F,G,W}OP{R,T}{F,S} -- Free/Vaporized Oil Production
  * {F,G,W}GP{R,T}{F,S} -- Free/Dissolved Gas Production

in the case of distributed wells.

Thanks to [at]blattms for the suggested fix.
2022-01-10 14:14:39 +01:00
Kai Bao
2b9b6e5155 addressing reviewing comments for PR#3760 2022-01-10 11:33:11 +01:00
Kai Bao
dec3100247 fixing a bug in funcion bisectBracket 2022-01-09 00:21:31 +01:00
Kai Bao
3b7e62979c refactoring to shorten the function computeBhpAtThpLimitProd
better readibility hopefully.
2022-01-07 15:49:48 +01:00
Kai Bao
5824acbf92 making bruteforce bracket as a function
for better readbility.
2022-01-07 15:13:33 +01:00
Kai Bao
3273f310e3 prototyping the brute force for bracketing bhp
to fix the situation the existing approach fails.
2022-01-07 14:32:16 +01:00
Tor Harald Sandve
3e4e62bc4f
Merge pull request #3751 from hakonhagland/glift_swg_fx3
Refactor some methods in `GasLiftSingleWellGeneric.cpp` (part 2)
2022-01-03 14:14:15 +01:00
Joakim Hove
6b92443cb4 Downstream filesystem reorganisation in opm-common 2022-01-02 14:33:34 +01:00
Tong Dong Qiu
f48fe632cb Added comment to apply_stdwell kernels 2021-12-22 16:22:55 +01:00
Tong Dong Qiu
3decb73561 Fix stdwell_apply opencl kernel 2021-12-22 16:16:04 +01:00
Jose Eduardo Bueno
c7ac97e215 [OpenCL] Moves all OpenCL kernels to *.cl files.
Kernel files are located in opm/simulators/linalg/bda/opencl/kernels.
CMake will combine them for usage in
${PROJECT_BINARY_DIR}/clSources.cpp that becomes part of the library.
2021-12-22 12:43:18 +01:00
Håkon Hægland
4bdf7c1b58 Refactor methods getXyzRateWithLimit_()
Refactors getOilRateWithLimit_(), getGasRateWithLimit_(), and
getWaterRateWithLimit_() in GasLiftSingleWellGeneric.cpp. The
common part of the methods is split out into a new method called
getRateWithLimit_(). The purpose of the refactorization is to reduce
reptetive code and make the code easier to maintain.
2021-12-22 10:45:31 +01:00
Håkon Hægland
f28b906782 Made some methods in GasLiftGroupInfo const
This is in agreement with C++ Core Guidelines. A member function should
be marked const unless it changes the object’s observable state. This
gives a more precise statement of design intent, better readability, more
errors caught by the compiler, and sometimes more optimization opportunities.
2021-12-21 23:24:58 +01:00
Håkon Hægland
11ad879472 Make parameters to getLiquidRateWithGroupLimit_() const
To improve readability, we make the parameters of
getLiquidRateWithGroupLimit_() const as discussed in
https://github.com/OPM/opm-simulators/pull/3748
2021-12-20 23:19:40 +01:00
Håkon Hægland
837f33e679 Refactor some methods in GasLiftSingleWellGeneric.
Refactor getOilRateWithGroupLimit_(), getGasRateWithGroupLimit_(),
getWaterRateWithGroupLimit_(), and getLiquidRateWithGroupLimit_() into
a single generic method called getRateWithGroupLimit_().
2021-12-20 23:08:31 +01:00
Bård Skaflestad
f77d82a0e9
Merge pull request #3744 from OPMUSER/Validate-ROCKCOMP
Validate ROCKCOMP Update
2021-12-20 13:51:07 +01:00
Markus Blatt
0485c65d16
Merge pull request #3740 from atgeirr/make-split-comm-test-runtime-optional
Replace DEMONSTRATE_RUN_WITH_NONWORLD_COMM macro with runtime bool.
2021-12-20 12:46:49 +01:00
OPMUSER
d6f7cb59a7 Validate ROCKCOMP Upadate 2021-12-20 18:06:17 +08:00
Håkon Hægland
e388827d81 Fixup in GasLiftSingleWellGeneric
Consider all groups when reducing oil rate to group limits.
The current code just checks the first group limit in the set.
But there might be groups later in the set with more restrictive
limits, causing the oil rate to be reduced more than the first
limit.
2021-12-15 19:15:35 +01:00
OPMUSER
34652f2d5d Remove NEXTSTEP from Unsupported List 2021-12-14 11:31:38 +08:00
Atgeirr Flø Rasmussen
e22d1177fd
Merge pull request #3738 from OPMUSER/WILL_STOP
Update PartiallySupportedFlowKeywords.cpp All STOP Version
2021-12-13 09:23:44 +01:00
Atgeirr Flø Rasmussen
eec32ec581 Replace DEMONSTRATE_RUN_WITH_NONWORLD_COMM macro with runtime bool.
This allows for testing the simulator with the artifically split communicator,
in order to verify that there is no inappropriate usage of the world communicator.
2021-12-10 17:42:44 +01:00
Tor Harald Sandve
51d9b7ee11
Merge pull request #3719 from totto82/noIterPot
Do not iterate when computing well potentials for standard wells
2021-12-10 16:20:10 +01:00
OPMUSER
0ee2ed0311 Update PartiallySupportedFlowKeywords.cpp 2021-12-10 20:17:12 +08:00
OPMUSER
f7327c06f7 Update PartiallySupportedFlowKeywords.cpp 2021-12-10 19:56:54 +08:00
Tor Harald Sandve
1baee5ec9b
Merge pull request #3715 from goncalvesmachadoc/vapwat
update parameters BlackoilFluidSystem
2021-12-09 15:37:49 +01:00
Tor Harald Sandve
b87e5e0a9f
Merge pull request #3735 from hakonhagland/glift_refact
Small clean up in GasLiftSingleWellGeneric.cpp
2021-12-09 15:24:49 +01:00
Håkon Hægland
738b5c5f18 Small clean up in GasLiftSingleWellGeneric.cpp
As discussed in PR #3728, it is better to move the two methods
reduceALQtoGroupTarget() and checkGroupTargetsViolated() from
OptimizeState to the parent class, then we do not have to abuse
OptimizeState in maybeAdjustALQbeforeOptimizeLoop_() just to call
reduceALQtoGroupTarget().

Also fixes a typo (as discussed in PR #3729) in reduceALQtoGrouptTarget()
where the water rate is updated with the gas flow rate instead of the
water flow rate. Should be like this:

 water_rate = -potentials[this->parent.water_pos_];

instead of

 water_rate = -potentials[this->parent.gas_pos_];
2021-12-09 11:58:43 +01:00
Arne Morten Kvarving
2d0d48d8c9 fix build with dune 2.6 2021-12-09 09:02:13 +01:00
Tor Harald Sandve
bd9e13d4bd
Merge pull request #3728 from totto82/fixGasliftGroupWell
Fix when both well and group control restrict gaslift
2021-12-09 08:12:31 +01:00
Atgeirr Flø Rasmussen
e2cdab208b
Merge pull request #3730 from atgeirr/fix-efficiency-alq-network
Account for efficiency when adding lift gas to network flows.
2021-12-09 07:49:16 +01:00
Markus Blatt
ac41c318da Fixes compilation of opencl CPR without MPI 2021-12-08 20:24:14 +01:00
Markus Blatt
a61f69bb79
Merge pull request #3672 from Tongdongq/add-cpr-opencl
Add CPR preconditioner to openclSolver
2021-12-08 19:44:59 +01:00
goncalvesmachadoc
b15b893b3a add Index Traits 2021-12-08 16:52:23 +01:00
Atgeirr Flø Rasmussen
819d88a1a7 Account for efficiency when adding lift gas to network flows. 2021-12-08 15:54:12 +01:00
goncalvesmachadoc
7f320102c3 allow for gas-water + brine 2021-12-08 14:35:22 +01:00
Tor Harald Sandve
66425eb7c2 WIP fix when both well and group control restrict gasslift 2021-12-08 09:36:26 +00:00
Atgeirr Flø Rasmussen
69b81c4fbf
Merge pull request #3724 from totto82/CO2STORETHERMAL
Add gasoil + thermal simulator
2021-12-08 08:33:46 +01:00
Tor Harald Sandve
31954a487b
Merge pull request #3720 from totto82/operSolvEcon
Only check operable wells for wecon
2021-12-07 12:44:24 +01:00
Tor Harald Sandve
4f75d1ab8d Add gasoil + energy simulator
Useful when combining CO2STORE + THERMAL

This PR also fixes an issue with missing phases in computation of output temperature
2021-12-07 09:18:38 +01:00
Kai Bao
148fb4a282
Merge pull request #3712 from totto82/fixAssertInStw
Fix assert in relaxation factor in std well
2021-12-06 11:09:08 +01:00
Tor Harald Sandve
e230174de6 Fix assert in relaxation factor in std well
If original sum ~ 1 and relaxed_update ~ 0 the factor could -> inf
and trigger the assert.
The 1 + epsilon factor will make sure this does not happen
2021-12-03 14:00:40 +00:00
Tor Harald Sandve
4d19ba7409 Only check operable wells for wecon 2021-12-03 11:37:51 +00:00
Tor Harald Sandve
fac3ca3507 do not iterate when computing well potentials 2021-12-02 13:48:22 +00:00
Tong Dong Qiu
374f8276dc Move opencl variables to Preconditioner 2021-12-01 14:15:59 +01:00
Tong Dong Qiu
94ea2dcd30 Change C to C++
Also bugfix wrong size when COPY_ROW_BY_ROW is active
2021-12-01 14:15:16 +01:00
Tong Dong Qiu
e0a4d271ea Formatting changes 2021-12-01 11:47:45 +01:00
Tong Dong Qiu
0881089406 Add Preconditioner, superclass of BILU0 and CPR 2021-12-01 11:47:45 +01:00
Tong Dong Qiu
50d0486b28 Allow a variable number of pre/post smooth steps during AMG 2021-12-01 11:47:44 +01:00
Tong Dong Qiu
a911d5d2be Add test for solve_transposed_3x3() 2021-12-01 11:47:44 +01:00
Tong Dong Qiu
56fb3948e5 Fill restriction matrix faster 2021-12-01 11:47:44 +01:00
Tong Dong Qiu
411d3c6a8d Replace spmv-prolongation by specialized kernel 2021-12-01 11:47:44 +01:00
Tong Dong Qiu
eaded9dcf7 Add prolongate_vector() kernel 2021-12-01 11:47:44 +01:00
Tong Dong Qiu
9d611f04ee Add timers to opencl CPR preconditioner 2021-12-01 11:47:44 +01:00
Tong Dong Qiu
f2225503c4 Combine BILU0 and CPR preconditioner 2021-12-01 11:47:44 +01:00
Tong Dong Qiu
11d54f31f5 Reuse umfpack object 2021-12-01 11:47:29 +01:00
Tong Dong Qiu
b9a12b64d9 Rename copy sparsity pattern function 2021-12-01 11:43:40 +01:00
Tong Dong Qiu
d7204c5be7 Create separate functions 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
13646337f3 Reduce get_absmax() code 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
5e85c23478 Renamed move_to_coarse/fine() in CPR 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
19a0454b6f Update comments 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
ca44351c72 Add error checks for OpenclMatrix 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
de8073e689 Reuse Matrix constructor 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
a71a5cd8fe Moved OpenclMatrix to new file 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
a8b1d7c9dc Change header include guard name 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
1306a65104 Remove unnecessary intermediate variables 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
5385bd275e Rename get_opencl_kernel functions 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
adb4649277 Changed block_size template to parameter for block functions 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
288e548b89 Changed block_size template to variable for OpenclMatrix 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
9acffab47e Changed block_size template to variable for BlockedMatrix 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
a6b6a62b27 Changes needed for FPGA 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
606143ef57 Add timer for cpr_apply 2021-12-01 11:43:39 +01:00
Tong Dong Qiu
6465cf9cbb Add CPR preconditioner for openclSolver and
change raw pointers to vector for Matrix
2021-12-01 11:43:30 +01:00
Tor Harald Sandve
2c17b1942c Move getPerfCellPressure to wellInterface
The cell pressure is independent of well model and belongs to the interface
This should move the MSW model one step closer to supporting GasWater cases
2021-11-30 10:48:02 +00:00
goncalvesmachadoc
90380c35ad update parameters BlackoilFluidSystem
fix

update parameters BlackoilFluidSystem
2021-11-29 16:38:43 +01:00
Joakim Hove
3d02e29da1
Merge pull request #3713 from totto82/fixWTEST
Fix in WTEST
2021-11-26 13:18:01 +01:00
Tor Harald Sandve
c4b0a0d9e2 Fix in WTEST
If a well is shut due to physical or economical reason the wellstate status is shut
so we can not check the wellstate we instead check the well from the schedule to
make sure we don't test wells that are shut by the user.
2021-11-26 10:17:45 +00:00
Tor Harald Sandve
6277d12d16 fix return type for phaseIdx and compIdx 2021-11-25 14:56:27 +00:00
Tor Harald Sandve
2352d94c0e fix co2store + aqunum 2021-11-24 11:13:50 +00:00
Bård Skaflestad
842766d6d6
Merge pull request #3705 from totto82/fixSignPot
guard against negative and trivial potentials
2021-11-23 20:12:53 +01:00
Tor Harald Sandve
50ab26c330 cleanup 2021-11-23 14:01:07 +00:00
Markus Blatt
6d8223f233
Merge pull request #3602 from blattms/parallel-tracers
[feature] Adds support for computing tracers in parallel runs.
2021-11-23 12:39:48 +01:00
Tor Harald Sandve
43fd50e355 only mark negative potentials as not operable 2021-11-22 11:27:45 +00:00
Tor Harald Sandve
b5cdb1048a Mark wells with negative and trivial potentials as not operable
The simulator will try to compute potentials at every iterations to
try to reopen the well.
2021-11-22 08:44:17 +00:00
Markus Blatt
50867bf23c Guard include of WellContributions.cpp 2021-11-17 19:23:46 +01:00
Markus Blatt
d2caf41037 Fix incomplete type ‘Opm::WellContributions’ compiler error (g++-8)
Fixes
```
In file included from opm-simulators/opm/simulators/flow/BlackoilModelEbos.hpp:53,
                 from opm-simulators/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp:26,
                 from opm-simulators/flow/flow_ebos_gaswater.cpp:28:
opm-simulators/opm/simulators/linalg/ISTLSolverEbos.hpp: In member function ‘bool Opm::ISTLSolverEbos<TypeTag>::solve(Opm::ISTLSolverEbos<TypeTag>::Vector&)’:
opm-simulators/opm/simulators/linalg/ISTLSolverEbos.hpp:265:56: error: incomplete type ‘Opm::WellContributions’ used in nested name specifier
                 auto wellContribs = WellContributions::create(accelerator_mode, useWellConn_);
                                                        ^~~~~~
```
2021-11-17 17:30:01 +01:00
Markus Blatt
9a80d806c0 Setup parallel solvers for tracers. 2021-11-17 16:02:16 +01:00
Bård Skaflestad
d163bebcdc
Merge pull request #3699 from blattms/man-page-spelling
Adds manpage and fixes several spelling issue found by lintian
2021-11-17 09:59:50 +01:00
Kai Bao
c2e18fd077
Merge pull request #3573 from totto82/crossFlowEcon
remove assert and handle opposite rates in wecon related fractions.
2021-11-15 15:31:05 +01:00
Joakim Hove
4d1fb8c797
Merge pull request #3700 from blattms/gcc-11
Include limits header where needed for g++-11
2021-11-15 13:13:07 +01:00
Markus Blatt
b0792db164 Include limits header where needed for g++-11
Without this compilation fails on Debian unstable.
2021-11-15 12:11:25 +01:00
Markus Blatt
a2246d331b Spelling fixes
Gbp-Pq: Name 0005-Spelling-fixes.patch
2021-11-15 12:06:05 +01:00