Commit Graph

6116 Commits

Author SHA1 Message Date
Bård Skaflestad
0760442ac1 Remove FIPNUM From List of Unsupported Keywords
We've supported the keyword--both in the deck reader (parser) and in
the simulator--for a long time.
2019-06-05 12:42:26 +02:00
Atgeirr Flø Rasmussen
d42c5426b2
Merge pull request #1872 from totto82/eval_friction2
Make calculateFrictionFactor evalution  + critical bugfix in MSW friction model
2019-06-05 11:19:28 +02:00
Joakim Hove
47f4e750d2
Merge pull request #1865 from joakim-hove/use-shared-summarystate
Use shared summarystate
2019-06-04 09:49:56 +02:00
Atgeirr Flø Rasmussen
08cec09293
Merge pull request #1845 from blattms/abort-on-unknown-keywords-v2
Abort if flow is run with unknown keywords.
2019-06-03 15:42:02 +02:00
Atgeirr Flø Rasmussen
84a8143bad Improved parameter hierarchy and const-correctness. 2019-06-03 11:42:30 +02:00
Atgeirr Flø Rasmussen
a76b19d95a Make FlexibleSolver feature-complete.
In particular:
 - Add parallel solvers and preconditioners.
 - Add the update() interface to preconditioners, and use it with CPR.
2019-06-03 11:42:30 +02:00
Halvor Møll Nilsen
ec498086a6 Add flexible solver and preconditioner infrastructure.
Also use it in flow_blackoil_dunecpr.cpp. Adds new command-line parameter,
--linear-solver-configuration-json-file, to read linear solver config from
JSON-format file at runtime.
2019-06-03 11:42:30 +02:00
Tor Harald Sandve
0d28dfff17 fix cutoff value bug in haalandFormula 2019-06-03 11:28:15 +02:00
Tor Harald Sandve
779dbd39dd make calculateFrictionFactor Evaluation 2019-06-03 11:24:56 +02:00
Tor Harald Sandve
8f60a5f9fc
Merge pull request #1841 from andlaus/remove_isSubstep
EclProblem: remove the isSubstep parameter from writeOutput()
2019-06-03 10:41:12 +02:00
Tor Harald Sandve
4c4921c6b2 fix segfault when no well report is registred 2019-06-03 09:22:04 +02:00
Atgeirr Flø Rasmussen
2cc22f99cb
Merge pull request #1868 from andlaus/sparse_matrix_adapter_from_linear_solver
set the SparseMatrixAdapter property in the linear solver type tag
2019-05-31 20:40:10 +02:00
Kai Bao
8fd1a8b7da assert pressure derivative in getSegmentRateUpwinding is zero 2019-05-31 12:51:50 +02:00
Kai Bao
5aacda1880 adding some comments about getSegmentRateUpwinding() 2019-05-31 11:22:35 +02:00
Andreas Lauser
e36ae88ab9 set the SparseMatrixAdapter property in the linear solver type tag
this is necessary because after OPM/ewoms#513, the
`SparseMatrixAdapter` property will be "owned" by the linear solver
and because ISTLSolverEbos does not build on top of
`Ewoms::ParallelBaseBackend`.
2019-05-31 10:55:13 +02:00
Kai Bao
c5983eeec5 not trying to update RESV target for prediction producers 2019-05-30 11:58:23 +02:00
Andreas Lauser
80238d9940
Merge pull request #1863 from totto82/fix_init
Make it possible to restart without computing initial conditions
2019-05-29 12:23:40 +02:00
Atgeirr Flø Rasmussen
ff2965e346
Merge pull request #1862 from GitPaean/fixing_multisegment_wells_cleaning_up_restarting_test_1
adding function updateUpwindingSegments() for MSW
2019-05-29 10:09:08 +02:00
Joakim Hove
b129a10362 Use shared SummaryState in BlackoilWellModel 2019-05-29 07:52:17 +02:00
Joakim Hove
a0aa7fcc2b Use shared SummaryState when instantiating WellsManager 2019-05-29 07:44:23 +02:00
Joakim Hove
c6af5f11b6 Fixup: Use ProductionControls and InjectionControls 2019-05-29 07:12:15 +02:00
Joakim Hove
dc4f57f7eb
Merge pull request #1831 from joakim-hove/use-wells2-controls
Use wells2 controls
2019-05-29 06:46:58 +02:00
Tor Harald Sandve
ae78cb86df Make it possible to restart without computing initial conditions 2019-05-28 13:04:28 +02:00
Kai Bao
236e4d7e33 adding function updateUpwindingSegments() for MSW
to update the upwinding segment for each segment based on flow direction
2019-05-28 12:35:59 +02:00
Tor Harald Sandve
613473082f Address PR comments 2019-05-24 16:45:27 +02:00
Joakim Hove
511645d12c Use InjectionControls and ProductionControls data classes 2019-05-23 16:27:17 +02:00
Tor Harald Sandve
821794b0ad Add well potential output to MSW
The common part is moved to the well interface class
This commit also adds iterations to the standardWells
well potential calculations to improve the results
2019-05-23 15:32:48 +02:00
Joakim Hove
b6840db604 Use new well implementation Well2 from opm-common 2019-05-22 21:47:45 +02:00
Joakim Hove
a3361794cf
Merge pull request #1853 from joakim-hove/unsupported
Add keywords to the list of unsupported keywords
2019-05-22 11:53:06 +02:00
Atgeirr Flø Rasmussen
025b828e80
Merge pull request #1855 from totto82/fix_throw
throw runtime_error instead of logic_error
2019-05-22 11:39:09 +02:00
Tor Harald Sandve
a33c967ad0 throw runtime_error instead of logical_error 2019-05-22 10:08:55 +02:00
Joakim Hove
4a4a8bb3e7 Add keywords to the list of unsupported keywords 2019-05-22 06:54:05 +02:00
Kai Bao
080e840f2f using tolerance_wells_ for BHP control tolerance for MSW 2019-05-16 12:20:35 +02:00
Kai Bao
28f0274fb5 fixing bugs spotted in the review comments 2019-05-15 16:28:18 +02:00
Kai Bao
4593453d10 adding function checkConvergenceControlEq to refactor getWellConvergence
only functional change is that rate control or BHP control has different
tolerance for MSW now.
2019-05-15 16:28:18 +02:00
Markus Blatt
9b0e86a172 Abort if flow is run with unknown keywords.
This change will print the encountered unknown keywords to std::cerr
(albeit in the format ThisKeyword and not --this-keyword) and abort
before running the simulator.
2019-05-15 10:03:07 +02:00
Andreas Lauser
8657f18075 EclProblem: remove the isSubstep parameter from writeOutput()
Now that the book keeping for time stepping is correct even in `flow`,
this parameter has become redundant.
2019-05-13 13:05:39 +02:00
Atgeirr Flø Rasmussen
8197bcfc54
Merge pull request #1832 from GitPaean/upding_well_control_inner_msw
updating well control during iterateWellEquations in MSW
2019-05-13 12:47:10 +02:00
Tor Harald Sandve
6887f3bc73
Merge pull request #1821 from andlaus/tickling_the_dragon
flow: provide the correct episode size
2019-05-13 12:40:35 +02:00
Atgeirr Flø Rasmussen
c2db2042ea
Merge pull request #1825 from dr-robertk/PR/fix-istl-shared-ptr
Adjust to shared_ptr change in dune-istl >= 2.7.
2019-05-13 09:01:29 +02:00
Kai Bao
ba106602e1 moving the output of the Report step information earlier
a lot of things have happened before the printing out the `Report step`
information. When some error messages get thrown, it is easy to make
people confused to look a the wrong report step.
2019-05-11 14:13:26 +02:00
Kai Bao
8c96aeebbe updating well control during iterateWellEquations in MSW 2019-05-10 14:56:20 +02:00
Andreas Lauser
9b0be0f8ad flow: provide the correct episode size 2019-05-09 13:28:56 +02:00
Robert Kloefkorn
6c77fae891 [cleanup][istl] Adjust to shared_ptr change in dune-istl >= 2.7. 2019-05-09 11:28:52 +02:00
Atgeirr Flø Rasmussen
c17adf788f Moved files to opm/simulators/ subdirs. 2019-05-08 12:58:19 +02:00
Tor Harald Sandve
890d34a9e1 Add support for water induced compaction using
ROCKCOMP, ROCK2D, ROCK2DTR, ROCKWNOD and OVERBURD
2019-05-07 13:17:29 +02:00
Andreas Lauser
d329547463 EclProblem: clean up the time management code
- when an episode/report step is over, the next is started by endEpisode()
- the problem does not deal with updating the simulation time anymore
- rename `episodeIdx` in to `reportStepIdx` the 'EclWriter' because
  this variable is -- and always has been -- the report step number
  used by some parts of `opm-output`'s ECL writing code (the report
  step number is equivalent to the episode index plus 1). IMO, the
  output and parser code should be made more consistent in regard of
  whether it expects 0-based or 1-based indices, but this is a story
  for another day.
2019-05-03 14:07:15 +02:00
Andreas Lauser
b9995f697f well models: remove superfluous arguments
concretely this means the `eclState` and `schedule` arguments to the
`init()` and `beginTimeStep()` methods.
2019-05-03 14:07:15 +02:00
Bård Skaflestad
4d76ea5000
Merge pull request #1809 from atgeirr/log-messages-only-once
Clear DeferredLogger's message container after logging.
2019-04-30 15:47:40 +02:00
Atgeirr Flø Rasmussen
32572ac2ab Clear DeferredLogger's message container after logging.
This keeps from logging the same messages again. Also add clearMessages()
method, which is useful to clear the local container after gathering into
a global container (which leaves the local containers untouched).
2019-04-30 12:24:31 +02:00
Kai Bao
6c2a806e61 correcting an assertion mistake introduced in PR#1803 2019-04-30 10:25:17 +02:00
Atgeirr Flø Rasmussen
9bbb0ef679
Merge pull request #1807 from atgeirr/enable-msw-by-default
Enable multi-segment wells by default.
2019-04-28 23:13:16 +02:00
Atgeirr Flø Rasmussen
d2f8f07337 Enable multi-segment wells by default. 2019-04-27 07:16:36 +02:00
Bård Skaflestad
75e8508e3b
Merge pull request #1803 from blattms/remove-warnings
Remove warnings experienced with g++-8
2019-04-26 17:41:55 +02:00
Tor Harald Sandve
8a4117441c Make sure that the convergece report is stored before throw 2019-04-25 10:33:39 +02:00
Markus Blatt
b847f36ec8 Removes warning about unused variable. 2019-04-25 10:00:59 +02:00
Markus Blatt
66ef71e67a Removes warning about ignored return type qualifier on function. 2019-04-25 10:00:59 +02:00
Markus Blatt
3aa60433ad Removes unsigned-signed integer comparison warnings. 2019-04-25 10:00:59 +02:00
Markus Blatt
48c3802bf3 Removes unused function parameter warnings. 2019-04-25 10:00:59 +02:00
Joakim Hove
ed91356a90 Add 'FLUXTYPE' to list of not supported keywords 2019-04-19 11:02:18 +02:00
Joakim Hove
58f541cd93 Add missing "," in set literal 2019-04-17 06:43:08 +02:00
Kai Bao
8e5bfa0c67
Merge pull request #1751 from GitPaean/fixing_multisegment_wells_cleaning_up
various improvements/corrections to the multisegment well model
2019-04-12 14:28:12 +02:00
Kai Bao
5a34922d11 silencing some compilation warnings. 2019-04-12 12:27:02 +02:00
Kai Bao
88fb158067 upwinding segment for top segment is itself 2019-04-12 11:25:19 +02:00
Kai Bao
1d7089fca8 some minor cleaning up 2019-04-12 10:43:30 +02:00
Kai Bao
af9a500b98 setting UseMultisegmentWell to be false by default 2019-04-12 10:30:50 +02:00
Kai Bao
683c097ecd adding residual of control equation to getWellResiduals() for MSW
then it is consistent that when it is converged, we do not need to enter
this function anymore.
2019-04-12 10:30:03 +02:00
Atgeirr Flø Rasmussen
d03465b00d
Merge pull request #1783 from GitPaean/not_throw_for_potential_failure
not throw for failure when failing in calculating well potentials
2019-04-12 09:45:34 +02:00
Markus Blatt
a270994ad0 Support compiling Cpr without any MPI support.
There is a problem compiling upstream
Hierarchy::recalculateGalerkin() without MPI. Therefore we
reimplement that method in our AMG version. Fixes will travel
upstream.

Apart from that we made sure that all types have a meaning even
if there is no MPI found and that we at least have redistribute method
to call even if using SequentialInformation. In that case the method
does nothing but prevents compilation errors complaining about missing
parallel functionality.
2019-04-11 18:43:07 +02:00
Markus Blatt
26e1a9a94d Support DUNE 2.4 with CPR.
This version does not support the DirectsolverSelector struct and we
therefore implemented a fallback.
2019-04-11 14:15:04 +02:00
Markus Blatt
81b7af1d8a Support DUNE 2.5 with CPR reusing hierarchy 2019-04-10 15:01:35 +02:00
Markus Blatt
29e893dc8e Make sure the the OwnerOverlopCommunication object stays alive.
As the AMG hierarchy is kept and uses the initial OwnerOverlopCommunication object
we need to make sure that this object lives as long as the hierarchy. We assure
this by storing a shared_ptr to it in ISTLSolverEbosCpr and reuse it to construct
the WellModelMatrixAdapter.
2019-04-10 14:40:46 +02:00
Markus Blatt
8057c2ba83 Use a shared pointer to the OwnerOverlapCommunication in WellModelMatrixAdapter.
Previously the OwnerOverlapCommunication object was owned by the adapter as a
unique_ptr was used. The change to shared_ptr makes it possible to to extract
it and reuse even if OwnerOverlapCommunication is thrown away.
2019-04-10 14:40:46 +02:00
Markus Blatt
6538b59d9e Added parallel CPR that reuses the matrix hierarchy.
Currently this just compiles but still segfaults in parallel.
2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
07e495c9da More minor cleanup. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
7664d27849 Clean up formatting and get most types from superclass. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
be86b90bac Make typed protected rather than private, enabling inheritance. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
2cf990e404 Do not store copy of weights inside BlackoilAmgCpr class. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
416cc93f96 Remove code that is no longer needed. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
0e5a5c5266 Minor cleanup. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
3d9c776384 Disable most of the file, as the base version is sufficient.
All features have been added to BlackoilAmg.hpp.
2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
6d18c2849d Allow updating the AMG preconditioner.
This adds the significant modifications from the BlackoilAmgCpr
experimental class to BlackoilAmg.
2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
032701ffc9 Silence unused argument warnings. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
0e1db0c6bd Reindent, remove unused function (after refactoring). 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
5d68a308b5 Fix memory bug by refactoring.
Moving out of a matrix in the same function argument list as the matrix is passed
to another function is wrong. Simplified by avoiding the unwieldy tuple.
2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
c92d84432c Replace tabs with spaces. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
5f4f8b71a8 Silence override and member order warnings. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
29837be2e3 Changes to minimize differences to original istl versions.
Also added note pointing to original istl files.
2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
13c6463f89 Refactor to be closer to the original amg.hh.
Should minimize the diff when comparing.
2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
b39815edb5 Minor formatting and removing unused code. 2019-04-10 14:40:46 +02:00
Atgeirr Flø Rasmussen
28dfef1ecf Compile fix: do not use undefined member. 2019-04-10 14:40:46 +02:00
hnil
4f1603407d Added timing of prepare call for linear solvers 2019-04-10 14:40:46 +02:00
hnil
ed24b3fcad changed code to use direct solver on coarses scale for amg. This should runtime stettings for this.. 2019-04-10 14:40:46 +02:00
hnil
f05a9fdb25 Version of cpr amg which can reuse setup and also change smoothers of fine and coarse system by changing tags 2019-04-10 14:40:46 +02:00
Kai Bao
1faf4de904 not throw for failure when failing in calculating well potentials
it is just a temporary approach to recover the prediction case. In the
case, there is no group control, while there is some requirements of
well potential output
2019-04-09 14:28:44 +02:00
Kai Bao
e73fc4ebe4 first version of using upwinding to handle mass balance for MSW
some details to come to make it complete.

We are not handling it for injectors and also we are not considering the
upwinding when handle the frictional pressure loss and acceleration
pressure loss.
2019-04-08 14:23:21 +02:00
Kai Bao
2c69556fad correcting of the sign when calculating perforation pressure
the sign of the perforation and cell pressure difference was wrong.
2019-04-08 14:23:05 +02:00
Kai Bao
dadb31f093 fixing some mistakes from rebasing 2019-04-07 14:55:08 +02:00
Kai Bao
e5090a26fb setting the simulation parameters 2019-04-07 14:55:08 +02:00
Kai Bao
49a8c7bfd1 changing the sign of the mass balance equations for ms wells
following the conventions with StandardWell
2019-04-07 14:55:08 +02:00