Commit Graph

720 Commits

Author SHA1 Message Date
Tor Harald Sandve
88ee892fdf pass the saltConcentration to the waterPVT 2020-07-02 13:44:01 +02:00
Bård Skaflestad
7cf035da80 EclWriter: Refactor Cell Loop out to Helper Function
That way we can use the same code for both the 'writeOutput' and
the 'evalSummaryState' member functions.  While here, also change
the declared types of 'wellData' and 'groupData' to 'auto' in
preparation of API updates for collecting group- and well level
guiderate data.

Finally, apply 'const' where possible.
2020-06-27 21:14:09 +02:00
Joakim Hove
b52366926a Add Action::State member to EclPropblem and pass it to io/ActionX 2020-06-17 12:25:03 +02:00
Bård Skaflestad
0310fa4edf
Merge pull request #2673 from blattms/fix-tranyxyz-sub-3D
[bugfix] Fix TRANXYZ for problems with less than 3 dimensions.

Also subsumes and closes #2150.
2020-06-15 17:15:48 +02:00
Markus Blatt
2e9cfffea6 Fix TRANXYZ for problems with less than 3 dimensions.
Up to now We always assumed that cardDims[i]>1 holds. which it does for most
of the cases. But when e.g. simulating a vertical stack of 5 cells
flow would report the transmissibilities in the Z direction in TRANX
and output TRANZ as zero. Similar problems should be there for 2D grids.

With this commit we actually check whether there can be neighbours in
the X and Z direction to prevent this behavior.
2020-06-15 10:40:26 +02:00
Arne Morten Kvarving
44bec2d7db changed: delay deck dereference
this was harmless unless enableExperiments was given, since
the deck ref is not used otherwise, but it caused an UBSAN issue
when run in parallel.
2020-06-15 09:50:06 +02:00
Joakim Hove
754f74df01 Adapt variant serialization to four types 2020-06-12 07:21:46 +02:00
Joakim Hove
a1306a62fc Add serialization of std::variant<T1,T2,T3> 2020-06-10 20:41:14 +02:00
Atgeirr Flø Rasmussen
cdbbdd828e Always create proper case name.
Without this, rank 0 gets an empty case name, resulting in
buggy VTK output with filenames containing the genereric stem
"sim" rather than the case name as stem.
2020-05-29 10:28:42 +02:00
Atgeirr Flø Rasmussen
20c63f9f49
Merge pull request #2624 from OPM/fix/adapt-to-propertysystem-changes
adapt to changes in the property system
2020-05-28 12:05:17 +02:00
Joakim Hove
fd8c79b668 Default to initialize from restart file in case of restarted run 2020-05-21 10:15:20 +02:00
Bernd Flemisch
21df1cbe31 [properties] adapt to changes in the property system
`NEW_PROP_TAG` is now a definition and not just a declaration.
Eliminate superfluous declarations, include headers with definitions.
Make one necessary forward declaration explicit.
2020-05-18 15:54:26 +02:00
Kai Bao
93655244ce increasing the max iteration number for statFromPc
when doing the equilibration.
2020-04-30 12:12:58 +02:00
Bård Skaflestad
b288602dfc Equilibration: Add Experimental Support for Horizontal Subdivision
This commit adds a very early, alpha-quality implementation of the
"horizontal subdivision" strategy (N < 0) of the EQUIL directive.
This in turn enables more accurate derivations of the initial fluids
in place.

Interactions with SWATINIT are completely untested, and the initial
Rs/Rv derivations in this context are possibly incomplete.  More
work is likely needed in this area, but this does at least enable
more widespread testing.
2020-04-22 20:10:19 +02:00
Bård Skaflestad
4b04a36a2f Initial State Calculator: Prune Unneeded Steps and Variables
In particular, remove unneeded function parameters and don't form a
per-cell PVT zero-based index when we're not going to use the
values.
2020-04-22 20:10:19 +02:00
Bård Skaflestad
f0ed53a6f1 Vertical Extent: Prune Unneeded 'cellcount' Parameter
The purpose of this function is to determine the vertical extent of
a set of cells.  Counting the number of cells in the region is not
its responsibility.
2020-04-22 20:10:19 +02:00
Bård Skaflestad
6292855bd5 Initial State Calculator: Refactor Cell Loop
This commit splits out the per-cell initial state derivation to two
separate helper functions, equilibrateCellCentres() and cellLoop().
The latter manages the per-cell assignments to pertinent data
members and calls an arbitrary "equilbration method" that is
provided as a callback and which calculates per-cell phase
pressures, phase saturations and mixing ratios (Rs/Rv).

In turn, the equilibrateCellCentres() uses the cellLoop() to affect
the existing equilibration procedure within a cell using values at
the depths of the cell centres only.
2020-04-22 20:10:19 +02:00
Bård Skaflestad
fd2d8536eb Refactor Phase Saturation Derivation Procedure
This commit introduces a new helper class,

    Opm::EQUIL::Details::PhaseSaturations<>

that subsumes the responsibility of the existing helper function

    Opm::EQUIL::phaseSaturations<>()

and generalises that functionality to arbitrary depth points within
single cells.  This is in preparation of adding support for the N<0
case of the initial fluid in place procedure defined in the EQUIL
keyword.  The class consumes an already equlibrated pressure table
for the pertinent equilibration region, calculates capillary
pressure values and inverts Pc curves to derive saturation values.
If the capillary pressure curves are constant within a cell, then a
simple depth consideration with respect to the implied sharp phase
interface is used to derive saturation values.  We also preserve
existing support for SWATINIT-type initialisation of the water
saturation field.

Switch InitialStateComputer<>::calcPressSatRsRv() over to using the
pressure and saturation helper classes instead of the original
helper functions since this provides additional control.  Also
remove those helper functions to reduce risk of confusion over which
method to use.  Update the unit tests accordingly.
2020-04-14 23:01:02 +02:00
Bård Skaflestad
d039a1d60e Basic Equilibration: Prepare for Subdivision Strategy
This commit is the first step of several that implements ECLIPSE's
"accurate fluid-in-place" model initialization procedure based on
subdividing the vertical range/extent of individual cells.  This
first step puts the O/G/W phase-pressure calculation into a helper
class,

    Opm::EQUIL::Details::PressureTable<>

through which phase pressure values can be calculated at abritrary
depths rather than just at the cell centre depths.  In other words,
this helper class extends and subsumes the responsibilities of the
existing helper functions

    Opm::EQUIL::Details::PhasePressure::assign()
    Opm::EQUIL::Details::PhasePressure::oil()
    Opm::EQUIL::Details::PhasePressure::gas()
    Opm::EQUIL::Details::PhasePressure::water()

We still use the same ODE-based evaluation procedure for the phase
pressures and the equilibrateOWG() helper function still computes
the phase pressure values at cell centre depths only.

That, in turn, corresponds to the "N = 0" case (steady state) of the
basic equilibration facility.
2020-04-14 23:01:02 +02:00
Joakim Hove
5a09624ad6 Add call to evaluate PYACTION in eclproblem::applyActions() 2020-04-14 08:48:32 +02:00
Joakim Hove
76111897a6 MOve String utility in opm-common 2020-04-04 16:28:16 +02:00
Bård Skaflestad
74368c5f98
Merge pull request #2452 from blattms/use-region-temperature-cleaned
Use correct region temperature when calculating RS/RV
2020-04-02 15:08:53 +02:00
Alf Birger Rustad
62f5ba95b4 Enable owner first ordering by default 2020-04-01 12:58:59 +02:00
Joakim Hove
d6a1d3029e Use std::shared_ptr for Python handle to Schedule 2020-03-31 12:28:07 +02:00
Arne Morten Kvarving
a456b7dff5 fixed: broadcasting an int and receiving as a size_t is a very bad idea
pointy-hat: me
2020-03-30 11:48:00 +02:00
Joakim Hove
30216212c4 Add Python argument to Schedule constructor 2020-03-26 10:15:07 +01:00
Joakim Hove
54cd4f96f7
Merge pull request #2496 from akva2/tracers_from_state
Use tracers from EclipseState
2020-03-25 10:17:56 +01:00
Arne Morten Kvarving
5fd85c1446
Merge pull request #2497 from akva2/deck_avoid
Avoid deck usage in simulator
2020-03-24 08:28:21 +01:00
Arne Morten Kvarving
1424b8e859 changed: use Deck unit system from EclipseState
to avoid deck usage in simulator
2020-03-23 15:54:48 +01:00
Arne Morten Kvarving
b3bf3c58b2 changed: use TracerConfig from opm-common 2020-03-23 15:52:53 +01:00
Arne Morten Kvarving
55ad96a067 use TracerVdTable from opm-common 2020-03-23 15:50:13 +01:00
Atgeirr Flø Rasmussen
56222d4350 Make is_ptr() for unique_ptr handle two template parameters. 2020-03-23 13:36:07 +01:00
Atgeirr Flø Rasmussen
652c7d239b Simplify ptr(), avoiding a template template parameter.
Since unique_ptr<T, Deleter> takes two arguments it cannot strictly
speaking be used via a template template parameter that takes one,
even though the second has a default. GCC allows this anyway, but
not clang.
2020-03-23 11:55:45 +01:00
Arne Morten Kvarving
7775a665d0
Merge pull request #2485 from akva2/i_want_no_deck_dammit
fixed: double-parsing of the deck
2020-03-20 11:17:06 +01:00
Bård Skaflestad
fda4a29c7e
Merge pull request #2459 from jalvestad/group_constraints_summary
Make available current Production/Injection Group Control parameters for use in  Restart
2020-03-19 16:54:34 +01:00
Arne Morten Kvarving
595f601b2c fixed: double-parsing of the deck
externalDeck = nullptr -> internalDeck was parsed.
i have no idea why we have this external/internal deck in the first place.
2020-03-19 14:50:34 +01:00
Jostein Alvestad
35d5269ffa removed unused object opm::data::Group from eclwriter.hh 2020-03-19 14:19:21 +01:00
Markus Blatt
0970867e47
Merge pull request #2484 from akva2/janitoring
avoid potentially uninitialized warnings in serial
2020-03-19 13:07:08 +01:00
Arne Morten Kvarving
42a2d22d89 avoid potentially uninitialized warnings in serial
this was actually broken by an upstream change from return-by-reference
to return-by-value, but we were lucky, the return value was
kept in memory until end of block it seems.
2020-03-19 10:14:04 +01:00
Arne Morten Kvarving
4c5f9f2241 add doxy to eclmpiserializer 2020-03-19 09:31:52 +01:00
Arne Morten Kvarving
59d1ff9b88 updates in EclMpiSerializer to avoid explicit instances in serializer
now the serializer is 'standard', as in we only require basic types
+ stl containers. this should make the actual implementation pretty
pluggable. will ease replacing our serialization routines
with those in Dune 2.7 later.
2020-03-19 09:31:52 +01:00
Arne Morten Kvarving
c86cfbd83a add complexType template parameter to EclMpiSerializer::vector
set to false if vector contains a type without a serializeOp
2020-03-19 09:31:07 +01:00
Arne Morten Kvarving
638a53ac88 add support for unique_ptr in EclMpiSerializer 2020-03-19 09:31:07 +01:00
Arne Morten Kvarving
f0bc3e3815 add bool parameter ComplexType to EclMpiSerializer::map
this is passed on to the serializeOp template for the underlying
type. used with maps over DynamicState where DynamicState is over
a non-complex type.
2020-03-19 09:31:07 +01:00
Jostein Alvestad
7654972db4 corrected for unused parameters in eclwellmanager - groupData 2020-03-19 08:44:46 +01:00
Arne Morten Kvarving
13639cdace add isSerializing member to eclmpiserializer
sometimes it is necessary to know in user code
2020-03-17 08:19:44 +01:00
Arne Morten Kvarving
5eb2ec30a5 add map handler to eclmpiserializer 2020-03-16 20:52:17 +01:00
Arne Morten Kvarving
30cac6b648 add shared_ptr handling in eclmpiserializer 2020-03-16 20:52:17 +01:00
Joakim Hove
65f4635e20
Merge pull request #2464 from joakim-hove/relperm-diag-no-deck
Relperm diag no deck
2020-03-16 13:28:44 +01:00
Arne Morten Kvarving
fe2437e67e add pair handling in eclmpiserializer::vector 2020-03-16 11:44:13 +01:00