Commit Graph

14257 Commits

Author SHA1 Message Date
Bård Skaflestad
ec87ad1f61 Fix MSIM UDQ Configuration Lookup
The MSIM 'report_step' is a one-based index so we must subtract
one before looking up the pertinent Schedule information.
2023-06-28 13:42:16 +02:00
Bård Skaflestad
d6ed5f754c Merge pull request #3581 from vkip/constexpr_parseritem_defaults
Let int and float parser items have constexpr default values
2023-06-28 13:35:59 +02:00
Vegard Kippe
68173b49a4 Let int and float parser items have constexpr default values 2023-06-27 20:13:04 +02:00
Bård Skaflestad
5709708016 Merge pull request #3559 from bska/wbp-compute-values
Reimplement WBPn Calculation Procedure
2023-06-26 15:24:23 +02:00
Bård Skaflestad
d9cfd1288a Reimplement WBPn Calculation Procedure
This commit implements the WPAVE keyword and its associate WBPn
well level report quantities.  We support all valid settings of
WPAVE and WWPAVE.  The various weighted averages are accumulated
through compensated summation of both the numerator and denominator
terms for the inner block, the direct/immediate level 1 neighbours,
and the diagonal level 2 neighbours.  We combine those contributions
to the WBP, WBP4, WBP5, and WBP9 terms when we "commit" the
contributions (Accumulator::commitContributions()), per connection
for values weighted by the connection transmissibility factor, and
per well for values weighted by pore volumes.

We distinguish OPEN from ALL connections through callback functions
in the implementation of accumulateLocalContributions() and the per
connection weighting terms are provided as another set of callback
functions depending on the value of the inner block weighting factor
F1.

Depth correction (NONE, WELL, or RES) is affected through a separate
set of callback functions used in the implementation of
'connectionPressureOffset'.

We discover source locations in a two-step process.  At WBPn
calculation construction time, we exclude only those cells that are
outside the model's dimensions.  The user is then expected to call
member function pruneInactiveWBPCells(), typically at the
CalculatorCollection level, at a later time in order to prune
inactive cells.  This two-step split is necessary because we do not
have a complete global view of the model's active cells in a
parallel run.  It is very possible that the WBPn calculation on one
rank will require source values from another rank and that begets
this extra caution.

The user must call inferBlockAveragePressures() to compute the WBPn
values.  Once completed, the result values may be extracted by
calling member function averagePressures().  We expect that the user
will provide a complete set of up-to-date source values when calling
this member function, both at the reservoir and the well connection
levels.
2023-06-22 16:46:54 +02:00
Bård Skaflestad
d06dff1a83 Add Input Value Santity Checking to WPAVE Keyword Handler
In particular, the inner block weighting factor F1 must not exceed
the value 1.0 and the CTF-vs-PV contribution weighting factor F2
must not be less than 0.0 or greater than 1.0.

Stop input parsing if either of these two conditions are violated.
2023-06-22 16:46:54 +02:00
Bård Skaflestad
c6d4a635e3 Merge pull request #3577 from GitPaean/fixing_winjmult
separating the WINJMULT for well and connections
2023-06-22 12:53:27 +02:00
Kai Bao
9572d5ecf3 addressing the reviewing comments for PR #3577 2023-06-22 11:59:45 +02:00
Arne Morten Kvarving
f8ebecd3b1 Merge pull request #3569 from bska/fix-hist-rates-sumry-output
Don't Generate History Rates for Shut/Stopped Wells
2023-06-21 14:46:11 +02:00
Bård Skaflestad
a4d2674c6d Merge pull request #3579 from bska/wbp-reformat-pavg
Reformat PAvg Class
2023-06-21 14:36:48 +02:00
Bård Skaflestad
53f946e776 Don't Generate History Rates for Shut/Stopped Wells
The *_history() helper functions assumed that all wells would be
flowing.  This is an incorrect assumption and would lead to, e.g.,
field-level observed rates being non-zero even if all wells were
stopped/shut.

This commit adds a check for non-flowing wells, and omits flow rate
contributions in that case.
2023-06-21 13:54:47 +02:00
Bård Skaflestad
f8d9f74d91 Reformat PAvg Class
Mostly for readability.  While here, also switch to using compiled
item names instead of raw strings to access the DeckItems which
constitute the WPAVE and WWPAVE keywords.
2023-06-21 13:46:28 +02:00
Bård Skaflestad
7614a739ca Merge pull request #3578 from akva2/extnetwork_serialization_test
ExtNetwork: add serialization test
2023-06-21 13:10:31 +02:00
Kai Bao
68e586bf7a separating the WINJMULT for well and connections
with more testing, it looks like when multiple records are entered. The
records with WREV mode and records with CIRR and CREV modes work
differently in term of overwriting the previous records. So it is
necessary to store them separately.
2023-06-21 11:38:31 +02:00
Arne Morten Kvarving
68ffa2ea1f add serialization test for Network::ExtNetwork 2023-06-21 10:48:39 +02:00
Arne Morten Kvarving
75bd0e915e ExtNetwork: use a non-default instance in serializationTestObject 2023-06-21 10:45:30 +02:00
Arne Morten Kvarving
74acf7080b implement ExtNetwork::operator== 2023-06-21 10:45:18 +02:00
Bård Skaflestad
b7617f9469 Merge pull request #3575 from bska/fix-narrowing
Don't Narrow String Literal to Bool
2023-06-16 17:09:04 +02:00
Bård Skaflestad
35117aa037 Don't Narrow String Literal to Bool
This isn't portable.
2023-06-16 15:54:18 +02:00
Bård Skaflestad
dda3effdb3 Merge pull request #3570 from svenn-t/ppcwmax
Implementation of PPCWMAX
2023-06-16 15:04:03 +02:00
Svenn Tveit
a008c303ab Removed unecessary code 2023-06-16 11:34:34 +02:00
Svenn Tveit
32692b750e Added actual values to serialization test 2023-06-16 11:33:52 +02:00
Bård Skaflestad
30c7110720 Merge pull request #3542 from totto82/wagHysteresis
Wag hysteresis
2023-06-15 16:41:05 +02:00
Svenn Tveit
af3f44423b Changed from std::tuple to std::pair 2023-06-15 14:59:42 +02:00
Tor Harald Sandve
c270dc2ff3 Minor clean-up and fixes of the WAG hysteresis model 2023-06-15 12:31:27 +02:00
Svenn Tveit
89f0b2c31e Changes in docstring and removed include 2023-06-15 12:26:43 +02:00
Ove Sævareid
34a9d9c949 Some support for WAG hysteresis (material). 2023-06-15 11:22:44 +02:00
Ove Sævareid
0fc0b6f4fa Some support for WAG hysteresis (input). 2023-06-15 11:18:58 +02:00
Bård Skaflestad
fdfbecc742 Merge pull request #3572 from hnil/ecldefault
-- added function need to test solver without multiplexer
2023-06-14 16:26:44 +02:00
hnil
3b06ff2757 -- added function need to test solver without multiplexer 2023-06-14 14:37:07 +02:00
Bård Skaflestad
bca989343c Merge pull request #3161 from GitPaean/support_winjmult
adding the parsing support for keyword WINJMULT
2023-06-14 14:32:00 +02:00
Bård Skaflestad
b7e4f28b95 Merge pull request #3571 from bska/fix-warnings
Fix A Couple of Compiler and Static Code Analysis Warnings
2023-06-14 14:25:28 +02:00
Bård Skaflestad
e6590f2169 Fix A Couple of Compiler and Static Code Analysis Warnings
In particular

  * Tag a single argument constructor as 'explicit',
  * Remove an unused private function
  * Fix mismatched tags (struct vs. class) in forward declaration
  * Return 'false' in an impossible updateHyst() case

While here, also use a real UnitSystem object instead of creating
a METRIC system just to infer unit strings.
2023-06-14 13:31:41 +02:00
Bård Skaflestad
f46b90f5db Merge pull request #3568 from bska/fix-udq-assign-well-level
Don't Run ASSIGN on Every Report Step
2023-06-14 11:59:22 +02:00
Kai Bao
3b731a3da2 return true for handleWINJMULT() when the mode is changed 2023-06-14 11:56:49 +02:00
Bård Skaflestad
250c8b7a1c Merge pull request #3458 from hnil/changed_hyst
Changed hyst
2023-06-14 10:34:34 +02:00
Bård Skaflestad
4c2617f537 Don't Run ASSIGN on Every Report Step
Commit 5a060910a distinguished ASSIGN from DEFINE at the field
level, but did not make the same distinction at the well or group
levels.  Passing 'report_step' instead of assign.report_step() as an
argument to UDQState::assign() means we'd be running every ASSIGN
operation on every report step which would reset the state.  That's
a bug if the model defines some sort of cumulative UDQ at the well
or group levels.
2023-06-14 09:46:10 +02:00
Bård Skaflestad
c33b94ca3a Default UDQ Assignments to All Wells in Model
An assignment of the form

    ASSIGN WUPPERTAL 354.572 /

should create a UDQ set of size equal to the number of wells in
the model, not just the wells already flowing-especially if the
assignment happens on the very first report step before any wells
are flowing.
2023-06-14 09:46:10 +02:00
hnil
12da4dbe02 --changed for bska comments. All tests ok locally 2023-06-14 09:31:20 +02:00
Svenn Tveit
de814bc577 Apply PPCWMAX in SWATINIT calculations.
Note that re-calculation of initial water saturation (after PPCWMAX is applied) is currently done in opm-simulators.
2023-06-14 08:33:51 +02:00
Svenn Tveit
5e6dfc1f1a Add Ppcwmax to serialization test 2023-06-14 08:33:51 +02:00
Svenn Tveit
ccc010c8d3 Internalize PPCWMAX as vector of structs 2023-06-14 08:33:51 +02:00
Markus Blatt
90497b745b Merge pull request #3556 from akva2/multflt_grid_and_edit
fixed: properly combine MULTFLT from GRID and EDIT
2023-06-14 07:16:02 +02:00
Bård Skaflestad
809c9be8dd Merge pull request #3566 from GitPaean/throw_multiple_segment_abs
we do not support entering multiple segments with ABS type in keyword WELSEGS.
2023-06-13 17:02:34 +02:00
Kai Bao
edd762c084 cleaning up the implementation related to WINJMULT 2023-06-13 15:10:56 +02:00
hnil
b50cef1af2 added fix based on review 2023-06-13 14:39:42 +02:00
hnil
f8d652f758 - fixed missing return after adding change 2023-06-13 14:39:42 +02:00
hnil
d0422bfc74 -- added bool return value of hysteresis update.
-- this make it possible to localy update intensive quanities if something changed.
2023-06-13 14:39:42 +02:00
Kai Bao
30f0a358f1 we do not support entering multiple segments with ABS type
in keyword WELSEGS.

Before we fix it, we throw here.
2023-06-13 10:44:09 +02:00
Kai Bao
759f0b8449 revising the function handleWINJMULT a little bit 2023-06-12 10:42:15 +02:00