Commit Graph

7639 Commits

Author SHA1 Message Date
Alf Birger Rustad
3204b55a35 Forgot two 2020-10-02 15:20:23 +02:00
Alf Birger Rustad
885c182b7e Added one more decimal for hundreds of a second. 2020-10-02 15:13:41 +02:00
Tor Harald Sandve
165fa96250
Merge pull request #2824 from hakonhagland/gas_lift3
Implements support for gas lift optimization.
2020-10-02 14:48:27 +02:00
Alf Birger Rustad
3832be4f28 Typo 2020-10-02 14:27:51 +02:00
Alf Birger Rustad
a25868dc52 Untabify and add three missing parantheses 2020-10-02 14:26:09 +02:00
Alf Birger Rustad
9e89883aec Allow more digits in simulation time 2020-10-02 14:18:06 +02:00
Alf Birger Rustad
a081394f32 Fixed alignement 2020-10-02 14:06:25 +02:00
Kai Bao
ed89f25d1b providing the aquifer data for summary output 2020-10-02 13:13:20 +02:00
Alf Birger Rustad
7cebf7fb5a Added space 2020-10-02 12:48:35 +02:00
Alf Birger Rustad
e68db6dbda Converted to fmt formatting 2020-10-02 12:46:45 +02:00
Håkon Hægland
a5ac74082a Avoid unused variable warning.
The control_mode is unused if not build in debug mode since the assertion
will be skipped.
2020-10-02 11:17:48 +02:00
Alf Birger Rustad
845eb17d28 Formatted seconds and percent in final report. 2020-10-02 09:31:49 +02:00
Alf Birger Rustad
d36069c759 Remove confusing progress message. 2020-10-02 09:04:26 +02:00
Kai Bao
49eb111225 adapting to the interface change of SummaryConfig 2020-10-01 23:32:21 +02:00
Alf Birger Rustad
90b2e8b8ef Compacted time step report 2020-10-01 22:42:20 +02:00
Markus Blatt
ec884183a5
Merge pull request #2828 from blattms/add-mswells
[opencl] deletes assignment operator of WellContributionsOCLContainer
2020-10-01 22:35:09 +02:00
Markus Blatt
e8c030be17
Merge pull request #2821 from ducbueno/add-mswells
Reintroduced multisegment wells to OpenCL backend
2020-10-01 21:52:25 +02:00
Håkon Hægland
52f6f819ee Simplified using fmt::format()
Simplified debug output formatting by using fmt::format(). Also switched
off glift debug output by default.
2020-10-01 18:40:05 +02:00
Markus Blatt
684b58564c use auto in for-loop as at other occasions. 2020-10-01 15:56:50 +02:00
Markus Blatt
f306f78737 Delete assignment operator of WellContributionsOCLContainer, too 2020-10-01 15:55:57 +02:00
Jose Eduardo Bueno
fbbb21d482 Removed smart pointers; + delete for copy constr 2020-10-01 10:27:34 -03:00
Tor Harald Sandve
6b3a64bd40 add options for timestepping 2020-10-01 14:46:58 +02:00
Arne Morten Kvarving
7ffceeba57 fixed: make some indices constexpr
also use the bool conditions for conditional deref'ing with the indices.
this helps avoid maybe uninitialized warnings with gcc
2020-10-01 11:46:31 +02:00
Jose Eduardo Bueno
89cefd8d95 Fixed seg fault when there are only mswells 2020-09-30 18:34:50 -03:00
Jose Eduardo Bueno
7aad035bcf Added smart pointers 2020-09-30 17:31:35 -03:00
Markus Blatt
d30f6d272b [gpu] Support UMFPack with DUNE 2.7
The index type changed from int to long int with 2.7.
2020-09-30 20:10:21 +02:00
Jose Eduardo Bueno
3a680f728e Removed unnecessary vector clear operations 2020-09-30 09:14:20 -03:00
Jose Eduardo Bueno
99e4419b3c Reintroduced multisegment wells 2020-09-30 09:11:20 -03:00
Håkon Hægland
a01ae8a64c Removed unnecessary code.
Forgot to remove this call after refactoring.
2020-09-30 12:13:01 +02:00
Arne Morten Kvarving
36a42c0685 remove unused variables 2020-09-30 10:12:33 +02:00
Håkon Hægland
d707967f58 Implements support for gas lift optimization.
Implements gas lift optimization for a single StandardWell. Support for
gas lift optimization for multi-segment wells, groups of wells and
networks is not implemented yet.

The keywords LIFTOPT, WLIFTOPT, and VFPPROD are used to supply parameters for
the optimization. Also adds support for summary output of liftgas
injection rate via keyword WGLIR.
2020-09-30 10:04:39 +02:00
Markus Blatt
c26aefdd5b
Merge pull request #2816 from ducbueno/new-opencl-stdwell
New standard well implementation for the OpenCL backend
2020-09-30 09:32:19 +02:00
Jose Eduardo Bueno
a3a15a744c Corrected kernel 2020-09-28 18:06:13 -03:00
Jose Eduardo Bueno
9fe6ee85a4 Throws exception if well dimensions aren't correct 2020-09-28 18:01:42 -03:00
Jose Eduardo Bueno
268bcd95e8 Implemented reinit; reduced sync events 2020-09-28 17:27:12 -03:00
Jose Eduardo Bueno
bedf3d16cf Querying number of work items with get_local_size 2020-09-28 12:56:22 -03:00
Joakim Hove
0092ef0cf0 Pass location to ParseContext.handleError() 2020-09-28 16:58:37 +02:00
Joakim Hove
5985dee574
Merge pull request #2813 from joakim-hove/flow-exceptions
Flow exceptions
2020-09-28 16:57:02 +02:00
Jose Eduardo Bueno
77bcadff45 Events wellContribs write calls & update sparsity 2020-09-28 09:40:39 -03:00
Jose Eduardo Bueno
d653873735 Added destructor for WellContributionsOCLContainer 2020-09-28 09:15:17 -03:00
Atgeirr Flø Rasmussen
64f9f1431b
Merge pull request #2809 from GitPaean/fixing_ct_aquifer
fixing the initialization of aquifer pressure for CT aquifer
2020-09-28 12:28:02 +02:00
Joakim Hove
a755a2d056 Do not print error message when flow exits 2020-09-28 11:03:45 +02:00
Joakim Hove
76f57f5a1d Catch OpmInputError in addition to std::exception 2020-09-28 11:03:45 +02:00
Joakim Hove
0b5134521e Add inline fmtlib code in source tree 2020-09-28 11:01:13 +02:00
Atgeirr Flø Rasmussen
e8460b384e
Merge pull request #2804 from totto82/updateAndInvalid
Invalidate and update the intensive quantities at the same time
2020-09-28 09:02:25 +02:00
Atgeirr Flø Rasmussen
b5c5c28c16
Merge pull request #2788 from alfbr/new-defaults
New numerical defaults
2020-09-28 08:57:08 +02:00
Jose Eduardo Bueno
d236079173 Bug fixes 2020-09-25 11:31:17 -03:00
Jose Eduardo Bueno
ab57d5ecd2 Fixed errors 2020-09-24 18:07:10 -03:00
Jose Eduardo Bueno
1ba81cece2 First commit 2020-09-24 16:35:36 -03:00
Jose Eduardo Bueno
c43648076f Fixed kernel; fixed time step chopping; 2020-09-24 16:35:36 -03:00
Jose Eduardo Bueno
c41aafcc58 Simplified initialize_wellContribs calls 2020-09-24 16:35:36 -03:00
Kai Bao
fd3287cdd3 removing the duplication of calculateReservoirEquilibrium
in the aquifer models.
2020-09-24 16:09:56 +02:00
Kai Bao
91ec74dffc fixing the initialization of aquifer pressure for CT aquifer 2020-09-24 15:37:31 +02:00
Joakim Hove
2c447ae829
Merge pull request #2805 from akva2/serializer_optional
Optional support in eclmpiserializer
2020-09-24 07:33:16 +02:00
Arne Morten Kvarving
f846bbe959 remove Mpi::pack handling for GPMaint
this is not implemented, and should go through the
serializer support
2020-09-23 12:23:30 +02:00
Tor Harald Sandve
85e25f7e0e Invalidate and update the intensive quantities instead of just invalidate them 2020-09-23 11:39:04 +02:00
Atgeirr Flø Rasmussen
237b281f09
Merge pull request #2802 from blattms/refactor-defunct-wells
Refactored how well information is exported after load balancing.
2020-09-23 08:54:35 +02:00
Markus Blatt
1d94357558 Refactored how well information is exported after load balancing.
Previously, we exported an unordered map containing all names of
wells that are not present in the local part of the grid.

As we envision to have wells that are distributed across multiple
processors, this information does not seem to be enough. We need
to be able to set up communication for each well. To do this we need
to find out who handles perforations of each well.

We now export a full list of well name together with a boolean
indicating whether it perforates local cells (vector of pair of string
and bool).
2020-09-22 20:04:01 +02:00
Markus Blatt
779c7f6012
Merge pull request #2793 from blattms/fix-tran-application
Fixes application of transmissibility modifiers from the edit section.
2020-09-22 19:56:16 +02:00
Atgeirr Flø Rasmussen
68add695fe
Merge pull request #2735 from hakonhagland/python_step2
Implements a Python step() method.
2020-09-22 15:47:48 +02:00
Markus Blatt
a4ea6e9658
Merge pull request #2792 from atgeirr/fewer-mpi-sums
Rewrite communicateGroupRates() to do a single sum().
2020-09-22 07:51:34 +02:00
Markus Blatt
e5f4971d58 CentroidsPropsDatahandle Use emplace_back for saving pair 2020-09-21 21:30:51 +02:00
Joakim Hove
c059653fa0 Add #include <opm/common/Exceptions.hpp> 2020-09-21 19:25:52 +02:00
Joakim Hove
cc6abb4086
Merge pull request #2796 from joakim-hove/rm-exceptions
Remove unused #include of exceptions
2020-09-21 16:33:19 +02:00
Joakim Hove
d9465907be
Merge pull request #2795 from joakim-hove/remove-sim-container
Remove references to unused class SimulationDataContainer
2020-09-21 11:16:37 +02:00
Joakim Hove
0565d6f402 Remove unused #include of exceptions 2020-09-21 11:12:15 +02:00
Joakim Hove
9809dcc804 Remove references to unused class SimulationDataContainer 2020-09-21 07:16:11 +02:00
Bård Skaflestad
fde3c476c3 Chase Group/Node Summary API Update
This is in preparation of adding support for outputting the network
node pressure quantity, GPR, to the summary file.  In particular,
'GroupValues' is renamed to 'GroupAndNetworkValues' and has new
individual datamembers for the former group-level data and the new
node-level data.

Update BlackoilWellModel::groupData() and CollectToIORank
accordingly and bring the parallel restart facility in line with the
new layout.
2020-09-20 22:26:07 +02:00
Markus Blatt
99f74cad96 FieldData and TranCalculator are now in Fieldprops namespace. 2020-09-18 15:01:17 +02:00
Atgeirr Flø Rasmussen
8dffd39b0a Rewrite communicateGroupRates() to do a single sum(). 2020-09-18 09:50:41 +02:00
Markus Blatt
abff765c1d Also query unsupported field data for the TransCalculator.
FiedlPropsManager::keys() list the FieldProperties needed by the
TransCalculator, but these cannot be queried the normal way as this
raises exceptions and results in a deadlock. Hence we use the new
funtionality to get also the unsupported ones, by passing true to
get_double_field_data.
2020-09-17 22:23:04 +02:00
Markus Blatt
fd2a0d8a7d Deserialize TranCalculator also on master 2020-09-17 20:28:17 +02:00
Markus Blatt
5987eae7d5 Add TranCalculator functionality to ParallelFieldPropsManager 2020-09-17 19:49:38 +02:00
Markus Blatt
9b997aea8c Use FieldData in ParallelEclipseState.
We will need the values_status for the TranCalculator in parallel.
2020-09-17 19:49:38 +02:00
Alf Birger Rustad
2e2bad179d New default tuning parameters based on pore volume 2020-09-16 15:58:14 +02:00
Atgeirr Flø Rasmussen
0816e21846
Merge pull request #2787 from akva2/fix_optional_deserialization
Fix optional deserialization
2020-09-16 09:41:53 +02:00
Arne Morten Kvarving
4160c6ce98 fixed: deserialization for std::optional<T>
just writing the data does not update the has_value as expected
2020-09-16 08:47:06 +02:00
Joakim Hove
d5bc4d539c Distribute transmissibility calculator of the FieldPropsManager 2020-09-15 17:15:03 +02:00
Arne Morten Kvarving
76c63c4405 changed: hide internal method 2020-09-15 10:51:57 +02:00
Bård Skaflestad
e8582ce476 Include All Pertinent EFACs In Guiderate Potential Updates
This commit switches the helper function

    WellGroupHelpers::updateGuideRateForGroups<>()

to include efficiency factors in the potential rates at grouptree
levels below a particular group.  We furthermore switch the helper
function

    WellGroupHelpers::updateGuideRatesForWells<>()

to not include efficiency factors at all.

The motivation for this change is that efficiency factors always
apply to the level we're accumulating rate values into rather than
to the rate values themselves.
2020-09-15 09:44:52 +02:00
Bård Skaflestad
453dec3e26
Merge pull request #2785 from blattms/improve-parallel-deck-error-handling
Improves error handling and reporting in parallel.
2020-09-15 09:06:43 +02:00
Markus Blatt
58fdf300df Use std::exit(EXIT_FAILURE)
Somehow this reappeard druing refactoring.
2020-09-15 08:36:20 +02:00
Markus Blatt
cd74796004 Refactored to only check once for errors in parallel.
This simplifies the code a lot (less `#if HAVE_MPI`) and there seems
to be not reason not to.
2020-09-15 08:27:04 +02:00
Markus Blatt
d413a2c960 Perform checkArrayDimension only on rank 0. 2020-09-15 08:26:23 +02:00
Markus Blatt
921e154972 use EXIT_FAILURE to indicate problems whem exiting. 2020-09-14 19:17:55 +02:00
Tor Harald Sandve
c2c009ecb6 clean-up based on review 2020-09-14 15:42:48 +02:00
Tor Harald Sandve
1a7b617074 guards against non-exsisting phases 2020-09-14 14:44:16 +02:00
Tor Harald Sandve
a323487b3b Fix the equation index for 2p oil-water simulations 2020-09-14 14:44:16 +02:00
Markus Blatt
519e4ac002 Improves error handling and reporting in parallel.
As the ErrorGuard also dumps warnings we now always dump
it (previously only on error) to get these messages in the
console.

If there are error encountered, we log a meaningful error
message (the real cause was missing previously) and do a
graceful exit after MPI_Finalize.
2020-09-14 12:53:02 +02:00
Alf B. Rustad
d0c110e935 Removed duplicated OPTIONS 2020-09-13 23:15:01 +02:00
Alf B. Rustad
1b05ed1199 Removed OPERATER and OPERNUM since they are supported. 2020-09-13 22:40:20 +02:00
Atgeirr Flø Rasmussen
76384344ca
Merge pull request #2777 from GitPaean/adding_well_assembly_timing
adding timing for the well assembly
2020-09-08 16:02:16 +02:00
Kai Bao
7b4142e9b6 adding timing for the well assembly
And changes the indentation of the linear solver setup time a little to
show it is part of the linear solve time.
2020-09-08 11:12:41 +02:00
Bård Skaflestad
9d6a0be776
Merge pull request #2772 from blattms/prevent-copy-in-rateconverter
Prevent another copy of cell to region mapping in RateConverter.
2020-09-07 17:13:22 +02:00
Markus Blatt
578ca0a725 Fixed unused variable warning. 2020-09-07 16:42:01 +02:00
Markus Blatt
c21f1e72f8 Prevent another copy of cell to region mapping in RateConverter.
RateConverter itself already copies this and offers the mapping.
With this commit we just use that.
2020-09-07 15:36:07 +02:00
Markus Blatt
53005c477d
Merge pull request #2762 from ducbueno/opencl-stdwell-clean
Fixed out of resources problem
2020-09-03 19:50:39 +02:00
Jose Eduardo Bueno
525faf7b5d Changed work_group_size 2020-09-03 14:25:50 -03:00
Jose Eduardo Bueno
f8898e3158 New function for setting OpenCL in wellContribs 2020-09-03 13:30:12 -03:00
Markus Blatt
3ee0db8cf4
Merge pull request #2760 from atgeirr/inform-user
Use log mechanism for info output
2020-09-03 17:15:00 +02:00
Markus Blatt
ba8782eeca
Merge pull request #2761 from akva2/fix_flexible_serial
fixed: use the proper linear operator without wells in matrix in serial
2020-09-03 17:08:40 +02:00
Arne Morten Kvarving
273d465c32 fixed: use the proper linear operator without wells in matrix in serial 2020-09-03 15:53:57 +02:00
Atgeirr Flø Rasmussen
3dffb5d4da Use log mechanism for info output, and tell the user the deck has been read. 2020-09-03 15:11:25 +02:00
Markus Blatt
d51b4a53e8
Merge pull request #2758 from atgeirr/reinstate-lost-features
Reinstate lost logging of header and parameters.
2020-09-03 15:08:55 +02:00
Jose Eduardo Bueno
c7adc3495f Initial commit 2020-09-03 09:46:44 -03:00
Atgeirr Flø Rasmussen
92bdcbf597 Reinstate lost logging of header and parameters.
Also re-add the ability to do strict parsing.
2020-09-03 14:07:33 +02:00
Bård Skaflestad
6220cdf613 Restore Groups' Active Constraints on Restart
First step towards better restarts of models with group control.
2020-09-03 01:11:32 +02:00
Bård Skaflestad
bdc34a7580 Distribute Group Values at Parallel Restart
Mostly to prepare for restoring the groups' active controls from
restart information.
2020-09-03 01:11:32 +02:00
Bård Skaflestad
a0373ed428 Support Distributing Guiderates in Parallel Restart
In preparation of distributing group-related information (e.g.,
the active constraint).
2020-09-03 01:11:32 +02:00
Markus Blatt
27931c4303 [opencl] Fixes shadowing variable warnings.
These seemed familar and I would have sworn that I already fixed them
somewhen. Might have been reintroduced by rebasing.
2020-09-02 22:46:44 +02:00
Markus Blatt
e997d7b130
Merge pull request #2751 from ducbueno/opencl-stdwell-clean
AddStandardWell functionality in OpenCL backend
2020-09-02 22:02:05 +02:00
Jose Eduardo Bueno
4d10d9ac76 Fixed issue when no std wells are present 2020-09-02 15:44:46 -03:00
Jose Eduardo Bueno
56c1c0862c Added StandardWell functionality to OpenCL backend 2020-09-02 15:00:34 -03:00
Bård Skaflestad
144baeeb42 Well Model: Report Guiderates at Well and Group Levels
This commit adds support for reporting the simulator's guiderate
values at the well and group levels to the output layer through the
wellData() and groupData() member functions.  We add several new
member functions that collectively assemble the values and assign
them to objects of type Opm::data::GuideRateValue for subsequent
output to the summary and restart files.

In particular

    getGuideRateValues(const Well&) const
    getGuideRateValues(const Group&) const

retrieve the guiderate values for all phases for those individual
wells and groups for which the guideRate_ data member defines a
value.  The most complicated function of this commit is

    calculateAllGroupGuideRates

which aggregates those individual contributions from the well (leaf)
level up to the root of the group tree (the FIELD group).  This
process uses an ancillary array ('up') to keep track of the parent
groups of all wells and all groups, and to ensure that we only visit
each parent group once (sort+unique on subsets of the 'up' array).

We do not currently support outputting guiderates for reservoir
voidage volume (GuideRateModel::Target::RES).
2020-09-02 17:22:04 +02:00
Bård Skaflestad
e1ce1c9124 Centralize Rate Vector Derivation for Guide Rates
This commit creates a single implementation function for deriving
'RateVector' objects that go into the guiderate calculation.  In
particular, we now use the same implementation function for both the
well and the group levels.  While here, also expose the group level
derivation as a free function and reimplement the FractionCalculator
version in terms of this free function.  Finally, remove the
previous attempt at such a free function taking only the group name.
This function no longer exists in isolation and is only accessible
through the FractionCalculator.

This is in preparation of reporting guiderate values to the output
layer (summary and restart files).
2020-09-02 17:22:04 +02:00
Bård Skaflestad
3c91761999 Well State: Add Predicate for Flow Rate Existence
This commit adds two new predicate member functions

    bool hasWellRates(well_name) const
    bool hasProductionGroupRates(group_name) const

that enable querying the existence of the corresponding flow rate
values for wells and group production.

This is in preparation of reporting the simulator's guiderate values
to the summary and restart files.
2020-09-02 17:22:04 +02:00
Bård Skaflestad
fdba34e071 IsXGroup: Return Explicit Boolean Value
Mostly to highlight that 'globalIsXGrup_' holds integers rather than
bools.  While here, also fix an error message formatting problem.
2020-09-02 17:22:04 +02:00
Arne Morten Kvarving
7305f84351 use std::make_unique where applicable 2020-09-02 15:35:39 +02:00
Arne Morten Kvarving
182ec130b1 fixed: use const refs in foreach constructs
avoids unnecessary copies
2020-09-01 13:25:26 +02:00
Bård Skaflestad
efed640e63 Broken Constraints: Fix Diagnostic Message
Especially, grab a copy of the "oldControl" to avoid reading through
a reference for which the underlying object is reset in

    setCurrent*GroupControl()

This in turn avoids generating confusing diagnostic messages of the
form

    Switching production control mode for group G from FLD to FLD
2020-08-31 13:04:39 +02:00
Arne Morten Kvarving
f4f5fa3a5d changed: remove one missed TTAG usage
also include header for the Scalar property definition
2020-08-28 10:44:53 +02:00
Arne Morten Kvarving
9a000c6d07 changed: remove SET_TAG_PROP macro usage 2020-08-28 10:44:53 +02:00
Arne Morten Kvarving
3b21a8a481 changed: remove SET_TYPE_PROP macro usage 2020-08-28 10:44:53 +02:00
Arne Morten Kvarving
93a3ebf8f7 changed: remove NEW_PROP_TAG macro usage 2020-08-28 10:44:53 +02:00
Arne Morten Kvarving
941e4916f8 changed: remove SET_PROP macro usage 2020-08-27 14:02:05 +02:00
Arne Morten Kvarving
7d853d2e05 changed: remove SET_SCALAR_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
fca83318aa changed: remove SET_INT_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
a79c37a041 changed: remove SET_STRING_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
0e71c0e29b changed: remove SET_BOOL_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
e8248b44ff changed: remove NEW_TYPE_TAG macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
914053ac3c changed: remove GET_PROP_VALUE macro usage 2020-08-27 13:01:51 +02:00
Markus Blatt
410ad3bc82 Only setup message limiter if logger is actually there.
Needed for test_ecl and test_ecl_output.
2020-08-27 09:05:09 +02:00
Markus Blatt
2b557a42ff Make unique_ptr instantiation exception safe for the kids in readDeck. 2020-08-27 09:05:09 +02:00
Markus Blatt
c958034d26 Adapt and use readDeck from EclipseBaseVanguard, too.
This reduces code duplication ad should fix the bad_cast exception
when running ebos in parallel.
2020-08-27 09:05:09 +02:00
Markus Blatt
575245d785 Factored out logging setup and deck reading from class Main.
These codes are reimplemented in the ebos simulator and should
be reused, instead. This commit factilitates this and starts
reusing the logging setup code in ebos. Hence reduces code duplication.
2020-08-27 09:05:09 +02:00
Markus Blatt
75104fd310 Move to more consistent ownership of ECL data in EclBaseVanguard
We resort to consistently use unique_ptrs in EclBaseVanguard for
the data read from ECL files or set externally. This means that
during the simulation EclBaseVanguard owns this data and not Main
or the ebos setup functions. This ownership transfer becomes
transparent due to std::move.

This came up when trying to fix the parallel runs of ebos and during
that removing some code duplication.
2020-08-27 09:05:09 +02:00
Markus Blatt
83bfd4edfc
Merge pull request #2738 from akva2/more_macro_replacement
More macro replacement
2020-08-27 08:46:25 +02:00
Arne Morten Kvarving
74fac38d85 changed: remove GET_PROP_TYPE / GET_PROP macro usage 2020-08-27 08:19:39 +02:00
Arne Morten Kvarving
82a35e53b7 changed: remove TTAG macro calls 2020-08-27 08:19:39 +02:00
Markus Blatt
bee46ed309 Finally fix selection for relaxed tolerance.
Default values are MaxStrictIter=8 and RelaxedPvFraction=1.0.
To activate relaxed pv fraction set MaxStrictIter to 0 and
fraction below 1.
2020-08-26 15:42:27 +02:00
Tor Harald Sandve
25c8a219a5
Merge pull request #2701 from blattms/relaxed-cnv-based-on-pv-fraction
relaxed tolerance for CNV if only small fraction of PV is violated
2020-08-25 15:02:06 +02:00
Markus Blatt
92b1708433 Use reference to ebos residual to prevent copying. 2020-08-25 14:07:27 +02:00
Håkon Hægland
81319a7923 Implements the Python step() method.
A resubmission of commit 8e4f748 in PR #2403 and PR #2444 and continues
the work in #2690 implementing Python bindings to the flow simulator.

The Python step() method advances the simulator one report step. Before
calling step() for the first time, step_init() must have been called.
2020-08-25 13:42:48 +02:00
Håkon Hægland
3749dcab7d Implements the Python step_init() function.
A resubmission of commit 11eaa3d7 in PR #2403 and PR #2443 and continues
the work in #2555 implementing Python bindings to the flow simulator.

The step_init() method initializes the simulation. It is required for the
Python script to run step_init() before calling the step() method (which
will be implemented in a later commit).
2020-08-24 10:27:50 +02:00
Håkon Hægland
c6752c1e0e Clarify by using this->
Clarify usage of member variables in FlowMainEbos.hpp by prefixing with
this->.

Also rebased PR on the current master, and updated
flow_ebos_oilwater_brine.cpp according to the PR.
2020-08-24 08:35:04 +02:00
Håkon Hægland
f9d47b7c68 Capture some variables in FlowMainEbos.
Make Opm::FlowMainEbos capture the variables argc, argv, outputCout, and
outputFiles. Passing the variables to the constructor and saving them as
class variables in Opm::FlowMainEbos makes the implementation of the
Python interface simpler. For example, the step_init() method does not
need to ask Opm::Main about the values of the variables when it needs to
run execute() in FlowMainEbos.

Another advantage of this refactoring could be that less variables needs
to be passed around from Opm::Main, to flow_ebos_xxx.cpp, and then again
to FlowMainEbos.
2020-08-24 00:19:19 +02:00
Arne Morten Kvarving
70908d9017 changed: remove BEGIN_PROPERTIES/END_PROPERTIES macro usage 2020-08-21 15:50:35 +02:00
Arne Morten Kvarving
efd078f564 fixed: have to broadcast summarystate on restart 2020-08-21 10:43:31 +02:00
Markus Blatt
49ed3d6468 Removes rest of the commented out code introduced with applyUMFPack. 2020-08-20 10:17:33 +02:00
Markus Blatt
cca38ddc36 Fixed spelling in error message. 2020-08-20 10:17:26 +02:00
Markus Blatt
efe17780e2 Reinforce maxStrictIter for the newton.
That was removed before in lieu of the fraction of cells that
violate CNV.
This change should make the results as before unless somebody changes
maxStrictIter or RelaxedMaxPvFraction
2020-08-19 14:42:40 +02:00
Markus Blatt
94eb0d5ffe Fixes method name in throw message. 2020-08-19 08:11:50 +02:00
Markus Blatt
0c0be3a941 Reset duneDSolver only once. 2020-08-18 17:55:50 +02:00
Markus Blatt
ae8e2fb8c2 Removed commented out code from MSWell. 2020-08-18 17:55:50 +02:00
Markus Blatt
e96c4a9908 Removed unused method invDXDirect. 2020-08-18 17:55:50 +02:00
Markus Blatt
7261759065 Reuse UMFPack decomposition whenever possible.
We hold a shared pointer to the umpfack solver that gets reset
whenever the matrix is changed. When applying the decomposition
we will be recomputed if the solver pointer is null.
2020-08-18 17:55:50 +02:00
Markus Blatt
ce409737fe Allow applyUMFPack to decompose if needed. 2020-08-18 17:55:50 +02:00
Markus Blatt
a011244d9c refactored invDxDirect to allow for reusing the decomposition. 2020-08-18 17:55:50 +02:00
Markus Blatt
f65eca3310 Use RelaxedMaxPvFraction 0 for now.
This should make the tests work.
2020-08-18 16:57:16 +02:00
Markus Blatt
e040484580 relaxed tolerance for CNV if only small fraction of PV is violated
Previously we used relaxed tolerance once a certain number of Newton
steps was exceeded. Now we check for all cells violating CNV locally
and if their pore volume is less than a certaun fraction (default 3%)
we use the relaxed tolerance (default: 1e9)

Original idea originated from Norce.
2020-08-18 16:57:16 +02:00
Tor Harald Sandve
bd9186b41d implement Saltvd 2020-08-18 10:55:43 +02:00
Kai Bao
b88501bc7d
Merge pull request #2711 from blattms/fix-unused-vars-wells
Remove unused variable groups from BlackoilWellModel::wellsToState.
2020-08-12 22:29:07 +02:00
Kai Bao
08b93424f3 setting UseInnerIterationsWells default to be false
and reducing default MaxInnerIterWells to be 50, which should not matter
much. We should try to reduce it further to something like 20, 10 later.
2020-08-11 09:46:23 +02:00
Kai Bao
a38dc27bcb refactoring for iterateWellEquations 2020-08-11 09:10:19 +02:00
Kai Bao
11807747cb renaming solveWellEqUntilConverged to be iterateWellEquations 2020-08-11 09:10:19 +02:00
Tor Harald Sandve
fefa5c22ce make assembleWellEqIteration private 2020-08-11 09:10:19 +02:00
Tor Harald Sandve
fc45b1bd47 Add inner iterations for standard wells also 2020-08-11 09:10:19 +02:00
Markus Blatt
5743a979e3 Formatting: added missing space. 2020-08-07 09:38:10 +02:00
Markus Blatt
8d3eac81a5 [OpenCL] Fixes out of bounds read in reordering code in ILU0.
rowPerColor only has size numColors!
2020-08-05 21:22:01 +02:00
Markus Blatt
c28a12636a Also free memory allocated with CUDA also with CUDA
With multisegment wells we allocate WellContributions::hx and hy with
`CudaMallocHost`. Yet we tried to deallocate them with
`delete[]`. This caused segementation faults e.g. for
model1/MSW_MODEL_1. Now we use `CudaFreeHost` for freeing if we used
CUDA.

Closes #2719
2020-08-04 12:54:27 +02:00
Markus Blatt
13ff454e56 Remove unused variable groups from BlackoilWellModel::wellsToState.
Alternatively it could be marked as [[maybe_unused]] if it will be
used sometime in the future.
2020-07-21 11:35:43 +02:00
Markus Blatt
f37fa8bbd9 Prevent unused variable warnings without CUDA in WellContributions. 2020-07-21 11:24:19 +02:00
Markus Blatt
59064b4ac2 Prevent warning about shadowing dim_wells and dim. 2020-07-10 13:40:38 +02:00
Markus Blatt
efd3aeb290 Catch exceptions by const reference to prevent warnings.
e.g. gcc issued: "warning: catching polymorphic type ‘class cl::Error’ by value [-Wcatch-value=]"
2020-07-10 13:40:38 +02:00
Markus Blatt
faaee51d09
Merge pull request #2682 from Tongdongq/openclSolver
Added openclSolver
2020-07-10 13:38:32 +02:00
T.D. (Tongdong) Qiu
5971a7ae9e Split WellContributions into .cpp and .cu 2020-07-10 11:13:55 +02:00
Tongdongq
f90bb85960
Merge pull request #1 from blattms/openCLSolver-g++-8.3
include missing header for OpenCLSolver with g++-8.3
2020-07-09 09:25:08 +02:00
Bård Skaflestad
47d4a5087f
Merge pull request #2698 from totto82/applyPVTWsalt
Pass the salt concentration to the water PVT
2020-07-08 09:32:51 +02:00
T.D. (Tongdong) Qiu
af02fc3924 Added try-catch around the linear solve 2020-07-07 16:07:42 +02:00
T.D. (Tongdong) Qiu
0b20762e59 Clarified parameter help print and chosen OpenCL platform and device 2020-07-07 14:26:02 +02:00
T.D. (Tongdong) Qiu
ab49f60eca Added opencl.hpp to define variables and import opencl
Added opencl.cpp to get OpenCL error strings
2020-07-07 13:46:47 +02:00
Markus Blatt
7a571c98db include missing header for OpenCLSolver with g++-8.3
Without I got compilation errors.
2020-07-07 11:10:19 +02:00
T.D. (Tongdong) Qiu
478e2ee971 Improved rowsPerColor usage 2020-07-07 11:00:38 +02:00
T.D. (Tongdong) Qiu
5aa8dda487 Changed default parallel strategy to GRAPH_COLORING 2020-07-06 13:56:27 +02:00
T.D. (Tongdong) Qiu
4c037b0998 Removed unused test kernels 2020-07-06 13:56:27 +02:00
T.D. (Tongdong) Qiu
a164a57220 Added memory management to BlockedMatrix 2020-07-06 13:55:50 +02:00
T.D. (Tongdong) Qiu
779a713330 Simplified BdaSolverStatus 2020-07-06 13:40:44 +02:00
T.D. (Tongdong) Qiu
833ea8ae72 Added templated blockinversion for C-style arrays 2020-07-06 13:40:44 +02:00
T.D. (Tongdong) Qiu
bb622449b6 Changed platformID and deviceID to commandline parameter. Make sure Flow exits cleanly upon invalid platform- or deviceID. 2020-07-06 13:38:57 +02:00
Tom Hogervorst
c8eb14aaac Graph coloring now uses CSC-format version of input pattern as well. 2020-07-06 13:29:30 +02:00
Tom Hogervorst
38c58bffae Renamed functions to all used Camel case, and renamed parameters to better represent what is stored in them.
Fixed mistake of using wrong sparsity pattern data to call canBeStarted function, and removed nnzValues of CSCmat, which were never used.
2020-07-06 13:18:46 +02:00
T.D. (Tongdong) Qiu
7f8faa018b Replaced timing function with Dune::Timer 2020-07-06 11:22:11 +02:00
T.D. (Tongdong) Qiu
845563c37b Replaced hardcoded constant with template 2020-07-06 11:20:43 +02:00
Joakim Hove
b9b1e734cb Add data::GroupValues member to RestartValue 2020-07-04 10:06:03 +02:00
Tor Harald Sandve
fdf0f1ed27 SALTVD and BDENSITY is not implemented 2020-07-02 13:49:05 +02:00
Tor Harald Sandve
88ee892fdf pass the saltConcentration to the waterPVT 2020-07-02 13:44:01 +02:00
Bård Skaflestad
5bb4321824 Simulator Group Data: Chase Upstream API Update
This commit makes the 'groupData()' function return a

    map<string, Opm::data::GroupData>

object instead of a

    map<string, Opm::data::GroupConstraints>

object.  The 'GroupData' structure adds a level of indirection to
the current per-group summary quantities that are directly assigned
by the simulator.  While here, also move the assignment of the
current group constraints/control values out to a separate helper
to reduce the body of the per-group loop in 'groupData()'.

This is in preparation of adding support for reporting group-level
production/injection guiderates (Gx[IP]GR) to the summary file.
2020-07-01 22:52:26 +02:00
Bård Skaflestad
8e20e0957f Don't Name Type that does not Exist in Sequential Configurations
This commit makes the constructor PressureInverseOperator that
accepts a Dune::OwnerOverlapCopyCommunication<> object contingent on
having MPI.  The type does not exist otherwise.
2020-07-01 21:52:57 +02:00
Markus Blatt
c01e6d14f7
Merge pull request #2694 from atgeirr/flexible-wellop
Allow well operators with FlexibleSolver.
2020-07-01 20:30:44 +02:00
Atgeirr Flø Rasmussen
f2395f6d94
Merge pull request #2695 from totto82/addBrineOutput
Add brine to output
2020-07-01 11:46:23 +02:00
Atgeirr Flø Rasmussen
a66260fe87
Merge pull request #2684 from totto82/convertUsingPriviousRates
use rates from previous time-step in the guiderate conversion
2020-07-01 11:04:22 +02:00
Tor Harald Sandve
6a7e816368 Add brine to output 2020-06-30 14:15:54 +02:00
Atgeirr Flø Rasmussen
c94eec872f Allow well operators with FlexibleSolver. 2020-06-30 12:33:57 +02:00
Tor Harald Sandve
fce0ba6759 Add oil water brine specialization 2020-06-30 10:41:28 +02:00
Bård Skaflestad
6d644da88e
Merge pull request #2688 from akva2/add_spe1_thermal_watvisc_reg_test
Add spe1 thermal watvisc reg test
2020-06-26 23:59:53 +02:00
Arne Morten Kvarving
e31062aa4e add missing license header 2020-06-26 09:49:01 +02:00
T.D. (Tongdong) Qiu
8913e1d057 Make sure OpenCL can be used without CUDA 2020-06-25 18:44:49 +02:00
T.D. (Tongdong) Qiu
b7f47c9787 Clarified preprocessor macros 2020-06-25 15:01:23 +02:00
T.D. (Tongdong) Qiu
c76630687d Removed config.h in header files 2020-06-25 14:49:41 +02:00
T.D. (Tongdong) Qiu
0471da3815 Rewritten Graph Coloring 2020-06-25 14:42:35 +02:00
T.D. (Tongdong) Qiu
ca83a8f53c Removed unused headers 2020-06-25 13:12:12 +02:00
T.D. (Tongdong) Qiu
4ad234bf55 Changed some ints to unsigned 2020-06-25 12:29:20 +02:00
T.D. (Tongdong) Qiu
b692b66d3a Added block_size templates to BlockedMatrix and Reorder functions 2020-06-25 11:51:41 +02:00
Atgeirr Flø Rasmussen
c59f4f7118 Make ghost-last feature available in PreconditionerFactory. 2020-06-25 10:56:11 +02:00
Atgeirr Flø Rasmussen
c2c79f0903 Move well operators to separate file.
Also introduce new class WellModelAsLinearOperator making a well model
into an actual Dune::LinearOperator, this prevents the TypeTag dependent
type from leaking into the type of the WellModelMatrixAdapter instantiation.

As a side benefit, the adapter classes can now adapt (i.e. combine with a
matrix operator) any linear operator.
2020-06-25 10:13:12 +02:00
T.D. (Tongdong) Qiu
8f9fa15ecd Fixed warnings, mostly shadowed parameters 2020-06-25 09:40:20 +02:00
T.D. (Tongdong) Qiu
98ddf47b44 Added block_size template to BdaSolvers and BILU0 2020-06-25 09:39:55 +02:00
Atgeirr Flø Rasmussen
7a69db02de
Merge pull request #2685 from blattms/fix-owner-cells-not-first
Alternative fix running in parallel with --owner-cells-first=false
2020-06-25 00:29:58 +02:00
T.D. (Tongdong) Qiu
2a48f5f63f Simplified usage of BdaSolver::second() for timing 2020-06-24 19:48:50 +02:00
T.D. (Tongdong) Qiu
3dc368b0b4 Added block_size templates to the BdaBridge. Removed unused gpu_mode variable 2020-06-24 16:46:04 +02:00
Atgeirr Flø Rasmussen
d3efb01e89
Merge pull request #2645 from hakonhagland/refac_fullyimpl
Refactor run() in `SimulatorFullyImplicitBlackoilEbos.hpp`
2020-06-24 16:35:09 +02:00
T.D. (Tongdong) Qiu
26133c4fd7 Fixed type of gpu_mode when HAVE_CUDA is false 2020-06-24 15:55:03 +02:00
Markus Blatt
27c9ed5c85 Consistently use ISTLSolverEbos::getMatrix to get correct matrix. 2020-06-24 15:37:43 +02:00
Markus Blatt
27ace20378 [bugfix] remove redundant copyjacToNoGhost in ISTLSolverEbos::solve
It uses a null pointer and make flow segfault. The copying is already
done in ISTLSolverEbos::prepare.
2020-06-24 15:25:24 +02:00
Tor Harald Sandve
a99254f917 clean up based on review 2020-06-24 09:48:09 +02:00
Tor Harald Sandve
8e3c124b23 use rates from privious time-step in the guiderate conversion to reduce oscilation 2020-06-24 09:38:18 +02:00
T.D. (Tongdong) Qiu
e4417fdc01 Set default value for use_gpu, using Dune would segfault because of the unitialized value 2020-06-23 18:20:10 +02:00
T.D. (Tongdong) Qiu
b9e4bd3a95 Updated HAVE_XX guards. Replaced string == compare with .compare() 2020-06-23 18:19:33 +02:00
Håkon Hægland
23505cf5c9 Fixed up minor issues from review of PR #2645
Renamed some functions, and checked the return value from runStep().
2020-06-23 12:14:07 +02:00
Tor Harald Sandve
39e23c4d41 store polymer rates for output 2020-06-23 12:01:34 +02:00
Håkon Hægland
e8a4065192 Refactor SimulatorFullyImplicitBlackoilEbos.hpp
A resubmission of commit bb20804 in PR #2403 and PR #2442 to work with the
current master.

Continues the work in #2619 and #2631 to refactor main simulation loop in
flow to work with the Python bindings.

The run() method in SimulatorFullyImplicitBlackoilEbos.hpp is refactored
in preparation for the implementation of a Python step() function in a
later commit. Currently run() is called from runSimulatorInitOrRun() in
FlowMainEbos.hpp using the runSimulatorRunCallback_(). Later, there
will be other callbacks like runSimulatorStepInitCallback_(), and
runSimulatorStepCallback_(), that will need to call different parts of
the code in run(). The run() function is thus refactored into run(),
runInit(), runStep(), and runLastStep(). Also, some of the local
variables in run() have to be made persistent between calls to
runStep(), this applies to variables report, solverTimer, totalTimer,
and adaptiveTimeStepping, which are made private class variables.
2020-06-23 11:50:57 +02:00
T.D. (Tongdong) Qiu
39df7c9381 Updated comments, fixed shadowed declaration warnings 2020-06-23 11:30:15 +02:00
T.D. (Tongdong) Qiu
f974a5f6db Added openclSolver
Usage: --gpu-mode=[cusparse|opencl|none] on command line
2020-06-22 18:26:49 +02:00
Atgeirr Flø Rasmussen
c58456faae Add missing include. 2020-06-20 16:28:59 +02:00
Atgeirr Flø Rasmussen
427eac5132 Use macro for instantiations, and clean up includes. 2020-06-19 16:37:43 +02:00
Atgeirr Flø Rasmussen
fb99dd6fee Use unique_ptr rather than shared_ptr. 2020-06-19 16:03:46 +02:00
Atgeirr Flø Rasmussen
226697ec6f
Merge pull request #2679 from akva2/janitoring
make parseSuccess dependent on MPI
2020-06-19 15:10:38 +02:00
Atgeirr Flø Rasmussen
5105b80e50
Merge pull request #2667 from atgeirr/flexible-solver-separate-compile-unit
Use explicit instantiation for FlexibleSolver to reduce compile times.
2020-06-19 15:03:30 +02:00
Atgeirr Flø Rasmussen
faddef0321 Do not instantiate things requiring MPI when HAVE_MPI is false. 2020-06-19 10:01:16 +02:00
Arne Morten Kvarving
41e7201c73 make parseSuccess dependent on MPI
avoids unused warnings when building without
2020-06-19 09:46:21 +02:00
Joakim Hove
5484264854 Add actionState argument also for non MPI branch 2020-06-19 05:21:05 +02:00
Joakim Hove
d89a2e5eb7
Merge pull request #2674 from joakim-hove/use-action-state
Add Action::State member to EclPropblem and pass it to io/ActionX
2020-06-18 18:39:08 +02:00
Atgeirr Flø Rasmussen
dcd5d21415 Split constructor to reduce instantiation.
Without the split, certain combinations with Dune::Amg::SequentialInformation
as template argument for Comm needlessly get instantiated.
2020-06-18 08:28:20 +02:00
Atgeirr Flø Rasmussen
3784ab9d77 Amended copyrights and made the _impl.hpp a proper header file. 2020-06-17 21:07:13 +02:00
Atgeirr Flø Rasmussen
f24b2cd708 Split instantiation files to enable parallel build. 2020-06-17 13:03:57 +02:00
Joakim Hove
b52366926a Add Action::State member to EclPropblem and pass it to io/ActionX 2020-06-17 12:25:03 +02:00
Atgeirr Flø Rasmussen
2dc2e053d1 Change order of constructor arguments.
This allows simplification, and having just two constructors.
2020-06-17 09:31:19 +02:00
Tor Harald Sandve
43d434d42e trivial clean up 2020-06-17 08:39:19 +02:00
Tor Harald Sandve
e9d040a284 Fix upwining for friction, acceleration, valve and SIGD for MSW
Note 1:
The rate vectors used for the pressure equation now contains derivatives wrt to the upwind segment for fractions.
To make sure derivatives wrt. to different segmens gets mixed we disregard the derivatives for the properties (density, viscosity) evaluated at the upwind segment.

Note 2:
A factor 2 is added to the velocity head term similar as in the friction term

Note 3:
A sign change is added to the acceleration term for massrates > 0. Is this correct. It seems like the reference simulator does this.
2020-06-17 08:39:19 +02:00
Atgeirr Flø Rasmussen
a6d186551b Use explicit instantiation for FlexibleSolver to reduce compile times. 2020-06-17 07:43:30 +02:00