Commit Graph

88 Commits

Author SHA1 Message Date
Paul Egberts
646dafe78f introduced computeWellTemperature() to be called at each timestep 2021-03-08 15:11:50 +01:00
Joakim Hove
ff51c2d7ee Handle WELLPI keyword in ACTIONX
When an ACTIONX has evaluated to True we inspect the keyword payload and if it
contains WELPI we query the well model for current wellpi values and pass that
along as context to the Schedule::applyAction()
2021-02-18 16:53:50 +01:00
Joakim Hove
99a61e120b Implement BlackoilWellModel::hasWell() method 2021-02-13 10:37:45 +01:00
Joakim Hove
0299af26ed Extract method wellPI() from existing lambda implementation 2021-02-12 11:49:04 +01:00
Joakim Hove
89eb6e5659 Extract functionality to update ecl wells to separate function 2021-02-10 15:17:36 +01:00
Arne Morten Kvarving
9b74b5dfac changed: this is known on compile time
use info to disable code
2021-01-28 14:33:56 +01:00
Arne Morten Kvarving
77692c1f99 quell unused parameter warning 2021-01-28 12:52:19 +01:00
Kai Bao
d8f8b9f0cc
Merge pull request #3028 from totto82/quarryPerfLengthAndRadius
get connection length and radius from the connection object
2021-01-28 11:21:21 +01:00
Tor Harald Sandve
9277b2edee get connection length and radius from the connection object 2021-01-25 14:08:59 +01:00
Tor Harald Sandve
fbcd230eb2 substitute solveWellEq with one inner solve for newly opened wells 2021-01-18 15:12:17 +01:00
Joakim Hove
17fcdfc87a Use ScheduleState to handle VFP propertes + simplifications 2021-01-14 19:22:34 +01:00
Markus Blatt
6eb835c98e Only use connections in the interior for distributed wells. 2020-12-07 16:32:33 +01:00
Kai Bao
7ecb2e4813
Merge pull request #2866 from bska/activate-welpi-scaling
Initial Implementation of WELPI Feature
2020-12-04 20:44:42 +01:00
Bård Skaflestad
319c240336 Run WELPI Scaling At Beginning of Report Step
This commit implements the WELPI feature.  We calculate new PI/II
values for all wells in the event of a WELPI request and use those
values for well-specific WELPI request, to calculate CTF scaling
factors.  We then apply those factors to all subsequent editions of
the well provided the connection factors are eligible for
WELPI-based rescaling.

If we trigger a rescaling event we also reset the WellState's
internal copies of the CTFs and reinitialize the Well PI calculators
to ensure the rescaling takes effect immediately.  Since we rely on
PI values being available at the end of each time step we must also
take care to forward those values from the WellState of one report
step to the WellState of the next report step.

Finally, take care not to redo a WELPI scaling if we've already
performed the scaling operation and restart a report step.  This,
in turn, happens if WELPI is requested on the first report step.
2020-12-04 15:16:25 +01:00
Bård Skaflestad
f6130861df Well Data: Report CTFs for Shut Connections
Needed to ensure that the CTFs reported to the summary files will be
correct in the presence of WELPI even for shut connections.
2020-12-04 15:16:25 +01:00
Bård Skaflestad
e780d107ab Split Well Stat Initialization Out to Helper Function
Mostly to reduce the complexity of the implementation of
beginReportStep() and to enable easier reordering of the stages.
2020-12-04 15:16:25 +01:00
Bård Skaflestad
4e9e60a71b Refactor Well Guide Rate Summary Assignment
In anticipation of adding more steps later.
2020-12-04 15:16:24 +01:00
Markus Blatt
eb03712027 Factored out creation of parallel well infos from getLocalNonshutWells. 2020-12-04 13:02:01 +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
3996967344 Added a class with information and comunicator for parallel wells.
BlackoilWellModel now stores an instance of this class for each
well. Inside that class there is a custom communicator that only
contains ranks that will have local cells perforated by the well.
This will be used in the application of the distributed well operator.

This is another small step in the direction of distributed wells,
but it should be safe to merge this (note creation of the custom
communicators is a collective operation in MPI but done only once).
2020-12-03 09:29:43 +01:00
Bård Skaflestad
b7fd9e42f4 Well Model: Add Helper for Well Pointer Creation
This commit adds a new helper function,

  WellInterfacePtr createWellPointer(wellID, reportStep) const

which is responsible for creating appropriately typed derived well
pointers depending on well types (multi-segment vs. standard).
This, in turn, allows us to centralise this logic and use the same
factory function both when creating the 'well_container_' and when
forming the well-test objects.

Finally, this helper will become useful for calculating PI/II values
of shut/stopped wells in the context of WELPI.
2020-12-02 16:30:46 +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
Atgeirr Flø Rasmussen
376aecfad5 Store producer status, only call getALQ() for producers.
As it was, the getALQ() call would insert injectors into the ALQ maps,
leading to trouble.

Also, this gets rid of the slightly weird thing that the output data
structure's producer/injector status was only set after creation,
in BlackoilWellModel::wellData().
2020-11-19 11:22:25 +01:00
Ove Sævareid
0f7e66e151 Alternative solvent extension for the black oil model. 2020-11-17 12:33:19 +01:00
Arne Morten Kvarving
7d13d347db changed: remove unused parameters 2020-10-21 13:32:12 +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
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
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
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
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
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
Arne Morten Kvarving
93a3ebf8f7 changed: remove NEW_PROP_TAG macro usage 2020-08-28 10:44:53 +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
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
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
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
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
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
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