Commit Graph

338 Commits

Author SHA1 Message Date
Bård Skaflestad
02555ac504
Merge pull request #5626 from vkip/rptsched_wells
Support RPTSCHED WELLS=N
2024-09-25 09:27:58 +02:00
Vegard Kippe
5745f92b08 Avoid unused variable warning 2024-09-24 13:00:34 +02:00
Erik Hide Sæternes
6c556484b1 Added errors_[0] == 0 to conditional 2024-09-23 22:15:15 +02:00
Erik Hide Sæternes
37e96e211c Fixed indexing error in PID controller 2024-09-23 22:15:15 +02:00
Atgeirr Flø Rasmussen
8de619111b
Merge pull request #5476 from jakobtorben/remove_bug_in_simple_iteration_timestep_control
Set correct target iterations in SimpleIterationTimestepControl
2024-09-12 21:43:18 +02:00
Arne Morten Kvarving
05f01bf819 parametersystem.hh: rename to .hpp 2024-09-05 10:07:40 +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
Arne Morten Kvarving
05b997dc0f EclTimeSteppingParams: optionally instantiate for float 2024-08-19 13:18:55 +02:00
Arne Morten Kvarving
1716f8627e AdaptiveTimeStepping: move parameter registration to .cpp file 2024-08-16 17:15:53 +02:00
Arne Morten Kvarving
51b9d891a1 EclTimesteppingParams: introduce translation unit 2024-08-16 16:58:30 +02:00
Arne Morten Kvarving
280704e2e0 move AdaptiveTimeStepping parameters to TypeTag-free parameter system 2024-08-16 13:22:17 +02:00
Arne Morten Kvarving
e2b8715b42 move EclTimeStepping parameters to TypeTag-free parameter system 2024-08-16 13:22:17 +02:00
Arne Morten Kvarving
5f5697ff91 changed: AdaptiveTimeStepping parameters moved to Opm::Parameters namespace 2024-08-06 07:11:45 +02:00
Arne Morten Kvarving
6f7fcb5872 changed: EclTimeStepping parameters moved to Opm::Parameters namespace 2024-08-06 07:05:08 +02:00
Jakob Torben
174c359d62
Set correct target iterations in SimpleIterationTimestepControl 2024-07-11 13:06:06 +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
Bård Skaflestad
027eed16e9 Report CNV Violation Pore-Volume Fraction to INFOITER
This commit includes the fraction of pore-volume whose CNV targets
are violated as a new per-iteration quantity in the INFOITER file
(--output-extra-convergence-info=iteration), with the column header
"CnvErrPvFrac".  We collect the values which are already calculated
in

    BlackoilModel<>::getReservoirConvergence()

and store these as a pair of numerator and denominator in the
ConvergenceReport class.  Note that we need both the numerator and
the denominator in order to aggregate contributions from multiple
ranks.

While here, also make a few more objects 'const' and calculate
column widths directly instead of the maximum number of characters
in writeConvergenceHeader().
2024-05-06 11:31:47 +02:00
Arne Morten Kvarving
0161d69660 adjust to removal of EWOMS_GET_PARAM 2024-04-05 14:02:28 +02:00
Arne Morten Kvarving
6fba1a95c9 adjust to removal of EWOMS_REGISTER_PARAM 2024-04-05 12:24:48 +02:00
Markus Blatt
98e11bf14e [bugfix] Use reasonable timestep if NEXTSTEP in ACTIONX is used.
The step size might still need to be smaller than suggested to not
simulate beyond the end of the current report step. To ensure this we
now use AdaptiveTimeSimulationTimer::provideTimeStepEstimate which
will limit it and also make sure that subsequent time steps will not
get to small either.
2024-03-22 14:25:09 +01:00
Arne Morten Kvarving
acb066eac1 AdaptiveTimeStepping: rename ebosProblem to problem 2024-03-08 12:39:48 +01:00
Markus Blatt
2cd490b601 [Fix] Correct handling of NEXTSTEP in ACTIONX
Previously, the step size would only have used for the first time step
of the next report step (at least of --enable-tuning=true was used).
2024-03-05 13:59:24 +01:00
Arne Morten Kvarving
def5c9cb24 AdaptiveTimeStepping: use {fmt} to format messages
std::to_string doesn't use generic format and thus small numbers
are truncated to 0.0000000
2024-02-29 11:58:26 +01:00
Markus Blatt
cc9d9bab41
Merge pull request #5193 from akva2/move_timestepping_params
move ebos/ecltimesteppingparams.hh to opm/simulators/timestepping
2024-02-23 10:13:24 +01:00
Vegard Kippe
b8b9a3810d Ensure NEXTSTEP is respected also withouth --enbale-tuning=true 2024-02-19 19:15:43 +01:00
Arne Morten Kvarving
846da295d6 move ebos/ecltimesteppingparams.hh to opm/simulators/timestepping 2024-02-19 09:28:50 +01:00
Atgeirr Flø Rasmussen
780f282ed8
Merge pull request #5174 from atgeirr/time-reporting-improvements
Time reporting improvements
2024-02-14 19:36:43 +01:00
Atgeirr Flø Rasmussen
346e37c218 Removing redundant report output and renaming. 2024-02-12 10:54:50 +01:00
Atgeirr Flø Rasmussen
d78288a401 Minor improvements to timing report.
- Using the term Wasted instead of Failed.
 - Making all indents two spaces.
 - Allowing one more digit for linear solver timing output.
2024-02-09 14:50:21 +01:00
Arne Morten Kvarving
5e4c5e8174 BlackoilModel: rename ebosSimulator to simulator 2024-02-08 10:38:25 +01:00
Arne Morten Kvarving
f4222a4f02 SimulatorReport.cpp: correct comment 2024-02-06 14:02:50 +01:00
Arne Morten Kvarving
cbb8cb29f5 AdaptiveTimeSteppingEbos: rename to AdaptiveTimeStepping 2024-02-01 17:57:59 +01:00
Atgeirr Flø Rasmussen
04492413ff Move formatting utilities for convergence failures.
This makes them available for use in other places. The function
std::string to_string(const ConvergenceReport::WellFailure& wf) is new,
but uses the format already established.
2024-01-23 11:16:57 +01:00
Torbjørn Skille
72892f0c4b PRT file updates
* Arrays genarated from RPTSOL + FIP is now strictly following Eclipse format
* Adding reservoir volume array also for custom FIP regions
2024-01-03 21:47:54 +01:00
Arne Morten Kvarving
6f4ecd13d8 AdaptiveTimeSteppingEbos: remove unnecessary ScheduleState.hpp include 2024-01-02 10:18:36 +01:00
Markus Blatt
0cc839314e log problem if asked to continue with nonconverged nonlinear solver.
The user has explicitly asked for this behavior using
--solver-continue-on-convergence-failure=true in this rare case.
2023-11-08 17:16:21 +01:00
Arne Morten Kvarving
3c525aefae changed: put ecl time stepping parameters in separate struct
this to allow reuse in ebos simulators
2023-08-30 11:22:22 +02:00
Vegard Kippe
f5c31588cb Quick fix.. 2023-08-25 14:01:51 +02:00
Arne Morten Kvarving
92fa9577da consistently use std::size_t 2023-08-15 09:32:10 +02:00
Markus Blatt
f20716eaf3 Rename LinearTimeSteppingBreakdown to TimeSteppingBreakdown. 2023-07-25 15:10:07 +02:00
Markus Blatt
fc9b1cccce Improve error message when time step is cut too often/much.
Changes
```
Program threw an exception: [/home/mblatt/src/dune/opm/opm-simulators/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp:586] Solver failed to converge after cutting timestep 11 times.
```
to
```
Simulation aborted: Solver failed to converge after cutting timestep 11 times.
```

Which seems more user friendly.
2023-07-12 16:18:29 +02:00
Atgeirr Flø Rasmussen
cbfe25d0f0 Add NLDD nonlinear solver option. 2023-06-23 16:24:18 +02:00
Atgeirr Flø Rasmussen
fb076a7acc
Merge pull request #4508 from akva2/simulatorreport_avoid_nan
SimulatorReport: protect against division by zero
2023-03-03 11:55:42 +01:00
Arne Morten Kvarving
0cb69ffaa8 SimulatorReport: protect against division by zero 2023-03-03 10:39:57 +01:00
Atgeirr Flø Rasmussen
c9ba0afea3 Silence warnings: struct/class, missing override. 2023-03-03 10:12:46 +01:00
Arne Morten Kvarving
c4e025190e AdaptiveTimeSteppingEbos: put consistentlyFailingWells in detail namespace
no reason for this to be a template
2023-03-02 12:37:13 +01:00
Arne Morten Kvarving
b232613623 AdaptiveTimeSteppingEbos: put logTimer in detail namespace 2023-03-02 12:37:13 +01:00
Arne Morten Kvarving
ebd53ee72d move StepReport into ConvergenceReport.hpp
there is no reason for this to be typetag dependent
2023-03-02 12:37:13 +01:00
Kai Bao
460aa5027b not considering wells with wrong flow direction as converged
under THP constraint, well can get converged with wrong flow direction
(e.g. a producer is injecting), becasue we cut off the wrong flow
direction as zero rate in the VFP evaluation
2023-02-24 14:30:45 +01:00