Commit Graph

1111 Commits

Author SHA1 Message Date
Andreas Lauser
8e11a8254e Merge pull request #39 from andlaus/change_connate_water_treatment
EclDefaultMaterial: do not add the connate water saturation to Sw_ow
2015-08-14 17:42:50 +02:00
Andreas Lauser
14e4692386 EclDefaultMaterial: do not add the connate water saturation to Sw_ow 2015-08-14 17:40:05 +02:00
Andreas Lauser
8e51155f24 Merge pull request #36 from andlaus/inconsistent_hysteresis_updates
EclDefaultMaterial: use inconsistent saturations for the hysteresis update
2015-08-14 15:32:03 +02:00
Andreas Lauser
fb6eb1279a SplineTwoPhaseMaterial: implement the two-phase inversion functions
these are required for ECL hysteresis.
2015-08-14 14:04:20 +02:00
Andreas Lauser
a8aaa168e2 EclDefaultMaterial: allow the parameters to decide if consistent or inconsistent hysteresis are used 2015-08-14 09:33:28 +02:00
Andreas Lauser
893538c9f3 EclDefaultMaterial: use inconsistent saturations for the hysteresis update
with this, I got slightly better performance than the opm-core master
version if flow is tasked on simulating the full Norne deck. Be aware
that from the physical POV, this is wrong.
2015-08-14 09:26:28 +02:00
Andreas Lauser
83de8aceb1 Merge pull request #35 from andlaus/connate_water_fixes
Connate water fixes
2015-08-14 09:26:10 +02:00
Andreas Lauser
a52c279fc8 Merge pull request #34 from andlaus/fix_two-point_krw_scaling
fix saturation scaling points for two-point krw scaling
2015-08-13 17:39:24 +02:00
Andreas Lauser
0d1c711d8e EclDefaultMaterial: increase the epsilon for division-by-zero-avoidance to 1e-20
also, treat saturations smaller than 0 as 0. this also makes clamping the
kro values to range [0, 1] superfluous.
2015-08-13 17:37:19 +02:00
Andreas Lauser
797012a8ba EclDefaultMaterial: add the connate water saturation to the wetting-phase saturation in the gas-oil system 2015-08-13 17:34:21 +02:00
Andreas Lauser
be4593841f EclDefaultMaterial: Make sure that the water saturation is at least the connate water saturation
I thought this would not make a difference if the tables are
extrapolated by constants, but apparantly it makes a difference for
endpoint scaling.
2015-08-13 17:31:56 +02:00
Andreas Lauser
ca2a4bbb4e fix saturation scaling points for two-point krw scaling
kudos to [at]osae for finding this!
2015-08-12 18:07:05 +02:00
Andreas Lauser
10dc683c75 Merge pull request #33 from andlaus/only_non-wetting_phase_ecl_hysteresis
limit ecl relperm hystersis to the non-wetting phase
2015-08-12 13:21:35 +02:00
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