Specifically,
- Extract method solveJacobianSystem() for solving a single,
system of linear equations (i.e., the Newton step).
- Extract method residualNorm() for computing the residual norm.
Used in loop control.
- Stub out a method for computing fluxes.
Compile and run-tested on a linear, gravity-driven flow problem.
Otherwise, we will use the transposed Jacobian as a coefficient
matrix in the 'linsolver_'. This is wrong when solving compressible
problems for which the Jacobian matrix is not symmetric.
When run as
./test_impestfpa_ad permeability=1.01325e15 ref_pressure=1.0e-5 \
mu1=1000 mu2=1000 rho1=1 rho2=1
this example reproduces the expected solution (a one-Pascal pressure
increase per cell).
Note that this is an incompressible case, so 'test_impestpfa_ad' must
be compiled with the pre-processor symbol
HACK_INCOMPRESSIBLE_GRAVITY
defined to a true value (e.g., -DHACK_INCOMPRESSIBLE_GRAVITY=1)
The gravity flux of phase 'i' across an (internal) interface is then
given by
gflux = mob_i * (G * rho_i)
assuming 'rho_i' contains the phase density (at reservoir conditions)
of phase 'i' and 'mob_i' is the phase mobility of phase 'i' at the
interface.
Most of class ImpesTPFAAD deals (or will deal) with fluid properties
with only a token nod to the geology--mostly in the form of derived
quantities such as transmissibility and pore volumes. There is no
need to conflate the roles of fluid interface and geology interface
for this purpose.