Commit Graph

7916 Commits

Author SHA1 Message Date
Arne Morten Kvarving
32906b5022 HandlerContext: wpimult_global_factor is never nullptr
use a reference instead of a pointer
2023-11-24 13:22:36 +01:00
Arne Morten Kvarving
a7f709f9f3 changed: put HandlerContext in separate compile unit 2023-11-24 13:22:29 +01:00
Arne Morten Kvarving
01c1fda1c9 introduce a helper class WelSegsSet
this wraps the set with the custom comparator. this is
just a internal helper class, does not need to be part of public API.
2023-11-24 13:22:29 +01:00
Tor Harald Sandve
f8ca5ca684 serialize wpimult 2023-11-24 10:09:49 +01:00
Tor Harald Sandve
c40efc35f2 adapt wdfac for wpimult 2023-11-23 15:18:45 +01:00
Tor Harald Sandve
08b41f09d8 Remove trans multiplier from the dake model 2023-11-22 13:59:25 +01:00
Tor Harald Sandve
e362e1018d refactoring wdfac getDfactor 2023-11-22 09:17:59 +01:00
Tor Harald Sandve
98220372eb Add return of wdfac type 2023-11-21 17:49:08 +01:00
Bård Skaflestad
a74b146841
Merge pull request #3777 from akva2/fix_perf_range_deref
fixed: pass through perf-range as an optional
2023-11-17 14:02:58 +01:00
Arne Morten Kvarving
a725a5a85c fixed: pass throug perf-range as an optional
we should not dereference it for STDW where it is expected
to be empty
2023-11-17 12:58:37 +01:00
Atgeirr Flø Rasmussen
e0e308ea43
Merge pull request #3737 from daavid00/dispersivity
Support for mechanical dispersion
2023-11-17 08:49:48 +01:00
David Landa Marban
0d993ebd6a Support for mechanical dispersion 2023-11-16 16:54:56 +01:00
Bård Skaflestad
8a4735efcb Make Self Connection Behaviour Configurable
This commit adds a new class template argument,

    bool PermitSelfConnections

with a default value of 'false', that enables client code to
configure whether or not function

    addConnection(v1, v2)

creates a connection from v1 to v2 if v1 == v2.  The default state
preserves the current behaviour which ignores such connections.

Permitting self connections makes the class slightly more general to
uses cases outside inter-region flow accumulation.
2023-11-16 15:10:59 +01:00
Vegard Kippe
9956ef1dfc Facilitate using network node pressures from restart 2023-11-13 23:26:57 +01:00
Tor Harald Sandve
5309471632
Merge pull request #3750 from daavid00/renamingToEnableVapwat
Renaming enableEvaporation to enableVapwat
2023-11-13 15:01:19 +01:00
Vegard Kippe
7e80ad86aa Rebase fix 2023-11-13 12:24:01 +01:00
Vegard Kippe
97b5bc6209 Support networks with multiple fixed-pressure nodes 2023-11-13 12:24:00 +01:00
Bård Skaflestad
7baccd0318
Merge pull request #3701 from vkip/extra_network_output
Allow output of network pressure based on rates at end of timestep
2023-11-09 23:04:34 +01:00
Arne Morten Kvarving
5e39ab31da added: FIPConfig for RPTSOL in EclipseConfig 2023-11-09 12:11:49 +01:00
Bård Skaflestad
7ba929f1d0
Merge pull request #3753 from akva2/fipconfig
added: FIPConfig class
2023-11-09 12:10:40 +01:00
Arne Morten Kvarving
47122446e6 use strong enum for FIP output fields 2023-11-09 10:44:23 +01:00
Arne Morten Kvarving
3f08071eae added: FIPConfig class
this parses FIP related flags from RPT(SCHED|SOL)
2023-11-09 10:35:21 +01:00
Kai Bao
16c6ee3bbb
Merge pull request #3695 from vkip/grupnet_reroute_hack
Allow rerouting in standard and extended network
2023-11-08 19:58:07 +01:00
Bård Skaflestad
d9a1d7fe62 Make UnitSystem::*_si(string) Const Members
There is no need for these to require that the UnitSystem be mutable.
2023-11-08 16:10:36 +01:00
David Landa Marban
ab2b3faf0a Renaming enableEvaporation to enableVapwat 2023-11-07 18:34:44 +01:00
Vegard Kippe
0ae1588e00 Addressing review comments, in particular, ensuring that extended network is not updated with a GRUPTREE update. 2023-11-07 11:28:36 +01:00
Vegard Kippe
01890670da Bugfix + first steps on restart 2023-11-07 11:28:35 +01:00
Vegard Kippe
aa2220979b Working version (but not pretty) 2023-11-07 11:28:35 +01:00
Vegard Kippe
0aa0af9f57 Allow rerouting in standard network 2023-11-07 11:28:35 +01:00
Arne Morten Kvarving
3875736795 implement support for FBHPDEF 2023-11-07 10:32:38 +01:00
Arne Morten Kvarving
e82875644a ScheduleState: avoid duplicate const/mutable implementation 2023-11-03 13:13:58 +01:00
Tor Harald Sandve
80dd2c33a1 Implement support for keyword WDFAC and WDFACCOR
Implement support for DFactor in COMPDAT

Add output of CDFAC
2023-10-31 14:10:45 +01:00
Arne Morten Kvarving
db0f99de77 UDQ: add UDT support 2023-10-30 11:18:58 +01:00
Vegard Kippe
7aabc14523 Output of network pressure based on rates at end of timestep in summary vector NPR:* = GNETPR:* 2023-10-26 19:31:48 +02:00
Antonella Ritorto
e89c486c7c Missing header for g++ 12.2.0 2023-10-26 10:17:09 +02:00
Bård Skaflestad
96b3799eee
Merge pull request #3712 from blattms/actionx-condition-errors
Better error handling for problems in conditions of ACTIONX.
2023-10-25 16:22:34 +02:00
Bård Skaflestad
a2d4680fc2
Merge pull request #3731 from bska/rescale-swatinit-pcow-at-restart
Support SWATINIT-Like Rescaling of PCOW at Restart
2023-10-25 15:40:04 +02:00
Markus Blatt
48bbc2dc2b Introduces method parseActionX returning the action and error strings.
This way there is no constructor with an output parameter and we
prevent introducing an additional member in ActionX that is only used
in one constructor.
2023-10-25 14:04:10 +02:00
Markus Blatt
f3668e0a37 Better error handling for problems in conditions of ACTIONX.
When encountering these (e.g. a number instead of an expression on
the left hand side) the simulator would immediately abort with an
error message like:
```
Error: An error occurred while creating the reservoir schedule
Internal error: Extra unhandled data starting with token[0] = 135

Error: Unrecoverable errors while loading input: Extra unhandled data starting with token[0] = 135
```
(The message above is for the number 135 on the left hand side)

With this change we now use the usual way of handling errors and
warnings in the parser and continue parsing.

The error message for the problem above is now
```
Error: condition of action EX1 has the following error: Left side of comparsion (135) has to be an expression!

Error: Problem with keyword ACTIONX
In model.schedule line 562
condition of action EX1 has the following error: Left side of comparsion (135) has to be an expression!

Error: Unrecoverable errors while loading input: Problem with keyword ACTIONX
In model.schedule line 562
condition of action EX1 has the following error: Left side of comparsion (135) has to be an expression!
2023-10-25 14:04:10 +02:00
Bård Skaflestad
b7fed05ca2 Support SWATINIT-Like Rescaling of PCOW at Restart
This commit adds a new, very specialised, operation to the material
law manager,

  void EclMaterialLawManager::applyRestartSwatInit(cell, maxPcow)

This will apply a SWATINIT-like rescaling of the oil/water capillary
pressure curve based on a caller-provided maximum capillary pressure
value.  The primary use case is this maximum value being taken from
the PPCW array in a restart file at simulation restart time.  We
assign the "maxPcow" member of the associate EpsInfo structure and
reinitialise the EpsPoints structure using this new information.
The latter is needed lest the maxPcnw() member function return
incorrect values in restarted simulations.
2023-10-25 10:54:59 +02:00
Arne Morten Kvarving
2a2c59ca26 added: parsing of UDT keyword 2023-10-25 10:02:44 +02:00
Markus Blatt
a606753230
Merge pull request #3703 from bska/welspecs-extension
Support Changing Selected Well Properties Through WELSPECS
2023-10-25 09:51:51 +02:00
Markus Blatt
ef9e171705
Merge pull request #3725 from akva2/add_udt
Prepare for UDT support
2023-10-25 09:50:19 +02:00
Bård Skaflestad
416dadd33f Support Changing Selected Well Properties Through WELSPECS
This commit enables updating individual well properties for one or
more wells using the WELSPECS keyword.  In particular, this revised
logic enables changing the controlling group without affecting any
other well property such as the location of the well head or the
well reference depth.

Defaulted properties do not affect change in Well::update*().  This,
in turn, begets a change to the logic of how we update the reference
depths.  Previously, we always interpreted a defaulted reference
depth item as

    Compute the reference depth from the location of the well's
    reservoir connections

We now alter this interpretation slightly to mean

    Don't recompute the reference depth if the input has already
    assigned a numerical value for this property

If the input has never assigned an explicit numerical value for the
reference depth, then we continue using the original interpretation
of a defaulted reference depth item--e.g., to update the reference
depth as a result of new reservoir connections.

The simulation can request the original interpretation even after
having assigned a numeric reference depth, by entering a new
WELSPECS keyword specifying a negative value for the the reference
depth item.

To this end, introduce a new data member in the Well class,

    bool Well::derive_refdepth_from_conns_

which tracks whether or not the reference depth has been assigned an
explicit numeric value.

As an example, this new WELSPECS behaviour enables using something
like

    ACTIONX
      A  1 /
      WOPR 'P*' < 123.4 /
    /
    WELSPECS
      '?' 'LOWPRESS' /
    /
    ENDACTIO

as a way to move all wells matching the pattern 'P*', and with a low
oil production rate, to the group 'LOWPRESS'.  This could, in turn,
apply a different set of group-level production controls to those
wells.
2023-10-25 09:19:00 +02:00
Bård Skaflestad
da442c5d45 Separate New vs Update WELSPECS Handling out to Helpers
This commit creates new helper functions

    Schedule::welspecsCreateNewWell()
    Schedule::welspecsUpdateExistingWells()

which handle the creation of a new well or the property update of
one or more existing wells, respectively, in the context of
processing records in the WELSPECS keyword.

In preparation of making the WELSPECS keyword useful for changing
the controlling group of a collection of wells, we pass a vector of
well names as an argument to the update function.  Furthermore, we
construct this vector using normal 'wellNames()' processing which
enables using patterns and well list names such as

  * 'P-2'
  * 'PROD-*'
  * '?'
  * '*PROD'

as arguments/well names (item 1).
2023-10-25 09:19:00 +02:00
Kai Bao
5c44ebb906 outputting the maxIterations in the PTFlash failure message
adding removing some white spaces in PTFlash.hpp
2023-10-24 10:03:48 +02:00
Arne Morten Kvarving
80b8a7e90a added: put UDTs in UDQContext 2023-10-23 20:29:40 +02:00
Arne Morten Kvarving
9129d91568 added: storage of UDTs in UDQConfig 2023-10-23 20:29:40 +02:00
Arne Morten Kvarving
d1b6c8de12 add class for representing UDTs
this is limited to 1D UDTs for now
2023-10-23 20:29:40 +02:00
Arne Morten Kvarving
9dbee7920a linearInterpolation: add a helper to get slope and index
and reimplement interpolation functions in terms of this helper
2023-10-23 14:41:35 +02:00