Commit Graph

1081 Commits

Author SHA1 Message Date
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
Andreas Lauser
f1cb777fb0 Tabulated functions: fix the bisection code
seems like somebody can't properly implement an interval-halving
algorithm. Maybe I should consider to give back my degree...
2015-01-21 15:33:12 +01:00
Andreas Lauser
0b675bfa38 Black oil fluid system: fix Rs <-> XoG conversions
some stupid guy messed them up...
2015-01-21 15:33:09 +01:00
Andreas Lauser
2f343412b7 black oil fluid system: Do things the Eclipse way
i.e., interpolate between inverse volume factors and the inverse of
the product of the volume factors. I have my doubts if these
"optimizations" make the results physically better, but it seems like
they at least make things different...
2015-01-21 15:32:13 +01:00
Andreas Lauser
a44bb9b887 add methods to access the sample points to the tabulated function classes
also, the getSamplePoint() has been renamed to valueAt()
2015-01-21 15:32:13 +01:00
Andreas Lauser
3f82e67847 Black oil fluid system: Use piecewise linear interpolation for all parameters
seems like this is what causes the discrepancies to eclipse in SPE1.
2015-01-21 15:32:05 +01:00
Andreas Lauser
e01cf39448 add a class for piecewise linear 1D functions
this class exhibits almost the same interface as Opm::Spline in order
to faciliate replacing one by the other.
2015-01-16 17:50:39 +01:00
Andreas Lauser
df0dc97c53 fluid-matrixinteractions: remove the derivative functions
these were unused, quite likely broken and could only calculate the
derivatives with regard to some quantities.

if the general derivatives of the relperms and capillary pressures are
ever required, finite differences can be used to save the
day... (these *might* be sightly slower, but they are automatically
consistent with the function.)
2015-01-08 17:57:40 +01:00
Andreas Lauser
0c8a5503d7 fix the headercheck
i.e. make all headers includable without preconditions.
2015-01-06 14:38:00 +01:00
Andreas Lauser
e97c16eeb5 PiecewiseLinearTwoPhaseMaterial: use constant extrapolation.
this makes the result identical to the saturation functions used by
opm-core, although I have my doubts if this is the physically correct
thing to do.
2014-12-16 17:18:54 +01:00
Andreas Lauser
33671258eb EclDefaultMaterial: fix typo
it is Sw instead of Sg. with this, the results for SPE9 seem
reasonable again.
2014-12-16 17:17:37 +01:00
Andreas Lauser
578980e16a PiecewiseLinearTwoPhaseMaterialParams: use the same API as SplineTwoPhaseMaterialParams
this allows to use the two by changing the class name but without
requiring any further code changes...
2014-12-08 17:50:36 +01:00
Andreas Lauser
c267cacbd6 water viscosity: calculate it the same way as documented by the Eclipse RM 2014-12-08 14:58:02 +01:00
Andreas Lauser
8109900567 ECL default material: make the oil relperm match that of autodiff
at least it seems to be very similar for SPE1. the difference in the
BHP of the wells for SPE1 is significantly reduced (but still too
large) by this...
2014-11-27 19:26:47 +01:00
Andreas Lauser
e57b4410f1 ECL default material parameters: add connate water 2014-11-27 19:22:06 +01:00
Andreas Lauser
447268e79d remove unused variable to fix compiler warnings 2014-10-29 16:07:58 +01:00
Andreas Lauser
1f91c1fd93 rename PengRobinsonparamsMixture.hpp to PengRobinsonParamsMixture.hpp 2014-10-29 16:07:21 +01:00
Andreas Lauser
6b5973d6a1 black oil fluid system: use Rs instead of XoG and interpolate the inverse B factor
this is much closer to how things are done in Eclipse. For the
external API, nothing changes provided that only the "official" fluid
system API is used...
2014-10-01 13:46:12 +02:00