Commit Graph

1480 Commits

Author SHA1 Message Date
Andreas Lauser
c9067c4bda spline: some fixes to make Spline::intersect() work correctly
most of these issues are fallout from the conversion of the spline
class from a moments (second derivative) based approach to hermite
base functions:

- the second and third derivatives where incorrect, and the third
  derivative was not available in the public interface.
- The unit test did not check the derivatives
- The coefficients for the monomial basis were off by the factors
  stemming from the derivatives
- The intersectIntervall_() method used std::max() instead of
  std::min() at one place and still added the base offset for the x
  values as indicated by Stoer
2013-11-07 15:06:59 +01:00
Atgeirr Flø Rasmussen
86ca995629 Merge pull request #423 from rolk/423_eclbin
Write reservoir state in Eclipse binary format
2013-11-06 02:53:59 -08:00
Kristian Flikka
ed8efaefe1 Replaced include math.h with cmath, and changed from fabs to abs. Fixed an error in the testfile, a filename was wrong 2013-11-04 13:51:32 +01:00
Andreas Lauser
07ed5b4339 use bar instead of Pascal as the unit for the pressure field
Eclipse seems to write bars...
2013-11-01 11:36:06 +01:00
Tor Harald Sandve
b935697838 add missing include directives 2013-11-01 11:36:06 +01:00
Andreas Lauser
f7864acc59 add some rates to the summary output, correct values
it turns out that the values within the WellState are surface volumes,
so they can be used directly once converted to daily rates...
2013-11-01 11:36:06 +01:00
Andreas Lauser
0123c3d700 write out water injection and oil production rates
Currently, it still writes out whatever conservation quantity which is
used by the solver (which is probably the mass of the oil/gas
mixture). TODO: convert these solver rates to "pure oil volume without
gas at the surface" and to "gas volume at the surface" rates.

thanks again to Joakim Hove for the pointers where to start kicking!
2013-11-01 11:36:06 +01:00
Andreas Lauser
a9929508a6 write out the reservoir state to the eclipse binary format
most code was shamelessly ripped from opm-core's EclipseGridParser,
but there are some additions (e.g. grids specified using the D[XYZ]V
Eclipse keywords can be used).

The code is located inside the new class "BlackoilEclipseOutputWriter"
(should probably renamed) and hooked up in
SimulatorFullyImplicitBlackoil and sim_fibo_ad.cc.

Also be aware that, to make this code work properly, the newest master
version of ERT is required (i.e. one which includes commit
5e4e9661720). In this context, I would like to thank Joakim Hove for
his support!
2013-11-01 11:36:06 +01:00
Joakim Hove
9b8e02a621 Added method equals in BlackoilState.hpp 2013-10-28 17:42:32 +01:00
Atgeirr Flø Rasmussen
823cc64c78 Bump version numbers.
Since there are a few new APIs and features, but no major changes,
it seems proper to move from 1.0 to 1.1, even though strict
backward compatibility cannot be expected.

Label bumped to 2013.10.
2013-10-21 13:53:29 +02:00
Bård Skaflestad
ca427092bd Merge pull request #412 from atgeirr/fix-rockcomp
Fix bug in RockCompressibility class.
2013-10-16 05:31:00 -07:00
Atgeirr Flø Rasmussen
d06c8a53d9 Bugfix: vector was used with size zero. 2013-10-16 14:02:15 +02:00
Bård Skaflestad
4ec7c2bc67 Merge pull request #408 from rolk/408_sizet
Use unsigned when iterating through vector indices
2013-10-09 07:15:51 -07:00
Roland Kaufmann
13d145fc1d Use unsigned when iterating through vector indices
A vector can of course never contain a negative number of elements, so
naturally size() returns size_t instead of a regular int. This costs us
a warning unless we also change the loop counter (since it is only used
to index that vector).
2013-10-09 15:09:14 +02:00
Kari B. Skjerve
09e572a15e changes after pull to opm/opm-core 2013-10-09 13:23:24 +02:00
Kari B. Skjerve
97bdba139f Only output NTG if not synthetic 2013-10-08 17:39:42 +02:00
Kari B. Skjerve
d53e06ec7c Changed EclipseGridParser and CornerpointChopper to handle NTG 2013-10-08 16:33:19 +02:00
Atgeirr Flø Rasmussen
0800bd9e33 Modify error message. 2013-10-07 12:57:51 +02:00
Atgeirr Flø Rasmussen
170a1dc956 Guard against erroneous use of initBlackoilSurfvol(). 2013-10-07 12:46:35 +02:00
Atgeirr Flø Rasmussen
83c6d5255b Merge pull request #386 from totto82/propsMRST
Changes to the props in order to  sync with MRST (Eclipse)
2013-10-07 03:41:09 -07:00
Atgeirr Flø Rasmussen
97f94cb269 Remove unneeded term, fixing oil injecting behaviour.
The 'comp_term' is supposed to be a total divergence term, which is supposed
to be zero for incompressible flow. It was added for improved robustness in
stagnant areas, but as implemented it would not be computed properly for
oil injection scenarios, due to the convention for two-phase transport
source terms (positive terms are inflow of first phase [water], negative
terms are total outflow).
2013-10-04 13:16:02 +02:00
Atgeirr Flø Rasmussen
8eca49cde2 Merge pull request #400 from bska/Wunused
Remove unused "typedef"s
2013-10-03 06:52:09 -07:00
Atgeirr Flø Rasmussen
ef861b44e9 Merge pull request #396 from bska/resv-injectors
Tentative solution to problem of RESV injectors in `ifs_tpfa.c`
2013-09-27 05:52:40 -07:00
Bård Skaflestad
fdc6c7b6ed Remove unused "typedef"s
CLang and recent versions of GCC warn about unused "typedef"s.  This
change-set removes currently known instances in opm-core.
2013-09-26 19:22:59 +02:00
Bård Skaflestad
3fd6a41de5 Merge pull request #394 from andlaus/fix_spline_monotonic
Spline: fix a few issues with the monotonic() methods
2013-09-26 04:52:16 -07:00
Andreas Lauser
bbf5a9767a spline: actually return something in evalDerivative() in the extrapolate case
once more, thanks to @bska to catching this!
2013-09-26 13:32:20 +02:00
Andreas Lauser
fc6503d2e7 spline: use evalDerivative_() instead of evalDerivative() if the segment index is known
thanks to @bska for catching this!
2013-09-26 13:28:13 +02:00
Roland Kaufmann
5f25339890 Disable output to console if parameter quiet = true
If the standard output is not desirable, it can be suppressed and
custom output can be written through the timestep_completed event
instead.
2013-09-26 12:37:02 +02:00
Roland Kaufmann
afdb330d54 Provide stream that ignores everything written to it
Use this stream when you want a straight code path, but also be able
to disable output at will.
2013-09-26 12:37:02 +02:00
Bård Skaflestad
88b447daca assemble_well_contrib(): Fix misprint in comment. 2013-09-25 15:39:37 +02:00
Bård Skaflestad
6a31f54a6e RESV: Ignore phase distribution for non-PRODUCERs
The WellsManager class handles INJECTORS by assigning a phase
distribution (W->ctrls[i]->distr) that coincides with the injected
fluid for the corresponding well (e.g., {1,0,0} for WATER injectors in
a three-phase WATER/OIL/GAS simulation).  This, however, meshes poorly
with the restriction that all phase components must be ONE in the case
of wells constrained by total reservoir volume flow targets (RESV)
that was introduced in commit b7d1634.

This change-set limits the restriction on phase distributions to
PRODUCERs only and is a tentative solution to GitHub PR #360.
2013-09-25 15:38:55 +02:00
Andreas Lauser
d1bd0f24e4 Spline: fix a few issues with the monotonic() methods
This should fix the common case where the curve is non-constant within
an intervall. I'm not really sure whether it's correct in all corner
cases, though.

this fixes the eWoms test case for the blackoil model which failed in
debug mode due to some asserts incorrectly triggering...
2013-09-25 15:02:33 +02:00
Andreas Lauser
3ac996debe fix the averages wrt negative values and divisions by zero
it could be discussed whether it's better to throw a
std::runtime_error instead...
2013-09-25 11:04:23 +02:00
Tor Harald Sandve
d83c131b15 The initBlackoilStateFromDeck is now called only if RS is given in deck 2013-09-24 15:25:52 +02:00
Tor Harald Sandve
fa46810511 The old extrapolation code for the unsaturated table is no removed 2013-09-24 15:21:58 +02:00
Atgeirr Flø Rasmussen
d5dd74aa9f Further improved WellReport and Watercut docs. 2013-09-24 14:39:41 +02:00
Atgeirr Flø Rasmussen
754ee7aa82 Documented WellReport and Watercut classes. 2013-09-24 14:14:54 +02:00
Roland Kaufmann
f3877facb0 Only use Clang-specific pragma if compiler is Clang
Otherwise the compiler will probably give us a warning that these
pragmas are unknown. By default that warning is disabled with our
own build system, but we also want to be able to link to our library
without incorporating the entire build system too.
2013-09-24 11:15:26 +02:00
Tor Harald Sandve
ffd18adfa3 An initial guess of the surface volume is now computed using the RS
factor in order to compute a more accurate A matrix.
2013-09-24 11:14:22 +02:00
Tor Harald Sandve
62f81859cd Extend relperm and capilary pressure tables with constant values such
that the derivatives at the endpoints are zero
2013-09-24 11:14:22 +02:00
Tor Harald Sandve
badc3c0e9e Extrapolate unsaturated function values as in Eclipse and Mrst 2013-09-24 11:14:22 +02:00
Andreas Lauser
a0c41819f7 include <tuple> in Spline.hpp
it seems like this is implicitly included by some other header, but
only in debug mode. *grr* thanks to @bska for catching this...
2013-09-23 15:21:39 +02:00
Andreas Lauser
c971e7c590 remove 'constexpr' from the property system
it is not really needed and unneccessarily breaks the build on gcc-4.4
2013-09-23 13:45:41 +02:00
Atgeirr Flø Rasmussen
d086ee5c63 Merge pull request #344 from andlaus/import_propertysystem
Import propertysystem
2013-09-23 04:18:02 -07:00
Bård Skaflestad
af1e3de84b Merge pull request #379 from rolk/379_famg
Fix LinearSolverIstl cleanup also for fast AMG branch
2013-09-23 01:31:04 -07:00
Andreas Lauser
71e6638f04 className(): minor comment and guard macro name fixes 2013-09-20 12:45:10 +02:00
Andreas Lauser
1b3217ec4b className(): get rid of the ugly ClassNameHelper_ class
since full specialization of function templates is okay in C++ (only
partial specialization is not allowed for them).
2013-09-20 12:36:40 +02:00
Andreas Lauser
c3cc059860 className(): remove unused argument object for the className(foo) variant
some compilers may warn about this under some circumstances.
2013-09-20 12:18:10 +02:00
Roland Kaufmann
8faf68dabb Replace int with size_t to avoid possible size mismatch 2013-09-20 10:53:47 +02:00
Roland Kaufmann
44d1dac890 Fix LinearSolverIstl cleanup also for fast AMG branch
To avoid deprecation warnings the number of smoothing steps was passed
through the Criterion instead of directly to the constructor in commit
a7f32b934b.

However, due to an insufficient test matrix this was not tested using
the fast AMG variant of DUNE so it breaks the builds if
`-DHAS_DUNE_FAST_AMG` is defined.

This change should apply the same type of change to this branch as for
the others. The number of smoothing steps is put into a constant to
avoid the magic number 1 to appear in too many places (although I am
not sure the number for pre- and post-smoothing always should be the
same).
2013-09-20 10:00:21 +02:00