Commit Graph

282 Commits

Author SHA1 Message Date
Andreas Lauser
46e41228b5 flow: call getConvergence() on the raw reservoir residual
i.e., the residual without the Schur complement for the wells being
applied. This hopefully fixes the issue pointed out by
[at]totto82.
2019-02-25 11:24:30 +01:00
Andreas Lauser
f5e7ca9bb3 well model: fix application of Schur complements
using the eWoms API for wells, the Schur compliment was not applied at
all. If `BlackOilWellModel::linearize()` was made non-trivial, the
Schur complement was applied twice in `flow`. With this patch, we only
apply this using the eWoms API (in
`BlackOilWellModel::linearize()`). I could not observe a signficant
effect on the convergence behaviour of `flow` for the cases which I
tested (Norne and realization 5 of Model 2).
2019-02-25 10:51:30 +01:00
Andreas Lauser
c379823dec Really adapt to the new linear solver API used by eWoms
I tested #1712 without deriving the `EclFlowProblem` type tag from
`FlowIstlSolver`, and it worked because the linear solver was still
`Opm::ISTLSolverEbos` because the linear solver is set via the
`LinearSolverSplice` a few lines down.

This time, I verified that the
`Ewoms::Linear::ParallelBiCGStabSolverBackend` was used if the
offending line was commented out. also, Norne worked fine with the
default solver as long as the Schur complement for the wells was done
explicitly.

Finally, the naming of the eWoms API is a bit inconsistent
(`setMatrix()` vs. `setResidual()`). any opinions here? I'm fine with
whatever.
2019-01-30 15:26:39 +01:00
Andreas Lauser
2563a58db8 adapt to the new preparation procedure of ewoms linear solvers 2019-01-18 09:05:24 +01:00
Tor Harald Sandve
2d2d0c4433 Adapt to linear solver api from ewoms 2019-01-10 15:50:09 +01:00
Kai Bao
dcf036e757 removing some white spaces. 2019-01-02 13:39:00 +01:00
Atgeirr Flø Rasmussen
a48fbac322
Merge pull request #1680 from GitPaean/flow_polymw_remake
adding the simulator for flow injectivity study
2018-12-17 10:26:41 +01:00
Kai Bao
c4254240e2 addressing the first part of comments form PR#1680
there should be no functional change.
2018-12-13 13:29:59 +01:00
Kai Bao
612ac74b89 finish the injecivity functionality
the result looks okay
2018-12-11 21:40:47 +01:00
Kai Bao
b079c0a1e5 adding flow_injecitivity executable target 2018-12-11 21:40:47 +01:00
Atgeirr Flø Rasmussen
56cc37f255 Move throw-if-nan to after storing convergence report. 2018-12-11 13:10:22 +01:00
Atgeirr Flø Rasmussen
b6f8128260
Merge pull request #1661 from akva2/removeBlackoilStateCorr
Remove usage of BlackoilState class
2018-11-27 10:14:06 +01:00
Tor Harald Sandve
b661791a63 Remove usage of BlackoilState class
This allows (re)moving of the following files
opm/autodiff/RateConverter.hpp
opm/autodiff/Compat.cpp
opm/autodiff/Compat.hpp
opm/core/props/BlackoilPropertiesInterface.hpp
opm/core/simulator/BlackoilState.cpp
opm/core/simulator/BlackoilState.hpp
opm/core/simulator/BlackoilStateToFluidState.hpp
opm/core/utility/initHydroCarbonState.hpp
opm/polymer/PolymerBlackoilState.cpp
opm/polymer/PolymerBlackoilState.hpp
tests/test_blackoilstate.cpp
2018-11-27 09:38:38 +01:00
Atgeirr Flø Rasmussen
3bbc13a9ce Add step numbers to convergence reports, add query method. 2018-11-22 11:14:39 +01:00
Atgeirr Flø Rasmussen
83ce1eb919 Ensure all residuals are checked for convergence.
Looping over all components instead of phases, to handle polymer etc.
correctly. Also slight refactoring of how component names for output
are handled.
2018-11-19 14:46:31 +01:00
Atgeirr Flø Rasmussen
b42165b560 Store convergence reports from all steps and iterations. 2018-11-19 11:48:07 +01:00
Atgeirr Flø Rasmussen
fe79a9fc07 Refactor getConvergence() to use ConvergenceReport.
Note: the communication and reduction for computing reservoir
convergence is not done by gathering ConvergenceReports, but
as before, using the convergenceReduction() method.
2018-11-19 11:48:07 +01:00
Atgeirr Flø Rasmussen
92a9b5fa9b Avoid using legacy stuff for ebos linear solvers. 2018-11-16 12:06:12 +01:00
Andreas Lauser
f9104ca3d7 adapt to the eWoms interface for abstracting sparse matrices 2018-11-14 14:35:52 +01:00
Atgeirr Flø Rasmussen
446dbdf86d Use gatherConvergenceReport().
This avoids multiple all-reduce blocks, simplifying the code and
enabling us to return the report from getWellConvergence().
2018-11-13 14:02:55 +01:00
Atgeirr Flø Rasmussen
48b0024855 Refactor BlackoilModelEbos::getConvergence().
The loop over elements to extract data has been moved to a separate
function localConvergenceData().
2018-11-13 10:19:15 +01:00
Tor Harald Sandve
7ccce99e1c Do the schur complement after calling the getConvergence method 2018-11-08 10:41:41 +01:00
Tor Harald Sandve
5edd63c554 flow: let the wells be managed by EclProblem 2018-11-08 10:40:28 +01:00
andrthu
a969fd198a Ignoring overlap cells in parallel ILU factorization (#1610)
* fixed the issue of including ghost cells in preconditioning, by zeroing out ghost rows and setting the diagonal to a large value.

* move altering of matrix to a function

* blockwise modification of matrix

* add findOverlapRowsAndColumns in BlacoilDetail. Add call to findOverlapRowsAndColumns in constructor of BlacoilModelEbos. Change makeOverlapRowsInvalid, by looping over precalculated inddies instead of grid

* Better formatting
2018-11-06 14:14:50 +01:00
Andreas Lauser
7c81dbdaab let the aquifiers be managed by core ebos
also, clean them up a bit:
- do not use the intensive quantities cache directly anymore. (i.e.,
  that code should now work if the IQ cache is disabled)
- do not fiddle with the global Jacobian matrix and residual vector
  directly. Instead, implement the water fluxes to the reservoir as a
  source term like wells.

one thing that did not become fully clear to me is if each aquifer
ought to be assumed to be in contact with the whole reservoir or just
a few cells on the boundary. The current implementation goes down the
former path, while, without any deeper knowledge, I would rather
suppose that the latter applies. maybe my understanding of this is
just too limited, though.
2018-10-31 15:20:56 +01:00
Andreas Lauser
66b95c7f8d flow: use the update procedure of the eWoms blackoil model 2018-08-17 13:03:37 +02:00
Andreas Lauser
b5cddef928 flow: switch it to use the eWoms parameter system
this has several advanges:

- a consistent and complete help message is now printed by passing the
  -h or --help command line parameters. most notably this allows to
  generically implement tab completion of parameters for bash
- the full list of runtime parameters can now be printed before the simulator
  has been run.
- all runtime parameters understood by ebos can be specified
- no hacks to marry the two parameter systems anymore
- command parameters now follow the standard unix convention, i.e.,
  `--param-name=value` instead of `param_name=value`

on the negative side, some parameters have been renamed and the syntax
has changed so calls to `flow` that specify parameters must adapted.
2018-08-15 23:34:32 +02:00
Andreas Lauser
976ab03f68 fork ISTLSolver into a legacy and non-legacy version
this is necessary because only the latter can use the property system.
2018-08-15 23:33:50 +02:00
Andreas Lauser
ca2428cf13 adapt to the rename of the EclOutputDir parameter to OutputDir in eWoms 2018-08-14 10:37:24 +02:00
Atgeirr Flø Rasmussen
b4bdea1d3f
Merge pull request #1535 from akva2/remove_unnecessary_includes
Remove unnecessary includes
2018-07-30 16:40:57 +02:00
Arne Morten Kvarving
ab4d0e63af BlackOilModelEbos: remove unused include 2018-07-12 10:12:13 +02:00
Andreas Lauser
7f8120d609 flow: do not set the ExportGlobalTransmissibility property anymore
this has not been required anymore since the output code was moved to
the ebos core.
2018-07-11 13:49:17 +02:00
Tor Harald Sandve
3e53ed6386 implement WTEST support 2018-06-28 10:16:29 +02:00
Andreas Lauser
c794028bcf flow: fix the time held by the simulator object 2018-06-27 12:13:50 +02:00
Andreas Lauser
5a9b81db33 remove the hasDisgas and hasVapoil arguments from SimulatorFullyImplicitBlackoilEbos
They seemed to be unused already. I suspect that were only there for
API compatibility reasons.
2018-06-06 10:59:42 +02:00
Andreas Lauser
37b6a540af remove BlackoilOutputEbos
after the actual output writing code has been moved to core ebos, this
was just a unnecessary glue layer for API compatibility.
2018-06-06 10:59:41 +02:00
Andreas Lauser
dfbc24b35f flow: avoid wrangling around with dummy state objects
these objects are only used by flow_legacy, so not having to deal with
them anymore lets non-legacy flow avoid to jump through a lot of hoops
for the sake of having a common API.

this required a fork of the NonlinearSolver and AdaptiveTimeStepping
classes. this is not a problem because the original classes would get
pruned to look like the new ones once flow_legacy gets moved out of
the opm-simulators module.
2018-06-06 10:59:41 +02:00
kel85uk
1237724c9a Cleans up the BlackoilModelEbos.hpp file to address the final comments. 2018-06-04 15:28:58 +02:00
kel85uk
963d42aab3 Corrects the whitespace again for blackoilmodelebos.hpp 2018-06-04 15:28:57 +02:00
kel85uk
b7fbe66c91 Cleans up the Aquifer model classes. 2018-06-04 15:28:56 +02:00
kel85uk
1a33e81d9c Cleans up the code and removes unused functions 2018-06-04 15:28:53 +02:00
kel85uk
e2513038c4 Implemented initialization procedure. 2018-06-04 15:28:49 +02:00
kel85uk
5a87818bb2 First addition of the class BlackoilAquiferModel. 2018-06-04 15:28:46 +02:00
Tor Harald Sandve
ee88790dea Add a flow specialization for blackoil with energy conservation
The energy conservation is enabled by specifying either TEMP or
THERMAL in the deck. The deck also needs to contatin relevant fluid and rock
heat properties.

The blackoil + energy equations are solved fully implicit.
2018-04-30 13:45:18 +02:00
Andreas Lauser
3924bb1e6e explicitly disable all extensions supported by black oil model for the base simulator
this should not really be necessary because they are supposed to be
disabled by default, but it makes things a bit more explicit
2018-04-06 11:01:33 +02:00
Atgeirr Flø Rasmussen
9897ae361e
Merge pull request #1428 from totto82/relax_convergence
Add option for relaxed CNV tolerance
2018-04-04 16:38:47 +02:00
Andreas Lauser
a42ece61ed BlackoilModelEbos: set the default output directory to the empty string
an empty string is interpreted as "write the output files into the
same directory as the input". this is the current 'flow' default
behavior, plain ebos uses "." as the default location for output,
i.e., the current directory from which the simulator is run from.
2018-03-12 15:17:39 +01:00
Tor Harald Sandve
15aeac3f90 Add option for relaxed CNV tolerance
Use a relaxed tolerance for individual cells (CNV) when iter >
max_strict_iter.

tolerance_cnv_relaxed_ is defauled to 1.0e9
This assure the same behaviour as current master, where CNV criterion is
ignored when iter > max_strict_iter

TODO: Test this with a stricter default ( <= 1.0)
2018-03-12 08:23:57 +01:00
Atgeirr Flø Rasmussen
1380564256
Merge pull request #1425 from totto82/fix_enable_storage_term_false
Bugfix. enableStorageCache=false
2018-03-09 14:13:10 +01:00
Atgeirr Flø Rasmussen
717a9180e5
Merge pull request #1422 from blattms/resort-to-split-operator
If requested use matrix with well contributions only for the preconditioner.
2018-03-07 14:33:09 +01:00