Commit Graph

678 Commits

Author SHA1 Message Date
Andreas Lauser
eeecdf8438 adapt for the fact that field vectors of scalars cannot be assigned to field vectors of Evaluations anymore
the reason why this is needed now probably is because
std::is_convertible<Scalar, Evaluation> is false. While strictly
speaking, scalars can be converted to Evaluations by assuming them to
be evaluations of the constant function, this patch is IMO beneficial
anyway because it makes such conversions more visible.
2016-04-15 18:44:14 +02:00
Andreas Lauser
f7f2c1b89d adapt the grid manager classes to the new opm-parser grid property API 2016-04-13 11:00:14 +02:00
Pål Grønås Drange
03efc2a60f Using new EclipseState API 2016-04-12 17:32:30 +02:00
Andreas Lauser
ac1b918799 ebos: fix GCC sign comparison warning in debug mode 2016-04-11 15:01:31 +02:00
Atgeirr Flø Rasmussen
b5951a6ec7 Renaming dune-cornerpoint -> opm-grid. 2016-04-04 21:20:50 +02:00
Andreas Lauser
dd1c6c61fb ebos: use the correct min() function in the well residual
i.e., the method provided by the MathToolbox for the evaluation, not
std::min(). I wonder why this even compiled (and more surprisingly:
worked).
2016-03-30 11:15:11 +02:00
Andreas Lauser
4360201416 ebos: fix build breakage due to an opm-core API change
the BlackoilState class removed the init() method and now expects the
arguments for this method for the constructor...
2016-03-30 11:12:52 +02:00
Andreas Lauser
cf143f3740 ebos: regard wells which do not penetrate any active cells as shut
this happens for example in the Norne deck from opm-data.
2016-03-29 22:22:14 +02:00
Andreas Lauser
e769c2768c clean up the licensing preable of source files
the in-file lists of authors has been removed in favor of a global
list of authors in the LICENSE file. this is done because (a)
maintaining a list of authors at the beginning of a file is a major
pain in the a**, (b) the list of authors was not accurate in about 85%
of all cases where more than one person was involved and (c) this list
is not legally binding in any way (the copyright is at the person who
authored a given change, if these lists had any legal relevance, one
could "aquire" the copyright of the module by forking it and removing
the lists...)

the only exception of this is the eWoms fork of dune-istl's solvers.hh
file. This is beneficial because the authors of that file do not
appear in the global list. Further, carrying the fork of that file is
required because we would like to use a reasonable convergence
criterion for the linear solver. (the solvers from dune-istl do
neither support user-defined convergence criteria not do the
developers want support for it. (my patch was rejected a few years
ago.))
2016-03-17 13:20:20 +01:00
Liu Ming
bc7180eb8d rename ParseMode as ParseContext. 2016-03-17 09:08:50 +08:00
Andreas Lauser
e45bbc46b1 EclWellManager: add forgotten newline to warning 2016-03-07 17:14:08 +01:00
Andreas Lauser
a94d22c69e EclPeacmanWell: only calculate the well residual after shut wells have been dealt with
that's because the right hand side of shut wells is supposed to be
zero.
2016-03-07 17:10:35 +01:00
Andreas Lauser
d7b5075420 EclPeacemanWell: fix typo
*grr*, that was an unnecessary one. (on the positive side, it did not
affect the results.)
2016-03-03 18:09:47 +01:00
Andreas Lauser
86daf25aa6 ebos: slightly improve the transmissibility calculation 2016-03-02 13:25:38 +01:00
Andreas Lauser
567adcab6f remove support for Dune 2.2
this has slowly become a hassle to support (i.e., it cluttered the
source with many #if's and in particularly the code was not tested
with Dune 2.2 on a regular basis). Also, Dune 2.3 has been out since
more than two years, so IMO it is not asked too much to ask people who
want to use the latest and greatest version of ewoms to upgrade their
Dune.
2016-02-28 00:36:08 +01:00
Andreas Lauser
578ba56c79 ebos: calculate the active cells based on the simulation grid
... instead of the EclipseGrid object returned by opm-parser. This is
required because the nice grids of dune-cornerpoint sometimes decide
to deactivate a grid cell on their own (e.g. because of the MINPV or
the PINCH keywords).
2016-02-26 19:11:05 +01:00
Andreas Lauser
bf7a437a2a ebos: tune the defaults of the high-level NewtonMethod parameters
the intention is to abort more quickly if a time step is not going to
succeed and also to prevent the time step size to grow too quickly
again after it was reduced. Note that these parameters this patch only
changes the defaults, i.e., these paramters can still be specified at
runtime.
2016-02-26 16:09:21 +01:00
Andreas Lauser
9306e6a742 ebos: set the default for the maximum allowed Newton error to 0.1 kg/(m^3 s)
this should help to prevent wasting CPU cycles on time steps that most
likely won't succeed anyway.
2016-02-26 15:34:29 +01:00
Andreas Lauser
f5d256cbe9 ebos: minor changes to the EclWellManager
the only non-cosmetic change is the reduction of the magnitude of the
tubing head pressure from 10^100 to 10^30. this does not matter
normally, but if single precision floating point values are used
10^100 cannot be represented by such variables (and also 10^30 is
large enough by a fair margin: I doubt that one ever wants to simulate
the conditions in the core of a star using this code.)
2016-02-26 15:03:41 +01:00
Andreas Lauser
8da01a317d ebos: linearize the auxiliary equations for shut wells correctly
before this, a zero matrix was produced on the main diagonal which
(rightfully) caused the linear solver to bail out. Now, the linearized
equation is still rubbish, but it is not singular anymore and the
result for shut wells is not used anywhere in the first place...
2016-02-26 15:00:30 +01:00
Andreas Lauser
2bf24ca74b ebos: treat wells with an undefined control mode as shut
this happens in Norne...
2016-02-26 14:59:38 +01:00
Andreas Lauser
95334957e0 EclWellManager: replace the manual well event detection by the one of opm-parser
to my defense I can say that the Schedule::events() API was not
present in opm-parser when the EclWellManager needed this. (I think it
wasn't available back then, maybe I just was not aware of it.)
2016-02-26 14:56:53 +01:00
Andreas Lauser
1b3df8cb35 ebos: fix GCC sign comparison warnings in threshold pressure code 2016-02-25 17:30:05 +01:00
Andreas Lauser
34d0184f7d fix the threshold pressure implementation
before the variable for threshold pressure is used, it should be
initialized!
2016-02-25 15:56:30 +01:00
Andreas Lauser
0012aac5bd ebos: avoid potential division by zero in transmissibility calculation
in practice this could happen if the NTG value for a cell is set to zero.
2016-02-25 12:50:59 +01:00
Andreas Lauser
704389d14f ebos: use the Opm::TransMult class to determine the transmissibility multipliers
this takes care of atrocities like the MULTFLT keyword...
2016-02-25 11:55:27 +01:00
Andreas Lauser
b3359206b5 ebos: fix a active vs cartesian cell index in the transmissibility code
ouch, that was a major fauxpas!
2016-02-24 16:11:14 +01:00
Andreas Lauser
81e285e306 ebos: fix the headercheck
most of this stuff broke because of OPM/opm-parser#677
2016-02-22 18:43:13 +01:00
Andreas Lauser
cc0a560d97 ebos: implement threshold pressures
the implementation also supports to calculate the threshold pressures
based on the initial condition (and it should work even for
MPI-parallel runs).
2016-02-22 18:43:04 +01:00
Andreas Lauser
a68337967f fix a bunch of deprecation warnings caused by OPM/opm-parser#687 2016-02-19 23:30:57 +01:00
Andreas Lauser
9bbd4550cb ebos: re-enable handling the PORV keyword
after OPM/opm-parser#687 has been merged, it is no longer "drive-by
created" by the ECL grid manager.
2016-02-19 23:27:53 +01:00
Andreas Lauser
7f878bcadf ebos: fix build
once again it was broken by a change in opm-parser for which the
original authors not care to fix the mess they caused in ewoms. this
time the culprit was OPM/opm-parser#677.
2016-02-19 21:59:59 +01:00
Andreas Lauser
4a54e93554 EclEquilInitializer: hack to pass through the effects of SWATINIT
the emphasis of this is on *hack*: in the long run, the opm-core
equilibration code should be replaced by something cleaner and more
versatile...
2016-02-17 18:51:43 +01:00
Andreas Lauser
dd3bf51262 ignore the PORV grid property
this is required because that property is "drive-by created" when
initializing the grid and the code in opm-autodiff ignores it. (and is
slightly inconsistent with what opm-parser does...)
2016-02-14 23:47:49 +01:00
Andreas Lauser
a235321076 ebos: mark the intensive quantity cache after a time step as invalid
only if hysteresis is enabled. This is necessary because after the
hysteresis update the same primary variables will result in a (usually
only slightly) different thermodynamic state than before the update.
2016-02-11 16:34:51 +01:00
Andreas Lauser
f992372341 EclPeacemanWell: use AD to calculate the rate equivalent BHP 2016-02-02 14:53:23 +01:00
Andreas Lauser
a0d6e9ab91 improve the stencil API, clean up the output writing code and increase openMP usage
the stencil can now be updated only for the primary degrees of freedom
and output modules can specify that they do not need extensive
quantities (which allows to speed up the writing code if none require
them.)

Also, all loops over the grid are now threaded (or rather, are
supposed to be), so openMP should be better utilized during the
linearization stage.
2016-02-01 17:25:23 +01:00
Andreas Lauser
ffe6c4ac7c Merge pull request #47 from andlaus/blackoil_improvements
adapt to the recent API changes in opm-material
2016-02-01 13:39:09 +01:00
Andreas Lauser
016768febc once more fix the build after opm-parser changes
this time, opm-parser#661 was the guilty guy...
2016-01-29 19:24:44 +01:00
Andreas Lauser
d1488f5252 adapt to the recent API changes in opm-material
the change for the inverse formation volume factors (instead of the
FVFs) is needed to keep the build happy, using the new
getRv_()/getRs_() infrastructure might slightly improve
performance. (the emphasis is *slightly* because it only changes
something if BlackOilFluidState is used for initialization and
initialization is not time critical in the first place.)
2016-01-29 11:57:41 +01:00
Andreas Lauser
c29780856f ebos: abort the program correctly in the parallel case
all processes must be aborted, whilst the error message should only be
printed once. Also, calling std::exit(1) results in "nicer" output (at
least on openMPI) because mpirun does not try to print a stack trace
for every process.
2016-01-24 18:17:22 +01:00
Andreas Lauser
003983cc87 ebos: notify the user about parallelism and Dune::CpGrid in a better way
now, we abort at run time if the user tries to use with Dune::CpGrid
in parallel simulations. The advantages are that during build there
will be no warning anymore (before the warning was printed at compile
time regardless of which grid was actually chosen), and that such
simulations cannot be started with more than a single process (before
they started just fine, but they did not work properly).

This code should be removed as soon as "Dune::CpGrid" gets its act
together and fixes the bug in the loadBalance() method.
2016-01-23 13:08:20 +01:00
Andreas Lauser
4d5d3491c0 fix the headercheck 2016-01-21 13:24:24 +01:00
Andreas Lauser
84192769a6 ebos: fix build breakage due to opm-parser#656 2016-01-21 12:51:12 +01:00
Andreas Lauser
2b43f5bb12 fix the headercheck 2016-01-17 21:15:27 +01:00
Andreas Lauser
195e6058f1 EclCpGridManager: disable parallelism (for now)
this is because the loadBalance() method of Dune::CpGrid is seriously
broken at the moment: it throws away elements even in sequential mode
for some more relevant grids. ("more relevant" == "Norne". Norne is is
buggy itself because it features two completely disjoint parts.)

but it is even worse than that: if the bug mentioned above bites,
Dune::CpGrid cannot even agree for itself how many elements it has
which causes the CartesianIndexMapper to segfault.
2016-01-17 21:15:23 +01:00
Andreas Lauser
879e8a613d make all tests and ebos compile when selecting float or quad as Scalar
at least, they compile as far as eWoms is concerned. Some external
libraries (in particular everything which uses SuperLU) still have
issues.

Also, there seem to be issues with the precision that is achievable
by the Newton method when using float.
2016-01-17 21:15:21 +01:00
Andreas Lauser
99a59c021f ebos: introduce a mapper from compressed to cartesian cell indices of the EQUIL grid
this is because the nice opm-core code which does the equil
initialization cannot cope with parallel grids and thus needs to get
a special treatment.
2016-01-17 21:15:18 +01:00
Andreas Lauser
8fc838cff3 VTK output modules: make the processElement() method a dummy if the VTK output is disabled
an interesting side effect is that the Newton convergence output is
only defined if the VTK output is enabled.

Also, this patch could be implemented more efficiently by retrieving
the EnableVtkOutput only once per output module (instead of once per
element).
2016-01-17 21:15:12 +01:00
Robert Kloefkorn
073f14ef3d merged from master. 2016-01-06 16:22:09 -07:00