Commit Graph

61 Commits

Author SHA1 Message Date
Markus Blatt
6d21214fa7 Switch to ParallelOverlappingILU0 for CPRPreconditioner.
This seems to have been forgotten previously. Now the code int CPRPreconditioner.hpp
uses ParallelOverlappingILU0 instead of SeqILU[0n]/BlockPreconditioner which
makes the code more slim.
2018-02-05 22:37:01 +01:00
Markus Blatt
59ca0b4424 Fix the PR that said it activated AMG.
Actually, it did not as it did set the define eith wrong
or the wrong locations. This commit fixes this and finally
makes AMG available.
2017-06-27 10:00:31 +00:00
Arne Morten Kvarving
3c0cb9e950 adjust for changed ParameterGroup namespacing 2017-04-28 15:36:25 +02:00
Robert Kloefkorn
4ff23191eb [feature] make flow and flow_ebos use the same linear solver setup. 2016-11-02 16:41:11 +01:00
Andreas Lauser
ddecdc9dbe Merge remote-tracking branch 'origin/master' into frankenstein_merge_master_v7
* origin/master:
  Bugfix: use correct object in sequential model.
  Bugfix: properly handle two-phase cases.
  Bugfix: pass both normal and extra data to output.
  Update well data output integration.
  Adapt to API change in opm-parser.
  Ensure logging only on first rank.
  Add isIORank_ member to avoid repeated calls.
  Rename isRankZero() -> isIORank() for consistency.
  Ensure only first-rank logging.
  Add isRankZero() utility.
  Bugfix: missing return.
  do not set limits for prt log and set correct value for Note.
  correct function call order and add whitespace.
  supprot MESSAGES default vaule.
  wellToState reads new opm-output data exchange
  Write control to data::Wells. Missing ability to restore.
  Avoid using buggy wellstate api
  Stop report early if there are no wells
  Update to interface change in opm-output
2016-10-28 09:22:38 +02:00
Atgeirr Flø Rasmussen
a2c9e64291 Add isIORank_ member to avoid repeated calls. 2016-10-20 22:40:24 +02:00
Atgeirr Flø Rasmussen
e4731fc14d Rename isRankZero() -> isIORank() for consistency. 2016-10-20 22:40:24 +02:00
Atgeirr Flø Rasmussen
8ed3418245 Ensure only first-rank logging.
Also classify convergence troubles or out-of-bounds residuals as
"problem" not "error".
2016-10-20 22:40:24 +02:00
Andreas Lauser
36b00ba570 Merge remote-tracking branch 'origin/master' into frankenstein_merge_master 2016-09-28 21:20:47 +02:00
Atgeirr Flø Rasmussen
08c5e31265 Do not move when it would disable copy elision. 2016-09-26 09:33:13 +02:00
Andreas Lauser
4ecd6ca64a fix some serious screw-ups
almost all of them were caused by recent changes in the master
branch:

- there were methods added which depend on the types `V` and
`DataBlock`. these do not make much sense in the context of the
frankenstein simulator. Also, these types are defined globally for the
whole Opm namespace in `BlackoilModelBase_impl.hpp` (which should be
prosecuted as a fellony IMO)! Besides this, their names are useless;
'V' is the letter which comes after `U` in the alphabet and when it
comes to computers basically everything can be seen as a chunk of data
(i.e., a `DataBlock`).
- it seems like the new and shiny dense-AD based well model was never
compiled with assertations enabled, at least some asserts referenced
non-existing variables.
- the recent output-related API changes were pretty unfortunate
because they had the effect of tying the (sub-optimal, IMO) internal
structure of the model even closer to the output code: as far as I can
see, `rq` does only make sense if the model works *exactly* like
BlackoilModelBase and friends. (for flow_ebos, this could be
replicated, but first it would be another unnecessary conversion step
and second, most of the quantities in `rq` are of type `ADB` and much
of the "frankenstein" excercise is devoted to getting rid of these.) I
thus reverted back to an old version of the output code and created a
`frankenstein` branch in my personal `opm-output` github fork.
2016-09-13 23:58:59 +02:00
Tor Harald Sandve
5cd7468b51 Implement new well model
Start using the well model desribed in SPE 12259 "Enhancements to the
Strongly Coupled, Fully Implicit Well Model: Wellbore CrossFlow Modeling
and Collective Well Control"

The new well model uses three well primary variables: (the old one had
4)
1) bhp for rate controlled wells or total_rate for bhp controlled wells
2) flowing fraction of water Fw = g_w * Q_w / (g_w * Q_w + q_o * Q_o +
q_g + Q_g)
3) flowing fraction of gas  Fg = g_g * Q_g / (g_w * Q_w + q_o * Q_o +
q_g + Q_g)
where g_g = 0.01 and q_w = q_o = 1;

Note 1:
This is the starting point of implementing a well model using denseAD
The plan is to gradually remove Eigen from the well model and instead
use the fluidState object provided by the Ebos simulator
Note 2:
This is still work in progress and substantial cleaning and testing is
still needed.
Note 3: Runs SPE1, SPE9 and norne until 950 days.
2016-08-18 12:23:45 +02:00
Atgeirr Flø Rasmussen
7489f15ee9 Add sequential models for black oil.
This commit adds sequential solvers, including a simulator variant
using them (flow_sequential.cpp) with an integration test (running
SPE1, same as for fully implicit).

The sequential code is capable of running several (but not all) test
cases without tuning or special parameters, but reducing ds_max a bit
(from default 0.2 to say 0.1) helps with transport solver
convergence. The Norne model runs fine (esp. with a little tuning). A
parameter iterate_to_fully_implicit (defaults to false) is available,
when set the simulator will iterate with alternating pressure and
transport solves towards the fully implicit solution. Although that
takes a lot extra time it serves as a correctness check.

Performance is not competitive with fully implicit at this point:
essentially both the pressure and transport models inherit the fully
implicit model and do a lot of double (or triple) work. The point has
been to establish a proof of concept and baseline for further
experiments, without disturbing the base model too much (or at all, if
possible).

Changes to existing code has been minimized by merging most such
changes as smaller PRs already, the only remaining such change is to
NewtonIterationBlackoilInterleaved. Admittedly, that code (to solve
the pressure system with AMG) is not ideal because it duplicates
similar code in CPRPreconditioner.hpp and is not parallel. I propose
to address this later by refactoring the "solve elliptic system" code
from CPRPreconditioner into a separate class that can be used also
from here
2016-06-27 10:28:09 +02:00
Robert Kloefkorn
7dd76cc967 NewtonIterationBlackoilInterleaved: added flag to allow to ignore solver convergence
failure.
2016-05-27 12:55:46 +02:00
Tor Harald Sandve
09ab530674 Add the option of computing the full sparity pattern based on all phases
- For some cases (for instance involving solvent flow) the reasoning for
only adding the pressure derivatives seems to fail. As getting the
sparsity pattern is non-trivial, in terms of work, the full sparsity
pattern is only added when specified by the parameter
"require_full_sparsity_pattern"
- For solvent runs "require_full_sparsity_pattern" defaults to true for
all other runs the default is to only extract the sparsity pattern from
the pressure derivatives.
2016-05-11 15:13:52 +02:00
Robert Kloefkorn
530c0fe57f MatrixBlock: cleanup invert implementation to be less confusing. 2016-02-12 12:17:01 +01:00
Robert Kloefkorn
e3b578d685 NewtonIterationBlackoilInterleaved: single precision can be used whether UMFpack is
there or not.
2016-02-12 12:14:02 +01:00
Robert Kloefkorn
4111797822 BlackoilModelBase: added parameter singlePrecision and print residual to large at right
place.
2016-02-12 12:14:02 +01:00
Robert Kloefkorn
82d508727f MatrixBlock: added function firstmatrixelement.
NewtonBlackoilInterleaved: some cleanup and variable naming.
2016-02-12 12:14:02 +01:00
Robert Kloefkorn
783f158c93 NewtonBlackoilInterleaved: anable the use of AMG preconditioner. 2016-02-12 12:14:02 +01:00
Robert Kloefkorn
31812bd2f9 NewtonBlackoilInterleaved: add solver option for single precision. 2016-02-12 12:14:02 +01:00
Markus Blatt
0da66bf45b Removed more dead and code that was already commented out. 2015-12-01 15:11:27 +01:00
Markus Blatt
fd78f1c0b9 Moved includes to \*.cpp file. 2015-12-01 14:56:29 +01:00
Markus Blatt
dd77556252 Added restricted parallel schwarz and overlapping ILU0 preconditioner 2015-11-25 08:43:46 +00:00
Atgeirr Flø Rasmussen
df668cc5e7 Merge pull request #497 from andlaus/error_macros_to_opm_common
Error macros to opm common
2015-10-12 13:31:54 +02:00
Atgeirr Flø Rasmussen
6170542e2f Fix compile warning and error message. 2015-10-09 13:49:00 +02:00
Robert Kloefkorn
4d121dccf4 NewtonIterationBlackoilInterleavedImpl: cleanup. 2015-10-09 13:39:02 +02:00
Robert Kloefkorn
476a09e0d6 NewtonIterationBlackoilInterleaved: print "...to cover np = 0" 2015-10-09 12:12:50 +02:00
Robert Kloefkorn
885aedb1e8 NewtonIterationBlackoilInterleaved: make parameter a struct to avoid multi reading. 2015-10-09 12:03:58 +02:00
Robert Kloefkorn
28902065cf NewtonIterationBlackoilInterleavedImpl: silence warnings about unused and shadowed
variables.
2015-10-08 15:54:21 +02:00
Robert Kloefkorn
d93a1a5b63 NewtonIterationBlackoilInterleaved: replace switch-case statement by proper template
recursion.
2015-10-08 15:54:21 +02:00
Robert Kloefkorn
884edadbd6 NewtonIterationBlackoilInterleaved: remove old docu. 2015-10-08 15:54:21 +02:00
Robert Kloefkorn
6304e44242 NewtonIterationBlackoilInterleeaved: remove unused headers. 2015-10-08 15:54:21 +02:00
Robert Kloefkorn
c485e3fdc7 NewtonBlackølInterationInterleaved: NewtonBlackølInterationInterleavedImpl implements
the Iteration for a fixed number of cell variabled which is then used by the
NewtonBlackølInterationInterleaved class via a switch-case over the actually existing
numbers.
2015-10-08 15:54:21 +02:00
Andreas Lauser
72b0cb2c3e use the error macros from opm-common 2015-10-08 12:08:28 +02:00
Joakim Hove
76f674b16b Updated path to warning suppression header. 2015-10-06 12:11:49 +02:00
babrodtk
85cfd9768e Fixed whitespace issue 2015-09-24 08:47:27 +02:00
babrodtk
206dbd3b56 Updated documentation 2015-09-21 08:28:57 +02:00
babrodtk
a58dcce654 Minor changes to how the interleaved system is built 2015-09-17 16:00:44 +02:00
Atgeirr Flø Rasmussen
1f6d957cd4 Change the way the interleaved matrix is built.
Note that this implementation may not be robust since the getSparse()
method throws if the AutoDiffMatrix is not of general sparse type (S),
2015-09-17 15:59:56 +02:00
Kai Bao
b1b9c171b3 update scaling factors for mass balance equations. 2015-09-08 10:57:18 +02:00
babrodtk
9855d7340f Minor performance updates 2015-09-07 13:01:31 +02:00
Atgeirr Flø Rasmussen
097542a527 Whitespace fixes.
It turns out I accidentally used tabs for a while, this commit
fixes that for all touched files.
2015-09-07 13:00:41 +02:00
Atgeirr Flø Rasmussen
c795113ce3 Changes to make flow compile with AutoDiffMatrix. 2015-09-07 13:00:02 +02:00
Markus Blatt
45fdb3ac48 [bugfix] Use correct parameters for ParallelIstlInformation::copyValuesTo.
The last parameter of this functions specifies how vector/martix
entries there are per index/cell of the grid. For the interleaved
versions all components end up in one block. Therefore this number
needs to be one here (in contrast to the number of phases for the
non-interleaved version).

This commit new uses the correct number.
2015-09-05 16:09:33 +02:00
babrodtk
5b287e0ea8 Fixed warnings 2015-09-02 13:02:27 +02:00
Atgeirr Flø Rasmussen
d41bd90a40 Change assert() to use actual variables present. 2015-08-17 17:06:54 +02:00
Kai Bao
997616658b adding 0th phase only once when computing sparse pattern 2015-08-17 15:33:33 +02:00
Kai Bao
ce4b25f0b8 removing the unused SparseMatrix A 2015-08-17 15:12:13 +02:00
Kai Bao
7d7b05a126 removing unused Span variable. 2015-08-17 15:04:31 +02:00