Commit Graph

50 Commits

Author SHA1 Message Date
Bård Skaflestad
99368d73d2 RegionMapping<>: Support arbitrary region IDs
This commit introduces a new public method, activeRegions(), that
retrieves those region IDs that contain at least one active cell.
We furthermore extend the cells() method to support lookup of
arbitrary region IDs.  Non-active region IDs produce empty cell
ranges.

Intended use case is

    for (const auto& reg : rmap.activeRegions()) {
        const auto& c = rmap.cells(reg);

        // use c
    }
2015-09-15 15:33:22 +02:00
babrodtk
2d252964ed Fixed several warnings 2015-09-03 15:17:10 +02:00
Joakim Hove
08a77e36d0 Using TableManager to get tables. 2015-09-01 12:58:09 +02:00
Markus Blatt
5b8442d985 Ported initStateEquil to using the GridHelpers.
Currently the keyword EQUIL is not supported by the fully
implicit blackoil simulator when using CpGrid. This
commit is a first step towards this as it makes the
implementation of initStateEquil generic.
2015-02-20 09:39:50 +01:00
Andreas Lauser
64107ecc1b PVT properties: allow them to be temperature dependent
Note that this patch does not introduce any real temperature
dependence but only changes the APIs for the viscosity and for the
density related methods. Note that I also don't like the fact that
this requires so many changes to so many files, but with the current
design of the property classes I cannot see a way to avoid this...
2014-12-01 20:06:31 +01:00
Robert K
da6b4109ba remove unused typedef to avoid compiler warning and keep code clean. 2014-10-24 12:51:57 +02:00
Andreas Lauser
36e3538b04 adapt the the table related API changes of opm-parser 2014-09-19 14:40:35 +02:00
Tor Harald Sandve
91bdb7dde2 Implements initialization for constant capillary pressure functions 2014-08-11 11:23:15 +02:00
osae
c1732b0b32 Make use of EclipseState for EQLNUM and SWATINIT. 2014-06-26 14:46:57 +02:00
osae
a9138ef574 SWATINIT: Initialisation and capillary pressure scaling. 2014-06-25 18:03:17 +02:00
Andreas Lauser
749d0e838d 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.
2014-06-04 11:11:35 +02:00
Andreas Lauser
9a7b068d15 Implement multi-region PVT for all property classes
since they are not using a single PVT table anymore, their "Single"
prefix has been removed...
2014-06-04 11:11:35 +02:00
Andreas Lauser
6a50afb219 rename all "newParserDeck" objects to "deck"
The "new" parser is now "the" parser...
2014-05-21 11:22:43 +02:00
Andreas Lauser
f360562aee remove EclipseGridParser compatibility methods from all classes 2014-05-21 11:22:43 +02:00
osae
d648917fcf Initialisation of EGLNUM (analogous to e.g SATNUM) 2014-05-06 12:47:24 +02:00
osae
bd38a577ae Fix to make EQLNUM consistent with ACTNUM.
This should eventually be integrated in the parser.
2014-05-05 11:23:43 +02:00
Andreas Lauser
0cdc32d213 adapt to the renames of the table classes in opm-parser
basically, "Opm::SimpleTable" becomes "Opm::SingleRecordTable".
2014-04-28 18:47:28 +02:00
Atgeirr Flø Rasmussen
ba26696d22 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.
2014-04-15 14:52:21 +02:00
Atgeirr Flø Rasmussen
cd0d48abbd Avoid signed/unsigned warning. 2014-04-15 13:40:50 +02:00
osae
3de80989a2 Equil regions now internally indexed 0..(NTEQUL-1) 2014-03-31 16:16:45 +02:00
osae
b86fa0af86 New parser included. 2014-03-28 17:35:43 +01:00
osae
b485d03711 Default equil region should be one not zero ...
Otherwise problems when kw EQLNUM is used.
2014-03-28 17:18:50 +01:00
osae
e1d2fa2088 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.
2014-03-26 14:53:47 +01:00
Atgeirr Flø Rasmussen
1c9675605c Fix bug in RS initialisation.
Also throw if default init is specified and datum != goc depth.
2014-02-27 14:48:14 +01:00
Atgeirr Flø Rasmussen
1b3cac2433 Remove debugging output. 2014-02-27 13:27:07 +01:00
Atgeirr Flø Rasmussen
af9c1fc4cc Add computeRs() function and use from InitialStateComputer. 2014-02-27 13:14:48 +01:00
Atgeirr Flø Rasmussen
f84162bc39 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.
2014-02-27 10:40:14 +01:00
Atgeirr Flø Rasmussen
4aaeff0078 Added Rv field to InitialStateComputer.
It is currently not computed, as for Rs.
2014-02-27 10:39:18 +01:00
Atgeirr Flø Rasmussen
0fbc3a1ccb Moved implementation of phaseSaturations() to _impl file. 2014-02-27 09:37:48 +01:00
Atgeirr Flø Rasmussen
a1192c09dc Refactor copying of region to global data. 2014-02-27 09:31:48 +01:00
Atgeirr Flø Rasmussen
a7c45d4e9f Rename PhasePressureSaturationComputer -> InitialStateComputer.
Also add (unused so far) rs_ field to class.
2014-02-27 09:08:39 +01:00
Atgeirr Flø Rasmussen
27743b4a13 Enable live oil in initialisation. 2014-02-27 08:31:03 +01:00
Atgeirr Flø Rasmussen
d5ffcc051c Removed redundant calcPressII() method.
Pressure is also calculated in the calcPressSat() method.
2014-02-26 14:49:06 +01:00
Atgeirr Flø Rasmussen
38c89f363d 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.
2014-02-26 14:47:24 +01:00
Atgeirr Flø Rasmussen
74573947bb Prune includes. 2014-02-24 16:11:50 +01:00
Atgeirr Flø Rasmussen
7e0bd62205 Moved equilibration utilities to separate file. 2014-02-24 16:09:04 +01:00
Atgeirr Flø Rasmussen
64b6a40191 Capitalize nested namespace names.
equil -> Equil
miscibility -> Miscibility
2014-02-24 15:55:14 +01:00
Atgeirr Flø Rasmussen
2b0fcfe748 Move RegionMapping class to its own header, add test.
Class now resides in opm/core/utility/RegionMapping.hpp.
2014-02-24 15:19:04 +01:00
Atgeirr Flø Rasmussen
c689bc757f Added class RsSatAtContact (not tested). 2014-02-24 13:47:03 +01:00
Atgeirr Flø Rasmussen
6c8babc7d2 Fix bug in saturation initialisation.
We shall only use gas-water capillary to initialise when we would get
unphysical saturations otherwise.
2014-02-21 14:47:14 +01:00
Atgeirr Flø Rasmussen
b2be489e6e Add saturation computation to and rename computer class.
Opm::equil::DeckDependent::PhasePressureComputer ->
Opm::equil::DeckDependent::PhasePressureSaturationComputer
2014-02-21 08:52:25 +01:00
Atgeirr Flø Rasmussen
e1069cf39b Fix bugs in saturation initialisation and helpers. 2014-02-20 15:24:27 +01:00
Atgeirr Flø Rasmussen
b09dd7750a Add saturation init facilities.
This adds the function phaseSaturations() and some helpers:
satFromPc() and satFromSumOfPcs().
2014-02-19 13:42:07 +01:00
Atgeirr Flø Rasmussen
82216fa24f Add (defaulted) gravity argument in some places.
This is done to facilitate testing, using gravity = 10 m/s^2 for example.
2014-02-19 13:38:21 +01:00
Bård Skaflestad
311ac78340 Add a layer of glue to extract data from deck
This is a work in progress.
2014-01-23 10:16:49 +01:00
Bård Skaflestad
ada48fd0b5 Document requirements of CellRange. 2014-01-21 17:54:47 +01:00
Bård Skaflestad
955cb795f3 Document public interface of phasePressures(). 2014-01-21 17:54:47 +01:00
Bård Skaflestad
6814b97698 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.
2014-01-21 17:54:47 +01:00
Bård Skaflestad
c582d00fb6 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.
2014-01-21 17:54:46 +01:00
Bård Skaflestad
4c39a8a595 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).
2014-01-21 17:54:46 +01:00