Commit Graph

872 Commits

Author SHA1 Message Date
osae
ce05475010 Update tests and provide some eclipse output. 2018-01-02 14:28:06 +01:00
osae
27579736dd New parser included. 2018-01-02 14:28:06 +01:00
osae
b79455fea6 Default equil region should be one not zero ...
Otherwise problems when kw EQLNUM is used.
2018-01-02 14:28:06 +01:00
osae
c5b07d9623 Some adjustments to equil initialisation.
- Saturations, phase pressures, and standard initialsation of RS and RV
   now agree to baseline.
 - Tables of RS and RV versus vertical depth (kw RSVD RVVD) have been
   hardcoded for testing (need new parser) and the calculations agree to
   baseline in the gas and oil zones.  In the water zone there is some
   differences: Our code computes saturated RS and RV using the final
   phase pressures (these are modified to be consistent with saturations
   and capillary pressures) while the baseline uses unmodified phase pressures.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
b8d48a5fc8 Bugfix in RsSatAtContact: use min(), not max().
Also modified test to match output.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
1923de2694 Fix bug in RS initialisation.
Also throw if default init is specified and datum != goc depth.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
0bfa30de7b Added simple program example for initialisation. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
6e607115fd Remove debugging output. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
8728e43722 Add computeRs() function and use from InitialStateComputer. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
d2741a76be Add initStateEquil() function.
It is not quite complete yet for the following reasons:
  - it does not compute state.surfacevol(),
  - the InitialStateComputer class does not compute Rs or Rv,
  - it has not been verified.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
128829e7c8 Added Rv field to InitialStateComputer.
It is currently not computed, as for Rs.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
b53944f30a Moved implementation of phaseSaturations() to _impl file. 2018-01-02 14:28:06 +01:00
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