Commit Graph

1198 Commits

Author SHA1 Message Date
Andreas Lauser
edf345219f limit ecl relperm hystersis to the non-wetting phase
I have trouble seeing why this can possibly physically justified
(because oil is once the wetting and once the non-wetting phase), but
things seem to be like this as the documentation says that in case of
chosing the relperm hysteresis model 0 via the EHYSTR keyword,
hysteresis is only used for the non-wetting phase.
2015-08-11 17:23:02 +02:00
Andreas Lauser
f48891ffb0 Merge pull request #30 from andlaus/no_limits_in_krn
EclDefaultMaterial: do not limit the saturations in krn()
2015-08-10 12:31:38 +02:00
Andreas Lauser
89cbb8aab7 EclMaterialLawManager: slightly clean up the materialLawParams() methods 2015-08-07 18:23:32 +02:00
Andreas Lauser
a82648a002 embed the scaled endpoints directly into the relevant parameter objects
this hopefully improves performance slightly.
2015-08-07 18:23:32 +02:00
Andreas Lauser
8b9cfa0a65 EclDefaultMaterial: do not limit the saturations in krn()
this is required to get a match with the current opm-core satfuncs for
Norne.
2015-08-07 16:47:23 +02:00
Andreas Lauser
53309405c2 EclMaterialLawManager: make it use compressed instead of logically Cartesian elements
for grids with many inactive cells, this can change quite a bit of
memory and might even lead to slightly better performance because of
the memory prefetching potentially works better.
2015-08-06 16:44:00 +02:00
Andreas Lauser
5d2dadc6e1 replace custom conditional type selector by std::conditional
I did not know about std::conditional until today...
2015-07-29 13:56:53 +02:00
Andreas Lauser
fc2e6c9918 implement a EclMaterialLawManager class
this class internalizes and manages the material parameters from the
ECL deck because this turns out to be a non-trivial task.
2015-07-28 17:24:31 +02:00
Andreas Lauser
7cbffc22c6 introduce SimpleModularFluidState and make ModularFluidState not depend on the FluidSystem anymore
it is called "simple" because the usage is somewhat simpler: The
quantities are stored and those which are not can be specified using
simple boolean template arguments instead of having to pass the class
names of the storage modules. The definition of the class is quite a
bit more involved than the non-"simple" variant, though.
2015-07-28 17:24:27 +02:00
Andreas Lauser
a25cee980b implement a multiplexer three-phase fluid-matrixinteraction for ECL problems
this allows to switch between the Default three-phase implementation,
Stone1 and Stone2 at runtime.
2015-07-28 17:24:25 +02:00
Andreas Lauser
11ccc40e44 implement Stone2 three-phase fluid-matrixinteractions for ECL problems 2015-07-28 17:24:22 +02:00
Andreas Lauser
d46f4bafe3 implement Stone1 three-phase fluid-matrixinteractions for ECL problems 2015-07-28 17:24:20 +02:00
Andreas Lauser
c7c4784746 some updates for EclDefaultMaterial
it now uses shared pointers to the underlying twophase material law
parameter objects and it can be used with hysteresis.
2015-07-28 17:24:18 +02:00
Andreas Lauser
014a8faa04 implement ECL hysteresis
so far, this is only for relperm hysteresis. the Eclipse docu seems to
be incorrect (or at least vague) for capillary pressure hysteresis...
2015-07-28 17:24:16 +02:00
Andreas Lauser
4dea8c0642 add invertion methods to some of the two-phase fluid-matrix interactions
these are required for hysteresis
2015-07-28 17:24:14 +02:00
Andreas Lauser
01aaaea95c Brooks-Corey: fix some comments
they were misleading or wrong.
2015-07-28 17:24:12 +02:00
Andreas Lauser
bb100ced1c implement a two-phase fluid-matrix interaction for ECL end-point scaling 2015-07-28 17:24:09 +02:00
Andreas Lauser
9343d3d720 go back to using Dune's MPIHelper class in test_fluidmatrixinteractions
Dune's MPIHelper API might be sub-optimal (because it easily leads to
race conditions w.r.t. the destruction of singletons), but it does the
job and we don't have to maintain it.
2015-07-28 17:24:07 +02:00
Andreas Lauser
4ba1490310 remove the unused 'Evaluation' template parameter from the MaterialTraits
the evaluation is actually more dynamic because it is a template
argument for the individual methods of the fluid-matrixinteractions.
2015-07-28 17:24:05 +02:00
Andreas Lauser
18531103a6 fix error in comment 2015-07-28 17:24:03 +02:00
Andreas Lauser
6eb9c42e5c LiveOilPvt: fix convergence criterium for oilSaturationPressure()
in some cases this pressure can be quite low (e.g. 0), and für
slightly inconsistent decks it can be even negative, so it makes sense
to compare the absolute values and to add an absolute convergence
criterion.
2015-07-03 11:51:57 +02:00
Andreas Lauser
99a61df00a re-add the vim and emacs modelines
conceptually, this may not be the purest conceivable solution, but it
is the most practical one.
2015-06-18 13:47:26 +02:00
Andreas Lauser
813ab7ecc6 fix a GCC "typedef unused" warning for optimized builds 2015-05-28 13:50:14 +02:00
Andreas Lauser
2673badd5b fix the headercheck
i.e., make all header files includable without preconditions.
2015-05-21 16:23:18 +02:00
Andreas Lauser
520ce9ddf1 make the heat conduction laws usable with the local-AD framework 2015-05-21 16:23:18 +02:00
Andreas Lauser
662531fee8 make the constraint solvers usable with local-AD 2015-05-21 16:23:18 +02:00
Andreas Lauser
8aaf2bfdab make the fluid-matrix interactions usable with the local-AD framework
also, adapt the unit test to test this capability.
2015-05-21 16:23:18 +02:00
Andreas Lauser
26c8553902 make all fluid systems local-AD aware
also, adapt the unit test make sure they can be used synchronously
with function evaluations as well as scalars.
2015-05-21 15:33:16 +02:00
Andreas Lauser
e009e640c5 make the fluid states ready for the local-AD framework
in fact they wouldn't have needed any modification, but returning
constant references instead of copies of the stored values saves quite
a few calls to copy constructors.

besides this, fluid states are now required to export the 'Scalar'
type, which allows to use it outside of the FluidState without
resorting to the c++ 'decltype' construct.
2015-05-21 15:33:14 +02:00
Andreas Lauser
0149901e4f make the binary coefficients local-AD aware 2015-05-21 15:33:12 +02:00
Andreas Lauser
b5b7864ca5 add a unit test for the components
note that this test only checks for API compliance but not if the
compotations of the components make any sense.
2015-05-21 15:33:09 +02:00
Andreas Lauser
dadefcd3f3 make all components local-AD aware 2015-05-21 15:33:07 +02:00
Andreas Lauser
35bbae78ab make the linear 1D and 2D tabulation classes local-AD aware 2015-05-21 15:33:05 +02:00
Andreas Lauser
2739b031b7 make the spline class usable with local function evaluations instead of scalars 2015-05-21 15:33:03 +02:00
Andreas Lauser
b9d9f893d9 introduce the concept of "math toolboxes"
these are "traits" classes and provide a way to access the value of
function evaluations, conditional access to its value (i.e., to
forward them if the target object of an assignment includes the
derivatives or use the function value if not) and some algebraic
functions.

the main idea is to be able to abstract the differences between plain
scalars and function evaluation...
2015-05-21 15:33:01 +02:00
Andreas Lauser
d34bbc57a9 add a "local" AD framework
The basic idea is to replace "plain" scalar values by "function
evaluations": these store the function's value plus a set of
derivatives for it and the chain rule is used to "drag" the
derivatives along.

So far, the framework only implements the "forward" approach to
automatic differentiation and expression templates are not supported
yet. (The latter point may change in the furture, though.)

"local" means that the framework uses static arrays to represent the
derivatives, i.e. the number of derivatives which are required must be
specified at compile time. Compared to dynamic arrays this improves
efficiency considerably if function evaluation objects must be
allocated and deallocated frequently.
2015-05-21 15:32:59 +02:00
Andreas Lauser
7b49035575 unify the formatting of the copyright statements 2015-04-29 13:59:08 +02:00
Andreas Lauser
d601f672ac {geometric,harmonic}Mean(): handle the case where both factors are zero properly
without this commit, this case caused NaNs which in turn cause quite a
bit of hilarity...
2015-04-29 13:59:08 +02:00
Andreas Lauser
5b08de4244 incorperate all infrastructural classes required into opm-material itself
they used to be in opm-core, but this allows to be more flexible with
the dependency order: What's now called "opm-core" can easily depend
on opm-material which might come in handy for the refactoring.

Besides moving in classes from opm-core, the infrastructural code
which was still in opm-material is moved to the directory
opm/material/common. The intention is to collect these classes at a
central location to make it easy to move them to a real "core" module.
(if this is ever going to happen.)
2015-04-28 12:17:49 +02:00
Andreas Lauser
0c4fd68f2a update version number to 2015.10 2015-03-29 15:13:19 +02:00
Andreas Lauser
2c5d51f841 change the version number to the scheme used by eWoms
i.e., there is no distinction between the "API version" and the
"Release version" anymore. IMO, the split scheme is just confusing for
no benefit because we are handling API/ABI changes in a pretty relaxed
manner anyway: i.e., whenever the "release version" gets incremented,
the "API version" needs to follow suite!
2015-03-29 15:07:06 +02:00
Andreas Lauser
898930b3d5 black oil fluid system: implement vaporized oil 2015-02-11 15:31:15 +01:00
Andreas Lauser
dc5fdd7059 change the surface temperature to 15.56 degrees Celsius
this is what Eclipse seems to use, at least according to the STDCOND
keyword...
2015-02-05 16:22:31 +01:00
Andreas Lauser
e036cbea5c Black oil fluid system: use dynamic polymorphism to determine the phase quantities
this allows to freely mix and match ECL keywords like PVT[OG],
PVC[OG], PVDC[OG], and PVTW...
2015-02-05 16:22:31 +01:00
Andreas Lauser
f896d85f4f add a wrapper macro for the c++-2011 "final" keyword 2015-02-05 16:03:47 +01:00
Andreas Lauser
ee05d77f79 black oil fluid system: use extrapolation for all tabulated quantities
this seems to be required for my version of SPE9...
2015-01-26 16:08:25 +01:00
Andreas Lauser
ea3c68694b black oil fluid system: correct a few method descriptions and names 2015-01-26 12:56:53 +01:00
Andreas Lauser
d074070e11 Revert "rename {gil,gas}FormationVolumeFactor to \1FormationFactor"
This reverts commit 1cf745943a. After a
more thorough investigation, the cannonical name of these quantities
turned out to be "* formation volume factor"...
2015-01-26 12:03:42 +01:00
Andreas Lauser
1cf745943a rename {gil,gas}FormationVolumeFactor to \1FormationFactor
the new name is shorter, not less descriptive and it seems like it is
also more common...
2015-01-25 18:20:58 +01:00
Andreas Lauser
b1c35e0e0d Black oil fluid system: make immiscible components less dissolvable
This is only relevant for the approximation which uses large instead
of infinite fugacity coefficients for immiscible components. The
motivation is to bring the solution of the NCP flash solver closer to
what's expected using the blackoil assumptions directly. (Physically
speaking, the result is less realistic in most cases, though...)
2015-01-21 15:33:12 +01:00