Commit Graph

11804 Commits

Author SHA1 Message Date
Bård Skaflestad
254b2e2862 Extract Common Base Class For Flat Tables With Record Copying
This commit introduces a new helper template class,

    FlatTableWithCopy<RecordType>

which wraps a vector<RecordType>, provides constructors from
DeckKeyword and initializer_list<RecordType> and handles copying
tables for all-defaulted records.

We reimplement the PVTW, DENSITY, and GRAVITY tables in terms of
this helper class to reduce duplication.  If the copy behaviour is
generally useful/needed we expect to replace the existing FlatTable
mechanism with the new helper.

Suggested by: Markus Blatt
2022-06-24 12:56:08 +02:00
Markus Blatt
b4eb8fbd4f OrderedMap: Remove template parameter for key type.
It is only used with std::string anyway.
2022-06-24 09:32:10 +02:00
Bård Skaflestad
d35abfddb6 Implement Defaulted Table Copy for DENSITY and GRAVITY
Use the same targeted strategy as for PVTW.
2022-06-23 16:04:50 +02:00
Bård Skaflestad
54ba23d71b Implement Defaulted Table Copy for PVTO and PVTG
The existing mechanism did not handle this case sufficiently well.
It is likely that we will have to polish this approach, but for now
use an explicit table copy to ensure that we have structurally
correct backing table data.
2022-06-23 16:04:50 +02:00
Bård Skaflestad
a066d2b95f Implement Defaulted Table Copy for PVDO and PVDG 2022-06-23 16:04:50 +02:00
Bård Skaflestad
433cc4d649 Treat All-Defaulted PVTW Record as Copy of Previous
A simulation model may choose to give PVTW data as

    PVTW
      1.0 1.0 1.0e-5 0.2 0.0 /
      /  -- record 2 (copied from record 1)

if, for instance, the oil and/or gas tables are different in regions
1 and 2, but the water is the same.  In this case we must properly
copy record 1 into record 2 and essentially recreate the table.

To this end, decouple the 'PvtwTable' from the 'FlatTable' machinery
and make the former into an independent type containing vector<>
instead of inheriting from vector<>.  Implement the default->copy
behaviour in the new PvtwTable::PvtwTable(const DeckKeyword&)
constructor.
2022-06-23 16:04:50 +02:00
Markus Blatt
00ace58e6c
Merge pull request #3052 from bska/dont-assume-monotonic-wlist-position-on-restart
Don't Assume Increasing WLIST Position In Restart Files
2022-06-23 15:25:31 +02:00
Bård Skaflestad
042830e860 Don't Assume Increasing WLIST Position In Restart Files
The well list positions for individual wells (i.e,, IWLS) need not,
and typically are not, strictly increasing in the restart files.
Therefore we must only 'resize()' the well name vectors if the
'well_order' is strictly larger than the current size.  Otherwise,
we lose information about which wells are in which well lists.
2022-06-23 10:38:23 +02:00
Atgeirr Flø Rasmussen
5495266115
Merge pull request #3056 from bska/extract-single-record-construction-helper
Extract Helper for Single Table Record Construction
2022-06-23 09:59:20 +02:00
Bård Skaflestad
4d9387ee23 Extract Helper for Single Table Record Construction
Use case is table copy for PVTW.
2022-06-22 16:50:15 +02:00
Bård Skaflestad
531803eb0a
Merge pull request #3061 from ElyesAhmed/alugrid
assert if Alugrid can be initialized from Deck: check format and geometry
2022-06-22 16:36:41 +02:00
Atgeirr Flø Rasmussen
c07357cdc3
Merge pull request #3060 from bska/xeff-smry
Add Well and Group Level Efficiency Factor Summary Vectors
2022-06-22 13:26:51 +02:00
Bård Skaflestad
0a287ca914 Add Well and Group Level Efficiency Factor Summary Vectors
This commit adds support for the GEFF, WEFF, and WEFFG summary
vectors that report the efficiency factors at the well (WEFAC) and
group (GEFAC) levels.  WEFFG additionally accounts for efficiency
factors in a well's superior groups in the group tree.
2022-06-22 11:52:58 +02:00
Bård Skaflestad
7b31522fdd
Merge pull request #3062 from blattms/import-error-fault
Improves error messages on faults when additional chars are used.
2022-06-22 11:48:00 +02:00
Bård Skaflestad
41d0b21463
Merge pull request #3055 from blattms/improve-error-region-op-multz
Improve error message for region operations on multz
2022-06-22 11:47:27 +02:00
Markus Blatt
9e1aaca9e9 Improves error messages on faults when additional chars are used.
Faults are stored in an OrderedMap with the full string used during
construction even if that is longer than 8 characters. When later
these faults are e.g. modified whith MULTFLT using only the first 8
characters, the only message the user got was

```
An error occurred while creating the reservoir properties
Internal error: Key not found:

Unrecoverable errors while loading input: Key not found
```

With this patch we at least add some more context to the error
message:

```
Error:
An error occurred while creating the reservoir properties
Internal error: [/../EclipseState.cpp:362] Could not set fault transmissibility multiplier 5.23166e-10 for fault CFN2_05t: Key ABCD_05q not found. Similar entries are ABCD_05q_extended_width, UABCD_05q_extended_width.
```
2022-06-22 11:35:40 +02:00
Elyes Ahmed
04736dcbd0 removing methods for specific grid 2022-06-22 11:25:31 +02:00
Markus Blatt
6caebad329 Use OpmInputError instead of std::logic_error.
Message now becomes:
```
Error: Problem with keyword MULTIREG
In /path/to/file.inc line 3
region operation on 3D field MULTZ with global storage is not implemented!
```
2022-06-21 16:38:05 +02:00
Markus Blatt
a4576d253d Add operation name to error. 2022-06-21 15:42:08 +02:00
Markus Blatt
8611f664cb Improve error message for region operations on MULTZ.
MULTZ is the only keyword that is stored in global representation
(i.e. with values for inactive cells, too) to allow the "PINCH ALL"
processing. This produced errors like:

```
Error:
An error occurred while creating the reservoir properties
Internal error: Region operations on 3D fields with global storage is
not implemented
```

With this change the error message has more information for the user
and might help to work around it:

```
Error:
An error occurred while creating the reservoir properties
Internal error: In file /path/to/file.inc line 3: MULTIREG region operation on 3D field MULTZ with global storage is not implemented!
```
2022-06-21 15:42:08 +02:00
Elyes Ahmed
d0a1101bc8 assert if Alugrid can initialized from Deck: check format and geometry 2022-06-21 14:49:13 +02:00
Bård Skaflestad
4d76351111
Merge pull request #3049 from atgeirr/fix-actnum-equals-manipulation
Fix ACTNUM manipulation with EQUALS
2022-06-21 09:59:33 +02:00
Atgeirr Flø Rasmussen
a97df7c889 Use BOOST_CHECK_EQUAL_COLLECTIONS. 2022-06-21 09:32:31 +02:00
Bård Skaflestad
0d6dc717d3
Merge pull request #3059 from tskille/fix_esmry_load
Prevent data vector loading twice
2022-06-20 20:49:29 +02:00
Atgeirr Flø Rasmussen
02c06e9ae3 Add unit tests for new ACTNUM initialization features. 2022-06-20 17:57:25 +02:00
Atgeirr Flø Rasmussen
90d0b6479a Make new ACTNUM initialization unconditional, simplify. 2022-06-20 17:56:56 +02:00
Atgeirr Flø Rasmussen
0dab2aaf2b If no ACTNUM, default to all active in FieldProps. 2022-06-20 17:56:08 +02:00
Torbjørn Skille
f9bbf34b9a Prevent data vector loading twice
if same vector is defined twice in the vector list
2022-06-20 14:24:15 +02:00
Atgeirr Flø Rasmussen
e568d14a87 Future-proof checking for BOX-related keywords. 2022-06-17 13:02:42 +02:00
Atgeirr Flø Rasmussen
86fe7bbc3f Add moved header to public header list. 2022-06-17 13:02:42 +02:00
Atgeirr Flø Rasmussen
bc966fa32a Get actnum vector as it exists in FieldProps without modification. 2022-06-17 13:02:42 +02:00
Atgeirr Flø Rasmussen
eca8583358 Use new FieldProps constructor to get ACTNUM. 2022-06-17 13:02:42 +02:00
Atgeirr Flø Rasmussen
f5a2f6de74 Add new EclipseGrid contructor with no geometry or actnum info. 2022-06-17 13:02:42 +02:00
Atgeirr Flø Rasmussen
29954fd91f Add new constructor to only find correct ACTNUM. 2022-06-17 13:02:42 +02:00
Bård Skaflestad
194a599303
Merge pull request #3054 from hakonhagland/krnum
Fix typo in KRNUM json file
2022-06-17 12:52:04 +02:00
Håkon Hægland
7867bcb5fd Fix some more typos in keyword JSON files 2022-06-17 10:40:04 +02:00
Håkon Hægland
412a11d92f Fix typo in KRNUM json file 2022-06-16 23:36:23 +02:00
Tor Harald Sandve
fae7b5ccfc
Merge pull request #2999 from totto82/rsrvinj
implement item 10 WCONINJE
2022-06-16 08:30:20 +02:00
Bård Skaflestad
dd528b74dd
Merge pull request #3051 from Tongdongq/add-header-functional
Include header to compile with g++-8.4.0
2022-06-15 11:57:33 +02:00
Tong Dong Qiu
a058253ece Include header to compile with g++-8.4.0 2022-06-15 11:13:55 +02:00
Bård Skaflestad
d42d437e17
Merge pull request #3048 from goncalvesmachadoc/patch-6
Output FOE
2022-06-13 23:06:41 +02:00
Bård Skaflestad
f5b49a19fe
Merge pull request #3047 from akva2/improve_error_logging_tableID
changed: pass table ID into SimpleTable constructors
2022-06-13 20:16:12 +02:00
Arne Morten Kvarving
0d1075daee changed: pass table ID into SimpleTable constructors
use this to improve logging in case of failure
2022-06-13 15:48:57 +02:00
Cintia Goncalves Machado
43dafbc995
Output FOE
Keyword is implemented, but missing in Summary.cpp. Small fix also to be pushed in opm-simulators.
2022-06-13 15:20:33 +02:00
Arne Morten Kvarving
e3f97e45d9
Merge pull request #3045 from akva2/improve_error_logging
Improve error logging
2022-06-13 15:11:02 +02:00
Arne Morten Kvarving
050540525f changed: log keyword location when parsing a table failed 2022-06-13 14:59:05 +02:00
Markus Blatt
4a51cfb707
Merge pull request #3046 from akva2/janitoring
changed: use modern include file path
2022-06-13 14:26:10 +02:00
Arne Morten Kvarving
3af1d464eb changed: avoid duplicating code 2022-06-13 13:30:33 +02:00
Arne Morten Kvarving
964f028413 changed: use modern include file path
to avoid deprecation warnings
2022-06-13 12:33:26 +02:00
Bård Skaflestad
d032078634
Merge pull request #3044 from tskille/erft_api_change
API change for I/O classes ERft and ERst
2022-06-10 16:07:09 +02:00