Commit Graph

198 Commits

Author SHA1 Message Date
Arne Morten Kvarving
21af223b92 rename flow_brine_thermal to flow_brine_energy
naming should be consistent with the established convention
2021-10-18 12:48:11 +02:00
Tor Harald Sandve
f6f5badfde Add brine and thermal simulator 2021-10-15 11:50:17 +02:00
Tor Harald Sandve
70c9d2e237
Merge pull request #3590 from daavid00/micp-2021-10
micp
2021-10-14 22:28:28 +02:00
daavid00
48b175904a first version of micp implementation in flow 2021-10-14 17:44:57 +02:00
Joakim Hove
2c68f12769 Load WellTestState from restart file 2021-10-13 08:46:48 +02:00
Joakim Hove
5db60aba5e Set external Action::State object in the vanguard 2021-10-12 10:41:29 +02:00
Håkon Hægland
16bbc338ab Don't increase shared_ptrs use_count when forwarding.
Use std::move() to avoid increasing the use count of std::shared_ptr
when forwarding them to the vanguard object.
2021-09-23 10:56:18 +02:00
Håkon Hægland
4c5245196b Changed calling convention for shared pointers.
Expect non-reference type shared pointers arguments instead of references
to shared pointer. This will make it clear to the caller that the called
function is making a copy of the pointer for its own use and not trying
to modify the original pointer of the caller.
2021-09-22 23:49:13 +02:00
Håkon Hægland
5ad65c70ee Initialize blackoil simulator from schedule shared with Python.
Adds a new constructor to Main.hpp that takes shared pointers to Deck,
EclipseState, Schedule, and SummaryConfig. This makes it possible to
share these variables with Python without worrying about lifetime issues
of the underlying C++ objects. For example, a Python script can first
create an opm.io.schedule.Schedule object which is modified from Python.
Then, assume the same Python script creates an
opm.simulators.BlackOilSimulator which is initialized with the same
schedule object. Since the underlying C++ object is a shared pointer,
the Schedule object in Python may go out of scope (get deleted by Python)
without having the C++ schedule object being deleted. And the Python
BlackOilSimulator may continue to be used after the Python Schedule object
has been deleted since it still has a valid C++ schedule object.
2021-09-21 15:52:59 +02:00
Arne Morten Kvarving
c05f67a382 changed: build polygrid simulator as a object library
allows for building in parallel with the main library
2021-08-16 12:55:40 +02:00
Arne Morten Kvarving
46087f8f00 changed: build onephase simulators as object libraries
allows for building in parallel with the main library
2021-08-16 12:55:36 +02:00
Joakim Hove
c62a9ba198 Set external UDQState for flow blackoil 2021-07-04 08:55:07 +02:00
Arne Morten Kvarving
8c34172ef0 remove some Opm:: qualifiers inside Opm namespace 2021-05-18 10:09:45 +02:00
Arne Morten Kvarving
a4c0af09d9 fixed: do not use Opm:: prefix when inside namespace Opm 2021-05-05 11:59:18 +02:00
Arne Morten Kvarving
801365547c flow headers: use forwarding 2021-04-29 12:40:31 +02:00
Tor Harald Sandve
4cccd7302d remove unnecessary diffusion specializations 2021-03-23 09:48:43 +01:00
Tor Harald Sandve
5deb410bd5 clean-up in flow_bo_diffusion.cpp and flow_co2.cpp 2021-02-16 12:23:36 +01:00
Tor Harald Sandve
361de71c96 add optional flow_bo_diffusion simulator for testing 2021-02-16 12:21:58 +01:00
Tor Harald Sandve
3457d46a00 add flow_co2 gas-oil simulator with diffusion for testing 2021-02-16 12:21:58 +01:00
Markus Blatt
9ccc953bf0 Add a flow executable that only distributes cells in z-direction.
Executable is named flow_distribute_z and uses the external
loadbalancing information. It can be used to test the distributed
standard wells on SPE9 with 4 or more processes.
2021-01-26 21:27:39 +01:00
Paul Egberts
877c0b723d fix missing argument for BlackoilTwophaseIndices 2020-12-03 09:04:11 +01:00
Paul Egberts
13cd4b476e fix disabled component index 2020-12-03 09:04:11 +01:00
Paul Egberts
d0421582e1 add gas-water simulator 2020-12-03 09:04:11 +01:00
Ove Sævareid
aca6335585 Handle OnePhaseIndices 2020-11-17 18:07:33 +01:00
Ove Sævareid
0f7e66e151 Alternative solvent extension for the black oil model. 2020-11-17 12:33:19 +01:00
Tor Harald Sandve
fbccdbf68e Make a flow version that uses the polyhedreal grid
Currently the simulator creats the polyhedreal grid from an eclGrid from opm-common

TODO
 - make it possible to create the grid directly from DGF or MRST format
 - fix issue on norne.
2020-11-10 15:49:59 +01:00
Atgeirr Flø Rasmussen
316b28923d Rename parameter --linear-solver-configuration to --linsolver. 2020-10-12 17:03:00 +02:00
Atgeirr Flø Rasmussen
65817c9068 Removed old amg/cpr code that can be replaced.
The replacement consists of using the FlexibleSolver code.
2020-10-08 15:12:41 +02:00
Arne Morten Kvarving
9a000c6d07 changed: remove SET_TAG_PROP macro usage 2020-08-28 10:44:53 +02:00
Arne Morten Kvarving
3b21a8a481 changed: remove SET_TYPE_PROP macro usage 2020-08-28 10:44:53 +02:00
Arne Morten Kvarving
941e4916f8 changed: remove SET_PROP macro usage 2020-08-27 14:02:05 +02:00
Arne Morten Kvarving
7d853d2e05 changed: remove SET_SCALAR_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
fca83318aa changed: remove SET_INT_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
a79c37a041 changed: remove SET_STRING_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
0e71c0e29b changed: remove SET_BOOL_PROP macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
e8248b44ff changed: remove NEW_TYPE_TAG macro usage 2020-08-27 13:01:51 +02:00
Arne Morten Kvarving
914053ac3c changed: remove GET_PROP_VALUE macro usage 2020-08-27 13:01:51 +02:00
Markus Blatt
75104fd310 Move to more consistent ownership of ECL data in EclBaseVanguard
We resort to consistently use unique_ptrs in EclBaseVanguard for
the data read from ECL files or set externally. This means that
during the simulation EclBaseVanguard owns this data and not Main
or the ebos setup functions. This ownership transfer becomes
transparent due to std::move.

This came up when trying to fix the parallel runs of ebos and during
that removing some code duplication.
2020-08-27 09:05:09 +02:00
Arne Morten Kvarving
74fac38d85 changed: remove GET_PROP_TYPE / GET_PROP macro usage 2020-08-27 08:19:39 +02:00
Arne Morten Kvarving
82a35e53b7 changed: remove TTAG macro calls 2020-08-27 08:19:39 +02:00
Håkon Hægland
c6752c1e0e Clarify by using this->
Clarify usage of member variables in FlowMainEbos.hpp by prefixing with
this->.

Also rebased PR on the current master, and updated
flow_ebos_oilwater_brine.cpp according to the PR.
2020-08-24 08:35:04 +02:00
Håkon Hægland
f9d47b7c68 Capture some variables in FlowMainEbos.
Make Opm::FlowMainEbos capture the variables argc, argv, outputCout, and
outputFiles. Passing the variables to the constructor and saving them as
class variables in Opm::FlowMainEbos makes the implementation of the
Python interface simpler. For example, the step_init() method does not
need to ask Opm::Main about the values of the variables when it needs to
run execute() in FlowMainEbos.

Another advantage of this refactoring could be that less variables needs
to be passed around from Opm::Main, to flow_ebos_xxx.cpp, and then again
to FlowMainEbos.
2020-08-24 00:19:19 +02:00
Arne Morten Kvarving
70908d9017 changed: remove BEGIN_PROPERTIES/END_PROPERTIES macro usage 2020-08-21 15:50:35 +02:00
Tor Harald Sandve
fce0ba6759 Add oil water brine specialization 2020-06-30 10:41:28 +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
Arne Morten Kvarving
5fcebcf4a7 remove unused variables
and thus the associated compiler warnings
2020-05-14 11:03:03 +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
Atgeirr Flø Rasmussen
07d9ec135b Make Main a non-template class again, simplify. 2020-04-16 11:35:01 +02:00
Håkon Hægland
ba625b0cb6 Refactor away flow_tag.hpp.
Refactors away flow_tag.hpp by having flow_blackoil_dunecpr.cpp,
flow_onephase.cpp, and flow_onephase_energy.cpp use the updated Main.hpp
from a previous pull request. This will eliminate the previous code
duplication in Main.hpp and flow_tag.hpp discussed in PR #2521.
2020-04-15 15:05:56 +02:00
Håkon Hægland
3624725885 Merge flow_tag.hpp into Main.hpp.
Addresses the comments in PR #2521 regarding code duplication in
Main.hpp and flow_tag.hpp. This PR merges the code in flow_tag.hpp
into Main.hpp such that flow_tag.hpp can be eliminated (will be done
in the next PR).
2020-04-14 14:53:48 +02:00
Håkon Hægland
8c1a951e09 First PR in a splitting up of PR #2516.
According to private discussion with @joakim-hove PR #2516 is splitted into
smaller parts to facilitate review and a quicker merge into master.

As mentioned in PR #2516, main() in flow.cpp is refactored to address
the comments on PR #2127 and as preparation for implementing the Python
bindings described in PR #2403.
2020-04-03 14:53:45 +02:00
Bård Skaflestad
022ba52200
Merge pull request #2514 from akva2/fix_filesystem_gcc9
changed: avoid calling parent_path on paths that has none
2020-04-03 12:41:14 +02:00
Arne Morten Kvarving
57d5eefd26 changed: avoid calling parent_path on paths that has none
causes a throw on gcc-9
2020-04-03 11:27:47 +02:00
Atgeirr Flø Rasmussen
0c8ce54b71
Merge pull request #2498 from blattms/cherry-pick-hnil-flexible-clean-interface-rebased
Cleaned up flexible solver improvements.
2020-04-02 15:28:10 +02:00
Markus Blatt
2e4824cbc7 Change default configuration to "ilu0".
The previous was "file" which resulted in runtime errors
like

Program threw an exception: No linear-solver-configuration-json-file given for linear-solver-configuration=file
2020-03-31 16:49:37 +02:00
hnil
2388a9b551 Added simple defaults for flexible solver: current options added ilu0, cpr_quasiimpes, cpr_trueimpes, file (genneal configuration)
This commit 0c62c8442 cherry-picked and slightly cleaned up and
adapted to recent changes.
2020-03-31 16:49:37 +02:00
Joakim Hove
d6a1d3029e Use std::shared_ptr for Python handle to Schedule 2020-03-31 12:28:07 +02:00
Joakim Hove
f425758c25
Merge pull request #2501 from joakim-hove/add-python-arg
Add Python argument to Schedule constructor
2020-03-27 13:44:09 +01:00
Joakim Hove
30216212c4 Add Python argument to Schedule constructor 2020-03-26 10:15:07 +01:00
Arne Morten Kvarving
b698fe2c90 prune some unnecessary includes 2020-03-25 09:42:02 +01:00
Arne Morten Kvarving
a2d840a5f7 changed: put eclipse state broadcast in separate compilation unit
to avoid compiling several times for each flow variant
2020-03-19 09:31:52 +01:00
Arne Morten Kvarving
d9ab0e7522 remove old serialization support for ASTNode 2020-03-19 09:31:07 +01:00
Arne Morten Kvarving
7389959b88 remove old serialization support for WListManager 2020-03-19 09:31:07 +01:00
Arne Morten Kvarving
13f3b31bd6 add missing includes 2020-03-16 20:52:17 +01:00
Markus Blatt
09c2cb2107 Make flow variants use ParallelEclipseState just as flow 2020-03-16 10:09:26 +01:00
Arne Morten Kvarving
05286d8900 changed: simplify mpi setup
no need for a separate reference to the parallel state any longer
2020-03-16 08:20:44 +01:00
Arne Morten Kvarving
3389db4f4c fixed: consistently use #if MPI instead of #ifdef MPI 2020-03-16 08:20:44 +01:00
Arne Morten Kvarving
38023fac21 changed: use EclMpiSerializer for Schedule 2020-03-16 08:20:44 +01:00
Arne Morten Kvarving
c40c733a57 fixed: build without MPI 2020-03-13 17:52:37 +01:00
Joakim Hove
4dfa22e6a2 Allow flow to continue with --sched-restart=false 2020-03-12 15:20:39 +01:00
Arne Morten Kvarving
e1bf6ed4a6 use eclmpiserializer for SummaryConfig broadcast 2020-03-10 10:01:26 +01:00
Joakim Hove
42f96ca039 Add commandline switch --sched-restart to control restart init 2020-03-04 15:44:32 +01:00
Arne Morten Kvarving
293612265e fix build without MPI 2020-02-28 13:03:16 +01:00
Arne Morten Kvarving
05c0c4b6e8 Use the ParallelEclipseState and ParallelFieldPropsManager
with these in place, we now only parse the deck on the root process.
2020-02-28 10:26:55 +01:00
Arne Morten Kvarving
68a9d17de1 changed: pass/store deck as a pointer
and remove asserts for null-ptr. preparatory step for only
having deck on root mpi process
2020-02-28 10:26:55 +01:00
Joakim Hove
2e18107097 Add disabled functionality to init wells and group from restart file 2020-02-25 09:49:26 +01:00
Joakim Hove
d3bfa83c7c
Merge pull request #2343 from joakim-hove/move-rstconfig
RestartConfig has moved from EclipseState to Schedule
2020-02-20 07:07:37 +01:00
Arne Morten Kvarving
abc439d336 remove last usage of boost::filesystem 2020-02-18 08:54:37 +01:00
Joakim Hove
5ad4936025 RestartConfig has moved from EclipseState to Schedule 2020-02-17 21:48:12 +01:00
Arne Morten Kvarving
11e0e5b549
Merge pull request #2326 from akva2/fix_dune_fem
fixed: build with dune-fem enabled
2020-02-17 09:03:04 +01:00
Atgeirr Flø Rasmussen
5fe48dab8b
Merge pull request #2327 from akva2/bump_dune
Bump required dune version to 2.6
2020-02-11 09:41:44 +01:00
Robert Kloefkorn
e04bb6e91a [feature][flow_blackoil] Added a variant to compile the blackoil option
only for faster development.
2020-02-10 12:11:30 +01:00
Arne Morten Kvarving
f4bc377996 fixed: build with dune-fem enabled
in that case we do not have an 'instance' of the static mpi helper
class.
2020-02-07 15:19:09 +01:00
Arne Morten Kvarving
4978e72039 bump required dune version to 2.6
remove compatiblity code with older versions
2020-02-06 16:24:39 +01:00
Bård Skaflestad
73a58c4599
Merge pull request #2287 from akva2/avoid_deck_for_phases
avoid instancing a new Runspec from deck to obtain active phases
2020-01-17 16:22:26 +01:00
Arne Morten Kvarving
8a14d70f97 avoid instancing a new Runspec from deck to obtain active phases
this is already available in the eclipseState.
in particular, this is preparing for the case where only the
root-process has a deck instance.
2020-01-17 15:36:30 +01:00
Arne Morten Kvarving
3fca2ae631 changed: avoid using deck setting up schedule on non-root processes 2020-01-17 10:29:46 +01:00
Tor Harald Sandve
ada7c9d90b fix various extentions 2020-01-09 14:14:38 +01:00
Trine S. Mykkeltvedt
99e7785fb5 renamed saltwater-->brine and removed keywords from missingFeatures 2020-01-09 14:14:38 +01:00
Trine S. Mykkeltvedt
5749615bd8 addd simple salt/brine implementation 2020-01-09 14:14:38 +01:00
Arne Morten Kvarving
227ff00730 avoid usage of deck on all processes setting up SummaryConfig 2020-01-08 10:30:57 +01:00
Atgeirr Flø Rasmussen
cab0724a26
Merge pull request #2119 from blattms/fix-multiple-usage-printing-parallel
Only print usage information on one processes.
2019-11-22 15:23:27 +01:00
Arne Morten Kvarving
dd2a360e10
Merge pull request #2118 from blattms/fix-one-phase-namespace
Move BlackOilOnePhaseIndices to Opm namespace
2019-10-30 09:29:01 +01:00
Markus Blatt
e44f0445c4 Fixed indentation of a2db252 2019-10-30 08:55:05 +01:00
Markus Blatt
a2db252271 Move BlackOilOnePhaseIndices to Opm namespace
to make it consistent with the rest. OPM/opm-models#530 development
must have been started before the renaming in OPM/opm-models#532
and somehow the old namespace survived.

downstream PR of OPM/opm-models#577
2019-10-29 17:04:37 +01:00
Markus Blatt
10db57f66b Only print usage information on one processes.
No matter whether requested via --help or printed due to a wrong
command line parameter.

Closes #2012.
2019-10-29 17:00:24 +01:00
Joakim Hove
252829850e Pass ParseContext settings in constructor 2019-10-25 14:30:13 +02:00
Joakim Hove
4490f31540 stdout logging only for rank 0 2019-10-16 15:19:00 +02:00
Atgeirr Flø Rasmussen
5211217c94 Whitespace fixes (tabs->spaces, reformatted new files). 2019-10-11 15:57:51 +02:00
Atgeirr Flø Rasmussen
10e2200a25 Add two new flow variants for one-phase (water, water+energy) simulation. 2019-10-11 08:19:18 +02:00