Commit Graph

915 Commits

Author SHA1 Message Date
Arne Morten Kvarving
8f293ba5e5 add some missing initializers 2025-01-23 10:56:03 +01:00
Arne Morten Kvarving
c114def851 mark parameters/variables as const where appropriate 2025-01-23 07:57:44 +01:00
Tor Harald Sandve
7ae7ff6ee0 Mark GSATPROD supported 2025-01-22 12:55:44 +01:00
Tor Harald Sandve
fef6cfcf38 Fix parallel gsatprod 2025-01-22 12:55:44 +01:00
Arne Morten Kvarving
6d964c1370 mark constructors explicit 2025-01-21 14:41:17 +01:00
Håkon Hægland
89dc1930ef Mark GRUPSLAV and GRUPMAST as unsupported
Don't remove these entries from the map before reservoir coupling is
completely supported.
2025-01-17 22:06:22 +01:00
Håkon Hægland
48856f9f46 Timestepping for reservoir coupling
Implement adaptive time stepping for master and slave procesess
when using reservoir coupling. The original adaptive time stepping method
is refactored at the same time.
2025-01-17 22:04:17 +01:00
Håkon Hægland
4fd225c004 Spawn slaves from master 2025-01-17 22:01:11 +01:00
Arne Morten Kvarving
ef176d4b5c Damaris: move some more code to TU
possible with typetag less parameter system
2025-01-15 09:14:17 +01:00
Matthew Goodfield
c367ea8697
[Nit] Add EHYSTR(HYSTMOD) = 4 to list of supported values in message 2025-01-03 09:56:36 +00:00
Tor Harald Sandve
b6999cfbc0
Merge pull request #5785 from svenn-t/rockopts_store
Use initial pressure if ROCKOPTS item 2 is STORE
2024-12-19 09:23:04 +01:00
Arne Morten Kvarving
0470502027 added: support WCYCLE 2024-12-17 08:41:25 +01:00
Atgeirr Flø Rasmussen
1c8724b601 Do not serialize time_point via time_t.
Avoids losing resolution (ms to s).
2024-12-13 09:33:53 +01:00
Svenn Tveit
b79dee898a Use init. pres. with ROCK and ROCKTAB if ROCKOPTS item 2 = STORE.
OVERBURD keyword will be ignored if STORE is activated.
2024-12-05 12:58:13 +01:00
Arne Morten Kvarving
73c45c7282 bump minimum dune version to 2.9 2024-12-03 13:59:53 +01:00
Bård Skaflestad
641f094309
Merge pull request #5765 from atgeirr/refactor-errorguard-dump-downstream
Use formattedErrors() and simplify.
2024-11-27 11:41:53 +01:00
Atgeirr Flø Rasmussen
0238f45339 Use formattedErrors() and simplify.
No longer calling dump() means we avoid the extra dumping to stderr of
the warnings and errors.
2024-11-27 08:52:05 +01:00
Håkon Hægland
5730dcf166 Update Schedule constructor
This is needed for PR 4123 in opm-common to build
2024-11-25 18:11:27 +01:00
Atgeirr Flø Rasmussen
f11c511878
Merge pull request #5707 from blattms/fix/log-section-topology-error
Make sure all errors from parsing show up in the log files.
2024-11-21 12:05:32 +01:00
Arne Morten Kvarving
15b12eaa3e avoid use of std::is_pod_v
implement it ourself in terms of std::is_trivial and
std::is_standard_layout. std::is_pod_v is deprecated in c++-20
2024-11-06 10:38:50 +01:00
Markus Blatt
6a5e661d71 Make sure all errors from parsing show up in the log files.
Currently, some errors from parsing, like topology errors when
processing sections, are not included in the log files or the final
standard output before aborting. If there are no other errors the user
will only see a line like this without further explanation:
"Error: Unrecoverable errors while loading input:"

With this commit now print the string returned by ErrorGuard::dump to
the logs and standard output. Hence the user might see somthing like
this:

```
Error: Unrecoverable error while loading input: SECTION_TOPOLOGY_ERROR: The GRID section must be followed by EDIT or PROPS instead of GRID at: SPE1CASE2_ERR.DATA, line: 108
```
2024-11-04 16:28:20 +01:00
Arne Morten Kvarving
58365df3ff add missing ReservoirCouplingInfo.hpp includes
now that Schedule(State) properly serializes the member
2024-10-28 15:51:14 +01:00
Antonella Ritorto
b875ba8122 LevelCartesianIndexMapper for AluGrid 2024-10-21 11:25:27 +02:00
Arne Morten Kvarving
501ee0f818 avoid declaring t1 outside lambda
clang doesn't want us to capture t1, and g++-14 requires us
to capture t1. this workaround avoids warnings with both.
2024-10-17 12:32:59 +02:00
Bård Skaflestad
2aac0d6cf5 Enable New Saturation Function Consistency Checks
The new parameter CheckSatfuncConsistency, command line option
--check-satfunc-consistency, allows users to opt into running the
checks.  The option currently defaults to 'false' to reflect the
somewhat experimental nature of the new facility.

The new parameter --num-satfunc-consistency-sample-points allows the
user to select the maximum number of reported failures for each
individual consistency check.  By default, the simulator will report
at most five failures for each check.

We check the unscaled curves if the run does not activate the
end-point scaling option and the scaled curves otherwise.  At
present we're limited to reversible and non-directional saturation
functions for the drainage process, but those restrictions will be
lifted in due time.
2024-10-16 15:03:07 +02:00
Bård Skaflestad
b5305b928d Use More Specific Name for 'anyFailedChecks'
The function returns whether or not there were any failed checks at
the 'Standard' level.  Make the function name reflect this.
2024-10-16 09:32:19 +02:00
Bård Skaflestad
8082e72d32 Add Top Level Container for Saturation Function Consistency Checks
This commit introduces a new top-level "manager" for all saturation
function consistency checks.  This component associates collections
of saturation function curves with per-cell or per-region end-point
definitions and provides an interface to run all checks for all
interior entities (i.e., active cells) in a DUNE grid view.  We form
one set of SatfuncConsistencyChecks objects for each
SatfuncCheckPointInterface<> object, thereby enabling running the
same set of consistency checks for both the unscaled, tabulated,
per-region saturation functions and the per-cell scaled saturation
functions.  The latter is executed only if the run enables end-point
scaling for the saturation functions while the former is executed
only if the run does not enable end-point scaling.

At present we're limited to reversible and non-directional
saturation functions for the drainage process only, but those
restrictions will be lifted in due time.

As an aid to enabling the pertinent individual checks, we add a
private factory function which considers the run's active phases and
whether or not the run uses the alternative, three-point horizontal
scaling method ("SCALECRS = YES").
2024-10-16 09:32:19 +02:00
Bård Skaflestad
257e5a2d2a Add Protocol for Populating Saturation Function End Points per Cell
This commit introduces a set of callback functions, packaged in an
abstract base class SatfuncCheckPointInterface<Scalar>, for querying
and populating the saturation function end-points that get probed by
the individual consistency checks.  Member function

    SatfuncCheckPointInterface::pointID(cellIdx)

translates the active cell index 'cellIdx' into a point ID, assumed
to be unique on at least the current MPI rank.  This function will
return 'nullopt' if the 'cellIdx' is not eligible for this
particular end-point.  This typically happens for the region based
tabulated (unscaled) saturation function checks when the 'cellIdx'
happens to be in a region that's already been visited.  Member
function

    SatfuncCheckPointInterface::populateCheckPoint(cellIdx, endPoints)

fills in (assigns) all data members of the 'endPoints' structure
with the pertinent values for the active cell 'cellIdx'.

We implement this interface for the tabulated/unscaled end-points in
derived class UnscaledSatfuncCheckPoint<Scalar> and for the scaled
end-points in derived class ScaledSatfuncCheckPoint<Scalar>.  The
former keeps track of which saturation regions have been visited
and short-circuits its 'pointID()' member function based on that
information while the latter uses an instance of the former in order
initialise the 'endPoints' structure in its populateCheckPoint()
member function.
2024-10-11 11:47:50 +02:00
Bård Skaflestad
779522fff1 Enable EQUALREG for Array Operations
The keyword's implementation has reached a point where we can
justify its addition to the simulator's feature set.
2024-10-06 15:22:37 +02:00
Bård Skaflestad
120b39a8f9 Fix Lower Bound Conditions for Three Point Checks
These are supposed to verify that the displacing saturation is
strictly between the critical and the maximum saturation values.
2024-10-02 12:33:22 +02:00
Arne Morten Kvarving
2353ba56a6 changed: don't store schedule keywords unless required in simulators
in the python simulator we cannot make this decision up front
since the schedule can be modified from python code so we have
to do the safe thing
2024-09-27 11:24:20 +02:00
Kai Bao
4754f63d62 setting up logging so flowexp variants can report parsing errors 2024-09-18 16:56:30 +02:00
Arne Morten Kvarving
e559fc371b MPIPacker: mark buffer const in unpacker functions 2024-09-11 12:46:44 +02:00
Arne Morten Kvarving
e808a3d2f3 adjust to change in MemPacker unpack signature 2024-09-11 12:46:44 +02:00
Bård Skaflestad
ba1419b31f Fix Consistency Check for Maximum Gas Saturation
The earlier condition

    0 <= SGU < 1

was not appropriate and would, for instance, fail the NORNE_ATW2013
test case in which SGU = 1 in the unscaled table for saturation
region 1.  Revise the condition to be more in line with that of SWU,
i.e., as

    0 < SGU <= 1

Pointy Hat: [at]bska
2024-09-10 15:44:16 +02:00
Bård Skaflestad
3de20b46b6 Add Saturation Function Consistency Checks for SCALECRS
This commit introduces consistency checks for the scaled displacing
saturation in the three point horizontal scaling method
(SCALECRS=YES).  These plug into the framework introduced in commit
c3939c544 (PR #5438).  We implement the following two checks

  - SGCR < 1-SOGCR-SWL < SGU
  - SWCR < 1-SOWCR-SGL < SWU

which collectively guarantee a mobile displacing oil saturation in
the two phase gas/oil and oil/water systems.
2024-09-05 10:36:43 +02:00
Arne Morten Kvarving
05f01bf819 parametersystem.hh: rename to .hpp 2024-09-05 10:07:40 +02:00
Bård Skaflestad
be64ef3ef6 Add Water Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the water
phase saturation functions.  These plug into the framework
introduced in commit c3939c544 (PR #5438).  We implement the
following three checks

  - 0 <= SWL < 1
  - 0 < SWU <= 1
  - SWL <= SWCR < SWU

which collectively enable a non-negative oil saturation in the two
phase oil/water system.
2024-09-04 13:47:33 +02:00
Bård Skaflestad
9c246faefa Add Gas Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the gas phase
saturation functions.  These plug into the framework introduced in
commit c3939c544 (PR #5438).  We implement the following three checks

  - 0 <= SGL < 1
  - 0 <= SGU < 1
  - SGL <= SGCR < SGU

which collectively enable a non-negative oil saturation in the two
phase gas/oil system.
2024-09-04 11:34:39 +02:00
Bård Skaflestad
2e70fc407e Add Oil Phase Saturation Function Consistency Checks
This commit introduces a set of consistency checks for the oil phase
saturation functions.  These plug into the framework introduced in
commit c3939c544 (PR #5438).  We implement the following four checks
for the gas/oil two-phase system

  - 0 <= SOGCR < 1
  - SWL + SGU <= 1
  - SOGCR < 1 - SWL - SGL
  - SOGCR < 1 - SWL - SGCR

which all guarantee a non-negative (mobile) oil saturation in the
gas/oil system.  Similarly, we implement the following four checks
for the oil/water two-phase system

  - 0 <= SOWCR < 1
  - SGL + SWU <= 1
  - SOWCR < 1 - SWL - SGL
  - SOWCR < 1 - SWCR - SGL

which provide the same guarantees as outlined above, but for the
oil/water system.

We add a base class, PhaseCheckBase<Scalar>, which provides a common
representation of the violated/critical predicates and implement the
specific checks as derived types of this base class.
2024-09-03 12:35:44 +02:00
Markus Blatt
7ebb6e7034
Merge pull request #5547 from lisajulia/feature/action-parsing-strictness
Add action-parsing-strictness command line parameter
2024-08-26 09:06:25 +02:00
Lisa Julia Nebel
d02f84afb7 Add action-parsing-strictness 2024-08-20 10:50:56 +02:00
Bård Skaflestad
afe34e1868
Merge pull request #5542 from akva2/float_support1
Add float support to simulators: Batch 1
2024-08-20 09:29:40 +02:00
Atgeirr Flø Rasmussen
7795640bb6 More helpful message for PETGRID. 2024-08-19 13:18:50 +02:00
Arne Morten Kvarving
a9cd51669d ComponentName: optionally instantiate for float 2024-08-19 13:09:42 +02:00
Atgeirr Flø Rasmussen
bee91d2fdd
Merge pull request #5273 from totto82/ehystr4_fix
Allow Hysteresis option 4
2024-08-19 08:51:27 +02:00
Arne Morten Kvarving
9141f2c2d5 move Damaris parameters to TypeTag-free parameter system 2024-08-16 13:20:06 +02:00
Bård Skaflestad
ad595fed5e
Merge pull request #5506 from akva2/move_params_to_parameters
Move parameters to Opm::Parameters namespace
2024-08-09 09:16:10 +02:00
Arne Morten Kvarving
f310698fef MPIPacker: move function definition to cpp file 2024-08-07 11:28:15 +02:00
Arne Morten Kvarving
2a52cf8134 changed: Damaris parameters moved to Opm::Parameters namespace 2024-08-06 09:50:02 +02:00