Commit Graph

254 Commits

Author SHA1 Message Date
Andreas Lauser
e21f0b964e threshold pressures: take advantage of the fact that opm-parser handles them symmetrically
i.e., thpres->hasRegionBarrier(i, j) == thpres->hasRegionBarrier(j, i)

this allows to simplify the code a bit.
2016-09-26 16:42:43 +02:00
Andreas Lauser
97eda5bb55 ECL threshold pressure: fix stupid copy and pasto
(in the code which calculates the default threshold pressure.)
2016-09-26 16:42:43 +02:00
Andreas Lauser
14418092e1 ebos: make the porosity handling more general
i.e., it now uses the PORV grid property from opm-parser and does the
accumulation of the disabled cells manually. This patch should be
equivalent to the opm-simulators PR #806
( https://github.com/OPM/opm-simulators/pull/806 ).
2016-09-07 15:16:03 +02:00
Joakim Hove
118a701575 shared_ptr<EclipseGrid> -> const EclipseGrid& 2016-08-31 19:47:37 +02:00
Andreas Lauser
5b81aab882 Revert "implement MINPV treatment"
that approach seems to be incorrect:

https://github.com/OPM/opm-simulators/issues/785
2016-08-09 14:24:56 +02:00
Andreas Lauser
5fab3f09dd ebos: fix some build breakage
as usual, this was caused by some pointer-to-reference changes in opm-parser.
2016-08-09 12:45:03 +02:00
Andreas Lauser
e8b460fe10 implement MINPV treatment
this is done my modifying the NTG values. it is just a
straight-forward port of the corresponding functionality from
opm-simulators.
2016-08-09 12:45:03 +02:00
Pål Grønås Drange
461f3bba1a Reflect changes in parser api, removed shared_ptr 2016-08-09 08:33:06 +02:00
Andreas Lauser
6e9b13ad5a ebos: use grid.cellCenterDepth() instead of the Z coordinate of the centroid
grid.cellCenterDepth() is the average of the Z-coordinates of the
element vertices which, for distorted elements, is slightly different
from the depth of the centroid.

IMO this is conceptually a change for the worse, but ECL likes to do a
lot of things inconsistently, so let's budge.
2016-08-08 20:05:29 +02:00
Andreas Lauser
679651bca1 ebos: add accessor methods to the non-constant deck and eclipseState
these are required by fun things like applyModifierDeck().
2016-08-08 19:25:38 +02:00
Andreas Lauser
22ecf54d41 EclTransmissibility: reduce division-by-zero cutoff to 10^-30
transmissibilities of 10^-20 can occur in real decks. (i.e., Norne;
although the face which belongs to the transmissibility is tiny it
nonetheless affects convergence for some reason.)
2016-08-02 17:18:20 +02:00
Andreas Lauser
64a2c9df51 EclProblem: simplify the saturation hysteresis and VAPPARS handling
now it is always updated at the beginning of an episode. the reason
why this works is that both features do not affect the value of the
residual for the initial solution but only its derivatives. (if
something affects the values of some quantities which are needed to
calculate some parameters, then the first update needs to happen right
after the initial solution is applied and *before* the parameter is
determined.)
2016-08-02 16:01:29 +02:00
Andreas Lauser
c12eff0986 ebos: improve the upwinding code slightly
instead of falling back the global indices of the involved DOFs, use
the DOF which has the larger volume associated to it before.
2016-08-02 13:45:52 +02:00
Andreas Lauser
4334c6df58 EclTransmissibility: remove a version check for GCC < 4.8
This is not required anymore because the minimum GCC version which we
assume is GCC 4.8. (or, alternatively, any compiler with full C++-2011
support.)
2016-07-15 16:01:11 +02:00
Andreas Lauser
f818c8a2ec ebos: increase the maximum number of Newton iterations to 14
10 is a bit too little: the first time step of SPE9_CP now needs 13
iterations to converge. (before the transmissibility change of the
previous commit it was 8 iterations IIRC.)
2016-07-15 15:32:28 +02:00
Andreas Lauser
09cbc253f5 EclTransmissibility: calculate them like flow does
this may not be the nicest way to calculate transmissibilities
(because the coordinate of the cell center can be located outside of
the cell) but at least the results are the same as the ones obtained
by flow on Norne.
2016-07-15 15:32:19 +02:00
Andreas Lauser
3f9970cc2a ebos: implement support for the VAPPARS keyword 2016-07-06 14:56:25 +02:00
Andreas Lauser
57372d5fab ebos: only update the hysteresis parameters at the end of episodes
updating them at the end of each time step may make more sense from a
physical POV, but flow updates it only after each report step, so
let's do the same...
2016-06-29 17:47:52 +02:00
Arne Morten Kvarving
c0b07f6083 fixed: restore build of ebos after opm-parser changes
the WellConstPtr typedef is gone
2016-06-28 13:53:36 +02:00
Andreas Lauser
deff4aab74 ebos: determine the upstream degree of freedom consistently
before, if the pressure gradient was zero the interior DOF was assumed
to be the upstream one. On the other side of the face it was done the
same which meant that the upstream cell was different depending on
which cell was looked at. This did not have any effect on the value of
the flux (because the pressure gradient was zero anyway), but when AD
was used this resulted in non-symmetric derivatives. In principle this
is okay because the point where the pressure difference between cells
is zero is a kink and thus the flux derivatives there are
undefined. In practice this made comparing with flow quite difficult,
so let's change it...
2016-06-14 11:28:55 +02:00
Andreas Lauser
4f539c0d4d ebos: make it possible to disable the debug-mode conservativeness check
this check produces some output on the terminal which may be
undesireable in some cases (i.e., flow_ebos).
2016-06-07 18:21:14 +02:00
Andreas Lauser
98cfa30f92 ebos: allow to completely disable the well treatment
this is useful if wells shall be handled externally (e.g. most
prominently the upcoming flow wrapper which uses ebos to linearize the
mass balance equations).

disabling the well treatment can be done by setting the DisableWells
property to "true".
2016-06-07 17:43:45 +02:00
Andreas Lauser
f0161dc1c9 rename MathToolbox::toLhs() to MathToolbox::decay() 2016-06-04 23:56:47 +02:00
Andreas Lauser
c6b402f7b7 rename "local AD" to "dense AD" 2016-06-04 23:56:47 +02:00
Pål Grønås Drange
4539a069b4 Using getInputGrid API from Parser 2016-04-19 17:04:42 +02:00
Andreas Lauser
8c85ccb268 adapt to the removal of the tags for local-AD evaluations 2016-04-16 23:23:44 +02:00
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