Commit Graph
203 Commits
Author SHA1 Message Date
Bård Skaflestad 1b3e43068f Include proper file header. 2013-05-08 00:19:25 +02:00
Bård Skaflestad 146b1223d2 Don't check input values. Defaults are fine.
While here, also return zero, which although not strictly needed,
nevertheless indicates to the reader that we're exiting successfully.
2013-05-08 00:17:35 +02:00
Bård Skaflestad 843499e071 Include <cassert> for assert() macro. 2013-05-08 00:11:21 +02:00
Bård Skaflestad f3d8277d7a Ignore 'ImpesTPFAAD' test program. 2013-05-07 21:41:02 +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 cfb7c2916a Merge remote-tracking branch 'bska/master' 2013-05-07 21:25:30 +02:00
Bård Skaflestad 083fef3c69 Merge remote-tracking branch 'atgeirr/master' 2013-05-07 21:23:18 +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
Atgeirr Flø Rasmussen 8e687194ed Bugfix: do not use unititialized transi_ if no gravity. 2013-05-07 13:32:59 +02:00
Bård Skaflestad b4a49c5844 Merge remote-tracking branch 'atgeirr/master' 2013-05-07 13:28:08 +02:00
Atgeirr Flø Rasmussen 9a901b32cc Merge remote-tracking branch 'bska/master' 2013-05-07 13:15:13 +02:00
Atgeirr Flø Rasmussen c028d52f5a Added gravity treatment to transport solver (untested). 2013-05-07 13:13:38 +02:00
Bård Skaflestad 2fc7c65118 Ignore simulators 2013-05-07 10:51:05 +02:00
Atgeirr Flø Rasmussen 748b3d3fdd Minor simplification: make fw_face from fw_cell. 2013-05-07 10:08:09 +02:00
Atgeirr Flø Rasmussen 3888904e61 Removed unused code. 2013-05-07 10:07:25 +02:00
Atgeirr Flø Rasmussen e217b70ee0 Add single-AD quantity select() method.
Also make comments into Doxygen comments.
2013-05-07 10:06:22 +02:00
Atgeirr Flø Rasmussen f83c03de63 Updated check for umfpack for (opm-core) implicit solver. 2013-05-07 00:46:35 +02:00
Atgeirr Flø Rasmussen 82f3aba1af Fix use of relperm derivatives w.r.t. saturation.
Also reinstate residual norm output.
2013-05-07 00:45:38 +02:00
Atgeirr Flø Rasmussen c5811d141f Added simulator program capable of running with AD transport solver.
Use the parameter 'transport_solver_type' to choose between 'reorder',
'implicit' and 'ad' (the new one).
2013-05-06 23:45:05 +02:00
Atgeirr Flø Rasmussen 9cc6ca368b Added simulator class that can use AD transport solver.
This is based on a copy of SimulatorIncompTwophase, and should be refactored.
2013-05-06 23:41:41 +02:00
Atgeirr Flø Rasmussen faad6157ec Created transport solver using AD.
Only two-phase incompressible so far.
2013-05-06 23:41:04 +02:00
Bård Skaflestad 0058e34aec printSparseMatrix(): Use InnerIterator rather than index
This way, we're (slightly) more agnostic to the inner storage scheme.
2013-05-06 14:09:48 +02:00
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 ea993f6647 Tighten tolerance for better fit with sim_simple.cpp. 2013-05-06 13:27:48 +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
Atgeirr Flø Rasmussen 60b8e8c40d Merge remote-tracking branch 'bska/master' 2013-05-06 09:49:00 +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
Atgeirr Flø Rasmussen e59e5cc5f2 Unfinished version of Armadillo-using AD class added. 2013-05-06 09:43:26 +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 fc5a3f181e Use S_o=1 as initial condition.
This is the case in 'sim_simple.cpp', too.
2013-05-03 20:28:36 +02:00
Bård Skaflestad 9b65338461 Add MRST function for 'sim_simple' development 2013-05-03 20:21:37 +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 bd240a31cb Declare operator?() as 'const'.
None of operator+(), operator-(), operator*() or operator/() modify
their object.  These methods are thus naturally declared as 'const'.
2013-05-03 16:24:20 +02:00
Bård Skaflestad 0a43fe68dd Complete Addition tests. 2013-05-03 12:53:51 +02:00