Commit Graph

6087 Commits

Author SHA1 Message Date
Joakim Hove
ad9448c87d Add invalid size zero in WindowArray and WindowMatrix 2019-07-29 14:09:07 +02:00
Joakim Hove
3655aeb579
Merge pull request #910 from stefoss23/add_keywords_1
Added keywords beginning w/ A
2019-07-27 08:19:09 +02:00
Steinar Foss
57c27d603a added keywords: ALPOLADS, ALSURFAD, ALSURFST. 2019-07-26 18:01:59 +02:00
Steinar Foss
d35a321214 added keywords ALKALINE, ALKROCK. 2019-07-26 16:47:18 +02:00
Joakim Hove
c7532005b2
Merge pull request #905 from joakim-hove/handle-seqindex-private
Make GroupTree::handleSeqIndex() private
2019-07-26 16:40:37 +02:00
Steinar Foss
c24e220626 added keywords: ADDZCORN, AITSOFF, ALKADS. 2019-07-26 16:30:22 +02:00
Steinar Foss
bb8cfc2e60 added keywords: ACTIONR, ACTIONW, ACTPARAM. 2019-07-26 14:22:59 +02:00
Joakim Hove
a304f560d5
Merge pull request #907 from stefoss23/add_keywords_0
added keywork ACTIONG.
2019-07-26 13:59:46 +02:00
Steinar Foss
1073ef3d55 added keywork ACTIONG. 2019-07-26 12:21:09 +02:00
Joakim Hove
787d9d3948 Refactor sequende index mapping in GroupTree 2019-07-26 08:50:53 +02:00
Joakim Hove
8873eb29e4
Merge pull request #906 from joakim-hove/private-iter
Make GroupTree iterators private
2019-07-26 08:45:32 +02:00
Joakim Hove
03b2a5c946 Make GroupTree iterators private 2019-07-26 07:47:54 +02:00
Bård Skaflestad
729948b712
Merge pull request #849 from bska/initfile-sfunc-eps
INIT File Saturation Function End-Point Scaling
2019-07-25 19:47:56 -05:00
Bård Skaflestad
d9fea19c5b INIT: Don't Write Empty TRANNC Vector
This commit makes the TRANNC INIT file output conditional on the vector
being non-empty.  Previously we would alway output that vector even if
it did not contain any non-neighbouring connections.
2019-07-25 07:15:15 +02:00
Bård Skaflestad
7639dd7e5f INIT/EPS: Output Sentinel Value if Input Defaulted
This commit extends the previous support for writing scaled end-points
(and scaled function values) to outputting the sentinel value -1.0e+20
for those items (cell values) that have been defaulted in the input.
This operation does not apply if the simulation run specifies FILLEPS,
in which case we always output the actual scaled end-points, whether
taken from explicit assignment or derived from table values.

The overall approach is to pass an additional flag (needDflt) to
function writeDoubleCellProperties(), which then dispatches to two new
helper functions

    writeCellPropertiesWithDefaultFlag()
    writeCellPropertiesValuesOnly()

The former then expects a three-argument callable (lambda), the second
of which is the compressed version of the Property<T>::wasDefaulted()
value.  This is then used to infer for which elements to output the
sentinel value.  The ValuesOnly() property writer is the previous
version of writeDoubleCellProperties() and is mainly used to support the
FILLEPS operation.
2019-07-25 07:08:52 +02:00
Bård Skaflestad
43a5a153b1 INIT: Activate EPS-Related Flags in LOGIHEAD
This commit ensures that we set the correct end-point scaling flags in
LOGIHEAD (items 17..20, zero-based indices 16..19) according to the
run's requested end-point scaling behaviour.  This in turn enables the
ResInsight postprocessor to distinguish between scaled and unscaled
saturation function curves in its "RelPerm" plot window.

Note that in order to set the correct flags and to not impact the
restart files, we've elected to copy the CreateLogiHead function here.
This incurs non-zero technical debt.  We should seek to reunify the two
implementations to the extent possible.
2019-07-25 04:17:58 +02:00
Bård Skaflestad
a06a49b4d8 Refactor EPS Vector Collection to New Helper Class
This commit extracts the hard-coded list of end-point scaling vectors
out to a new helper class, ScalingVectors, and makes the specific list
dependent on the run's active phases.  This means, in particular, that
we won't output water vectors unless water is an active phase and
similarly for gas and oil.

The added logic of active phases only was complicated enough to warrant
an encapsulating scope.
2019-07-25 04:17:58 +02:00
Bård Skaflestad
cd48199c1e INIT File: Honour FILLEPS Keyword
If the input deck specifies FILLEPS, we should always output
end-point arrays whether or not the vectors are explictly assigned
in the input deck.
2019-07-25 04:17:58 +02:00
Bård Skaflestad
5bcb80ba70 INIT File: Output Scaled End-Point Arrays for Saturation Functions
This commit introduces a new helper function,

    writeSatFuncScaling()

that will extract scaled end-point arrays like SWL, SGCR, SOWCR,
KRORW, and PCG and output these to the INIT file.  We support both
the drainage and imbibition keywords, but do not support the
directional versions of these keywords at this time.

Note that this first draft uses the keyword values directly from the
Eclipse3DProperties container.  Therefore, the output behaves as if
the input deck always specifies the 'FILLEPS' option.  Outputting
only the values that were specified in the input will be the subject
of future work.
2019-07-25 04:17:58 +02:00
Bård Skaflestad
ccefe04230 Cell Properties (INIT): Refactor Write Loop Into Helper
This commit introduces a new helper function,

    writeCellProperties()

that accepts a list of properties to output as well as a property
container (GridProperties<T>), an EclipseGrid and call-back write
function for individual properties.  The helper invokes the callback
for each property that exists in the property container, passing it
the property description and the property values compressed to
active cells.

Reimplement function writeDoubleCellProperties() in terms of the new
helper.
2019-07-25 04:17:58 +02:00
Joakim Hove
65c4d91b19
Merge pull request #902 from joakim-hove/iorder-set
Add insert ordered set
2019-07-24 15:03:56 +02:00
Joakim Hove
f386404408 Add insert ordered set 2019-07-24 14:52:49 +02:00
Joakim Hove
28e0b1cc3a
Merge pull request #899 from joakim-hove/invalid-group-rate
Remove #define INVALID_GROUP_RATE - just use 0
2019-07-24 08:10:50 +02:00
Joakim Hove
5b1020151b
Merge pull request #901 from joakim-hove/reformat-aggregate-group-data
Indentation changes
2019-07-24 08:10:33 +02:00
Joakim Hove
3c77d66cd7 Indentation changes 2019-07-22 17:34:54 +02:00
Joakim Hove
fd49cb7787
Merge pull request #866 from joakim-hove/udq-usage-wip
Udq usage - preparations
2019-07-22 17:13:52 +02:00
Joakim Hove
e14b938fde Add UDAControl enum 2019-07-22 16:07:36 +02:00
Joakim Hove
11fe1d6e03 Maintain insert order in UDQINput 2019-07-22 16:07:36 +02:00
Joakim Hove
2fb64e21d9 Add method UDQDefine::input_string() 2019-07-22 16:07:36 +02:00
Joakim Hove
370ce5de1f Removed public tokens() property for UDQDefine 2019-07-22 16:07:36 +02:00
Joakim Hove
5a39b0e249 Remove #define INVALID_GROUP_RATE - just use 0 2019-07-22 09:21:01 +02:00
Bård Skaflestad
2e1ef048df
Merge pull request #897 from joakim-hove/unit-system-refactor
Unit system refactor
2019-07-21 16:55:08 -05:00
Joakim Hove
2ff8816bb7 UnitSystem refactor
- Add new constructor based on deck names 'FIELD', 'METRIC', 'PVT-M' and 'LAB'.
 - Refactor UnitSystem construction.
2019-07-21 13:12:01 +02:00
Bård Skaflestad
eede6b05b5
Merge pull request #896 from tskille/convertECL
convertECL, new option for unified restart file
2019-07-19 22:22:01 -05:00
Torbjørn Skille
a23c87be94 convertECL, new option for unified restart file 2019-07-19 10:39:12 +02:00
Joakim Hove
693395e78d
Merge pull request #894 from joakim-hove/group-types
Add enum GroupType
2019-07-19 08:26:26 +02:00
Joakim Hove
6324d5d6c8 Add enum GroupType 2019-07-19 07:20:21 +02:00
Bård Skaflestad
bc1403e1c6
Merge pull request #895 from tskille/ERst
Enabling load on the demand for class ERst
2019-07-18 08:35:17 -05:00
Torbjørn Skille
f509c3e236 Enabling load on the demand for class ERst 2019-07-18 14:49:51 +02:00
Bård Skaflestad
f2fe00b819
Merge pull request #869 from bska/adjust-sogcr-with-swl
Adjust Critical Oil-in-Gas Saturation with Scaled Connate Water Saturation
2019-07-16 08:06:11 -05:00
Bård Skaflestad
a886a2334b GridProperty: Collect Paired Assignment in Single Operation
This commit introduces a new helper function

    void GridProperty<>::setElement(i, val, dflt)

that handles paired assignments to 'm_data' and 'm_defaulted'[%].
This simplifies the bookkeeping and implementation of the various
assignment and value operations.

While here, also add a unit test to demonstrate expected behaviour
of the m_defaulted flag.  The only really questionable setting is
what happens if the deck applies a relative operator (e.g., ADD or
MULTIPLY) to a value that would otherwise be defaulted.  In the
current implementation the m_defaulted flag will remain set in this
case, but it arguably should be switched to unset (false).

[%]: Suggested by [at]akva2
2019-07-15 13:03:21 +02:00
Bård Skaflestad
e79d1396df GridProperty<T>: Track Defaulted Cell Status In More Operations
In particular, update 'm_defaulted' in

  - maxvalue, minvalue
  - maskedSet, maskedCopy
  - copyFrom
  - setScalar
2019-07-15 13:03:21 +02:00
Bård Skaflestad
63c6eeb30e SupportedKeywordInfo: Remark on Hacky Nature of setPostProcessor
This commit adds a comment block to the new

    setPostProcessor

member function, explaining the reasoning behind its excistence and
remarking on the fact that the ability to replace the post-processor
is essentially a hack.  The hack suggests that we need to rethink
our handling of (3D) grid properties.
2019-07-15 13:03:21 +02:00
Bård Skaflestad
10890cc793 3D Properties: Hook Up adjustSOGCRwithSWL for SGOF
This commit calls the SOGCR post-processor hook if the simulation
run uses SGOF.  In this case we need to subtract (scaled) connate
water saturations from defaulted SOGCR values.

This revealed a problem in one of the unit tests which used the
incorrect critical oil saturation due to a missing SGOF record.
2019-07-15 13:03:21 +02:00
Bård Skaflestad
7494990611 3D Properties: Add Special Purpose Treatment for SOGCR
This commit adds a new member function

    Eclipse3DProperties::adjustSOGCRwithSWL

which mutates the SupportedKeywordInformation of the various *SOGCR*
keywords created by makeSupportedDoubleKeywords().  Specifically,
adjust*() installs new post-processors for the critical oil-in-gas
saturations--post-processors that subtract the (scaled) connate
water saturation from the defaulted SOGCR.  This is only applicable
if the simulation run uses Family I (SWOF/SGOF) saturation function
keywords, because the SGOF table is implicitly defined in terms of
the connate water saturation.
2019-07-15 13:03:21 +02:00
Bård Skaflestad
9bb64df26e Keyword Information: Add Means to Replace Post-Processor
This is a special purpose hook that is mainly intended to add a
post-processor after the keyword information is established only if
certain conditions are satisfied (e.g., if certain keyword relations
like the run using 'SGOF' tables hold).

Immediate use case is to install a post-processor for SOGCR to
subtract the scaled connate water saturation from defaulted SOGCR
values if the simulation run uses family I (SWOF/SGOF) saturation
function descriptions.
2019-07-15 13:03:21 +02:00
Bård Skaflestad
ceb9f01571 GridProperty: Pass 'Defaulted' Flag to Post-Processor
This commit alters the post-processor API to accept a vector<bool>
of defaulted flags (true if defaulted, false if explicitly
assigned).  This, in turn, enables running the post-processor only
on defaulted (or assigned) property values.

Update existing post-processor implementation to honour the new
calling conventions.
2019-07-15 13:03:21 +02:00
Bård Skaflestad
430cc9d7b2 GridProperty<T>: Track Defaulted Cell Status
This commit adds a new data member (GridProperty<T>::m_defaulted)
that keeps track of whether or not a particular data item has been
implicitly assigned from the input deck.  GridProperty::setDataItem
assigns 'false', while the constructor initialises 'm_defaulted' to
true for all Cartesian cells.

The main objective is to be able to apply a post processor only to
those cells for which the input deck does not supply an explicit
value.
2019-07-15 13:03:21 +02:00
Joakim Hove
ffba2b114b
Merge pull request #888 from joakim-hove/group-names
Add method Schedule::groupNames()
2019-07-15 07:42:22 +02:00
Joakim Hove
160f0f83e1 Remove Schedule::getGroups() 2019-07-15 06:01:44 +02:00