Commit Graph

373 Commits

Author SHA1 Message Date
Andreas Lauser
6f9451ba06 fluid systems: make the ParameterCache mechanism work with Evaluation<>
so far, using function evaluation objects instead of primitive
floating point scalars only worked for trivial parameter caches which
do not store any values (most of the time, this means that the
ParameterCache is `NullParameterCache`), or it explicitly did not work
(like for `Spe5ParameterCache`). this patch fixes the problem by
making the parameter caches of fluid systems template classes which
are templated on the type of scalar values. On the flipside, this
requires changes to all downstream modules that use fluid systems.
2016-04-17 11:28:04 +02:00
Andreas Lauser
d44dd50cb7 reduce the execution time of test_fluidsystems
this is done by reducing the default resolution of tabulated
components for the relevant fluid systems.
2016-04-17 11:28:02 +02:00
Andreas Lauser
801b1fef77 make test_pengrobinson faster
again, we just use less samples...
2016-04-17 11:28:00 +02:00
Andreas Lauser
35b5ad833b reduce the excution time needed by test_tabulation
instead of 200 samples in the pressure direction, let's be confident
with only 50...
2016-04-17 11:27:57 +02:00
Pål Grønås Drange
ac0652805d Using API get3DProperties() 2016-04-11 14:59:01 +02:00
Pål Grønås Drange
02beac295c Merge branch 'use-eclipse3dproperties' of github.com:pgdr/opm-material into use-eclipse3dproperties 2016-04-08 15:39:16 +02:00
Pål Grønås Drange
f1405bbafd Updated opm-material to use new opm-parser Eclipse3DProperties API 2016-04-08 15:31:32 +02:00
Pål Grønås Drange
65d9ee2924 opm-material uses new Eclipse3DProperties API 2016-04-05 11:47:40 +02:00
Pål Grønås Drange
6eddf22fc4 added lacking references in auto types (SimpleTable) 2016-04-01 16:44:23 +02:00
Pål Grønås Drange
88249811fc update opm-material repo to use Eclipse3DProperties API 2016-04-01 15:52:25 +02:00
Andreas Lauser
013eb6c17e Merge pull request #133 from andlaus/cleanup_preambles
clean up the licensing preable of source files
2016-03-17 13:12:51 +01:00
Joakim Hove
0f36222f7b Merge pull request #134 from qilicun/rename-ParseMode
rename ParserMode as ParseContext.
2016-03-17 09:51:38 +01:00
Liu Ming
bbf8d5d3a3 rename ParserMode as ParseContext. 2016-03-17 08:49:02 +08:00
Andreas Lauser
da401551be clean up the licensing preable of source files
this patch removes the in-file lists in favor of a global list of in
the COPYING file. this is done because (a) maintaining a list of
authors at the beginning of each source file is a major pain in the
a**, (b) for this reason, the list of authors was not accurate in
about 85% of all cases where more than one person was involved and (c)
this list is not legally binding in any way (the copyright is at the
person who authored a given change; if these lists had any legal
relevance, one could "aquire" the copyright of the module by forking
it and replacing the lists...)
2016-03-15 00:58:09 +01:00
Tor Harald Sandve
78fcbb1ed3 Merge pull request #132 from andlaus/ecl_water_viscosibility
handle the "viscosibility" of water with constant compressibility as documented by the ECL RM
2016-03-09 11:31:58 +01:00
Andreas Lauser
03c2ee8b4e handle the "viscosibility" of water with constant compressibility as documented by the ECL RM
this is basically a revert of 1d2ad56ba1.
2016-03-07 15:56:36 +01:00
Andreas Lauser
9e6c38b06b Merge pull request #131 from andlaus/always_copy_on_toLhs
make MathToolbox::toLhs() always return a copy again
2016-03-07 13:56:49 +01:00
Andreas Lauser
ea6899d032 Merge pull request #130 from atgeirr/silence-warnings
Silence unused argument warnings.
2016-03-05 19:06:49 +01:00
Andreas Lauser
362374daea make MathToolbox::toLhs() always return a copy again
in my testing, the GCC SVN version from 4th of March causes problems
if lvalue references are just passed through and neither GCC-5 nor
clang 3.6 show any obvious differences in performance. (I guess that's
because of the copy elision compiler optimizations in conjunction with
inlining.)

It is also worthwhile to know that clang 3.6 is about 20% faster with
ebos than both, GCC-6 and GCC-5. I can only speculate why this is the
case, but since the performance improvement seems to evenly apply to
the linearization and linear-solve parts, the auto-vectorizer of clang
possibly works better for ebos than the one of GCC...
2016-03-05 15:22:05 +01:00
Atgeirr Flø Rasmussen
46d1a512c2 Silence unused argument warnings. 2016-02-29 10:35:33 +01:00
Andreas Lauser
8eadacde62 Merge pull request #129 from jokva/fix-header-parser-695
Add missing opm-parser headers
2016-02-26 12:24:50 +01:00
Jørgen Kvalsvik
e467684137 Add missing opm-parser headers
opm-parser pull #695
https://github.com/OPM/opm-parser/pull/695
2016-02-26 11:38:53 +01:00
Andreas Lauser
88e85042e0 Merge pull request #127 from andlaus/fix_twophase_ecl_decks
black-oil PVT: bail out from trying to initialize PVT objects for inactive phases
2016-02-21 18:05:13 +01:00
Andreas Lauser
9b9816d8e9 Merge pull request #128 from andlaus/fix_deprecation_warnings
fix a bunch of deprecation warnings caused by OPM/opm-parser#687
2016-02-19 23:36:45 +01:00
Andreas Lauser
e30b43ad7e fix a bunch of deprecation warnings caused by OPM/opm-parser#687 2016-02-19 23:32:52 +01:00
Andreas Lauser
32980c57d9 black-oil PVT: bail out from trying to initialize PVT objects for inactive phases
this should fix twophase decks, see
https://github.com/OPM/opm-autodiff/pull/576#issuecomment-185770114.
2016-02-19 14:22:40 +01:00
Joakim Hove
54542d997b Merge pull request #122 from jokva/unique-auto-deck
Change Deck access methods/types to references
2016-02-18 22:59:51 +01:00
Andreas Lauser
d5bf1b637a Merge pull request #126 from andlaus/export_drainage_eps_points
EclMaterialLawManager: make the method which provides the scaled drainage end points public
2016-02-17 18:59:37 +01:00
Andreas Lauser
b8d08e7b52 EclMaterialLawManager: make the function which provides the scaled drainage end points public
That is because they might have to modified externally (e.g. if
SWATINIT is computed and applied externally).
2016-02-17 18:56:54 +01:00
Jørgen Kvalsvik
cedb629f6d Change Deck access methods/types to references
opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.

https://github.com/OPM/opm-parser/pull/677
2016-02-16 16:09:56 +01:00
Andreas Lauser
09f02eb2f4 fluid states: clean up the remaining modules w.r.t. references vs values 2016-02-12 18:43:15 +01:00
Andreas Lauser
307cc6c0f0 clean up the overlay fluid state w.r.t. the type which they return
if the base fluid state returns a reference, the overlay fluid state
should just pass it through instead if copying it. The difference
became relevant with the introduction of Evaluations for localized
AD. (is not relevant if Scalars are floating point values, which was
the only choice when the overlay fluid states were written.)
2016-02-12 18:43:15 +01:00
Andreas Lauser
20c78f5757 test_fluidsystems: improve the naming of the template arguments of the test functions 2016-02-12 18:43:15 +01:00
Andreas Lauser
3ad0c087ca distinguish between rvalues and lvalues in MathToolbox::toLhs<LhsEval>()
the problem is that references to lvalues can be just passed through,
whilst the objects the rvalue references point are temporary and thus
need need to be copied. Fixing this issue forced me to go into the
rabbit hole of the c++ memory model, but at least I guess I now know
what rvalue references ('Foo&&' instead of 'Foo&') are good for...
2016-02-12 18:43:08 +01:00
Andreas Lauser
460dd578d0 Merge pull request #124 from andlaus/valgrind_fix
test_fluidsystems: fix valgrind complaints about unused memory
2016-02-12 11:52:51 +01:00
Andreas Lauser
78db8b01d5 test_fluidsystems: fix valgrind complaints about unused memory
I doubt that this is the reason for this test's segfault on Jenkins,
but it that was a real (if minor) issue...
2016-02-12 11:49:38 +01:00
Andreas Lauser
76af0dd218 Merge pull request #120 from andlaus/fix_toLhs
MathToolbox: return a constant reference for toLhs() (if possible)
2016-02-05 18:56:39 +01:00
Andreas Lauser
39933a747b MathToolbox: return a constant reference for toLhs() (if possible)
also improve the documentation somewhat. (it was a bit "raw on its
teeth".)
2016-02-05 18:53:05 +01:00
Andreas Lauser
47e89e2c9d Merge pull request #118 from andlaus/fix_blackoil_pvt_unit_test
fix the unit test for the blackoil PVT API
2016-02-03 16:13:01 +01:00
Andreas Lauser
7b35935099 fix the unit test for the blackoil PVT API
mea culpa, I forgot to remove the calls to the initEnd() method after
fc933ef94d.
2016-02-03 15:56:49 +01:00
Andreas Lauser
3d9397d274 Merge pull request #115 from andlaus/fix_headercheck
squelch extra-pedantic clang and GCC warnings and fix the headercheck
2016-02-01 13:41:28 +01:00
Andreas Lauser
4dc417fcca squelch extra-pedantic clang and GCC warnings and fix the headercheck
once more, OPM/opm-parser#661 was the culprit for the headercheck.
2016-02-01 13:39:29 +01:00
Atgeirr Flø Rasmussen
051a17cdf4 Merge pull request #114 from andlaus/blackoil_improvements
Blackoil improvements
2016-02-01 13:38:26 +01:00
Andreas Lauser
397f6c67a7 LocalAd: fix the return type of toLhs<LhsEval>()
instead of always copying to the return value we now simply pass
through a const reference if possible.
2016-01-30 14:33:37 +01:00
Andreas Lauser
bb82a6b5e3 black-oil fluid system: take advantage of fluid states which provide Rs() and Rv() directly
this avoids converting Rs and Rv to mass fractions (as provided by the
generic fluid system API) just to immediately convert them back to
dissolution factors (as required by the blackoil PVT objects).

Note that the implementation of this is a bit ugly because it requires
advanced C-preprocessor usage and higher
template-meta-programming-foo. Any ideas of how to do this in a
simpler fashion are welcome.
2016-01-29 19:58:07 +01:00
Andreas Lauser
c0d680adb6 black-oil PVT: implement thermal PVT properties
the primary goal of this patch is to implement what's currently
provided by the opm-core PVT classes, and it is thus not very
comprehensive: some non-standard keywords are required (e.g.,
GCOMPIDX), there has been some guess-working going on, some approaches
are only consequences of what the ECL documentation says (but is not
mentioned explicitly anywhere) and the relations for enthalpy are
still missing (i.e., the quanties provided are insufficient to
implement an energy conservation equation).

the patch works by adding a boolean 'enableTemperature' template
parameter to the multiplexer classes which is set to 'true' by
default. if it is detected that the PVT properties are thermally
dependent the respective *PvtThermal class is used (which in turn
creates an isothermal multiplexer internally).

the schema for the names of the thermal PVT classes
(${PHASE}PvtThermal) is a bit inconsistent with that used for
isothermal PVT classes (${APPROACH}${PHASE}Pvt) which was done to
avoid naming conflicts with the current opm-core PVT classes.
2016-01-29 19:57:58 +01:00
Andreas Lauser
2fce78289f black-oil fluid system: introduce methods to convert mole- into mass fractions
... only for the solutes of hydrocarbon phases.
2016-01-29 19:42:51 +01:00
Andreas Lauser
abc0caea7a black-oil PVT: provide inverse formation volume factors
this makes things go less in circles: before this patch, the
interpolation happened on the inverse formation volume factors, the
PVT classes inverted the result to get the FVF and then the calling
code divided by what fell out of this. Now, the calling code can
directly multiply with the result of the interpolation.
2016-01-29 19:42:09 +01:00
Andreas Lauser
c780233ad1 black-oil PVT: remove the density related methods
instead, the calling code needs to directly use the formation volume
factors to calculate it.
2016-01-29 19:27:52 +01:00
Andreas Lauser
d29c85dc9a blackoil-pvt: introduce a numRegions() method 2016-01-29 19:27:52 +01:00