Commit Graph

11676 Commits

Author SHA1 Message Date
Vegard Kippe
eb869f211f Avoid time step dependent jump in RS after restart 2024-08-28 16:28:51 +02:00
Vegard Kippe
0b6dd93903 Avoid negative time step size after restart (trouble for DRSDT init) 2024-08-28 15:04:15 +02:00
Vegard Kippe
0485bfb47f Set correct episode before initial call to invalidateAndUpdateIntensiveQuantities 2024-08-28 15:04:15 +02:00
Vegard Kippe
8f45cbe4c4 Properly initialize mixing controls after restart. 2024-08-28 15:04:15 +02:00
Vegard Kippe
cc08df226e Update after merging #5527 2024-08-28 15:04:15 +02:00
Bård Skaflestad
9dca8256f3 Split Request Writing Into Stages
This commit introduces helper functions for each individual part of
a convergence report record in the INFOITER file.  In particular, we
create helpers for

  - Time related columns (report step, time step, time &c)
  - CNV pore-volume histogram columns
  - Reservoir convergence metrics (CNV and MB values per phase)
  - Well convergence metrics

This makes the body of the main loop in writeConvergenceRequest()
slightly easier to read and means that we can apply some additional
logic to the CNV pore-volume histograms if the number of values does
not match the expected 3 per type.  In that case we output sentinel
values (e.g., NaN and -1) to signify that the corresponding pieces
of information are unavailable.
2024-08-27 10:50:06 +02:00
Bård Skaflestad
0b40277e01 Revise Convergence Report Collection Procedure
This commit switches the parallel implemenation of function
Opm::gatherConvergenceReport() into using the general serialisation
framework (classes Opm::Serializer<> and Opm::Mpi::Packer).  In
particular, we add serializeOp() functions to each of the types

  - ConvergenceReport
  - ConvergenceReport::ReservoirFailure
  - ConvergenceReport::ReservoirConvergenceMetric
  - ConvergenceReport::WellFailure

and defer the job of converting the objects between in-memory and
byte stream representations to Opm::Serializer<>.  The new special
purpose class CollectConvReports inherits from the latter and uses
its pack() and unpack() member functions, along with its internal
m_buffer data member, to distribute each rank's convergence report
object to all ranks.  We add this feature here, in a very narrowly
scoped use case, to enable testing and experimentation before we
consider adding this distribution mechanism as a general feature in
Opm::MpiSerializer.
2024-08-27 10:50:06 +02:00
Bård Skaflestad
68cc5d917e Output CNV Histogram to INFOITER File
This commit tracks the number of cells and their associate fraction
of the model's "eligible" pore volume (total pore volume in
numerical aquifers subtracted from the model's total pore volume) in
three distinct categories as a function of the non-linear iteration
number:

  - 0: MAX_p { CNV_p } <= strict CNV tolerance
  - 1: MAX_p { CNV_p } \in (strict, relaxed]
  - 2: MAX_p { CNV_p } > relaxed CNV tolerance

We then output these cell counts and pore volume fractions as new
items in the INFOITER file to enable more targeted analysis of the
non-linear convergence behaviour.

To this end, introduce a type alias CnvPvSplit in the
ConvergenceReport and aggregate these across the MPI ranks before we
collect them in the ConvergenceReport objects.

While here, also reduce the amount of repeated logic in
gatherConvergenceReport.cpp through a few local lambdas.
2024-08-27 10:50:06 +02:00
Bård Skaflestad
359e4903d5
Merge pull request #5561 from akva2/janitoring
amgcpr: use override
2024-08-27 09:18:04 +02:00
Arne Morten Kvarving
021d6c2b0c amgcpr: use override 2024-08-27 06:43:00 +02:00
Kjetil Olsen Lye
f97389d1b5
Merge pull request #5554 from multitalentloes/refactor_cuistl
refactor cuistl to gpuistl
2024-08-26 09:55:13 +02:00
Atgeirr Flø Rasmussen
2e15a04db5
Merge pull request #5557 from atgeirr/avoid-cprw-incompatibilities
Intercept CPRW if MICP or polymer injectivity is used.
2024-08-26 09:50:57 +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
Arne Morten Kvarving
4af89f1ced ISTLSolverBda: avoid using deprecated Dune::CollectiveCommunication 2024-08-23 15:10:25 +02:00
Tobias Meyer Andersen
d14fed904a fix typo 2024-08-23 14:42:37 +02:00
Atgeirr Flø Rasmussen
9ccb67ead6 Intercept CPRW if MICP or polymer injectivity is used.
These modeling options are currently incompatible with our CPRW implementation.
2024-08-23 13:08:08 +02:00
Tobias Meyer Andersen
d925d62bf2 refactor cusparsematrixoperations 2024-08-23 11:15:18 +02:00
Tobias Meyer Andersen
d2681b26ed refactor opm_cuda_safe_call 2024-08-23 11:12:13 +02:00
Bård Skaflestad
3dbeed2199
Merge pull request #5550 from akva2/float_support3
Float support in simulators: Batch 3
2024-08-23 10:29:14 +02:00
Tobias Meyer Andersen
85a9ad2b61 refactor cuistl folder names 2024-08-22 15:32:21 +02:00
Tobias Meyer Andersen
5919b417e3 refactor cuview 2024-08-22 15:27:23 +02:00
Tobias Meyer Andersen
fba1858f42 refactor cuvector 2024-08-22 15:20:20 +02:00
Tobias Meyer Andersen
3aa1767548 refactor cusparsematrix 2024-08-22 15:14:33 +02:00
Tobias Meyer Andersen
0c1ea3ee4d refactor cuseqilu0 2024-08-22 15:07:53 +02:00
Bård Skaflestad
93c368cbfa Revise Mixture Density Method for No-Flow Producers
This commit switches the approach introduced in commit eeb1b7e36 (PR
#3169) to using a mobility weighted average of cell level densities
for the connection level mixture densities in no-flow producing
wells.  We also use the recent stoppedOrZeroRateTarget() predicate
to identify those no-flow producing wells instead of inspecting the
connection flow rates.

The mobility weighted average gives a more monotone pressure buildup
for the stopped wells and this is usually what the engineer wants.
This revised approach furthermore needs fewer cell-level dynamic
properties so simplify the computeProperties() signature by
introducing a structure for the property callback functions and
update the callers accordingly.
2024-08-22 14:51:00 +02:00
Bård Skaflestad
586d8e2ddc Generate Property Object Directly
This commit switches computePropertiesForPressures() to return a
Properties object directly instead of populating an object
constructed in the caller.  There is just a single call site for
this function so there's no benefit to using an out parameter here.
While here, also collect the property callbacks into a structure to
simplify the function signature.  This also enables not filling in
the solvent properties unless solvent is active in the run.  Update
caller accordingly.
2024-08-22 14:51:00 +02:00
Bård Skaflestad
6f2ee80e41 Refactor Perforation Pressure Property Helper Function
In particular, split the sections of the main loop out to helper
functions

  - calculatePerforationOutflow() uses the global container factory
    to compute the outflow from each connection
  - initialiseConnectionMixture() computes the 'mix' array depending
    on the local flowing conditions of the connection.  We have
    renamed 'x' and 'mix' arrays to 'currentMixture' and
    'previousMixture' respectively to give more descriptive names in
    the process.

We've also split out the redistribution of the individual phases to
the new private helper functions reapportionGasOilMixture() and
reapportionGasWaterMixture() in order to reduce the cognitive load
of the main loop in computePropertiesForPressures().  While here,
employ pointer arithmetic to expose the underlying structure of the
assignment expressions.
2024-08-22 14:51:00 +02:00
Bård Skaflestad
fa199461b5 Varnish Parts of Well Implementation
In particular

  * Split some long lines
  * Reverse conditions to reduce nesting
  * Mark potentially unused arguments as [[maybe_unused]]
  * Try to remove redundant calculations
  * Mark some objets 'const' where possible
2024-08-22 14:51:00 +02:00
Tobias Meyer Andersen
1721a1071f refactor cuowneroverlapcopy 2024-08-22 14:46:38 +02:00
Tobias Meyer Andersen
158619083e refacor cujac 2024-08-22 14:40:23 +02:00
Tor Harald Sandve
66fd1dfcf3
Merge pull request #5527 from totto82/pvtnum_drdsdtcon
Support deactivation of individual DRSDT/DRVDT/DRSDTCON regions
2024-08-22 14:30:03 +02:00
Tobias Meyer Andersen
d17ee3315b refactor CuDILU 2024-08-22 14:28:33 +02:00
Tobias Meyer Andersen
69897753e8 refactor CuBuffer 2024-08-22 14:12:30 +02:00
Tobias Meyer Andersen
67bc9e8f34 refactor CuBlockPreconditioner 2024-08-22 13:58:35 +02:00
Tobias Meyer Andersen
3f4ae4ddf4 refactor cuistl namespace 2024-08-22 13:52:50 +02:00
Kjetil Olsen Lye
c4f686227b
Merge pull request #5451 from multitalentloes/generalize_thread_block_tuner
Generalize thread block tuner
2024-08-22 12:56:14 +02:00
Tobias Meyer Andersen
8a1dfceeed clang format OpmCuilu0.cpp 2024-08-22 10:24:17 +02:00
Tobias Meyer Andersen
45f6116d5e clang format autotuner 2024-08-22 10:23:36 +02:00
Tobias Meyer Andersen
dcdce71d4b add more explanations 2024-08-22 10:17:53 +02:00
Tobias Meyer Andersen
8b50c90fd1 make use of OpmLog for printing tuning result 2024-08-22 10:07:06 +02:00
Atgeirr Flø Rasmussen
9b4c51de7e
Merge pull request #5553 from jakobtorben/add_support_for_changing_local_solver_in_NLDD
Make local solver in NLDD a runtime specified ISTLSolver
2024-08-22 09:45:32 +02:00
Tor Harald Sandve
b0bfe9f1c1 Adapt to mixControl moving from genericProblem 2024-08-21 16:03:59 +02:00
jakobtorben
1f285ae0d5 Make local solver in NLDD a runtime specified ISTLSolver 2024-08-21 14:24:23 +02:00
Arne Morten Kvarving
267d282d1d NonlinearSolver: optionally instantiate for float 2024-08-21 10:12:25 +02:00
Arne Morten Kvarving
d938d821ad EclGenericWriter: optionally instantiate for float 2024-08-21 10:05:04 +02:00
Arne Morten Kvarving
6a364ea961 GenericOutputBlackoilModule: optionally instantiate for float 2024-08-21 09:56:01 +02:00
Arne Morten Kvarving
aadc5cb69c GenericOutputBlackoilModule: obtain data using appropriate overload 2024-08-21 09:49:22 +02:00
Arne Morten Kvarving
05d37bfbf6 InitStateEquil: optionally instantiate for float 2024-08-21 09:45:11 +02:00
Arne Morten Kvarving
b16fd2f724 EquilibrationHelpers: optionally instantiate for float 2024-08-21 09:43:25 +02:00
Arne Morten Kvarving
bff3dae230 GenericTracerModel: optionally instantiate for float 2024-08-21 09:41:56 +02:00