Arne Morten Kvarving
29842ff9a2
add WellInterfaceIndices
...
while not a lot of class in this layer, having it helps
in downstream well code.
2021-06-07 08:26:43 +02:00
Arne Morten Kvarving
1fb68c59e2
changed: move fluidsystem-only dependent method to WellInterfaceFluidSystem
2021-06-07 08:25:59 +02:00
Joakim Hove
32a6f32660
Use WellContainer to manage perf phase rate
2021-06-05 07:50:56 +02:00
Tor Harald Sandve
3ca6e215dc
Change the inner iterations logic
...
This replace the Boolean switch to enable inner iterations with a
int that controls for which maximum number of newton iterations
inner iterations applies.
Default is set to 3
2021-06-04 10:51:15 +02:00
Arne Morten Kvarving
d65a9a5f70
changed: do not set the ebos well model as default type
...
rather, only set it where we want to use it. this avoids including
eclwellmanager.hh and eclpeacemanwell.hh unnecessarily in
simulator objects (where BlackoilWellModel is used).
2021-05-28 11:28:43 +02:00
Arne Morten Kvarving
3aa2b38832
changed: split out FluidSystem only dependent code from WellInterface
...
this allows using explicit template instantation to only build
this code once for each FluidSystem
2021-05-27 14:22:14 +02:00
Joakim Hove
ab5c937268
Use well index for PerfPhaseRates
2021-05-24 09:25:19 +02:00
Joakim Hove
506a349085
Use wellcontainer2 ( #3255 )
...
Use WellContainer<> to manage members in WellState
2021-05-20 16:16:12 +02:00
Joakim Hove
3de4213c8c
Merge pull request #3236 from akva2/wellinterface_generic_split
...
changed: split out non-typetag dependent code from WellInterface
2021-05-19 14:46:56 +02:00
Joakim Hove
6af03f4a6a
Update WellState::thp()
2021-05-19 10:05:11 +02:00
Joakim Hove
3ec7feba75
Update WellState::bhp()
2021-05-19 10:05:11 +02:00
Arne Morten Kvarving
0f4bb49ed9
changed: split out non-typetag dependent code from WellInterface
2021-05-19 09:25:03 +02:00
Atgeirr Flø Rasmussen
377d7eca60
Merge pull request #3271 from totto82/fixRESVpred
...
BUGFIX fix direction of the resv check
2021-05-18 19:05:17 +02:00
Tor Harald Sandve
4cf08deede
BUGFIX fix direction of the resv check
2021-05-18 10:45:10 +02:00
Arne Morten Kvarving
1568479d3d
fix function name
...
Frations -> Fractions
2021-05-12 10:50:46 +02:00
Arne Morten Kvarving
d5cdbf38d6
remove Opm:: prefix for symbols
...
we are already in the Opm:: namespace
2021-05-12 08:57:07 +02:00
Arne Morten Kvarving
ceb9bb4311
changed: make has_brine contexpr
...
and use if constexpr to eliminate some code
2021-05-11 12:52:44 +02:00
Arne Morten Kvarving
f48ee17d59
changed: make has_foam contexpr
...
and use if constexpr to eliminate some code
2021-05-11 12:46:54 +02:00
Arne Morten Kvarving
73ccb42634
changed: make has_polymer contexpr
...
and use if constexpr to eliminate some code
2021-05-11 12:33:54 +02:00
Arne Morten Kvarving
a78c7e598d
changed: make has_solvent and has_zFraction constexpr
...
and use if constexpr to eliminate some code
2021-05-11 12:28:10 +02:00
Bård Skaflestad
38292aca72
Merge pull request #3225 from totto82/refactorAssembleWellEq
...
Avoid code duplication
2021-05-10 12:27:52 +02:00
Tor Harald Sandve
80413e0794
add useInnerIteration method and move assembleWellEq to the well interface to avoid code duplication
2021-05-10 09:41:18 +02:00
Tor Harald Sandve
c87c2666d1
Merge pull request #3184 from totto82/fixZeroInit
...
Improve initialization of the well rates for trivial rates
2021-05-10 08:53:16 +02:00
Tor Harald Sandve
687a2ca977
Improve initialization of the well rates for trivial rates
...
This also applies for rates with opposite direction.
2021-05-06 08:48:30 +02:00
Bård Skaflestad
f273e06c66
Merge pull request #3198 from akva2/janitoring
...
Remove some unused members and quell some warnings
2021-04-30 15:08:48 +02:00
Arne Morten Kvarving
5dd5f5a8f4
FractionCalculator: remove unused summary_state member
2021-04-30 11:02:50 +02:00
Arne Morten Kvarving
8ff32b594a
TargetCalculator: remove unused wellstate member
2021-04-30 11:02:50 +02:00
Tor Harald Sandve
70150ab212
Remove code duplication between STW and MSW
2021-04-30 09:27:35 +02:00
Bård Skaflestad
6e9d2bd89e
Initialise More Data Members at Construction Time
...
In particular, apply explicit default constructors to most data
members and push initialisation to initialiser list if convenient.
While here, also split long lines and apply const in more places.
Finally, reset well- and connection-level PI values to zero in
WellState::shutWell(). This is in preparation of including shut
wells in BlackoilWellModel's internal state.
2021-04-27 14:50:37 +02:00
Joakim Hove
e1d117c59f
Extract group state and create WGState to manage well & group state
2021-04-27 10:55:38 +02:00
Tor Harald Sandve
8283b53f3b
only compute Bavg once pr timestep and use the stored variable instead of passing it around
2021-03-23 15:30:36 +01:00
Joakim Hove
9662d4019e
Use enum Well::Status to indicate well status instead of bool
2021-03-20 20:33:28 +01:00
Tor Harald Sandve
58fa3eaf31
replace asserts with OPM_DEFLOG_THROW
2021-03-18 11:58:05 +01:00
Tor Harald Sandve
6bac5da27c
adapt to changes in the guiderate interface
2021-03-16 15:56:31 +01:00
Tor Harald Sandve
f4ac7f555b
Add support for explicit guiderate for injection groups
...
With this commit the guiderate logic used for the production groups is also used for injectors
This allows for setting guiderates explicit at different group levels
Only RATE, NETV and VOID guiderate type is suppored.
2021-03-16 15:56:31 +01:00
Tor Harald Sandve
8ad00e60f9
Merge pull request #3096 from totto82/weconPOTN
...
add support for POTN in WECON
2021-03-09 13:51:14 +01:00
Tor Harald Sandve
4f55c25607
add support for POTN in WECON
2021-03-03 10:31:57 +01:00
Markus Blatt
1ce5c59851
Honor GEFAC for top group in get{Injection,Production}Controls.
2021-03-01 10:26:40 +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
Bård Skaflestad
7684f22073
Merge pull request #3000 from totto82/substituteSolveWellEq
...
substitute solveWellEq with inner iterations and initial solve
2021-01-26 09:59:37 +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
036a021c63
fix well model for gasoil thermal
2021-01-21 11:37:25 +01:00
Tor Harald Sandve
36ba423d42
Add guard around solve well equation.
2021-01-20 08:46:58 +01:00
Tor Harald Sandve
27bea2fa4f
Solve well equation for the first iteration
2021-01-18 15:12:17 +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
Joakim Hove
b32f3f7546
Manage GConSale and GConSump with ScheduleState object
2021-01-12 18:29:59 +01:00
Tor Harald Sandve
bcdf6c8d02
don't shut stopped wells
2020-12-21 09:25:57 +01:00
Atgeirr Flø Rasmussen
6e87ec6266
Merge pull request #2955 from blattms/stdwell-comm-rebase-split-pwell-info
...
Last part of current distributed standard wells.
2020-12-10 08:56:00 +01:00
Tor Harald Sandve
5fb73c9714
Only check well operability for wells under THP and BHP limits
2020-12-08 12:38:25 +01:00
Tor Harald Sandve
a7664f9ea6
Add check for operability of MSW
2020-12-08 12:38:25 +01:00
Markus Blatt
07e676371e
Get global index from Well connection instead of computing it.
2020-12-07 20:22:54 +01:00
Markus Blatt
0d6c39be2f
Fix distributed WellInterface::checkMaxRatioLimitCompletions
...
Not all connections are local, hence we need a sum across all processes
computing for this well.
2020-12-07 16:32:33 +01:00
Markus Blatt
a9a733ebc1
Make check whether a connection exists work for distributed wells.
2020-12-07 15:20:42 +01:00
Markus Blatt
2e5b1c8d54
Use reference for WellInterface::parallel_well_info_
2020-12-04 13:24:31 +01:00
Markus Blatt
3d92e41cad
Recover prev. iteration count and curves for undistributed wells
...
Rounding errors for `B.mmv(x,y)` are slightly different from
```
Y temp(y);
B-mv(x, temp);
y -= temp;
```
2020-12-03 11:10:36 +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
fdf6f4244c
[bugfix] Do not iterate pass end of perf_data_ in initCompletions
...
IMHO this might have happened if perf_data_ is empty
or if the last connection is closed. (Discovered while
working on distributed wells but might happen already
before!)
2020-12-01 14:54:48 +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
Ove Sævareid
0f7e66e151
Alternative solvent extension for the black oil model.
2020-11-17 12:33:19 +01:00
Atgeirr Flø Rasmussen
cb928f90f0
Refactor per-perforation code into separate function.
...
Also make some methods const.
2020-11-16 11:19:03 +01:00
Markus Blatt
d6e2e87efc
WellInterface::initComletions: stop relying on open connections being local.
...
Instead use the perforation data to add the correct indices.
2020-11-12 17:22:36 +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
Atgeirr Flø Rasmussen
7e737b143d
Address review comments.
2020-10-21 09:50:31 +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
Arne Morten Kvarving
182ec130b1
fixed: use const refs in foreach constructs
...
avoids unnecessary copies
2020-09-01 13:25:26 +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
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
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
Joakim Hove
6260bb7851
Update api for checking availability for group control
2020-04-17 13:03:56 +02:00
Atgeirr Flø Rasmussen
e7e4cf6f20
Silence warnings and fix whitespace.
2020-04-08 10:41:20 +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
21b98b5573
Avoid negative targets and currentWellRates
2020-04-02 13:57:38 +02:00
Atgeirr Flø Rasmussen
d2dac6c19c
Bugfix: rates in assembleControlEqProd() are by canonical phases, not active.
2020-04-02 13:57:38 +02:00
Atgeirr Flø Rasmussen
a8107afc11
Fix handling of FIELD for injector groups.
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
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
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
Kai Bao
56580ad431
adding WGR support for WECON
2020-01-30 21:54:36 +01:00
Trine S. Mykkeltvedt
99e7785fb5
renamed saltwater-->brine and removed keywords from missingFeatures
2020-01-09 14:14:38 +01:00
Trine S. Mykkeltvedt
5749615bd8
addd simple salt/brine implementation
2020-01-09 14:14:38 +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
f23b375c87
Check THP in the end
2019-11-01 14:58:40 +01:00
Tor Harald Sandve
5dcfd1c8f1
check bhp and thp constrains first
2019-10-18 16:08:07 +02:00
Atgeirr Flø Rasmussen
f618073492
Some small logic fixes.
...
- Make sure to reopen revived wells.
- Do not use thp limit for potential calculations when well is bhp controlled.
- Stopped wells do not check controls.
- Set thp to control when appropriate in updateWellStateWithTarget().
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
Atgeirr Flø Rasmussen
d5d890ff23
Make checkConstraints() stop after first broken constraint.
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
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
Arne Morten Kvarving
5599bb6d8c
changed: namespace Ewoms -> namespace Opm
2019-09-05 17:14: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
Atgeirr Flø Rasmussen
f5070c6ba9
Avoid getting distr when current control index is -1.
2019-08-13 10:14:37 +02:00
Atgeirr Flø Rasmussen
8438e84db1
Handle two possible cases where current control is -1.
2019-08-12 14:49:52 +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
Atgeirr Flø Rasmussen
b9e7881878
Finalize integration of foam module.
2019-08-07 10:39:16 +02:00
Kai Bao
450f87551e
adding GOR checking for WECON
2019-07-05 14:57:16 +02:00
Kai Bao
cbbd75164e
refactoring the ration economic limit checking
2019-07-02 12:44:56 +02:00
Kai Bao
327cf30c31
improving the WTEST results by initializing the explicit quantities
2019-07-01 12:39:09 +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
Kai Bao
e15a8f62e8
considering not OPEN connection when updateCompletions
...
in WellInterface.
2019-06-24 21:20:37 +02:00
Kai Bao
e0bd33db43
using template instead of pointer to function
...
for functions checkMaxRatioLimitWell and checkMaxRatioLimitCompletions
2019-06-24 14:03:20 +02:00
Kai Bao
b27a646b98
adding function checkMaxRatioLimitCompletions in WellInterface
...
and use it in checkMaxWaterCutLimit()
2019-06-21 14:11:12 +02:00
Kai Bao
7bb06e1c3c
adding function checkMaxRatioLimitWell to WellInterface
...
and use it in function checkMaxWaterCutLimit
2019-06-21 14:11:12 +02:00
Kai Bao
01c9935b02
fixing the function checkMaxWaterCutLimit
...
when looking for the worst offending completion
2019-06-21 14:11:12 +02:00
Kai Bao
8be28e8448
adding function initCompletions() to WellInterface
2019-06-21 14:11:12 +02:00
Alf Birger Rustad
671b2d9a47
Moved well test messages from debug to log and prt
2019-06-20 09:57:24 +02:00
Joakim Hove
7f1970af3c
Use the shared SummaryState instance when initializing well rates
2019-06-17 07:49:55 +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
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