Commit Graph

343 Commits

Author SHA1 Message Date
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
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
Markus Blatt
a4ea6e9658
Merge pull request #2792 from atgeirr/fewer-mpi-sums
Rewrite communicateGroupRates() to do a single sum().
2020-09-22 07:51:34 +02:00
Joakim Hove
cc6abb4086
Merge pull request #2796 from joakim-hove/rm-exceptions
Remove unused #include of exceptions
2020-09-21 16:33:19 +02:00
Joakim Hove
0565d6f402 Remove unused #include of exceptions 2020-09-21 11:12:15 +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
Atgeirr Flø Rasmussen
8dffd39b0a Rewrite communicateGroupRates() to do a single sum(). 2020-09-18 09:50:41 +02:00
Bård Skaflestad
e8582ce476 Include All Pertinent EFACs In Guiderate Potential Updates
This commit switches the helper function

    WellGroupHelpers::updateGuideRateForGroups<>()

to include efficiency factors in the potential rates at grouptree
levels below a particular group.  We furthermore switch the helper
function

    WellGroupHelpers::updateGuideRatesForWells<>()

to not include efficiency factors at all.

The motivation for this change is that efficiency factors always
apply to the level we're accumulating rate values into rather than
to the rate values themselves.
2020-09-15 09:44:52 +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
Atgeirr Flø Rasmussen
76384344ca
Merge pull request #2777 from GitPaean/adding_well_assembly_timing
adding timing for the well assembly
2020-09-08 16:02:16 +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
Markus Blatt
578ca0a725 Fixed unused variable warning. 2020-09-07 16:42:01 +02:00
Markus Blatt
c21f1e72f8 Prevent another copy of cell to region mapping in RateConverter.
RateConverter itself already copies this and offers the mapping.
With this commit we just use that.
2020-09-07 15:36:07 +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
e1ce1c9124 Centralize Rate Vector Derivation for Guide Rates
This commit creates a single implementation function for deriving
'RateVector' objects that go into the guiderate calculation.  In
particular, we now use the same implementation function for both the
well and the group levels.  While here, also expose the group level
derivation as a free function and reimplement the FractionCalculator
version in terms of this free function.  Finally, remove the
previous attempt at such a free function taking only the group name.
This function no longer exists in isolation and is only accessible
through the FractionCalculator.

This is in preparation of reporting guiderate values to the output
layer (summary and restart files).
2020-09-02 17:22:04 +02:00
Bård Skaflestad
3c91761999 Well State: Add Predicate for Flow Rate Existence
This commit adds two new predicate member functions

    bool hasWellRates(well_name) const
    bool hasProductionGroupRates(group_name) const

that enable querying the existence of the corresponding flow rate
values for wells and group production.

This is in preparation of reporting the simulator's guiderate values
to the summary and restart files.
2020-09-02 17:22:04 +02:00
Bård Skaflestad
fdba34e071 IsXGroup: Return Explicit Boolean Value
Mostly to highlight that 'globalIsXGrup_' holds integers rather than
bools.  While here, also fix an error message formatting problem.
2020-09-02 17:22:04 +02:00
Arne Morten Kvarving
7305f84351 use std::make_unique where applicable 2020-09-02 15:35:39 +02:00
Arne Morten Kvarving
182ec130b1 fixed: use const refs in foreach constructs
avoids unnecessary copies
2020-09-01 13:25:26 +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
93a3ebf8f7 changed: remove NEW_PROP_TAG macro usage 2020-08-28 10:44:53 +02:00
Arne Morten Kvarving
914053ac3c changed: remove GET_PROP_VALUE macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
74fac38d85 changed: remove GET_PROP_TYPE / GET_PROP macro usage 2020-08-27 08:19:39 +02:00
Arne Morten Kvarving
70908d9017 changed: remove BEGIN_PROPERTIES/END_PROPERTIES macro usage 2020-08-21 15:50:35 +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
cca38ddc36 Fixed spelling in error message. 2020-08-20 10:17:26 +02:00
Markus Blatt
94eb0d5ffe Fixes method name in throw message. 2020-08-19 08:11:50 +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
e96c4a9908 Removed unused method invDXDirect. 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
Markus Blatt
ce409737fe Allow applyUMFPack to decompose if needed. 2020-08-18 17:55:50 +02:00
Markus Blatt
a011244d9c refactored invDxDirect to allow for reusing the decomposition. 2020-08-18 17:55:50 +02:00
Kai Bao
b88501bc7d
Merge pull request #2711 from blattms/fix-unused-vars-wells
Remove unused variable groups from BlackoilWellModel::wellsToState.
2020-08-12 22:29:07 +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
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
Bård Skaflestad
47d4a5087f
Merge pull request #2698 from totto82/applyPVTWsalt
Pass the salt concentration to the water PVT
2020-07-08 09:32:51 +02:00
Markus Blatt
7a571c98db include missing header for OpenCLSolver with g++-8.3
Without I got compilation errors.
2020-07-07 11:10:19 +02:00
Joakim Hove
b9b1e734cb Add data::GroupValues member to RestartValue 2020-07-04 10:06:03 +02:00
Tor Harald Sandve
88ee892fdf pass the saltConcentration to the waterPVT 2020-07-02 13:44:01 +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
f2395f6d94
Merge pull request #2695 from totto82/addBrineOutput
Add brine to output
2020-07-01 11:46:23 +02:00