Commit Graph

910 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
6144730b47 Refactor copying of region to global data. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
5ee2c0cbc9 Rename PhasePressureSaturationComputer -> InitialStateComputer.
Also add (unused so far) rs_ field to class.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
a0d3bf6dd7 Added size() method to CellRange inner class. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
9c047f4533 Add test for live oil initialisation.
The test is not finished or verified yet.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
843517e517 Enable live oil in initialisation. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
b6315cabd6 Removed redundant calcPressII() method.
Pressure is also calculated in the calcPressSat() method.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
0d25ad9ec4 Made phase mixing functors a class hierarchy.
In summary:
 - added RsFunction (base class),
 - made NoMixing, RsVD, RsSatAtContact inherit RsFunction,
 - RS and RV are no longer template arguments for EquilReg class,
 - EquilReg constructor now takes two shared_ptr<Miscibility::RsFunction>,
 - use of constructor updated, mostly using make_shared.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
865469129f Made NoMixing a class.
For uniformity with its sibling classes.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
37635c9b58 Prune includes. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
7035e37737 Moved equilibration utilities to separate file. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
50a7bae23e Capitalize nested namespace names.
equil -> Equil
miscibility -> Miscibility
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
07ca74800a Move RegionMapping class to its own header, add test.
Class now resides in opm/core/utility/RegionMapping.hpp.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
6c75579c67 Added class RsSatAtContact (not tested). 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
652283d87d Add test case with overlapping transitions.
Capillary pressure functions and contact depths
have been modified to ensure a large overlap.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
734046e16e Fix bug in saturation initialisation.
We shall only use gas-water capillary to initialise when we would get
unphysical saturations otherwise.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
e51b161c89 Add test case with capillary transition region. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
9712b61747 Add saturation computation to and rename computer class.
Opm::equil::DeckDependent::PhasePressureComputer ->
Opm::equil::DeckDependent::PhasePressureSaturationComputer
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
cc50cb94c1 Add test case for capillary inversion. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
5b0534c372 Add another test deck for initialisation.
This deck includes capillary functions.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
2ec3a80cfb Fix bugs in saturation initialisation and helpers. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
50c6fa8863 Add saturation init facilities.
This adds the function phaseSaturations() and some helpers:
satFromPc() and satFromSumOfPcs().
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
2056623044 Complete pressure test for dead-oil deck. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
95ce3c4657 Modify test data. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
55fcdec734 Add (defaulted) gravity argument in some places.
This is done to facilitate testing, using gravity = 10 m/s^2 for example.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
33a2030170 Still working on test_equil.cpp. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
b9589097fc Fix contact depths in test deck. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
ba4461a26c Throw exception if datum not in oil zone.
We are not capable of handling this, and must abort.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
6362621c13 Created simple data for init testing. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
7997917c07 Add (unfinished) test case. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
97014713ce Removed RK4IVP's inheritance from binary_function.
Three reasons:
 - class is a unary functor,
 - the typedefs obtained were not used,
 - binary_function is deprecated in C++11.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
ba82e3fa5e Add a layer of glue to extract data from deck
This is a work in progress.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
30ba1b0f86 Install crude handling of data point outside vertical span
The initial implementation of RK4IVP<>::operator() failed to take
into account the possibility that we might need to evaluate the
function outside the vertical span for which it was initially
defined.  This situation occurs, for instance, in the not uncommon
cases of the GOC being above or the WOC being below the model.

This commit installs a crude Hermitian extrapolation procedure to
handle these cases.  Refinements are likely.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
4779b43e88 Include <numeric> for std::iota()
Header was missing in earlier revision.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
693612c0e2 Document requirements of CellRange. 2018-01-02 14:28:06 +01:00
Bård Skaflestad
5cdcd77820 Document public interface of phasePressures(). 2018-01-02 14:28:06 +01:00
Bård Skaflestad
9ddca948ff Add reverse look-up mapping for region vectors
Class RegionMapping<> provides an easy way of extracting the cells
that belong to any identified region (e.g., as defined by EQLNUM) of
the deck.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
9bd0a58b35 Test cell subset phase pressure assignment. 2018-01-02 14:28:06 +01:00
Bård Skaflestad
d9766b0f6d Compute phase pressures in subset of cells
This commit adds support for assigning the initial phase pressure
distribution to a subset of the total grid cells.  This is needed in
order to fully support equilibration regions.  The existing region
support (template parameter 'Region' in function 'phasePressures()')
was only used/needed to define PVT property (specifically, the fluid
phase density) calculator pertaining to a particular equilibration
region.
2018-01-02 14:28:06 +01:00
Bård Skaflestad
1a182d4a48 Add basic equilibration facility
This commit adds a simple facility for calculating initial phase
pressures assuming stationary conditions, a known reference pressure
in the oil zone as well as the depth and capillary pressures at the
water-oil and gas-oil contacts.

Function 'Opm::equil::phasePressures()' uses a simple ODE/IVP-based
approach, solved using the traditional RK4 method with constant step
sizes, to derive the required pressure values.  Specifically, we
solve the ODE

      dp/dz = rho(z,p) * g

with 'z' represening depth, 'p' being a phase pressure and 'rho' the
associate phase density.  Finally, 'g' is the acceleration of
gravity.  We assume that we can calculate phase densities, e.g.,
from table look-up.  This assumption holds in the case of an ECLIPSE
input deck.

Using RK4 with constant step sizes is a limitation of this
implementation.  This, basically, assumes that the phase densities
varies only smoothly with depth and pressure (at reservoir
conditions).
2018-01-02 14:28:06 +01:00
Andreas Lauser
b5e9bb14ec Merge pull request #249 from andlaus/adapt_to_thermal_laws
adapt to the refactoring of the thermal laws in opm-material
2017-12-14 11:41:33 +01:00
Andreas Lauser
a99ef4af4f Merge pull request #251 from andlaus/maintainance
Maintainance
2017-12-13 13:19:06 +01:00
Andreas Lauser
a619a1115b finger_immiscible_ecfv_adaptive: update reference solution
for some reason it changed slightly.
2017-12-13 00:54:25 +01:00
Andreas Lauser
db2977b0bf adapt to the refactoring of the thermal laws in opm-material 2017-12-11 17:39:56 +01:00
Andreas Lauser
c0f013e25e use BlackOilFluidState from opm-material
this has recently been moved there. Since redundancy is considered to
be bad, switch eWoms to it.

I've tested this with Norne: No measureable difference, as expected.
2017-12-04 13:02:51 +01:00
Andreas Lauser
6fcfd3a363 Merge pull request #235 from andlaus/update_refsols
Update refsols
2017-11-17 19:01:03 +01:00
Andreas Lauser
c7a60b31ea update the reference solution for the tutorial
this changed because the density for LNAPL was changed to a more
realistic value of 690 kg/m^3 (same as iso-octane) from the previous
890 kg/m^3.
2017-11-17 14:03:04 +01:00
Andreas Lauser
b2d9bf1a82 update the reference solution for finger_immiscible_vcfv
for some reason the results have changed. (IMO, the new ones look more
correct in paraview.) The reason this was not discovered earlier is
that this test depends on the presence of dune-alugrid and the CI
infrastructure does not deal with this.
2017-11-17 14:03:04 +01:00
Andreas Lauser
fa1516bcd0 Merge pull request #225 from andlaus/minor_fixes
Minor fixes
2017-10-04 10:49:15 +02:00
Andreas Lauser
aca56a43e3 make all headers self-sufficient again
after the recent changes, some additional headers are required to be
included.
2017-10-03 12:48:21 +02:00
Andreas Lauser
0fccd5acb7 reference solutions: do not use symbolic links anymore
the reason is that cmake cannot file(COPY) them. this is probably due
to constraints of a crappy operating system that is made by a
microscopical and tender company which is based close to Seattle.
2017-10-03 12:39:46 +02:00