Commit Graph

20512 Commits

Author SHA1 Message Date
Vegard Kippe
9d9726920b Post-review update - reducing global communication and simplifying 2024-10-16 22:24:01 +02:00
Vegard Kippe
6c4512be12 Fix MPI restart issue (test failures for some oil-water cases) 2024-10-16 22:24:01 +02:00
Vegard Kippe
4bc904d941 Fix RFT output for non-root connections.. 2024-10-16 22:24:01 +02:00
Vegard Kippe
f7ac4f8a3c Avoid initializing inactive multi-segment wells + avoid direct MPI call 2024-10-16 22:24:01 +02:00
Vegard Kippe
5191271883 Add inactive wells to all partitions with connections 2024-10-16 22:24:01 +02:00
Vegard Kippe
cd26ce5568 Add inactive wells to rank 0 for output 2024-10-16 22:24:00 +02:00
Vegard Kippe
7ee218b1e2 In partitioning, only account for wells that will be active at some point in the simulation. 2024-10-16 22:24:00 +02:00
Atgeirr Flø Rasmussen
b886d4e4ae
Merge pull request #5596 from bska/enable-new-satfunc-consistency-checks
Enable New Saturation Function Consistency Checks
2024-10-16 15:31:18 +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
92efa31c31 Tidy Up FlowProblem* Classes
In preparation of enabling the new saturation function consistency
checks.
2024-10-16 12:18:33 +02:00
Atgeirr Flø Rasmussen
585627295f
Merge pull request #5592 from bska/top-level-sfunc-check-mgr
Add Top Level Container for Saturation Function Consistency Checks
2024-10-16 12:02:55 +02:00
Atgeirr Flø Rasmussen
84a94478d2
Merge pull request #5678 from akva2/janitoring_clang
rename capture variable
2024-10-16 11:50:22 +02:00
Arne Morten Kvarving
9561191992 rename capture variable
to avoid shadowing warnings with clang
2024-10-16 11:02:26 +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
98513d92f9
Merge pull request #5675 from jakobtorben/fix_memory_bug_in_setPrimaryVars_for_msw
Fix memory bug in setPrimaryVars for MSW
2024-10-16 09:26:06 +02:00
jakobtorben
e2ac43b76f Fix memory bug in setPrimaryVars for MSW 2024-10-15 16:31:38 +02:00
Bård Skaflestad
c228f31287
Merge pull request #5665 from bska/assign-per-rank-tracer-conc-at-restart
Use Rank's Local Cells for Tracer Concentration Restart
2024-10-14 17:24:33 +02:00
Bård Skaflestad
65654c8e01 Use Rank's Local Cells for Tracer Concentration Restart
The 'globalIdx' generated by localIdxToGlobalIdx() is in the range
zero to number of active cells in global model, not zero to number
of active cells on rank.  Using 'globalIdx' as an argument to
set*TracerConcentration() therefore ends up indexing out-of-bounds
for the internal arrays in the tracer model object in parallel
restarted simulation runs.

The problem has been present since the restart support for tracers
was added in commit e9c45f4ca (PR #3708).

This commit switches to using the 'elemIdx' instead, as we already
do when calling the output module's setRestart() member function.
Following this, we are able to restart the standard Norne benchmark
case (NORNE_ATW2013.DATA) in parallel.  The numerical results for
the tracer concentrations are, however, a little questionable and
will warrant further investigation.  Nevertheless, the tracer values
are now the same in a parallel restarted run as in a sequential
restarted run.
2024-10-11 18:05:48 +02:00
Atgeirr Flø Rasmussen
c7b3e40bfa
Merge pull request #5589 from bska/sfunc-checkpoint-interface
Add Protocol for Populating Saturation Function End Points per Cell
2024-10-11 12:52:04 +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
eaa9e994d2
Merge pull request #5662 from bska/bump-version
Bump Master Development Version
2024-10-11 11:31:17 +02:00
Bård Skaflestad
cab5b7c000 Bump Master Development Version
New features now go into the 2025.04 release.
2024-10-11 10:10:55 +02:00
Atgeirr Flø Rasmussen
af93859a29
Merge pull request #5660 from jakobtorben/remove_unused_num_cells_argument
Remove unused num_cells argument from well equations
2024-10-11 08:25:16 +02:00
jakobtorben
60bd3f5514 Remove unused num_cells argument from well equations 2024-10-10 20:26:13 +02:00
Atgeirr Flø Rasmussen
064a66e794
Merge pull request #5659 from atgeirr/delay-well-stop-by-one-iteration-rebased
Delay stopping wells after local well solves until global update agrees (rebased)
2024-10-10 17:37:24 +02:00
Atgeirr Flø Rasmussen
a7efc0091d
Merge pull request #5341 from jakobtorben/NLDD_remove_need_for_addWellContrib
Remove the need for add well contributions to matrix for NLDD
2024-10-10 16:23:52 +02:00
Atgeirr Flø Rasmussen
6602c8be7f Reformulate a nonzero rate criterion. 2024-10-10 16:17:38 +02:00
Stein Krogstad
a94d667462 Don't stop wells unless global update agrees 2024-10-10 16:17:38 +02:00
jakobtorben
e790972201 PR review changes 2024-10-10 15:51:53 +02:00
Atgeirr Flø Rasmussen
0ff3d63c0a
Merge pull request #5653 from bska/fix-rst-inplace
Initialise Fluid-in-Place Balance Sheets at Restart
2024-10-10 15:43:03 +02:00
Atgeirr Flø Rasmussen
fc43d3ba44
Merge pull request #5655 from BigDataAccelerate/fix_type
Bug fix in rocsparsesolver
2024-10-10 15:34:03 +02:00
jakobtorben
22af0bd2ae Pre-calculate local perforated cell indexes in subdomains 2024-10-10 15:12:48 +02:00
jakobtorben
61d61541d6 Remove reallocatin of temporary local variables 2024-10-10 15:12:48 +02:00
jakobtorben
3ea5c5820e Add well operator for NLDD domains 2024-10-10 15:12:48 +02:00
Kjetil Olsen Lye
9bc7155cf3
Merge pull request #5552 from multitalentloes/add_mixed_precision_ilu0_and_dilu_on_gpu
Add mixed precision ilu0 on gpu
2024-10-10 13:03:14 +02:00
Bård Skaflestad
71079ce737 Initialise Fluid-in-Place Balance Sheets at Restart
Commit 6ba9dc086 (PR #5626) moved the balance sheet report output
logic ahead of the timestep.  As a consequence, the output module's
'inplace_' and 'initialInplace_' data members must be fully
initialised the first time we call 'writeReports()' if the run
requests balance sheet output.

This commit initialises those objects by calling calc_inplace() from
EclWriter<>::endRestart().  Doing so restores the behaviour from
before PR #5626.  Note, however, that using this value for
'initialInplace_' is incorrect as the simulator then, in a restarted
run, will calculate recovery factors based on the fluid distribution
at the restart time instead of at the start of the base run.
Nevertheless this is, as alluded to earlier, how the simulator has
always performed.  The behaviour is just a little more explicit now.
2024-10-10 12:47:13 +02:00
Bård Skaflestad
1475e47901
Merge pull request #5652 from bska/regression-test-equalreg-multy
Activate New Regression Tests for EQUALREG/MULTY
2024-10-10 12:39:08 +02:00
Bård Skaflestad
ffc0b5304f
Merge pull request #5654 from bska/varnish-eclwriter-beginrestart
Varnish EclWriter::beginRestart() Implementation
2024-10-10 12:35:43 +02:00
Bård Skaflestad
9344423d04 Varnish EclWriter::beginRestart() Implementation
In particular,

  - Split some long lines
  - Mark objects 'const' where possible
  - Reduce scope of objects
  - Add braces to single statement control structures
  - Prefer pre-increment
  - Prefer type deduction for induction variables
2024-10-10 11:35:21 +02:00
Bård Skaflestad
8ccf4682a8 Activate New Regression Tests for EQUALREG/MULTY
We use all models generously provided in PR OPM/opm-tests#1239.
2024-10-10 11:35:16 +02:00
Kai Bao
0e127194de
Merge pull request #5631 from vkip/winjmult_damp
Add dampening to the injectivity multipliers (WINJMULT)
2024-10-10 11:28:22 +02:00
Markus Blatt
9300e4819a
Merge pull request #5656 from bska/simplify_logoutput_helper_test
Simplify Unit Tests for LogOutputHelper
2024-10-10 10:09:25 +02:00
Bård Skaflestad
e550fd71d0 Simplify Unit Tests for LogOutputHelper
In particular, put more of the common setup code into the test
fixture and use more powerful constructors for the EclipseState
object.  While here, also switch to using the update_well_var() and
update_group_var() member functions on the SummaryState object where
appropriate since the resulting statements become slightly easier to
understand in isolation.
2024-10-10 09:56:14 +02:00
Vegard Kippe
a2882dc0c8 Resetting WINJMULT dampening factors before fixed BHP calculations 2024-10-10 09:25:28 +02:00
Kai Bao
56619e4476
Merge pull request #5651 from kjetilly/only_one_component
Compile only a select number of components.
2024-10-10 08:58:32 +02:00
Kjetil Olsen Lye
1816e9dfad Added better help message 2024-10-09 20:57:37 +02:00
Razvan Nane
82f32be1d9 fix typo in rocsparsesolver 2024-10-09 20:27:01 +02:00
Kjetil Olsen Lye
10cf9ff839 use fmt::print instead of fmt::println 2024-10-09 16:29:02 +02:00
Kjetil Olsen Lye
d91208099f Use array instead of vector 2024-10-09 13:56:06 +02:00