Commit Graph

678 Commits

Author SHA1 Message Date
Andreas Lauser
c67169ebd3 improve the doxygen documentation
the module hierarchy should now even be mildly useful.
2015-06-19 13:20:19 +02:00
Andreas Lauser
b974549f05 re-add the emacs and vim modelines to all source files
this makes things easier and IMHO these two lines do not cause any
disturbance.
2015-06-18 13:43:59 +02:00
Andreas Lauser
aab270e5b5 ebos: get rid of some Dune 2.4 deprecation warnings
they haven't been noticed yet because CpGrid does not feature them.
2015-06-14 21:35:02 +02:00
Andreas Lauser
c41f642414 ebos: use automatic differentiation instead of finite differences 2015-05-21 16:18:47 +02:00
Andreas Lauser
2428ff41ae make ebos AD aware 2015-05-21 16:18:45 +02:00
Andreas Lauser
eba7e06bed use the infrastructural code using its new locations 2015-04-28 13:38:28 +02:00
Andreas Lauser
12dc2c6447 ebos: fix the restart mechanism 2015-04-08 14:25:23 +02:00
Andreas Lauser
cc76f3bedc fix annoying sign comparison warnings 2015-04-02 12:13:39 +02:00
Andreas Lauser
b0ffc1f573 ecl problem: determine whether the simulation is finished in endEpisode()
it used to be in beginEpisode(), but this caused endEpisode() to be
called twice at the end of the simulation.
2015-04-01 14:33:54 +02:00
Andreas Lauser
15ad669d5d ebos: make linearization recycling potentially useful
the missing piece was determining if the wells have changed between
report steps. This patch adds a simple way to determine this, but it
relies on low-level properties of opm-parser it does not
guarantee. (concretely, these details are that the same well objects
are returned in the same order if nothing changes. Since IMO this is a
pretty reasonable assumption, we use this approach instead of a more
complicated one until opm-parser provides a "change determination API"
for wells...)

note that this patch may increase the number of iterations required
for the simulation because the linear system of equations which is
solved in the first iteration of a time step actually corresponds to
the second to last solution of the previous time step. This means that
that linearization recycling usually only works well if the tolerance
of the Newton-Raphson solver is "sufficiently" low. ("sufficiently"
means that the linearization errors made due to using the "wrong"
solution for the first iteration can be neglected compared to the
differences because of the change of the solution in this iteration.)

therefore, use this feature at your own risk...
2015-04-01 14:18:41 +02:00
Andreas Lauser
a6740b83ee ebos: disable partial relinearization by default again
it often causes quite substantial headaches but does unfortunately not
normally lead to a substantial speedup. (at least not in its current
incarnation.)
2015-03-05 14:46:18 +01:00
Andreas Lauser
909a045261 simulator, ebos: fix episode handling with a focus on deserialization
in particular, the ECL schedule is now used to determine the episode
length on restart. this code is still quite shaky IMO, although it
seems to work for now.
2015-03-05 14:45:31 +01:00
Andreas Lauser
7e89de026a ebos: make it possible write restart files
this means eWoms restart files (*.ers), not Eclipse (*.UNRST) ones. by
default, the restart file writing interval is once every 2^24-1
timesteps, i.e. it is effectively disabled. The interval is settable
using the '--restart-writing-interval=$N" command line parameter,
though.
2015-03-04 16:13:12 +01:00
Andreas Lauser
df12c481c3 ebos: implement support for the PORV keyword 2015-02-13 14:01:07 +01:00
Andreas Lauser
7a729e73ac ECL peaceman well: replace std::unordered_map by std::map
say 99.95% of all time: premature optimization is the root of all
evil.

in this case it turned out that iterating over a std::unordered_map is
very slow and that this is a quite common operation in
ebos. Fortunately the fix for this problem is very simple: use the
tree-based std::map instead of the hash function based
std::unordered_map.

on SPE9 this yielded a performance improvement of about 10% on my
machine...
2015-02-12 12:26:03 +01:00
Andreas Lauser
a28affc2cf ebos: hack around opm-parser's shitty default handling once more
*arg*
2015-02-12 12:09:46 +01:00
Andreas Lauser
a128ee223a ebos: take capillary pressure into account for the initial condition
strangely enough, this leads to slightly worse convergence for SPE9 on
my machine (19.0 vs. 16.8 seconds runtime). Nevertheless this is
definitely "more correct" from a physical point of view.
2015-02-11 17:02:51 +01:00
Andreas Lauser
d6aeda60e9 black oil model: implement vaporized oil
and also allow the oil phase to be immiscible with gas.
2015-02-11 16:55:38 +01:00
Andreas Lauser
e69cd50d42 fix partial relinearization if auxiliary equations are present
this allows to re-enable it by default for ebos.
2015-02-06 13:49:53 +01:00
Andreas Lauser
2516d89349 ECL summary files: write out production and injection totals 2015-02-05 17:38:21 +01:00
Andreas Lauser
48b4e4ccc5 ebos: disable writing restart files
this means eWoms specific .ers files, Eclipse restart files are still
written for visualization purposes.
2015-02-05 16:14:07 +01:00
Andreas Lauser
d83cd2b797 ebos: use the TEMPI keyword to set the temperatures of the cells
this allows to use a "pseudo thermal" simulator, i.e. each cell may
exhibit a different temperature, but energy is not conserved over
time...
2015-02-05 16:14:07 +01:00
Andreas Lauser
a320dd0fa7 adapt to the new PVT API of the black oil fluid system 2015-02-05 16:14:07 +01:00
Andreas Lauser
c7fe719825 adapt to the recent removal of Well::getRefDepthDefaulted() in opm-parser 2015-01-27 22:40:49 +01:00
Andreas Lauser
0e973f7108 ECL transmissibility: implement region multipliers
a.k.a. support the MULTREGT keyword. This has not really been tested
and may contain bugs...
2015-01-27 13:17:01 +01:00
Andreas Lauser
019c272a11 ECL grid manager: make the cartesianCellId() method take an integer and return one
the fact that this is implemented via a std::vector<int> is an
implementation detail which should not be visible to the outside of
this class.
2015-01-27 13:15:06 +01:00
Andreas Lauser
a720a322c3 Revert "rename {gil,gas}FormationVolumeFactor to \1FormationFactor"
This reverts commit 3e247b059f20b1d04f47bd832719a99df8b9ac26. After a
more thorough investigation, the cannonical name of these quantities
turned out to be "* formation volume factor"...
2015-01-26 11:55:37 +01:00
Andreas Lauser
43bf27e1a1 rename {gil,gas}FormationVolumeFactor to \1FormationFactor
this is the eWoms part of the rename...
2015-01-25 18:22:42 +01:00
Andreas Lauser
e09b026551 ECL output: use the same units as the input deck for ECL output
this makes it possible to compare ECL restart and summary files
produced by ebos directly with the ones stemming from Eclips. (But be
aware that VTK output files from ebos are still all-SI!)
2015-01-25 17:54:11 +01:00
Andreas Lauser
c651c2f4ce ebos: disable partial relinearization and linearization recycling by default
in particular, the partial relinearization seems to cause some _very_
weird effects. (the results differ very significantly for SPE1.) I
still have to investigate why, but I suspect that this is caused by
the fluid system being not continuously differentiable (it's piecewise
linear).
2015-01-21 15:56:09 +01:00
Andreas Lauser
597bd22b9a set the PVT region index inside the problem's initial() method
also, do not touch the region index in scalar assignments for black
oil primary variable objects. the first change is required by because
assignMassConservative() accesses the region index and the second
because scalar assignments should not modify the PVT region of the
primary variables. found by clang's ASAN.
2015-01-21 15:56:09 +01:00
Andreas Lauser
a4f1aa95cc ebos/black oil model: make the restart work
only the restart from ERS files, using ECL restart files (i.e.,
*.UNRST) is still unsupported (but should not be much work).
2015-01-21 15:56:08 +01:00
Andreas Lauser
c4f169e01e ECL peaceman well: use the grid to get an initial estimate of the BHP
more concretely, we now use the pressure of an arbitrary phase of an
arbitrary DOF contained in the well.
2015-01-21 15:56:08 +01:00
Andreas Lauser
be3772e351 black oil primary variables: add an assignMassConservative() method
and use it in ebos...
2015-01-21 15:56:08 +01:00
Andreas Lauser
0baa3f23a7 ECL peaceman well: reduce the epsilon value used to calculate the bottom hole pressure 2015-01-21 15:56:08 +01:00
Andreas Lauser
85af98dd95 ECL peaceman well: also use the replacement DOF variables to convert reservoir to surface rates 2015-01-21 15:56:08 +01:00
Andreas Lauser
3e46640b78 ECL problem: also set the gravity vector to zero if the "EnableGravity" parameter is false
although it worked for the reservoir itself, this has some effect on
the wells (which retrieve the gravity potential from the problem).
2015-01-21 15:56:08 +01:00
Andreas Lauser
5bbaba68f7 ECL problem: fix incorrect calculation of the initial gas mass fraction in oil
once uppon a time I had an incorrect definition of the Rs factor in
mind. this was an artifact from that time...
2015-01-21 15:56:08 +01:00
Andreas Lauser
e7a80216e8 ECL peaceman well: fix sign error in gravity correction 2015-01-21 15:56:08 +01:00
Andreas Lauser
1233e12e76 ECL peaceman well: use the reservoir cell's phase density for injected fluids
(instead of calculating it from the hole pressure. this seems "less
correct" but the way Eclipse does things...)
2015-01-21 15:56:08 +01:00
Andreas Lauser
a9e40ce36a ECL peaceman well: retrieve the gravity constant from the problem
this makes things consistent if gravity is disabled...
2015-01-21 15:56:08 +01:00
Andreas Lauser
deb10b7524 ECL peaceman well: don't do manual updates of the DOF variables
use the update() method instead. Also, add an updateBeginTimestep()
method to the DOF variables which only need to be updated once per
timestep...
2015-01-21 15:56:08 +01:00
Andreas Lauser
6c881ab88f simulator: another bug in the episode handling
this time it was caused by the fact that the episodeStartTime_ is
defined as the time which was elapsed from the beginning of the
simulation instead of the posix time which the simulation currently
looks at...
2015-01-21 15:56:08 +01:00
Andreas Lauser
11b77029cf ECL peaceman well: rename "bottom depth" to "reference depth"
this is because the "bottom hole pressure" by default is the the
presssure at the center of the _topmost_ cell penetrated by the
well. (The terminology keeps getting more weird the longer you look at
it.)

this patch also changes the default way to calculate the reference
depth from the center of the deepest to the center of the highest cell
and makes the reference depth settable in the deck.
2015-01-21 15:56:08 +01:00
Andreas Lauser
006a3324b2 fix a dune 2.4 deprecation warning
this only occured in debugmode...
2015-01-21 15:56:08 +01:00
Andreas Lauser
440a2f9496 some bikeshedding to make the new code more consistent with the existing one
i.e., where to put spaces, where to put new lines and using identation
width 4.
2015-01-21 15:56:08 +01:00
Andreas Lauser
a8b093e372 cache the remaining element iterator dereferences
they were forgotten in a place or two. With this, ebos' performance
using ALUGrid is comparable to its performance using a "raw"
Dune::CpGrid.

(also, make the naming of the local variable for the element more
consistent, i.e., replace 'entity' by 'elem' for the few places where
'entity' was used.)
2015-01-21 15:56:07 +01:00
Robert K
2cfe491008 EclGridManager: implement getIJK method here to make Cartesian identification complete. 2015-01-20 13:19:50 +01:00
Robert K
779e7736d1 EclSimulator: make compile with dune-alugrid. For that reason the Cartesian cell id has
been moved to the grid manager class.
2015-01-20 12:20:26 +01:00
Andreas Lauser
83f335077a make the ECL transmissibility flux module work on GCC 4.4
dejavu! (Also, fix a sign comparison warning on GCC 4.4.)
2015-01-06 12:40:30 +01:00