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.
* 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
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.
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.
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
- 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.
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.
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.