Commit Graph

19 Commits

Author SHA1 Message Date
Bård Skaflestad
a13d78bb06 Start fleshing out overall structure of Newton loop
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.
2013-05-14 13:40:56 +02:00
Bård Skaflestad
55165bd68d Enforce row-major ordering of the pressure Jacobian
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.
2013-05-14 11:53:09 +02:00
Bård Skaflestad
3f0f0363c3 Add first, working gravity solution
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)
2013-05-14 11:40:07 +02:00
Bård Skaflestad
e31486e288 Add tentative implementation of gravity flux. 2013-05-13 16:31:26 +02:00
Bård Skaflestad
a141e79ead Construct (and store) gravity operator on grid.
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.
2013-05-13 16:11:48 +02:00
Bård Skaflestad
4721d402e4 Remove an instance of EOL whitespace. 2013-05-13 10:35:50 +02:00
Atgeirr Flø Rasmussen
9620339476 Merge remote-tracking branch 'bska/master'
Conflicts:
	ImpesTPFAAD.hpp
2013-05-13 10:31:15 +02:00
Atgeirr Flø Rasmussen
dd679892bc Work in progress on adding well eqns. 2013-05-13 10:26:16 +02:00
Atgeirr Flø Rasmussen
e633f59df4 ImpesTPFAAD now takes a linear solver parameter.
Also work in progress on adding well bhp to the system.
2013-05-13 08:35:39 +02:00
Bård Skaflestad
61f184cdc9 Use constant intermediate quantities. 2013-05-12 22:48:15 +02:00
Atgeirr Flø Rasmussen
b0cf134479 Added wells to solver interface, not used for anything yet. 2013-05-12 21:43:54 +02:00
Bård Skaflestad
92592672fe Use upwind mobility flux. 2013-05-08 15:06:13 +02:00
Bård Skaflestad
093daa93d7 Implement first cut at pressure system assembly.
Compile-tested only.
2013-05-08 14:34:48 +02:00
Bård Skaflestad
673c044a6c Rename 'phase' parameter p->phase to avoid confusion. 2013-05-08 13:13:57 +02:00
Bård Skaflestad
ea1cdcd478 Assert non-empty state quantities.
This avoids generating a null-pointer dereference for

   &s[0]

in case of s.empty().
2013-05-08 13:02:51 +02:00
Bård Skaflestad
3ff5347ac9 Distinguish fluid from geology properties.
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.
2013-05-08 09:39:48 +02:00
Bård Skaflestad
843499e071 Include <cassert> for assert() macro. 2013-05-08 00:11:21 +02:00
Bård Skaflestad
d0cb7d8a4c Move buildAllCells() to anon. namespace.
This avoids diagnostics like "no previous declaration for ...".
2013-05-07 21:40:17 +02:00
Bård Skaflestad
72fdc41caa Add early foundations for compressible flow solver
This is highly incomplete and refactorings are likely.
2013-05-07 19:58:10 +02:00