Commit Graph

77 Commits

Author SHA1 Message Date
Arne Morten Kvarving
f8781f276e fixed: adjust include path of float_point_comparison for earlier boost 2023-11-10 10:23:30 +01:00
David Landa Marban
5f22fb9bd0 Support for SGWFN sat functions (format type 2) 2023-10-11 23:38:42 +02:00
Bård Skaflestad
9342040dbe Match Region Sets by Unique Prefix
This commit switches the region set tag matching algorithm to using
unique prefixes.  This enables the parser to recognise that the
summary vector

    ROPR_UNI

should match up with the user defined region set 'FIPUNIT'.  In the
current master sources, the above summary vector would produce a
diagnostic message saying that the region set 'FIPUNI' (without the
final 'T') does not exist.

We add a prefix-to-canonical region set name translation table to
the FieldProps class and funnel all FIP-like requests through this
translation table.  In the case of non-unique prefixes-e.g., FIPUNIT
and FIPUNIX, we currently elect to have the last keyword entered in
the simulation model "win".  This behaviour may be altered in the
future if deemed appropriate/necessary.
2023-09-26 15:31:20 +02:00
Arne Morten Kvarving
49fb77a339 fixed: process all MULTREGP entries in the deck 2023-02-09 11:00:05 +01:00
Arne Morten Kvarving
d135fada0a remove unnecessary <iostream> includes 2023-01-03 16:32:56 +01:00
Arne Morten Kvarving
0b1280ceec FieldProps(Manager): remove unused serialization code 2022-09-07 10:24:01 +02:00
Arne Morten Kvarving
ef6d448077 changed: remove include of EclipseState.hpp in header
and deal with the consequences
2022-07-26 16:03:52 +02:00
Atgeirr Flø Rasmussen
a97df7c889 Use BOOST_CHECK_EQUAL_COLLECTIONS. 2022-06-21 09:32:31 +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
eca8583358 Use new FieldProps constructor to get ACTNUM. 2022-06-17 13:02:42 +02:00
Bård Skaflestad
462457fb39 Attribute Missing Terminator to Keyword/File/Line
This will hopefully aid the user in resolving the underlying issue.
2022-05-10 22:01:21 +02:00
Arne Morten Kvarving
4871f618bf fixed: avoid direct floating point comparisons in tests
we want to compare with an epsilon since these have gone
through calculations
2022-04-27 12:24:22 +02:00
Joakim Hove
0a59bd8f61 Filesystem rename EclipseState/Schedule/ Schedule/ 2022-01-02 14:32:14 +01:00
Joakim Hove
aede532b9a Filesystem rename parser/eclipse/ input/eclipse 2022-01-02 14:32:14 +01:00
Joakim Hove
d61f2356db Remove unused variables 2021-11-10 16:21:28 +01:00
Joakim Hove
243beeb96a Add functionality to update FieldProps with schedule multipliers 2021-11-10 15:05:36 +01:00
Arne Morten Kvarving
b063fcd089 remove some unnecessary includes
from tests and a few schedule classes
2021-04-27 12:55:45 +02:00
Arne Morten Kvarving
72ede7df50 changed: remove unnecessary boost includes 2021-04-23 11:27:38 +02:00
Joakim Hove
1a1aaa724b Add comparison functions operator== and rst_cmp() to FieldProps 2021-04-08 09:25:03 +02:00
Joakim Hove
c55f761905 Use std::optional and value objects instead of std::shared_ptr 2021-04-07 09:13:53 +02:00
Joakim Hove
e20be57d8b FieldProps can return invalid data if allow_unsupported is true 2021-02-16 08:34:15 +01:00
Joakim Hove
6fcd31850c Unconditionally include TRAN? keywords in FieldProps::keys<double>() 2021-02-12 09:59:14 +01:00
Bård Skaflestad
ad8209d882 Relax EPS Activation Criterion
Existence of certain EPS keywords (SWL, SGCR, others) is sufficient
to activate the end-point scaling option.  The deck does not *need*
to have the ENDSCALE keyword in these cases, but it is recommended
that ENDSCALE nevertheless be used.

On the other hand, certain other keywords do require the presence of
ENDSCALE so record this in "requires" clauses.
2020-12-16 17:47:00 +01:00
Peter Verveer
479225f170 Add test to check PERMR/PERMTHT 2020-11-26 15:29:57 +01:00
Peter Verveer
3070696070 Support PERMR and PERMTHT aliases for PERMX and PERMY 2020-11-26 15:21:36 +01:00
Joakim Hove
158c7376d7 Add test for MULTIREG and COPYREG keywords 2020-10-20 08:22:42 +02:00
Joakim Hove
0f21752a7e Add test for unsupported keyword in FieldProps operations 2020-10-05 07:28:07 +02:00
Joakim Hove
8848fde48e Collapse multi record operations on TRAN in one operation
The main content of this commit is that for keywords with multiple TRAN
modifications like

  MULTIPLY
     TRANX 1.50 1 10 1 10 1 1 /
     TRANX 2.50 1 10 1 10 2 2 /
  /

The different operations are collapes to one entry in tran calculator.

This commit also explicitly throws a std::logic_error() exception if TRAN
manipulations are attempted with the OPERATE keyword or one of the region
keywords ADDREG, MULTIREG, EQUALREG or OPERATER.
2020-09-28 21:44:21 +02:00
Joakim Hove
8e55f3138b Add multi record test 2020-09-27 10:16:32 +02:00
Joakim Hove
b95fbc4919 Rewrite test to iterate over cartesian coordinates 2020-09-27 10:16:32 +02:00
Markus Blatt
d60a91c3dd
Merge pull request #1932 from blattms/tran-calculator-2
Adds a calculator for modifying transmissibilities.
2020-09-22 19:56:12 +02:00
Markus Blatt
9343165bee Move factored out stuff to FieldProps namespace.
- FieldData
- ScalarOperation
- TranCalculator
- keywords
2020-09-18 16:20:33 +02:00
Markus Blatt
d3d91c2a08 Added ADD modifier for TranCalculator. 2020-09-17 16:40:10 +02:00
Markus Blatt
e6893caa89 Added support for MINVALUE to calculator. 2020-09-17 16:33:31 +02:00
Markus Blatt
5ea65651ac Fix test for MAXVALUE. 2020-09-17 16:02:25 +02:00
Markus Blatt
6a81e4bb63 Complete checks for TransCalculator. 2020-09-17 12:54:15 +02:00
Markus Blatt
d83790164d make tran_active non-throwing. 2020-09-17 12:54:15 +02:00
Markus Blatt
967f63479d Move FieldData to its own header for usage from simulator.
We need to refactor to make FieldData accessible from the simulator
for running in parallel with the TranCalculator.
2020-09-17 11:46:17 +02:00
Joakim Hove
8499c9d1cd Add tran_active() query function 2020-09-17 11:46:17 +02:00
Joakim Hove
4bd9b7212f Add serialization of FieldProps TRAN calculators 2020-09-17 11:46:17 +02:00
Joakim Hove
ecee4a7d36 Adds a calculator for modifying field properties in the edit section.
Previously modifications were applied directly to the field
properties. Unfortunately, for unset TRANX this resulted in
modifying 1.0 even if the simulator is calculating
transmissibilities itself. This was one of the reasons
why we got wrong results (others are in the simulator code).

Now these operations recorded in a calculator which can later be
applied to compressed arrays using apply_tran.
2020-09-17 11:40:56 +02:00
Bård Skaflestad
df1f03e4a8 SatFunc: Add Means of Retrieving Select Function Values
This commit introduces a new helper structure, RawFunctionValues,
which collects unscaled saturation function values that are needed
for vertical scaling of saturation functions using keywords such as

    KRO, KRORG, KRGR, PCW

and their hysteretic and directional counterparts.  We also
introduce a new helper function, getRawFunctionValues, which
extracts those values from the function tables in TableManager.

Add a set of unit tests to exercise the new feature.
2020-09-17 08:33:42 +02:00
Bård Skaflestad
07780a793f Field Props Test: Fix Minor Compiler Warnings
In particular, fix a few instances of "signed vs. unsigned"
comparisons, one "no previous declaration for", and include the
<algorithm> header for std::find().
2020-09-17 08:16:37 +02:00
Joakim Hove
03d387c12d Enable global storage for keywords 2020-09-09 21:41:08 +02:00
Joakim Hove
42fcb4507f FieldProps::get_global<T> will fill with correct default value 2020-09-05 11:52:22 +02:00
Joakim Hove
e00516842c Allow FIPxxx keywords in FieldProps manager 2020-08-26 08:52:12 +02:00
Bård Skaflestad
abec96a387 Sat-Func Initializers: Add TOLCRIT Support
This commit makes the 'critical_*()' helper functions aware of the
TOLCRIT feature.  We now consider a phase to be immobile at a one
saturation value if its relative permeability at that saturation is
less than or equal to TOLCRIT.  TOLCRIT mirrors E100's default value
of 1.0e-6 unless otherwise specified in the PROPS section.

All table scanners are implemented in terms of the expression

    std::lower_bound(begin, end, tolcrit, predicate)

which ultimately returns the first position in [begin, end) for
which

    predicate(*iter, tolcrit)

is false.  Using predicate = std::greater<>{} thus determines the
first position in the sequence for which the elements is less than
or equal to 'tolcrit'.  Similarly, a predicate equivalent to '<='
returns the first position for which the elements is strictly
greater than 'tolcrit'.

Add a set of unit tests to demonstrate and exercise the new feature.
2020-06-10 14:33:01 +02:00
Bård Skaflestad
83429bf908 Sat-Func Initializers: Pass TOLCRIT to Table-Scanning Layer
This is a pure API change.  The TOLCRIT value is not yet used as
part of determining the critical saturations.

While here, also add a unit test for getRawTableEndPoints() and
update the existing sat-func property unit tests to explicitly pass
TOLCRIT = 0 in preparation of adding actual TOLCRIT support.
2020-06-10 14:33:01 +02:00
Joakim Hove
ebdffa2abb Ensure correct SI conversion for the scalar data in OPERATE keyword 2020-05-11 15:45:01 +02:00
Bård Skaflestad
79bb8386d3 Sat-Func Initializers: Add End-Point Unit Tests
Exercises the initializers for SW{L,CR,U}, SO{W,G}CR, SG{L,CR,U}, as
well as the function values KRW, KRWR, KRG, KRGR, KRO, KRORW, KRORG
and capillary pressure function values PCW and PCG.

Example data from region one (1) of

    opm-tests/model1/include/sattab_basemod1.sattab

Example phrased both as family I (S*OF) and as family II (S*FN, SOF3).
2020-04-29 13:33:51 +02:00