Commit Graph

165 Commits

Author SHA1 Message Date
Andreas Lauser
0fc485e7ff ECL peaceman well: improve handling of multiple PVT regions
this class may still be not fully aware of PVT regions.
2016-01-05 11:54:27 +01:00
Andreas Lauser
2f741214d4 ECL restart file output: rename 'regionIdx' to 'pvtRegionIdx' 2016-01-05 11:54:26 +01:00
Andreas Lauser
2c8e1da7f3 ECL peaceman well: throw an exception if the BHP cannot determined
this used to be an assert(), but it is not a programmer error but
something which can happen during valid simulation runs.
2016-01-05 11:54:26 +01:00
Andreas Lauser
c44ad1ca3c ECL problem: some stylistic improvement
and a tiny bit of better performance since the rate vector of the
source term is only reset once.
2016-01-05 11:54:26 +01:00
Andreas Lauser
898940730e remove partial relinarization
the reasons are the same as for removing linearization recycling but
more so.
2016-01-05 11:54:26 +01:00
Andreas Lauser
f9b97334e4 remove the linearization recycling
linearization recycling lead to more complex code and -- more
importantly -- frequently caused problems for simulators.
2016-01-05 11:54:26 +01:00
Andreas Lauser
0cbc6839f2 adapt to the recent blackoil API changes of opm-material 2016-01-04 15:32:55 +01:00
Andreas Lauser
8272ec5528 ebos: enable the new cache for the storage term by default
on my machine, this accelerates the linearization by about 30% for
SPE9 (6.4 instead of 8.7 seconds).
2015-11-27 16:56:38 +01:00
Andreas Lauser
aaecf3ee33 remove an unneded Toolbox::value()
operator>=() is available for Opm::Evaluation, and its efficiency is
the same as explicitly comparing the value. Let's thus remove this to
reduce optical noise.
2015-11-26 16:01:35 +01:00
Andreas Lauser
a63a4f2bdc make most indices unsigned
(instead of using 'int'.) This triggered quite a few compiler warnings
which are also dealt-with by this patch.
2015-11-18 18:09:56 +01:00
Andreas Lauser
bac1a6990d use the same value as opm-{core,autodiff} for the gravity constant
also, make setting this vector more bullet-proof.
2015-11-18 11:49:00 +01:00
Andreas Lauser
4f4e25c25f ebos: do the gravity correction the same way as opm-autodiff
i.e., calculate the pressure which the exterior cell of a face would
exhibit at the depth of the interior one (instead of bringing both to
the depth of the face).

because the average fluid density is used, there should not be a
difference because of this.
2015-11-18 11:49:00 +01:00
Andreas Lauser
1c02969608 do not iterate over all wells on DOFs which are not penetrated by any wells
for large problems with many wells the performance impact of this is
probably even measureable.

Also, this patch makes it possible to access the well manager outside
of the problem. In the normal case, this should be rarely needed, but
it can come in handy for debugging purposes.
2015-11-18 11:33:51 +01:00
Andreas Lauser
55c4bdf417 ebos: use the average phase density for the gravity correction
this does *not* make more sense than using the cell densities, but it
looks like E100 does it that way. (so we do it the same in ebos.)
2015-11-04 13:41:57 +01:00
Andreas Lauser
ce517e5e3d ebos: fix a GCC sign comparison warning 2015-10-29 00:22:09 +01:00
Robert Kloefkorn
2f8aa62db2 EclWellManager: only insert well that are located on the process. Not perfect yet. 2015-10-27 13:04:29 +01:00
Robert Kloefkorn
492c8c74a0 CartesianIndexMapper: fix computation of cartesianCoordinate. 2015-10-27 12:58:47 +01:00
Robert Kloefkorn
a4f761be5e CollectToIORank: collects output data to a given I/O rank. 2015-10-21 17:49:21 +02:00
Robert Kloefkorn
af5cea2add EclEquilInitializer: make it work for ALUGrid. 2015-10-20 17:28:49 +02:00
Andreas Lauser
ca4da50902 use the error macros from opm-common 2015-10-08 11:59:55 +02:00
Andreas Lauser
1d63276cfb ebos: make it compile if ALUGrid is used as grid
the EQUIL init code from opm-core chokes hard if any Dune grid other
than Dune::CpGrid is passed to it. Until opm-core gets its act
together or EQUIL init is properly implemented within eWoms, let's
just disable EQUIL initialization in ebos (and print a warning) if
ALUGrid is used.
2015-10-07 18:52:36 +02:00
Andreas Lauser
dee67a7a94 adapt to the simplifications of the blackoil PVT API in opm-material 2015-09-29 14:47:23 +02:00
Andreas Lauser
a28b2bcd76 ebos: make sure that the initial well condition is only written to the summary file once
before, it could have been written multiple times if the first time
step of the simulation failed and the timestep was repeated with a
smaller step size.
2015-09-22 13:23:39 +02:00
Andreas Lauser
e77cad793b re-order the attributes of EclPeacemanWell and init them in the ctor
re-ordering the attributes avoids some padding for EclPeacemanWell
objects and -- more importantly -- makes their ordering slightly more
logical.

initializing them avoids a valgrind complaint when writing the initial
condition to the ECL summary file.
2015-09-22 13:20:42 +02:00
Robert Kloefkorn
324b764a96 EclEquilInitializer: adjust to BlackoilPropertiesFromDeck changes from opm-core. 2015-09-17 12:47:31 +02:00
Robert Kloefkorn
f6b3bbc386 CartesianIndexMapper: use the CartesianIndexMapper to applied the mapping from the
Cartesian coordinate to the flat index and vice versa.
2015-09-10 16:01:53 +02:00
Andreas Lauser
58aeddf431 ebos: write the ECL summary for the initial condition and shift all consecutive report steps
this brings the SPE1 and SPE9 graphs quite a bit closer to those of flow/eclipse.
2015-09-10 15:37:28 +02:00
Andreas Lauser
d82f5be347 ebos: allow initial time step sizes shorter than the initial episode size 2015-09-07 14:05:03 +02:00
Andreas Lauser
53b48b2838 black-oil: fix some stupid errors with vaporized oil
obviously if the switching variable is interpreted as x_g^O, the gas
phase is present, because in this case it is the only phase. Also,
when the oil phase appears, the gas saturation is 1-Sw, not 1. (the
last issue only happened in the vaporized case because the switch
variable would never get the meaning of "oil component's mole fraction
in the gas phase".)
2015-09-04 14:06:29 +02:00
Andreas Lauser
95c482521a ebos: add support for initialization using the EQUIL keyword
so far, it uses the machinery of opm-core for this.
2015-09-04 14:04:45 +02:00
Andreas Lauser
5ce716f1a8 ebos: fix the fallout of the recent introduction of TableManager 2015-09-03 00:30:19 +02:00
Andreas Lauser
fd26efa140 ebos: adapt to the Cartesian -> compressed cells change of EclMaterialLawManager 2015-08-06 17:03:34 +02:00
Andreas Lauser
48f889d980 fix the calculation of which ROCK region is to be used
the mistake was that I assumed that this was specified by the ROCKTAB
keyword; It is not! (It's specified via PVTNUM or SATNUM depending on
the value of the third item of the ROCKOPTS keyword. for now, let's
only use the PVTNUM.)
2015-07-29 13:41:12 +02:00
Andreas Lauser
8c843dd05b ebos: hook up the ECL hysteresis stuff
this required to add a new callback to the problem which is invoked
when the initial solution has been applied.
2015-07-28 17:24:44 +02:00
Andreas Lauser
cc420cc06d ebos: use opm-material's new and shiny EclMaterialLawManager 2015-07-28 17:24:40 +02:00
Andreas Lauser
93478f1dd5 ebos: do not write the oil saturation pressure by default
some decks use inconsistent PVT data which results in negative saturation
pressure for oil with very little gas. (looking at you, Norne!)
2015-07-03 13:18:50 +02:00
Andreas Lauser
a80ce504b5 EclPeacemanWell: handle shut wells better
if a well is shut and thus no DOFs get added, it should work anyway...
2015-07-03 13:18:50 +02:00
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