Commit Graph

482 Commits

Author SHA1 Message Date
Andreas Lauser
5194a1a782 rename all "newParserDeck" objects to "deck"
The "new" parser is now "the" parser...
2018-01-02 14:28:06 +01:00
Andreas Lauser
bd45d3e693 remove EclipseGridParser compatibility methods from all classes 2018-01-02 14:28:06 +01:00
osae
bc558f3818 Initialisation of EGLNUM (analogous to e.g SATNUM) 2018-01-02 14:28:06 +01:00
osae
6f3a03c072 Inserted some documentation. 2018-01-02 14:28:06 +01:00
osae
6a587ba8d9 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
3bf249e1ab 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
c8d13d2a79 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
91dedb0eea Avoid signed/unsigned warning. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
65e435e139 Comment out unused function argument. 2018-01-02 14:28:06 +01:00
osae
7207b50721 Equil regions now internally indexed 0..(NTEQUL-1) 2018-01-02 14:28:06 +01:00
osae
1a30326e1a New parser included. 2018-01-02 14:28:06 +01:00
osae
abb8a63e6d Default equil region should be one not zero ...
Otherwise problems when kw EQLNUM is used.
2018-01-02 14:28:06 +01:00
osae
a2cd03197c 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
ad285d452c Bugfix in RsSatAtContact: use min(), not max().
Also modified test to match output.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
6ccc8d7bf8 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
bbcf7a5833 Remove debugging output. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
5aa1a0f999 Add computeRs() function and use from InitialStateComputer. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
a340781958 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
cd39c887f5 Added Rv field to InitialStateComputer.
It is currently not computed, as for Rs.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
09e73f2dbd Moved implementation of phaseSaturations() to _impl file. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
02b1d21393 Refactor copying of region to global data. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
055769b8bd Rename PhasePressureSaturationComputer -> InitialStateComputer.
Also add (unused so far) rs_ field to class.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
5c669614bf Added size() method to CellRange inner class. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
9569ea304f Enable live oil in initialisation. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
074dbbb599 Removed redundant calcPressII() method.
Pressure is also calculated in the calcPressSat() method.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
319bbe5ca6 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
0d565d798f Made NoMixing a class.
For uniformity with its sibling classes.
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
406cfe578e Prune includes. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
e1dac5269b Moved equilibration utilities to separate file. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
e2913a178c Capitalize nested namespace names.
equil -> Equil
miscibility -> Miscibility
2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
f02270fbdc 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
bbf2907f42 Added class RsSatAtContact (not tested). 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
9d2eed7e5a 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
0a8ae66046 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
f8f9dc538a Fix bugs in saturation initialisation and helpers. 2018-01-02 14:28:06 +01:00
Atgeirr Flø Rasmussen
66d5ccbd6c 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
b836f98788 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
09a839f82b 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
8dfab5ab67 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
6c5ed7b8ff 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
17e93c5cce 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
b21d3734db Document requirements of CellRange. 2018-01-02 14:28:06 +01:00
Bård Skaflestad
db2a21442c Document public interface of phasePressures(). 2018-01-02 14:28:06 +01:00
Bård Skaflestad
0ce1e96a00 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
4c63659b61 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
5ec0aec02e 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
Tor Harald Sandve
321af5ff4d Start using the BlackoilFluidState 2017-12-15 08:20:09 +01:00
Andreas Lauser
ab72522e6c grid managers: update the GridPart / GridView after loadBalance()
depending on the grid implementation, the grid view / grid part object
does not necessarily follow the change. For some reason, the grid part
still does not work in the parallel case (tested with dune-fem 2.4),
but that seems to be an issue on the dune-fem side.
2017-12-11 15:19:09 +01:00
Andreas Lauser
0cad40e420 black-oil: do not write the saturated oil formation factor to VTK anymore
this quantity is pretty useless, and the analogous one for wet gas was
never written...
2017-12-06 15:06:29 +01:00
Atgeirr Flø Rasmussen
6a5c6ea227 Merge pull request #241 from totto82/removeInitDupl
Prepare for using the initial solution from ebos directly
2017-12-05 08:44:29 +01:00