Commit Graph
11107 Commits
Author SHA1 Message Date
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
Atgeirr Flø Rasmussen 2159a83b49 Merge pull request #2524 from hakonhagland/flow_tag2
Refactor away flow_tag.hpp
2020-04-15 17:16:05 +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
Atgeirr Flø Rasmussen 7e1f8ecb8a Merge pull request #2527 from bska/refactor-equilibration
Refactor Equilibration Procedure
2020-04-15 13:30:38 +02:00
Atgeirr Flø Rasmussen 302474ade6 Merge pull request #2535 from hakonhagland/flow_tag_new_try
Merge flow_tag.hpp into Main.hpp (new try)
2020-04-15 13:29:59 +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 6243e62b69 Equilibration: Reenable Existing Unit Tests in 'test_equil.cc'
These unit test were previously disabled.  While here, also fix some
'missing declaration' errors by putting the test functions into a
private namespace.

At some point we should rewrite this to use Boost.Test.
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
Markus Blatt 11b0a409d1 Merge pull request #2534 from akva2/janitoring
remove unused lambda parameter
2020-04-14 22:25:29 +02:00
Markus Blatt 6f913d3a85 Merge pull request #2532 from hakonhagland/add_main_hpp
Add Main.hpp to CMakeLists_files.cmake.
2020-04-14 22:23:34 +02:00
Joakim Hove 02aab06363 Merge pull request #2528 from joakim-hove/apply-pyaction
Add call to evaluate PYACTION in eclproblem::applyActions()
2020-04-14 19:06:15 +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
Håkon Hægland efa6c54096 Avoid a preprocessor directives.
Some of the functions in Main.hpp do not need to be guarded by a
\#ifndef OPM_FLOW_MAIN
Since they are template functions, they will not be included in the
code unless explicitly instantiated.
2020-04-14 14:53:48 +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
Arne Morten Kvarving ca697acc60 remove unused lambda parameter
quells a compiler warning
2020-04-14 14:17:41 +02:00
Arne Morten Kvarving d72db978d6 Merge pull request #2533 from akva2/fix_super_build
changed: check for pre-existing pybind11 target
2020-04-14 13:06:53 +02:00
Håkon Hægland 8c2ba0bfb6 Add Main.hpp to CMakeLists_files.cmake.
Pull request #2521 forgot to add Main.hpp to CMakeLists_files.cmake.
Adding Main.hpp to CMakeLists_files.cmake such that OpmInstall.cmake will
install the file to $CMAKE_INSTALL_PREFIX/include/opm/simulators/flow
when running "make install".
2020-04-14 10:43:26 +02:00
Arne Morten Kvarving 3d48a1d344 changed: check for pre-existing pybind11 target
this is necessary to allow building all modules in a 'super-build'
2020-04-14 09:16:13 +02:00
Joakim Hove 5a09624ad6 Add call to evaluate PYACTION in eclproblem::applyActions() 2020-04-14 08:48:32 +02:00
Bård Skaflestad a7126f45cd Merge pull request #2529 from alfbr/group-control-tests
Group control tests
2020-04-13 18:44:08 +02:00
Alf Birger Rustad fe22e34a7a Change to small case, consitent with the ohter test names. 2020-04-13 14:15:33 +02:00
Alf Birger Rustad 369061af9d Update reference solutions. 2020-04-13 14:09:53 +02:00
Alf Birger Rustad a897994af0 Added group control tests for model 2. 2020-04-13 13:26:37 +02:00
Joakim Hove 6b72227b3b Merge pull request #2526 from joakim-hove/sched-python-constructor
The "default" Schedule constructor has Python argument
2020-04-11 08:01:06 +02:00
Joakim Hove fcdca0f9e5 The "default" Schedule constructor has Python argument 2020-04-10 07:53:45 +02:00
Tor Harald Sandve 60bb9e4eaa Merge pull request #2505 from atgeirr/group-controls-at-wells-cleaned
Group controls at wells (cleaned)
2020-04-08 12:29:30 +02:00
Atgeirr Flø Rasmussen e7e4cf6f20 Silence warnings and fix whitespace. 2020-04-08 10:41:20 +02:00
Bård Skaflestad f4dbfc119a Merge pull request #2525 from joakim-hove/enabled-features
Remove keywords SEPARATE, RUNSUM and DATES from MissingKeywords list
2020-04-07 09:45:05 +02:00
Joakim Hove fc5875d981 Remove keywords SEPARATE, RUNSUM and DATES from MissingKeywords list 2020-04-07 08:31:22 +02:00
Bård Skaflestad ea4b25cb4c Merge pull request #2522 from joakim-hove/move-string-util
MOve String utility in opm-common
2020-04-04 21:58:22 +02:00
Joakim Hove 76111897a6 MOve String utility in opm-common 2020-04-04 16:28:16 +02:00
Joakim Hove 773dbcca5d Merge pull request #2521 from hakonhagland/refactor_flow
Refactor flow.cpp
2020-04-03 16:07:24 +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
Tor Harald Sandve 97876530e3 include wells under individual control when accumulating guiderates 2020-04-03 10:03:05 +02:00
Bård Skaflestad affeb9361c Merge pull request #2515 from blattms/add-missing-comm-headers
[FlexibleSolver] Added missing headers determine IsComm.
2020-04-02 18:48:12 +02:00
Markus Blatt 20f26bffbf fixup! [FlexibleSolver] Added missing headers determine IsComm. 2020-04-02 17:16:17 +02:00
Markus Blatt 9ce008ef7d [FlexibleSolver] Added missing headers determine IsComm.
Seems needed for some compilers
2020-04-02 17:10:43 +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
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
Tor Harald Sandve 70b7bed057 dont check if group has converged in solveWellEq 2020-04-02 13:57:38 +02:00
Atgeirr Flø Rasmussen f30ddffdb7 Split WellGroupHelpers to cpp/hpp.
Also changed namespace name.
2020-04-02 13:57:38 +02:00
Tor Harald Sandve 21b98b5573 Avoid negative targets and currentWellRates 2020-04-02 13:57:38 +02:00
Atgeirr Flø Rasmussen d2dac6c19c Bugfix: rates in assembleControlEqProd() are by canonical phases, not active. 2020-04-02 13:57:38 +02:00
Atgeirr Flø Rasmussen a8107afc11 Fix handling of FIELD for injector groups. 2020-04-02 13:57:38 +02:00
Tor Harald Sandve 66931b9cb7 Various fixes and refactoring.
- Communicate all well rates.
 - When changing controls, modify rates to satisfy failed constraint.
 - Ensure targets are positive.
 - Always solve for potentials for MSW (temporary fix).
2020-04-02 13:57:05 +02:00
Atgeirr Flø Rasmussen 3a5a8c23df Use generic control equation implementation. 2020-04-02 13:54:58 +02:00
Atgeirr Flø Rasmussen d703699e62 Avoid recursion above the FIELD group. 2020-04-02 13:54:58 +02:00
Atgeirr Flø Rasmussen 766d02cacc Unify group control equation codes. 2020-04-02 13:54:58 +02:00