This commit switches to constructing Box instances from a GridDims
and two call-back functions instead of taking an EclipseGrid
directly. The two call-back functions are a predicate for active
cells and a translation from Cartesian to active cell indices
respectively.
This is intended to simplify working with nested boxes, such as
those that occur for local grid refinement.
This commit switches the Cartesian -> IJK decomposition in GridDims
from K->J->I into the I->J->K order. The latter is simpler.
While here, also consistently use 'std::size_t' instead of 'size_t'.
The constructor did implicitly assume that no cell in a numerical
aquifer would be declared inactive in ACTNUM, and this restriction
still applies. Moving numerical aquifer property and connection
processing into the constructor body enables using existing member
functions for non-neighbouring connections and removes a branch that
obscured the fact that we should have ACTNUM be as close to
finalised as possible before creating analytic aquifer connections.
Commit eca858335 introduced a more comprehensive way of forming the
initial ACTNUM array used when constructing the EclipseGrid from a
corner-point description. This commit applies that strategy to all
known grid types. As an additional benefit this will also cover one
special case that was not handled and would effectively discard the
work done in the generalised initial ACTNUM construction.
Add unit tests to exercise the ACTNUM handling for other grid types.
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
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.
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.
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.
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.
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.
```
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!
```
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!
```