Commit Graph

195 Commits

Author SHA1 Message Date
Håkon Hægland
23505cf5c9 Fixed up minor issues from review of PR #2645
Renamed some functions, and checked the return value from runStep().
2020-06-23 12:14:07 +02:00
Håkon Hægland
e8a4065192 Refactor SimulatorFullyImplicitBlackoilEbos.hpp
A resubmission of commit bb20804 in PR #2403 and PR #2442 to work with the
current master.

Continues the work in #2619 and #2631 to refactor main simulation loop in
flow to work with the Python bindings.

The run() method in SimulatorFullyImplicitBlackoilEbos.hpp is refactored
in preparation for the implementation of a Python step() function in a
later commit. Currently run() is called from runSimulatorInitOrRun() in
FlowMainEbos.hpp using the runSimulatorRunCallback_(). Later, there
will be other callbacks like runSimulatorStepInitCallback_(), and
runSimulatorStepCallback_(), that will need to call different parts of
the code in run(). The run() function is thus refactored into run(),
runInit(), runStep(), and runLastStep(). Also, some of the local
variables in run() have to be made persistent between calls to
runStep(), this applies to variables report, solverTimer, totalTimer,
and adaptiveTimeStepping, which are made private class variables.
2020-06-23 11:50:57 +02:00
Arne Morten Kvarving
41e7201c73 make parseSuccess dependent on MPI
avoids unused warnings when building without
2020-06-19 09:46:21 +02:00
Markus Blatt
9870206c53 flow --help|--print-properties=1|--print-parameters=1} returns 0
Previously (in this PR) they returned an error code.
2020-06-03 16:49:29 +02:00
Markus Blatt
2457133ebf Use MPI_Abort to make flow return nonzero error codes in parallel.
The previously used MPI_Finalize might have resulted in returning
zero even if there were problems.
2020-06-03 16:48:50 +02:00
Markus Blatt
f8201e5a94 Catch parser errors in parallel and abort.
Previously only the master process was aware of the error and flow did
deadlock in parallel runs if there were parser errors
encountered. With this commit all processes are made aware of the
problem and flow aborts with an error code.
2020-06-03 11:14:57 +02:00
Atgeirr Flø Rasmussen
6f1a159adc
Merge pull request #2611 from totto82/improveConvergenceMSW
Improve convergence msw
2020-05-30 17:00:30 +02:00
Atgeirr Flø Rasmussen
2261c1ee74
Merge pull request #2637 from hnil/hide_vtk
Hide vtk
2020-05-29 08:21:31 +02:00
Joakim Hove
4ab3b92298
Merge pull request #2631 from hakonhagland/refac_run_simulator
Refactor runSimulator().
2020-05-29 07:25:49 +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
hnil
16edd5ecc5 fixed commented code 2020-05-26 22:04:42 +02:00
hnil
95ead78a0d made all vtk paramters allways be hidden 2020-05-26 21:56:51 +02:00
hnil
81714806c2 hide all vtk related if not vtk enabled 2020-05-26 16:16:42 +02:00
Tor Harald Sandve
82b424c2cf don't regularize MSW as default 2020-05-22 20:52:14 +02:00
Tor Harald Sandve
8a5c9e82df add run time parameters for msw convergence tuning. Default values are set to minimize convergence failures for model2 based tests. These parameters are also tested on bigger models with good results 2020-05-22 20:52:14 +02:00
Håkon Hægland
2734445bf5 Refactor runSimulator().
A resubmission of commit b25f489 in PR #2403 and PR #2441 to work with
the current master.

Continues the work in PR #2619 to refactor FlowMainEbos.hpp to work with
the Python bindings.

We need to refactor runSimulator() to avoid code duplication when
executeStepInit() is implemented (see later commit). Here, runSimulator()
is refactored into a runSimulatorInitOrRun() that takes a callback
function. When runSimulatorInit() is implemented it will pass a different
callback that only initializes the simulator. Currently, runSimulator()
passes the callback runSimulatorRunCallback_() which runs the whole
simulation. The code outputting the simulation summary in runSimulator()
is also refactored into a runSimulatorAfterSim_() method.
2020-05-19 16:52:46 +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
Håkon Hægland
fcddbbba52 Refactor execute() in FlowMainEbos.hpp
Currently, execute() calls runSimulator() to run the simulation. When
the Python step_init() is implemented (see a later commit), it will
instead call an executeStepInit() that will need to do the same
initialization as in execute() except that it should call a
runSimulatorInit() instead of runSimulator(). In order to avoid code
duplication for execute() and executeStepInit(), execute() is here
refactored into an execute_() method.
2020-05-13 16:59:29 +02:00
Håkon Hægland
8bb914b144 Fixed bug in initFlowEbosBlackoil()
The return code from the call to initialize_() in initFlowEbosBlackoil()
in Main.hpp was overwritten by a mistake.
2020-05-13 13:45:16 +02:00
Håkon Hægland
946b5f5806 Refactor flow_ebos_blackoil.cpp (2)
NOTE: this pull request depends on #2555 which should be merged first.

A rewrite of the outdated PR #2543.

Refactors flow_ebos_blackoil.cpp such that we can choose not to execute
the whole simulation using the flowEbosBlackoilMain() function but
instead only initialize by calling flowEbosBlackoilMainInit(). This is
necessary to implement a Python step() method that can advance the
simulator one report step at a time.

Also adds a method initFlowEbosBlackoil() to Main.hpp that can be used
directly from the Python interface's BlackOilSimulator object to gain
access to the FlowMainEbos object before it has initialized the
simulation main loop.
2020-05-13 11:54:18 +02:00
Håkon Hægland
f94553c5a7 Python bindings for the blackoil simulator.
A simplified version of PR #2518 that uses a deck filename to construct
the simulator.

After private discussion with @joakim-hove it was decided that the
construction of the blackoil simulator from Python using deck,
ecliseState, schedule and summaryConfig as constructor arguments from
\#2518 should be replaced by a constructor taking only the deck filename
as parameter.

A rewrite of the Python bindings for the blackoil simulator using
pybind11 as introduced in PR #2127. The new version uses the
refactored flow.cpp introduced in PR #2516 and thus avoids duplication
of the code in simulators.cpp.

This PR will be the starting point for implementing the Python bindings
introduced in PR #2403.
2020-05-11 15:03:17 +02:00
Bård Skaflestad
34b750336e Remove 'MAXVALUE' From List of Missing Features
We've supported that operator for quite some time.
2020-05-10 14:38:17 +02:00
Atgeirr Flø Rasmussen
d108f9afa6 Avoid file-ending starting with S or A to not confuse comparison program. 2020-05-08 11:56:52 +02:00
Atgeirr Flø Rasmussen
561bec4a64 Make CASENAME.STEPINFO the name of the step info report file. 2020-05-07 22:29:01 +02:00
Atgeirr Flø Rasmussen
9458357009 Use = rather than += when appropriate for reports. 2020-05-07 22:09:17 +02:00
Atgeirr Flø Rasmussen
9dd2275af9 Remove seconds and add timestep to ITERINFO report. 2020-05-07 21:19:31 +02:00
Atgeirr Flø Rasmussen
769028b591 Remove 'verbosity' member and reorganize. 2020-05-07 21:00:39 +02:00
Atgeirr Flø Rasmussen
8dd53a38e9 Refactor SimulatorReport system.
Now SimulatorReport object contains a vector of SimulatorReportSingle objects,
for both successful and failing steps.
2020-05-07 16:13:39 +02:00
hnil
0f33835e67 added writing of detailed performance report 2020-05-07 11:37:24 +02:00
Atgeirr Flø Rasmussen
9357919201 Do not run setupParameter_() twice for the static-typed sims. 2020-05-05 16:19:10 +02:00
Atgeirr Flø Rasmussen
f0b1ee76b8 Ensure that the typetag used for initialization is correct.
Without this, properties set in the static variants of flow such as
flow_blackoil_dunecpr.cpp will be honored in the run. However, the
text for '--help' and the property printout in the .DBG file will not
reflect the true type tag, but the default.

This bug was added during the recent refactoring of all Flow variants
to use the same initialization and setup code.
2020-05-04 08:52:49 +02:00
Markus Blatt
ca744231b1 Removes unused member istlSolver_ and method to get it from BlackoilModelEbos
It is not used since quite some time and tends to confuse me.
2020-04-28 16:46:17 +02:00
OPMUSER
163ce3b613 Update Missing Features with PERMFACT 2020-04-28 13:39:40 +02:00
Joakim Hove
750070fbd7 Remove VISCREF from MissingFeatures 2020-04-27 10:30:50 +02:00
OPMUSER
c62318387d Update Missing Features with HMMULTSG
HMMULTSG
2020-04-25 18:19:31 +02:00
OPMUSER
04295871f4 Update MissingFeatures.cpp
Missing features fixed typo SCPDIMS to SCDPDIMS, and added RWGSALT.
2020-04-25 18:19:31 +02:00
Joakim Hove
0773d07df5
Missing features (#2562)
Updates to the list of missing features
2020-04-24 13:08:55 +02:00
OPMUSER
9d32980821 Added the Water Vaporization keywords to Missing-Features
Added the following Water Vaporization keywords to Missing-Features: PRESALT, PVTGW, PVTGWO, SALTPVD, SALTSOL, and VAPWAT
2020-04-21 16:39:51 +08:00
OPMUSER
4906a3e69e Added ADSORP and CPR to Missing-Features
Added ADSORP and CPR  to Missing-Features
2020-04-21 16:30:54 +08:00
OPMUSER
048d21fdab Update MissingFeatures.cpp
Changed DIFFMTHT- to DIFFMTH-
2020-04-21 14:29:03 +08:00
OPMUSER
a8dba1a726 Update Missing-Features keywords
Added GECONT, changed RIVRDIM to RIVRDIMS, added RPTSOL, RSSPEC, changed SCPDIMS to SCDPDIMS,
2020-04-21 14:05:46 +08:00
Cintia Goncalves Machado
2ac17103f8
Remove BDENSITY 2020-04-20 17:44:40 +02:00
Joakim Hove
11d65f41d2 Add keywords to the list of missing features 2020-04-17 08:56:10 +02:00
Atgeirr Flø Rasmussen
a1091bd718 Stop simulating if the schedule has set an exit condition.
The program will return the value set in the EXIT keyword.
2020-04-16 15:42:17 +02:00
Atgeirr Flø Rasmussen
07d9ec135b Make Main a non-template class again, simplify. 2020-04-16 11:35:01 +02:00
Håkon Hægland
1932e42cbb Fixed minor typo. 2020-04-16 01:22:07 +02:00
Håkon Hægland
954d32c3ab Refactor main_() into initialize_() and dispatch_().
For the Python interface's usage (as opposed to the usage by e.g.
flow.cpp), we do not neccessarily want to run the whole simulation by
calling run(), it is also useful to just run one report step at a time.
According to these different usage scenarios, main_() is refactored into
initialize_() and dispatch_() as a preparatory step for implementing the
Python interface (to be presented in a later PR).
2020-04-16 00:21:10 +02:00
Håkon Hægland
3f97561380 Fixup Deck, EclipseState, Schedule, ....
Fixup usage of Deck, EclipseState, Schedule, and SummaryConfig to take
into account the class variables deck_, eclipseState_, schedule_, and
summaryConfig_. These variables might initially be empty (nullptr) when
the object is constructed by calling Main(argc, argv) from flow.cpp,
flow_blackoil_dunecpr.cpp, flow_onephase.cpp, or
flow_onephase_energy.cpp. However, when Opm::Main is constructed from the
Python interface code (to be implemented in a later PR) by using the
constructor Main(argc, argv, deck, eclispeState, schedule, summaryConfig)
the variables will not be intially empty.
2020-04-15 23:49:44 +02:00
Håkon Hægland
09230808e0 Adapting Main.hpp to the Python interface.
Adapting Main.hpp to be called from Python interface, Part 1.
Building on PR #2521 and PR #2535, we gradually adapt Main.hpp for
being called from the Python interface (to be committed in a later PR)
to the flow executable. This PR introduces a new constructor for class
Opm::Main that takes a Deck, EclipseState, Schedule, and SummaryConfig
as arguments. It also introduces some new class variables that will be
useful when the main_() method is split up (in a later commit).
2020-04-15 20:45:20 +02:00
Håkon Hægland
de53c98605 Always print banner.
Remove the #ifdef OPM_FLOW_MAIN guard on printBanner() as it makes sense
to print the banner in either case.
2020-04-14 14:53:48 +02:00