Commit Graph

41 Commits

Author SHA1 Message Date
osae
05b7347b1a SWATINIT: Initialisation and capillary pressure scaling. 2018-01-02 14:28:06 +01:00
Andreas Lauser
8c8ed13c16 incorperate the review comments/decisions for multi-region PVT
the largest change is that all classes below opm/core/props/pvt take
the PVT region index as an argument, the higher-level ones (i.e.,
BlackoilProps*) take cell indices.
2018-01-02 14:28:06 +01:00
Andreas Lauser
beed4544de Implement multi-region PVT for all property classes
since they are not using a single PVT table anymore, their "Single"
prefix has been removed...
2018-01-02 14:28:06 +01:00
Andreas Lauser
b5266db401 rename all "newParserDeck" objects to "deck"
The "new" parser is now "the" parser...
2018-01-02 14:28:06 +01:00
Andreas Lauser
55927d68cf remove EclipseGridParser compatibility methods from all classes 2018-01-02 14:28:06 +01:00
osae
8ec7f178de Initialisation of EGLNUM (analogous to e.g SATNUM) 2018-01-02 14:28:06 +01:00
osae
b28c7ed35e Fix to make EQLNUM consistent with ACTNUM.
This should eventually be integrated in the parser.
2018-01-02 14:28:06 +01:00
Andreas Lauser
0467bf8b8f adapt to the renames of the table classes in opm-parser
basically, "Opm::SimpleTable" becomes "Opm::SingleRecordTable".
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
e8f0592599 Fix access to keywords, while still silencing warning.
Previous fix was wrong because it called getKeyword() outside the
hasKeyword() check. Current version (like original code) uses the
short-circuiting behaviour of && to ensure this.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
ec3befafae Avoid signed/unsigned warning. 2018-01-02 14:28:06 +01:00
osae
43839c7923 Equil regions now internally indexed 0..(NTEQUL-1) 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
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
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
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
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
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
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
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
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
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
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
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