Commit Graph

44 Commits

Author SHA1 Message Date
Andreas Lauser
dfbc24b35f flow: avoid wrangling around with dummy state objects
these objects are only used by flow_legacy, so not having to deal with
them anymore lets non-legacy flow avoid to jump through a lot of hoops
for the sake of having a common API.

this required a fork of the NonlinearSolver and AdaptiveTimeStepping
classes. this is not a problem because the original classes would get
pruned to look like the new ones once flow_legacy gets moved out of
the opm-simulators module.
2018-06-06 10:59:41 +02:00
Joakim Hove
c76898d0c9 Use RestartValue when saving eclipse output 2018-05-15 16:56:03 +02:00
Atgeirr Flø Rasmussen
cf9b7c39b9 Adapt to moved opm-grid headers. 2018-02-10 08:33:33 +01:00
Tor Harald Sandve
0e6fe26a61 Start using ecl output from Ebos
The wells, FIP and initial output of NNCs is still handled
by code in opm-simulators. The plan is to move more of the
functionality to ebos.

All tests pass and MPI restart works
2018-01-04 09:29:58 +01:00
Joakim Hove
566f4fbb02 Use Schedule constructor. 2017-11-06 14:20:41 +01:00
Tor Harald Sandve
dc8f811cbe Remove WellStateFullyImplicitBlackoilDense
After the restructuring of of the well model, keeping an extra class for
the "Dense" model is not needed. The only thing still left in
WellStateFullyImplicitBlackoilDense was some solvent related stuff, this
PR moves this to WellStateFullyImplicitBlackoil and removes
WellStateFullyImplicitBlackoilDense.

In addition to a cleaning code this PR fixes missing solvent well output.
2017-10-11 10:54:59 +02:00
Tor Harald Sandve
2bf8d48272 Remove redundant local state in ParallelDebugOutput 2017-08-17 11:13:00 +02:00
Kai Bao
8d96d835b3 removing the well potential from WellsManager constructor. 2017-04-11 16:51:16 +02:00
Atgeirr Flø Rasmussen
88e4646b71 Merge pull request #1084 from babrodtk/hysteresis_output
Adds hysteresis output and input (for restarting)
2017-04-11 07:44:59 +02:00
babrodtk
4d286cf0b3 Makes hysteresis and somax optional in restart file 2017-04-07 16:20:35 +02:00
Robert Kloefkorn
11f36de73e [bugfix] Use AutoDiffGrid in unspecialized version of ParallelDebugOutput. 2017-04-05 13:53:28 +02:00
Markus Blatt
35ff439ee1 Make ParallelDebugOutput constructable with global or distributed grid view.
That makes coding a little more me/fool proof.
2017-03-16 14:52:59 +01:00
Markus Blatt
03cb9f4afa ParalleDebugOutput needs the distributed grid.
Because for the global grid the communicator sees just one process.
Unfortunately this is not documented.
2017-03-16 14:52:59 +01:00
Andreas Lauser
42ec0ca3c3 do not explicitly pass the permeability to the well model anymore
this information is already part of the EclipseState. The reason why
this should IMO be avoided is that this enforces an implementation
detail (ordering of the permeability matrices) of the simulator on the
well model. If this needs to be done for performance reasons, IMO it
would be smarter to pass an array of matrices instead of passing a raw
array of doubles.  I doubt that this is necessary, though: completing
the full Norne deck takes about 0.25 seconds longer on my machine,
that's substantially less than 0.1% of the total runtime.
2017-01-27 13:06:09 +01:00
Atgeirr Flø Rasmussen
621a72bb25 Merge pull request #941 from blattms/read-write-perforation-rates-and-pressure
Read write perforation rates, pressure, phase reates, and control of wells.
2016-11-22 11:16:19 +01:00
Markus Blatt
0179a17704 Gather well controll, too. 2016-11-21 21:20:47 +01:00
Markus Blatt
f601ac4013 Gather perforation phase rates, too.
To do this we needed to switch from WellState to WellStateFullyImplicitBlackoil
as only the latter stores this information.
2016-11-21 21:19:51 +01:00
Markus Blatt
88e118d76a Consistently use WellStateFullyImplicitBlackoil in output
Otherwise we cannot write out all the data in a parallel run.
2016-11-21 21:19:51 +01:00
Markus Blatt
a6c323c48b Read and write rate and pressure per well perforation when gathering. 2016-11-21 21:19:39 +01:00
Robert Kloefkorn
a2b2e6dd27 [cleanup][ParallelDebugOutput] remove unused variable and tabbing. 2016-11-21 11:26:08 +01:00
Markus Blatt
80bbabc0b6 Start with a clean globalCellData_ for each data gathering.
Otherwise there might entries from the last call that should
either not be there this time or might have a different size.
2016-11-16 21:21:51 +01:00
Markus Blatt
098bd8f9fc Added assertion that entry was added to globalCellData_ for pack/unpack 2016-11-16 21:20:14 +01:00
Markus Blatt
00440ab344 Use data::Solution to gather cell data including user requested data.
Previously only the cell data registered with SimulationDataContainer
war gathered during parallel output. User requested data was neglected
and a warning was issued. With this commit we intialize the local view
of data::Solution on all processes with the data registered in
SimulationDataContainer and add cell data requested by the user. This is
then gathered on the IO process, and used for the output layer. To
rudimentarily support matlab we also create a global view of
SimulationDataContainer for it.
2016-11-16 17:11:24 +01:00
Jørgen Kvalsvik
1c6a4b34da Update to shared_ptr-less parser interface. 2016-10-20 14:08:04 +02:00
Markus Blatt
8c18bfcc50 Added missing include for unordered_set.
This is what the travis build
https://travis-ci.org/OPM/opm-simulators/builds/159576974 complained about.
2016-09-14 14:41:27 +02:00
Markus Blatt
63d785d7ba Work around explicit empty constructor of unordered_set in C++11
With GCC version (Debian 4.9.2-10) 4.9.2 we get the following error
when compiling with -std=c++11 (default for dune 2.4):

converting to ‘const std::unordered_set<std::basic_string<char> >’ from initializer list would use explicit constructor
2016-09-13 10:58:26 +02:00
Atgeirr Flø Rasmussen
4d2d004c43 Merge pull request #769 from blattms/fix-step-used-by-parallel-io
Fix step number used by parallel io and OutputWriter::writeTimeStep
2016-09-07 14:09:56 +02:00
Markus Blatt
4a6be3d33b Fix step number used to create global well state in parallel output.
When running in parallel a well state object with the well information
of the whole grid needs to constructed to gather the information from all
processes. Previously, this was done with the report step exported by the
timer. This was wrong for the following reason:
The output occurs after solving the time step and the timer is already
incremented. This means that we constructed the well state for gathering the
data for the next report step, already. Unfortunately, at that step some
wells that we have computed results for might have been shut. In that case
an exception with message "global state does not contain well ..." was thrown.

This problem occured for Model number 2 and might have been due to shut wells
because of banned cross flow.

With this commit we use the last report step if this is not an initial write
and not a substep.
2016-09-02 14:41:47 +02:00
Markus Blatt
b6c06738b5 Do not assume ordering in an unordered_map when gathering data.
The order of an unordered_map is quite unpredictable. (The same
order will only hold with the same hash function, comparison
operator, and insertion order). Therefore we cannot assume that
the global SimulationDataContainer uses the same order for the
cell data as the local one (This was done before this commit).
But we can assume that the local one uses the same order on every
process.

Before this commit data got mixed up (e.g. gasoilratio with surfacevol)
when gathering local data for writing eclipse files on the master
process. This commit fixes this.

Instead of iterating over the cell data of the global state when
writing the data received, we again iterate over the cell data of
the local state and simply use the key to request the correct data
for writing from the global state.
2016-07-25 17:17:06 +02:00
Kai Bao
18fa442721 adapted to the interface change of WellsManager
At the moment, for the ParallelDebugOutput, we put a dummy
dyanmic_list_econ_limited, not sure how it will the parallel running.

The basic problem is that when initialzing the globalWellState_, what
will happen if they can not find state information for a well in the Wells*.

If some defaulted values are used, then no big problem here.
2016-07-05 13:02:27 +02:00
Markus Blatt
e9b8721d2a Prevent dereferencing a null pointer during parallel output.
ParallelDebugOutput will always dereference its member variable
globalReservoirState_ even if it will not be used for any output.
In g++ this throws when using -D_GLIBCXX_DEBUG -DDEBUG -DGLIBCXX_FORCE_NEW.
I any case we will have a dangling reference into Nirvana in
PackUnPackSimulationDataContainer. This commit fixes this by always
initializing the pointer globalReservoirState_. In the case where the rank
does not perform any output its size will be zero.
2016-05-25 13:49:33 +00:00
Atgeirr Flø Rasmussen
37c4bd16b1 Adapt code to dune-cornerpoint -> opm-grid renaming. 2016-04-06 13:29:47 +02:00
Joakim Hove
18c07d5d66 Replaced SimulatorState -> SimulationDataContainer 2016-03-29 10:48:36 +02:00
Robert Kloefkorn
9d5df94080 ParallelDebugOutput: remove warning and cleanup. 2015-10-28 19:03:37 +01:00
Robert Kloefkorn
e30688fb85 ParallelDebugOutput: initialize wells with current report step number. 2015-10-28 19:03:37 +01:00
Robert Kloefkorn
36ca75c4b7 ParallelDebugOutput: fix bug in creation of local to global map on I/O rank. 2015-09-21 16:48:57 +02:00
Robert Kloefkorn
299b0aa3cf ParallelDebugOutput: fix initialization of wells for the I/O rank. 2015-09-21 14:05:35 +02:00
Robert Kloefkorn
04ec4eb2bf ParallelDebugOutput: disable wells, seems to not work after latest changes in opm-core. 2015-09-21 12:52:37 +02:00
Robert Kloefkorn
f63487ad0f ParallelDebugOutput: initialize globalIndex in serial run too. 2015-09-21 12:42:41 +02:00
Robert Kloefkorn
dacb4013ed ParallelDebugOutput: only use parallel output when mpi size > 1. 2015-09-21 12:24:07 +02:00
Atgeirr Flø Rasmussen
2d4c10d919 Silence unused argument warning. 2015-09-17 14:56:59 +02:00
Robert Kloefkorn
e8fad08d81 ParallelDebugOutput: workaround for ancient gcc bug. 2015-09-16 14:59:37 +02:00
Robert Kloefkorn
0696dbc1bb ParallelDebugOutput: remove warnings due to unused variables. 2015-09-16 13:05:00 +02:00
Robert Kloefkorn
326faa99d7 ParallelDebugOutput: make the output in ecl format work in parallel by communicating
to an io rank and then proceed with serial output.
2015-09-16 09:48:22 +02:00