Commit Graph

1008 Commits

Author SHA1 Message Date
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
Bård Skaflestad
7a2350bc3c
Merge pull request #1922 from joakim-hove/dynamicstate-update-equal
Dynamicstate update equal
2020-09-17 08:03:29 +02:00
Bård Skaflestad
60f6c26456
Merge pull request #1924 from joakim-hove/keyword-location
Keyword location
2020-09-16 23:35:09 +02:00
Joakim Hove
d283f1858f Add keyword member to KeyworLocation 2020-09-16 14:24:06 +02:00
Joakim Hove
bef5a4c27b Renamed class Location -> KeywordLocation 2020-09-16 14:06:54 +02:00
Joakim Hove
a023d4b437 DynamicState::find will return std::optional<std::size_t> 2020-09-16 11:59:03 +02:00
Joakim Hove
e03a97b539 DynamicState::update_equal() will return index of next value 2020-09-16 09:55:09 +02:00
Arne Morten Kvarving
518c219838 remove unused variable 2020-09-14 12:23:31 +02:00
Joakim Hove
db64c858d1 Add method SummaryConfig::keywords( pattern ) 2020-09-14 09:17:53 +02:00
Joakim Hove
20a6a522dc
Merge pull request #1891 from joakim-hove/summary-region
Add basic support for xxx_REG summary keywords
2020-09-10 09:23:33 +02:00
Joakim Hove
c3f94834c3 Add wildcard matching of keywords in SummaryConfig 2020-09-10 08:23:42 +02:00
Joakim Hove
5976efa953 Add fip regioin name to summaryconfig node 2020-09-10 08:23:42 +02:00
Bård Skaflestad
53ce21cf9e
Merge pull request #1911 from joakim-hove/udq-assign
Udq assign
2020-09-09 23:29:09 +02:00
Joakim Hove
03d387c12d Enable global storage for keywords 2020-09-09 21:41:08 +02:00
Joakim Hove
5a060910a3 Differentiate better between UDQ ASSIGN and UDQ DEFINE
A quite typical situation is that a UDQ keyword is first initialized with UDQ
ASSIGN statement, and then subsequently a formula for updates every timestep is
entered with UDQ DEFINE:

  UDQ
     ASSIGN FU_VAR1 0 /
     DEFINE FU_VAR1 FU_VAR1 + 1 /
  /

Then the assign statement should be run once, and the define formula should be
evaluated for every subsequent timestep.
2020-09-09 21:39:29 +02:00
Joakim Hove
fc1e245ea4 Add TIMESTEP as context variable in summary eval 2020-09-09 19:42:42 +02:00
Joakim Hove
a4d8379687 Support abondoned well keyword FMWPA in Summary 2020-09-09 17:10:53 +02:00
Joakim Hove
2f3ba50ca6 Add boolean flag to indicate whether a well has been an open producer 2020-09-09 15:07:55 +02:00
Joakim Hove
4a9ec1403e UDQ: get from an unknown summary variable throws std::out_of_range 2020-09-08 08:23:45 +02:00
Joakim Hove
8d11a04033 Add report_step argument to UDQConfig::eval() 2020-09-08 08:23:45 +02:00
Joakim Hove
42fcb4507f FieldProps::get_global<T> will fill with correct default value 2020-09-05 11:52:22 +02:00
Bård Skaflestad
1b7fab4bd1
Merge pull request #1904 from joakim-hove/box-global-list
Box global list
2020-09-03 23:51:08 +02:00
Joakim Hove
ae049a927f Add accessor method for *all* cells in a Box 2020-09-03 21:12:29 +02:00
Joakim Hove
a5bb313394 Remove unused index member from Box class 2020-09-03 16:49:29 +02:00
Joakim Hove
11e70ca779 Handle undefined UDQ expressions 2020-09-02 23:03:03 +02:00
Arne Morten Kvarving
acad356e2d remove unused variable 2020-09-01 15:25:44 +02:00
Joakim Hove
4b3304730c Serializer class: SummaryState & UDQState 2020-09-01 13:15:42 +02:00
Joakim Hove
53f78a02fe Internalize WSEGITER settings in Tuning implementation 2020-08-31 18:24:09 +02:00
Joakim Hove
71ba9ae6fd Remove DynamicState<..> access to Tuning class 2020-08-31 17:25:40 +02:00
Joakim Hove
0161f50255 Add UDQState 2020-08-27 17:25:51 +02:00
Joakim Hove
8b2363b940
Merge pull request #1885 from joakim-hove/udq-uadd
Correctly parse and handle UADD / UMUL / UMIN / UMAX set operations
2020-08-27 17:11:25 +02:00
Joakim Hove
7894a21749
Merge pull request #1892 from joakim-hove/fp-fipxxx
Allow FIPxxx keywords in FieldProps manager
2020-08-27 17:11:05 +02:00
Joakim Hove
168aa5602d Make sure DEFINE statements are evaluated in input order 2020-08-27 15:24:32 +02:00
Joakim Hove
718e00ca1f Correctly parse and handle UADD / UMUL / UMIN / UMAX set operations 2020-08-27 15:24:32 +02:00
Joakim Hove
1cf069c837
Merge pull request #1886 from joakim-hove/udq-tokens
Fix UDQ parsing for mix of '*' and *
2020-08-27 15:22:25 +02:00
Joakim Hove
76e8805d92
Merge pull request #1893 from joakim-hove/remove-require-fipnum
Remove function SummaryConfig::requireFIPNUM
2020-08-27 13:56:36 +02:00
Joakim Hove
dee69e78c3 Remove function SummaryConfig::requireFIPNUM 2020-08-27 11:55:17 +02:00
Joakim Hove
e00516842c Allow FIPxxx keywords in FieldProps manager 2020-08-26 08:52:12 +02:00
Joakim Hove
6c2563c5a5 Fix tokenizer bug with mix of '*' and *
The token '*' should be interpreted as all wells/groups for a variable like WOPR
or GGPR, whereas the naked * is a multiplication sign. This commit fixes a bug
where the all wells/groups token '*' would be incorrectly interpreted as a
multiplication sign.
2020-08-23 08:31:15 +02:00
Bård Skaflestad
501db1003d
Merge pull request #1876 from joakim-hove/rptrst-solution
Correctly handle RPTRST in SOLUTION section
2020-08-18 11:08:31 +02:00
Joakim Hove
106c0881ee Correctly handle RPTRST in SOLUTION section 2020-08-18 10:48:50 +02:00
Joakim Hove
c84b95ed85
Merge pull request #1875 from joakim-hove/tlmixpar
Implement TLMIXPAR as dedicated vector of struct - not table
2020-08-14 12:56:39 +02:00
Joakim Hove
d358d94f58
Merge pull request #1806 from goncalvesmachadoc/salt
finalizeSaltTables
2020-08-14 12:55:49 +02:00
Joakim Hove
748c3975fb Fix salt table tests 2020-08-13 18:44:04 +02:00
Joakim Hove
66ddbd7842 Remove trailing whitespace 2020-08-13 18:44:04 +02:00
Joakim Hove
1b851f03cb Implement TLMIXPAR as dedicated vector of struct - not table 2020-08-12 14:47:21 +02:00
Joakim Hove
3e1411bf87 Replace opm implementation of string_view with std::string_view 2020-08-04 11:40:41 +02:00
Joakim Hove
f500adba24 ACTIONX will handle WLIST well arguments 2020-07-09 15:16:33 +02:00
Joakim Hove
f4f993586a Add method WListManager::wells() which can do WLIST wildcards 2020-07-09 15:12:54 +02:00
Joakim Hove
d096a5fda6 Update WLIST to handle WLIST and well pattern arguments 2020-07-08 08:12:28 +02:00
Joakim Hove
4e223eae4a Fix handling of too long 8 characters keywords like GUIDERATE 2020-07-02 14:23:45 +02:00
Joakim Hove
9fd29db2de Add case with literal in scientific form 2020-06-30 13:04:49 +02:00
Joakim Hove
f09b534e1d Hack around UDQ parser which does not accept leading '-' 2020-06-30 13:01:00 +02:00
Joakim Hove
fc4511d365 Fix UDQParsing code to handle numerical values on scientific form 2020-06-30 12:51:59 +02:00
Joakim Hove
e65880aafb Use Schedule::restart_groups() 2020-06-25 14:18:19 +02:00
Joakim Hove
f6d160db32 Add convenience method Schedule::restart_groups() 2020-06-24 12:53:09 +02:00
Arne Morten Kvarving
d7bdb448f5 add some trivial checks to avoid unused variable warnings 2020-06-19 09:43:48 +02:00
Joakim Hove
216a220ee8 Remove unused variable 2020-06-18 22:34:24 +02:00
Joakim Hove
dd1591f1a2 Use Action::State object to keep track of actions being run 2020-06-18 16:45:39 +02:00
Joakim Hove
f54245f1ca Add class Action::State to keep track of ACTIONX count 2020-06-18 16:45:39 +02:00
Joakim Hove
7d856b4933 Add id member to ActionX objects 2020-06-18 16:45:39 +02:00
Bård Skaflestad
2123884655
Merge pull request #1408 from jalvestad/extend_udq_actx_rst
Changes to extend and improve the ECL-compatible restart
2020-06-18 16:29:52 +02:00
Cintia Goncalves Machado
6ab09afb0c fixPermFactTest 2020-06-18 16:23:41 +02:00
Markus Blatt
8c6cd2f10f
Merge pull request #1810 from blattms/support-pinch-nogap
Support querying GAP/NOGAP mode for Pinch form EclipseGrid.
2020-06-15 17:27:15 +02:00
Joakim Hove
985cb279ff Allow negative rates when evaluating UDA values
corrections to iwel[10] open/shut flag

further corrections SWEL for handling udq-restarts correctly

further changes to get correct SWEL in ECL-Restart file

added comment to clarify change

correction to group sequence and group controls for EclRST-file

changes to correct IGRP[NWGMAX+5]

corrected compile errors/warnings

further minor code corrections

initial changes to include group current Prod/inj Constraint in summary file

further changes to currentsStatusGroupControl to Summary output

further corrections and additions of Field current controls

further corrections for IGRP

minor corrections to code style

corrections for tests

changes to correct test_AggregateWellData

a few more initial changes for next version of igrp/sgrp

changes to igrp & sgrp according to tests

changes to handle special conditions at report step 0

corrections due to changes in Summary.cpp

changes to improve code quality and robustness

Add default value to igrp[nwgmax+5]

corrections and code improvements base on testing

corrections to handling of GCONINJE

further corrections for IGRP

even further corrections IGRP

changes to correct SGRP

correction to IGRP defaults

corrections to SWEL and IGRP

further corrections for IGRP

removed some comments
2020-06-15 09:55:27 +02:00
Joakim Hove
84aa2f77f3
Merge pull request #1820 from joakim-hove/udq-nan-values
UDQSet will check for nan values
2020-06-12 13:49:24 +02:00
Joakim Hove
0841e4f398
Merge pull request #1797 from joakim-hove/GPMAINT
Add code to internalize GPMAINT keyword in Group objects
2020-06-12 12:19:20 +02:00
Joakim Hove
082820380d Ensure that all values in UDQSet are finite 2020-06-12 09:12:55 +02:00
Joakim Hove
213c6fb6ad Add function SummaryState::update_udq() to add variables from UDQSet 2020-06-12 09:12:55 +02:00
Joakim Hove
90d1d992e5 Ensure that evaluated UDQSet have the correct name 2020-06-12 09:12:55 +02:00
Joakim Hove
b07bd377cd
Merge pull request #1819 from joakim-hove/aicd
Aicd
2020-06-12 09:12:18 +02:00
Atgeirr Flø Rasmussen
e08a3666e3
Merge pull request #1818 from atgeirr/fix-nupcol-runspec
Handle NUPCOL in RUNSPEC correctly
2020-06-11 20:50:30 +02:00
Joakim Hove
224911bd10 Add implementation for autonomous ICD: AutoICD 2020-06-11 11:38:29 +02:00
Joakim Hove
0f032d6fca
Merge pull request #1801 from joakim-hove/icd-variant
Use std::variant<> to hold ICD alternatives
2020-06-11 11:31:58 +02:00
Joakim Hove
6090470045 Add code to internalize GPMAINT keyword in Group objects 2020-06-11 09:40:55 +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
Atgeirr Flø Rasmussen
80f6a5d1ed Add failing test for NUPCOL in RUNSPEC. 2020-06-10 13:17:04 +02:00
Joakim Hove
afd5c3153a Use value based semantics for Segment -> valve 2020-06-10 06:35:03 +02:00
Joakim Hove
b1250c2f7a Use std::variant<> to hold ICD alternatives 2020-06-10 06:35:03 +02:00
Markus Blatt
23dd41ba38 Support querying GAP/NOGAP mode for Pinch form EclipseGrid.
While we currently only support GAP and do not need this,
we will need it eventually to support NOGAP in the simulator.
2020-06-04 20:19:51 +02:00
Joakim Hove
6b468787c8 Refactor COMPSEGS handling
When handling the COMPSEGS keyword the connections are updated with segment
number and the segments are updated with total perforated length. The new
Compsegs::processCOMPSEGS() function will create new updated copies of both
WellSegments and WellConnections.
2020-06-04 16:57:40 +02:00
Cintia Goncalves Machado
628afd7abe finalizeSaltTables 2020-06-04 11:43:59 +02:00
Joakim Hove
7df0577a58 Rename SpiralICD -> SICD 2020-05-28 11:03:24 +02:00
Joakim Hove
66acfb5249 When defining branch properties: vfp == 0 should delete branch 2020-05-15 14:21:44 +02:00
Joakim Hove
fd5a42801f Make sure the UDQ usage in GCONPROD is recorded 2020-05-15 08:27:52 +02:00
Joakim Hove
ebdffa2abb Ensure correct SI conversion for the scalar data in OPERATE keyword 2020-05-11 15:45:01 +02:00
Joakim Hove
64fb589ec6 Use string based parent *name* in GTNode instead of pointer 2020-05-07 20:08:39 +02:00
Joakim Hove
7fe89422e2 Internalize keywords for gas lift optimization 2020-05-07 16:29:42 +02:00
Joakim Hove
3c879dd5dc ActionResult will not access wells if overall false 2020-05-06 12:48:38 +02:00
Joakim Hove
9a4c8f754e Change type of new value argument in WELTARG to UDA 2020-05-04 08:29:34 +02:00
Joakim Hove
ef77be1508 Refactor ScheduleTests to use fixture function 2020-05-04 08:29:34 +02:00