Commit Graph

7916 Commits

Author SHA1 Message Date
Kai Bao
aafafba4b1 draft version of handling keyword WINJCLN 2023-06-27 15:50:54 +02:00
Kai Bao
781f7f2a96 revising FilterCake class for downstream use 2023-06-27 15:50:54 +02:00
Kai Bao
a335542424 adding accessing function for FilterCake for Connection 2023-06-27 15:50:54 +02:00
Kai Bao
3bc451ad94 parsing WINJFCNC 2023-06-27 15:50:54 +02:00
Kai Bao
5e1b398550 parsing the keywor WINJDAM 2023-06-27 15:50:54 +02:00
Kai Bao
e94c1aa386 WIP in supporting the keyword WINJDAM 2023-06-27 15:50:54 +02:00
Bård Skaflestad
d9cfd1288a Reimplement WBPn Calculation Procedure
This commit implements the WPAVE keyword and its associate WBPn
well level report quantities.  We support all valid settings of
WPAVE and WWPAVE.  The various weighted averages are accumulated
through compensated summation of both the numerator and denominator
terms for the inner block, the direct/immediate level 1 neighbours,
and the diagonal level 2 neighbours.  We combine those contributions
to the WBP, WBP4, WBP5, and WBP9 terms when we "commit" the
contributions (Accumulator::commitContributions()), per connection
for values weighted by the connection transmissibility factor, and
per well for values weighted by pore volumes.

We distinguish OPEN from ALL connections through callback functions
in the implementation of accumulateLocalContributions() and the per
connection weighting terms are provided as another set of callback
functions depending on the value of the inner block weighting factor
F1.

Depth correction (NONE, WELL, or RES) is affected through a separate
set of callback functions used in the implementation of
'connectionPressureOffset'.

We discover source locations in a two-step process.  At WBPn
calculation construction time, we exclude only those cells that are
outside the model's dimensions.  The user is then expected to call
member function pruneInactiveWBPCells(), typically at the
CalculatorCollection level, at a later time in order to prune
inactive cells.  This two-step split is necessary because we do not
have a complete global view of the model's active cells in a
parallel run.  It is very possible that the WBPn calculation on one
rank will require source values from another rank and that begets
this extra caution.

The user must call inferBlockAveragePressures() to compute the WBPn
values.  Once completed, the result values may be extracted by
calling member function averagePressures().  We expect that the user
will provide a complete set of up-to-date source values when calling
this member function, both at the reservoir and the well connection
levels.
2023-06-22 16:46:54 +02:00
Bård Skaflestad
c6d4a635e3
Merge pull request #3577 from GitPaean/fixing_winjmult
separating the WINJMULT for well and connections
2023-06-22 12:53:27 +02:00
Kai Bao
9572d5ecf3 addressing the reviewing comments for PR #3577 2023-06-22 11:59:45 +02:00
Bård Skaflestad
f8d9f74d91 Reformat PAvg Class
Mostly for readability.  While here, also switch to using compiled
item names instead of raw strings to access the DeckItems which
constitute the WPAVE and WWPAVE keywords.
2023-06-21 13:46:28 +02:00
Kai Bao
68e586bf7a separating the WINJMULT for well and connections
with more testing, it looks like when multiple records are entered. The
records with WREV mode and records with CIRR and CREV modes work
differently in term of overwriting the previous records. So it is
necessary to store them separately.
2023-06-21 11:38:31 +02:00
Bård Skaflestad
dda3effdb3
Merge pull request #3570 from svenn-t/ppcwmax
Implementation of PPCWMAX
2023-06-16 15:04:03 +02:00
Svenn Tveit
32692b750e Added actual values to serialization test 2023-06-16 11:33:52 +02:00
Tor Harald Sandve
7f33731d19 BUG: Use salinity values when salt concentration (BRINE) is not considered 2023-06-16 10:03:56 +02:00
Svenn Tveit
af3f44423b Changed from std::tuple to std::pair 2023-06-15 14:59:42 +02:00
Tor Harald Sandve
c270dc2ff3 Minor clean-up and fixes of the WAG hysteresis model 2023-06-15 12:31:27 +02:00
Svenn Tveit
89f0b2c31e Changes in docstring and removed include 2023-06-15 12:26:43 +02:00
Ove Sævareid
34a9d9c949 Some support for WAG hysteresis (material). 2023-06-15 11:22:44 +02:00
Ove Sævareid
0fc0b6f4fa Some support for WAG hysteresis (input). 2023-06-15 11:18:58 +02:00
Bård Skaflestad
fdfbecc742
Merge pull request #3572 from hnil/ecldefault
-- added function need to test solver without multiplexer
2023-06-14 16:26:44 +02:00
hnil
3b06ff2757 -- added function need to test solver without multiplexer 2023-06-14 14:37:07 +02:00
Bård Skaflestad
bca989343c
Merge pull request #3161 from GitPaean/support_winjmult
adding the parsing support for keyword WINJMULT
2023-06-14 14:32:00 +02:00
Bård Skaflestad
e6590f2169 Fix A Couple of Compiler and Static Code Analysis Warnings
In particular

  * Tag a single argument constructor as 'explicit',
  * Remove an unused private function
  * Fix mismatched tags (struct vs. class) in forward declaration
  * Return 'false' in an impossible updateHyst() case

While here, also use a real UnitSystem object instead of creating
a METRIC system just to infer unit strings.
2023-06-14 13:31:41 +02:00
Bård Skaflestad
f46b90f5db
Merge pull request #3568 from bska/fix-udq-assign-well-level
Don't Run ASSIGN on Every Report Step
2023-06-14 11:59:22 +02:00
Bård Skaflestad
250c8b7a1c
Merge pull request #3458 from hnil/changed_hyst
Changed hyst
2023-06-14 10:34:34 +02:00
Bård Skaflestad
c33b94ca3a Default UDQ Assignments to All Wells in Model
An assignment of the form

    ASSIGN WUPPERTAL 354.572 /

should create a UDQ set of size equal to the number of wells in
the model, not just the wells already flowing-especially if the
assignment happens on the very first report step before any wells
are flowing.
2023-06-14 09:46:10 +02:00
hnil
12da4dbe02 --changed for bska comments. All tests ok locally 2023-06-14 09:31:20 +02:00
Svenn Tveit
de814bc577 Apply PPCWMAX in SWATINIT calculations.
Note that re-calculation of initial water saturation (after PPCWMAX is applied) is currently done in opm-simulators.
2023-06-14 08:33:51 +02:00
Svenn Tveit
ccc010c8d3 Internalize PPCWMAX as vector of structs 2023-06-14 08:33:51 +02:00
Markus Blatt
90497b745b
Merge pull request #3556 from akva2/multflt_grid_and_edit
fixed: properly combine MULTFLT from GRID and EDIT
2023-06-14 07:16:02 +02:00
Kai Bao
edd762c084 cleaning up the implementation related to WINJMULT 2023-06-13 15:10:56 +02:00
hnil
b50cef1af2 added fix based on review 2023-06-13 14:39:42 +02:00
hnil
f8d652f758 - fixed missing return after adding change 2023-06-13 14:39:42 +02:00
hnil
d0422bfc74 -- added bool return value of hysteresis update.
-- this make it possible to localy update intensive quanities if something changed.
2023-06-13 14:39:42 +02:00
Kai Bao
759f0b8449 revising the function handleWINJMULT a little bit 2023-06-12 10:42:15 +02:00
Kai Bao
a8a10bb81f InjMultMode is assigned to per well
not per connection anymore based on new finding in the reference result.
2023-06-12 10:42:15 +02:00
Kai Bao
2f8f019226 updating the WINJMULT keyword with correct dimension 2023-06-12 10:42:15 +02:00
Kai Bao
da17ef3174 adding the parsing support for keyword WINJMULT 2023-06-12 10:42:15 +02:00
Bård Skaflestad
c7d6604d98 Add Container for Dynamic WBPn Source Values
This commit adds a new container class,

    PAvgDynamicSourceData

which wraps a single vector<double> which in turn backs source data
items for

    - pressure values
    - fluid mixture densities
    - dynamic pore-volumes

at a collection of source locations-active cells or well reservoir
connections.  We provide read-only and read-write accessors to the
underlying data items for a single source location through subscript
operator (read only) and named assignment (set(), read-write) member
functions.  The latter is available only when the underlying range
of data values is mutable (e.g., SourceDataSpan<double>) as opposed
to immutable (e.g., SourceDataSpan<const double>).
2023-06-09 15:42:46 +02:00
Bård Skaflestad
89bc182876 Prepare for Revised Implementation of WBPn
This initial commit changes the Summary class's API for consuming
block-averaged well level pressure values (summary keywords WBPn).
The former approach was intended to consume a collection of source
values--pressures, densities, and pore-volumes--and then to defer
calculation of the WBPn summary vectors to the Summary class.

This commit introduces a 'WellBlockAvgPress' container class which
holds precomputed WBPn results and the intention is to move the
calculation to the simulator side for greater parallelism.
2023-06-09 13:29:10 +02:00
Arne Morten Kvarving
b7a888fcfa fixed: properly combine MULTFLT from GRID and EDIT 2023-06-08 10:12:41 +02:00
Håkon Hægland
5a99e005fb Fixed naming convention 2023-06-02 09:24:59 +02:00
Håkon Hægland
2f260fe90a Fixed SWell indices 2023-06-02 09:24:59 +02:00
Håkon Hægland
0d38acebaf Set correct default value 2023-06-02 09:24:59 +02:00
Håkon Hægland
5463420a85 Add support for WVFPDP 2023-06-02 09:24:59 +02:00
Arne Morten Kvarving
39006ecd71 added: setters for the vappars in pvt classes 2023-06-01 11:03:20 +02:00
Arne Morten Kvarving
51aecfb2de fixed: apply VAPPARS from SOLUTION section 2023-05-31 15:13:55 +02:00
Bård Skaflestad
5a79e0f8fb Test Dynamic Segment Dimensions Against WSEGDIMS Limits
In particular, check that

  1. Number of MS wells <= WSEGDIMS(1)
  2. Number of segments per well <= WSEGDIMS(2)
  3. Number of branches per well <= WSEGDIMS(3)

for all report steps in the simulation run.

Example diagnostic message of a case that violates limits 2 and 3:

Error: Problem with keyword WSEGDIMS
  In CASE.DATA line 60
  The case has a multi-segmented well with 246 well segments, but at most 200 are allowed in WSEGDIMS.
  Please increase item 2 of WSEGDIMS to at least 246

Error: Problem with keyword WSEGDIMS
  In CASE.DATA line 60
  The case has a multi-segmented well with 105 lateral branches, but at most 5 are allowed in WSEGDIMS.
  Please increase item 3 of WSEGDIMS to at least 105
2023-05-30 11:47:50 +02:00
Bård Skaflestad
0bc74799ca
Merge pull request #3465 from plgbrts/well-specs-new
adding defaults to json files
2023-05-30 11:43:53 +02:00
Paul
4d5b4aba2b changed return type to reference-to-const 2023-05-30 10:49:52 +02:00
Tor Harald Sandve
a456c36a31
Merge pull request #3513 from goncalvesmachadoc/gasvisct
Implement GASVISCT for black-oil [Bug fix]
2023-05-30 08:37:46 +02:00
Arne Morten Kvarving
3e4146030e checkFluidSystem: improve output
as this is called multiple times for a fluidsystem
we get duplicate output. improve by also including the
other template parameters in the output.
2023-05-24 22:04:39 +02:00
Bård Skaflestad
35264e7ab8
Merge pull request #3530 from akva2/janitoring
Some janitoring
2023-05-22 23:49:47 +02:00
Arne Morten Kvarving
b68f5f1226 add arguments by const ref 2023-05-22 22:08:12 +02:00
Arne Morten Kvarving
9ba304f5cf BrineH2Pvt: include prerequisite headers
in particular the missing header broke build with -DNDEBUG
2023-05-22 22:01:54 +02:00
Arne Morten Kvarving
e6280fc80d add override qualifier to virtual methods 2023-05-22 20:53:33 +02:00
Tor Harald Sandve
005ff3e982
Merge pull request #3445 from svenn-t/h2store
Hydrogen-brine simulations - H2STORE
2023-05-22 11:23:48 +02:00
Bård Skaflestad
c000ad101a
Merge pull request #3517 from totto82/outputhyst
Add method to get trapped saturation for output
2023-05-19 09:56:36 +02:00
Bård Skaflestad
82226cc0b9
Merge pull request #3527 from akva2/explicit_ctors
mark constructors explicit
2023-05-16 12:06:54 +02:00
Arne Morten Kvarving
6553e8d0b7 mark constructors explicit 2023-05-16 10:50:01 +02:00
Bård Skaflestad
4308305421
Merge pull request #3433 from totto82/brine_co2store
Combine brine + co2store
2023-05-16 10:25:32 +02:00
Paul
05d59a14f4 add throw in case a well has a non-increasing MD column 2023-05-12 16:14:58 +02:00
Tor Harald Sandve
1aff5fc604 add test that compares Brine and BrineDynamic 2023-05-12 09:07:55 +02:00
Bård Skaflestad
6895568a21
Merge pull request #3507 from akva2/fix_dyneval_format
fixed: handle dynamically sized evaluations in {fmt} formatter
2023-05-11 21:27:32 +02:00
Arne Morten Kvarving
d599c6874d EclThermalConductionApproach: convert to enum class 2023-05-11 08:46:25 +02:00
Arne Morten Kvarving
7d38661810 EclSolidEnergyApproach: convert to enum class 2023-05-11 08:40:44 +02:00
Tor Harald Sandve
c3a3d894df Add method to get trapped saturation for output 2023-05-10 15:25:47 +02:00
goncalvesmachadoc
abaa1074ff implement gasvisct 2023-05-09 10:48:25 +02:00
Bård Skaflestad
53383fd875 Sort headers in alphabetical order 2023-05-08 22:40:24 +02:00
Bård Skaflestad
b17d618c7b Use memcmp() from namespace std
Don't rely on clients using

    #include <string.h>

before including cmp.hpp .
2023-05-08 22:40:14 +02:00
Arne Morten Kvarving
392d57d02a fixed: handle dynamically sized evaluations in {fmt} formatter 2023-05-05 11:01:13 +02:00
Tor Harald Sandve
4f3b67fa77 use 58.44 as molar mass of salt 2023-05-04 09:48:03 +02:00
Tor Harald Sandve
46f5558b59 Combine brine and the co2store module
This commit allows for dynamically changes in salinity in the co2 storage module

I.e. It allows for modeling salt precipition for co2 storage cases.
2023-05-03 15:09:06 +02:00
Bård Skaflestad
9a5b3721cb Dimension Segment Related Restart Arrays According to Dynamic Size
The [IR]SEG and ILB[RS] arrays must be able to accommodate the
maximum number of segments and branches used in the run.  This
commit incorporates the dynamic maximum sizes.  If those sizes
exceed the maximum values entered in WSEGDIMS, then the resulting
restart file will not be fully compatible with other simulation
software.
2023-05-02 09:44:06 +02:00
Paul
b171cbc3af Calculate headI/headJ from trajectory data when they are defaulted in WELSPECS 2023-04-26 17:30:53 +02:00
Bård Skaflestad
91bb2b47e7 Use Base Class' serializeOp() Where Possible
Classes which inherit from FlatTableWithCopy and just call the base
class implementation of 'serializeOp()' don't really need a separate
implementation of that member function.

Noticed by: [at]blattms.
2023-04-26 15:29:12 +02:00
Bård Skaflestad
5cdeb6137b Implement Proper Record Copying Behaviour for ROCK
This commit adds the expected behaviour for all-defaulted records in
ROCK, provided the all-defaulted records are not the first of the
keyword.  Similarly to, e.g. PVTW, all-defaulted records are treated as
copies of the immediately preceding record.

In other words, given

    ROCK
    -- REF. PRES   COMPRESSIBILITY
       280.000        5.6E-5 /
    /

the second record is supposed to be a copy of the first.
2023-04-26 14:29:28 +02:00
Markus Blatt
8beebd49e3
Merge pull request #3485 from atgeirr/allow-field-wells
Allow FIELD group as parent for wells
2023-04-26 14:14:33 +02:00
Markus Blatt
f16b433b53
Merge pull request #3484 from akva2/fix_udqdefine_serialize
fixed: missing serialization of tokens in UDQDefine
2023-04-26 12:54:52 +02:00
Atgeirr Flø Rasmussen
33843346b4 Use ParseContext system to handle well under FIELD situation.
Also downgrade from a throw to a warning.
2023-04-26 11:43:21 +02:00
Arne Morten Kvarving
6ff355a141 fixed: missing serialization of tokens in UDQDefine
this went unnoticed since there are no UDQDefines in the pre-simulation
Schedule broadcast for parallel. however it causes issues for serialized
restarts
2023-04-26 11:35:12 +02:00
Bård Skaflestad
599194191d Implement Full Size Protocol for ROCK Keyword
This commit adds a special case for handling the dynamic nature of
the number of records in the ROCK keyword.  In particular, if the
ROCKOPTS keyword is NOT entered before ROCK, then the number of
records is NTPVT--item 2 from TABDIMS.  Conversely, when ROCKOPTS is
entered before ROCK, the number of records in the latter depends on
the setting in item 3 of ROCKOPTS.

This interaction cannot be easily captured in our JSON-based models,
so we introduce a special size class, SPECIAL_CASE_ROCK, that only
applies to the ROCK keyword and implement the logic in a dedicated
function in 'Parser.cpp'.  Once we have determined the correct
number of records, we form a RawKeyword of type FIXED and defer
further processing to the existing handling of fixed-sized keywords.

Add a selection of unit tests to exercise the new behaviour.
2023-04-24 12:54:41 +02:00
Bård Skaflestad
2c6f08269d Prefer Data to Logic
Switch if/else chain out in favour of a map-based approach.  This
simplifies adding new enumerators.  While here, also return string
objects instead of constant string objects.
2023-04-24 12:54:41 +02:00
Kai Bao
909cfdcdb7 removing Well::canOpen() function
which is not needed anymore.
2023-04-14 11:17:28 +02:00
Bård Skaflestad
134a4dbef4
Merge pull request #3459 from blattms/internalize-editnncr
Internalize EDITNNCR keyword and make it available with the other NNC information.
2023-04-13 10:33:49 +02:00
Svenn Tveit
cf185442b9 Accommodate new Rvw input 2023-04-12 14:50:34 +02:00
Svenn Tveit
e8119e7adb Fix narrowing warnings 2023-04-12 14:28:02 +02:00
Svenn Tveit
620008ac06 Throw runtime error and comment out unused input.
Should fix return-type and unused-parameter warnings.
2023-04-12 14:28:02 +02:00
Svenn Tveit
451a4d7657 Enable GAS/WATER with DISGASW in H2-brine PVT 2023-04-12 14:28:02 +02:00
Svenn Tveit
fb70d31ba0 Update to restructure and latest developments. 2023-04-12 14:28:02 +02:00
Svenn Tveit
423141eb30 Re-add information lost in rebase 2023-04-12 14:28:02 +02:00
Svenn Tveit
9ae33902f1 rsSat=0 when DISGAS is disabled.
See commit: d546a8bb9c2fb4ed1697dab1878b8de3a81a26bc
2023-04-12 14:28:02 +02:00
Svenn Tveit
816300e8f2 Lookup table for density instead of calculating it
Significant speed-up since we don't need to run bisection anymore!
2023-04-12 14:28:02 +02:00
Svenn Tveit
11ff66a4bd Accommodate for Rvw implementation.
See commit: 3a25016eb09b8c87d11ca172d5170b935c675bd2
2023-04-12 14:28:01 +02:00
Svenn Tveit
9d54988d14 Diffusion coefficient for H2.
NOTE: while the diffusion in pure water is based on experimental data, diffusion in brine is dubious at best (no experimental basis).
2023-04-12 14:28:01 +02:00
Svenn Tveit
c2e0ea5721 Accommodate for implementation of vaporized water.
See commit: e74901b63f5e5db938dfa5760c5ed72116d4451e
2023-04-12 14:28:01 +02:00
Svenn Tveit
1fe37f7b60 Correction in volume factor calculations.
See commit: 8c2f3f6f37c57f3d772f0ee4d4332f6a6f19f3bf
2023-04-12 14:28:01 +02:00
Svenn Tveit
066601ae52 Improved H2 property calculations.
Most H2 properties are calculated using Helmholtz free energy EOS.
Moved Helmholtz equations from Brine_H2 to H2 class.
New file with simple H2 property calculations based on ideal gas.
2023-04-12 14:28:01 +02:00
Svenn Tveit
ef94fb8896 Corrected unit errors.
Pressure in MPa and apparent molar volume in m3/mol.
2023-04-12 14:28:01 +02:00
Svenn Tveit
437ff4691d Calculate H2 mole fractions directly.
More robust bisection method to get reduced density.
Erroneous T_red (it was supposed to be the reciprocal red. temp.)
2023-04-12 14:28:01 +02:00
Svenn Tveit
4eaf199dbe Minor fixes to make it compile 2023-04-12 14:28:01 +02:00
Svenn Tveit
fa12917a6c Added missing conversion function 2023-04-12 14:28:01 +02:00
Svenn Tveit
f5d02c8049 Remove duplex gasViscosity 2023-04-12 14:28:01 +02:00
Svenn Tveit
f400b3b189 Brine-H2 PVT model To be used with H2STORE
Mostly copied CO2STORE and added specifications for brine-H2.
2023-04-12 14:28:01 +02:00
Svenn Tveit
337b24de87 Added hydrogen component.
Most of this is copied from Dumux with some additions and modifications.
2023-04-12 14:28:01 +02:00
Svenn Tveit
c7713c41f5 Added H2STORE keyword.
Activates H2-Brine PVT models in opm-material.
2023-04-12 14:28:01 +02:00
Markus Blatt
5a19bcc4d0 Remove NNC entries that correcpond to EDITNNCR
No need to keep those as they will be overwritten anyway.
2023-04-12 10:22:35 +02:00
Markus Blatt
f2ffebc814 Internalize EDITNNCR and make it available with the NNC information.
If there is an EDITNNCR entry and a NNC entry for the same cell pair
then the EDITNNCR entry is not be represented inernally but we simply
overwrite the transmissibility of the corresponding NNC entry.

If there is an EDITNNC entry and an EDITNNCR entry for the same cell
pair then the EDITNNC entry is removed while internalizing EDITNNCR.

Order matters for EDITNNCR entries in the sense that later specified
values will overwrite previous entries when we internalize.

Note that similar to EDITNNC only the first 7 options are represented
and the rest is ignored by OPM flow.

Note that EDITNNCR entries for neighboring cells are ignored (like for
EDITNNC).
2023-04-12 10:22:34 +02:00
Markus Blatt
fb3c2ab5a1 Removed unimplemented declaration of NNC::update_nnc. 2023-04-12 10:22:34 +02:00
Arne Morten Kvarving
dcd5ecf0d1
Merge pull request #3414 from akva2/require_dune_2.7
minimum dune version required is now 2.7
2023-04-12 09:19:14 +02:00
Markus Blatt
24d25f7be7
Merge pull request #3384 from plgbrts/well-traj
Grid independent well specification
2023-04-10 07:40:08 +02:00
Paul Egberts
a6d39275c7 code improvements following suggestions of Markus 2023-04-04 21:49:03 +02:00
Kai Bao
548881395e add const for WaterPvtMultiplexer::waterReferenceDensity(unsigned) 2023-04-03 12:59:43 +02:00
Bård Skaflestad
200b6a2cbc
Merge pull request #3456 from blattms/support-pinch-maxgap
EclipseGrid: make option 3 (MAX_EMPTY_GAP) of PINCH available
2023-03-30 15:18:01 +02:00
Markus Blatt
3706aae429 Fixed default initialization of EclipseGrid. 2023-03-30 14:03:01 +02:00
Paul Egberts
7b0156f6cc Placed ResInsight code in separate namespace called external 2023-03-29 17:24:13 +02:00
Paul Egberts
3ba31d4304 finalizing and cleaning up 2023-03-29 17:20:54 +02:00
Paul Egberts
46f412e60a Processing WELTRAJ/COMPTRAJ; Calculation of intersected cells and CFs 2023-03-29 17:05:39 +02:00
Paul Egberts
067e645e22 This is a combination of 5 commits.
Reorganizing and renaming files
2023-03-29 17:05:39 +02:00
Paul Egberts
532b626e56 try out code 2023-03-29 17:03:56 +02:00
Paul Egberts
65eff452e3 reading new tables for grid independent well specification 2023-03-29 17:03:56 +02:00
Bård Skaflestad
0be5bee7c4
Merge pull request #3457 from totto82/addThermalBC
add THERMAL option to BC
2023-03-29 14:07:45 +02:00
Bård Skaflestad
cbb808b579
Merge pull request #3455 from totto82/diffc_co2store
Support DIFFCGAS and DIFFCWAT for the CO2STORE module
2023-03-29 13:41:40 +02:00
Markus Blatt
ea64c29001 Added missing forward declaration to make TransMult.hpp usable standalone. 2023-03-28 15:40:21 +02:00
Tor Harald Sandve
8c8851039c Add hysteresis in water gas 2p model 2023-03-28 12:39:01 +02:00
Tor Harald Sandve
3cd2539b7a add THERMAL option to BC 2023-03-28 12:04:24 +02:00
Markus Blatt
055547c709 EclipseGrid: make option 3 (MAX_EMPTY_GAP) of PINCH available
This is needed to prevent creation of NNCs if the the empty gap created
by pinched out cells is larger than this threshold.
2023-03-28 11:55:14 +02:00
Tor Harald Sandve
bf7cef4ebd Support DIFFCGAS and DIFFCWAT for the CO2STORE module 2023-03-27 10:15:54 +02:00
Tor Harald Sandve
92b0477a14 cleanup based on review 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
f8a61f537b return gas density directly when no vaporized water to avoid numerical inpresition in division 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
3b43c5bae8 set enable vaporization 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
63340df84e Compute mixture innerEnergy and denisty assuming ideal mixtures 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
a94a84221b compute internal energy not enthalpy 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
dd36c0b558 renaming from Oil to Water 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
b5ac472f14 add convert XgWToxgW 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
c84c1d54dd Add vapporized water to gas in co2brine model 2023-03-24 12:24:16 +01:00
Tor Harald Sandve
7526a7bb77
Merge pull request #3452 from totto82/fixThermalCO2
Fix thermal + co2
2023-03-22 11:06:52 +01:00
Bård Skaflestad
303889516f Load Constant Flux Aquifer Objects from Restart File
This commit adds logic and structures for bringing in constant flux
aquifer objects-keyword AQUFLUX-from the restart file and forming
the requisite dynamic objects in the Schedule.

In particular, the 'RstAquifer' gets a new bare-bones representation
of these aquifer types and we add new constant flux aquifer objects
to the pertinent 'ScheduleState' when these exist.  We also add this
aquifer type to 'data::Aquifers' in preparation of reinitialising
the simulator's aquifer container from the restart file.  In
particular, this needs the total produced volume from the aquifer so
far.
2023-03-21 17:50:24 +01:00
Bård Skaflestad
f8f77ff081
Merge pull request #3076 from goncalvesmachadoc/carfinManager
Read CARFIN and create LGR object
2023-03-21 17:46:18 +01:00
hnil
352e2a8316 -fixed missing include 2023-03-17 17:06:30 +01:00
goncalvesmachadoc
7c29f6c2a5 test read name 2023-03-17 14:26:26 +01:00
goncalvesmachadoc
ca08609810 rebase 2023-03-17 14:26:25 +01:00
Bård Skaflestad
7f1e56e436 Adjust Whitespace in Data::Solution Implementation
In preparation of enabling in-place construction in insert().
2023-03-16 16:15:41 +01:00
Tor Harald Sandve
5f438d19cc fix sign bug in thermal Brine density calculations 2023-03-16 15:26:54 +01:00
Tor Harald Sandve
94c738538f use mass fraction not mole fractions 2023-03-16 15:26:03 +01:00
Bård Skaflestad
bdf6951e62 Restore Builds With Dune in Non-Default Installed Locations
In general we'd need to link to dune-common ("target_link_library")
to get the appropriate include directories for Dune in that case,
but in this specific instance we can get by with not specialising
Dune's 'className' function if Dune is not available.

Thanks to [at]akva2 for suggesting this workaround.
2023-03-16 12:44:17 +01:00
Bård Skaflestad
32b104f828
Merge pull request #3449 from totto82/output_moles
add moles unit to unitsystem
2023-03-16 12:33:16 +01:00
Bård Skaflestad
e074054a57
Merge pull request #3448 from totto82/convertRsw
add convertRswToXwg
2023-03-16 12:25:54 +01:00
Bård Skaflestad
ae29bb9101 Add Constructors for CellData Objects
This enables using in-place construction in Solution::insert().
2023-03-16 12:15:44 +01:00
Bård Skaflestad
0adcc7dd07 Add Restart File Output Support for Constant Flux Aquifers
We support constant flux aquifers (AQUFLUX keyword) entered both in
the SOLUTION and in the SCHEDULE sections.  The primary structural
change is that we have to support analytic aquifers being introduced
dynamically, whence the connection information (xCAQ) must be
captured without knowing the full set of analytic aquifers.  We
therefore allocate those output arrays purely from the maximum sizes
entered in the RUNSPEC section whereas we defer determining the
maximum aquifer ID to the point of capturing the dynamic values.

The xAAQ values for constant flux aquifers amount to a new aquifer
type integer value (=2) in IAAQ[11] and the flux value in SAAQ[0].
2023-03-16 10:32:43 +01:00
Bård Skaflestad
53a7c2343a Split Aquifer Type Handling out to Helper Functions
In preparation of adding support for outputting constant flux
aquifer values.
2023-03-16 10:32:43 +01:00
Tor Harald Sandve
932ed862d5 add moles unit to unitsystem 2023-03-16 09:18:39 +01:00
Arne Morten Kvarving
509a018ae7 fixed: fix debug printing with quad
std::to_string(__float128) is not defined
we need to instance the evaluation formatter for __float128
2023-03-16 09:07:13 +01:00
Tor Harald Sandve
1db6e4d7dd add convertRswToXwg 2023-03-16 08:48:56 +01:00
Arne Morten Kvarving
6b71f3d3c2
Merge pull request #3417 from blattms/fix-hdf5-dune-2.6
Do not use FieldVector::data() mehod as it misses from DUNE 2.6.
2023-03-15 21:10:34 +01:00
Markus Blatt
380fd4963e Split Builtin.hpp into multiple compile units for g++-12.
g++-12 needs quite some memory and time to compile it.
We now use several Builtin*.cpp for the imlementations for different
starting letters of eclipse keywords to use less resources for
compiling.
2023-03-08 22:26:34 +01:00
Markus Blatt
b52dc598d3 Refactored ParserInit.cpp to reduce ram needed for compilation 2023-03-08 17:25:35 +01:00
Arne Morten Kvarving
32bcc597e4 add missing include 2023-03-07 11:54:21 +01:00
Atgeirr Flø Rasmussen
81e15329ee
Merge pull request #3421 from hnil/new_property_small
New property
2023-03-05 10:09:17 +01:00
hnil
c0086e7be8 fixed remaining comments 2023-03-03 16:36:50 +01:00
hnil
e8b87af11a removed segment index from old code to avoid extra diffs 2023-03-03 15:03:16 +01:00
hnil
3cd55b5290 - changed materialsparams to not use shared pointers
- added interface of reusing search in tables

- fixed after modifiying files for minimal diffs

fixed NDEBUG things

fixed from review
2023-03-03 14:43:50 +01:00
Arne Morten Kvarving
4d92298724 add accessor for m_irreversible in ThresholdPressure 2023-03-03 09:23:11 +01:00
Arne Morten Kvarving
3fddcc0dd8 split out timing macros to separate header 2023-03-01 13:17:00 +01:00
Markus Blatt
393c42cd4c Do not use FieldVector::data() mehod as it misses from DUNE 2.6.
Instead we use the old fashioned way of checking the size and then
either return the address of the first element or a nullptr.

Closes OPM/opm-simulator#4472
2023-02-28 16:46:06 +01:00
Atgeirr Flø Rasmussen
c757fae0a6
Merge pull request #3416 from akva2/restart_serialize_inplace
Inplace: add restart serialization support
2023-02-28 07:50:48 +01:00
Arne Morten Kvarving
eaaf02f51f Inplace: add restart serialization support 2023-02-27 13:57:23 +01:00
Arne Morten Kvarving
ca83776c34 added: getInputDir in IOConfig
returns the input directory
2023-02-27 12:15:47 +01:00
Arne Morten Kvarving
a9ac9cbd58 minimum dune version required is now 2.7 2023-02-27 09:39:57 +01:00
Bård Skaflestad
762b43cfda
Merge pull request #3408 from totto82/summary_co2store
Add WCD, GCDI, GCDM, WIPG, WIPL summary output for Field and Region
2023-02-24 16:44:36 +01:00
Bård Skaflestad
61cec09d0a
Merge pull request #3406 from totto82/wsf_gsf
Implement WSF/GSF satfunc familiy for CO2STORE
2023-02-24 16:43:56 +01:00
Tor Harald Sandve
b5fdf35fbc Implement WSF/GSF satfunc familiy for CO2STORE 2023-02-24 15:07:30 +01:00
Arne Morten Kvarving
59d3619460 EclMaterialLawManager: add restart serialization support 2023-02-24 11:03:02 +01:00
Arne Morten Kvarving
b9a2b3fb86 EclXXXMaterialParams: add restart serialization support 2023-02-24 11:01:55 +01:00
Arne Morten Kvarving
09f1f06404 EclHysteresisTwoPhaseLawParams: add restart serialization support 2023-02-24 10:43:45 +01:00
Arne Morten Kvarving
ce9d8030d6 EclHysteresisTwoPhaseLawParams: header cleanup 2023-02-24 09:59:45 +01:00
Arne Morten Kvarving
11db5ce3af DirectionMaterialLawParams: add missing include
and some reformatting
2023-02-24 09:59:45 +01:00
Tor Harald Sandve
89850adb09 Add WCD, GCDI, GCDM, WIPG, WIPL summary for F and R 2023-02-23 09:17:39 +01:00
Tor Harald Sandve
0f163d22bc Add missing HEATCR and HEATCRT to props 2023-02-23 08:36:12 +01:00
Kai Bao
affdea72eb addressing reviewing comments for PR OPM/opm-common#3378 2023-02-21 10:47:42 +01:00
Kai Bao
1d8e92a262 putting AQUFLUX aquifers in one class 2023-02-17 17:32:24 +01:00
Kai Bao
35b095dfbc treat AQUFLUX keyword in SCHEDULE as individual events
We only check these keywords at the report step that the keywords are
specified.

Not totally sure how it will affect the RESTART, while it is not hard to
switch back.
2023-02-17 15:44:08 +01:00
Kai Bao
d3b629a76e AQUFLUX can run in parallel 2023-02-17 15:44:08 +01:00
Kai Bao
fceb3515b7 let AquiferConfig handle the AQUFLUX aquifer existence
for summary and restart file output.
2023-02-17 15:44:08 +01:00
Kai Bao
00ff5b41de creating dummy AQUFLUX aquifers in AquiferConfig
for the ones that were not specified in the SOLUTION section
2023-02-17 15:44:08 +01:00
Kai Bao
f081ee5826 using AquiferConfig to handle AQUFLUX aquifers 2023-02-17 15:44:08 +01:00
Kai Bao
d412158cf7 WIP in handling the summary output for AQUFLUX
AAQR, AAQP, AAQT works fine while FAQR and FAQT are not handled yet.
2023-02-17 15:44:08 +01:00
Kai Bao
83457f679e prototyping for the AQUFLUX parsing implementation
at the end, SOLUTIONSection() function is used to handle the
keywords in the SOLUTION section.
2023-02-17 15:44:08 +01:00
Arne Morten Kvarving
c5a2807b44 GPMaint::State: add comparison operator
while at it, move some code to cpp file and add missing headers
2023-02-15 20:04:20 +01:00
Bård Skaflestad
708964721d
Merge pull request #3400 from hnil/add_timing_block
added timingblocks most important functions
2023-02-15 12:37:03 +01:00
Bård Skaflestad
652713b0ef
Merge pull request #3397 from GitPaean/aquct_fetp_not_schedule
throw when AQUCT and AQUFETP are used as SCHEDULE keywords
2023-02-15 11:37:25 +01:00
Kai Bao
812d119363 give error messages for AQUCT and AQUFETP in SCHEDULE section 2023-02-15 10:12:01 +01:00
hnil
a3e025290f added timingblocks most important functions 2023-02-15 09:39:14 +01:00
hnil
502b0df428 Removed unnecessary comment 2023-02-14 11:07:52 +01:00
Bård Skaflestad
93b340cede Store Per-Segment Summary Vectors Separately
Enables easier access for UDQ/ACTIONX purposes.

While here, also move the serializationTestObject() member
function's implementation to the .cpp file.
2023-02-10 15:26:27 +01:00
Bård Skaflestad
a76768cf75 Reorder SummaryState Member Functions
This way the implementation file matches the declared order in the
header file.
2023-02-10 15:26:27 +01:00
Arne Morten Kvarving
02faaedcfd add serialization support to GuideRate 2023-02-10 14:11:10 +01:00
Bård Skaflestad
f09c42ae17
Merge pull request #3392 from akva2/gpmaint_serialize
GPMaint::State: add serialization support
2023-02-10 12:28:14 +01:00
Bård Skaflestad
335c375c9d
Merge pull request #3391 from goncalvesmachadoc/errorMsgTables
Improve Simple Table errros messages
2023-02-10 12:26:33 +01:00
Bård Skaflestad
2171c7afe6
Merge pull request #3389 from hnil/timing_block
Added empty macro which can be used for timing with for example Tracy
2023-02-10 12:22:44 +01:00
hnil
05a7672173 addressed review comments 2023-02-10 11:13:08 +01:00
goncalvesmachadoc
b2325c7d6d add Table name 2023-02-09 17:18:01 +01:00
goncalvesmachadoc
71fc372ced print order schema 2023-02-09 16:00:56 +01:00
goncalvesmachadoc
f74dd68755 pass by reference 2023-02-09 16:00:12 +01:00
Bård Skaflestad
e6abb5e3df Don't Index Out of Bounds in Vector
In the admittedly special case that "position" is equal to the
buffer's size() and "n == 0", then the expression

   &buffer[position]

will index out of bounds.  Use the safer expression

   buffer.data() + position

instead since that's valid when position <= size().

Detected by libstdc++'s debug mode (checked iterators).
2023-02-08 12:52:28 +01:00
Arne Morten Kvarving
59393b49f7 add serialization support to GPMaint::State 2023-02-08 12:37:18 +01:00
Arne Morten Kvarving
1be072adf2 add serialization support to Evaluation 2023-02-08 10:20:30 +01:00
Atgeirr Flø Rasmussen
46d268fba0
Merge pull request #3383 from akva2/mempacker_public
changed: rename the packer used in test_Serialization to MemPacker
2023-02-08 10:19:28 +01:00
goncalvesmachadoc
65535202cc addKeywordName 2023-02-07 18:16:06 +01:00
Bård Skaflestad
9161ac9503 Split Scalar Value Scattering Out to Helper Function
In preparation of adding support for segment level UDQs.  While
here, also apply const in a few places.
2023-02-03 17:59:10 +01:00
hnil
9613cdd917 Added empty marco which can be used for timing with forexample Tracy 2023-02-02 14:19:51 +01:00
Bård Skaflestad
2b2330ab24 Prepare for Handling UDQ ASSIGN for Segments
This commit adds support for constructing UDQ ASSIGN records for
enumerated well items such as those encountered in UDQs at the
segment level, e.g.,

    ASSIGN SUSPECT PROD01    123.456 /
    ASSIGN SUSPECT PROD02 17 654.321 /

We do not support this syntax quite yet, but this is a step on the
way there.
2023-02-02 12:43:16 +01:00
Arne Morten Kvarving
2e15535afe SingleNumericalAquifer: add missing include 2023-02-02 11:41:50 +01:00
Arne Morten Kvarving
d04a30592a Serializer: handle Dune::BlockVector as vectors 2023-02-01 14:49:15 +01:00
Arne Morten Kvarving
6ba29b0920 Serializer: allow generic vector classes
needs to adhere to stl's interface
2023-02-01 14:48:39 +01:00
Arne Morten Kvarving
e211a8cbf6 Serializer: handle Dune::FieldVector as arrays 2023-02-01 14:39:32 +01:00
Arne Morten Kvarving
7e6b28317a Serializer.hpp: add missing include 2023-02-01 10:48:48 +01:00
Arne Morten Kvarving
b138598518 changed: rename the packer used in test_Serialization to MemPacker
make it a public header so it can be reused elsewhere.
2023-02-01 10:48:48 +01:00
Tor Harald Sandve
9b3e1f92bf
Merge pull request #3364 from hakonhagland/imbnum3
Adds support for directional relative permeabilities with hysteresis
2023-01-30 12:33:36 +01:00
Bård Skaflestad
b3dd728a2e Add Numbered Item to UDQ Scalars
This is in preparation of adding UDQs at the segment level.  We will
probably need to rethink the UDQ scalars and UDQ sets at some point,
since the lookup and assignment operations become more expensive
from adding this piece of information.

While here, also add containers for segment level UDQs to the UDQ
state object.  These are currently unused, but adding them here
simplifies follow-up work.

Finally, add some Doxygen-style documentation to the UDQ set and
scalar types.
2023-01-24 19:45:46 +01:00
Arne Morten Kvarving
0801519f97
Merge pull request #3376 from akva2/restartvalue_move_to_cpp
RestartValue: move some more code to compile unit
2023-01-19 14:28:53 +01:00
Arne Morten Kvarving
eed2a179ca RestartValue: move some more code to compile unit 2023-01-19 13:40:15 +01:00
Arne Morten Kvarving
abce488f3b Summary.hpp: forward PAvgCalculatorCollection 2023-01-19 13:19:27 +01:00
Bård Skaflestad
b82508dd7c
Merge pull request #3372 from akva2/summarystate.hpp_reduce_hotness
ActionContext: forward SummaryState
2023-01-18 15:42:44 +01:00
Markus Blatt
00442c2e2e
Merge pull request #3371 from akva2/well_enums
Move well enums and controls to separate classes
2023-01-18 14:13:27 +01:00
Arne Morten Kvarving
f8eca58408 ActionContext: forward SummaryState 2023-01-18 13:48:46 +01:00
Arne Morten Kvarving
6a23f5d891
Merge pull request #3369 from bska/name-order-tidy
Slight Polish to NameOrder Component
2023-01-18 12:18:16 +01:00
Arne Morten Kvarving
b61f97aeba changed: move ProductionControls to separate header
and make the class member type with a using statement.
allows for forwarding
2023-01-18 11:45:21 +01:00
Arne Morten Kvarving
82093da0bb changed: move InjectionControls to separate header
and make the class member type with a using statement.
allows for forwarding
2023-01-18 11:44:32 +01:00
Arne Morten Kvarving
9ef643345d Schedule.hpp: forward Well 2023-01-18 11:01:41 +01:00
Arne Morten Kvarving
904e879cbe Wells.hpp: include WellEnums.hpp not Well.hpp 2023-01-18 10:32:16 +01:00
Arne Morten Kvarving
33f095d145 ScheduleState.hpp: include WellEnums.hpp instead of Well.hpp
and forward Well
2023-01-18 10:23:45 +01:00
Arne Morten Kvarving
120a56930c GuideRateModel.hpp: forward WellGuideRateTarget 2023-01-18 10:14:01 +01:00
Arne Morten Kvarving
955ef0c2d4 GuideRateConfig.hpp: include WellEnums.hpp not Well.hpp 2023-01-18 10:08:52 +01:00
Arne Morten Kvarving
6f5cb645ff GuideRate.hpp: forward WellGuideRateTarget 2023-01-18 10:04:26 +01:00
Bård Skaflestad
6a3a0dc422 Adjust Whitespace And Simplify Logic Slightly
Mostly for readability and maintainability.
2023-01-18 09:41:32 +01:00
Bård Skaflestad
c859027b86 Slight Polish to NameOrder Component
Mostly whitespace, but one instance of preferring a standard
algorithm over a raw loop.
2023-01-18 09:40:53 +01:00
Arne Morten Kvarving
4d90ab1c72 move string conversion of WellGasInflowEquation to WellEnums.cpp 2023-01-18 09:39:49 +01:00
Arne Morten Kvarving
8e29ef4c07 move string conversion of WellGuideRateTarget to WellEnums.cpp 2023-01-18 09:33:50 +01:00
Arne Morten Kvarving
6565ea0f1f move string conversion of WellWELTARGCMode to WellEnums.cpp 2023-01-18 09:26:34 +01:00
Arne Morten Kvarving
0ef729ba72 move printing of WellProducerCMode to WellEnums.cpp 2023-01-18 09:20:43 +01:00
Arne Morten Kvarving
a540ac54b8 move printing of WellInjectorCMode to WellEnums.cpp 2023-01-18 09:08:27 +01:00
Arne Morten Kvarving
3d0ca8438b move printing of WellStatus to WellEnums.cpp 2023-01-18 08:59:09 +01:00
Arne Morten Kvarving
3c4a64f7f4 move Well enums to separate file
and the class member types are constructed with using statements.
this allows for forwarding of the enums, and for using the enums
without dragging in Well.hpp
2023-01-18 08:58:30 +01:00
Bård Skaflestad
736e1b9f5c
Merge pull request #3367 from akva2/eclipsegrid_hpp_cleanup
Some small header cleanups
2023-01-17 13:29:06 +01:00
Arne Morten Kvarving
cf55b176b0 ExtSmryOutput.hpp: forward EclipseState 2023-01-17 12:24:01 +01:00
Arne Morten Kvarving
75a6b603c5 EclThermalLawManager: move code to separate compile unit 2023-01-17 11:39:30 +01:00
Arne Morten Kvarving
0a66661b98 EclipseIO.hpp: forward EclipseGrid 2023-01-17 10:42:32 +01:00
Arne Morten Kvarving
c9074be104 WellTestState: forward WellTestConfig 2023-01-17 07:00:38 +01:00
Arne Morten Kvarving
06f1b6e8f9 make WellTestConfig::Reason a namespace scoped enum WTest::Reason
and alias it as WellTestConfig::Reason
2023-01-17 07:00:24 +01:00