Commit Graph

1008 Commits

Author SHA1 Message Date
Joakim Hove
8b70e42e0f Connection - Segment interaction implemented with optional pair 2020-04-30 14:54:21 +02:00
Joakim Hove
c7008d329a Add class ExtNetwork for extended networks 2020-04-29 15:45:18 +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
Joakim Hove
e7f750da83 Add method WellSegments::branches() 2020-04-22 17:03:03 +02:00
Joakim Hove
48969b8b77 Add method WellSegments::branchSegments() 2020-04-22 12:07:26 +02:00
Joakim Hove
dd0041f8ee Add method WellSegments::segmentDepthChange() 2020-04-22 10:21:51 +02:00
Bård Skaflestad
f902ceb6d7
Merge pull request #1729 from joakim-hove/changed-wells
Add function Schedule::changed_wells() to use in WELSPECS reporting
2020-04-21 14:13:54 +02:00
Joakim Hove
d37aa1116d Add function Schedule::changed_wells() to use in WELSPECS reporting 2020-04-21 13:18:49 +02:00
Joakim Hove
3077f7aff8 Introduce class RawString
The RawString class is introduced as a string which can hold the literals '*',
'/' and '''. The RawString class is used to hold the content of UDQ and ACTIONX
keywords.
2020-04-21 06:51:25 +02:00
Joakim Hove
84ad5ef502 Internalize Gas inflow equation flag in Well - for reporting 2020-04-19 08:37:48 +02:00
Bård Skaflestad
2d4175ed0f
Merge pull request #1695 from GitPaean/msw_summary_keywords
adding the summary output keywords for MSW
2020-04-17 20:53:31 +02:00
Joakim Hove
819b624809 Changes in available for group control implementation
1. Add separate available_group_control flags for injection and production.
2. Add separate available_group_control flags for each injection phase.
2020-04-17 13:30:26 +02:00
Joakim Hove
dd30fb7bd8 Extracte Schedule construction to separate function in test 2020-04-17 13:03:26 +02:00
Kai Bao
8e4d4827a2 adding the test for new segment summary keywords 2020-04-17 00:38:21 +02:00
Joakim Hove
315382bad8 Run PYACTION keywords
The PYACTION keyword is implemented with a Python module with a run() function
in an external module.
2020-04-16 14:13:54 +02:00
Joakim Hove
685ab301d2
Merge pull request #1691 from joakim-hove/UDQ-UNITS
Default construct UDQ keywords with value 0 when defined with UNIT
2020-04-16 09:27:28 +02:00
Joakim Hove
b899a1da64
Merge pull request #1703 from joakim-hove/well-store-dens-calc
Check WELSPECS values
2020-04-16 09:26:48 +02:00
Joakim Hove
3072f0dabe Add pvt_table as member for Well 2020-04-15 11:26:57 +02:00
Arne Morten Kvarving
784389d228 remove unused variables 2020-04-14 14:10:33 +02:00
Joakim Hove
750e7b8b24 Default construct UDQ keywords with value 0 when defined with UNIT 2020-04-12 08:38:59 +02:00
Joakim Hove
650ffb12b8 EclipseGrid: ensure that all ACTNUM manipulations use resetACTNUM 2020-04-08 21:38:41 +02:00
Bård Skaflestad
afd0ed21ba
Merge pull request #1682 from joakim-hove/timestamp-ymd
Add three argument (year, month, day) constructor TimeStampUTC
2020-04-07 12:07:02 +02:00
Joakim Hove
075d018cf3 Moved string utilities to opm/common 2020-04-04 17:10:13 +02:00
Joakim Hove
ab2e5cc310 Add three argument (year, month, day) constructor TimeStampUTC 2020-04-04 16:20:13 +02:00
Joakim Hove
2df7183f1b Implement asLocalTimeT helper function 2020-04-02 15:31:13 +02:00
Joakim Hove
d3817e2fc2
Merge pull request #1665 from wito/rptconfig-rptsched
Handle RPTSCHED keywords in a time-sensitive manner
2020-04-01 14:00:41 +02:00
Williham Williham Totland
f3fbfc41ad Completes RPTConfig to pass tests. 2020-04-01 13:02:29 +02:00
Williham Williham Totland
9f7664fe13 Makes the new interface compile against tests. 2020-04-01 13:02:29 +02:00
Joakim Hove
278402b63e Check well status before checking active control 2020-04-01 10:28:05 +02:00
Joakim Hove
efff382517 Add test for ReportConfig 2020-04-01 10:17:05 +02:00
Joakim Hove
07843654b1 SKIPREST: Make sure e.g. VFP tables are loaded even under SKIPREST 2020-04-01 08:23:15 +02:00
Atgeirr Flø Rasmussen
3111505ed6
Merge pull request #1661 from joakim-hove/connections-wellpi
WPIMULT: directly multiply the connection transmissibility factor
2020-03-31 18:59:46 +02:00
Joakim Hove
5ac2b3f531 Fix codepath for non-python 2020-03-31 16:56:44 +02:00
Joakim Hove
6fb2989708 WPIMULT: directly multiply the connection transmissibility factor 2020-03-31 16:53:28 +02:00
Joakim Hove
5444eade2f Use std::shared_ptr<Python> for Python argument in Schedule 2020-03-31 10:26:55 +02:00
Joakim Hove
f613c15727 Connections: keep order from restart file 2020-03-28 08:58:14 +01:00
Joakim Hove
50fb51d56e Add Python arg to Schedule constructor 2020-03-27 12:43:18 +01:00
Joakim Hove
687887939d Make sure PythonInterpreter can be safely disabled 2020-03-27 12:11:40 +01:00
Joakim Hove
562136772a
Merge pull request #1638 from joakim-hove/remove-stale-boost-include
Remove stale boost includes
2020-03-27 10:49:52 +01:00
Atgeirr Flø Rasmussen
4c5b03b83e Use braces to force correct parsing.
Without this, clang thinks it is a declaration, not a function call.
2020-03-27 10:11:12 +01:00
Joakim Hove
3e2160af28
Merge pull request #1608 from joakim-hove/connections-sort-item
Connections sort item
2020-03-26 17:52:54 +01:00
Joakim Hove
cce2bc0686 Temporarily protect against deref when python is disabled 2020-03-26 15:38:18 +01:00
Joakim Hove
eca0589fe1
Merge pull request #1641 from joakim-hove/python-enable-enum
Enable fine grained control of Python ON | OFF
2020-03-26 14:21:24 +01:00
Joakim Hove
a8f0ebb183 Enable fine grained control of Python ON | OFF 2020-03-26 12:00:59 +01:00
Bård Skaflestad
5a701a2ee8
Merge pull request #1609 from wito/new-summarynode
New SummaryNode implementation
2020-03-26 11:34:21 +01:00
Joakim Hove
39eb327551 Remove stale boost includes 2020-03-25 18:18:25 +01:00
Joakim Hove
9ad8465609 Replace connection segIndex and compSeqIndex with sort_value member 2020-03-25 18:02:40 +01:00
Joakim Hove
c7d3603184 Changes in WellConnection ordering
1. If the well is MSW the connections in the WellConnection class is sorted in
   output order in the ::order() method, and retained that way.

2. Add method WellConnection::output() which return a vector of connection
   pointers sorted in output order.
2020-03-25 10:54:21 +01:00
Joakim Hove
9411af4dfc Implement TracerConfig in EclipseState
Co-authored-by: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
2020-03-25 07:53:08 +01:00
Joakim Hove
a0ebb2091f Add method Actions::pending_python() to get active Python functions 2020-03-24 07:23:31 +01:00
Bård Skaflestad
8d2cc14ad0 Active Well Control Output: Place Duplicate Implementation in Well
Will become shared backend for output to restart and summary files.
Add unit tests to exercise the new functions.
2020-03-20 22:07:04 +01:00
Joakim Hove
c7f6b22bdf Add static method bool Python::enabled() 2020-03-20 16:59:50 +01:00
Joakim Hove
d06a5a78e0 Moved PyAction class into Action:: namespace 2020-03-20 16:59:50 +01:00
Joakim Hove
7852203d39 PYACTION: The actual python code is in an external file
With this commit the PYACTION keyword is changed, instead of embedding the
Python code directly in the .DATA file the keyword now points to an external
file which is loaded verbatim into the PyAction keyword.

In addition the PYACTION keyword has now got a name and a string indicating how
many times it should run.
2020-03-20 16:59:50 +01:00
Williham Williham Totland
6970158f7f Makes the return value of Opm::Group::flow_group/::control_group optional. 2020-03-20 14:08:03 +01:00
Joakim Hove
f87369713b Add global_index to Connections 2020-03-19 22:14:06 +01:00
Joakim Hove
acd73b76ea Remove unused method WellConnections::inputSize() 2020-03-18 15:36:17 +01:00
Joakim Hove
96d2cd59b3 Move Connection::Order member from Well to WellConnections 2020-03-18 14:28:53 +01:00
Williham Williham Totland
fb7d4315c9 Renames Opm::SummaryNode to Opm::SummaryConfigNode. 2020-03-13 15:40:41 +01:00
Joakim Hove
4433731079
Merge pull request #1566 from wito/rsm-testing
Adding support for the RUNSUM keyword in Opm::SummaryConfig
2020-03-13 11:16:30 +01:00
Williham Williham Totland
67f3d31254 Makes RPTONLY a processing instruction. 2020-03-13 10:02:48 +01:00
Williham Williham Totland
d5c4487808 Implements support for RUNSUM-related keywords NARROW and SEPARATE 2020-03-13 09:15:46 +01:00
Joakim Hove
03be91a951 Add members cf_kind, cf, skin_factor and r0 to rst::connection 2020-03-12 18:11:25 +01:00
Williham Totland
a270964846 Adds tests for swallowing RUNSUM keyword. 2020-03-12 14:59:31 +01:00
Williham Totland
6f83c4198c Review Action: Renames SummaryConfig::doRunSummary to SummaryConfig::createRunSummary 2020-03-12 12:23:09 +01:00
Williham Totland
c5af3afebd Corrects test after discussion. 2020-03-12 11:35:38 +01:00
Williham Totland
fcc2e32d66 Renames runsum to doRunSummary, adds accessor. 2020-03-12 10:52:10 +01:00
Joakim Hove
7a9c0171d1 Add test to check whether RSM output has been requested 2020-03-12 09:28:48 +01:00
Arne Morten Kvarving
9b22cab024 changed: relocate and rename StoneType enum
unfortunate naming, unfortunate location
2020-03-10 11:09:49 +01:00
Joakim Hove
327625b713 Use the WellType class in Well and Schedule 2020-03-09 13:30:18 +01:00
Joakim Hove
6e8b4a6c12 Add WellType class for ecl interop 2020-03-09 13:29:11 +01:00
Joakim Hove
51a593de39
Merge pull request #1532 from joakim-hove/uda-value-dim-constructor
Uda value dim constructor
2020-03-09 13:28:22 +01:00
Williham Totland
13e838d171 Separates Opm::Group::parent() for the extended network model
In order to support the extended network model going forwards, the method Opm::Group::parent() is split in the API into two new methods, Opm::Group::control_group() and Opm::Group::flow_group(). These methods give the names of the parent node in the group control hierarchy and network structure, respectively.

While for the standard network model these two values will be the same (and the same as ::parent()), code that presently calls ::parent() should be revisited with an eye to the question of which parent group is desired.
2020-03-06 14:38:38 +01:00
Joakim Hove
8501a7ead4 Construct UDA values in WellInjectionProperties with correct unit 2020-03-05 13:08:00 +01:00
Joakim Hove
17ec37ae4e WellProductionProperties - init with correct UDA dimensions 2020-03-05 13:08:00 +01:00
Joakim Hove
4b0ee9d0bb Remove method Dimension::newComposite() 2020-03-05 13:08:00 +01:00
Joakim Hove
874c734628 Remove name property from UnitSystem dimension 2020-03-05 13:08:00 +01:00
Joakim Hove
f8c250be34 UDAValue: change from ::reset() to ::operator=() 2020-03-05 13:08:00 +01:00
Joakim Hove
37d31aeac0 Remove UDAValue copy and modify constructor 2020-03-05 13:08:00 +01:00
Joakim Hove
1b2fadcdc4 Move enum Well:InjectorType to new file ScheduleTypes 2020-03-03 09:09:11 +01:00
Arne Morten Kvarving
710a94709e changed: simplify OilVaporizationProperties
there is no vappars per pvt region. do not store it as such either.
2020-03-02 09:32:40 +01:00
Atgeirr Flø Rasmussen
1a0f47f274 Add Group::isAvailableForGroupControl() method.
The method has very similar intended usage as the method of the
same name in the Well class.
2020-02-27 14:56:31 +01:00
Joakim Hove
8cb65a77a6
Merge pull request #1507 from joakim-hove/dent-keywords
Add simple POD class to internalize keywords xxxDENT
2020-02-26 09:55:58 +01:00
Joakim Hove
24528ea607 Add simple POD class to internalize keywords xxxDENT 2020-02-25 15:06:34 +01:00
Arne Morten Kvarving
aceb3b443a remove unused enum entry OpmFIL 2020-02-24 11:41:50 +01:00
Joakim Hove
ae504bcb45
Merge pull request #1499 from totto82/addControlWELTARG
Add production control from WELTARG
2020-02-21 13:25:20 +01:00
Tor Harald Sandve
83a8a9f4fe add test for production control from WELTARG 2020-02-21 12:39:58 +01:00
Atgeirr Flø Rasmussen
f35529d7ff Silence warnings.
- One class vs struct declaration.
 - Unused variables in a test.
2020-02-21 10:49:41 +01:00
Joakim Hove
a3c634b1f8
Merge pull request #1458 from joakim-hove/eclstate-aquifer-config
Eclstate aquifer config
2020-02-20 08:25:25 +01:00
Joakim Hove
aed8c78af5 Move RestartConfig from EclipseState to Schedule 2020-02-19 12:35:07 +01:00
Joakim Hove
59f6cc7c11 Remove moot test 2020-02-19 12:33:50 +01:00
Arne Morten Kvarving
83a7cd04c3 remove unused boost includes
and deal with missing include fallout
2020-02-19 09:51:46 +01:00
Arne Morten Kvarving
2b6754151f add internal replacement for boost::split and use it 2020-02-19 09:29:25 +01:00
Joakim Hove
01aa3692fa Add AquiferConfig to EclipseState 2020-02-18 18:07:02 +01:00
Joakim Hove
7daf77ef59 Added AquiferConfig class 2020-02-18 15:30:09 +01:00
Arne Morten Kvarving
57d88dea7e add a replacement for boost::replace_all and use it 2020-02-18 14:48:40 +01:00
Joakim Hove
fc82988c9c
Merge pull request #1475 from joakim-hove/schedule-addwell-refactor
Add new Schedule::addWell() overload + update Well constructor args
2020-02-18 11:58:37 +01:00
Joakim Hove
084ff09e78
Merge pull request #1476 from joakim-hove/timemap-skiprest
Internalize the existence of SKIPREST in the TimeMap
2020-02-18 11:57:24 +01:00
Joakim Hove
32227236fa Refactor AQUANCON implementation 2020-02-18 07:33:05 +01:00
Joakim Hove
91c886465a
Merge pull request #1478 from akva2/vfp_boost_prune
Drop use of boost::multi_array in VFP classes
2020-02-17 13:57:32 +01:00
Joakim Hove
dd04b1d9df
Merge pull request #1467 from joakim-hove/rst-units
Add units to rst classes
2020-02-17 13:23:01 +01:00
Arne Morten Kvarving
fa572188fa changed: avoid use of boost::multi_array in VFPProdTable 2020-02-17 13:08:14 +01:00
Arne Morten Kvarving
143c8ec3bf changed: avoid use of boost::multi_array in VFPInjTable 2020-02-17 13:08:14 +01:00
Joakim Hove
cad54feafb Internalize the existence of SKIPREST in the TimeMap 2020-02-16 17:53:27 +01:00
Joakim Hove
1b0af2954d Add new Schedule::addWell() overload + update Well constructor args 2020-02-14 14:21:08 +01:00
Atgeirr Flø Rasmussen
fa5050f18a
Merge pull request #1474 from joakim-hove/schedule-add-rst-argument
Schedule add rst argument
2020-02-14 14:00:20 +01:00
Joakim Hove
0b3f885b33 Started to add skeleton load_rst function 2020-02-14 12:51:26 +01:00
Atgeirr Flø Rasmussen
4516b23a14
Merge pull request #1410 from joakim-hove/group-multiple-phases
Support multiple phases in group injection
2020-02-14 11:10:37 +01:00
Joakim Hove
0b2dbf7fc2 GroupInjection is a map over phases + implement topup_phase 2020-02-14 09:30:58 +01:00
Joakim Hove
7da79ae532 Convert rst quantities to SI units 2020-02-14 06:43:25 +01:00
Joakim Hove
36662b2734 Use internal string trim functions instead of boost algorithm 2020-02-13 18:25:37 +01:00
Arne Morten Kvarving
4f63172dc9
Merge pull request #1461 from akva2/use_std_filesystem
Replace boost::filesystem with std::filesystem
2020-02-13 15:01:02 +01:00
Arne Morten Kvarving
fb75bcd4e2 changed: use std::filesystem instead of boost::filesystem
since we still support g++-7, where filesystem is marked experimental,
we introduce a wrapper header and expose the namespace to use
as Opm::filesystem.

for gcc we unconditionally link with libstdc++fs in the python bindings.
the setup.py stuff links as c code, not c++ code, so it is not
automatically added on any gcc version. this might prove unportable
later.
2020-02-13 12:34:19 +01:00
Joakim Hove
bd688edfde Wellsegments are created with constructor 2020-02-13 11:03:14 +01:00
Atgeirr Flø Rasmussen
74129a2866 Silence a few warnings, remove some end-of-line whitespace. 2020-02-13 09:13:29 +01:00
Joakim Hove
9bed25f035 Use common ICDStatus class for both Valve and SpiralICD 2020-02-12 15:09:26 +01:00
Joakim Hove
1a1b796cb6 Refactor Aquifetp class
- Make constructor and operator== for struct
- Make constructor and accessor for serialization
- Initial pressure stored in std::pair<bool, double>
- Add size() and begin() and end()
- Remove unused memmbers cell_id and inftableID
- Use ParserKeywords::AQUIFETP class instead of string lookup
2020-02-07 07:30:22 +01:00
Joakim Hove
140a1c0bf3 Add accessor and constructor for serialization 2020-02-07 07:30:22 +01:00
Joakim Hove
f91630a62d Add operator== to AQuiferCT
Initial pressure is stored as std::pair<bool, double> instead of
std::shared_ptr<double>.
2020-02-07 07:30:22 +01:00
Joakim Hove
a505f59096 Add begin(), end() and size() to AquiferCT class 2020-02-07 07:30:22 +01:00
Joakim Hove
ca4c10f810 Use TableManager in AquiferCT constructor 2020-02-07 07:30:22 +01:00
Joakim Hove
112a0d1f2d Add test for testing of restart loaded well and connection 2020-02-06 11:59:10 +01:00
Bård Skaflestad
8225ea87d4
Merge pull request #1450 from joakim-hove/unitsystem-ecl-id
Add UnitSystem functionality to handle eclipse integer id
2020-02-05 20:42:51 +01:00
Joakim Hove
35a580f610 Add UnitSystem functionality to handle eclipse integer id
Writing of INTEHEAD keyword uses UnitSystem class instead of intermediate enum
UnitSystem.
2020-02-05 07:38:00 +01:00
Arne Morten Kvarving
dab3ba807a changed: simpify Tuning handling
make Tuning a simple struct, and store as a DynamicState<Tuning>.

in the process the unused setTuningInitialValue is removed. it was
only used in unit tests and seem like a leftover
2020-02-04 10:42:43 +01:00
Bård Skaflestad
19ecc3d30e Consider Active Phases When Initializing Satfunc Endpoints
This commit passes the run's notion of its active phases, an object
of type Opm::Phases, through to the initialisation layer for the
saturation functions' scaling properties.  In particular, this
allows us to discriminate between the phases and to not index into
tables or properties that would not be appropriate (e.g., maximum
gas saturation (SGU) in a simulation run without active gas).

Moreover, we now have enough information to know to look for SOF2 in
two-phase run using family II saturation function keywords.  These
changes are necessary in order to extend Flow's support for the
FILLEPS output request to two-phase runs.
2020-01-29 16:34:15 +01:00
Joakim Hove
936f142233 Add class RockConfig under SimulationConfig 2020-01-29 15:04:31 +01:00
Bård Skaflestad
c8d23c8d0a
Merge pull request #1438 from joakim-hove/timemap-schedule-only
TimeMap iterate only over SCHEDULE section

Closes OPM/opm-simulators#2306
2020-01-29 00:08:06 +01:00
Joakim Hove
d36b6fa287 TimeMap iterate only over SCHEDULE section 2020-01-28 20:38:45 +01:00
Arne Morten Kvarving
5e546086fb
Merge pull request #1435 from akva2/hide_fprops_ifaces
changed: hide the templated 'has' and 'get' interfaces in FieldPropsManager
2020-01-28 15:33:49 +01:00
Arne Morten Kvarving
ae10af208f changed: hide the templated 'has' and 'get' interfaces in FieldPropsManager
motivation: an upcoming parallel frontend to the field props manager.
templated functions cannot be virtualized, and thus having these exposed
would give a great chance of confusing the users in the downstream
code, where properties would be caught from the (potentially) empty
backend instead of from the frontend.
2020-01-28 14:31:25 +01:00
Joakim Hove
dcc52eb225 Add testdata 2020-01-28 12:46:18 +01:00
Bård Skaflestad
7c1b77ec5d Internalise TOLCRIT Keyword
This commit internalises the TOLCRIT keyword into the EclipseState
for subsequent use in determining critical saturations when
processing saturation function keywords such as SGOF and SOF3.
Specifically, we add a new type

    Opm::SatFuncControls

that, at present, stores only the TOLCRIT data item (defaulted to
the keyword's default value).  Client code can then retrieve the
value by calling the

    SatFuncControls::minimumRelpermMobilityThreshold()

member function.

Add a new data member of this type to the Opm::Runspec class so that
we complete the chain from EclipseState, and a few simple unit tests
to exercise the expected functionality.
2020-01-24 20:58:38 +01:00
Joakim Hove
db8ded1f09 Pass restart info to TimeMap constructor 2020-01-24 19:27:53 +01:00
Joakim Hove
fc9958bb0c Remove TimeMap( start_time ) constructor 2020-01-22 16:56:42 +01:00
Joakim Hove
63e99fb807 Make mutable accessors in TimeMap private 2020-01-22 16:23:37 +01:00
Joakim Hove
51daf43cef
Merge pull request #1422 from akva2/noecl_flush_prestate
More serialization preparation
2020-01-22 06:30:57 +01:00
Arne Morten Kvarving
48bca722f5 changed: store reference to FieldPropsManager as a pointer
default initialization required for serialization
is not possible with a const ref member
2020-01-21 15:22:10 +01:00
Joakim Hove
691296f91a Remove old 3D property implementation 2020-01-19 23:04:46 +01:00
Bård Skaflestad
8f182db27a Rework RFT Config to Handle More Cases
Generally, this commit captures more of the surrounding context of
calls to the updateRFT() and updatePLT() member functions.  We need
this additional context in order to handle the conflicting semantics
of output requests WRFT and WRFTPLT:FOPN.  The former generates RFT
output when the well opens if this event does not happen earlier in
the simulation schedule than the output request.  Otherwise no RFT
data is emitted.  The latter outputs RFT data at request time if
well opens no later than the request; otherwise at well-open time.

To this end, switch the well_open_rft_name data member from an
unordered_set of well names into an unordered_map from well names to
RFT output request times.  With this additional information we can
use well_open_rft_time to infer the appropriate response to whether
or not to activate RFT output at well open time.  Moreover, we now
guarantee that no RFT output is ever activated before the first RFT
output request.

Switching the type of the well_open_rft_name data member also begets
an API update to the serialization related RFTConfig constructor and
to the return type of RFTConfig::wellOpenRftName().

We furthermore switch to caching the first RFT output event in a new
scalar data member, first_rft_event.  This caching, coupled with the
additional calling context mentioned earlier, means we are now able
to report a high-fidelity, constant time answer to the

    RFTConfig::firstRFTOutput()

request.  This, in turn, is very useful for the RFT output code.
Finally, we also add a couple of new, private member functions to
simplify updating first_rft_event depending on context.

As part of this update, member function

    RFTConfig::setWellOpenRFT(report_step)

will now use the minimum of all 'report_step' values to support the
WRFT keyword being specified more than once.

Finally, add a set of unit tests to exercise the various RFT output
request combinations.

While here, also switch to using unordered_map::find() and emplace()
where possible to limit repeated look-up of the same keys.
2020-01-14 15:58:34 +01:00
Joakim Hove
ecb5fce19b
Only active cells (#1298)
Use FieldProps implementation for 3D properties
2020-01-13 15:46:06 +01:00
Joakim Hove
a6ddce5d92 Add basic Python exec of PYACTION 2020-01-13 15:15:21 +01:00
Joakim Hove
1985f094a3
Merge pull request #1394 from joakim-hove/schedule-update-well
Schedule update well
2020-01-11 17:03:56 +01:00
Joakim Hove
7d1d08d4a8
Merge pull request #1399 from joakim-hove/py-code-records
Py code records
2020-01-11 06:57:45 +01:00
Joakim Hove
35619721a3 Well::updateStatus can optionally update status of connections 2020-01-11 06:55:22 +01:00
Joakim Hove
aa9bab75d9
Merge pull request #1391 from totto82/trinemykk-smartwater
Rebased brine module
2020-01-11 06:50:29 +01:00
Joakim Hove
f3797e8877 Python code must be properly terminated 2020-01-09 09:26:35 +01:00
Joakim Hove
6199b81e60 Use 'PYEND' instead of '<<<' to terminate PYACTION and PYINPUT 2020-01-09 08:21:59 +01:00
Tor Harald Sandve
c5e68b82e8 Fix rebase smartwater 2020-01-08 15:31:35 +01:00
Trine S. Mykkeltvedt
aa19f38a54 Added keywords PVTWSALT and modified SALTVD, WSALT and BDENSITY for a simple salt/brine implementation 2020-01-08 15:31:35 +01:00
Joakim Hove
b65e5547aa
Merge pull request #1386 from joakim-hove/uda-raw-data
Uda raw data
2020-01-07 15:04:29 +01:00
Joakim Hove
6f330a7482 Fixup of alternating records special case 2020-01-06 15:50:36 +01:00
Joakim Hove
b7cebb1907 Refactored the handling of BHP / THP 2020-01-06 15:28:04 +01:00
Joakim Hove
8f6c2c70f6 UDAalue::get<double>() will return raw value - not SI.
Add new function UDAValue::getSI() which will return SI value of numerical
input, and throw an exception if internal state is not numeric.
2020-01-06 12:05:51 +01:00
Joakim Hove
40ea92ac81 Reenable BHP testing 2020-01-06 12:05:51 +01:00
Joakim Hove
d2392c4ea4 Add PyAction skeleton code 2020-01-06 10:28:19 +01:00
Joakim Hove
4e899503e2
Merge pull request #1380 from joakim-hove/split-codegen
Split codegen
2020-01-06 10:27:14 +01:00
Joakim Hove
3c29d4c410
Merge pull request #1385 from akva2/noecl_flush
More serialization preparation
2020-01-03 20:15:31 +01:00
Arne Morten Kvarving
e7e2458951 make Action::AST constructible from variables
also add accessors and equality operator
2020-01-03 13:20:36 +01:00
Bård Skaflestad
5fb4d355ec
Merge pull request #1383 from joakim-hove/fp-section
Fp section
2020-01-03 11:33:54 +01:00
Joakim Hove
c42be3d345 Fixed bug in SORTA and SORTD functions 2020-01-02 20:18:19 +01:00
Joakim Hove
c3a038c2b6 Refactor code generation to facilitate multiple source files 2020-01-02 15:27:54 +01:00
Joakim Hove
141000b750 FieldProps parsing is section aware - handle MULT in EDIT 2020-01-02 15:27:22 +01:00
Joakim Hove
90d30e3bc9 Rename class Section -> DeckSection 2020-01-02 15:27:22 +01:00
Joakim Hove
fbe3d34acb
Merge pull request #1369 from stefoss23/udt
Parser will skip keyword UDT.
2019-12-20 16:30:24 +01:00
Steinar Foss
e2e8d1eb22 Parser will skip keyword UDT.
Parser will skip UDT.
2019-12-20 12:40:20 +01:00
Joakim Hove
4f11b7846c Add support for MULTREGP in FieldProps::porv implementation 2019-12-20 07:28:48 +01:00
Joakim Hove
fde5c0b096
Merge pull request #1359 from joakim-hove/fp-comments
Fp comments
2019-12-20 07:27:17 +01:00
Steinar Foss
a5c245bc6c keyword ROCK: size->UNKNOWN. Added keyword ADSORP.
added keyword ADSOPR w/ test.

keyword ADSORP: size set to NTSFUN, TABDIMS.

keyword ADSORP size shift:1.

ParserTests: added test for kw ROCK.
2019-12-19 15:27:55 +01:00
Joakim Hove
46999f418f Refactored FieldProps
- The lowest level get method is called init_get() - this will unconditionally
  create new keyword. The init_get() method is private.

- Introduced FieldDataManager which keeps track of data pointer and status.

- Refactored get( ) implementation
2019-12-19 15:06:20 +01:00
Atgeirr Flø Rasmussen
7c77d9e2a7
Merge pull request #1351 from joakim-hove/weltarg-unit-conversio
Temporarily bypass the unit conversion in handleWELTARG
2019-12-18 13:56:02 +01:00
Steinar Foss
01b62e4617 added keyword DYNAMICR.
added keyword DYNAMICR.
2019-12-18 09:34:40 +01:00
Joakim Hove
3a87395419
Merge pull request #1348 from joakim-hove/udq-parse-diff
UDQ parse A - B - C
2019-12-17 18:55:06 +01:00
Joakim Hove
46f6aaec02
Merge pull request #1338 from stefoss23/double_records
Can parse keywords of type double-record.
2019-12-17 17:09:11 +01:00
Joakim Hove
89ab99e6b9 UDQ: fix bug with parsing of expressions like A - B - C - D
- In the case of several tokens separated with +/- the final tree is assembled
   from left, was previously from the right. This fixes evaluation bug with
   expressions like A - B - C which were eventually evaluated as A - (B - C).

 - Improved handling of different types; both transiton from scalar to sets of
   wells and groups, and also groups in general. In particular you can now
   assign to a group variable:

        DEFINE GUXXX  WOPR * 0.25

 - Actually hook up the evaluation of group variables from the Summary code.
2019-12-17 16:59:06 +01:00
Joakim Hove
8573c947fa Temporarily bypass the unit conversion in handleWELTARG 2019-12-17 15:28:08 +01:00
Bård Skaflestad
ebfa768fd2 Segment: Make Type Predicates Free Functions
That way, we won't have to pollute the Segment API when adding new
segment types.  While here, also reduce header file coupling by
forward-declaring SpiralICD and Valve in Segment.hpp.
2019-12-17 09:14:17 +01:00
Steinar Foss
0be84e6529 DeckKeyword: double_record style keywords has empty records as block seperators. 2019-12-16 13:11:20 +01:00
Joakim Hove
acd57b2d0a
Merge pull request #1236 from joakim-hove/writeinit-fp
Writeinit fp
2019-12-16 13:08:54 +01:00
Joakim Hove
6b71e30a38 Add test for SOGCR keyword 2019-12-16 12:11:06 +01:00
Joakim Hove
617bb07b0b Add active_size() method to FieldPropsManager 2019-12-16 09:42:40 +01:00
Bård Skaflestad
50181c279d Add Means of Tracking Origin of Connection's CTF
This commit adds a new type (Connection::CTFKind), and new data
member of this type (Connection::m_ctfkin, initialised in the
constructor) that tracks the source of the connection's
transmissibility factor (Connection::m_CF).  The primary user of
this information is the restart file writing code which needs to
know if the connection transmissbility factor is assigned from the
input file (e.g., directly from the COMPDAT keyword) or if the value
is calculated from other information.

Add a convenience predicate function,

    Connection::ctfAssignedFromInput

that returns true if the connection transmissibility factor source
indeed is a direct assignment in the COMPDAT keyword.

Update Connection constructor callers accordingly.
2019-12-15 22:43:35 +01:00
Joakim Hove
a56e4daac7 Add RTEMPVD based initialization of the TEMPI keyword 2019-12-15 19:29:43 +01:00
Steinar Foss
87bbc46bbb can parse keywords of type double-record.
...

ParserKeyword: bool double_records set.

added keywords CECONT.

ParserKeywords: double_records set by keyword generator.

Parsertests: added test for parsing double_records.

ParserKeywords.parse: if double_records returns empty.

double_records keywords set to SLASH_TERMINATED.

...

ParserKeyword: for double records size_type = DOUBLE_SLASH_TERMINATED.

double_records: RawKeyword is Raw::DOUBLE_SLASH_TERMINATED.

RawKeyword uses m_isTempFinished.

Parser: can parse files with double-record keywords.

Parser.cpp/RawRecord.cpp: removed comments.

DeckKeyword has param m_isDoubleRecordKeyword.

test ParseDoubleRecords: double records to have linear structure.

DeckKeyword: Can create records of type double_record.

double-records parser test transferred to ParserTests.cpp.

...

...
2019-12-14 18:42:31 +01:00
Joakim Hove
af1b140723 Some improvements to runtime type conversion when evaluating UDQ 2019-12-13 23:17:07 +01:00
Joakim Hove
b4fd949ca8 Change exception + test 2019-12-13 15:39:34 +01:00
Atgeirr Flø Rasmussen
c343651f44
Merge pull request #1257 from GitPaean/support_wsegvalv
Support wsegvalv
2019-12-11 21:07:11 +01:00
Joakim Hove
dbf276b2db
Merge pull request #1328 from joakim-hove/fp-temp-test
Add some extra testing of FieldPropsManager::get_copy
2019-12-11 15:23:45 +01:00
Kai Bao
aff2baf9f2 adding test for WSEGVALV 2019-12-11 14:38:43 +01:00
Joakim Hove
05b93e7ea1 Add #ifdef for ENABLE_3D_TESTING 2019-12-11 13:20:04 +01:00
Joakim Hove
20c9b0b1e5 Add some extra testing of FieldPropsManager::get_copy 2019-12-11 13:02:27 +01:00
Joakim Hove
20cd54b939
Merge pull request #1324 from joakim-hove/fp-get-temp
Add FieldPropsManager::get_copy() which does not add to container
2019-12-11 12:24:29 +01:00
Joakim Hove
81cdfd46e3
Merge pull request #1318 from joakim-hove/fp-operate
Fp operate
2019-12-11 12:22:53 +01:00
Joakim Hove
6d7b621fb8 Add FieldPropsManager::get_copy() which does not add to container 2019-12-11 08:02:10 +01:00
Joakim Hove
2fb0cd599b PORV is treated more as a regular keyword 2019-12-10 14:06:14 +01:00
Markus Blatt
a1471c80b5 Use ActiveGridCells when filtering connections. 2019-12-10 13:49:04 +01:00
Joakim Hove
0f609083c3 Add support for OPERATE in FieldProps 2019-12-10 11:43:05 +01:00
Joakim Hove
c9111d3785 Change testdata to be compliant with section requirements 2019-12-10 11:43:05 +01:00
Joakim Hove
e96f49c5f9 Implement FieldProps::reset_actnum() instead of reset_grid() 2019-12-08 23:37:51 +01:00
Joakim Hove
8c6755d0f8
Merge pull request #1308 from stefoss23/parserkeyword_alternating_records
introducing keywords using alternating records.
2019-12-08 13:39:58 +01:00