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
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
Bård Skaflestad
e4cbc2c7f2
Merge remote-tracking branch 'atgeirr/master'
2013-05-03 11:08:37 +02:00
Bård Skaflestad
4ffea931e3
Add test for addition of ADB::variable()s.
2013-05-03 11:08:06 +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
9e55006229
Implement a custom comparator for Eigen::SparseMatrix<double>
...
Use it to simplify the 'FunctionInitialisation' test.
2013-05-03 10:46:46 +02:00
Bård Skaflestad
6794577301
Add stub test for ADB::operator+()
...
Doesn't actually test anything at the moment.
2013-05-02 18:00:36 +02:00
Bård Skaflestad
49396b6079
Don't include <iostream> in tester.
...
It is not needed and was only added for convenience during test
development.
2013-05-02 15:40:59 +02:00
Bård Skaflestad
b1b245ccab
Don't include <iostream> in public header.
2013-05-02 15:16:48 +02:00
Bård Skaflestad
b6834de662
Don't rely on header pollution to provide <iostream>
2013-05-02 15:16:21 +02:00
Bård Skaflestad
2b5d49bea9
Merge remote-tracking branch 'atgeirr/master'
2013-05-02 14:48:33 +02:00
Bård Skaflestad
e15c389daf
Rename typedef ADV -> ADB to reflect reality.
...
We're working with *Block*s here.
2013-05-02 13:57:05 +02:00
Atgeirr Flø Rasmussen
62e321d069
Moved topological matrix operators into separate struct.
2013-05-02 13:51:03 +02:00