Commit Graph

464 Commits

Author SHA1 Message Date
Robert Kloefkorn
7699ed59db [cleanup] make code compile when Scalar is non POD type. 2017-06-23 22:58:50 +02:00
Robert Kloefkorn
2aada96d8c [bugfix] fix build of ebos for Grid != CpGrid. 2017-06-23 22:58:49 +02:00
Robert Kloefkorn
18dd23ff44 [cleanup] make module compile with DUNE 2.5 2017-06-23 22:58:49 +02:00
Tor Harald Sandve
195209982e Add support for PLMIXNUM
also fix some issues with the MISCNUM
2017-06-21 10:27:25 +02:00
Tor Harald Sandve
ecae9d3a78 Address comments frow the review. 2017-06-21 08:03:44 +02:00
Tor Harald Sandve
3dd7fd0b3a Add polymer model to ebos
Adds a conservation equation for polymer.
Polymer concentration in the water phase is used as primary variable
The polymer influences the viscosity of the water, and leaves gas and oil
uneffected.

A shear multiplier is computed if PLYSHLOG and/or SHRATE is specified
based on either velocity or shrate.
The shear multiplier effects the water and polymer viscosity.

Tested and verified on the test cases in polymer_test_suite
2017-06-21 08:00:31 +02:00
Robert Kloefkorn
c8bf519e5e [bugfix] fix propName for ROCKNUM. 2017-06-20 18:08:12 +02:00
Joakim Hove
05bc61e4ba Using std::time_t from TimeMap 2017-06-19 22:13:25 +02:00
Andreas Lauser
bff4c8ade9 ebos: add the raw array of PVT numbers.
this can be used by flow_ebos to be passed to legacy code.
2017-06-16 15:12:27 +02:00
Andreas Lauser
f334bb32b9 ebos: add support for the ROCKOPTS keyword
this becomes important if th region which is supposed to be used by
ROCK is not the same as the region for the PVT properties.
2017-06-16 15:12:26 +02:00
Andreas Lauser
3b37038043 ebos: do not mistake the pressure for the gas saturation anymore
this is a copy-and-pasto that was introduced with #189.
2017-06-16 09:25:56 +02:00
Andreas Lauser
89b21eb641 ebos: fix the compilation
one must use eclProps.getDoubleGridProperty() while the has() method
is called eclProps.hasDeckDoubleGridProperty() (mind the Deck!).
2017-06-14 13:36:37 +02:00
Andreas Lauser
55a5a3a848 ebos: reduce direct deck usage
this reduces the number of direct deck accesses in `EclProblem` in
favour of `EclipseState`-grid properties. as far as i can see,
directly using the deck object cannot fully be avoided because
`EclipseState` does not seem to provide internalized versions of all
these keywords yet.
2017-06-13 16:54:39 +02:00
Andreas Lauser
9d7b226b6e Merge pull request #185 from totto82/miscibility_solvent
Add support for miscible solvent runs
2017-05-24 13:03:27 +02:00
Andreas Lauser
d31ded53e4 ebos: fix the NTG averaging code
the NTG value for active cells in the topmost layer was always
1.0. This resulted in some deviations in the transmissibilities of the
Norne deck which lead the init file comparison unit tests from
opm-simulators to fail.
2017-05-24 11:21:57 +02:00
Tor Harald Sandve
f14ea0e3af Add support for miscible solvent runs
- initialization only via Ecl Deck
- adds modification of relperms and cap-pressures for miscible runs
- adds TL mixing model for effective viscosity and density calculations

Tested on SPE1CASE2_SOLVENT_MISC_TL, SPE9_CP_CO2_MISC_TL, SPE5CASE1-3
and SPE3CASE1_SOLVENT_MISC
2017-05-24 10:52:04 +02:00
Tor Harald Sandve
a5858393c6 Avoid negative indicies in minPvFillNtg_ 2017-05-23 15:48:35 +02:00
Tor Harald Sandve
64feefaf05 Fix minpvProps calculations 2017-05-15 13:49:13 +02:00
Tor Harald Sandve
5fb005d87b Use volume weighted arithmetic average of NTG for cells merged by minpv.
This is a big hack to make the TRAN[X,Y] like flow_legacy and a bit more
like Eclipse.
2017-05-12 13:01:07 +02:00
Andreas Lauser
bcdc4e5e38 blackoil: implement the immiscible solvent extension
Conceptually this is IMO pretty questionable, since it adds a second
"gas phase" that does not mix with "ordinary" gas. I suppose the
reason why this extension was conceived by E100 is that if all you
have is hammer, everything looks like a nail...

Functionality-wise, this patch is still not fully complete because
miscibility of the solvent "phase" is not yet implemented. As far as I
can see, the API changes required by miscibility are quite limited,
though.
2017-05-05 10:46:53 +02:00
Andreas Lauser
cddf643b5a EclFluxModule: add a small fix to the mobility shortcut
let's use zero instead of 10^-18. This can have a small impact on
performance, but the new version is definitely "more" correct, and
also Norne performance seems to improve slightly on my machine.
2017-05-04 16:00:25 +02:00
Andreas Lauser
2f0a32ba63 ECL flux module: make some attributes that are not used elsewhere local 2017-05-04 16:00:25 +02:00
Andreas Lauser
4fd341d98e some fixes for typos in comments 2017-05-04 16:00:25 +02:00
Arne Morten Kvarving
b0ce46f46f adjust for changed ParameterGroup namespacing 2017-04-28 15:35:58 +02:00
Andreas Lauser
5951b2f64c EclCpGridManager: do not delete unintialized pointers
this was found using GCC-7's address sanitizer. I suspect that this
did not surface earlier (i.e., with valgrind), because newly allocated
memory gets initialized to zero by the operating system, so the value
of the pointer was zero and the delete operator did what was right by
coincidence. the new asan seems to initialize memory randomly, though.
2017-04-20 11:05:31 +02:00
Andreas Lauser
96869b6a2f make explicit initialization for twophase cases work
if the initial solution is explicitly given by the deck using the
PRESSURE, SWAT, etc. keywords, the specified state can be
thermodynamically impossible. To avoid inconsistencies, we use a flash
calculation to find a state that is in thermodynamic equilibrium and
exhibits the same masses as the explicitly specified solution. Since
the flash solver needs to compute quantities for all fluid phases, but
two-phase blackoil simulations usually do not specify the properties
of one phase, the flash solver crashed. This patch works around that
issue by simply not using the flash solver in the twophase case, i.e.,
the explicit initial condition must be thermodynamically consistent in
order to produce the stable results for a different choice of primary
variables.
2017-04-18 16:11:44 +02:00
Andreas Lauser
346710c5af ebos: hysteresis needs to be updated for all elements
in the parallel case, this avoids the participating processes from
desyncronizing if the solution is consistent on all processes.
2017-04-15 15:12:15 +02:00
dr-robertk
626db3a0fa Merge pull request #143 from blattms/collecttoiorank-fixes-2
localIndexMaps in CollectToIORank need to be lists of interior element indices.
2017-04-03 16:30:33 +02:00
Joakim Hove
e420e7d30e Policy change: warn when missing well/group. 2017-03-15 15:40:39 +01:00
Andreas Lauser
6dbdd387d6 Merge pull request #140 from blattms/fix-pushing-to-resized-array
Fixes pushing to resized array distributedCartesianIndex.
2017-03-10 11:41:25 +01:00
Atgeirr Flø Rasmussen
30aa70c9b6 Merge pull request #153 from andlaus/improve_EQLDIMS_access
ebos: no longer fail if the EQLDIMS keyword is not explicitly mentioned in the deck
2017-02-14 09:54:52 +01:00
Andreas Lauser
42c49e57ec ebos: sychronize the parse context with the one used by flow_legacy
i.e., add the PARSE_MISSING_DIMS_KEYWORD option. this was a recent
change in flow_legacy.
2017-02-13 19:35:27 +01:00
Andreas Lauser
b429af41b1 ebos: no longer fail if the EQLDIMS keyword is not explicitly mentioned in the deck
we use the "Eqldims" object which is exposed EclipseState.
2017-02-13 19:20:27 +01:00
Robert Kloefkorn
7f81518b0d When EnableEclOutput is false the EclWriter should not be created.
This fixes a problem with collecttoiorank which needs to be investigated
separately.
2017-02-10 13:45:44 +01:00
Andreas Lauser
a284089d73 adapt to the move of the valgrind client requests into the Opm namespace 2017-02-09 18:25:44 +01:00
Robert Kloefkorn
5579caaa66 Avoid ambiguous call of std::abs. 2017-02-07 11:33:57 +01:00
Andreas Lauser
72a9827c8a EclCpGridManager: export the transmissibilities of the sequential grid
This only makes these transmissibilities available for parallel
computations. The reason is that in the sequential case, they do not
need to be computed during grid creation and they are are also
accessible via the problem object.
2017-01-26 15:11:03 +01:00
Andreas Lauser
460c286974 Merge pull request #144 from totto82/newTrans
Start using face geometry computed the Ecl way
2017-01-20 15:24:05 +01:00
Tor Harald Sandve
ef9966b188 Start using face geometry computed the Ecl way
Face centers are computed using the cell corners. With this
implementation the face center seen from a cell may be different from the
face center seen from its neighbour.

Face normals with area lenghts are calculated using the face corners
directly not using a triangulation point in the center of the face.

This gives transmissibility almost equal to eclipse.
2017-01-19 08:57:44 +01:00
Andreas Lauser
7a7d6d868d ebos: fix the interactions between SWATINIT and threshold pressures
hopefully this makes standalone `ebos` arrive at the same initial
condition as `flow_ebos` if both, SWATINIT and threshold pressures are
enabled. we need to calculate the initial condition twice either
threshold pressures and SWATINIT are enabled. (`ebos` and `flow_ebos`
diverged after OPM/opm-core#1129.)

the proposed patch is a kludge IMO, but in the light that in my
opinion, SWATINIT and threshold pressures are both physically not
justified and given the fact that SWATINIT must not be considered for
the threshold pressues should be considered to be a bug of the
reference simulator, I think the patch is okay.
2017-01-18 16:46:53 +01:00
Markus Blatt
9d7720ef34 Make localIndexMap_ a non-empty list of indices of interior elements.
Judging from ParallelDebugOutput.hh this is what is should be.
Before this commit it was empty as it had space reserved but never
any entries pushed (they were inserted with operator[]).
2017-01-18 16:36:10 +01:00
Markus Blatt
4418685056 Revert "Makes CollectDataToIORank::localIndexMap_ have nonzero size when accessing."
This reverts commit dde79daf4ec2004148a58250c4c8af5390251689.

Judging from ParallelDebugOutput.hh this should not be a map from element
index to interior element index, but an a list of indices of all interior
elements. Therefore we need to reserve and later on push_back.
2017-01-18 16:29:48 +01:00
Markus Blatt
6893c8cbdd Revert "Make CollectDataIORank::localIndexMap_ as map from element to interior element index."
This reverts commit 09db2fd412abe4b8a2f52274bcc0041e4b20a94d.

Judging from ParallelDebugOutput.hh this should not be a map from element
index to interior element index, but an a list of indices of all interior
elements
2017-01-18 16:25:46 +01:00
Markus Blatt
39a0bbc2b3 Fixes pushing to resized array distributedCartesianIndex.
Previously distributedCartesianIndex was resized and afterwards all
entries were added with push_back. Therefore the array was twice as
big as expected and contained wrong values in the front.

With this commit we insert the values using random access. Thus the
size is as expeceted and the index of the entries do not depend on the
order of the grid traversal.
2017-01-18 14:01:23 +01:00
Andreas Lauser
41d258f1c8 Merge pull request #138 from blattms/fix-pr137
Switch of collecting data in non-parallel run.
2017-01-18 13:55:50 +01:00
Andreas Lauser
3d7563902c Merge pull request #134 from andlaus/change-OPM_UNUSED-usage
change the order of OPM_UNUSED and variable name
2017-01-18 13:32:33 +01:00
Markus Blatt
35c13de342 Switch of collecting data in non-parallel run.
Might save some time, space, and suprises.
2017-01-18 12:10:12 +01:00
Markus Blatt
b61ff14eb0 Make CollectDataIORank::localIndexMap_ as map from element to interior element index.
Previously it was an identity map.
2017-01-18 11:16:14 +01:00
Markus Blatt
0aa4b668a9 Makes CollectDataToIORank::localIndexMap_ have nonzero size when accessing.
While it may not produce memory errors it is semantically wrong to insert
entries with random acces into a vector that has reserved enough memory to
hold the values but still has size 0.
2017-01-18 11:10:31 +01:00
Andreas Lauser
61c501a31d change the order of OPM_UNUSED and variable name
it seems like some compilers (GCC 4.9.2?) are picky about this and
require

```c++
TypeName VariableName __attribute__ ((__unused__))
```
2017-01-17 13:28:56 +01:00