Commit Graph

11591 Commits

Author SHA1 Message Date
Bård Skaflestad
e6d8d59525
Merge pull request #3028 from tskille/esmry_updates
Esmry updates
2022-06-06 21:16:49 +02:00
Torbjørn Skille
9a97d5c998 updated ExtESmry unit test
Loading summary vector from restart simulation with loadBaseRunData = true and selected summary vector not present in baserun.
Common use case where a new vector added in the restart run.
2022-06-02 19:46:37 +02:00
Torbjørn Skille
1433bc7a55 ExtESmry - support loading when number of time steps have increased (on disk)
The ESMRY file can be updated with more time step data in the time span between opening an ESMRY file
and loading actual summary data from the file. This can happen if the ESMRY is generated by an active
run. Length of summary vectors extracted will be equal to number of time steps on disk when the file was
first opened (with the constructor).
2022-06-02 19:44:20 +02:00
Torbjørn Skille
ab81083e02 Write temporary ESMRY file before renaming this to the actual file name
This increases the availability of the file for other processes. Duration for a
rename file operation is very short relative to writing a new file.
2022-06-02 14:10:17 +02:00
Torbjørn Skille
d34910c27d Minimum time interval between update of ESMRY file
The ESMRY file need a complete rewrite every time this is being updated.
This will makes the file more available for reading by other processes.
2022-06-02 14:10:14 +02:00
Atgeirr Flø Rasmussen
e1e0edba7d
Merge pull request #3038 from bska/jfunc-require-endscale
Require ENDSCALE When JFUNC Entered
2022-06-01 08:54:28 +02:00
Bård Skaflestad
4333a69cd4 Require ENDSCALE When JFUNC Entered
We effectively ignore JFUNC data unless end-point scaling is
activated through the ENDSCALE keyword in the RUNSPEC section.
Alert the user to this fact by terminating the simulation run if the
case uses JFUNC without ENDSCALE present in RUNSPEC.  In this case,
issue a diagnostic message of the form

    Error: Unrecoverable errors while loading input: Problem with keyword JFUNC
    In CASE.DATA line 125
    Incompatible keyword combination: JFUNC declared, but ENDSCALE is missing.
2022-05-31 16:56:27 +02:00
Markus Blatt
d278880091
Merge pull request #3032 from bska/netbalan-rst-fixes
Increase Compatibility of NETBALAN Restart Output
2022-05-27 21:46:21 +02:00
Bård Skaflestad
8ff84920ed Increase Compatibility of NETBALAN Restart Output
The current Network::Balance class applies default values a little
too eagerly and this leads to problems for restarted simulation.  We
must take care to preserve the "did this item have a value" state
also in the restart file lest interactions with TUNING be lost
there.

To this end, make the minimum timestep size for network balancing be
an std::optional<> and use std::nullopt to represent "no value set"
in the input file.  While here, also preserve negative balancing
intervals exactly instead of replacing these values by zero.
2022-05-27 17:09:23 +02:00
Markus Blatt
378bd03eef
Merge pull request #3033 from tskille/fix_esmry
ESmry and ExtESmry - Prevent loading data multiple times
2022-05-25 15:15:33 +02:00
Torbjørn Skille
607b8e7ebf ESmry and ExtESmry - Prevent loading data multiple times 2022-05-25 12:01:36 +02:00
Bård Skaflestad
4f181ec439
Merge pull request #3021 from bska/wecon-etc-restart-output
Identify Additional IWEL and SWEL Items
2022-05-25 10:54:35 +02:00
Bård Skaflestad
b4cebad6a9 Address Review Comments
In particular, add more unit testing and give names to a number of
index constants.

Thanks to [at]blattms for reviewing the initial version of this
patch.
2022-05-24 18:21:41 +02:00
Bård Skaflestad
188d7802a3 Temporarily Disable Higher-Level Water Injection Control
Instead, just declare that all non-FIELD groups are subject to
higher-level control of the water injection.

This hack is needed for compatibility on a real field case.  We must
revisit this at a later point.
2022-05-24 12:06:57 +02:00
Bård Skaflestad
adb84c15cc Emit Group Control Target of Zero if Explicitly Assigned
If a simulation model explicitly assigns a target or limit of 0.0,
then we must honour that value in the restart file.  Use a more
complete condition to detect whether or not group level targets or
limits are defaulted in GCONPROD and/or GCONINJE.
2022-05-24 12:06:57 +02:00
Bård Skaflestad
b36f415a96 Identify Additional IWEL and SWEL Items
In particular, add entries from WECON, WGRUPCON and, WVFPEXP and fix
an incorrect item attribution for the WTEST 'reason' parameter.

Thanks to [at]tskille for invaluable assistance in identify these
items.
2022-05-24 12:06:57 +02:00
Bård Skaflestad
67b7fe58b3 Don't Assert IWEL[24] == -1 Anymore
This setting is no longer magic.
2022-05-24 12:06:57 +02:00
Bård Skaflestad
6049b6e254 Expose First/Every Reporting
Needed for output to the restart file.
2022-05-24 12:06:57 +02:00
Bård Skaflestad
2aff28dd57
Merge pull request #3002 from bska/bxip-smry-values
Add Support for Block-Level Component-in-Place Summary Values
2022-05-24 12:04:23 +02:00
Bård Skaflestad
c5b9c8ea18 Add Support for Block-Level Component-in-Place Summary Values
This commit outputs the various BxIP* summary output values such as
BOIP (block-level oil-in-place) and BGIPL (block-level gas-in-place
in liquid phase).  While here, also add support for outputting the
block-level dissolved gas-oil-ratio (BRS) and vaporised
oil-gas-ratio (BRV).
2022-05-23 14:51:30 +02:00
Markus Blatt
82a5e7192e
Merge pull request #3031 from hakonhagland/python_rates3
Adds a method get_injection_properties() to the Python interface to Opm::Schedule
2022-05-23 14:05:24 +02:00
Håkon Hægland
fa740678e0 Adds a method get_injection_properties()
Adds a method get_injection_properties() to the Python interface to
Opm::Schedule. This method can be used to get information about
Well::WellInjectionProperties for a given report step.

In order to avoid code duplication between opm-simulators and opm-common,
logic in CMakeLists.txt was refactored out into
cmake/Modules/PyInstallPrefix.cmake
2022-05-20 06:27:29 +02:00
Markus Blatt
acd90212d7
Merge pull request #3030 from blattms/bump-version-2022.10
Bump version to 2022.10-pre
2022-05-19 16:52:32 +02:00
Markus Blatt
a036273540 Bump version to 2022.10-pre 2022-05-19 16:46:35 +02:00
Markus Blatt
678114116f
Merge pull request #3026 from bska/expose-raw-guiderate-phase
Provide Accessor for WGRUPCON's Raw Phase Value
2022-05-19 15:34:19 +02:00
Markus Blatt
180b7cb664
Merge pull request #3027 from bska/attribute-missing-kw-terminator
Attribute Missing Terminator to Keyword/File/Line
2022-05-19 15:32:44 +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
Bård Skaflestad
f7ea7674c0 Provide Accessor for WGRUPCON's Raw Phase Value
Needed for restart file compatibility.
2022-05-10 10:03:27 +02:00
Bård Skaflestad
c91bde8182
Merge pull request #3005 from bska/weltarg-uda
Save and Restore UDAs From WELTARG Keyword
2022-05-09 14:09:30 +02:00
Bård Skaflestad
0e2623d6dd List WCONPROD UDAs in Order of Increasing Enum Values
The entries for WRAT and GRAT were listed in reverse order.
2022-05-09 12:24:30 +02:00
Bård Skaflestad
b9e9112c6b Distinguish Well/Group Injection/Production UDA Controls
This avoids add-on logic at the call site to identify UDAs in
WELTARG keywords.

Suggested by: [at]atgeirr
2022-05-09 12:05:28 +02:00
Bård Skaflestad
b9eaa3a6aa Save and Restore UDAs From WELTARG Keyword
This commit hooks the WELTARG UDA support code up to the main path
for saving and reloading the IUAD/IUAP restart arrays.
2022-05-09 11:33:07 +02:00
Bård Skaflestad
f751c46f10 Count Active UDAs From WELTARG Keyword
This commit introduces a new overload of the updateUDQActive member
function of the WellInjectionProperties and WellProductionProperties
classes.  The new overload is specifically targeted at accounting
for any active UDAs in WELTARG records.  It is possible to have
"regular" UDAs introduced in WCONPROD/WCONINJE and also a separate
set of UDAs attributed to WELTARG at the same time so we need to be
able to distinguish the two cases.

Call the new overload from the WELTARG keyword handler.
2022-05-09 11:33:07 +02:00
Bård Skaflestad
14a6a5a4c3 Generate Units of Measurements for WELTARG UDAs
In preparation of loading such UDAs from the restart file.
2022-05-09 11:33:07 +02:00
Bård Skaflestad
25ede43bf7 Implement UDQ::*_control in Terms of UDQ::keyword
This replaces the cost of maintaining sets of switch/case statements
with some additional runtime cost of looking up the corresponding
keyword in a std::map<>, but these functions are not called in inner
loops so the extra cost is justified.
2022-05-09 11:33:07 +02:00
Bård Skaflestad
f4fde15e67 Support Recognizing UDAs in WELTARG Keyword
This commit extends the set of supported UDQ enumators to include
those of the WELTARG keyword.  This is in preparation of adding
restart file support for such cases.
2022-05-09 11:33:07 +02:00
Bård Skaflestad
f467ed7251 Identify More UDA Integer Values
In particular, identify UDA control codes for RESV, BHP, and THP in
WCONPROD as well as BHP and THP in WCONINJE.
2022-05-09 11:33:07 +02:00
Bård Skaflestad
d9ca1fe86f Increase Integer Literal Readability
Use C++14's digit separator character (single quote).
2022-05-09 11:33:07 +02:00
Atgeirr Flø Rasmussen
9a07a5d419
Merge pull request #3024 from atgeirr/use-invoke-result
Use std::invoke and friends instead of the deprecated std::result_of.
2022-05-09 11:31:11 +02:00
Atgeirr Flø Rasmussen
7e9e3e26eb Use std::invoke and friends instead of the deprecated std::result_of. 2022-05-09 10:26:29 +02:00
Markus Blatt
84ef4f6aa3
Merge pull request #3023 from blattms/skip-shared-libs
Do not hard-code shared-libs in package configuration if not needed.
2022-05-06 14:00:38 +02:00
Markus Blatt
cec7cffe7a Do not hard-code shared-libs in package configuration if not needed.
We usually list all libraries that might be needed for linking in the
CMake package configuration files. This is needed when building static
libraries as we do not yet use CMake targets (which would allow to
list them differently). As we are doing this unconditionally and
also including the ones listed in modules that we depend on, changing
a library (e.g. moving from Python 3.9 to 3.10) requires a complete
rebuild of all modules to get rid of the stale dependency on
libpython3.9.

At least when building shared libraries listing the dependencies is
not needed and this patch simply removes all shared libraries form the
list in the CMake package configuration file. Thus we only need to
recompile the modules that have direct dependency on a stale library.
2022-05-06 10:49:46 +02:00
Bård Skaflestad
9a51b6ec7c
Merge pull request #3020 from hakonhagland/python_rates
Adds a `get_production_properties()` method to the Python interface to Opm::Schedule
2022-05-05 17:52:46 +02:00
Bård Skaflestad
d345098471
Merge pull request #3019 from blattms/better-actionx-udq-unsupported-message
Improve error message for unsupported categories for UDQ/ACTIONX
2022-05-05 17:23:03 +02:00
Håkon Hægland
d2c778739b Add trailing comma 2022-05-05 17:05:35 +02:00
Markus Blatt
68438e3f79 Improve error message for unsupported categories for UDQ/ACTIONX
We now print
"Keyword category 'Region' (e.g., summary keywords RPR) not supported
by ACTIONX."
instead of
"make_default_nodes does not yet support: RPR"
2022-05-05 15:43:44 +02:00
Håkon Hægland
d2cf59380e Use more compact std::map constructor 2022-05-05 13:58:04 +02:00
Håkon Hægland
dd19213998 Adds get_production_properties()
Adds get_production_properties() to the python interface to Schedule.
This method can be used to get information about
Well::WellProductionProperties for a given report step
2022-05-05 13:04:03 +02:00
Markus Blatt
267f642794
Merge pull request #3018 from totto82/fix_warning_satfunc
fix warning due to  missing else in satfuncs
2022-05-03 15:55:24 +02:00
Tor Harald Sandve
db929b509e fix warning due to missing else in satfuncs 2022-05-03 14:48:13 +02:00