this patch also includes code to make FlowMainEbos more autonomous
(i.e. it does not derive from FlowMainBase anymore). this allows more
flexibility how and what stuff gets created.
Start using the parameters in the parameter file instead of the hard-
coded ones.
Unify the restriction of the drs and drv in black-oil and black-oil-
solvent updateState
1) changes dp_max_rel default to 0.2
2) introduces a dbhp_max_rel paramter to restrict the bhp update in the
updateWellState() (instead of using the dp_max_rel) Default is set to
1.0
3) Restrict rs and rv between 0,and the satruation value
4) Set rs and rv to zero for the water only cases
5) Guard against zero rs and rv when calcuating the maximum allowed rs
and rv change.
Tested on norne, model 2 and model 2.2
Number of problems for the different models with and without this fix
Case
this PR master
Norne
10
45
Model 2
21
78
Model 2.2
200
248
it now uses the grid object which gets created by ebos for everything
which should make the parallelization efforts easier. I also tried to
cut back the use of the legacy property objects (i.e., for the fluid,
geologic and rock properties), but this effort ran aground because of
the initialization and output code. (also, if those two were fixed,
there would probably be issues with the Newton update.)
I ran Norne with this and there did not seem to be any notable
performance regressions or benefits.
the compiler suggested braces around the conditions, and by look of
it, it was right: these asserts most likely want express that only the
threephase case or the twophase case without gas are handled...
Seperating the updateWellStateWithTarget from updateWellControls, will
update the controls when any of the control constraints gets broken.
The reason is that the updated well control can still break some of
other the contstaints. We need to choose one control to make sure all the
constraints are honored.
this changes the conversion of the results to hopefully make it work
with twophase simulations. Note that flow_ebos still does not work
because there is a crash in the well model that I don't understand
(and also, I've disabled an assertation in the well model plus I'm not
completely sure if the conversion code need to do something about the
primary variables in the twophase case).
this broke after the latest master merge (again, the reason were API
changes. this time they did not lead to merge conflicts.)
I've verified that flow_ebos works with Norne and that the performance
did not regress.
* origin/master:
Start with a clean globalCellData_ for each data gathering.
Added assertion that entry was added to globalCellData_ for pack/unpack
Use data::Solution to gather cell data including user requested data.
Warn about broken parallel matlab output.
a few warning fixing.
Removed second implementation of matlab output.
Fix spelling in warning about unhandled parallel ouput.
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.
Before, the tolerance for the norm of the residual of the well control
equations was 1bar, which makes no sense for rate control.
For some rate controls, we are not able to update the well state with
the target rates, we have to enforce the convergence throught the
residual checking.
There is already a generic one with the Grid implementation
being the template parameter in the header file. The other
implementation using UnstructuredGrid does exactly the same.
Therefore we remove it with this commit.
mainly, the "linsolver_" attribute is called "istlSolver_" in the
BlackoilModelEbos class. Also, this problem possibly only occured if
MPI was enabled...
- restrict pressure changes. Set default to 1.0 (this also effects flow)
- change default number of linear iterations to 150
- tell stabilized newton the residual occilates even if it occilates in
only one phase (this also effects flow)
- avoid problems realated to division on small numbers
Tested on SPE9, norne and Model 2 with significant improvments.
* origin/master:
Do not throw for unrecognized file when merging log files.
Do not populate cellData but issue a warning in parallel.
Removed ternary operator in inline initialization.
Correctly mark transfer of ownership for ouptut writer
Indent nested #if
Remove Solution.sdc assignment
Cater variable name change in BCRSMatrix of DUNE 2.5
Fix using local active cells for writing eclipse files in parallel.
add restart test for SPE1CASE2_ACTNUM
rename the 'flow' binary to 'flow_legacy' and set a symbolic link
Added ctest for restart files
I'm not really sure if the fix is semantically correct (Dune
communicators are strange beasts if you're new to them), but at least
this patch fixes the build without MPI and the resulting flow_ebos
binary seems to work fine.
The regex we are using might also consider a file named bla.2.blub.
In that case it is not nice to throw an exception. Instead we print
a message to std::cerr.
Previously, the eclipseGrid used by EclipseWriter was constructed from
the one in the EclipseState with the current CpGrid. Unfortunately the
latter was the distributed version resembling only the local part that
the processor works on. Therefore the information about the active cells
was wrong when writing results (which raised an exception in the writer).
With this commit we construct the EclipseWriter before distributing the grid
and use this writer later on in the OutputWriter.
this patch only uses OpmLog if it is set up properly, else it uses
std::cout. the reason why this is needed is that there's a
chicken-and-egg problem: exceptions which are thrown before the
logging system has been initialized -- most prominently while parsing
the deck -- cause the simulator to silently abort without any user
notification which can be very confusing. On the other hand,
initializing the logging system requires a fully initialized
EclipseState object, i.e. currently to initialze the logging system
the deck must be parsed and in order to print the exceptions thrown
while parsing the deck one needs the logging system.
v2: only prevent using the logging system if has not been set
up. thanks to [at]blattms for the suggestion!
* master:
changed: drop usage of python based comparison script in spe integration tests
changed: drop usage of python based comparison script in polymer integration test
Remove weak enum Opm::Phase
This weak enum is really just an alias for four other constants which in
turn alias another enum. Since they're mostly used for indexing they're
relaxed to constexpr ints.
* origin/master:
Bugfix: use correct object in sequential model.
Bugfix: properly handle two-phase cases.
Bugfix: pass both normal and extra data to output.
Update well data output integration.
Adapt to API change in opm-parser.
Ensure logging only on first rank.
Add isIORank_ member to avoid repeated calls.
Rename isRankZero() -> isIORank() for consistency.
Ensure only first-rank logging.
Add isRankZero() utility.
Bugfix: missing return.
do not set limits for prt log and set correct value for Note.
correct function call order and add whitespace.
supprot MESSAGES default vaule.
wellToState reads new opm-output data exchange
Write control to data::Wells. Missing ability to restore.
Avoid using buggy wellstate api
Stop report early if there are no wells
Update to interface change in opm-output
Includes the following changes:
- update to match API change in opm-output (vector not map for data::Wells::completions),
- restore WellStateFullyImplicitBlackoil::perfPhaseRates() from output,
- restore WellStateFullyImplicitBlackoil::currentControls() from output.
Remaining non-restored well-related data are:
- well potentials,
- the dynamic list of econ-limited completions.
the 'tempV' object currently only contains garbagee but the condition
is needed and will thus be fixed in a different PR.
thanks goes to @totto82 for the clarifications.
Keep track of whether it is a restart or not and invalidate the
intensive quantitiesCache in ebos when restarting the timestep due to
convergence issues.
note that I don't know if these changes are semantically correct (I
doubt it), but this patch fixes the valgrind complaints I saw for
SPE9_CP and on Norne.
Also, this makes the timing of flow_ebos for SPE9 determinisic between
runs: without this, I got some random time steps fail in a given run
and in the next run a completely different set of timesteps
failed. Since this was on the same same machine, without any
recompiles and no changes to the deck or any other input parameters, I
initially attributed the behavior to cosmic rays ;)
@totto82: could you have a thorough look on this?
once again, the culprit was an API change in opm-output. I suppose
this means that the frankenstein branch should be merged soon after
the release in order to avoid to continue breaking the flow_ebos build
twice a week.
* master: (42 commits)
Let only one rank write to step_timing.txt
Do not refer users to issue tracker if multiple procs log.
Remove unused variable.
Use vector instead of VLA, also add missing includes.
changed: bundle eigen3 in the original tarball for debian
update redhat6 packaging
Bugfix parallel computation of weighted pressure etc.
Fixed uninitialized bug, and added logging/comment
Removed superfluous std::move
Refactoring
Initial version of summary data
Do not store collective communication in the wells object.
Make sure that updateWellControls is called on each process.
Make WellSwitchingLogger work with DUNE 2.3
Schedule::getGroup returns reference, not pointer
Removed warning in WellSwitchLogger::calculateMessageSize
Correctly initialize MPI for multisegment wells test
Changed some names in WellSwitchingLogger
Use speaking name for bool in getCellData
Whitespace and other formatting changes
...
All ranks were still writing to step_timing.txt at the same time.
This made it unusable for parallel runs. With this commit only
one processes writes to this file.
This is currently still happening due to the implementation of
OPM_THROW whenever the linear solver does not converge. This
happens quite often and we might not want to get overwhelmed by
the issue tracker.
since the unit code within opm-parser is now a drop-in replacement,
this simplifies things and make them less error-prone.
unfortunately, this requires quite a few PRs. (most are pretty
trivial, though.)