Commit Graph

57 Commits

Author SHA1 Message Date
Pål Grønås Drange
4926198e41 Updated opm-core to use new EclipseState API in opm-parser 2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
8b30078339 Remove Equil + EquilWrapper, replace with upstream
Upstream (opm-parser) now provides a better Equil + EquilRecord, and
simultaneously deprecated EquilWrapper. This patch fixes the resulting
breakage.

One important note: The new Equil does not expose integers for live
oil/wet gas initialization procedure methods, but rather booleans
through constRs/constRv methods. This is how the variable behaves
according to the Eclipse reference manual (EQUIL keyword section).

Code has been updated to reflect this.
2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
0b797bd972 Add missing opm-parser headers
opm-parser pull #695
https://github.com/OPM/opm-parser/pull/695
2018-01-02 14:28:06 +01:00
Jørgen Kvalsvik
916a0868cb Fixes includes wrt opm-parser PR-656
Several files stopped compiling due to relying on opm-parser headers
doing includes. From opm-parser PR-656
https://github.com/OPM/opm-parser/pull/656 this assumption is no longer
valid.
2018-01-02 14:28:06 +01:00
Joakim Hove
dbc496bd15 Changed to use new table api from opm-parser. 2018-01-02 14:28:06 +01:00
Joakim Hove
20fb005c24 Fxied bug in table-container use. 2018-01-02 14:28:06 +01:00
Joakim Hove
465eb704fa Changed Table code to use TableContainer 2018-01-02 14:28:06 +01:00
Bård Skaflestad
65a63b95a3 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
    }
2018-01-02 14:28:06 +01:00
babrodtk
e999a7fb30 Fixed several warnings 2018-01-02 14:28:06 +01:00
Joakim Hove
dd42660a00 Using TableManager to get tables. 2018-01-02 14:28:06 +01:00
Markus Blatt
dec7a93918 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.
2018-01-02 14:28:06 +01:00
Andreas Lauser
18c641e0c7 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...
2018-01-02 14:28:06 +01:00
Robert K
b6e5dcd706 remove unused typedef to avoid compiler warning and keep code clean. 2018-01-02 14:28:06 +01:00
Andreas Lauser
5518843275 adapt the the table related API changes of opm-parser 2018-01-02 14:28:06 +01:00
Tor Harald Sandve
70dc519539 Implements initialization for constant capillary pressure functions 2018-01-02 14:28:06 +01:00
osae
c4b5a7e302 Make use of EclipseState for EQLNUM and SWATINIT. 2018-01-02 14:28:06 +01:00
osae
10f5b07915 SWATINIT: Initialisation and capillary pressure scaling. 2018-01-02 14:28:06 +01:00
Andreas Lauser
897f64c21a 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
68623918a7 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
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
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
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
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
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
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