Commit Graph
58 Commits
Author SHA1 Message Date
Bård Skaflestad bd79d4b9d5 PI/II: Switch to Using Values Only
We don't need to do the calculations in terms of EvalWell when we're
going to reduce this to the .value() before calling the PI/II
calculation routine.  We can also get by with a simpler approach to
computing the II by assuming we always inject pure phases and no
cross flow in injectors.

Suggested by: [at]atgeirr
2020-11-24 21:53:58 +01:00
Bård Skaflestad a46a732f9e PI: Treat Production Differently From Injection
This commit makes the PI/II calculation more closely mirror the
approach taken when computing connection flow rates.  In particular,
we switch to using total mobility, mixing and volume ratios for
injecting connections while producing connections continue to use
the phase mobilities and formation volume factors derived from
conditions in the connecting cells.  We also include dissolved
gas/oil ratios and vaporised oil/gas ratios in order to fully
capture the surface flow conditions.

We split the handling of producing/injecting connections out to
separate helper functions in order to make the overall logic in
updateProductivityIndex() more manageable.ex() more manageable.
2020-11-24 21:53:58 +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 8a5203814b Make consistent use of const for alq-related state.
A const well state was passed to functions that were modifying it by
calling setALQ(). Now the setALQ() method is made non-const, mutable
references to the well state are passed where sensible. The getALQ()
method uses map::at() instead of map::operator[] and no longer modifies
current_alq_. With this, it is now easy to see which methods modify the
well state and which don't. The alq-related members in the
WellStateFullyImplicitBlackoil class are no longer 'mutable'-qualified.
2020-11-19 10:09:52 +01:00
Ove Sævareid 63c97d54d0 Rebase issue. 2020-11-17 14:50:57 +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
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
Håkon Hægland c0b493c4ce Fix inconsistent-missing-override warnings 2020-10-03 10:43:09 +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
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 faaee51d09 Merge pull request #2682 from Tongdongq/openclSolver
Added openclSolver
2020-07-10 13:38:32 +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
T.D. (Tongdong) Qiu 8913e1d057 Make sure OpenCL can be used without CUDA 2020-06-25 18:44:49 +02:00
Atgeirr Flø Rasmussen c59f4f7118 Make ghost-last feature available in PreconditionerFactory. 2020-06-25 10:56:11 +02:00
Tor Harald Sandve cf702a5384 use relaxed tolerance for MSW when solution stagnates 2020-05-22 20:52:14 +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
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 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 9268bcb2ac InjectorType enum is moved out from Well class 2020-03-03 09:08:02 +01:00
Arne Morten Kvarving bea2459c65 replace boost::optional with std::optional 2020-02-19 11:20:16 +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 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 9dc536bc82 add computeBhpAtThpLimitInj 2019-11-05 14:18:30 +01:00
Atgeirr Flø Rasmussen 32b31a2606 Address review comments. 2019-10-18 16:08:07 +02:00
Atgeirr Flø Rasmussen 6b011c1bfb Use new method to determine operability under THP control. 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 2b9f5fb4fb Use robustSolveBhpAtThpLimitProd() for potentials and initialization. 2019-10-18 16:08:07 +02:00
Atgeirr Flø Rasmussen 7581275b03 Add robustSolveBhpAtThpLimitProd() method. 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 2d9f41b1aa Rename getPerfPressure() -> getPerfCellPressure(). 2019-10-11 08:19:18 +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
Arne Morten Kvarving 7048589ec1 changed: ewoms/models/blackoil -> opm/models/blackoil 2019-09-19 11:12:45 +02:00
Arne Morten Kvarving 5599bb6d8c changed: namespace Ewoms -> namespace Opm 2019-09-05 17:14:38 +02:00
Atgeirr Flø Rasmussen b9e7881878 Finalize integration of foam module. 2019-08-07 10:39:16 +02:00
Franz G. Fuchs 7fb90bff47 Use foam module. 2019-08-07 10:39:16 +02:00
Kai Bao 53b15527c2 fixing warnings under simulator/wells 2019-06-26 09:52:38 +02:00
Atgeirr Flø Rasmussen a33cfbf0bc Moved Flow-related classes and files to opm/simulators/flow. 2019-06-20 11:00:51 +02:00
Kai Bao 4449f0c172 adding updateConnectionRatePolyMW to StandardWell 2019-06-13 14:49:04 +02:00
Kai Bao 2256395957 adding updateExtraPrimaryVariables to StandardWell 2019-06-13 14:49:04 +02:00