say 99.95% of all time: premature optimization is the root of all
evil.
in this case it turned out that iterating over a std::unordered_map is
very slow and that this is a quite common operation in
ebos. Fortunately the fix for this problem is very simple: use the
tree-based std::map instead of the hash function based
std::unordered_map.
on SPE9 this yielded a performance improvement of about 10% on my
machine...
strangely enough, this leads to slightly worse convergence for SPE9 on
my machine (19.0 vs. 16.8 seconds runtime). Nevertheless this is
definitely "more correct" from a physical point of view.
This reverts commit 3e247b059f20b1d04f47bd832719a99df8b9ac26. After a
more thorough investigation, the cannonical name of these quantities
turned out to be "* formation volume factor"...
this makes it possible to compare ECL restart and summary files
produced by ebos directly with the ones stemming from Eclips. (But be
aware that VTK output files from ebos are still all-SI!)
in particular, the partial relinearization seems to cause some _very_
weird effects. (the results differ very significantly for SPE1.) I
still have to investigate why, but I suspect that this is caused by
the fluid system being not continuously differentiable (it's piecewise
linear).
also, do not touch the region index in scalar assignments for black
oil primary variable objects. the first change is required by because
assignMassConservative() accesses the region index and the second
because scalar assignments should not modify the PVT region of the
primary variables. found by clang's ASAN.
this time it was caused by the fact that the episodeStartTime_ is
defined as the time which was elapsed from the beginning of the
simulation instead of the posix time which the simulation currently
looks at...
this is because the "bottom hole pressure" by default is the the
presssure at the center of the _topmost_ cell penetrated by the
well. (The terminology keeps getting more weird the longer you look at
it.)
this patch also changes the default way to calculate the reference
depth from the center of the deepest to the center of the highest cell
and makes the reference depth settable in the deck.
they were forgotten in a place or two. With this, ebos' performance
using ALUGrid is comparable to its performance using a "raw"
Dune::CpGrid.
(also, make the naming of the local variable for the element more
consistent, i.e., replace 'entity' by 'elem' for the few places where
'entity' was used.)
the ebos module implemenents what Eclipse calls 'NEWTRAN'
transmissibilities. Also, this commit required a few cleanups in the
velocity module infrastructure.
catching an exception for this seems like a pretty bad hack to me, but
there seems to be no other way to detect that a deck did not specify a
completion radius. (well, one could look at the raw COMPDAT keyword,
but that would defeat all benefits of using opm-parser's schedule
objects.)
this makes ebos work with SPE9 for the current master version of
opm-parser again.
note: the doxygen groups are quite a bit behind the curve and should
be overhauled soon. (e.g. now there's not only the vertex centered
finite volume space discretization anymore...)
first, it's not a good idea to go over the whole grid for each well at
the beginning of a time step, second the Jacibian matrix of the
linearization only needs to be recreated if the well completions have
changed...
SPE is closer, but not close enough. Note that the using total
mobility is probably "more wrong" than the previous approach (i.e.,
lambda = 1/viscosity of the injected phase)
"BHP" stands for "bottom hole pressure" so it sounded logical that
"THP" is an acronym for "top hole pressure". It isn't but the quantity
in question is still the pressure which is seen at the top of the
well's bore hole...
the ones based on Splines are better in principle, but they cause
havoc if two saturations are very close together with the slope of the
values off. this happens e.g. in SWOF in my version of SPE1...