Commit Graph

9404 Commits

Author SHA1 Message Date
Joakim Hove
2bc338e87f Add functions converting integer group control modes to enum 2020-10-20 22:44:01 +02:00
Joakim Hove
b72460f0c8 Remove unused members from rst header class 2020-10-20 22:43:49 +02:00
Joakim Hove
2289ba165b Update SummaryState in UDQContext 2020-10-20 22:22:21 +02:00
Joakim Hove
313f576e37 Ensure that UDQDefine::eval returns nodes with correct name 2020-10-20 20:45:59 +02:00
Joakim Hove
5ff65747f3 Rename summary variable in test 2020-10-20 20:02:19 +02:00
Joakim Hove
ab43f54076 Export undefined value from UDQState 2020-10-20 19:44:15 +02:00
Joakim Hove
bf2f049a4b
Merge pull request #2031 from bska/schedule-apply-wellpi
Apply WELPI CTF Scaling at Schedule Level
2020-10-20 12:05:05 +02:00
Bård Skaflestad
ab51949909 Address Code Review Comments
Use more complete object name and fix up a comment.
2020-10-20 11:14:03 +02:00
Joakim Hove
158c7376d7 Add test for MULTIREG and COPYREG keywords 2020-10-20 08:22:42 +02:00
Joakim Hove
eb7cb2f94a Bug in COPYEREG keyword - look up wrong item 2020-10-20 08:22:22 +02:00
Bård Skaflestad
91bb168ee5 Fix Shadowing Type Alias
The local 'WellPI' type alias shadowed the name of the test.
2020-10-19 21:16:55 +02:00
Bård Skaflestad
5b4a1c0bad Remove WELL_CONNECTIONS_UPDATED Event
With the introduction of Schedule::applyWellProdIndexScaling(), this
special-purpose event type is no longer needed and only causes
confusion.
2020-10-19 19:16:17 +02:00
Bård Skaflestad
26ef5d01a2 Apply WELPI CTF Scaling at Schedule Level
This commit adds a new member function

  applyWellProdIndexScaling(well_name, report_step, scalingFactor)

which applies WELPI-based CTF scaling (by scalingFactor) for all
pertinent report steps from 'report_step' and until the end of the
simulation run.  We use the 'scalingApplicable' array to communicate
connection eligibility between report steps and only apply the
scaling if the internal connections pointers differ between report
steps.
2020-10-19 19:16:16 +02:00
Bård Skaflestad
cfa5dd80cc Enable Applying WELPI CTF Scaling Across Time Direction
This commit adds a new in/out parameter, scalingApplicable, to the
applyWellProdIndexScaling functions.  This parameter carries time
(history) information on whether or not a particular connection is
eligible for WELPI-based CTF scaling.  Entries are marked ineligible
(false) and left untouched on subsequent calls if the corresponding
connection is ineligible at any point--e.g., as a result of new
COMPDAT entries.

This ability enables implementing WELPI CTF scaling at the Schedule
level which is the only level that has sufficient time information
to identify all the unique Well/WellConnections object combinations.
2020-10-19 19:16:15 +02:00
Bård Skaflestad
338a48708a Add Special Predicate to Check if Two Wells Have Same Connections
This commit adds a new special purpose predicate member function

    bool Well::hasSameConnectionsPointers

which checks if the internal WellConnections pointers of two Well
objects (*this and the input argument) point to the same object.
This, in turn, enables identifying when to apply dynamic WELPI CTF
scaling across the time direction the internalized connection
information.
2020-10-19 19:16:15 +02:00
Bård Skaflestad
dabf988aa7 Split WELPI Application Into Two Parts
First part, implemented in a new member function

    Well::getWellPIScalingFactor

calculates a CTF scaling factor from stored WELPI information and a
dynamically calculated well-level PI value.  The second part, using
the original name applyWellProdIndexScaling, applies an externally
calculate CTF scaling factor to all eligble connections.

This is needed to enable applying multiple scalings across the time
direction.  Update unit tests accordingly.
2020-10-19 19:16:12 +02:00
Joakim Hove
452c222f71
Merge pull request #2018 from bska/preferred-is-injected
Use Injected Phase as Preferred Phase for Injectors
2020-10-19 18:03:52 +02:00
Joakim Hove
d545359395 Use optional - and default to self - for reinj and voidage groups 2020-10-19 17:07:00 +02:00
Bård Skaflestad
641b9fb4b1
Merge pull request #2029 from joakim-hove/udq-function-rename
Renamed UDQ functions: MIN -> UDQ_MIN and MAX -> UDQ_MAX
2020-10-19 14:28:44 +02:00
Joakim Hove
63e0eb385a Renamed UDQ functions: MIN -> UDQ_MIN and MAX -> UDQ_MAX 2020-10-19 13:09:40 +02:00
Bård Skaflestad
3eef45e87d Capture Preferred Phase When Processing WELPI Keyword
This is to handle the case of an injector changing its injected (and
therefore preferred) phase (e.g., in WCONINJE or WCONINJH) at the
same report step as a WELPI CTF rescaling, but logically after the
WELPI action is applied.

For instance, this happens in the following setup:

    WCONINJH
       INJ2   WATER   OPEN  5500 /
    /

    DATES
      1 'JAN' 2020 /
    /

    WELPI
      'INJ2' 0.1E5 /
    /

    WCONINJH
       INJ2   GAS   OPEN   701627 /
    /

    DATES
      1 'FEB' 2020 /
    /

In this case, the WELPI for 'INJ2' is supposed to be interpreted as
the water-phase PI (preferred phase is 'WATER' when we read WELPI),
but since the injecting phase is reset to 'GAS' at the same report
step we risk misinterpreting the PI as pertaining to the 'GAS' phase
when calculating the well's effective/dynamic PI in the simulator if
we just use Well::getPreferredPhase().

Switch the the well's input PI from an optional<double> to an
optional<struct> that captures both the input PI value (SI units)
and the preferred phase when processing the WELPI data.  Provide a
way to query that information from the simulator and update unit
tests accordingly.
2020-10-19 11:09:00 +02:00
Bård Skaflestad
f84858279f WELPI: Don't Inadvertently Overwrite Scaling Eligiblity
Since the Well stores a pointer to its connections, rather than the
connections themselves, we must take care not change the existing
state of the connections' WELPI eligibility flag.  Do the update
check on a copy of the connections instead of the real connections.

Pointy Hat: [at]bska
2020-10-19 11:08:59 +02:00
Bård Skaflestad
f718cc1adc Injectors: Ensure "Preferred" Phase is "Injected" Phase
This needed to correctly interpret WELPI values when wells switch
from injecting Water to injecting Gas or the other way around.
2020-10-19 11:08:59 +02:00
Arne Morten Kvarving
ebc562887c
Merge pull request #2028 from atgeirr/silence-warning
Silence shadowing warnings.
2020-10-19 10:32:52 +02:00
Atgeirr Flø Rasmussen
fd59f1685a Silence shadowing warnings. 2020-10-19 09:06:38 +02:00
Joakim Hove
fd1cc74f74
Merge pull request #2026 from joakim-hove/multflt-messages
Message limits for MULTFLT and Tracer
2020-10-16 16:02:09 +02:00
Joakim Hove
b05680f76b
Merge pull request #2023 from joakim-hove/alq-dimension
Alq dimension
2020-10-16 14:27:43 +02:00
Joakim Hove
64165f072a Rename summary function -> glir 2020-10-16 12:16:33 +02:00
Joakim Hove
8ffc4b85b0 Add a comment warning in Summary evaluation of WGLIR 2020-10-16 12:16:33 +02:00
Joakim Hove
134834cefa Pass VFP ALQ type to enable unit conversion for ALQ values 2020-10-16 12:16:33 +02:00
Joakim Hove
3e02a48c10 Convert VFP dimensions without parsing dimension string 2020-10-16 12:16:33 +02:00
Joakim Hove
2644e3bd78 Add test (safety belt) for VFP dimension conversion 2020-10-16 12:16:33 +02:00
Joakim Hove
d004bfdc76
Merge pull request #2025 from joakim-hove/udq-allow-missing-well
Udq allow missing well
2020-10-16 12:16:01 +02:00
Joakim Hove
c696cee549 Limit the number of messages emitted while loading tracer tables 2020-10-16 11:27:33 +02:00
Joakim Hove
0587e11112 Limit the number of MULTFLT messages 2020-10-16 11:27:33 +02:00
Joakim Hove
9c49468f46 Create small utility class InfoLogger 2020-10-16 11:27:33 +02:00
Joakim Hove
d9f260dd51 Add utility KeywordLocation::format() 2020-10-16 11:27:33 +02:00
Joakim Hove
9ea86a9bbc Remove unused function 2020-10-16 11:27:33 +02:00
Joakim Hove
451eefbda5 UDQContext - differentiate between missing well and invalid variable 2020-10-16 11:24:21 +02:00
Joakim Hove
c11d2eee37
Merge pull request #2024 from joakim-hove/summary-state-has-well-var
Add SummaryState functions has_well_var() and has_group_var()
2020-10-16 11:23:12 +02:00
Joakim Hove
78c07a4e2a
Merge pull request #2022 from joakim-hove/fmwia-fixup
Count of abondoned wells should handle both STOP and SHUT
2020-10-16 11:22:37 +02:00
Joakim Hove
0cdfdca0f7 Add SummaryState functions has_well_var() and has_group_var() 2020-10-15 13:01:52 +02:00
Joakim Hove
a2f72f0953 Count of abondoned wells should handle both STOP and SHUT 2020-10-14 16:08:11 +02:00
Joakim Hove
6e82f3cb7a
Merge pull request #2021 from joakim-hove/no-wells-message
No wells message
2020-10-14 14:23:24 +02:00
Joakim Hove
7f8578ea96
Merge pull request #2020 from joakim-hove/fmwia
Fmwia
2020-10-14 14:22:38 +02:00
Joakim Hove
21d44c09e0
Merge pull request #2019 from joakim-hove/vfpprod-dimension
Dimension string does not accept space
2020-10-14 12:15:49 +02:00
Joakim Hove
e3959c5fa1 Implement number of abondoned injectors: FMWIA 2020-10-14 08:43:03 +02:00
Joakim Hove
2d036144cc Raise OpmInputError for unbalanced quotes 2020-10-14 08:40:10 +02:00
Joakim Hove
2ebc15e8d4 Fix message format for invalid wellname pattern 2020-10-14 08:15:07 +02:00
Joakim Hove
dd34f2d831 Maintain whether a well has ever injected 2020-10-14 00:39:48 +02:00