the missing piece was determining if the wells have changed between
report steps. This patch adds a simple way to determine this, but it
relies on low-level properties of opm-parser it does not
guarantee. (concretely, these details are that the same well objects
are returned in the same order if nothing changes. Since IMO this is a
pretty reasonable assumption, we use this approach instead of a more
complicated one until opm-parser provides a "change determination API"
for wells...)
note that this patch may increase the number of iterations required
for the simulation because the linear system of equations which is
solved in the first iteration of a time step actually corresponds to
the second to last solution of the previous time step. This means that
that linearization recycling usually only works well if the tolerance
of the Newton-Raphson solver is "sufficiently" low. ("sufficiently"
means that the linearization errors made due to using the "wrong"
solution for the first iteration can be neglected compared to the
differences because of the change of the solution in this iteration.)
therefore, use this feature at your own risk...
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.)
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...
"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...
this helps to keep the core blackoil model code lean and mean and it
is also less confusing for newbies because the ECL blackoil simulator
is not a "test" anymore.
in case somebody wonders, "ebos" stands for "&eWoms &Black-&Oil
&Simulator". I picked this name because it is short, a syllable, has
not been taken by anything else (as far as I know) and "descriptive"
names are rare for programs anyway: everyone who does not yet know
about 'git' or 'emacs' and tells me that based on their names they
must be a source-code managment system and an editor gets a crate of
beer sponsored by me!