Commit Graph

7916 Commits

Author SHA1 Message Date
Arne Morten Kvarving
29031c6645 linearInterpolation: reimplement tableIndex using stl 2023-10-23 14:31:36 +02:00
Arne Morten Kvarving
568c06192f linearInterpolation.hpp: reformat 2023-10-23 14:31:36 +02:00
Kai Bao
b7ab015e9b introducing a new event type REQUEST_OPEN_WELL
Some SCHEDULE keywords can set a well to be OPEN to open a reviouly STOP or SHUT well.
The well is SHUT/STOP due to various causes (SCHEDULE, economical, physical, etc.)
For now, the WELOPEN, WCONPROD and WCONINJE keywords are considered with this event.
In the future, other keywords can be involved if found to have the
similar OPENing functionality.
2023-10-20 13:07:41 +02:00
Bård Skaflestad
cc4928dfc7 Extract Facility to Form CSR Representations of Graphs
This commit extracts the internal helpers of class

    InterRegFlowMap

out to a new public helper class template, CSRGraphFromCoordinates.
Client code can, at the expense of one additional data member and
some dynamic memory, elect to track the index pairs.  This enables
O(1) assembly per element when used as part of a CSR matrix with a
value array, SA.

Class CSRGraphFromCoordinates does not track values.  It is purely
for the sake of forming the IA and JA structure arrays.  Upon
calling 'compress()', column indices are sorted per row and
duplicate column indices condensed to a single, unique,
representative.
2023-10-18 13:50:31 +02:00
Bård Skaflestad
2d33b520f1
Merge pull request #3684 from vkip/wsegvalv_uda_item4
Facilitate UDA for WSEGVALV item 4
2023-10-17 15:14:22 +02:00
Vegard Kippe
078a987124 Post review update 2023-10-16 10:04:20 +02:00
Bård Skaflestad
8f5ec261ec
Merge pull request #3704 from GitPaean/ptflash_simpletest
various correction to prepare for the PTFlash simulation
2023-10-13 17:56:03 +02:00
Bård Skaflestad
49be8698cc
Merge pull request #3705 from daavid00/sgwfnTable
Support for SGWFN sat functions (format type 2)
2023-10-13 10:30:41 +02:00
Kai Bao
f807281c15 cleaning up and small corrections related to PTFlash 2023-10-12 15:25:32 +02:00
Kai Bao
c3e061cab1 default max iteration number of SSI to be 100
10 was too small.
2023-10-12 14:04:11 +02:00
Trine Mykkeltvedt
cdae1534de various corrections related to component proerties
and viscosity model.
2023-10-12 14:04:11 +02:00
Markus Blatt
b3f4816f07
Merge pull request #3699 from akva2/wlist_in_actionx
Add support for WLIST in ACTIONX
2023-10-12 11:15:23 +02:00
David Landa Marban
5f22fb9bd0 Support for SGWFN sat functions (format type 2) 2023-10-11 23:38:42 +02:00
Markus Blatt
f3bd34df71 Sort header includes as requested.
Sorting criteria is not 100% clear to me though. I hope this does not
break anything...
2023-10-11 11:41:40 +02:00
Markus Blatt
a309dbb4d0 Include missing functional header for g++-12
Fixes
```
/opm/input/eclipse/Schedule/Schedule.hpp:241:14: error: ‘function’ in namespace ‘std’ does not name a template type
  241 |         std::function<std::unique_ptr<SegmentMatcher>()> segmentMatcherFactory(std::size_t report_step) const;
      |              ^~~~~~~~
```
2023-10-10 21:12:15 +02:00
Bård Skaflestad
09ffacb5bf Track Pending Assignments in UDQ Configuration Object
The existing implementation used the UDQ State object to track
pending ASSIGN operations, mainly in terms of the report step index,
but this implies that the logic implicitly assumes an ASSIGN
operation can run at most once per report step.  That assumption
usually holds, but fails if the ASSIGN operation is triggered from
an ACTIONX block that happens to run multiple times within a report
step.

This commit instead introduces a new data member,

    UDQConfig::pending_assignments_

that keeps track of all ASSIGN operations that have been added for
the current report step.  We clear those pending assignments when
forming a new Schedule block (ScheduleState object), under the
assumption that all pending ASSIGN operations have been affected at
the previous time level (report step).

In effect, this new data member assumes the role of

    UDQState::assignments

and we therefore remove that data member and update the signature of

    UDQState::add_assign()

to account for the fact that the 'report_step' parameter is no
longer needed.
2023-10-09 15:32:48 +02:00
Arne Morten Kvarving
a7a84f6f2f added: allowEmpty parameter to Schedule::wellNames
allows bypassing exception if there are no matches.
2023-10-09 08:50:46 +02:00
Arne Morten Kvarving
3f40960469 added: utility function Schedule::isWList
checks if the given pattern is the name of a WList
2023-10-09 08:50:46 +02:00
Tor Harald Sandve
8ed1b4c21e
Merge pull request #3656 from svenn-t/co2store_enthalpy_reference
CO2STORE new reference state for enthalpy
2023-10-06 17:52:25 +02:00
Bård Skaflestad
c93243f939 Rename Segment Matcher Factory Data Member
Invoking the factory creates a segment matcher object, not a new
factory.

Suggested by: [at]blattms
2023-10-05 18:22:07 +02:00
Bård Skaflestad
381ab825b1 Support Segment Level UDQ ASSIGN Statements
This commit adds parser and evaluation logic necessary to handle
ASSIGN statements for segment level UDQs.  This requires a segment
matching facility in UDQConfig::add_assign() which, in turn, must be
passed from the calling context in Schedule::handleUDQ().  Update
APIs accordingly.

We also split handling segment level UDQ assignments to a new helper
function, UDQConfig::add_enumerated_assign(), which might be
generalised to handle block level UDQs in the future.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
cf9b66d8ec Make Derivation of Enumerated Well Items Public
We need this ability to handle segment level UDQ ASSIGN statements
too, so give the operation a well defined home and call it where
applicable.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
72519e3e1f Add Support for Outputting Segment Level UDQs to Summary
This commit adds logic that enables recognizing segment level UDQs
in the summary output writer.  We calculate all segment level UDQs
and add the values to the summary state for possible use in ACTIONX
too.  The latter is not yet tested.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
adab33ac60 Compute Segment Level UDQ Values
This commit adds support for calculating UDQs at the segment level,
i.e., UDQs named 'SU*'.  This necessitates an API change for the UDQ
context constructor and, transitively, every function that forms UDQ
context objects.  We pass a factory function that will create
segment matcher objects on demand, and provide a default
implementation of this factory function in the Schedule class.
2023-10-04 10:44:49 +02:00
Bård Skaflestad
6d3ee57dd5 Define ILBR/ILBS in Terms of Depth First Traversal
The existing algorithm was a little too fragile and dependent on
branch numbers.  This new version starts at segment 1/branch 1 and
follows Segment::inletSegments() in depth-first order, taking care
to enqueue new branches as they're encountered instead of in
numerical order.  We search to the end of each branch before
switching to the next branch.  This ensures determinism regardless
of branch numbering and input ordering.

While here, switch iLBR_ to a WindowedMatrix<int> to simplify branch
references in the output table.
2023-10-02 14:59:55 +02:00
Bård Skaflestad
1d5ae49cdc Set ISEG Open/Shut Flag for Valves
Missing in earlier editions of the segment output code.
2023-10-02 14:25:40 +02:00
Bård Skaflestad
d3bf44ce87 Tidy up Implementation of Aggregate MSW Data Module
This is in preparation of revising the algorithm for ILBR/ILBS.
Mostly splitting long lines, adding missing headers, passing scalars
by value, and making three helper structures private to the
implementation file.  There are no external users of these types.
2023-10-02 14:25:40 +02:00
Svenn Tveit
4769fa7bd6 Fix errors when Scalar = float 2023-09-29 08:27:52 +02:00
Svenn Tveit
6d300b8d13 Ensure that default reference state is used.
Throw error if STCOND is not default or classes are instantiated with (T, P) other than reference values.
2023-09-29 08:27:51 +02:00
Svenn Tveit
e690d06b54 Update enthalpy to same reference state.
New reference state (T, P) = (288.71 K, 101325.0 Pa) = (15.56 C, 1 atm).
2023-09-29 08:25:24 +02:00
Atgeirr Flø Rasmussen
8ff141a592
Merge pull request #3692 from hnil/more_timing
More timing
2023-09-28 15:40:33 +02:00
hnil
b6a0821992 added timing on co2store evaluation and new timing macros 2023-09-28 10:42:20 +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
Vegard Kippe
1594680f35 Take default UDQ value from UDQPARAM 2023-09-21 21:13:47 +02:00
Vegard Kippe
33a27e4e88 Facilitate UDA for WSEGVALV item 4 2023-09-21 13:20:52 +02:00
Tor Harald Sandve
8ea35f2d0d
Merge pull request #3683 from svenn-t/h2store_updates
H2STORE updates
2023-09-21 09:19:57 +02:00
Svenn Tveit
cf4a905660 Fixed compilation warnings 2023-09-18 14:47:35 +02:00
Bård Skaflestad
ef88eb3737
Merge pull request #3681 from svenn-t/cskin
Implementation of CSKIN
2023-09-18 14:11:38 +02:00
Bård Skaflestad
6e0e302796
Merge pull request #3677 from vkip/numaqcell_depth
Ensure numerical aquifer cells get the correct depth
2023-09-15 13:04:33 +02:00
Markus Blatt
bbb46325f0
Merge pull request #3678 from bska/normalise-region-keywords-for-lookup
Normalise Region Level Summary Keywords for Lookup Purposes
2023-09-15 10:35:37 +02:00
Bård Skaflestad
07ddc15068 Calculate Multiplier Values for Non-Neighbouring Connections
This is intended as a possibly temporary measure for processing
explicitly assigned NNCs (keywords NNC/EDITNNC/EDITNNCR) along with
those NNCs arising from numerical aquifers, and for which there is
no associate face direction.

Add a set of unit tests to probe the implementation of all MULTREGT
connection behaviours as exhibited by MULTREGTScanner member
functions getRegionMultiplier() and getRegionMultiplierNNC().
2023-09-14 15:29:58 +02:00
Svenn Tveit
a11becab76 H2STORE updates.
- Enables use with THERMAL. Note that enthalpy of H2 dissolution process is not included due to lack of published data on this (as far as I have seen).
- Enables use with DIFFCGAS and DIFFCWAT.
- Enables use with dynamic brine module.
- New H2 table made with Coolprop which includes enthalpy data.
2023-09-14 12:31:59 +02:00
Svenn Tveit
f933b0e113 Implementation of CSKIN keyword.
To work with WPIMULT, the PI scaling factor had to be stored and applied to calculated CF.
2023-09-14 08:51:01 +02:00
Bård Skaflestad
9a3e8dba23 Normalise Region Level Summary Keywords for Lookup Purposes
Region level summary keywords may have suffixes which refer to user
defined region sets ('FIP*' keyword).  This commit prunes those
suffixes when performing function lookup, so that we do not get
false negatives.

To this end, introduce a new helper function

  EclIO::SummaryNode::normalise_region_keyword()

and use this both when determining the summary keyword type (rate,
cumulative, pressure &c) and when looking up evaluation functions
for region level summary vectors.  The new helper could arguably
have been integrated into the existing 'normalise_keyword()' helper
function, but that would have necessitated a different change
elsewhere in the code base.  For now, we keep this helper as a
separate function.
2023-09-13 18:00:01 +02:00
Vegard Kippe
e23e69d328 Re-introducing another line that somehow was deleted 2023-09-13 15:40:43 +02:00
Vegard Kippe
90b9f30f67 Re-introducing line that somehow was deleted 2023-09-13 15:34:42 +02:00
Vegard Kippe
74d77cfcc4 Renaming as suggested by reviewer 2023-09-13 15:13:58 +02:00
Vegard Kippe
37f62d4b0f Ensure numerical aquifer cells get the correct depth 2023-09-13 13:56:14 +02:00
Bård Skaflestad
51b1cf614d Make Region Multiplier Aware of Aquifer Connections
This commit implements the 'NOAQUNNC' behaviour in member function

    MULTREGTScanner::getRegionMultiplier()

We use the new 'aquifer_cells' data member to identify connections
to and within numerical aquifers and ignore those if the record
stipulates 'NOAQUNNC' behaviour.
2023-09-13 13:42:32 +02:00
Bård Skaflestad
f99ae4b7cc Make MULTREGT Processor Aware of Numerical Aquifers
This commit adds a new data member

    MULTREGTScanner::aquifer_cells

which holds a sorted sequence of Cartesian/global cell indices
corresponding to the cells which comprise the model's numerical
aquifers.  These are needed to properly identify whether or not a
connection--i.e., a cell pair--would constitute a "numerical aquifer
connection" and be subject to 'NOAQUNNC' treatment.

We assign the numerical aquifer cells as part of member function

    EclipseState::conveyNumericalAquiferEffects

which runs at EclipseState construction time.  We know all numerical
aquifers at that point.
2023-09-13 13:42:32 +02:00
Bård Skaflestad
5fc87fa10c Support Regular Expression Suffix for Keyword Matching
This is mostly to have a general solution for matching region level
summary keywords which may reference a user-defined region set (FIP
keyword, e.g., FIPXYZ) through tags like

    RPR__XYZ -- Average pressure in region, FIPXYZ region set
    ROPR_XYZ -- Oil production rate in region, FIPXYZ region set
    RODENXYZ -- Average oil density in region, FIPXYZ region set

The initial approach introduced in commit cfbafc236 was limited to
selected keywords.

To this end, add a new data member

    std::string ParserKeyword::m_matchRegexSuffix

and introduce a new member function

    bool ParserKeyword::matchesDeckNames()

which matches a candidate keyword string against the m_deckNames,
and, if applicable, as a regular expression against m_deckNames when
appended m_matchRegexSuffix.
2023-09-13 11:11:32 +02:00
Arne Morten Kvarving
9f0ea44f9c fixed: initialize data in ConditionalStorage 2023-09-13 10:04:40 +02:00
Bård Skaflestad
b1672210ba
Merge pull request #3669 from steink/well_control_access
Utility functions for manipulation of well-controls
2023-09-12 13:33:53 +02:00
Bård Skaflestad
8cde088e19
Merge pull request #3665 from atgeirr/make-wconinjh-invalid-mode-a-warning
Allow invalid WCONINJH control mode
2023-09-12 13:29:03 +02:00
Atgeirr Flø Rasmussen
92a716fa18 Make it a warning instead of an error to specify an invalid control mode in WCONINJH.
Motivated by the need to accept deck output that contain this error,
that is generated by preprocessing tools.
2023-09-11 17:39:48 +02:00
Bård Skaflestad
1261cf2b5c Remove Unnecessary Semicolons on Closing Braces
These generate diagnostic messages from GCC at '-pedantic' levels.
2023-09-07 17:07:35 +02:00
Stein Krogstad
6ecabdbd7b Add access to injection controls 2023-09-07 13:48:09 +02:00
Stein Krogstad
703431ce61 Add functions to enable edit of prod controls 2023-09-07 13:48:09 +02:00
Bård Skaflestad
53e2758649 Ignore Default Regions in MULTREGT
The MULTREGT keyword has an independent way of defining the default
region--the default value of item 6--and does not need the default
GRIDOPTS-base region protocol of the other *REG keywords.
2023-09-04 10:30:36 +02:00
Bård Skaflestad
f6676fcc1a Reorder MULTREGTScanner Implementation File
Mostly to group related functions and have the same order in the
declaration and the implementation files.  While here, replace an
'enum' with a strong enum since the type does not need to support
arithmetic operations.
2023-09-04 10:30:36 +02:00
Bård Skaflestad
b84c5f46bf Add Method for Identifying Numerical Aquifer Cell IDs
This commit adds a new, focused, member function

  NumericalAquifers::allAquiferCellIds()

which returns a vector of those Cartesian/global cells that have
been marked as defining the model's numerical aquifers through the
AQUNUM keyword.  We intend to use this to identify those NNCs that
go to numerical aquifers--or between numerical aquifer cells--as
those may need special treatment when processing the MULTREGT
keyword.
2023-09-04 08:52:08 +02:00
Vegard Kippe
1728d9d310 Addressing test failure in MulgisegmentWellTests + slight change to avoid modifying Connection.cpp 2023-09-01 15:59:28 +02:00
Tor Harald Sandve
263070f9b4
Merge pull request #3657 from hakonhagland/gecon2
Implement support for GECON keyword
2023-09-01 15:06:36 +02:00
Tor Harald Sandve
1d048e43d2
Merge pull request #3648 from totto82/fix_waghystr
avoid negative C factor
2023-09-01 15:03:02 +02:00
Bård Skaflestad
e179bf87dd Split Keyword Recognition Into Two Parts
The 'base' checks that the input string looks like a valid keyword
and, if so, matches the string against the builtin set of known
keywords.  The full keyword recognition process additionally
includes those keywords that match against keyword collections,
typically the SUMMARY section "meta" keywords in the *_PROBE files.

We will use the 'base' recognition separately to introduce support
for extension keywords with long--more than eight character--names.
2023-08-30 15:27:06 +02:00
Tor Harald Sandve
0fad30d7cb Fix three phase check in waghystr model. Also check for oil phase 2023-08-29 12:39:46 +02:00
Håkon Hægland
612e4c0e9c Move template implementation to header file 2023-08-29 10:36:54 +02:00
Håkon Hægland
7d1f1b103e Move template implementation to header file 2023-08-29 10:28:42 +02:00
Kai Bao
48b759178c fixing the parallel running and testing related to filtrate 2023-08-29 09:08:45 +02:00
Kai Bao
2d35b1e20c adding support for the filtrate summary keywords 2023-08-29 09:08:45 +02:00
Håkon Hægland
bec10dbfbe Implement GECON keyword
Implements support for the GECON keyword.
2023-08-29 01:10:21 +02:00
Vegard Kippe
98adf5a536 Workaround to avoid failing tests, also fixed some tab indenting. 2023-08-28 11:21:34 +02:00
Vegard Kippe
128ba83810 Facilitate using max time step from TUNING/NEXT[STEP] only when specified. Also corrects the persistent behaviour of NEXTSTEP. 2023-08-28 11:21:33 +02:00
Kai Bao
0c64a142c1 removing the vfp_table member from Group class
after GRUPNET is processed, vfp_table is not useful for GROUP class
anymore.
2023-08-25 00:21:45 +02:00
Kai Bao
9a7147bead handle UDQ value for WINJFCNC
restarting related is missing for now
2023-08-23 11:44:13 +02:00
Tor Harald Sandve
e08a4efe65 avoid negative C factor 2023-08-22 12:23:38 +02:00
Bård Skaflestad
f32ff86638 Use Existing Cartesian-to-IJK Functionality
This commit replaces the data members 'nx', 'ny', and 'nz' with a
copy of the GridDims object passed as an argument to the
constructor.  In turn, this enables using GridDims::getIJK() to
compute the cell's IJK tuple from its global Cartesian index instead
of implementing the same calculation locally (and incorrectly).

While here, also include the layer index (K) in determining whether
or not a connection is an NNC, and do this just once instead of once
for each MULTREGT record.  Cells (I,J,K) and (I,J,K+3) might be
connected across pinched-out layers and for the purposes of MULTREGT
that connection should be treated as an NNC.
2023-08-21 11:41:03 +02:00
Bård Skaflestad
2c74d036d6 Tidy Up MULTREGT Scanner Files
In particular, ensure that we include all requisite headers, hide
type aliases that are not needed outside the class, consistently use
std::size_t, split a few long lines, and switch to range-for in one
location.
2023-08-21 11:41:03 +02:00
Bård Skaflestad
2dc650ff72 Switch to Numeric Indices for Record References
A numeric index serves the same purpose as a pointer in this very
specific instance and also has the benefit of being easily
transferable between processes.  This, in turn, means we can remove
the 'getSearchMap()' and 'constructSearchMap()' member functions.
2023-08-21 11:40:44 +02:00
Kai Bao
13eaf8a271 adding unit area 2023-08-17 13:55:33 +02:00
hnil
d157bd627f add THELCOEF field property
this is the thermal expansion coefficient for each cell in a mechanics model
write this to the .INIT file for relevant models
2023-08-17 11:54:18 +02:00
hnil
861be6be91 add THERMEXR field property
this is the thermal expansion ratio for each cell in a mechanics model
write this to the .INIT file for relevant models
2023-08-17 11:54:18 +02:00
hnil
1948dc5d51 add PRATIO field property
this is the Poisson's ratio for each cell in a mechanics model
write this to the .INIT file for relevant models
2023-08-17 11:54:18 +02:00
hnil
27dcd6e246 add POELCOEF field property
this is the coefficient of elasticity for each cell in a mechanics model
write this to the .INIT file for relevant models
2023-08-17 11:54:18 +02:00
hnil
191364d2f3 add BIOTCOEF field property
this is the Biot coefficient for each cell in a mechanics model
write this to the .INIT file for relevant models
2023-08-17 11:54:18 +02:00
hnil
6ed7370db3 add STRESSEQUILNUM field property
this is used to set the stress equilibration region for cells in
mechanics models
2023-08-17 11:54:18 +02:00
hnil
217f8f7b60 add YMODULE field property
this is the Young's modulus for each cell in a mechanics model
write this to the .INIT file for relevant models
2023-08-17 08:34:51 +02:00
hnil
3a66f7c9b6 added: Ymodule dimension in UnitSystem 2023-08-17 08:14:09 +02:00
Bård Skaflestad
58ff8944c4
Merge pull request #3636 from akva2/mech_bc
Add support for MECH boundary conditions
2023-08-16 16:52:21 +02:00
Bård Skaflestad
0c037db51c
Merge pull request #3635 from akva2/add_strequil
Add STREQUIL keyword and internalization
2023-08-16 16:12:19 +02:00
Bård Skaflestad
6e4c37d05f
Merge pull request #3634 from akva2/mech_runspec
-- added MECH to runspec
2023-08-16 16:11:38 +02:00
hnil
614d71666d add mech boundary conditions 2023-08-16 15:56:45 +02:00
hnil
a0ba0be7cc -- added stress equilibrium data for initconfig 2023-08-16 15:13:38 +02:00
Arne Morten Kvarving
111aa44936 changed: refactorize Equil class into a container template over a record type
make Equil a type alias for EquilContainer<EquilRecord>
2023-08-16 15:13:38 +02:00
Arne Morten Kvarving
df6345e15d EquilRecord: add in-class initializers
then we can default the default constructor
2023-08-16 15:13:38 +02:00
Arne Morten Kvarving
a93e285552 changed: add EquilRecord::serializationTestObject
and use this in Equil::serializationTestObject()
2023-08-16 15:13:38 +02:00
Arne Morten Kvarving
89f59e0050 changed: add a DeckRecord constructor for EquilRecord and use this in Equil 2023-08-16 15:13:38 +02:00
hnil
980a160651 -- added MECH to runspec 2023-08-16 14:15:23 +02:00
Bård Skaflestad
f68fe9b484 Properly Classify Capillary Pressure Keywords
These are not directionally dependent, and they have a unit string
of 'Pressure'.  This didn't use to matter, but upcoming changes
will depend on the unit string being correct.
2023-08-15 17:27:47 +02:00
Bård Skaflestad
5495eca413 Properly Remove 'satfunc' Macro
The macro should not escape the FieldProps.hpp header.
2023-08-15 17:27:47 +02:00