Commit Graph

10123 Commits

Author SHA1 Message Date
Bård Skaflestad
7c1cf03773
Merge pull request #4400 from blattms/use-cpr-from-datafile
Use CPR if specified in RUNSPEC / Make cprw the default
2023-01-19 16:59:48 +01:00
Markus Blatt
a69c8436ad Use cprw as default CPR variant if CPR is requested. 2023-01-19 15:54:33 +01:00
Markus Blatt
b67388e6f0 Use cpr if requested in RUNSPEC section of data file.
Can be overwritten using command line parameter `--linear-solver=...`.
2023-01-18 22:02:35 +01:00
Arne Morten Kvarving
715e0e1c82 fix Damaris setup in Main 2023-01-18 15:37:41 +01:00
Bård Skaflestad
da4e2deb6a
Merge pull request #4397 from akva2/summarystate_hpp_include
SummaryState.hpp: add missing and forward where possible
2023-01-18 14:58:47 +01:00
Arne Morten Kvarving
49fb1e1b6f
Merge pull request #4396 from akva2/main_cpp
Main: introduce a compile unit
2023-01-18 14:24:30 +01:00
Arne Morten Kvarving
e89a68b2ff Main.hpp: forward WellTestState 2023-01-18 14:01:43 +01:00
Arne Morten Kvarving
2b756a8202 Main: forward Action::State 2023-01-18 14:01:42 +01:00
Arne Morten Kvarving
7991af9c66 Main.hpp: forward UDQState 2023-01-18 14:01:42 +01:00
Arne Morten Kvarving
4aab577275 Main: move code for setting up Damaris to compile unit 2023-01-18 14:01:42 +01:00
Arne Morten Kvarving
560b0e5cbb Main: move code for setting up Vanguard to compile unit 2023-01-18 14:01:42 +01:00
Arne Morten Kvarving
c901570c9b Main.hpp: remove unnecessary Python.hpp include 2023-01-18 14:01:42 +01:00
Arne Morten Kvarving
82d2146c90 Main: move code for reading deck to compile unit 2023-01-18 14:01:42 +01:00
Arne Morten Kvarving
aa03b0c379 GasLiftGroupInfo.hpp: forward SummaryState 2023-01-18 13:42:32 +01:00
Arne Morten Kvarving
1729c1a414 Main: move some code to separate compile unit 2023-01-18 12:26:10 +01:00
Arne Morten Kvarving
fef009f792 Main: remove unused method and associated filesystem include 2023-01-18 12:22:50 +01:00
Arne Morten Kvarving
aee8a764e2 GasLiftSingleWellGeneric.hpp: include WellProductionControls.hpp instead of Well.hpp 2023-01-18 11:56:21 +01:00
Arne Morten Kvarving
93b3e8151e WellInterface.hpp: remove unnecessary Well.hpp include 2023-01-18 11:53:15 +01:00
Arne Morten Kvarving
998e5d8e64 WellAssemble.hpp: remove unnecessary Well.hpp include 2023-01-18 11:48:03 +01:00
Arne Morten Kvarving
d091858f46 GlobalWellInfo.hpp: remove unnecessary Well.hpp include 2023-01-18 11:24:25 +01:00
Arne Morten Kvarving
f109718242 SingleWellState.hpp: include WellEnums.hpp instead of Well.hpp 2023-01-18 11:24:25 +01:00
Arne Morten Kvarving
2a6b2b4957 MultisegmentWellEval.hpp: remove unnecessary Well.hpp include 2023-01-18 11:24:25 +01:00
Arne Morten Kvarving
f3fae9d23b WellConstraints.hpp: remove unnecessary Well.hpp include
forward WellInjectorCMode, WellProducerCMode and SummaryState
2023-01-18 11:24:25 +01:00
Arne Morten Kvarving
df181f2200 WellState.hpp: remove unnecessary Well.hpp include
forward WellStatus
2023-01-18 11:24:25 +01:00
Arne Morten Kvarving
7b2b18045e adjust to upstream enum changes 2023-01-18 11:24:25 +01:00
Arne Morten Kvarving
6d97ca97a1 add missing Well.hpp includes 2023-01-18 11:24:25 +01:00
Bård Skaflestad
8dcab4b236
Merge pull request #4392 from akva2/well_hpp_include
eclgenerictracermodel.cc: add missing Well.hpp include
2023-01-17 17:08:56 +01:00
Arne Morten Kvarving
bcf944b408 GasLiftGroupInfo.hpp: forward Well 2023-01-17 16:08:46 +01:00
Arne Morten Kvarving
ffcfc5e2ea Main.hpp: remove unnecessary ErrorGuard.hpp include 2023-01-17 13:30:39 +01:00
Arne Morten Kvarving
240c039f53 readDeck: make the ErrorGuard an internal detail 2023-01-17 13:30:39 +01:00
Arne Morten Kvarving
8179935217 Main.hpp: remove unnecessary ParseContext.hpp include 2023-01-17 09:36:35 +01:00
Arne Morten Kvarving
56df430bd6 readDeck: make the ParseContext an internal detail 2023-01-17 09:36:31 +01:00
Bård Skaflestad
6eb97c0165
Merge pull request #4388 from akva2/parser_hpp_cleanup
Main.hpp: remove unneccesary Parser.hpp include
2023-01-17 09:20:07 +01:00
Bård Skaflestad
537542e6ae
Merge pull request #4387 from akva2/arraydimchecker_cpp_cleanup
Main.hpp: remove unnecessary ArrayDimChecker.hpp include
2023-01-17 09:19:43 +01:00
Arne Morten Kvarving
978d130f30 Main.hpp: remove unneccesary Parser.hpp include 2023-01-17 07:56:37 +01:00
Arne Morten Kvarving
d6b7e1c253 Main.hpp: remove unnecessary ArrayDimChecker.hpp include 2023-01-17 07:36:02 +01:00
Arne Morten Kvarving
7a1cf45ed5 BlackoilWellModel: move code using WellTestConfig to compile unit 2023-01-17 07:22:17 +01:00
Arne Morten Kvarving
cc4fd831a8 add missing WellTestConfig.hpp includes 2023-01-17 06:04:56 +01:00
Arne Morten Kvarving
60b23e8bb1 move ParseContext configuration to readDeck
this way we do not need to include InputErrorAction in Main.hpp
2023-01-16 22:17:39 +01:00
Arne Morten Kvarving
fd94ca7031 add missing InputErrorAction.hpp includes 2023-01-16 22:17:39 +01:00
Arne Morten Kvarving
3a01e89585 adjust to InputErrorAction change to enum class 2023-01-16 22:17:39 +01:00
Bård Skaflestad
40c51f9829
Merge pull request #4381 from bska/tag-unused-parameters
Tag Unused Parameter as [[maybe_unused]]
2023-01-16 15:31:52 +01:00
Bård Skaflestad
171a591659 Tag Unused Parameter as [[maybe_unused]]
Suppresses warnings about unused arguments.  While here, also split
a long line for readability and include a number of standard headers
that were missing before.
2023-01-16 14:50:58 +01:00
Bård Skaflestad
7eaa2b91bc
Merge pull request #4382 from akva2/units_hpp_cleanups
Units.hpp: some cleanup
2023-01-16 13:47:49 +01:00
Arne Morten Kvarving
3745a4c02d clean up Units.hpp includes
include it where required instead of relying on other
headers to pull it in
2023-01-16 12:21:29 +01:00
Arne Morten Kvarving
7c797f9e7b add missing FieldData.hpp includes 2023-01-16 11:34:17 +01:00
Bård Skaflestad
11c0e085f9
Merge pull request #4193 from hnil/amgcl_fix
- fix compilation of amgcl bindings in bda by not doing anything for …
2023-01-16 11:23:39 +01:00
Arne Morten Kvarving
343c7b7e57 add missing Units.hpp includes 2023-01-16 10:17:59 +01:00
Arne Morten Kvarving
d8ce4bfd0c add missing WVFPEXP.hpp includes 2023-01-14 00:30:56 +01:00
Markus Blatt
e03227501a
Merge pull request #4376 from akva2/wellmicpproperties_hpp_include
add missing WellMICPProperties.hpp includes
2023-01-13 19:02:00 +01:00
Arne Morten Kvarving
d5fbbdc328 add missing WellEconProductionLimits.hpp includes 2023-01-13 15:26:24 +01:00
Arne Morten Kvarving
c0e9193e50 WellInterface: move code using WellMICPProperties to compile unit 2023-01-13 14:11:46 +01:00
Arne Morten Kvarving
f74f2ded8e add missing WellMICPProperties.hpp includes 2023-01-13 14:01:56 +01:00
Arne Morten Kvarving
d011bb29ae StandardWell: move code using WellPolymerProperties to compile unit 2023-01-13 13:02:37 +01:00
Arne Morten Kvarving
f860490c9f WellInterface: move code using WellPolymerProperties to compile unit 2023-01-13 13:02:37 +01:00
Arne Morten Kvarving
97f76412ae add missing WellPolymerProperties.hpp includes 2023-01-13 13:02:37 +01:00
Arne Morten Kvarving
325963fb63 add missing WellTracerProperties.hpp includes 2023-01-13 12:03:46 +01:00
Arne Morten Kvarving
71bf868ddb WellInterface: move code using WellBrineProperties to compile unit 2023-01-13 11:14:18 +01:00
Arne Morten Kvarving
131f52773f add missing WellBrineProperties.hpp includes 2023-01-13 11:14:18 +01:00
Arne Morten Kvarving
a29d5f81b6 WellInterface: move code using WellFoamProperties to compile unit 2023-01-13 10:18:26 +01:00
Arne Morten Kvarving
a0f85c8a93 add missing WellFoamProperties.hpp includes 2023-01-13 10:18:26 +01:00
Arne Morten Kvarving
0c91d6f6c1 MultisegmentWellGeneric.hpp: forward WellSegments 2023-01-12 14:37:32 +01:00
Arne Morten Kvarving
1bf36dfc08 MultisegmentWell: move code using WellSegments to compile unit 2023-01-12 14:37:32 +01:00
Arne Morten Kvarving
61d485cbe5 remove unimplemented prototypes 2023-01-12 14:37:32 +01:00
Arne Morten Kvarving
351181f355 add missing WellSegments.hpp includes 2023-01-12 14:37:32 +01:00
Arne Morten Kvarving
c707d91684 WellConnectionAuxiliaryModule: add a typetag independent base class
and put its code in a compile unit. allows embedding WellConnections.hpp
2023-01-12 13:06:25 +01:00
Arne Morten Kvarving
c0f809e640 BlackoilWellModel: mode code using WellConnections to compile unit 2023-01-12 13:06:25 +01:00
Arne Morten Kvarving
93e59e73ac use Well::hasConnections 2023-01-12 12:54:23 +01:00
Arne Morten Kvarving
7f7b373a2d add missing WellConnections.hpp includes 2023-01-12 12:24:32 +01:00
Arne Morten Kvarving
e2b8092894 add missing RFTConfig.hpp includes 2023-01-12 10:39:49 +01:00
Arne Morten Kvarving
30c5069519 add missing UDQConfig.hpp includes 2023-01-12 09:39:36 +01:00
Arne Morten Kvarving
bc5aad9554 add missing UDQActive.hpp include 2023-01-11 15:25:56 +01:00
Tor Harald Sandve
f2ea6ce844 Add support for FIP* 2023-01-11 14:39:23 +01:00
Arne Morten Kvarving
88ece0fdd8 add missing Actions.hpp includes 2023-01-11 13:52:11 +01:00
Arne Morten Kvarving
bba9c2a297 move Balance usage to BlackoilWellModelGeneric
now we do not need to include Balance.hpp in simulator objects
2023-01-11 11:26:25 +01:00
Arne Morten Kvarving
09dc3d9449 add missing Balance.hpp includes 2023-01-11 11:26:25 +01:00
Arne Morten Kvarving
7034b5528d add missing ExtNetwork.hpp includes 2023-01-11 09:47:15 +01:00
Arne Morten Kvarving
5236a443f8 add missing GConSale.hpp includes 2023-01-11 08:49:47 +01:00
Tor Harald Sandve
ceb8d996aa Fix GPMAINT for groups without control
If GPMAINT is used the group does not need a valid control object
2023-01-10 15:59:21 +01:00
Arne Morten Kvarving
4e21e96660 add missing GConSump.hpp includes 2023-01-10 15:00:25 +01:00
Arne Morten Kvarving
7fffe402cd add missing NameOrder.hpp includes 2023-01-10 12:47:00 +01:00
Arne Morten Kvarving
4bdec3a58b avoid GasLiftOpt.hpp where possible
and add where necessary
2023-01-10 09:54:33 +01:00
Arne Morten Kvarving
e68d05a147 adapt to renamed GasLift(Group|Well) 2023-01-10 09:54:07 +01:00
Arne Morten Kvarving
b010a1717a add missing RPTConfig.hpp includes 2023-01-09 15:22:12 +01:00
Arne Morten Kvarving
1dd0897eca add missing GuideRateConfig.hpp includes 2023-01-09 14:26:03 +01:00
Arne Morten Kvarving
12a72b4d6e add missing include 2023-01-09 12:49:29 +01:00
Arne Morten Kvarving
fe09a6cdce replace <Runspec.hpp> with <Phase.hpp> where appropriate 2023-01-05 13:18:32 +01:00
Arne Morten Kvarving
469b38c321 remove unnecessary <Runspec.hpp> includes 2023-01-05 13:18:32 +01:00
Bård Skaflestad
716ea14cb0
Merge pull request #4345 from akva2/fix_macro
avoid double underscored symbol
2023-01-03 17:14:29 +01:00
Arne Morten Kvarving
eedd646523 avoid double underscored symbol 2023-01-03 16:34:49 +01:00
Arne Morten Kvarving
1903a43971 AdaptiveSimulatorTimer: avoid <iostream> include in header 2023-01-03 15:25:20 +01:00
Arne Morten Kvarving
df5edfb96f BISAI: remove unnecessary iostream include 2023-01-03 15:25:00 +01:00
Arne Morten Kvarving
64140f51c9 pass output stream
there is no default argument any longer
2023-01-03 15:24:28 +01:00
Bård Skaflestad
d58efe3bf9
Merge pull request #4343 from akva2/remove_sstream
Remove sstream use in exception handling
2023-01-02 16:37:33 +01:00
Arne Morten Kvarving
7dce14929b WellState: avoid use of sstream 2023-01-02 15:25:13 +01:00
Arne Morten Kvarving
ddb3f2dafb VFPHelpers: avoid use of sstream 2023-01-02 15:24:52 +01:00
Arne Morten Kvarving
ff0f9c05f0 MultisegmentWell: avoid use of sstream 2023-01-02 15:24:35 +01:00
Arne Morten Kvarving
99e5dab134 BlackoilWellModelGeneric: avoid use of sstream 2023-01-02 15:24:16 +01:00
Arne Morten Kvarving
17d54c1416 setupZoltanParams: avoid use of sstream 2023-01-02 15:24:03 +01:00
Arne Morten Kvarving
4abf4e6d38 TimeStepControl: avoid use of sstream 2023-01-02 15:23:48 +01:00
Arne Morten Kvarving
527280ab28 AdaptiveTimeSteppingEbos: avoid use of sstream 2023-01-02 15:23:34 +01:00
Arne Morten Kvarving
f00ebc8b1c setupPropertyTree: avoid use of sstream 2023-01-02 15:23:14 +01:00
Arne Morten Kvarving
48bdf6f14c add missing sstream includes 2023-01-02 15:21:42 +01:00
Arne Morten Kvarving
e25d77f705 WellContributions: avoid use of sstream 2023-01-02 15:19:40 +01:00
Arne Morten Kvarving
bcf64b4be8 PreconditionerFactory: avoid use of sstream 2023-01-02 15:19:26 +01:00
Arne Morten Kvarving
ccce1cfe86 OwningTwoLevelPreconditioner: avoid use of sstream 2023-01-02 15:19:08 +01:00
Arne Morten Kvarving
6d033fcf56 MILU: avoid use of sstream 2023-01-02 15:18:50 +01:00
Arne Morten Kvarving
4a0bdc38e1 ISTLSolverEbos: avoid use of sstream 2023-01-02 15:18:34 +01:00
Arne Morten Kvarving
52d871f998 FlexibleSolver: avoid use of sstream 2023-01-02 15:18:10 +01:00
Arne Morten Kvarving
b148b454c6 NonlinearSolverEbos: avoid use of sstream 2023-01-02 15:17:49 +01:00
Tor Harald Sandve
6c60bad193 fix combination of vapwat and disgas 2023-01-02 12:16:35 +01:00
Bård Skaflestad
be55de8176
Merge pull request #4338 from atgeirr/adjust-cpr-defaults
Adjust cpr-related defaults
2022-12-23 17:55:13 +01:00
Bård Skaflestad
2bc065fce6
Merge pull request #4337 from akva2/deferred_logger_no_sstream
Avoid use of sstream in deferred logger header / macros
2022-12-23 15:25:48 +01:00
Arne Morten Kvarving
1c2e186017 always include Evaluation.hpp
even if we are using the dynamic specialization
2022-12-23 13:34:35 +01:00
Arne Morten Kvarving
be7f94b731 include Math.hpp where required 2022-12-23 13:34:35 +01:00
Arne Morten Kvarving
254f9c0388 DeferredLoggingHelpers: avoid using stringstream 2022-12-23 09:40:10 +01:00
Arne Morten Kvarving
a020a993b5 WellInterface: use {fmt} to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
a25479e5c2 WellInterfaceGeneric: use {fmt} to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
8d81588ea4 WellConvergence: avoid use of stringstream to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
5c22d2f50c WellAssemble: avoid use of stringstream to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
a82b5aa474 StandardWell: pull fmt in impl file
it is not used in the interface.
no real change to the code as such, but it better reflects the use.
2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
2dbfeb6038 StandardWell: use {fmt} to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
59e5642678 StandardWellPrimaryVariables: use {fmt} to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
4c3d933835 MultisegmentWell: use {fmt} to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
dd9e2ad66a MultisegmentWellSegments: use {fmt} to format error messages 2022-12-23 09:39:29 +01:00
Arne Morten Kvarving
3083525e8e MultisegmentWellEval: use {fmt} to format error messages 2022-12-22 08:35:27 +01:00
Arne Morten Kvarving
9e789fc144 MultisegmentWellEval: remove unused headers 2022-12-22 08:35:27 +01:00
Arne Morten Kvarving
a631762d17 GasLiftSingleWell: pull fmt in impl file
it is not used in the interface.
no real change to the code as such, but it better reflects the use.
2022-12-22 08:35:27 +01:00
Arne Morten Kvarving
a8d2bbeb4a GasLiftCommon: avoid pulling fmt in header 2022-12-22 08:35:27 +01:00
Arne Morten Kvarving
e7f921825c BlackoilWellModel: use {fmt} to format error message 2022-12-22 08:35:27 +01:00
Tor Harald Sandve
7c832b00f8
Merge pull request #4292 from totto82/addRsw
Add support for gas in water
2022-12-21 13:39:42 +01:00
Atgeirr Flø Rasmussen
ba734bc9ad Change default CPR preconditioner recreation behaviour. 2022-12-21 13:23:26 +01:00
Atgeirr Flø Rasmussen
3832b02367 Adjust default behaviours for CPR variants.
- Remove two unused parameters. CprEllSolvetype is never used, and CprEllMaxIter
   is not used correctly as is (if used, it should change the maximum iterations of
   the coarse solver, not the repeats of the preconditioner) and is better left for
   JSON file customization.
 - Make the default AMG setup for "cpr" (including "cpr_trueimpes" and "cpr_quasiimpes")
   match the setup for "cprw". In particular, beta = 0.0 (not 1e-4) and
   prolongationdamping = 1.0 (not 1.6).
 - Just as we override the default maximum number of linear iterations for cpr and cprw
   (unless the user actually specified on the command line) to 20 instead of 100, we
   change the default reduction to be 0.005 instead of 0.01.
2022-12-21 13:23:13 +01:00
Tor Harald Sandve
5854b8a7a1 Support gas dissolution in water (Rsw)
- adapt to interface change in waterPvt()
- add gas + water + disgasw simulator

Note
- MSW is not supported
- EQUIL initialization is not supported
2022-12-21 13:13:52 +01:00
Tor Harald Sandve
42093324ac
Merge pull request #4335 from totto82/clampRSRV
clamp rs/rv in rate converter between 0.0 and rs/rv max
2022-12-21 09:40:40 +01:00
Tor Harald Sandve
17fcae23ad Start using code within BURN_RESV_BRIDGES
clamp rs/rv in rate converter between 0.0 and rs/rv max
2022-12-20 13:49:29 +01:00
Bård Skaflestad
8dcb37570b Rename Convergence Output Option
This commit renames the previously introduced command line option
ExtraConvergenceOutput (--extra-convergence-output) into the more
descriptive

    OutputExtraConvergenceInfo (--output-extra-convergence-info)

Suggested by: [at]OPMUSER
2022-12-20 12:32:14 +01:00
Bård Skaflestad
858ca8fa49 Output Non-Linear Convergence to Separate File if Requested
This commit enables outputting non-linear convergence metrics, i.e.,
the MB and CNV values, per phase, for each non-linear iteration in
each timestep.  If the user passes the option value "iterations" to
the --extra-convergence-output command line option, this commit will
create a new output file, CASE.INFOITER, that holds

    * report step
    * time step within that report step
    * elapsed time
    * MB and CNV values per phase
    * well convergence status

for each non-linear iteration.

We use an asynchronous file writing procedure and confer ownership
of the report step's unprocessed convergence reports to this
procedure just before the end of

    SimulatorFullyImplicitBlackoilEbos::runStep()

At that point, the convergence reports are about to go out of scope.
The asynchronous protocol uses a dedicated queue of output requests,
class ConvergenceReportQueue, into which the producer-i.e., member
function runStep()-inserts new convergence reports and from which
the output thread, ConvergenceOutputThread::writeASynchronous(),
retrieves those requests before writing the file data.
2022-12-20 10:14:13 +01:00
Arne Morten Kvarving
5a839e8f93 MultisegmentWellSegments: store properties as Scalar
instead of literal double
2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
c1e05fae18 MultisegmentWellSegments: make members private
and add various read-only accessors
2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
12b15b5038 move updateUpwindingSegments to MultisegmentWellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
4b3a6f37d5 move calculation part of handleAccelerationPressureLoss to MultisegmentwellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
70702738cc move pressureDropValve to MultisegmentWellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
fb0ec18aba move pressureDropAutoICD to MultisegmentWellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
133f2a92bb move pressureDropSpiralICD to MultisegmentWellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
4acfec9d1d move getFrictionPressureLoss to MultisegmentWellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
ef7b2aca4e move computeSegmentFluidProperties to MultisegmentWellSegments 2022-12-19 16:03:54 +01:00
Arne Morten Kvarving
4a9cedf452 move getSegmentSurfaceVolume to MultisegmentWellSegments 2022-12-19 16:03:53 +01:00
Arne Morten Kvarving
9c19120855 move getHydroPressureLoss to MultisegmentWellSegments 2022-12-19 16:03:27 +01:00
Arne Morten Kvarving
40adc0ddbd move segment_depth_diffs_ to MultisegmentWellSegments 2022-12-19 16:03:27 +01:00
Arne Morten Kvarving
5755c94256 move segment_inlets_ to MultisegmentWellSegments 2022-12-19 16:03:27 +01:00
Arne Morten Kvarving
2766427df0 move segment_perforations_ and perforation_segment_depth_diffs_ to MultisegmentWellSegments 2022-12-19 16:03:26 +01:00
Arne Morten Kvarving
aa684a10b8 added: MultisegmentWellSegments
this is a container class for per-segment properties in MultisegmentWell
2022-12-19 15:55:20 +01:00
Arne Morten Kvarving
bc0610171d MultisegmentWellEval: use symbols from primary variables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
654c252bb8 MultisegmentWellAssemble: simplify assembleControlEq
by passing primary variables
2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
3b80b913da MultisegmentWellPrimaryVariables: make data members private
and add generic read-only accessor to evaluations
2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
e1cd54b267 MultisegmentWell: move updateUpwindingSegments to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
37607c570a MultisegmentWell: move updateWellStateFromPrimaryVariables to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
dbdcb2d5ce MultisegmentWell: move getWQTotal to MultisegmentWellPrimaryVariables
also drop otherwise unused getSegmentWQTotal
2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
6b47f9bf1a MultisegmentWell: move getQs to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
62297b2a63 MultisegmentWell: move getSegmentRate to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
99020fe33b MultisegmentWell: move getBhp to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
bb377c0a47 MultisegmentWell: move getSegmentPressure to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
f99ecd15ac MultisegmentWell: move getSegmentRateUpwinding to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
8e9b004cfc MultisegmentWell: move surfaceVolumeFraction to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
2e2a49b935 MultisegmentWell: move volumeFractionScaled to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
e539614fff MultisegmentWell: move volumeFraction to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
b112a793c5 MultisegmentWell: move updatePrimaryVariablesNewton to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
6404d69201 MultisegmentWell: move processFractions to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
5212e9c100 MultisegmentWell: move updatePrimaryVariables to MultisegmentWellPrimaryVariables 2022-12-19 13:05:39 +01:00
Arne Morten Kvarving
e1fccd47dc added: MultisegmentWellPrimaryVariables
this is a container class for the primary variables in
multisegment well
2022-12-19 13:05:39 +01:00
Bård Skaflestad
c50cdc2454
Merge pull request #4331 from akva2/msw_avoid_mutable
MultisegmentWell: avoid mutable primary variables
2022-12-19 12:34:13 +01:00
Bård Skaflestad
c42e0051e3
Merge pull request #4329 from blattms/treat-connection-not-attached-to-segments-correctly
[bugfix,mswells] Throw for connections not attached to segments correctly.
2022-12-16 17:12:27 +01:00
Markus Blatt
8cde90fbd0 [bugfix,mswell] Throw for connections not attached to segments.
If there are connections of a multisegment well that are not
connected to any segment, we throw with a meaningful error message
instead of a silent segmentation fault. In that case an invalid segment index
of zero would be returned. The corresponding storage index returned by
segmentToNumberIndex ould become -1. This previously lead to segmentation
faults when using it to index a container.
2022-12-16 16:12:47 +01:00
Arne Morten Kvarving
f4c2aa3a35 MultisegmentWell: primary variables no longer needs to be marked mutable 2022-12-16 15:07:46 +01:00
Arne Morten Kvarving
f782673b2d MultisegmentWell: make updatePrimaryVariables non-const
this will obviously update state
2022-12-16 15:07:35 +01:00
Arne Morten Kvarving
ef992080cf MultisegmentWell: make updatePrimaryVariablesNewton non-const
this will obviously update state
2022-12-16 15:07:12 +01:00
Arne Morten Kvarving
ac91db281a MultisegmentWell: make processFractions non-const
this updates state
2022-12-16 15:06:36 +01:00
Arne Morten Kvarving
6b61af21b3 MultisegmentWell: make initPrimaryVariablesEvaluation non-const
this will obviously update state
2022-12-16 15:06:03 +01:00
Arne Morten Kvarving
10a671e88c MultisegmentWell: make updateWellState non-const
this will obviously update state
2022-12-16 15:05:06 +01:00
Bård Skaflestad
63654a73fc Don't Output INFOSTEP File by Default
This commit introduces a new helper class,

    ConvergenceOutputConfiguration

which parses comma separated option strings into a runtime
configuration object for whether to output additional convergence
information and, if so, what information to output.

Supported option string values are

  * "none"       -- Dont want any additional convergence output.

  * "steps"      -- Want additional convergence output pertaining to the
                    converged solution at the end of each timestep.

  * "iterations" -- Want additional convergence output pertaining to each
                    non-linar ieration in each timestep.

Option value "none" overrides all other options.  In other words, if the
user requests "none", then there will be no additional convergence
output, even if there are other options in the option string.

We add a new option, ExtraConvergenceOutput (command line option
--extra-convergence-output), which takes a string argument expected
to be a comma separated combination of these options.  The default
value is "none".  Finally, make the INFOSTEP file output conditional
on the user supplying "steps" as an argument to the new option.
2022-12-15 13:02:09 +01:00
Bård Skaflestad
44aaaf319e
Merge pull request #4321 from akva2/use_common_exceptions
use exception classes from opm-common
2022-12-14 09:48:12 +01:00
Arne Morten Kvarving
f17a90170d use exception classes from opm-common 2022-12-13 12:56:13 +01:00
Atgeirr Flø Rasmussen
6531fbc146 Silence warnings due to forward declaring structs as classes. 2022-12-13 11:57:33 +01:00
Arne Morten Kvarving
e4233daf72 add missing include
after upstream header removals
2022-12-10 01:58:32 +01:00
Arne Morten Kvarving
134cb205e2 RelpermDiagnostics: add more forwards
adjust to upstream header-in-header removals
2022-12-09 22:17:09 +01:00
Bård Skaflestad
3c63a7aa6d Capture Timestep's Non-Linear Convergence History
This enables outputting a formatted record of the limiting MB and
CNV quantities as time and non-linear iterations progress.  This, in
turn, is intended for diagnostic and analysis purposes and will not
be output unless specifically requested.

In particular, add a new type,

    ConvergenceReport::ReservoirConvergenceMetric

which captures the convergence metric type (MB or CNV) along with
the associate phase and numerical value of the convergence metric.
We add a vector of these convergence metric objects as a new data
member of the ConvergenceReport.

Finally, foreshadowing the intended use case, also store the report
time in the ConvergenceReport object.
2022-12-09 16:22:36 +01:00
Bård Skaflestad
de84ea65a7
Merge pull request #4251 from GitPaean/fixing_singluar_frictional_pressure_drop
rewrting frictionPressureLoss fucntion for better jacobian matrix
2022-12-09 11:04:33 +01:00
Bård Skaflestad
149ae34dd2 Capture Component Names in Independent Datastructure
This is in preparation of enabling separate convergence output
for diagnostic purposes.
2022-12-09 09:41:22 +01:00
Markus Blatt
b4acdedefd
Merge pull request #4310 from totto82/groupinfo_stage2
BUGFIX we now use group_info in stage 2 and need to make sure its communicated
2022-12-08 09:01:01 +01:00
Tor Harald Sandve
60d0116080 we now use group_info in stage 2 and need to make sure its communicated 2022-12-07 15:43:25 +01:00
Atgeirr Flø Rasmussen
130f552dac Must set location for every variable. 2022-12-07 13:37:38 +01:00
Atgeirr Flø Rasmussen
18f6f5e4e3 Push index map to Damaris for output ordering. 2022-12-07 13:05:44 +01:00
Kai Bao
1f077c35d2 rewrting frictionPressureLoss fucntion for better jacobian matrix
it removes some singularity warning from UMFPack.
2022-12-07 11:43:12 +01:00
Arne Morten Kvarving
b102103e26 changed: make MultisegmentWellEquations data members private
use a friend declaration for MultisegmentWellEquationAccess to
give the assembler access to the matrices/vectors.
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
2d154b50bb added: MultisegmentWellEquations::residual()
this returns a const reference to the residual vector.
use this in MultisegmentWellEval
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
4545761374 added: MultisegmentWellEquationAccess
this is a proxy class for accessing the equation system
in MultisegmentWellAssemble.
use the new class for vector/matrix access in MultisegmentWellAssemble.
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
6011a42246 added: MultisegmentWellAssemble::assemblePerforationEq
extracted from MultisegmentWell::assembleWellEqWithoutIteration
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
b1d1e47e28 added: MultisegmentWellAssemble::assembleInflowTerm
extracted from MultisegmentWell::assembleWellEqWithoutIteration
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
d5bbccde65 added: MultisegmentWellAssemble::assembleOutflowTerm
extracted from MultisegmentWell::assembleWellEqWithoutIteration
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
517dd49771 added: MultisegmentWellAssemble::assembleAccumulationTerm
extracted from MultisegmentWell::assembleWellEqWithoutIteration
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
1952ca1e5c use MultisegmentWellAssemble::assemblePressureEq in assembleICDPressureEq 2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
32dce644d3 added: MultisegmentWellAssemble::assembleTrivialEq
extracted from MultisegmentWellEval::assembleICDPressureEq
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
05a4ca85a7 added: MultisegmentWellAssemble::assemblePressureEq
extracted from MultisegmentWellEval::assembleDefaultPressureEq
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
d64508f3b8 added: MultisegmentWellAssemble::assemblePressureLoss
extracted from MultisegmentWellEval::handleAccelerationPressureLoss
2022-12-05 11:07:09 +01:00
Arne Morten Kvarving
4ebde4e003 added: MultisegmentWellAssemble
this handles assembly of the equation system for multisegment well.
start by moving assembleControlEq into the new class
2022-12-05 11:07:09 +01:00
Bård Skaflestad
4f38217fc8
Merge pull request #4302 from akva2/msw_equations
Added: MultisegmentWellEquations
2022-12-05 11:05:31 +01:00
Arne Morten Kvarving
97e1cdb662 added: MultisegmentWellEquations::extractCPRPressureMatrix()
this adds the cpr pressure matrix to a matrix.
this is the core of MultisegmentWell::addWellPressureEquations
use the new method in the implementation.
2022-12-05 10:13:55 +01:00
Arne Morten Kvarving
de8eedb9a6 added: MultisegmentWellEquations::extract(SparseMatrixAdapter)
this adds the well matrices to a sparse matrix adapter.
this is the core of MultisegmentWell::addWellContributions.
use the new method in the implementation.
2022-12-05 10:13:55 +01:00
Arne Morten Kvarving
4a2fcd5f09 added: MultisegmentWellEquations::extract(WellContributions&)
this adds the well matrices to a WellContributions object.
use the new method in the implementation.
2022-12-05 10:13:55 +01:00
Arne Morten Kvarving
d50aaf8ed4 added: MultisegmentWellEquations::recoverSolutionWell()
this recovers the well solution from a solution vector.
use the new method in the well implementation.
2022-12-05 10:13:55 +01:00
Arne Morten Kvarving
bc312d1117 added: MultisegmentWellEquations::solve()
this applies the inverted D matrix to the residual vector.
use the new method in the well implementation.
2022-12-05 10:13:55 +01:00
Arne Morten Kvarving
a7cb444328 MSWellHelpers: simplify interfaces
- avoid passing the matrix, only pass the solver. possible
  since setting up the solver is not done in here any more.
- avoid passing shared_ptr's
2022-12-05 10:13:55 +01:00
Arne Morten Kvarving
e67e58d0c8 added: MultisegmentWellEquations::createSolver
this applies compute the LU decomposition of the D matrix
2022-12-05 10:13:53 +01:00
Torbjørn Skille
8dec3958bd Updates related to unsupported keywords and options
Majority of unsupported keywords and unsupported keyword options are now critical (simulator will stop).
2022-12-02 12:46:43 +01:00
Kai Bao
3d86688d0f renaming local_comp_index to local_conn_index
in function WellState::reportConnections() since there is no
completion involved here.
2022-12-01 15:42:18 +01:00
Kai Bao
aaf76227f6 using correct CPI indices for connections
in WellState::reportConnections()
2022-12-01 15:16:35 +01:00
Arne Morten Kvarving
abf5f94561 added: MultisegmentWellEquations::apply(r)
this applies the equation system to a vector.
use the new method in the well implementation.
2022-12-01 10:36:40 +01:00
Arne Morten Kvarving
f2acbccc1a added: MultisegmentWellEquations::apply(x,Ax)
this applies the equation system to a vector.
use the new method in the well implementation.
2022-12-01 10:36:40 +01:00
Arne Morten Kvarving
8fe6b3968e added: MultisegmentWellEquations::init
this initializes the equation system.
use the new method in the well implementation.
2022-12-01 10:36:40 +01:00
Arne Morten Kvarving
ade6d99289 add two accessors in MultisegmentWellGeneric
for segment inlets and segment perforations
2022-12-01 10:25:59 +01:00
Arne Morten Kvarving
ac245a2e17 added: MultisegmentWellEquations::clear
this zeros the equation system.
use the new method in the well implementation.
2022-12-01 10:25:57 +01:00
Arne Morten Kvarving
57f09050fc add: MultisegmentWellEquations
this is a container for the multisegment well equation system
2022-12-01 10:25:28 +01:00
Atgeirr Flø Rasmussen
e23da0b6b7
Merge pull request #4301 from akva2/msw_avoid_mutable
MultisegmentWell: avoid mutable matrices/vectors
2022-12-01 08:03:01 +01:00
Arne Morten Kvarving
d1b4b1afae MultisegmentWellEval: remove mutable from matrices and vectors 2022-11-30 23:15:25 +01:00
Arne Morten Kvarving
2f0c68f574 MultisegmentWellEval: make assembleICDPressureEq non-const
this changes class state
2022-11-30 23:15:25 +01:00
Arne Morten Kvarving
c15925858f MultisegmentWellEval: make assembleDefaultPressureEq non-const
this changes class state
2022-11-30 23:15:25 +01:00
Arne Morten Kvarving
f6e12a86b3 MultisegmentWellEval: make assemblePressureEq non-const
this changes class state
2022-11-30 23:15:25 +01:00
Arne Morten Kvarving
1cde1335ac MultisegmentWellEval: make handleAccelerationPressureLoss non-const
this changes class state
2022-11-30 23:15:25 +01:00
Arne Morten Kvarving
fcf4da30d3 MultisegmentWellEval: make initMatrixAndVector non-const
this changes class state
2022-11-30 23:15:25 +01:00
Arne Morten Kvarving
eadf972014 MSWellHelpers: reverse order of template parameters
this way the matrix type and be deduced from passed parameters
2022-11-30 23:05:29 +01:00
Atgeirr Flø Rasmussen
7e8b0d5700
Merge pull request #4290 from totto82/refactor_primaryVars_Meaning
adapt to primary variable refactoring
2022-11-30 11:10:47 +01:00
Bård Skaflestad
e3d05d1129 Promote Segment Data in WRFTPLT to Supported Status
While there are a few arrays we admittedly don't create, the level
of support is now sufficiently complete that declaring values other
than 'NO' as "supported" is warranted.
2022-11-28 11:33:34 +01:00
Kai Bao
6102249466
Merge pull request #4289 from akva2/fix_thp_regression
fix regression in wells
2022-11-28 10:46:35 +01:00
Bård Skaflestad
fe7da56268
Merge pull request #4293 from akva2/stdwell_conn
added: StandardWellConnections
2022-11-25 15:31:53 +01:00
Arne Morten Kvarving
2671a3fb35 fixed: primary variables no longer needs to be mutable 2022-11-25 13:09:57 +01:00
Arne Morten Kvarving
13af642fe4 StandardWell: make updatePrimaryVariablesNewton non-const
this will obviously modify well state
2022-11-25 13:09:29 +01:00
Arne Morten Kvarving
64112f76b3 StandardWell: make updateWellState non-const
this will obviously modify well state
2022-11-25 13:09:29 +01:00
Arne Morten Kvarving
c9856b9b2a WellInterface: make updatePrimaryVariables non-const
this will obviously modify well state
2022-11-25 13:09:29 +01:00
Arne Morten Kvarving
fba6249dd8 WellInterface: make recoverWellSolutionAndUpdateWellState non-const
this will obviously modify well state
2022-11-25 13:09:29 +01:00
Arne Morten Kvarving
147f0eb2bd WellInterface: make initPrimaryVariablesEvaluation non-const
this will obviously modify well state
2022-11-25 13:09:29 +01:00
Tor Harald Sandve
bdb82c2f3d Rename PrimaryVarsMeaning{Water/Gas/Pressure/Brine} to {Water/Gas/Pressure/Brine}Meaning 2022-11-25 13:03:26 +01:00
Arne Morten Kvarving
549fcf0629 use Scalar not double 2022-11-25 12:56:49 +01:00
Arne Morten Kvarving
dfd68266e9 rename computeWellConnectionDensitesPressures to computeProperties
make computePressureDelta and computeDensities private
2022-11-25 12:56:49 +01:00
Arne Morten Kvarving
86bf452059 move computeWellConnectionDensitesPressures to StandardWellConnections 2022-11-25 12:56:47 +01:00
Arne Morten Kvarving
dcc333dac3 make member variables private in StandardWellConnections 2022-11-25 12:56:23 +01:00
Arne Morten Kvarving
1d058a4edf rename StandardWellConnections::getRho() to just rho() 2022-11-25 12:56:23 +01:00
Arne Morten Kvarving
9aeb48887c rename computePropertiesForWellConnectionPressure to computePropertiesForPressure
that it applies to connections are now implied by class
2022-11-25 12:56:23 +01:00
Arne Morten Kvarving
d1c1aecac7 move implementation of computePropertiesForWellConnectionPressure to StandardWellConnections 2022-11-25 12:56:20 +01:00
Arne Morten Kvarving
100a7b0582 rename computeConnectionDensities to computeDensities
that it applies to connections are now implied by class
2022-11-25 12:55:39 +01:00
Arne Morten Kvarving
5d1b5d9426 rename computeConnectionPressureDelta to computePressureDelta
that it applies to connections are now implied by class
2022-11-25 12:55:39 +01:00
Arne Morten Kvarving
0d72bba326 move computeConnectionDensities to StandardWellConnections
this necessitates expanding the template parameter list
2022-11-25 12:55:36 +01:00
Arne Morten Kvarving
7cadeb5206 changed: move StandardWellConnections out of inheritance hierarchy
instead hold a member in StandardWellEval
2022-11-25 12:54:56 +01:00
Arne Morten Kvarving
b08c165384 rename StandardWellGeneric to StandardWellConnections 2022-11-25 12:54:56 +01:00
Arne Morten Kvarving
0389465bbf StandardWellGeneric: clean includes and forwards 2022-11-25 12:54:53 +01:00
Tor Harald Sandve
22d27bdf5f Adapt to change of enum to enum class for primary variable meaning 2022-11-25 10:53:48 +01:00
Tor Harald Sandve
a190668800 adapt to rename of waterSaturationIdx -> waterSwitchIdx 2022-11-25 10:53:48 +01:00
Tor Harald Sandve
0c6d29a352 adapt to primary variable refactoring 2022-11-25 10:53:48 +01:00
Arne Morten Kvarving
c7016854d9 changed: make the deck an implementation detail in Opm::readDeck 2022-11-24 13:00:38 +01:00
Arne Morten Kvarving
f4f8c033d8 EclGenericVanguard: remove deck member 2022-11-24 12:10:52 +01:00
Bård Skaflestad
e524acd5b2
Merge pull request #4283 from akva2/stdwellass_simplify
StandardWellAssemble: simplify by using primary variables class
2022-11-23 23:29:42 +01:00
Arne Morten Kvarving
4f6665076c StandardWellAssemble: simplify by using primary variables class
- pass primary variables as parameter
- use the evaluation type
2022-11-23 21:19:06 +01:00
Arne Morten Kvarving
2da1322697 fix regression in wells
we need to call WellInterface::getTHPConstraint,
not WellBhpThpCalculator::getTHPConstraint
2022-11-23 15:37:04 +01:00
Bård Skaflestad
5b69890ece Report Solution GOR and OGR at Segment Level
This enables calculating the SOFRF and SGFRF summary vectors.
2022-11-22 18:06:05 +01:00
Bård Skaflestad
fa1ea7f997
Merge pull request #4282 from totto82/fixInjTemp2
remove derivative in thermal flux for injectors
2022-11-22 17:29:24 +01:00
Markus Blatt
42fdc38ae0
Merge pull request #4273 from Tongdongq/add-test
Add test for cusparseSolver
2022-11-22 13:55:11 +01:00
Arne Morten Kvarving
3cd87a8c89 StandardWellPrimaryVariables: store values as Scalar 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
8e3121113c drop unnecessary wrapper StandardWell::updateExtraPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
f64628f72d StandardWellPrimaryVariables: make data members private
and add generic read-only accessors
2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
4bbcdf0646 add checkFinite to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
999d4c6be9 add StandardWellPrimaryVariables::updateNewtonPolyMW
extracted from StandardWell::updatePrimaryVariablesNewton
2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
23a8aed4e8 move getWQTotal to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
fbf99889b2 move getBhp to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
ff26a9e001 remove StandardWell::updatePrimaryVariables
no need for the wrapper any longer as the implementation
is now in StandardWellPrimaryVariables.
2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
b5f5a24af6 relaxationFactorFractionsForProducer: no need to pass values any longer 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
bc3680f822 updateNewton: avoid copying 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
e5e6e21122 relaxationFactorRate: no need to pass entire vector 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
2fbc699007 make relaxationFactorRate an anon helper in StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
3f6c4922b0 move updatePrimaryVariablesNewton to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
0cddc4516e make relaxationFactorFractions an anon helper in StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
7b8e88bdd5 move relaxationFactorFractionsForProducer to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
cd3388f7c0 move processFractions to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
435bd67732 move getQs to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
1aa74a9830 move wellSurfaceVolumeFraction to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
2fb53a4ef6 move wellVolumeFractionScaled to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
d6a6671eb0 move wellVolumeFraction to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
93a151f6e1 move (most of) updatePrimaryVariables to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
f55d4334f1 move (most of) updateWellStateFromPrimaryVariables to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
412e561cd8 move updateWellStateFromPrimaryVariablesPolyMW to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
f964169914 move updatePrimaryVariablesPolyMW to StandardWellPrimaryVariables 2022-11-22 13:11:17 +01:00
Arne Morten Kvarving
15d49e745e added: StandardWellPrimaryVariables
this is a container class for the primary variables in
standard well
2022-11-22 13:11:17 +01:00
Bård Skaflestad
9cde51cbc6
Merge pull request #4276 from akva2/stdwell_assemble
Added: StandardWellAssemble
2022-11-22 13:09:46 +01:00
Markus Blatt
d8ca55fe34
Merge pull request #4265 from totto82/well_temp
adapt to changes in temperature location in opm-common
2022-11-22 12:26:46 +01:00
Arne Morten Kvarving
3033f3784b changed: make StandardWellEquations data members private
use a friend declaration for StandardWellEquationAccess to
give the assembler access to the matrices/vectors.
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
5eac7cae4e added: StandardWellEquations::residual()
this returns a const reference to the residual vector.
use this in StandardWellEval::getWellConvergence
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
5bab68cb1f added: StandardWellEquationAccess
this is a proxy class for accessing the equation system
in StandardWellAssemble.
use the new class for vector/matrix access in StandardWellAssemble.
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
68bc90b3be added: StandardWellAssemble::assembleSourceEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
5bbf205619 added: StandardWellAssemble::asembleZFracEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
f720cc6dde added: StandardWellAssemble::assemblePerforationEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
57ecd2a5e9 added: StandardWellAssemble::assembleInjectivityEq
extracted from StandardWell::handleInjectivityEquations
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
10e967653b added: StandardWellAssemble
this handles assembly of the equation system for standardwell.
start by moving assembleControlEq into the new class
2022-11-22 12:22:18 +01:00
Arne Morten Kvarving
d2c028fb74 StandardWell_impl.hpp: remove some unused headers 2022-11-22 10:37:41 +01:00
Arne Morten Kvarving
4b4898d6ec added: StandardWellEquations::sumDistributed
this sums up the global equation system for distributed wells
2022-11-22 10:37:41 +01:00
Arne Morten Kvarving
e9ed80d644 added: StandardWellEquations::extractCPRPressureMatrix()
this adds the cpr pressure matrix to a matrix.
this is the core of StandardWellEval::addWellPressureEquations
use the new method in the implementation.
2022-11-22 10:37:41 +01:00
Arne Morten Kvarving
b24f22312e added: StandardWellEquations::getNumBlocks()
this returns the number of blocks in in B/C matrices.
use the new method in the well implementation.
2022-11-22 10:37:40 +01:00
Arne Morten Kvarving
f2d8a073f9 added: StandardWellEquations::extract(SparseMatrixAdapter)
this adds the well matrices to a sparse matrix adapter.
this is the core of StandardWellEval::addWellContributions.
use the new method in the implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
65efe8e1fc added: StandardWellEquations::extract(WellContributions&)
this adds the well matrices to a WellContributions object.
this is the core of StandardWellEval::addWellContributions.
use the new method in the implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
40640e9da6 added: StandardWellEquations::recoverSolutionWell()
this recovers the well solution from a solution vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
daf0f90fe5 added: StandardWellEquations::solve()
this applies the inverted D matrix to the residual vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
83c41e3f9c added: StandardWellEquations::invert()
this inverts the D matrix.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
033718f027 added: StandardWellEquations::apply(r)
this applies the equation system to a vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
21bb4dc955 added: StandardWellEquations::apply(x,Ax)
this applies the equation system to a vector.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
97d158da38 added: StandardWellEquations::init
this initializes the equation system.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
d05081417e added: StandardWellEquations::clear
this zeros the equation system.
use the new method in the well implementation.
2022-11-22 10:36:54 +01:00
Arne Morten Kvarving
a8c912ccfa add: StandardWellEquations
this is a container for the standard well equation system
2022-11-22 10:36:54 +01:00
Markus Blatt
58d8ca144e
Merge pull request #4259 from blattms/do-dereference-unset-optional
[bugfix] Do not unconditionally dereference std::optional.
2022-11-22 10:26:30 +01:00
Tor Harald Sandve
f9ab7e6b07 remove derivative in thermal flux for injectors 2022-11-22 09:40:39 +01:00
Bård Skaflestad
910f10d43b
Merge pull request #4280 from akva2/well_instantations_simplify
simplify instantations
2022-11-21 16:27:16 +01:00
Tong Dong Qiu
a8e568f4c5 Moved initializing CUDA device to constructor 2022-11-21 15:54:14 +01:00
Bård Skaflestad
eeae2442a8
Revert "remove derivative in thermal flux for injectors" 2022-11-21 15:20:45 +01:00
Tor Harald Sandve
5c26be0c28
Merge pull request #4214 from totto82/glift3_fix
Fixes related to gaslift stage 2
2022-11-21 14:40:52 +01:00
Bård Skaflestad
c3dceef6e0
Merge pull request #4237 from akva2/relax_factor_pass_double
changed: pass the actual update value to relaxationFactorRate
2022-11-21 13:49:02 +01:00
Kai Bao
48fa688a17
Merge pull request #4274 from GitPaean/handle_small_fractions_for_sicd
not calculating emulsionViscosity for small liquid_fraction
2022-11-21 13:26:17 +01:00
Kai Bao
9a1520a367
Merge pull request #4262 from totto82/fixInjTemp2
remove derivative in thermal flux for injectors
2022-11-21 13:25:24 +01:00
Arne Morten Kvarving
8a32d6bf33 simplify instantations
more readable
2022-11-21 12:48:50 +01:00
Tor Harald Sandve
c45d90650e fix checking of group target
- use the actual delta rate in checkOilTarget etc
- add check for total gas rate = gas rate + alq
2022-11-21 09:17:24 +01:00
Tor Harald Sandve
7d7b2803a5 renaming and adding more comments based on review 2022-11-21 08:58:49 +01:00
Tor Harald Sandve
9c8f778495 Compute the group rates that takes into account limitation on the sublevels 2022-11-21 08:58:49 +01:00
Tor Harald Sandve
1a09608263 Fix removeSurplus alq
Add water rate target limit
Add the gradient to the checkXXXTarget so that surplus alq is removed
until it would go below the target. I.e. the group still want to produce it  target
2022-11-21 08:58:49 +01:00
Tor Harald Sandve
cd09c130b3 pass group name to getRateWithGroupLimit to avoid checking for that 2022-11-21 08:58:49 +01:00
Håkon Hægland
c313a0a4b2 Remove unused variables 2022-11-21 08:58:49 +01:00
Håkon Hægland
43244c2132 Change condition under which stage 2 is done.
It only makes sense to try to optimize the distribution of lift gas if
the amount of lift gas is constrained either by the maximum allowed
gaslift or total gas or the group is under individual control.
2022-11-21 08:58:49 +01:00
Håkon Hægland
686a6a969d Calculate gradients with group limits.
Take into account group limits when calculating gradients for individual
wells in stage 2 of gas lift optimization.
2022-11-21 08:58:49 +01:00
Håkon Hægland
9c61262329 Changed formatting. 2022-11-21 08:58:49 +01:00
Håkon Hægland
bc566e3981 Also check LRAT group target in stage2
Also account for a group LRAT limit when removing surplus ALQ in gaslift
optimization stage 2.
2022-11-21 08:58:49 +01:00
Håkon Hægland
61ed803740 Do stage2 even if GLIFTOPT is not defined 2022-11-21 08:58:49 +01:00
Tong Dong Qiu
5620b08033 Fix segfaults rocalutionSolver 2022-11-18 14:19:10 +01:00
Tong Dong Qiu
21b23b7aa4 Combine multiple defines into one 2022-11-18 13:09:39 +01:00
Kai Bao
5e35477ce1 a little different form to keep the derivatives 2022-11-17 22:57:42 +01:00
Kai Bao
3ddb830ae9 not calculating emulsionViscosity for small liquid_fraction
it might introduce inf/nan in the Jacobian matrix.
2022-11-17 15:20:56 +01:00
Bård Skaflestad
936e9e87e7 Convey More Dynamic State Values per Segment to Output Layer
In particular, report local condition segment flow velocities,
segment holdup fractions, and segment phase viscosities.
2022-11-17 11:49:29 +01:00
Bård Skaflestad
085ccccb1e Capture More Dynamic State Per Segment
In particular, calculate segment flow velocities, segment holdup
fractions, and segment phase viscosities when updating the well
state.  This is purely for reporting purposes and does not affect
the multisegmented model.
2022-11-17 11:49:29 +01:00
Bård Skaflestad
2da83fa680 Expose Internal Support for Inferring Rs/Rv From Surface Volumes 2022-11-17 11:49:29 +01:00
Bård Skaflestad
7d9beb3506 Support Using Different Types for Surface and Reservoir Rates
Simplifies using pointers here.
2022-11-17 11:49:29 +01:00
Tong Dong Qiu
65128d1616 Removed unused reordering functions, file, header inclusions 2022-11-17 09:38:23 +01:00
Tong Dong Qiu
35287a61ff Remove FPGASolver and references 2022-11-17 09:38:01 +01:00
Arne Morten Kvarving
f9f6fdb3bf BlackoilAquiferModel: only include alugrid if it is to be used 2022-11-14 15:11:12 +01:00
Arne Morten Kvarving
bdb2738034 ISTLSolverEbos: instance for ALUGrid 2022-11-14 14:54:11 +01:00
Atgeirr Flø Rasmussen
5107bcfada
Merge pull request #4226 from hnil/remove_assert_cprw
removed assert in cprw for strictly positive diagonal well coupling
2022-11-14 12:42:37 +01:00
hnil
9c76c96f21 moved debug code into #if section 2022-11-14 11:36:48 +01:00
Tor Harald Sandve
76dc8255fc adapt to changes in temperature location in opm-common 2022-11-11 13:19:38 +01:00
Tor Harald Sandve
7553e22726 remove derivative in thermal flux for injectors 2022-11-10 12:57:21 +01:00
Bård Skaflestad
d388ce40e5 Revert to Original Rs/Rv Calculation Scheme for RESV Rates
Keep the alternative approach in place for reference and
experimental purposes, but disabled by a macro.
2022-11-10 09:41:47 +01:00
Bård Skaflestad
f0e2a1efe0 Make Reservoir Voidage Rate Calculator Independent
This commit adds a new overload of the calcReservoirVoidageRates()
member function.  The new overload does not depend on the user
calling defineState(), but instead takes state variables as direct
input arguments.

Reimplement the state-dependent overload in terms of the new
function.  The immediate use case is calculating additional dynamic
quantities per segment in a multisegmented well model, mostly for
reporting purposes.
2022-11-09 17:08:30 +01:00
Markus Blatt
9cb6d53dcb [bugfix] Do not unconditionally dereference std::optional.
In WellGroupHelpers we unconditional referenced the region
member of GPMaint. Unfortunately, that is a std:optional and
doing this can create quite some havoc.

Now we stop processing if it is unset.
2022-11-09 16:49:07 +01:00
Markus Blatt
4988f98060
Merge pull request #4178 from Tongdongq/rocalution
Add rocalutionSolver
2022-11-09 16:44:35 +01:00
Tong Dong Qiu
b51a4a863e Fix reduction calculation 2022-11-09 10:27:10 +01:00
Tong Dong Qiu
1dd6af15dc Print via fmt 2022-11-08 13:05:57 +01:00
Tong Dong Qiu
d3d9743b81 Simplify parameter 2022-11-08 10:03:15 +01:00
Tong Dong Qiu
8fbfd473ab Removed unnecessary stream clear 2022-11-08 10:03:15 +01:00
Tong Dong Qiu
f91154c165 Autodetect if transposing is needed 2022-11-08 10:03:09 +01:00
Kai Bao
97b016ef44 fixing some typos in MultisegmentWell_impl.hpp 2022-11-05 22:51:59 +01:00
Bård Skaflestad
1c0f1ad4d0
Merge pull request #4243 from blattms/drop-unused-LinearSolverRequireFullSparsityPattern
Remove ununsed ancient LinearSolverRequireFullSparsityPattern option.
2022-11-04 21:47:27 +01:00
Bård Skaflestad
6607121bcc
Merge pull request #4239 from GitPaean/well_state_change_num_segments
we do not copy SegmentState if the segment number changes
2022-11-04 21:22:52 +01:00
Bård Skaflestad
d095c8c287
Merge pull request #4242 from blattms/reactivate-use-gmres-flexible-solver
[bugfix] recover support for selecting GMRes as solver.
2022-11-04 21:18:30 +01:00
Markus Blatt
6f5931ca1b Remove ununsed ancient LinearSolverRequireFullSparsityPattern option.
It is unused since 2018 when we moved away from autodiff implementation.
2022-11-04 21:04:40 +01:00
Markus Blatt
2dc73a7c47 [bugfix] recover support for selecting GMRes as solver.
Previously, passing --use-gmres=true had now effect. Probably was lost
when introducing FlexibleSolver. With this change the FlexibleSolver
will now use GMRes if the option is true.

Closes #4240
2022-11-04 20:30:13 +01:00
Kai Bao
178d554d2c we do not copy SegmentState if the segment number changes 2022-11-04 16:38:57 +01:00
hnil
85bfa13c46 change std:cout to OPM::debug 2022-11-04 16:26:12 +01:00
Arne Morten Kvarving
35b66886a9 changed: pass the actual update value to relaxationFactorRate
this to avoid ussage of BVectorWell in interface. in preparation
for moving BVectorWell out of the well hierarchy.
2022-11-04 14:57:11 +01:00
Arne Morten Kvarving
26d9f18687 changed: move isPressureControlled to WellInterfaceGeneric
no typetag dependence. also no need for this to be virtual
2022-11-04 14:24:19 +01:00
Tong Dong Qiu
5dea01b9dc Remove unnecessary release() 2022-11-03 15:47:38 +01:00
Arne Morten Kvarving
0e2f7649e2 improve encapsulation 2022-11-03 15:47:38 +01:00
Arne Morten Kvarving
9ce8d1ceca adjust for ILU reorder removal 2022-11-03 15:47:38 +01:00
Tong Dong Qiu
5466fdd289 Add missing macro guards 2022-11-03 15:47:38 +01:00
Tong Dong Qiu
7e2a6800de Add test for rocalutionSolver 2022-11-03 15:47:32 +01:00
Bård Skaflestad
203ade29b8 Support Variable Length Connection Data in Distributed Wells
With the addition of tracer information in the data::Rates object
we must relax the assumption that the object is POD.  Switch to
using the Point2PointCommunicator protocol for gathering connection
solutions on the well's owner before transferring well solution
objects to the I/O rank.
2022-11-03 11:37:53 +01:00
Tor Harald Sandve
e33d7c6561 fix group switch logging 2022-11-03 09:40:58 +01:00
Tong Dong Qiu
ea73a1bf3c Add rocalutionSolver 2022-11-02 15:55:07 +01:00
Bård Skaflestad
a49f0bc8c2
Merge pull request #4189 from plgbrts/rwgsalt
removed RWGSALT from unsupported keywords list
2022-11-01 22:11:31 +01:00
hnil
a86bd1c585 removed assert in cprw for strictly positive diagonal well coupling 2022-11-01 21:39:55 +01:00
Bård Skaflestad
daf65f6472
Merge pull request #4225 from GitPaean/removing_number_segments
removing unused number_segments from MultisegmentWell
2022-11-01 15:24:22 +01:00
Kai Bao
cbb2e04b05 removing unused number_segments from MultisegmentWell 2022-11-01 14:42:23 +01:00
Bård Skaflestad
73466da197
Merge pull request #4224 from akva2/wellinterface_eval_rename_assemble
Rename WellinterfaceEval to WellAssemble
2022-11-01 13:51:08 +01:00
Arne Morten Kvarving
b700ec9b53 rename WellInterfaceEval to WellAssemble 2022-11-01 12:55:00 +01:00
Atgeirr Flø Rasmussen
e872cfb21d
Merge pull request #4194 from hnil/trueimpes_scaling_fix
- made heuristic scaling of trueimpes
2022-11-01 12:00:06 +01:00
Arne Morten Kvarving
411e4d07e7 WellInterfaceEval: separate from inheritance hierarcy 2022-11-01 11:45:15 +01:00
Arne Morten Kvarving
97367a1e95 move checkIndividualConstraints to WellConstraints 2022-11-01 08:57:02 +01:00
Arne Morten Kvarving
e884778e46 move activeInjectionConstraint to WellConstraints 2022-11-01 08:57:01 +01:00
Arne Morten Kvarving
06686702ea added: WellConstraints
this will hold the code for well constraints.
start by moving activeProductionConstraint to the new class
2022-11-01 08:56:41 +01:00
Bård Skaflestad
4c2ebbd445
Merge pull request #4223 from atgeirr/unhide-option
Unhide NewtonMaxIterations.
2022-10-31 17:48:02 +01:00
Atgeirr Flø Rasmussen
2192b3a86c Unhide NewtonMaxIterations. 2022-10-31 17:13:09 +01:00
Atgeirr Flø Rasmussen
16ca6a5ead
Merge pull request #4217 from blattms/Debian-fixes
Debian fixes (manpage and missing header include)
2022-10-31 16:29:54 +01:00
Bård Skaflestad
dea582d296
Merge pull request #4197 from akva2/well_group_constraints
Add class for well group constraints
2022-10-31 16:12:17 +01:00
Arne Morten Kvarving
796aa51e79 changed: move calculateBhpFromThp to WellBhpThpCalculator 2022-10-31 13:16:51 +01:00
Arne Morten Kvarving
0577516cfe changed: move updateThp to WellBhpThpCalculator 2022-10-31 13:16:16 +01:00
Arne Morten Kvarving
a4df84f785 fixed: guard against invalid dereference in getRho 2022-10-31 13:16:16 +01:00
Arne Morten Kvarving
e8152a1b65 changed: tidy up computeBhpAtThpLimitProdWithAlq interface
put deferred_logger at the end of the parameter list.
similar to the rest of this family of methods
2022-10-31 13:16:16 +01:00
Arne Morten Kvarving
42fff132b0 changed: drop wrapper MultisegmentWellGeneric::computeBhpAtThpLimitProdWithAlq 2022-10-31 13:16:16 +01:00
Arne Morten Kvarving
db05f1d73f changed: drop wrapper StandardWellGeneric::computeBhpAtThpLimitProdWithAlq 2022-10-31 13:16:15 +01:00