Commit Graph

33 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
1c6a4b34da Update to shared_ptr-less parser interface. 2016-10-20 14:08:04 +02:00
Andreas Lauser
83a9f6ffce threshold pressure defaults: calculate the pressure difference like when computing the fluxes
this should not change the value of the result at all (because the
total delta which is added to the phase pressures stays identical),
but it should be less confusing when comparing this with the code that
calculates the gravity correction term in the flux calculation.
2016-09-28 16:57:34 +02:00
Andreas Lauser
000fde19dc threshold pressures: simplify code for the density calculation a bit 2016-09-28 16:57:34 +02:00
Andreas Lauser
4f4d7531af threshold pressure: be more cautious when acessing the defaults
maybe it worked as-is, or maybe decks which lead to illegal accesses
to the map are incorrect (i.e., they specify threshold pressures for
EQUIL-regions that do not touch), but let's play save here...
2016-09-28 16:56:54 +02:00
Andreas Lauser
662d6e28cd threshold pressures: properly consider the dissolved components for the density
even if a phase is saturated, the dissolved component must be
considered when calculating the fluid density.
2016-09-28 16:55:15 +02:00
Andreas Lauser
ae3248da8b threshold pressure: use phase pressure instead of reference pressure...
... to calculate phase densities for the threshold pressure
defaults. I don't know if the reference simulator does this, but this
makes it consistent with what's done in the flux calculation of flow.
2016-09-28 16:54:00 +02:00
Pål Grønås Drange
bd58792714 TransMult, Init, and SimConfig are references, applyModifierDeck takes reference, and EclipseState constructor too 2016-08-08 10:07:09 +02:00
babrodtk
a1504a2bff Runs first iterations of two-phase case plausibly 2016-04-26 07:49:12 +02:00
Pål Grønås Drange
170a71eef8 Using API get3DProperties. 2016-04-14 11:37:27 +02:00
Andreas Lauser
bf283f8684 threshold pressures: consider the saturated case and fix a typo
the typo was caused the surface density of the oil phase to be used
instead of the one of gas. This caused the density to be off by a
factor of typically about 900.

using saturated FVFs does not change much, but it does not hurt
because it is also done that way in the simulator.

This makes the defaults for the threshold pressures reasonable again,
but for some reason they are not exactly the same as in the old
implementation. (although the differences are very tolerable.)

On the question why only "Model 2" is affected by this: the other
decks don't use threshold pressures (SPE-X) or do not default any
values (Norne).
2016-03-08 14:52:09 +01:00
Andreas Lauser
1f1dfbfc65 replace the blackoil PVT classes by the ones of opm-material
the opm-material classes are the ones which are now used by
opm-autodiff and this patch makes it much easier to keep the opm-core
and opm-autodiff results consistent. Also, the opm-material classes
seem to be a bit faster than the opm-core ones (see
https://github.com/OPM/opm-autodiff/pull/576)

I ran the usual array of tests with `flow`: SPE1, SPE3, SPE9 and Norne
all produce the same results at the identical runtime (modulo noise)
and also "Model 2" seems to work.
2016-03-05 19:11:44 +01:00
Atgeirr Flø Rasmussen
5bb705fda8 Merge pull request #953 from andlaus/const_gridproperties
fix the build
2016-02-19 11:46:32 +01:00
Jørgen Kvalsvik
369050cc9c 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-18 08:50:26 +01:00
Andreas Lauser
e775df6d23 fix the build
it broke because EclipseState::get*GridProperty() now returns a
pointer to a constant object.
2016-02-15 15:06:05 +01:00
Tor Harald Sandve
153365f4d0 Adapt to changes in the NNC class 2015-12-08 13:03:15 +01:00
Tor Harald Sandve
298442c281 Cleanup after rebase
- cleanup of some rebase mess
- Added comments
- Use the maxDp for the NNCs
- remove misplaced break in the pinchprocessor
2015-12-08 09:50:07 +01:00
Tor Harald Sandve
5b1f249f96 Calculate thresholdPressures for the NNCs 2015-12-08 09:25:35 +01:00
Atgeirr Flø Rasmussen
7edd081175 Silence some warnings. 2015-12-01 13:36:08 +01:00
Andreas Lauser
7e05127c48 thresholdPressures(): move the code which calculates the maximum gravity corrected pressure difference between EQLNUM regions to its own function
requested by [at]atgeirr
2015-11-13 15:36:50 +01:00
Andreas Lauser
77893e415e thresholdPressures(): split several long lines
as requested by [at]atgeirr
2015-11-13 15:13:28 +01:00
Andreas Lauser
f13e7fd300 thresholdPressures(): constify all local variables which can be made constant
I have doubts if this will change anything in the binaries (and in my
personal opinion, these 'const's look quite ugly and are sometimes a
(small) annoyance when debugging), but I don't mind using the coding
style used by most of the rest of opm-core here.
2015-11-13 15:13:15 +01:00
Andreas Lauser
3ccc0b5aa0 THPRES: only update the threshold pressure between regions if the saturation of the upstream cell is larger than the residual saturation
before it was 0. Again, thanks to [at]totto82 for the suggestion.
2015-11-05 15:39:29 +01:00
Andreas Lauser
df9a927c5b THPRES: change the sign of the gravity correction
we're correcting the pressure at the cell center depths to get the
pressure at the face depth, not the other way around. This is
confusing...

thanks to [at]totto82 for discovering this.
2015-11-05 12:29:19 +01:00
Andreas Lauser
028cd32f11 fix a compressed vs logically Cartesian cell index bug
PVTNUM is for logically Cartesian indices, but was accessed by
compressed ones.
2015-11-05 12:29:19 +01:00
Andreas Lauser
6d86e9bd20 implement determining the threshold pressure from the initial condition
This needs to be done if a equilibration region transition is
mentioned by the THPRES keyword, but no value is given for this record
in the third item. (it seems that this is used quite frequently.)

Also, the approach taken by this patch also does not collide with the
restart machinery as far as I can see. This is because the initial
condition is applied by the simulator before the state at the restart
time is loaded. (I interpreted the code that way, but I could be
wrong, could anyone verify this?)

since it is pretty elaborate to calculate initial condition, this
patch is pretty messy. I also do not know if Eclipse does include
capillary pressure in this calculation or not (this patch does). Huge
kudos go to [at]totto82 for reviewing, testing and debugging this.
2015-11-05 12:29:19 +01:00
Joakim Hove
f3dd2451d2 Using map base ThresholdPressure implementation. 2015-08-25 16:22:37 +02:00
Fredrik Gundersen
f2b75a6a41 Updated as needed by new opm-parser functinality 2015-08-24 15:37:49 +02:00
Fredrik Gundersen
484cb0216f Added suport for new Threshold Pressure behavior 2015-08-20 13:00:01 +02:00
chflo
761b9b4a41 opm-166: Changes after review 2015-02-16 11:59:16 +01:00
chflo
33078d00e3 OPM-166: Use SimulationConfig instead of Deck to get threshold pressure 2015-02-16 08:43:47 +01:00
Joakim Hove
a2ae3baea3 Protecting against use of unassigned deck values. 2015-01-14 11:41:41 +01:00
Atgeirr Flø Rasmussen
8cd6be1244 Fix minor typo in comment. 2014-08-27 18:13:15 +02:00
Atgeirr Flø Rasmussen
a21f20f462 New free function thresholdPressures(). 2014-08-27 18:07:46 +02:00