Commit Graph

1008 Commits

Author SHA1 Message Date
Joakim Hove
2d036144cc Raise OpmInputError for unbalanced quotes 2020-10-14 08:40:10 +02:00
Bård Skaflestad
6f20858d73 Record Event if WellConnections Change
This is different from COMPLETION_CHANGE which is unconditionally
recorded when processing COMPDAT.  This event is recorded only when
the Well's internal WellConnections structure actually changes and
informs clients that they may need to rerun any dynamic WELPI
scaling.  Such scaling will not be automatically forwarded onto the
new WellConnections structure.

This is arguably a hack.
2020-10-12 15:10:28 +02:00
Joakim Hove
36e03cf6b9 Use ParserKeyword::prohibits for COORD / GDFILE / ZCORN 2020-10-10 08:30:48 +02:00
Bård Skaflestad
fa7d8bc28c Add Support Infrastructure for WELPI Feature
This commit adds logic implementing the static parts of the WELPI
keyword.  We internalize the keyword data, record appropriate events
and provide hooks for dynamically adjusting the per-connection
transmissibility factor (Connection::CF()) when those events occur.
We implement support at three levels

  - WellConnections:
    Add new public member functions prepareWellPIScaling and
    applyWellPIScaling which, respectively, creates bookkeeping
    data to track those connections which are subject to CF scaling
    and actually applies that CF scaling.

  - Well:
    Add new data member 'productivity_index' which holds the 'WELPI'
    data value from the input keyword (converted to SI) and new
    member functions updateWellProductivityIndex and
    applyWellProdIndexScaling.  The first follows the 'update*'
    protocol (return 'true' if state change) and assigns new values
    to 'productivity_index' while the second uses the stored PI
    value and a dynamically calculated effective PI value to rescale
    the pertinent connections' CF value.

  - Schedule:
    Add new member function handleWELPI which internalizes the WELPI
    keyword and its data and records WELPI events for subsequent
    playback in the simulator layer.

Also add a set of unit tests to exercise the new features at all
levels.
2020-10-08 11:19:03 +02:00
Bård Skaflestad
de5e3d90cd Miscellaneous Cleanup Changes
In particular, include standard library headers as needed, fix
function declarations (operator<<() for Well::WellProductionProperties),
and make a few helper functions 'static' to avoid warnings of the
form "no previous declaration for".

For the Schedule's keyword handlers, also switch to storing member
function pointers directly instead of std::function objects.  This
saves space and does not incur function pointer conversions.  Use
std::invoke to call those handlers to avoid having to spell out the
'->*' operator.
2020-10-08 11:19:03 +02:00
Bård Skaflestad
a5a18fea9e Add Convenience Predicate WellConnections::empty
Replace expressions comparing size() to 0 with calls to empty().
2020-10-07 22:29:18 +02:00
Joakim Hove
a33fd2483f Updates to well control mode reported in IWEL
With this commit the IWEL[ActWCtrl] is assigned a value independently of the
wells OPEN / SHUT status.

With this PR the index enum value Status is used instead of the previously used
item11. Also numerical constants are introduced for eclipse status values for
Shut, Stop, Open and Auto.
2020-10-07 18:28:11 +02:00
Joakim Hove
23faea7b81
Merge pull request #1996 from wito/required-keywords
Required and Prohibited Keywords
2020-10-07 09:06:42 +02:00
Williham Williham Totland
90d980a4f6 Adds manipulation of the ParseContext to tests. 2020-10-06 09:58:46 +02:00
Bård Skaflestad
33d09936c3
Merge pull request #1719 from GitPaean/aquifer_keywords
adding aquifer summary keywords
2020-10-05 22:49:32 +02:00
Williham Williham Totland
7aba0cd976 Implements required and prohibited keywords. 2020-10-05 13:34:35 +02:00
Williham Williham Totland
c43600337b Throws exception with nesting, and generalises tests to account for same. 2020-10-05 11:06:19 +02:00
Williham Williham Totland
d0c5fa042c Adjusts the defaultMessage format string. 2020-10-05 09:26:25 +02:00
Williham Williham Totland
7a8347f1ab Unifies interface of OpmInputError::OpmInputError() 2020-10-05 08:26:51 +02:00
Kai Bao
aa639869be adding the development to test ANALYTICAL_AQUIFERS 2020-10-05 07:37:13 +02:00
Joakim Hove
0f21752a7e Add test for unsupported keyword in FieldProps operations 2020-10-05 07:28:07 +02:00
Kai Bao
31e5c494a8 adding aquifer keywords to the summary_ALL test in SummaryConfigTests 2020-10-05 00:28:11 +02:00
Kai Bao
e86e8796ec adding a small test for aquifer keywords 2020-10-02 22:32:23 +02:00
Tor Harald Sandve
8210bcde34
Merge pull request #1968 from hakonhagland/wglir
Add support for WGLIR.
2020-10-02 14:48:18 +02:00
Kai Bao
6093a80dff fixing the compilation due to interface change 2020-10-02 14:09:01 +02:00
Kai Bao
fd773423b0 adding the following aquifer summary keywords
AAQR, AAQT, AAQP
2020-10-02 13:18:51 +02:00
Joakim Hove
0ab50fbc95
Merge pull request #1977 from wito/test-warning-noise-fix
Test Compilation Warning Noise Fix
2020-10-02 07:56:14 +02:00
Joakim Hove
96ce078dfd
Merge pull request #1983 from joakim-hove/private-fmt
Mkae sure fmtlib is not a dependency in the public api
2020-10-01 15:24:15 +02:00
Joakim Hove
fbf88e8ce1
Merge pull request #1984 from joakim-hove/remove-value
Remove homemade optional - use std::optional
2020-10-01 15:23:55 +02:00
Joakim Hove
6dc84b67df Remove homemade optional - use std::optional 2020-10-01 13:53:58 +02:00
Joakim Hove
8c351440e8 Mkae sure fmtlib is not a dependency in the public api 2020-09-30 18:17:57 +02:00
Joakim Hove
42f1278db3 Changes in restart TimeMap and Schedule::iterateSection
This commit changes two aspects of restarts where well and group information is
assembled from the restart file:

 o We require the restart date to be present in the Schedule file as a DATES
   keyword.

 o SKIPREST behavior is implemented unconditionally for restarts with restart
   files, even if the SKIPREST keyword is not present.
2020-09-29 23:00:16 +02:00
Håkon Hægland
7db5d2fd5c Added WGLIR to SummaryConfigTests.cpp 2020-09-29 15:52:28 +02:00
Joakim Hove
2a812ab7ce Use OpmInputError 2020-09-29 15:37:14 +02:00
Joakim Hove
0512ab88b4 ParseContext will throw OpmInputError 2020-09-29 15:37:14 +02:00
Williham Williham Totland
6d2f8cca5c Adds type information to integer literals. 2020-09-29 13:54:21 +02:00
Joakim Hove
e01400fa18 Add KeywordLocation argument to ParseContext::handleError() 2020-09-29 09:56:07 +02:00
Joakim Hove
e8423d3b25
Merge pull request #1969 from wito/keyword-handler-try-catch
Exception Catch and Release
2020-09-29 09:54:41 +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
Williham Williham Totland
9a66acbb5d Extends OpmInputError to be initialisable from an existing exception. 2020-09-28 13:16:45 +02:00
Williham Williham Totland
742c90cabc Extends Opm::OpmInputError::OpmInputError() to accept additional format arguments. 2020-09-28 13:16:45 +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
Joakim Hove
b9f95089b9
Merge pull request #1949 from joakim-hove/error-prepare
Error prepare
2020-09-24 07:33:22 +02:00
Joakim Hove
2e20dc5d43
Merge pull request #1923 from totto82/co2storage
Add CO2STOR keyword in Runspec section
2020-09-23 14:36:18 +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
Joakim Hove
b184b0e9e5
Merge pull request #1942 from joakim-hove/opm-error
Opm error
2020-09-22 18:01:14 +02:00
Tor Harald Sandve
f3e209b740 Add CO2STOR keyword in Runspec section 2020-09-22 14:53:35 +02:00
Joakim Hove
719af02142 Add custom exception OpmInputError 2020-09-22 13:48:26 +02:00
Bård Skaflestad
d46628e8a1 Summary Config: Recognize Subset of Node-Level Keywords
This commit adds support for recognizing a small subset of the
summary quantities that are reported at the node level of an
extended network--especially the 'GPR' keyword.

Briefly, we add a new 'Node' config category and a processor for
this category which knows about the distinction between nodes and
groups.  It uses member function ExtNetwork::node_names() to produce
configuration nodes whose named entity is the node rather than a
group.  Deriving this list of node names across all timesteps is
potentially expensive, so perform this operation at most once and
pass the result into the processor from the SummaryConfig
constructor.

Add a simple unit test for demonstration purposes.
2020-09-22 10:08:44 +02:00
Joakim Hove
11d5128cbf Use KeywordLocation instead of passing keyword and filename separately 2020-09-22 09:55:45 +02:00
Bård Skaflestad
dbfd013cf4 Add Means of Retrieving Node Names from Extended Network
This commit adds a new member function

    ExtNetwork::node_names() const

which collects the names (std::string) of all nodes in a network.
The immediate use case is creating summary config nodes for network
level quantities specified without explicit lists of nodes, e.g.,

    GPR
    /

Add a simple unit test for demonstration.
2020-09-20 17:46:01 +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