Commit Graph

68 Commits

Author SHA1 Message Date
Andreas Lauser
c1a7dd53f0 rename "top hole pressure" to "tubing head pressure"
"BHP" stands for "bottom hole pressure" so it sounded logical that
"THP" is an acronym for "top hole pressure". It isn't but the quantity
in question is still the pressure which is seen at the top of the
well's bore hole...
2014-12-15 18:09:29 +01:00
Andreas Lauser
a508def86e fix the dune 2.4 deprecation warnings
mainly this boils down to mapper.map(e) -> mapper.index(e)
2014-12-12 14:32:29 +01:00
Andreas Lauser
825e2a1daf fix two new sign comparison warnings
these seem to be only present for older compilers like clang 3.3...
2014-12-08 19:09:05 +01:00
Andreas Lauser
295a1db2d7 ECL problem: use the piecewise linear twophase material parameters
the ones based on Splines are better in principle, but they cause
havoc if two saturations are very close together with the slope of the
values off. this happens e.g. in SWOF in my version of SPE1...
2014-12-08 17:53:18 +01:00
Andreas Lauser
e61094b0aa ECL problem: implement rock compressibility
this makes eWoms match autodiff and Eclipse for SPE-1 if the injector
is disabled. with the injector it gets quite a bit closer, but it does
not yet match. (this is probably not a problem with the wells as
autodiff and eWoms agree that the maximum amount of gas should be
injected all the time and these rates are the same...)
2014-12-04 20:22:00 +01:00
Andreas Lauser
0e4857e94a ebos: increase raw tolerance of the non-linear solver to 1e-4
ECLiPSE and opm-autodiff seem to be in that range of accuracy, too. At
least the number of Newton iterations per time step now matches that
of autodiff quite well...
2014-11-28 13:12:15 +01:00
Andreas Lauser
47eafa47f4 move everything which is ECL specific to applications/ebos
this helps to keep the core blackoil model code lean and mean and it
is also less confusing for newbies because the ECL blackoil simulator
is not a "test" anymore.

in case somebody wonders, "ebos" stands for "&eWoms &Black-&Oil
&Simulator". I picked this name because it is short, a syllable, has
not been taken by anything else (as far as I know) and "descriptive"
names are rare for programs anyway: everyone who does not yet know
about 'git' or 'emacs' and tells me that based on their names they
must be a source-code managment system and an editor gets a crate of
beer sponsored by me!
2014-11-28 13:01:32 +01:00
Andreas Lauser
08c97f478f ECL problem: set the connate water saturation 2014-11-27 18:59:40 +01:00
Andreas Lauser
3c3d3208eb ECL problem: make the code which converts gas to oil saturations a bit easier to read
This code is required in the first place because opm-material always
specifies all parameters in terms of the wetting saturations while the
gas is the non-wetting phase in a gas-oil system.
2014-11-27 18:42:19 +01:00
Andreas Lauser
2fb0b4a7e5 ECL wells: deactivate the well performance output at the end of a time step
it is just deactivated using an always-false condition so it does not
bitrot and can be re-activated quickly. I did not want to completely
remove this code because it is useful for debugging purposes, but for
regular use, it should have been superseeded by the ECL summary output
stuff...
2014-11-25 17:40:13 +01:00
Andreas Lauser
49061f879f write ECL summary files for wells
so far, the units of the values written to disk are always what
Eclipse calls METRIC and the number of supported quantities is
somewhat limited...
2014-11-25 17:03:20 +01:00
Andreas Lauser
138512cac2 some cleanups of the ECL wells code
most importantly, the pressure update by the linear system of
equations is now considered to be mainly a hint for the linear
solver. the peaceman well class thus always calculates the bottom hole
pressure which exactly corresponds to a given state of the grid before
each iteration. (this is because calculating the BHP is really fast
compared to requireing more non-linear iterations.)

also, the well residual is now used for all calculations and has been
simplified a bit.

finally, the wells class now provides more methods which allow to
query its internal state (i.e., surface and reservoir rates, BHP/THP,
rate targets, etc.)
2014-11-25 16:17:49 +01:00
Andreas Lauser
4095b9e511 ECL well model: make it an auxiliary module
i.e., the well equations are now considered in the linearization of
the global system of equations.

TODO: make it work for MPI parallel runs...
2014-11-18 17:51:38 +01:00
Andreas Lauser
2050913aef add the general framework for specifying auxiliary equations.
this does not disrupt the block nature of the linearized matrix
(i.e. Dune::BCRSMatrix is still used), but if the number of auxiliary
equations is smaller than that of the "main" discretization, the
superfluous equations are padded. if the number of additional
equations are larger than that of the equation, additional DOFs are
added.
2014-11-18 17:51:38 +01:00
Andreas Lauser
1d18473404 ECL well model: handle the newish CMODE_UNDEFINED enum values 2014-11-18 17:51:38 +01:00
Andreas Lauser
66abdce594 improve the ECL well model
the biggest change is that it is now based on a new approach: the well
model now always calculates the bottom hole pressure for the full well
when asked for a source term. This change makes it possible to
implement cross flow within wells properly and should also make the
well model physically correct.

Also, the well model now uses the connection transmissibility factor
which makes it possible to use this quantity if it is specified by the
deck...
2014-11-18 17:51:38 +01:00
Andreas Lauser
f6c4efce24 ECL well manager: adapt the well controls/completions before each report step 2014-11-18 17:51:38 +01:00
Andreas Lauser
e98be1d398 ECL: move the grid manager to ewoms/io/
this class is probably useful for problems other than EclProblem and
the EclWellsManager already is at a generic place...
2014-10-06 12:24:17 +02:00
Andreas Lauser
e8a08749f5 adapt the the table related API changes of opm-parser 2014-09-17 13:43:47 +02:00
Andreas Lauser
57460a71b2 I/O: add support to output tensorial quantities
so far, it is only fully implemented for the VTK format. Because Dune
has some deficits in its VTK support for tensors, these quantities are
treated as multiple column vectors. Wake me up when I am older...
2014-08-20 14:14:00 +02:00
Andreas Lauser
446cf3d3d2 fix build on dune 2.2 2014-08-17 17:58:57 +02:00
Andreas Lauser
7009f2288b ECL problem: make it compile with Scalar != double
opm-parser always returns vector<double> as data fields...
2014-08-17 15:12:06 +02:00
Andreas Lauser
a883247e0b wells: slightly optimize it
this is done by only calculating intensive quantities for elements
which actually are pierced by wells. on SPE1 this lead to a
performance improvement of about 2% on my machine. (3.50 vs 3.57
seconds.)
2014-08-14 19:23:07 +02:00
Andreas Lauser
6528a88e90 adapt to the reference pressure != surface pressure change in opm-material 2014-08-12 15:49:47 +02:00
Andreas Lauser
3d3ba3ac30 remove most spurious semicolons
hopefully "most" means "all of them"...
2014-08-11 16:46:09 +02:00
Andreas Lauser
09fe573231 remove unused typedef, constants and enums
most of them anyway...
2014-08-11 14:24:13 +02:00
Andreas Lauser
f37f819779 fix the headercheck 2014-08-11 14:10:35 +02:00
Andreas Lauser
40f2c85a9e ECL peacman well: make it work for MPI parallel simulations
to make this work properly, some bugs in Dune::CpGrid w.r.t. grid
communication need to be fixed before...
2014-08-08 18:30:57 +02:00
Andreas Lauser
bbe665d956 ECL peacman well: restore calculation of the current well rates
this time without looping over the whole grid. the limited rates are
only losely coupled to be the ones used by the actual source terms, so
if the rate limiting code is changed the statistics gathering piece
must also be adapted. This is kind-of sub-optimal because it requires
some code duplication, but the alternative would be _much_ less
performant...
2014-08-07 01:01:38 +02:00
Andreas Lauser
2fc2cabc98 ECL peaceman wells: distinguish between target and observed pressures
... and also print the latter to the console.
2014-08-07 00:00:49 +02:00
Andreas Lauser
4e59104a80 ECL peaceman well: remove some artifact code from the development process
during debugging this was used to make sure that the rate limits are
correct. the issue is that this is slow if many wells are involved
because it uses a full iteration over the grid for each well to
calculate these rates...
2014-08-06 23:58:24 +02:00
Andreas Lauser
6e478f6f18 use finishInit() properly for all problems
this means that all code which could potentially throw an exception is
moved to this method(). (In particular FluidSystem::init() proved
troublesome in the past.) Besides avoiding segmentation the faults
which stem from exceptions thrown in constructors, this also has the
advantage that simulations which spend a noticable amount of time to
initialize stop at the "correct" place, i.e. after the "Finish init of
the problem" message was printed by the simulator...
2014-08-06 16:31:48 +02:00
Andreas Lauser
344d613280 ECL problem: use spline based two-phase material laws
... instead of piece-wise linear ones. This improves convergence rates
slightly.
2014-08-06 13:52:53 +02:00
Andreas Lauser
06501bb851 Black Oil model: implement support for multi-region PVT tables
this requires opm-material commit 12a6d1f
2014-08-05 16:52:52 +02:00
Andreas Lauser
6f9eb5a29c ECL problem: fix "unused variable" warnings for optimized builds 2014-08-05 00:21:18 +02:00
Andreas Lauser
8b6a68f8fd ECL simulator: add a well model based on the Peaceman approach
not yet implemented: group controls, changing well control modes after
a time step. (The latter should be relatively straight-forward.)
2014-08-04 20:29:54 +02:00
Andreas Lauser
9e9a8639ec ECL problem: write the initial solution again
this regressed after time step index of the initial solution was
changed from 0 (actually, this was also 0 for the first time step...)
to -1 in b30af664.
2014-08-04 17:16:48 +02:00
Andreas Lauser
6ab54a1057 ECL problem: set the first time step of the each epsiode to the report step size 2014-07-28 18:26:58 +02:00
Andreas Lauser
db506c78e6 ECL problem: move the code which potentially throws into the finishInit() method
this avoids some segfaults due to half constructed objects if an
exception is thrown on initialization.
2014-07-25 15:31:01 +02:00
Andreas Lauser
2c3ebefc68 adapt to the reworked blackoil fluid system and function tabulation classes
in particular, the density of undersaturated oil is now the one
specified by the PVTO keyword...
2014-07-24 14:59:34 +02:00
Andreas Lauser
fe341d88cf use the checkConservativeness() method in all appropriate test problems
"appropriate" basically means "does not use constraints", as
constraints do not care about the conservation quantities...
2014-07-22 12:41:56 +02:00
Andreas Lauser
7af0060812 ECL problem: fix the episode handling code
now the report steps specified in the deck are adhered to...
2014-07-09 12:03:50 +02:00
Andreas Lauser
a5f13f65b8 ECL problem: fix up calculation of the initial condition 2014-07-08 10:16:29 +02:00
Andreas Lauser
6da90de741 ECL problem: Use Cartesian element indices for more fields from the deck
probably there are still a few missing...
2014-07-08 10:16:17 +02:00
Andreas Lauser
377ed04495 ECL problem: use logically cartesian cell indices to retrieve data from the deck
Before, it only worked if all cells were active. Also, take the NTG
and MULTPV keywords into account and prepare for permeability
multipliers.
2014-07-03 15:13:10 +02:00
Andreas Lauser
f21ed76851 rename "(Volume|Flux)Variables" to "(In|Ex)tensiveQuantities"
"intensive" means that the value of these quantities at a given
spatial location does not depend on any value of the neighboring
intensive quantities. In contrast, "extensive" quantities depend in
the intensive quantities of the environment of the spatial location.

this change is necessary is because the previous nomenclature was very
specific to finite volume discretizations, but the models themselves
were already rather generic. (i.e., "volume variables" are the
intensive quantities of finite volume methods and "flux variables"
are the extensive ones.)
2014-06-24 18:24:09 +02:00
Andreas Lauser
4f5e3a448e ECL problem: Use Opm::EclipseState instead of the raw deck where possible
this means that property modifiers are now automatically supported...
2014-06-04 18:05:12 +02:00
Andreas Lauser
12b1c257d6 ECL problem: fix the episode handling
now the episodes seem to match the report steps...
2014-05-30 13:53:36 +02:00
Andreas Lauser
d852cc0d03 EclipseSolution: make sure that attached keywords are not accidentally deleted 2014-05-30 13:53:36 +02:00
Andreas Lauser
d3d3e05d3a rename the tests/grids folder to tests/data
... since the "grids" in that folder are slowly accumulating
information. (e.g. the ART grid for the fracture mapper and ECLIPSE
decks in the future.)
2014-05-08 15:31:32 +02:00