Commit Graph

32 Commits

Author SHA1 Message Date
Bård Skaflestad
c9d65f8c28 Merge remote-tracking branch 'atgeirr/master' 2013-05-06 14:01:06 +02:00
Atgeirr Flø Rasmussen
24c3e807c3 Moved helpers to separate file. 2013-05-06 14:00:17 +02:00
Bård Skaflestad
7980f3f6cb Suppress output from assignment in MATLAB. 2013-05-06 13:37:04 +02:00
Atgeirr Flø Rasmussen
18ec43f255 Use harmonic averaging of mobility for pressure eqns. 2013-05-06 13:28:30 +02:00
Atgeirr Flø Rasmussen
1509773ec4 Minor refactoring of UpwindSelector.
Also rename -> UpwindSelectorTotalFlux.
2013-05-06 12:52:28 +02:00
Bård Skaflestad
e9a1aa2a99 Fix mismerge. 2013-05-06 12:31:13 +02:00
Bård Skaflestad
bc547f82c6 Merge remote-tracking branch 'atgeirr/master'
Conflicts:
	sim_simple.cpp
2013-05-06 12:29:47 +02:00
Atgeirr Flø Rasmussen
8ffb2b0904 Added arithmetic operators taking constants.
Also simplified sim_simple.cpp by using new operators to get
rid of ADB::constant() usage.
2013-05-06 11:50:42 +02:00
Atgeirr Flø Rasmussen
2adbccd4f0 Treat source terms properly. 2013-05-06 11:25:55 +02:00
Atgeirr Flø Rasmussen
4366341971 Constified everything. 2013-05-06 11:11:32 +02:00
Atgeirr Flø Rasmussen
1aaec4b9a0 Simplified construction of total flux. 2013-05-06 10:45:29 +02:00
Atgeirr Flø Rasmussen
507914bd8f Rename s00 -> sw0. 2013-05-06 10:29:47 +02:00
Atgeirr Flø Rasmussen
17cc1c5042 Capitalize type name. 2013-05-06 10:03:35 +02:00
Atgeirr Flø Rasmussen
11be220440 Give type name initial capital. 2013-05-06 09:53:16 +02:00
Bård Skaflestad
60509ca960 Output solution as a MATLAB function.
This way, we can run the example as

    ./sim_simple | sed -n '/s1 *=/,$p' > solution.m

to obtain a MATLAB function containing the 'solution'.
2013-05-06 09:43:48 +02:00
Bård Skaflestad
b06b0c99ca Decrease amount of output and count iterations in the process.
Specifically, output the solution only at the end (in MATLAB
compatible format, for easy comparison) and annotate the diagnostic
output (i.e., cpu time and residual norm) with the iteration number.
2013-05-05 22:57:42 +02:00
Bård Skaflestad
056b7ae292 Make Darcy flux actually constant.
The definition from commit 6f22d10 included a non-zero derivative
which interfered with the automatic differentiation solver.  Using a
fully constant Darcy flux enables using dt=150 while still computing
the correct solution.

While here, output the solution (s1) using more precision/digits for
comparison with 'sim_simple.m'.
2013-05-05 22:02:40 +02:00
Bård Skaflestad
6f22d10b06 Do real splitting based on total flux/fractional flow
We are now able to compute the correct solution with dt=0.5, but the
convergence rate is dismal.
2013-05-05 21:52:34 +02:00
Bård Skaflestad
e31101e80f Incorporate transmissibility into water flux definition.
This means that we're computing the correct solution for dt=0.0005 (as
verified by 'sim_simple.m', but we're still failing larger time steps).
2013-05-05 16:44:51 +02:00
Bård Skaflestad
8b12d1506d Add MATLAB-compatible output of ADB::M values.
This is mostly intended as an interim aid in development.  Not enabled
if 'NDEBUG' is defined.
2013-05-03 23:45:13 +02:00
Bård Skaflestad
d0866c39b5 Implement first cut at upwind-mobility weighting for transport
Specifically,

  - Introduce a new class, UpwindSelector<Scalar> which provides a
    selection service (method select()) to pick out a quantity across
    an interface in the upwind direction.

    Method select() is implemented only for the case of no
    counter-current flow (i.e., no effects of gravity and/or capillary
    pressure).  The selector is affected through applying an explicit
    sparse matrix to each quantity.  This may be inefficient, but only
    measurements will tell.

  - Split function fluxFunc<ADB>() into two components,
    phaseMobility<ADB>() and fluxFunc<ADB>().  The former computes
    phase mobilities (per cell) for water and oil in a subset of the
    grid cells and the latter computes the flux function (for water,
    i.e., the first phase) based on a (2-) vector of phase
    mobilities--either per cell or per internal interface.

  - Compute explicit phase mobilities (per cell) in the non-linear
    loop before employing the upwind selector to pick out proper
    upwind mobilities per (internal) interface to define the quantity
    'fw_face' which was previously computed by an arithmetic average.
2013-05-03 17:48:33 +02:00
Bård Skaflestad
d6cfe8ab6f Clarify diagnostic message in pressure solve.
Word missing in commit a95fbf0.
2013-05-03 12:39:24 +02:00
Bård Skaflestad
a95fbf0e8e Terminate process in case of factorisation/solution failure.
Provide moderately informative diagnostic message in this case.
2013-05-03 12:33:48 +02:00
Bård Skaflestad
dddb30b5a5 Use regularised Jacobian when solving pressure system. 2013-05-03 12:26:02 +02:00
Bård Skaflestad
cd9c9d5cde Don't require initialiser lists.
These were introduced into GCC as recently as edition 4.7 .  Ubuntu
10.04 LTS features GCC 4.4 only.
2013-05-03 11:28:08 +02:00
Atgeirr Flø Rasmussen
9deca26fae Merge remote-tracking branch 'bska/master' 2013-05-03 11:01:46 +02:00
Atgeirr Flø Rasmussen
7e240913a4 Now doing a single transport step as well. 2013-05-03 11:00:17 +02:00
Bård Skaflestad
b6834de662 Don't rely on header pollution to provide <iostream> 2013-05-02 15:16:21 +02:00
Atgeirr Flø Rasmussen
62e321d069 Moved topological matrix operators into separate struct. 2013-05-02 13:51:03 +02:00
Atgeirr Flø Rasmussen
9a9e6fb7b7 Fix slow setup of cdiff etc. Also add timing, make case 3d. 2013-05-02 11:27:02 +02:00
Atgeirr Flø Rasmussen
42511ad2e3 Removed unused variables sw and so. 2013-05-02 09:27:58 +02:00
Atgeirr Flø Rasmussen
169557111d Simple simulator-like test program added.
So far it only computes a single pressure solution.
2013-05-02 08:51:36 +02:00