operator>=() is available for Opm::Evaluation, and its efficiency is
the same as explicitly comparing the value. Let's thus remove this to
reduce optical noise.
i.e., calculate the pressure which the exterior cell of a face would
exhibit at the depth of the interior one (instead of bringing both to
the depth of the face).
because the average fluid density is used, there should not be a
difference because of this.
for large problems with many wells the performance impact of this is
probably even measureable.
Also, this patch makes it possible to access the well manager outside
of the problem. In the normal case, this should be rarely needed, but
it can come in handy for debugging purposes.
the EQUIL init code from opm-core chokes hard if any Dune grid other
than Dune::CpGrid is passed to it. Until opm-core gets its act
together or EQUIL init is properly implemented within eWoms, let's
just disable EQUIL initialization in ebos (and print a warning) if
ALUGrid is used.
before, it could have been written multiple times if the first time
step of the simulation failed and the timestep was repeated with a
smaller step size.
re-ordering the attributes avoids some padding for EclPeacemanWell
objects and -- more importantly -- makes their ordering slightly more
logical.
initializing them avoids a valgrind complaint when writing the initial
condition to the ECL summary file.
obviously if the switching variable is interpreted as x_g^O, the gas
phase is present, because in this case it is the only phase. Also,
when the oil phase appears, the gas saturation is 1-Sw, not 1. (the
last issue only happened in the vaporized case because the switch
variable would never get the meaning of "oil component's mole fraction
in the gas phase".)
the mistake was that I assumed that this was specified by the ROCKTAB
keyword; It is not! (It's specified via PVTNUM or SATNUM depending on
the value of the third item of the ROCKOPTS keyword. for now, let's
only use the PVTNUM.)
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...
it often causes quite substantial headaches but does unfortunately not
normally lead to a substantial speedup. (at least not in its current
incarnation.)
in particular, the ECL schedule is now used to determine the episode
length on restart. this code is still quite shaky IMO, although it
seems to work for now.
this means eWoms restart files (*.ers), not Eclipse (*.UNRST) ones. by
default, the restart file writing interval is once every 2^24-1
timesteps, i.e. it is effectively disabled. The interval is settable
using the '--restart-writing-interval=$N" command line parameter,
though.