Commit Graph

883 Commits

Author SHA1 Message Date
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
Lisa Julia Nebel
371fbdfc03 Include <boost/version.hpp> before the macro BOOST_VERSION is checked 2024-07-16 17:39:32 +02:00
Lisa Julia Nebel
653cb28bc2 Add the metis partitioner as a command line option as well 2024-07-16 17:39:28 +02:00
Vegard Kippe
fae49636cc Addressing review comments (changed assert to throw, put chunked broadcast in private method) 2024-07-09 19:15:50 +02:00
Vegard Kippe
99d5a147b1 Fix broadcast and initialize int_pos properly.. 2024-07-09 15:02:15 +02:00
Vegard Kippe
c10695c5d5 Switch to using size_t instead of int for buffer position, and properly account for MPI using int 2024-07-09 13:48:04 +02:00
Arne Morten Kvarving
d26ec065f3 add missing include 2024-07-03 11:02:16 +02:00
Arne Morten Kvarving
48344facd4 add virtual destructor to class with virtual members 2024-07-02 22:41:48 +02:00
Bård Skaflestad
0c71d0701c Add MPI Support to Saturation Function Consistency Checks
This commit adds a new public member function

    SatfuncConsistencyChecks<>::collectFailures(root, comm)

which aggregates consistency check violations from all ranks in the
MPI communication object 'comm' onto rank 'root' of 'comm'.  This
amounts to summing the total number of violations from all ranks and
potentially resampling the failure points for reporting purposes.

To this end, extract the body of function processViolation() into a
general helper which performs reservoir sampling and records point
IDs and which uses a call-back function to populate the check values
associated to a single failed check.  Re-implement the original
function in terms of this helper by wrapping exportCheckValues() in
a lambda function.  Extract similar helpers for numPoints() and
anyFailedChecks(), and add a new helper function

    SatfuncConsistencyChecks<>::incorporateRankViolations()

which brings sampled points from an MPI rank into the 'root's
internal data structures.

One caveat applies here.  Our current approach to collecting check
failures implies that calling member function reportFailures() is
safe only on the 'root' process in a parallel run.  On the other
hand functions anyFailedChecks() and anyFailedCriticalChecks() are
safe, and guaranteed to return the same answer, on all MPI ranks.

On a final note, the internal helper functions are at present mostly
implemented in terms of non-owning pointers.  I intend to switch to
using 'std::span<>' once we enable C++20 mode.
2024-06-28 11:04:53 +02:00
Bård Skaflestad
c3939c5444 Add New Platform for Saturation Function Consistency Checks
The intention is that this will ultimately replace the existing
RelpermDiagnostics component which does not really work in parallel
and which does not report enough context to help diagnose underlying
issues.  For now, though, we just add the shell of a new set of
checks and hook that up to the build.

Class SatfuncConsistencyChecks<Scalar> manages a configurable set of
consistency checks, the implementations of which must publicly
derive from SatfuncConsistencyChecks<Scalar>::Check.  Client code
will configure a set of checks by first calling

    SatfuncConsistencyChecks<Scalar>::resetCheckSet()

then register individual checks by calling

    SatfuncConsistencyChecks<Scalar>::addCheck()

and finally build requisite internal structures by calling

    SatfuncConsistencyChecks<Scalar>::finaliseCheckSet()

Client code will then run the checks by calling

    SatfuncConsistencyChecks<Scalar>::checkEndpoints()

typically in a loop.  Class SatfuncConsistencyChecks<Scalar> will
count consistency check failures and attribute these to each
individual check as needed.  We also maintain separate counts for
"Standard" and "Critical" failures.  The former will typically
generate warnings while the latter will typically cause the
simulation run to stop.  Individual checks get to decide which check
is "Critical", and client code gets to decide how to respond to
"Critical" failures.

Member function SatfuncConsistencyChecks<Scalar>::reportFailures()
will generate a textual report of the known set of consistency check
failures at a give severity level.

As an internal implementation detail, SatfuncConsistencyChecks uses
"reservoir sampling"
(https://en.wikipedia.org/wiki/Reservoir_sampling) to track details
about individual failed checks.  We maintain at most a fixed number
of individual points (constructor argument).
2024-06-26 12:17:00 +02:00
Bård Skaflestad
26cd7ab993 Move opm/core/props to opm/simulators/utils
The opm/core directory is no longer meaningful, and it contains only
components which might collectively be described as simulator
utilities.
2024-06-25 12:22:09 +02:00
Markus Blatt
9dbaad2b3e
Merge pull request #5423 from blattms/bugfix/mswell-exceptions-are-problems
Only indicate problems for exceptions whem updating well potentials,
2024-06-20 14:33:17 +02:00
Vegard Kippe
683dc715e2 Do NOT delete files recursively - causes massive problems if outputdir is not specified.. 2024-06-14 13:36:15 +02:00
Markus Blatt
58ede5e789 Only indicate problems for exceptions whem updating well potentials,
Nearly all exceptions throw when computing well potentoals will not
abort the simulator but result in timestep chops. Hence those should not be
counted as errors (e.g. by calling the OPM_*THROW* macros) and be
reported in the PRT file.

This change will cause at least two more  occurences (in
MSWellHelpers) to be treated as problems. For this we added a new
helper function.
2024-06-12 14:25:37 +02:00
Atgeirr Flø Rasmussen
fc906842ad
Merge pull request #5352 from jcbowden/damaris-limit-variables-v1
Add ability to pass multiple variables to Damaris using DamarisWriter class.
2024-06-07 15:54:59 +02:00
Bård Skaflestad
3074c0d9fd Enable WTMULT as an Input Operation
Basic support for this keyword was added in commit

    OPM/opm-common@5e3e20c552

and this commit enables running models which use that basic support.
Advanced uses, such as including user-defined arguments for the
multipliers, will still be rejected at the input level.
2024-06-06 09:14:01 +02:00
josh bowden
7fc6cc0430 Other small additions from github comments and removal of compile time logic that checks for ParaView and Python - makes code more readable and alows use of Damaris libraries with differing compiled in backends to be swapped without need for recompiling opm-simulators 2024-06-05 17:26:34 +02:00
Svenn Tveit
912cd45182 Support for CNAMES needed with CO2STORE 2024-06-03 20:40:26 +02:00
Bård Skaflestad
a3a2b7a978 Make SummaryState Objects Aware of Undefined UDQ Value
This PR switches to calling the SummaryState constructor which is
aware of the value of undefined UDQs (OPM/opm-common#4052) directly.

While here, also sort headers, split some long lines, and prefer
initialisation lists to constructor body assignments.
2024-05-29 09:16:56 +02:00
josh bowden
2744614f9c update after pull request comments; addition of OUTPUTDIR variable to Damaris XML configuration 2024-05-17 17:36:18 +02:00
Arne Morten Kvarving
b74b170d5b fixed: build with dune-fem 2.9 2024-05-16 10:58:08 +02:00
josh bowden
3630177e3e added ability to pass through multiple variables to Damaris, with full list still defined in initDamarisXmlFile.cpp ; Also adds ability to limit the variables to be passed through using --damaris-limit-variables=<CSV list> coammand line option 2024-05-14 21:08:47 +02:00
Vegard Kippe
b27c83b2fd Tag 'BASIC=0' as allowed in RPTRST 2024-05-06 15:17:08 +02:00
Vegard Kippe
b68a55a9b9 Add parameter InputSkipMode to parameterise the behvaviour of the SKIP100 and SKIP300 keywords 2024-05-03 09:28:14 +02:00
Bård Skaflestad
f71c652b0a
Merge pull request #5281 from daavid00/immCO2
Summary for immobile free-phase at saturations for which the nonwetting relative permeability equals zero
2024-04-12 17:06:21 +02:00
David Landa Marban
9671792106 summary for immobile free-phase at saturations for which the nonwetting relative permeability equals zero 2024-04-12 15:31:22 +02:00
Bård Skaflestad
b1be391d4c
Merge pull request #5172 from totto82/gconprod7
Implement WELL as group limit action
2024-04-11 17:36:55 +02:00
Bård Skaflestad
10d2f52cd2 Add Procedure for Calculating Basic FIP Region Statistics
This commit implements the parallel version of

    EclipseState::computeFipRegionStatistics()

which computes a FIPRegionStatistics object for the current run's
fluid-in-place regions.  The object construction uses an MPI-aware
reduction process to compute the maximum region IDs across all MPI
ranks.

While here, also unconditionally form the statistics object as part
of the EclWriter's constructor to ensure that all ranks participate
in the process.  The initial approach of constructing the object on
first use is not robust in parallel.  We may however wish to compute
these statistics only when needed.  If so, that will be the subject
of follow-up work.
2024-04-05 17:06:13 +02:00
Arne Morten Kvarving
0161d69660 adjust to removal of EWOMS_GET_PARAM 2024-04-05 14:02:28 +02:00
Tor Harald Sandve
e163f906ee Allow Hysteresis option 4 2024-04-03 15:16:48 +02:00
Tor Harald Sandve
920ad68782 Implement WELL as group limit action
And remove G as unsupported option in WTEST
2024-04-03 08:51:09 +02:00
Bård Skaflestad
785b96f6f3 Distribute SummaryConfig Objects With eclBroadcast
Suggested by [at]akva2.

While here, also switch to using type deduction instead of explicit
template arguments for the eclBroadcast overloads.
2024-03-22 16:53:51 +01:00
Arne Morten Kvarving
2a2a9f5de4 DamarisKeywords: correct paths in comments 2024-03-08 12:39:48 +01:00