Commit Graph

10940 Commits

Author SHA1 Message Date
Kai Bao
2ddba5b339
Merge pull request #5128 from steink/fix_network_convergence_issues
Fix network convergence issues
2024-01-30 00:17:09 +01:00
Lisa Julia Nebel
e346315fa2 Remove NONNC from the UnsopportedFlowKeywordList 2024-01-29 18:46:59 +01:00
Bård Skaflestad
d94ae5dad6
Merge pull request #5131 from akva2/damaris_janitoring
Damaris: avoid signed/unsigned comparison warnings
2024-01-29 17:05:18 +01:00
Markus Blatt
819842d7cf Fix linking errors when using shared libraries.
We accomplish that by passing the module version as a string to the
constructors of LogOutputHelper and EclGenericOutputBlackoilModel
instead of calling moduleVersionName() in LogOutputHelper. That way
moduleVersionName is not needed by libopmsimulators anymore and
compilation works again for people requesting shared libraries via
CMake's BUILD_SHARED_LIBS variable.
2024-01-29 16:37:38 +01:00
Arne Morten Kvarving
99b4aae148 Damaris: avoid signed/unsigned comparison warnings
while at it use std::size_t
2024-01-29 14:34:31 +01:00
Bård Skaflestad
859db850c0
Merge pull request #5111 from lisajulia/feature/deterministic-indicesSyncer
Construct the matrices in the AMG hierarchy with deterministic indices.
2024-01-29 13:37:54 +01:00
Kai Bao
f0fab97bb6
Merge pull request #5124 from vkip/revert_always_open_history_wells
Revert always open history wells
2024-01-29 10:10:55 +01:00
Arne Morten Kvarving
800422bd17 HDF5Serializer: add translation unit 2024-01-29 10:00:48 +01:00
Arne Morten Kvarving
96a3a6d45a changed: move hdf5serializer to opm/simulators/utils/HDF5Serializer.hpp
does not interact with typetag system
2024-01-29 09:42:49 +01:00
Stein Krogstad
97477ea593 avoid re-opening previously stopped wells 2024-01-26 16:24:09 +01:00
Stein Krogstad
24c4f75ecb Use stricter tolerance when dynamic thp 2024-01-26 15:02:14 +01:00
Stein Krogstad
a9ab62e6b8 Don't set lower bound on network update 2024-01-26 14:58:06 +01:00
Lisa Julia Nebel
6dfa9b1b76 Add comment on trailing return type with decltype that is used for detecting the signature of the coarsen function of the Dune::Amg::IndicesCoarsener 2024-01-26 14:29:19 +01:00
Lisa Julia Nebel
74608147c0 Add comment on trailing return type with decltype that is used for detecting the existence of setUseFixedOrder member function 2024-01-26 14:29:15 +01:00
Lisa Julia Nebel
5b50a4801f Construct the matrices in the AMG hierarchy (created in the twolevelmethod) with deterministic indices if possible.
The function 'coarsen' for the coarser level is called with the respective flag if it is defined. Then the matrices in the AMG hierarchy are constructed with deterministic indices.
If it is not defined yet, it is called without the flag and the matrices in the AMG hierarchy are constructed with non-deterministic indices.
2024-01-26 13:51:41 +01:00
Vegard Kippe
31b46b4829 Revert the choice to open history wells at every step, since this may cause some models to be stuck at very short time steps. 2024-01-26 12:05:26 +01:00
Tor Harald Sandve
de05c84b1d Add co2 mass in place summary vectors 2024-01-26 09:15:43 +01:00
Atgeirr Flø Rasmussen
2626fbb84b
Merge pull request #5002 from multitalentloes/add_cudilu
Add cudilu
2024-01-25 15:43:39 +01:00
Bård Skaflestad
d2af824b27
Merge pull request #5120 from atgeirr/avoid-nldd-crash
Avoid illegal combination of options.
2024-01-25 15:38:36 +01:00
Tobias Meyer Andersen
4b0dd54f15 Add CUDA implementation of the DILU
preconditioner. Uses graph coloring to exploit
parallelism in upper and triangular solves when
computing a diagonal approximate inverse of a
sparse matrix. Supports blocksizes up to 3.
2024-01-25 14:26:38 +01:00
Lisa Julia Nebel
60b0a33bd4 Construct the matrices in the AMG hierarchy (created in the PreconditionerFactory) with deterministic indices if possible.
The function 'setUseFixedOrder' is called if it is defined and the matrices in the AMG hierarchy are constructed with deterministic indices.
If it is not defined yet, it is not called and the matrices in the AMG hierarchy are constructed with non-deterministic indices.
2024-01-25 11:32:09 +01:00
Bård Skaflestad
6dd043446e Communicate Dynamic Transmissibility Multiplier to Output Layer
This commit captures the rock compaction transmissibility multiplier
in the 'PerfData' during the non-lienear iterations and communicates
the converged value back to the output layer through the new data
member to the data::Connection structure,

    double data::Connection::compact_mult
2024-01-25 09:35:08 +01:00
Bård Skaflestad
8a8af09e7a Defer More Static D-Factor Calculation to Connection Class
In particular, we don't need the porosity value anymore now that the
"getDFactor()" function takes only the component density of gas at
surface conditions, the current dynamic gas viscosity at reservoir
conditions and a Connection object.

While here, split a few long lines and make more objects 'const' for
better maintainability.
2024-01-24 18:03:09 +01:00
Atgeirr Flø Rasmussen
3c4dd1f3b7 Avoid illegal combination of options.
NLDD requires --matrix-add-well-contributions=true for now.

Also: minor improvement to well rank and subdomain output clutter.
2024-01-24 14:19:07 +01:00
Atgeirr Flø Rasmussen
7c2f01996a Add cpr_trueimpesanalytic option for LinearSolver parameter. 2024-01-24 13:03:18 +01:00
Bård Skaflestad
eb9ead5577 Support at Least NTFIP Distinict Regions for Inter-Region Flow
This commit ensures that we have backing support for region IDs up
to and including NTFIP (TABDIMS(5), REGDIMS(1)).  The existing setup
would fail (segmentation violation) in the case of a summary vector
of the form

    ROFT
      36 31 /
    /

when the maximum FIPNUM value was 30.  We nevertheless support
maximum FIPNUM values exceeding NTFIP.

We add a new optional parameter to the EclInterRegionFlowMap
constructor.  The parameter allows client code to specifiy a
"minimum maximum" region ID that all ranks must support.  This value
will be enforced during parallel aggregation.
2024-01-24 09:54:44 +01:00
Bård Skaflestad
24ebb77257
Merge pull request #5116 from atgeirr/parallel-well-domain-output
Parallel well domain and error logging for NLDD
2024-01-23 15:41:11 +01:00
Atgeirr Flø Rasmussen
9102b2a352 Use to_string() for WellFailure.
New functionality added is local well failure logging for NLDD.
2024-01-23 11:52:22 +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
Arne Morten Kvarving
98c704c1c3 changed: move ebos/eclmpiserializer.hh to opm/simulators/utils/MPISerializer.hpp
it does not use the typetag system
2024-01-23 10:51:32 +01:00
Arne Morten Kvarving
873102e9ea added: RST CONV support for polymer, solvent and brine 2024-01-22 09:58:06 +01:00
Atgeirr Flø Rasmussen
1842df7cfd Output well subdomain info properly in the parallel case. 2024-01-19 16:15:53 +01:00
Atgeirr Flø Rasmussen
ae838d0b84
Merge pull request #5103 from hnil/trueimpesanalytic
add analytic true impes
2024-01-18 22:51:57 +01:00
hnil
bec5a233eb removed more warings and a bug for strange index settings 2024-01-18 18:25:50 +01:00
hnil
cced62edc0 fixed warning 2024-01-18 18:18:42 +01:00
hnil
be27e2388d fixed name in cpp file 2024-01-18 11:40:59 +01:00
hnil
1900379343 changes to adjust to review comments 2024-01-18 10:37:48 +01:00
Atgeirr Flø Rasmussen
a52bcf51b1 Initialize the communication object in initialize(). 2024-01-17 12:39:52 +01:00
Arne Morten Kvarving
be84969338 added: hook up RPTRST CONV output to restart file if requested 2024-01-16 12:58:02 +01:00
Bård Skaflestad
ceffbd2fc5 Chase Constructor API Change for Opm::Connection Class 2024-01-15 11:05:02 +01:00
Bård Skaflestad
534465d212
Merge pull request #5104 from atgeirr/nldd-improved-reporting
Nldd improved reporting
2024-01-15 11:00:58 +01:00
Atgeirr Flø Rasmussen
6eb670b5c7 Improve parallel logging in NLDD solver. 2024-01-15 09:08:52 +01:00
hnil
61329532a7 -- add true impes
-- moved code to hpp to avoid unnesseary logic
2024-01-12 15:33:09 +01:00
Tor Harald Sandve
d72ea5fcb0 add option for explicit pressure for rock compaction (only transmissibility) 2024-01-11 16:09:08 +01:00
Atgeirr Flø Rasmussen
b9b42a01cc Catch exceptions from local solves. 2024-01-11 14:14:00 +01:00
Tor Harald Sandve
20fb8fa699 Fix minimum newton iteration
We also change the default to 2 to keep the same results
2024-01-11 09:17:50 +01:00
Arne Morten Kvarving
ec9c704def cosmetics and header cleanups in damaris classes 2024-01-10 14:16:02 +01:00
Arne Morten Kvarving
ed28d7c9ef changed: move damaris command line properties to separate file
to avoid pulling in the whole writer in DamarisKeywords.hpp
2024-01-10 14:16:02 +01:00
Arne Morten Kvarving
240e0dd04f fixed: add header guard to DamarisOutputModule.hpp 2024-01-10 14:16:02 +01:00
Arne Morten Kvarving
e686fabb39 added: class for calculating RPTRST CONV 2024-01-10 13:07:34 +01:00
Stein Krogstad
cdb43d917b Include all derivatives for acceleration term in MS wells 2024-01-09 11:59:07 +01:00
Tor Harald Sandve
3cb5b48d60
Merge pull request #5066 from vkip/wdfac_cqmult
Use connection rates satisfying the connection IPR when evaluating flow-dependent skin
2024-01-09 09:04:02 +01:00
Bård Skaflestad
60c7c79f58 Output Well Flow Sheets for All Wells
There is no need to restrict PRT file flow reports to those wells
which are active on the current rank since the SummaryState object
holds information for all wells active at the current report step.
2024-01-08 08:58:51 +01:00
Bård Skaflestad
5e9bdfd342
Merge pull request #5085 from blattms/mark-skip-endskip-supported
Mark keywords SKIP, SKIP100, SKIP300, and ENDSKIP as supported.
2024-01-04 11:42:07 +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
Markus Blatt
0c01a3ac50 Mark keywords SKIP, SKIP100, SKIP300, and ENDSKIP as supported.
Follow up to OPM/opm-common#3817 which implements the support for
these keywords.
2024-01-02 11:06:33 +01:00
Arne Morten Kvarving
165b57c66a Aquifer***: clean up includes 2024-01-02 10:39:59 +01:00
Arne Morten Kvarving
6f4ecd13d8 AdaptiveTimeSteppingEbos: remove unnecessary ScheduleState.hpp include 2024-01-02 10:18:36 +01:00
Tor Harald Sandve
f508f3d4e8 add output of dissolved solvent rswsol 2023-12-21 10:48:58 +01:00
Vegard Kippe
b7b99a2445 Fixed var names 2023-12-20 15:06:01 +01:00
Vegard Kippe
32634f47d1 Properly check both positive and negative solutions to the connection IPR with flow-dependent skin 2023-12-20 14:20:50 +01:00
Vegard Kippe
ab690980de Pick valid rate or use zero flow-dependent skin 2023-12-20 14:20:50 +01:00
Vegard Kippe
d252f069e4 Test using rate consistent D-factor transmissibility multipliers 2023-12-20 14:20:50 +01:00
Bård Skaflestad
b30bfb5b1b
Merge pull request #5073 from atgeirr/fix-output-dir
Avoid modifying outputDir, leave empty if defaulted.
2023-12-19 16:50:27 +01:00
Arne Morten Kvarving
de9c3ddfda added: test for outputdir 2023-12-19 15:21:58 +01:00
Arne Morten Kvarving
c95cd5b147 added: bool param to flag that Main.hpp should not initialize/finalize MPI
needed for tests
2023-12-19 15:12:44 +01:00
Atgeirr Flø Rasmussen
093b346426 Avoid modifying outputDir, leave empty if defaulted.
Handle this case for Damaris, which needs to be told the output dir
before this is available from the IOConfig.
2023-12-19 15:12:44 +01:00
Stein Krogstad
e908c95ca2 Avoid call to saturationPressure 2023-12-19 09:54:52 +01:00
Atgeirr Flø Rasmussen
01b76e2658 Order variables the same as in constructor init list. 2023-12-15 14:23:55 +01:00
Atgeirr Flø Rasmussen
1dbd971710
Merge pull request #4889 from jcbowden/damariswriter-for-sim-fields-v5
Geometric mesh data added for Damaris in-situ visualisation
2023-12-15 10:18:00 +01:00
Josh Bowden
4db49a3785 Reformat using clag-format with default OPM format guide 2023-12-14 17:30:21 +01:00
Josh Bowden
8094504018 Jenkins build error issue fix for unused typedefs 2023-12-14 12:39:18 +01:00
Josh Bowden
55dc80725f Improved in-line help comments; output MPI cell values to HDF5 only when saving mesh to HDF5; removed timing data 2023-12-14 10:27:05 +01:00
Bård Skaflestad
fc73a51310
Merge pull request #4873 from vkip/wsegvalv_uda_item4
Allow UDA for WSEGVALV item 4
2023-12-13 21:19:27 +01:00
Josh Bowden
e16cd9a3b3 finalise the PR 4889 modifications - added command line option to specifiy the shared memory file name in the <buffer> XML element --damaris-shared-memory-name which will be a randomised string opm-damaris-<random-string> for better multi-simulation behaviour when running more than one simulation on a single node. 2023-12-13 18:14:45 +01:00
Josh Bowden
757a96941a final review changes from PR 4889 and added extra command line argument to output mesh data --damaris-save-mesh-to-hdf 2023-12-13 18:14:37 +01:00
Josh Bowden
9309f5a1bd overhaul of GridDataOutput class to accept a vector type so that raw pointers are not overrun, this has lead to finding a good way to get the size of the data area that is alloacted by the DamarisVar wrapper class for damaris_alloc() 2023-12-13 18:14:06 +01:00
Josh Bowden
54d6db6f35 Update 1 for code after code review of PR 4889 2023-12-13 18:13:55 +01:00
Markus Blatt
4f619f8f38 Also print information about parallel run to PRT file.
Up to now this information is only output to standard out.
To help with debugging and replicating (e.g. in case of crashes)
without saved standard putput, we now also print the imformation about
MPI processes and OMP threads to the PRT file.
2023-12-13 16:42:02 +01:00
Vegard Kippe
fcc3a19a42 Explicit cast to avoid narrowing warning. 2023-12-13 14:34:36 +01:00
Arne Morten Kvarving
6e21bdb35b GroupEconomicLimitsChecker: use std::array 2023-12-12 15:56:08 +01:00
Arne Morten Kvarving
d9cd6b51c3 GroupEconomicLimitsChecker::closeWellsRecursive: pass group as const ref 2023-12-12 15:53:37 +01:00
Arne Morten Kvarving
825b4b6677 GroupEconomicLimitsChecker: cleanup includes 2023-12-12 15:51:37 +01:00
Vegard Kippe
62de832e8b Post review update 2023-12-12 09:52:01 +01:00
Vegard Kippe
62ac4dc663 Take default UDQ value from UDQPARAM 2023-12-12 09:52:01 +01:00
Vegard Kippe
15305e467d Allow UDA for WSEGVALV item 4 2023-12-12 09:51:50 +01:00
Bård Skaflestad
5c9e86666c Publish Short Region Set Names Only
That way, in-place quantities will go through the short-to-canonical
name translation in FieldProps regardless of their origin--e.g.,
RPTSOL/RPTSCHED or explicit SUMMARY section vectors.
2023-12-11 17:01:40 +01:00
Bård Skaflestad
922cd86d59
Merge pull request #5056 from akva2/janitoring
GasLiftXXX: clean up includes
2023-12-11 16:57:21 +01:00
Arne Morten Kvarving
035bd3a725 GasLiftXXX: clean up includes
in particular avoid including GasLiftStage2.hpp in BlackoilWellModel
2023-12-11 15:55:05 +01:00
Bård Skaflestad
c03f794f9c Remove Dashed Lines Between Records in PRT File Reports
This commit splits the production, injection, and cumulative
*Report_() functions into three logically distinct parts, one for
outputting the report header (begin*Report_()), one for outputting a
single report record (output*ReportRecord_()), and one for ending
the report (end*Report_()).  This simplifies the logic of the
*Record_() member functions since they no longer need to infer the
context which is already available in the caller and can perform a
more narrow task than before.

With this separation we're also able to remove the dashed lines
which would previously separate each report record, thereby creating
PRT file report sheets which have a more expected layout.

Moreover, as an aid to future maintenance, we also factor out common
code for the well and group cases in each *Record_() function.

Finally, fix a unit conversion problem in the report values for
cumulative gas quantities.  The sheet header states that we should
be outputting values in 'MM' prefixed units, but we were only
scaling the gas values by a factor of 1000 instead of 1000*1000.  In
other words, the injection and production gas values in the
cumulative sheet were off by a factor of 1000.
2023-12-11 10:01:22 +01:00
Arne Morten Kvarving
7841f6abcb remove dead store 2023-12-08 18:42:41 +01:00
Arne Morten Kvarving
3534c6d1fa mark overriden virtual method as such 2023-12-08 18:42:21 +01:00
Arne Morten Kvarving
269d1877f7 SerializableSim: add virtual dtor 2023-12-08 18:42:07 +01:00
Atgeirr Flø Rasmussen
a52877081e
Merge pull request #5046 from blattms/comm-exception-wetgaspvt-sat-pressure
[fix,MPI] Handle exception during assembleWellEqWithoutIteration correctly
2023-12-08 13:02:42 +01:00
Josh Bowden
0f1d31c88a sets the SHMEM buffer name to be the same as the simulation name, usefull if running multiple simulations on the same machine, so that buffers are not removed by other simulations 2023-12-08 11:00:22 +01:00
Josh Bowden
89fabf132e adding command line option to specify the dask file being used --damaris-dask-file= that will add the file name to the Daamris XML configuration file 2023-12-08 10:59:51 +01:00
Bård Skaflestad
ec549df37b Remove Spurious Blank Lines in PRT File Reports
The StreamLog::addMessageUnconditionally() member function will end
each message with a newline (std::endl) so we should not add such
newlines ourselves.  The extra newline characters produce spurious
blank lines in the report sheets, e.g., for the "PRODUCTION REPORT".

This commit removes the last newline character from each report
request, thus deferring that responsibility to OpmLog::note()
instead.  Doing so, however, means we have take a little more care
with the first line of each report lest we create report sheets
which are smushed together.
2023-12-08 10:22:43 +01:00
Stein Krogstad
051f4d4eab Remove early-return functionality due to unintended consequences 2023-12-08 00:36:39 +01:00
Markus Blatt
50e1d09a8c Add semicolon to help with indentation. 2023-12-07 16:41:16 +01:00
Markus Blatt
260dac77a5 [MPI] Handle exception during assembleWellEqWithoutIteration correctly
For this particular model WetGasPVT::saturationPressure did throw
because convergence in the newton solver is not reached in 20
iterations. Unfortunately, the exception was only seen on one MPI rank
and the others continued.

With this commit we communicate the problem and throw on all MPI
processes. Time step will be cut as a result.
2023-12-07 15:41:35 +01:00
Stein Krogstad
7c91c015cf updates according to Atgeirrs comments 2023-12-07 13:09:00 +01:00
Stein Krogstad
1fd1c5afc6 Updates according to Atgeirr's comments 2023-12-07 13:09:00 +01:00
Stein Krogstad
00bd006eb4 Fix bugs 2023-12-07 13:09:00 +01:00
Stein Krogstad
94cde80235 always set wells operable to avoid skipping linear solve/updating 2023-12-07 13:09:00 +01:00
Stein Krogstad
2121373e4f clean-up 2023-12-07 13:09:00 +01:00
Stein Krogstad
5083052a3f clean-up, fixing and add debug info 2023-12-07 13:09:00 +01:00
Stein Krogstad
743c7bd120 add argument to get proper conv for well-copies 2023-12-07 13:09:00 +01:00
Stein Krogstad
9a5aef6e5e move function for proper access to well_state 2023-12-07 13:09:00 +01:00
Stein Krogstad
88ede7b7fc revert to original 2023-12-07 13:09:00 +01:00
Stein Krogstad
ee16e90ba2 fix well-convergence for well-copies 2023-12-07 13:09:00 +01:00
Stein Krogstad
73ec44d9c4 include use-implicit-ipr as paramaeter 2023-12-07 13:09:00 +01:00
Stein Krogstad
03366b92eb include thp-solve for potentials 2023-12-07 13:09:00 +01:00
Stein Krogstad
44e17fa615 cleanup thp-solve 2023-12-07 13:09:00 +01:00
Stein Krogstad
3e6732a67b rename to implicit_ipr 2023-12-07 13:09:00 +01:00
Stein Krogstad
746e05db5d Include implicit ipr for ms-wells 2023-12-07 13:09:00 +01:00
Stein Krogstad
b287981e5e testing 2023-12-07 13:09:00 +01:00
Stein Krogstad
7aa50f149f updates 2023-12-07 13:09:00 +01:00
Stein Krogstad
2470b20d13 final revert 2023-12-07 13:09:00 +01:00
Stein Krogstad
94c0b49cf7 revert changes 2023-12-07 13:09:00 +01:00
Atgeirr Flø Rasmussen
446670943a
Merge pull request #5042 from akva2/serializer_throw_early_no_hdf5
changed: throw early in simulator serializer
2023-12-07 10:42:01 +01:00
Bård Skaflestad
d2ee47de7f
Merge pull request #5041 from steink/prevent_nans_for_valve_models
Guard against nans from certain expressions in the valve models
2023-12-06 19:42:32 +01:00
Stein Krogstad
4355a94511 make reference to parameter 2023-12-06 14:45:18 +01:00
Arne Morten Kvarving
4eeefabedd changed: throw early in simulator serializer
if HDF5 input/output is requested but no support is available
we throw early instead of just logging an error when save/load
is to be performed
2023-12-06 10:03:29 +01:00
Markus Blatt
faad3a6ee5
Merge pull request #4811 from akva2/simulator_serializer_class
Move simulator serialization to separate class
2023-12-06 10:02:26 +01:00
Markus Blatt
abd387abba
Merge pull request #5036 from blattms/comm-sigular-mat-exception
Communicate exceptions during WellModel::updateAndCommunicate
2023-12-06 09:54:00 +01:00
Stein Krogstad
a483839caa return zero for powers with negative base 2023-12-05 21:28:54 +01:00
Arne Morten Kvarving
f46b6c5a01 changed: move simulator serialization to separate class
more separation of concerns
2023-12-05 11:20:22 +01:00
Arne Morten Kvarving
eb599af058 add missing header 2023-12-05 11:00:56 +01:00
Markus Blatt
3a9c586d19 Make sure that problems with singular matrices are logged.
Previously, if the problem occured on an MPI process with rank other
than zero the the logging would not seen (at least in the output
files). Now together with the previous commit the problem should be
logged together with the well name and calling method.
2023-12-04 23:15:08 +01:00
Markus Blatt
779dd74923 Communicate exceptions during WellModel::updateAndCommunicate
For multi segment well the underlying call to
MultisegmentWell::updateWellStateWithTarget (at least if
updateWellStateWithTHPTargetProd is called for a producer under thp
control) might throw as there might be a singular matrix during the
solve needed in MultisegmentWell::iterateWellEqWithControl.

Previously, if that happened then the MPI process where it happened would
stop the nonlinear iteration as failed and try with a chopped time
step. The others might go one with the current time step and we would
see MPI errors about truncated messages.

Now we communicate any exception happening during this part of
WellModel::updateAndCommunicate and all processes will stop the
nonlinear iteration as failed and chop the time step.
2023-12-04 22:26:55 +01:00
Bård Skaflestad
338c210985
Merge pull request #5034 from akva2/fix_fip_no_summary_kw
fixed: grab list of FIP regions from FieldPropsManager
2023-12-04 17:46:00 +01:00
Arne Morten Kvarving
d120fe1ebc fixed: grab list of FIP regions from FieldPropsManager
not from SummaryConfig. the latter only holds regions with
summary keywords
2023-12-04 13:24:32 +01:00
Vegard Kippe
55067636f4 Ensuring that the UDA is updated every time step, not just only report step. 2023-12-01 19:44:09 +01:00
Vegard Kippe
fa6697a5fa Capture reference in lambda 2023-12-01 13:30:48 +01:00
Vegard Kippe
69f82f1104 Allow using UDQ for WCONPROD item 12 (ALQ) 2023-12-01 13:21:34 +01:00
Vegard Kippe
17452e0fc6 Adding const 2023-12-01 09:34:42 +01:00
Vegard Kippe
0acb148ba7 Using std::exception 2023-11-30 16:13:40 +01:00
Vegard Kippe
2294983759 Catch exceptions from well testing (often: inf/nan in MSW matrices). 2023-11-29 09:17:53 +01:00
Antonella Ritorto
8017ff9a02 add cartesianCoordianteLevel in ALUCartIdxMapp, used in RelperDiag 2023-11-28 15:47:00 +01:00
Bård Skaflestad
5fe1eafb34
Merge pull request #5026 from totto82/fix_gpmaint2
Bugfix sign of gpmaint prod
2023-11-28 11:16:03 +01:00
Tor Harald Sandve
f7323bd679 fix sign of gpmaint prod 2023-11-27 15:10:11 +01:00
Atgeirr Flø Rasmussen
cb3ab14a71
Merge pull request #5025 from blattms/expect-singular-matrices-upate-WellControl
[bugfix] Expect singular matrices, terminate updateWellControls/nonlinear and cut timestep
2023-11-27 08:42:11 +01:00
Markus Blatt
31ab752ae6 [fix] Parallel try-catch also added for updateWellControls for groups.
Not sure whether this is needed, but better safe than sorry.
2023-11-25 21:04:13 +01:00
Markus Blatt
50c25ead52 [bugfix] Expect singular matrices and terminate updateWellControls.
We are experiencing singular matrices when solving mulisegment wells
sometimes. In that case (here during
BlackoilModelEbos::assembleReservoir <-
BlackoilModelEbos::initialLinerization <-
BlackoilModelEbos:::nonlinearIterationNewton ) an exception is thrown
when updating the controls of a well.

The problem here is that this exception only happens on one
process. That one goes to the catch block in
NonLinearSolverEbos::step, marks the nonlinear solve as failed and
cuts the time step. The others move to the collective communication
below. Somehow and somewhen all end up in a non-matching collective
communication with different data types and we get an MPI Error that
the message was truncated.

Now all processes will throw, terminate the nonlinear solver and cut
the timestep as it should be.
2023-11-25 19:32:11 +01:00
Bård Skaflestad
a6d583b9d0
Merge pull request #5024 from blattms/not-warn-loadStep-OutputDir
Do not warn about OutputDir when combined with LoadStep.
2023-11-24 19:03:52 +01:00
Bård Skaflestad
6b78dd4ad4
Merge pull request #5021 from atgeirr/nldd-refinements
Nldd refinements
2023-11-24 16:40:39 +01:00
Atgeirr Flø Rasmussen
6945b927ec Minor refactoring of domain ordering for NLDD. 2023-11-24 14:57:45 +01:00
Markus Blatt
fa10546c0a Do not warn about OutputDir when combined with LoadStep.
Both can safely be used together.
2023-11-24 13:28:20 +01:00
Markus Blatt
24408862ff
Merge pull request #5008 from aritorto/compressedLevelZero
compressedLevelZero used to read relative permeability
2023-11-24 13:21:23 +01:00
Bård Skaflestad
cd94ac3a7c
Merge pull request #5023 from totto82/wpimult
Adapt wdfac to wpimult
2023-11-23 16:28:32 +01:00
Bård Skaflestad
7343aca2be
Merge pull request #5018 from blattms/parallel-well-fixes
[fix] Do parallel sums with int instead of bool.
2023-11-23 16:24:36 +01:00
Tor Harald Sandve
e1aa233026 Adapt wdfac to wpimult 2023-11-23 15:22:51 +01:00
Atgeirr Flø Rasmussen
6f04c31c7c Use string to enum helper. 2023-11-23 14:06:39 +01:00
Atgeirr Flø Rasmussen
7578fbf144 Change nldd default approach to gauss-seidel.
Also adjust local CNV tolerance scaling to 0.1 instead of 0.01.
2023-11-23 14:06:39 +01:00
Atgeirr Flø Rasmussen
94554ea4f2 Change default nldd number of domains to one per 1000 cells. 2023-11-23 14:06:39 +01:00
Atgeirr Flø Rasmussen
8acc8af2a4 Add MaxPressure NLDD domain ordering option, make it default. 2023-11-23 14:06:39 +01:00
Kai Bao
3aed0b9501 not updating the connection pressure for StandardWell
at the early stage of computeWellRatesWithBhpIterations. The perforation rates are not updated,
and it is not sensible to update based on the inconsistent well rates and perforation rates.

Better to keep the original explicit quantities for better consistency.

Furthermore, it can be dangerous to update the explicit quantities based on the
irrelevant perforation rates, since the ratios can be very undesirable due to crossflow.
2023-11-23 09:13:57 +01:00
Stein Krogstad
b08bc029e6 Fix shut-in logic for wells with shut-intructions 2023-11-22 16:53:48 +01:00
Markus Blatt
6a866ac8d2 [fix] Do parallel sums with int instead of bool.
Using bool here is at least frowned upon. To be honest, I have no idea
what happens underneath here if we pass a bool. In contrast to other
pod types we do not associate it with a builtin type of MPI (not even
sure what to use). Hence we probably create a custom type for sending
and receiving. That should work. But I have no idea what will be used
for summation.

BTW: I am debugging a case that previously crashed and now suddenly
works and this seems to be the only relevant change I made in the
meantime.
2023-11-22 16:50:57 +01:00
Bård Skaflestad
82a83d04e2
Merge pull request #5017 from akva2/missing_include
add missing include
2023-11-22 15:26:14 +01:00
Bård Skaflestad
8dca5a931e
Merge pull request #5005 from totto82/fixWDFACCOR
dont scale d factor from wdfaccor with connection factor
2023-11-22 14:55:51 +01:00
Tor Harald Sandve
be06132702 remove trans multiplier from dake 2023-11-22 13:59:06 +01:00
Arne Morten Kvarving
f2a2fc2938 add missing include 2023-11-22 13:18:56 +01:00
Bård Skaflestad
3a01da0a12
Merge pull request #5010 from totto82/cgfrf
Add output of connection dissolved gas and vaporized oil
2023-11-22 12:54:33 +01:00
Tobias Meyer Andersen
ee95223b27 Use std::optional to only allocate reordered matrix when using multiple threads 2023-11-22 10:10:29 +01:00
Tor Harald Sandve
4879896789 adapt to refactoring of getDFactor 2023-11-22 09:17:28 +01:00
Tobias Meyer Andersen
e22f4399a0 fix typo 2023-11-22 09:16:43 +01:00
Tor Harald Sandve
ecd9930225 dont scale d factor from wdfaccor 2023-11-21 17:51:36 +01:00
Tobias Meyer Andersen
5f6c97ff3b add OpenMP parallelized version of DILU.
Implement graphcoloring to expose rows in level sets that that can be
executed in parallel during the sparse triangular solves.
Add copy of A matrix that is reordered to ensure continuous memory reads
when traversing the matrix in level set order.
TODO: add number of threads available as constructor argument in DILU
2023-11-21 15:41:53 +01:00
Tor Harald Sandve
ee77d30fe5 Add output of connection dissolved gas and vapporized oil 2023-11-21 14:29:40 +01:00
Tobias Meyer Andersen
e2a531dd65 replace loop with std function, remove print from test 2023-11-21 09:52:48 +01:00
Tobias Meyer Andersen
3cd1873771 add graph coloring 2023-11-20 16:57:56 +01:00
Antonella Ritorto
6d180a7f91 compressedLevelZero added in AluCartIdxMapper, used in RelpermDiags 2023-11-20 15:56:17 +01:00
Tobias Meyer Andersen
54b7f9c44f GraphColoring.hpp: cosmetics 2023-11-20 13:06:40 +01:00
Tobias Meyer Andersen
9309f96d8f GraphColoring.hpp: reorder headers 2023-11-20 13:06:34 +01:00
Atgeirr Flø Rasmussen
9c9fae26a8 Require initial assembly for subdomains with Gauss-Seidel. 2023-11-20 12:59:44 +01:00
Kai Bao
6ab809c69d
Merge pull request #5004 from blattms/control-mode-typo
Fixed typo: control model -> control mode.
2023-11-20 09:13:03 +01:00
Kai Bao
3b1ef932c2
Merge pull request #5003 from vkip/check_if_closed_before_hist_open
Check if well was closed this step before re-opening during history
2023-11-20 09:03:06 +01:00
Markus Blatt
de50fe5702 Fixed typo: control model -> control mode. 2023-11-20 08:29:24 +01:00
Bård Skaflestad
ea3b22480a Enable Loading Parallel NLDD Partition From File
This commit adds support for loading a three-column NLDD
partitioning scheme of the form

    MPI_Rank  Cartesian_Index  NLDD_Domain_ID

from a text file.  In an MPI run it is assumed that the first column
holds integers in the range 0..MPI_Size()-1, and typically that each
such integer is listed at least once.  In a sequential run, the MPI
rank column is ignored.

With this scheme we can load the same partition files that we write,
for increased repeatability and determinism, and we can also
experiment with externally generated NLDD partitions.
2023-11-17 17:39:17 +01:00
Vegard Kippe
abbcb4b148 Check if a well was closed this step before re-opening in history mode 2023-11-17 17:29:30 +01:00
Bård Skaflestad
68fe118781 Make Compress/Count Partition Vector Helper Generally Available
This function pair is useful also when loading a partition from
file to ensure that there are no gaps in block numbering.
2023-11-17 09:17:46 +01:00
Bård Skaflestad
c0c96123bc Add Support for Writing NLDD-Like Partitions in Parallel
This commit adds a new (hidden) debugging option,

    DebugEmitCellPartition (--debug-emit-cell-partition)

which, when set, will cause each rank to write a three-column text
file of the form

    MPI_Rank  Cartesian_Index  NLDD_Domain_ID

into the directory

    partition/CaseName

of the run's output directory.  That file will be named according to
the process' MPI rank, so the first column will be the same as the
file name.

The option is primarily intended for debugging the NLDD partitioning
scheme, so is mostly reserved for runs with low MPI sizes (e.g.,
less than 20).

While here, also make the MPIPartitionFromFile helper class aware of
this format so that we can use concatenated output files as an input
to the MPI partitioning algorithm for repeatability.
2023-11-17 09:17:46 +01:00
Bård Skaflestad
c559de51cf
Merge pull request #4996 from totto82/fixWDFAC
Fix wdfac and d factor in comdat
2023-11-17 09:09:22 +01:00
Atgeirr Flø Rasmussen
d069081b52
Merge pull request #4960 from daavid00/dispersivity
Support for mechanical dispersion
2023-11-17 08:50:00 +01:00
David Landa Marban
bc03821d57 Support for mechanical dispersion 2023-11-16 16:55:01 +01:00
Bård Skaflestad
610c45aa77 Add Support for Reading MPI Partitioning From File
This commit introduces new, experimental support for loading a
partitioning of the cells from a text file.  The name of the file is
passed into the simulator using the new, hidden, command line option

    --external-partition=filename

and we perform some basic checking that the number of elements in the
partition matches the number of cells in the CpGrid object.
2023-11-16 16:28:14 +01:00
Tor Harald Sandve
82cb3c3b53 Fix connection and well dfactor
The well dfactor is scaled by the well index

If postive the connection dfactor is threated as a well factor
and also scaled. If negative the connection dfactor is not scaled
2023-11-16 14:50:59 +01:00
Kai Bao
e355990ac2
Merge pull request #4999 from vkip/always_open_historic_wells
Always check if wells on historic controls can be opened
2023-11-15 20:29:21 +01:00
Vegard Kippe
e0d1ff9c66 Always check if wells on historic controls can be opened 2023-11-15 19:04:48 +01:00
Bård Skaflestad
ed77c90238 Make Zoltan-Based Domain Partitioning MPI Aware
This commit switches the current implementation of
'partitionCellsZoltan()', i.e., 'partitionCells("zoltan", ...)' into
using the MPI-aware ParallelNLDDPartitioningZoltan utility.  In
doing so we make 'partitionCellsZoltan()' private since its
availability is not guaranteed.  We also slightly reorder the
parameters and switch from passing a "Grid" into passing a
"GridView" as an argument to partitionCells(), and specialise this
function for the known grid views in OPM Flow.

We extract the Zoltan-related parameters out to an Entity-dependent
helper structure and move the complexity of forming this type to a
new helper function, BlackoilModelEbosNldd::partitionCells().
2023-11-15 13:31:41 +01:00
Bård Skaflestad
27aaa28c71 Add Partitioner for Unstructured Connectivity Graph
Invokes Zoltan library and requires MPI.  Client code constructs an
abstract connectivity graph by defining connections/edges through
the 'registerConnection()' member function.  May also impose a
restriction that certain cells/vertices be placed in the same
domain/block in the resulting partition.  Client code must supply a
callback function that defines globally unique cell/vertex/object
IDs, across all MPI ranks, for each vertex in the connectivity
graph.

Member function 'partitionElement()' forms the resulting partition
vector, the size of which is the total number of objects visible to
the local rank-typically the number of cells owned by the rank, and
the number of overlap cells--i.e., the size of the local grid view.
2023-11-15 13:31:41 +01:00
Bård Skaflestad
f195f73949 Extract Binary_Search Out to Helper
Mostly for readability.
2023-11-15 13:31:41 +01:00
Bård Skaflestad
0b2c396a01
Merge pull request #4961 from vkip/network_restart_use_node_pressures
Use network pressures from restart
2023-11-15 09:46:35 +01:00
Tor Harald Sandve
0f12977b17 only use d factor for gas wells 2023-11-14 12:45:25 +01:00
Tor Harald Sandve
e33d27ca90
Merge pull request #4973 from daavid00/enabledisgaswatvap
Enabling disGas and watVap at compile time for gasWaterBrine systems
2023-11-13 15:01:38 +01:00
Kai Bao
bbdad520d6
Merge pull request #4915 from vkip/network_multi_root
Support computation of network pressures in networks with multiple roots
2023-11-13 14:39:07 +01:00
Atgeirr Flø Rasmussen
cd5ba003d8
Merge pull request #4905 from vkip/allow_nowellmatch_with_lowstrictness
If parsing strictness is set to 'low', proceed (with warning) if no matching wells found
2023-11-13 10:56:54 +01:00
Markus Blatt
f1d75297d3
Merge pull request #4990 from akva2/janitoring
Avoid some dead stores
2023-11-12 21:49:00 +01:00
Atgeirr Flø Rasmussen
66f34eb234
Merge pull request #4979 from blattms/complete-log-problem-cont
log problem if asked to continue with nonconverged nonlinear solver.
2023-11-12 19:01:24 +01:00
Bård Skaflestad
fe67e9f9d3
Merge pull request #4978 from akva2/loghelper_refactor_fip_output
changed: refactor LogOutputHelper::fip
2023-11-10 14:49:09 +01:00
Arne Morten Kvarving
ddd0c5629d GasLiftSingleWellGeneric: avoid dead store
all branches below write a new value
2023-11-10 14:32:30 +01:00
Arne Morten Kvarving
9a8e58d7c3 changed: use prefix for increments
avoids dead store in the final block while still maintaining
easy cut-n-paste additions
2023-11-10 14:30:13 +01:00
Vegard Kippe
194bf9d6af Set SCHEDULE_INVALID_NAME to warning with --parsing-strictness=low 2023-11-10 11:48:18 +01:00
Vegard Kippe
4ce9c41a37 Replacing loop by assignment 2023-11-10 09:01:09 +01:00
Bård Skaflestad
16c8184e3f
Merge pull request #4914 from vkip/extra_network_output
Allow output of network pressures based on rates at end of time step
2023-11-09 23:19:48 +01:00
Arne Morten Kvarving
8982c67e79
Merge pull request #4980 from akva2/fipconfig_serialize
add extra instantation for bitset
2023-11-09 14:42:39 +01:00
Arne Morten Kvarving
44ce054492 changed: refactor LogOutputHelper::fip
only do one output per call. allow passing the name of the
regions to process
2023-11-09 13:08:17 +01:00
Bård Skaflestad
ea9bc39657
Merge pull request #4975 from atgeirr/add-extra-well-convergence-output
Add extra output to INFOITER file detailing unconverged wells.
2023-11-09 11:03:54 +01:00
Arne Morten Kvarving
9b8c6de98e add extra instantation for bitset 2023-11-09 11:02:52 +01:00
Bård Skaflestad
7832c1ba54
Merge pull request #4976 from totto82/fix_rsw
Fix rsw computation of wellbore density for StW
2023-11-09 09:37:16 +01:00
Atgeirr Flø Rasmussen
4633578792 Add extra output to INFOITER file detailing unconverged wells. 2023-11-09 09:23:39 +01:00
Kai Bao
25b007c46e
Merge pull request #4945 from vkip/network_reroute
Network reroute - avoid looking up nonexisting nodes
2023-11-08 19:59:40 +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
Atgeirr Flø Rasmussen
749ea93e24 Add and use OPM_DEFLOG_PROBLEM macro.
This should replace OPM_DEFLOG_THROW in places where the problem
category is more appropriate than the error category.

In this commit, uses of OPM_DEFLOG_THROW have been replaced whenever
the exception class used was NumericalProblem.
2023-11-08 15:16:17 +01:00
David Landa Marban
92de5355b2 Enabling disGas and watVap at compile time for gasWaterBrine 2023-11-07 18:35:30 +01:00
Bård Skaflestad
abfb5c9d82 Update Well Topology if Triggered From ACTIONX
This commit adds a new flag data member,

    wellStructureChangedDynamically_

to the generic black-oil well model.  This flag captures the

    well_structure_changed

value from the 'SimulatorUpdate' structure in the updateEclWells()
member function.  Then, in BlackoilWellModel::beginTimeStep(), we
key a well structure update off this flag when set.  This, in turn,
enables creating or opening wells as a result of an ACTIONX block
updating the structure in the middle of a report step.
2023-11-07 17:02:18 +01:00
Bård Skaflestad
b22f9853db
Merge pull request #4969 from akva2/fbhpdef
add support for FBHPDEF keyword
2023-11-07 16:35:51 +01:00
Tor Harald Sandve
26247a2aba Fix rsw computation of wellbore density for StW 2023-11-07 15:53:51 +01:00
Stein Krogstad
0756e2d1c1 Initialize rates/previous rates before well-test 2023-11-06 11:46:44 +01:00
Bård Skaflestad
763d25541a
Merge pull request #4970 from akva2/janitoring
Quell an uninitialized variable static analyzer warning
2023-11-06 10:17:54 +01:00
Markus Blatt
11ac7375a9
Merge pull request #4971 from totto82/compdat_d
Remove warning for unsupported D factor in COMPDAT
2023-11-06 10:06:09 +01:00
Tor Harald Sandve
aa96e8fd6c Remove warning for unsupported D factor in COMPDAT 2023-11-06 09:10:34 +01:00
Arne Morten Kvarving
e3cd06c164 avoid uninitialized value static analyzer warning 2023-11-06 08:56:53 +01:00
Arne Morten Kvarving
fa45790bfb changed: rename variable
this indicates that bracketing was successfully found,
not that we are looking for a bracket
2023-11-06 08:56:53 +01:00
Arne Morten Kvarving
fb7135a424 remove UDT keywords from unsupported list
UDTDIMS is completely ignored but should not stop the simulator
2023-11-03 10:48:55 +01:00
Arne Morten Kvarving
29c65ef7df mark FBHPDEF keyword as supported 2023-11-03 09:07:14 +01:00
Bård Skaflestad
9233e32d81
Merge pull request #4826 from totto82/fixResvRates
Compute resv rates based on pressure and temperature in the well for injectors in thermal cases
2023-11-01 16:24:10 +01:00
Vegard Kippe
14b7f926da Avoid looking up nonexisting nodes.. 2023-11-01 13:36:21 +01:00
Tor Harald Sandve
d7401e3b6b
Merge pull request #4919 from daavid00/saltprecPermFac
Multiply well trans due to perm reduction in salt prec
2023-11-01 13:29:57 +01:00
Bård Skaflestad
17886f934c
Merge pull request #4924 from GitPaean/fixing_gecon_welopen
use the WELL_SET_TO_OPEN event to open closed wells
2023-11-01 10:24:18 +01:00
David Landa Marban
c93d46c1be Mult well trans due to perm reduction in salt prec 2023-10-31 22:11:55 +01:00
Bård Skaflestad
bf72698310
Merge pull request #4832 from totto82/wdaccor_refactor
Implement Forchheimer term in wellIndex
2023-10-31 17:46:49 +01:00
Antonella Ritorto
166c31d5f8 Bugfix. Deprecated getCollectiveComminication warning 2023-10-31 08:40:46 +01:00
Vegard Kippe
c9cc261891 Use network pressures from restart 2023-10-30 23:26:35 +01:00
Vegard Kippe
429b312bc0 Re-introducing check for negative reportStepIdx and adding forgotten hasGroup check. 2023-10-27 20:30:48 +02:00
Atgeirr Flø Rasmussen
8aa035f174
Merge pull request #4949 from BigDataAccelerate/remove-redundant-ilu-decomp
Remove redundant CPU decomposition when done also on GPU
2023-10-27 13:38:16 +02:00
Vegard Kippe
f137565bb6 Avoid exception for non-group nodes 2023-10-26 19:35:56 +02:00
Vegard Kippe
5fbf981af8 Output of network pressures based on rates at end of time step 2023-10-26 19:35:56 +02:00
Tor Harald Sandve
a40ede9957 Compute reservoir injection rates from well temperature and pressure for thermal cases 2023-10-26 15:57:41 +02:00
Kai Bao
86c919877e
Merge pull request #4946 from GitPaean/assertion_throw
making a few assertion to throw in StandardWellPrimaryVariables
2023-10-26 13:42:09 +02:00
Kai Bao
3e03ebbb58 making a few assertion to throw in StandardWellPrimaryVariables
to get more outputting information and also avoid harsh termination due
to assert.

They are technically numerical problem instead of programming mistakes.
2023-10-26 11:36:25 +02:00
Tor Harald Sandve
968686e7e0
Merge pull request #4943 from hakonhagland/pybind3
Get simulator time step size from Python BlackOilSimulator module
2023-10-26 11:28:42 +02:00
Razvan Nane
45d8750e93 Fix formatting and indentation 2023-10-26 09:45:48 +02:00
Bård Skaflestad
95bc3822fb
Merge pull request #4948 from GitPaean/glo_active_enter_glift
checking LIFTOPT active before gliftBeginTimeStepWellTestUpdateALQ and before attempting to optimize alq in gliftBeginTimeStepWellTestIterateWellEquations
2023-10-26 09:06:23 +02:00
Razvan Nane
cd63cc83c2 Remove redundant cpu decomposition when using gpu 2023-10-26 06:40:06 +02:00
Kai Bao
beda7a0b35 checking LIFTOPT active before trying to optimizing alq
in gliftBeginTimeStepWellTestIterateWellEquations.

otherwise, if the increment is 0 (inactive), the function
gliftBeginTimeStepWellTestIterateWellEquations
might return undesired results or enter endless loop.
2023-10-25 23:00:54 +02:00
Kai Bao
2b97c3fe1d checking LIFTOPT active before gliftBeginTimeStepWellTestUpdateALQ
to avoid meaningless message output related to GLIFT and WTEST
2023-10-25 21:45:19 +02:00
Tor Harald Sandve
922fa5b9bf
Merge pull request #4853 from hakonhagland/pybind2
Get cell volumes from Python
2023-10-24 13:56:58 +02:00
Bård Skaflestad
7a34c20120 Remove Leftover Debug Printout
This information already goes to the .DBG file so there's no need
to echo it to the main console as well.
2023-10-24 09:51:12 +02:00