Commit Graph

438 Commits

Author SHA1 Message Date
Markus Blatt
b21b6cf28c
Merge pull request #2914 from ducbueno/rm-oclcontainer
Removed WellContributionsOCLContainer class
2020-11-19 21:27:55 +01:00
Atgeirr Flø Rasmussen
8716dbfcfd Add the option to include gas lift for network calculations. 2020-11-19 14:19:26 +01:00
Tor Harald Sandve
0ac2f922d3
Merge pull request #2851 from osae/extboSimulators
Alternative solvent extension for the black oil model.
2020-11-18 14:01:36 +01:00
Jose Eduardo Bueno
a9c2a684c6 Removed WellContributionsOCLContainer class (rebase) 2020-11-18 09:14:31 -03:00
Markus Blatt
41843f2667 Use consistent pvt region index for groups in parallel.
In serial we use the first cell of the first well to determine the
pvt region index for a group. Previously, we used the first cell of
the first local well in a parallel run. Unfortunately that may lead
to different pvt region indices being used for the same goup on
different processes.

We fix this by using the same approach in parallel as we already use
in serial. For this we use Well::seqIndex() to determine the needed
ordering.
2020-11-17 12:54:45 +01:00
Ove Sævareid
0f7e66e151 Alternative solvent extension for the black oil model. 2020-11-17 12:33:19 +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
Arne Morten Kvarving
7d13d347db changed: remove unused parameters 2020-10-21 13:32:12 +02:00
Atgeirr Flø Rasmussen
7e737b143d Address review comments. 2020-10-21 09:50:31 +02:00
Atgeirr Flø Rasmussen
24b2393334 Add parameter --alternative-well-rate-init.
With this, a slightly more sophisticated procedure is used for well rate intialization.
Since it changes existing results, it defaults to false, giving the existing behaviour.
2020-10-15 17:56:11 +02:00
Atgeirr Flø Rasmussen
6155188a70 Remove unused file SimFIBODetails.hpp. 2020-10-15 16:35:35 +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
Atgeirr Flø Rasmussen
ac3004da9d
Merge pull request #2847 from blattms/blackoilmodel-getLocalNonshutWells
Added BlackoilWellModel::getLocalNonshutWells to reduce code duplicat…
2020-10-09 16:35:50 +02:00
Markus Blatt
ba1bc7c23c Added BlackoilWellModel::getLocalNonshutWells to reduce code duplication. 2020-10-09 15:27:09 +02:00
Markus Blatt
5553d2d1f3 Renamed variables/functions for number of cells. 2020-10-05 20:02:13 +02:00
Markus Blatt
ca8de16285 Fixes parallel computation of average formation factors.
This was using the sum of the sum of all cells of the partitions.
Hence the shared cells were counted twice.
2020-10-05 14:08:59 +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
Håkon Hægland
52f6f819ee Simplified using fmt::format()
Simplified debug output formatting by using fmt::format(). Also switched
off glift debug output by default.
2020-10-01 18:40:05 +02:00
Håkon Hægland
a01ae8a64c Removed unnecessary code.
Forgot to remove this call after refactoring.
2020-09-30 12:13:01 +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
Jose Eduardo Bueno
1ba81cece2 First commit 2020-09-24 16:35:36 -03:00
Markus Blatt
1d94357558 Refactored how well information is exported after load balancing.
Previously, we exported an unordered map containing all names of
wells that are not present in the local part of the grid.

As we envision to have wells that are distributed across multiple
processors, this information does not seem to be enough. We need
to be able to set up communication for each well. To do this we need
to find out who handles perforations of each well.

We now export a full list of well name together with a boolean
indicating whether it perforates local cells (vector of pair of string
and bool).
2020-09-22 20:04:01 +02:00
Bård Skaflestad
fde3c476c3 Chase Group/Node Summary API Update
This is in preparation of adding support for outputting the network
node pressure quantity, GPR, to the summary file.  In particular,
'GroupValues' is renamed to 'GroupAndNetworkValues' and has new
individual datamembers for the former group-level data and the new
node-level data.

Update BlackoilWellModel::groupData() and CollectToIORank
accordingly and bring the parallel restart facility in line with the
new layout.
2020-09-20 22:26:07 +02:00
Kai Bao
7b4142e9b6 adding timing for the well assembly
And changes the indentation of the linear solver setup time a little to
show it is part of the linear solve time.
2020-09-08 11:12:41 +02:00
Bård Skaflestad
6220cdf613 Restore Groups' Active Constraints on Restart
First step towards better restarts of models with group control.
2020-09-03 01:11:32 +02:00
Bård Skaflestad
144baeeb42 Well Model: Report Guiderates at Well and Group Levels
This commit adds support for reporting the simulator's guiderate
values at the well and group levels to the output layer through the
wellData() and groupData() member functions.  We add several new
member functions that collectively assemble the values and assign
them to objects of type Opm::data::GuideRateValue for subsequent
output to the summary and restart files.

In particular

    getGuideRateValues(const Well&) const
    getGuideRateValues(const Group&) const

retrieve the guiderate values for all phases for those individual
wells and groups for which the guideRate_ data member defines a
value.  The most complicated function of this commit is

    calculateAllGroupGuideRates

which aggregates those individual contributions from the well (leaf)
level up to the root of the group tree (the FIELD group).  This
process uses an ancillary array ('up') to keep track of the parent
groups of all wells and all groups, and to ensure that we only visit
each parent group once (sort+unique on subsets of the 'up' array).

We do not currently support outputting guiderates for reservoir
voidage volume (GuideRateModel::Target::RES).
2020-09-02 17:22:04 +02:00
Bård Skaflestad
efed640e63 Broken Constraints: Fix Diagnostic Message
Especially, grab a copy of the "oldControl" to avoid reading through
a reference for which the underlying object is reset in

    setCurrent*GroupControl()

This in turn avoids generating confusing diagnostic messages of the
form

    Switching production control mode for group G from FLD to FLD
2020-08-31 13:04:39 +02:00
Arne Morten Kvarving
914053ac3c changed: remove GET_PROP_VALUE macro usage 2020-08-27 13:01:51 +02:00
Markus Blatt
13ff454e56 Remove unused variable groups from BlackoilWellModel::wellsToState.
Alternatively it could be marked as [[maybe_unused]] if it will be
used sometime in the future.
2020-07-21 11:35:43 +02:00
Markus Blatt
faaee51d09
Merge pull request #2682 from Tongdongq/openclSolver
Added openclSolver
2020-07-10 13:38:32 +02:00
Joakim Hove
b9b1e734cb Add data::GroupValues member to RestartValue 2020-07-04 10:06:03 +02:00
Bård Skaflestad
5bb4321824 Simulator Group Data: Chase Upstream API Update
This commit makes the 'groupData()' function return a

    map<string, Opm::data::GroupData>

object instead of a

    map<string, Opm::data::GroupConstraints>

object.  The 'GroupData' structure adds a level of indirection to
the current per-group summary quantities that are directly assigned
by the simulator.  While here, also move the assignment of the
current group constraints/control values out to a separate helper
to reduce the body of the per-group loop in 'groupData()'.

This is in preparation of adding support for reporting group-level
production/injection guiderates (Gx[IP]GR) to the summary file.
2020-07-01 22:52:26 +02:00
Atgeirr Flø Rasmussen
a66260fe87
Merge pull request #2684 from totto82/convertUsingPriviousRates
use rates from previous time-step in the guiderate conversion
2020-07-01 11:04:22 +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
a99254f917 clean up based on review 2020-06-24 09:48:09 +02:00
Tor Harald Sandve
8e3c124b23 use rates from privious time-step in the guiderate conversion to reduce oscilation 2020-06-24 09:38:18 +02:00
Bård Skaflestad
4ea5b7e989 Check GCONSALE Limits: Remove Unused Variable
Fixes a warning.
2020-05-24 13:16:47 +02:00
Markus Blatt
55b3a65230
Merge pull request #2628 from Tongdongq/multisegmentwells-gpu
cusparseSolver can now handle MultisegmentWells
2020-05-22 16:24:58 +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
Atgeirr Flø Rasmussen
5aa2a785af Correct messages for group control switching. 2020-05-14 17:31:21 +02:00
Atgeirr Flø Rasmussen
8dd53a38e9 Refactor SimulatorReport system.
Now SimulatorReport object contains a vector of SimulatorReportSingle objects,
for both successful and failing steps.
2020-05-07 16:13:39 +02:00
Atgeirr Flø Rasmussen
7dbbc0f2e5
Merge pull request #2588 from totto82/addMinMaxSupportGCONSALE
Implement min/max for GCONSALE
2020-05-05 15:46:36 +02:00
Tor Harald Sandve
85e95fb87d Implement min/max for GCONSALE
Only default action RATE is implemented for violation of maximum sales target
2020-05-05 14:24:17 +02:00
Tor Harald Sandve
f33737afc4 Fix solvent reinjection when different reinjection group is given 2020-05-05 10:46:49 +02:00
Bård Skaflestad
9756edce50 Remove Unused 'currentControl' Variable 2020-04-27 21:29:10 +02:00
Atgeirr Flø Rasmussen
06e5e6b6ac
Merge pull request #2565 from totto82/avoidOscNupcol
use nupcol to avoid oscillation between group controls
2020-04-27 16:02:32 +02:00
Tor Harald Sandve
33afb332fa use nupcol to avoid oscilation between group controls 2020-04-27 10:29:00 +02:00
Tor Harald Sandve
a046977946 Fix GCONSALE
1) Only check GCONSALE limits at the end of a timestep. NB. The simulator still throws if some of the limits are violated
2) BUGFIX: don't remove gas consumption twice
2020-04-24 16:10:07 +02:00
Atgeirr Flø Rasmussen
c4e020c179
Merge pull request #2556 from totto82/test_atg
Fix how the group reduction works
2020-04-24 11:13:22 +02:00
Atgeirr Flø Rasmussen
0df3a96fa6 Fix how group rate reductions work. 2020-04-23 09:39:03 +02:00
Kai Bao
954e5e769a addressing comments from OPM/opm-common#1695 2020-04-17 14:34:48 +02:00
Atgeirr Flø Rasmussen
e7e4cf6f20 Silence warnings and fix whitespace. 2020-04-08 10:41:20 +02:00
Tor Harald Sandve
70b7bed057 dont check if group has converged in solveWellEq 2020-04-02 13:57:38 +02:00
Atgeirr Flø Rasmussen
f30ddffdb7 Split WellGroupHelpers to cpp/hpp.
Also changed namespace name.
2020-04-02 13:57:38 +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
d703699e62 Avoid recursion above the FIELD group. 2020-04-02 13:54:58 +02:00
Atgeirr Flø Rasmussen
27f62399f5 Handle guide-rate based well constraints from groups. 2020-04-02 10:41:57 +02:00
Joakim Hove
58717905ee Use only wconnection transmissibility without WellPI scaling 2020-03-31 18:12:29 +02:00
Bård Skaflestad
d95eb32510 Save and Restore Well's Current Control Target Mode
This commit uses the new restart file support for active well
control target modes to save and restore the run's active targets.
2020-03-26 14:20:12 +01:00
T.D. (Tongdong) Qiu
7f3f03f63d Added check to prevent segfaults for unsupported welltypes 2020-03-19 16:06:49 +01:00
T.D. (Tongdong) Qiu
8223cd1db8 Simplified filling of WellContributions object. Added comments 2020-03-19 11:15:49 +01:00
T.D. (Tongdong) Qiu
fdcf46792a BdaBridge and WellContributions are only included and compiled when CUDA is found 2020-03-18 19:03:14 +01:00
T.D. (Tongdong) Qiu
009b5076a4 Removed CPU implementation of WellContributions 2020-03-18 15:08:48 +01:00
T.D. (Tongdong) Qiu
581cbc6a3e cusparseSolver can now apply wellcontributions separately, so --matrix-add-wellcontributions=true is not required anymore 2020-03-13 14:21:59 +01:00
Joakim Hove
5ad4936025 RestartConfig has moved from EclipseState to Schedule 2020-02-17 21:48:12 +01:00
Tor Harald Sandve
a784ccc47d fix rebase 2020-02-11 11:18:21 +01:00
Tor Harald Sandve
052f25636c adding blank lines 2020-02-11 09:33:58 +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
Tor Harald Sandve
b499180776 only double check the current group constraint at the start of a report step 2020-01-30 11:18:23 +01:00
Tor Harald Sandve
f5c6bafd90 make group constrain check conditional 2020-01-29 14:52:01 +01:00
Tor Harald Sandve
6e0f26f488 fix typos 2020-01-20 09:14:19 +01:00
Tor Harald Sandve
c1748604f0 Fix REIN for multi level groups by passing the top phase 2020-01-13 11:32:13 +01:00
Tor Harald Sandve
18c8cc6119 fix vrep and rein for more then one level of groups 2020-01-08 14:26:25 +01:00
Tor Harald Sandve
77d52e5b53 communicate group rates and add test 2020-01-02 13:57:12 +01:00
Tor Harald Sandve
1b7af4c1b6
Merge pull request #2239 from totto82/nupcol2
froze wellState at nupcol iterations
2020-01-02 12:47:13 +01:00
Tor Harald Sandve
e340f25c42
Merge pull request #2229 from totto82/fixOrderOfCheck
check groups from top
2019-12-20 12:26:20 +01:00
Markus Blatt
2511121a84
Merge pull request #2222 from dr-robertk/PR/ebos-polyhedralgrid2
Make ebos compile with PolyhedralGrid again.
2019-12-18 23:57:38 +01:00
Tor Harald Sandve
df6774c45c froze wellState at nupcol iterations 2019-12-18 14:37: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
Robert Kloefkorn
2fa90d24f6 [bugfix][ebos] Make compile with PolyhedralGrid again. 2019-12-18 11:03:42 +01:00
Tor Harald Sandve
2a732d3c99 add group name to output 2019-12-16 14:28:55 +01:00
Tor Harald Sandve
bec8b33f70 check groups from top 2019-12-16 14:15:02 +01:00
Atgeirr Flø Rasmussen
f09dcda21c Shut production well if zero rate and disallowing crossflow. 2019-12-13 11:08:36 +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
Joakim Hove
dc5340046a Call applyActions at the end of every timestep 2019-12-06 13:18:49 +01:00
Tor Harald Sandve
2c9797ec50 Always update group target reduction 2019-12-05 13:08:17 +01:00
Tor Harald Sandve
26a01794bf A group can both be injection and a production group 2019-12-05 13:08:17 +01:00
Tor Harald Sandve
876f5587e5 Add GCONSALE and fix conversion from UDA 2019-12-05 13:08:17 +01:00
Tor Harald Sandve
5dbf0927d3 Add support for GCONSUMP 2019-12-05 13:08:17 +01:00
Joakim Hove
ce9108a9d2 Refactor WellState SHUT
- Move some WellState shut code to separate method.
- Add bool flag open_for_output_ to WellState to ensure that shut wells do not
  create output.
2019-12-03 19:37:44 +01:00
Tor Harald Sandve
853a726bb2 fix after rebase 2019-11-27 14:56:10 +01:00
Tor Harald Sandve
cab2f4b41f use common WellGroupEvent map 2019-11-27 13:12:53 +01:00
Tor Harald Sandve
49b5883ff7 Clean-up output message for group 2019-11-27 13:08:25 +01:00
Atgeirr Flø Rasmussen
bddeaba880 Delete obsolete include directives and functions.
Also make other minor adjustments, in particular moving the function
getCubeDim() from WellsManagerDetail to WellHelpers.hpp.
2019-11-25 10:58:44 +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
8218f81183 set reservoir rate to zero for shut wells 2019-11-08 11:30:37 +01:00
Tor Harald Sandve
8cece8641e fix mpi 2019-11-07 14:57:59 +01:00
Tor Harald Sandve
1ab99d07c7 Support VREP with combined gas and water injectors 2019-11-07 11:31:47 +01:00
Tor Harald Sandve
c3423c770c fix vrep and rein 2019-11-06 13:27:47 +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
Markus Blatt
a5506956fb renamed numWells to numLocalWells in BlackoilWellmodel
as this better reflects that it is not the number of wells in
the whole domain but just the one in the part of the domain
stored in the local process.
2019-11-01 15:11:21 +01:00
Markus Blatt
905403e2ed Fix BlackoilWellModel::numComponents for parallel runs.
In the case with active solvent (BlackoilWellModel::has_solvent_ is
true, e.g. case 2D_OILWATER_POLYMER.DATA) and one process have no
wells while another has some this lead to numComponents returning
different values. Later this lead to truncated message in MPI_Allgather.

The underlying problem was the usage of numWells() which returns just
the number of local wells. We resort to using wellsActive which
returns whether there any well active regardless which process knows it.
2019-11-01 15:07:00 +01:00
Tor Harald Sandve
614025b28b clean up the logging message 2019-10-18 16:08:07 +02:00
Atgeirr Flø Rasmussen
a536b90891 Improve stopped wells logic and log messages. 2019-10-18 16:08:07 +02:00
Tor Harald Sandve
c21428419a support REIN for solvent 2019-10-18 16:08:07 +02:00
Tor Harald Sandve
88d8e2a68e don't set the control from the schedule, unfix the restart issue 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
Atgeirr Flø Rasmussen
40f91b0e32
Merge pull request #2034 from totto82/sync_restart
sync restart
2019-10-14 13:26:57 +02:00
Atgeirr Flø Rasmussen
5211217c94 Whitespace fixes (tabs->spaces, reformatted new files). 2019-10-11 15:57:51 +02:00
Halvor M. Nilsen
d873ae165d Enable single-phase runs. 2019-10-11 08:19:18 +02:00
Robert Kloefkorn
f708286111 [cleanup][Wells] Consequently use SparseMatrixAdapter in addWellContributions. 2019-10-09 10:27:38 +02:00
Tor Harald Sandve
f83e99c6aa sync restart 2019-10-01 14:30:11 +02:00
Kai Bao
fec9d1feee recovering the interface of function createWellContainer
in BlackoilWellModel, which makes its usage easier.
2019-08-09 10:02:28 +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
Joakim Hove
9f655d13bd Calculate well potentials: check if restart file output is requestd 2019-08-05 13:48:15 +02:00
Kai Bao
30e5a20f86 WELOPEN and WCON* interacting with WTEST and WECON
WELOPEN and WCON* can open well closed due to various reasons, physical
            or economic.

If a well is shut with WELOPEN and WCON*, we do not try to re-open it
through WTEST
2019-07-05 08:50:58 +02:00
Kai Bao
9a2fcdbfd5 fixing warnings in other folder under opm-simulators 2019-06-26 10:48:41 +02:00
Kai Bao
53b15527c2 fixing warnings under simulator/wells 2019-06-26 09:52:38 +02:00
Kai Bao
1d5d883e99 adapting to the upstream change 2019-06-25 22:13:34 +02:00
Atgeirr Flø Rasmussen
fa016a6008 Moved all remaining files out of opm/autodiff. 2019-06-20 11:00:51 +02:00
Kai Bao
4f7b899290 fixing the compilation problem due to rebasing
and also some small cleaning up
2019-06-13 14:49:04 +02:00
Kai Bao
ad0e294e52 using StandardWellV as the default StandardWell model 2019-06-13 14:49:04 +02:00
Joakim Hove
47f4e750d2
Merge pull request #1865 from joakim-hove/use-shared-summarystate
Use shared summarystate
2019-06-04 09:49:56 +02:00
Kai Bao
c5983eeec5 not trying to update RESV target for prediction producers 2019-05-30 11:58:23 +02:00
Joakim Hove
b129a10362 Use shared SummaryState in BlackoilWellModel 2019-05-29 07:52:17 +02:00
Joakim Hove
a0aa7fcc2b Use shared SummaryState when instantiating WellsManager 2019-05-29 07:44:23 +02:00
Joakim Hove
c6af5f11b6 Fixup: Use ProductionControls and InjectionControls 2019-05-29 07:12:15 +02:00
Joakim Hove
dc4f57f7eb
Merge pull request #1831 from joakim-hove/use-wells2-controls
Use wells2 controls
2019-05-29 06:46:58 +02:00
Tor Harald Sandve
613473082f Address PR comments 2019-05-24 16:45:27 +02:00
Joakim Hove
511645d12c Use InjectionControls and ProductionControls data classes 2019-05-23 16:27:17 +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
Atgeirr Flø Rasmussen
c17adf788f Moved files to opm/simulators/ subdirs. 2019-05-08 12:58:19 +02:00