1. Changed calculation of face pressures to avoid using mobilities.
2. Added 'scratch_f' array to cfs_tpfa_impl struct (for use by above routine).
3. Changed interface of cfs_tpfa_fpress() to pass the data struct.
0. Writes total fluid volumes to octave and vtk output files.
(following considerations ONLY apply to IMPES mode: do_impes=true)
1. Now we do timestep safety evaluations for IMPES, a la Coats.
This is done after the pressure computation.
2. If current timestep is unsafe, we set the new timestep to the safe one,
divided by 1.5.
3. If minimum_stepsize is set, we will not further reduce the timestep once
it is below the minimum (yes, this is not quite a "minimum").
All in all, timestepping and reporting should be reconsidered to make a
user-friendly yet controllable impes code. The current impes mode does
not interact well with timestep_file for instance.
Specifically, allocate storage for 'masstrans' and 'gravtrans' terms
per well completion (perforation), as well as compressible
transmissibilities (scalar per completion). Calculate compressible
quantities by treating each completion as an interface.
Introduce a new structure, 'completion_data', to collect static and
dynamic discretisation data pertaining to each completion (e.g.,
productivity indices, gravity potentials and density ratio
operators). Pass this structure, rather than individual fields, into
affected CFS_TPFA entry points.
Compile tested only.
Specifically, rename the obtuse structure 'disc_data' to the more targeted
'densrat_util' and hoist the compressible terms 'ctrans' and 'P' into
the 'cfs_tpfa_impl' structure. Moreover, rename the remaining fields
into something that makes sense in (almost) isolation. Update
compute_densrat_update() and cfs_tpfa_construct() accordingly.
This is in preparation of adding compressible well terms.
Specifically, only assemble gravity contributions on internal faces or
external Dirichlet faces. Moreover, pay attention to direction of
gravity flux (in/out of cell) during assembly.
Specifically, split detection of prescribed reservoir pressure values
from prescribed well (i.e., BHP) pressure values. Previously, we
would not even assemble any well contributions if there were any
prescribed reservoir pressure values. Moreover, the return value from
assemble_cell_contrib() was exactly opposite of its intended value...
Callers may pass NULLs in absence of wells in any given model. This
implementation assembles an equation for each well, irrespective of
well control type (BHP or RATE), and assumes that productivity indices
and perforation pressure drops account for multiphase effects.