This code is required in the first place because opm-material always
specifies all parameters in terms of the wetting saturations while the
gas is the non-wetting phase in a gas-oil system.
this does not disrupt the block nature of the linearized matrix
(i.e. Dune::BCRSMatrix is still used), but if the number of auxiliary
equations is smaller than that of the "main" discretization, the
superfluous equations are padded. if the number of additional
equations are larger than that of the equation, additional DOFs are
added.
the biggest change is that it is now based on a new approach: the well
model now always calculates the bottom hole pressure for the full well
when asked for a source term. This change makes it possible to
implement cross flow within wells properly and should also make the
well model physically correct.
Also, the well model now uses the connection transmissibility factor
which makes it possible to use this quantity if it is specified by the
deck...
the goal is to make it faster on computers with many cores: The
easiest way to do this is to ensure that the longest running tests are
not taking too much time and that they need about the same time. Thus
this patch contains the following changes which limits the CPU time
taken by each test to about two minutes in debug mode on my machine:
- the water-air problem using the non-isothermal primary variable
switching model now uses an 16x16 instead of a 32x32 grid. as a
compensation it now runs for a year instead of 5000 seconds and the
global grid refinement is now tested.
- the end time of the lens problem ctests is now 3000 instead of
30000 seconds. The binary itself does not change at all.
- sort the tests in the CMakeLists.txt roughly in the order of their
required time. (this will cause ctest not having to wait for long
running test which were started late for too long.)
it was used for debugging intersection mappers. to make this include
work, dune-cornerpoint must be available and that the intersection
mapper PR must be merged.
this means that all code which could potentially throw an exception is
moved to this method(). (In particular FluidSystem::init() proved
troublesome in the past.) Besides avoiding segmentation the faults
which stem from exceptions thrown in constructors, this also has the
advantage that simulations which spend a noticable amount of time to
initialize stop at the "correct" place, i.e. after the "Finish init of
the problem" message was printed by the simulator...
this regressed after time step index of the initial solution was
changed from 0 (actually, this was also 0 for the first time step...)
to -1 in b30af664.
this method checks that the difference in the storage terms before and
after a time step is the same as the accumulated fluxes over the
domain boundary plus the source terms.
... and actually use it for the lens problems. This seems to have been
disabled for debugging and later it was probably forgotten to turn it
on again. This led to some minor bit-rot in that code...
The reason for this is to be able to modify the tolerance according to
grid size: The NewtonTolerance parameter has been renamed to
NewtonRawTolerance and for the porous media models is divided by the
square root of the volume of the smallst finite volume in the grid to
get the final tolerance for the Newton method. This is necessary
because very large grids need to achive a higher volumetric accuracy
in the residual than very small ones...
basically the init() method was split into a finishInit() method which
fills the data structures allocated in the constructor with meaningful
data and into applyInitialSolution() which does just that (and no
more!)
"intensive" means that the value of these quantities at a given
spatial location does not depend on any value of the neighboring
intensive quantities. In contrast, "extensive" quantities depend in
the intensive quantities of the environment of the spatial location.
this change is necessary is because the previous nomenclature was very
specific to finite volume discretizations, but the models themselves
were already rather generic. (i.e., "volume variables" are the
intensive quantities of finite volume methods and "flux variables"
are the extensive ones.)