Commit Graph

6247 Commits

Author SHA1 Message Date
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
Kai Bao
23d2097d44 various improvements to the inner iteration of ms wells 2019-04-07 14:54:05 +02:00
Kai Bao
031c19fc78 fixing mistakes due to rebasing. 2019-04-07 14:54:05 +02:00
Kai Bao
e9c0bdba06 using B_avg for the inner iteration for multisegment wells 2019-04-07 14:54:05 +02:00
Kai Bao
1df65913d7 updating the primary variables before calculating accumulation term 2019-04-07 14:54:05 +02:00
Kai Bao
79e51ab724 handling the situation that not all the connections are open
Then Wells struct and well from parser hold different numbers of
connections.

The current approach is a temporary solution. The final approach should
be done through parser side.

Things can be difficult is because that connections can be removed due
to multiple different causes after parsing. How to keep information
always updated is not trivial.
2019-04-07 14:53:38 +02:00
Kai Bao
c78a59eb1f considering the pressure dependence of the segment volume
segment volume is fixed, while duo to composition and pressure change,
within the fixed segment volume, different amounts of fluids can be
contained.
2019-04-07 14:53:38 +02:00
Kai Bao
972fed602e using a small value drawdown for connection
when crossflow is banned from the well, while the crossflow is happening
for this connection for mutlisegment well.
2019-04-07 14:53:38 +02:00
Kai Bao
04c35c8916 UseMultisegmentWell is defaulted to be true
to make the testing of the multisegment well model easier.
2019-04-07 14:52:18 +02:00
Kai Bao
f8767e09ec cleaning up and fixing the compilation error from rebasing 2019-04-07 14:52:18 +02:00
Kai Bao
9d83affb1b first version of restarting for multisegment well 2019-04-07 14:52:18 +02:00
Kai Bao
0d99686e97 fixing the segment treatment in the init of WellStateFullyImplicitBlackoil 2019-04-07 14:52:18 +02:00
Bård Skaflestad
2932531572
Merge pull request #1782 from GitPaean/upadting_perforation_solution_msw
updating perforation pressure and rates for MSW well
2019-04-05 16:41:43 +02:00
Kai Bao
e2b8edd968 updating perforation pressure and rates for MSW well 2019-04-05 10:38:01 +02:00
Kai Bao
b62dc0b5f2 addressing review comments 2019-04-04 16:22:19 +02:00
Kai Bao
ca69e2334a recovering well restart data for multisegment well
When multisegment wells are involved for RESTART, based on the recovered
segment-related quantities as Opm::data::Segment objects, the segment
phase rates and segment pressure are recovered as part of the
WellStateFullyImplicitBlackoil.
2019-04-04 16:22:19 +02:00
Bård Skaflestad
7523ffe15f Construct Segment-Related Structures in initLegacy()
Forgotten in previous commit.  This restores our ability to run
flow-legacy with the new WellStateFullyImplicitBlackoil::report().

Thanks to Kai Bao for alerting me to the issue.
2019-04-04 16:22:19 +02:00
Bård Skaflestad
55e452c605 Well State FIBO: Report() Segment Results by Seg-Numbers
This commit adds a new data member, seg_number_, that maps a linear
segment index (0 .. #segments - 1) to the appropriate segment number
(segment ID).  This ensures that member function report() is able to
produce segment results in terms of user-assigned segment numbers
rather than linear indices internal to the simulator and its state
variables.  This, in turn, decouples the well state object from the
output (summary/restart) code and makes the restart facility more
self contained.

Rewrite the unit test for WellStateFullyImplicitBlackoil to account
for the new indexing scheme when assigning the synthetic segment
results.

While here, also abide by the file's naming convention for data
members and locals.
2019-04-04 16:22:19 +02:00
Bård Skaflestad
e958ee1139 WellState FIBO: Initialize 'nseg_' in init()
Needed to guarantee that numSegments(wellID) returns sensible values
for wellID = numWells()-1 in the case of no multi-segment wells.
2019-04-04 16:22:19 +02:00
Bård Skaflestad
2418df701f WellState FIBO: Return Segment Vectors from report()
This commit extends class WellStateFullyImplictBlackoil to report
segment-related quantities as Opm::data::Segment objects (included
in Opm::data::WellRates objects).  All wells have at least a top
segment in the context of WellState FIBO, so there is a meaningful
value to report for each well.

We put the extraction of segment-related quantities into a new
helper function

    WellStateFullyImplicitBlackoil::reportSegmentResults()

to avoid cluttering up the body of report() more than absolutely
needed.

The primary use-case for this is assigning appropriate values to
items 8 through 11 of restart vector RSEG.  In turn, this will
enable restoring these quantities from a restart file.
2019-04-04 16:22:19 +02:00
Bård Skaflestad
519e6ad174 Make WellStateFIBO Header Self Contained
In particular, include Schedule.hpp since commit 222241b made the
init() member function depend on Schedule but failed to add the
requisite header.
2019-04-04 16:22:19 +02:00
hnil
3a0db3adff fixed indentation 2019-04-03 09:09:57 +02:00
hnil
30368ca7c5 Merge branch 'master' of https://github.com/OPM/opm-simulators into fix_cpr_oil_gas 2019-04-01 12:57:18 +02:00
hnil
88beff7a9d Fixed pressure equation for case where water is not pressent, often used for co2 simulations 2019-04-01 12:55:06 +02:00
Joakim Hove
66b7d1596a Remove ECHO and NOECHO from list of unsupported keywords 2019-03-29 12:27:11 +01:00
Joakim Hove
798c20a886 Remove EDITNNC from list of unsupported keywords 2019-03-29 12:26:54 +01:00
Joakim Hove
a9f680119a Remove WTEST from list of unsupported keywords 2019-03-29 12:26:35 +01:00
Joakim Hove
415694f206 Remove RPTSCHED from list of unsupported keywords 2019-03-29 12:26:15 +01:00
Tor Harald Sandve
17c249fa46
Merge pull request #1765 from andlaus/minor_cleanups
Minor cleanups
2019-03-26 12:38:50 +01:00
Joakim Hove
e16b19adc7
Merge pull request #1764 from joakim-hove/move-events
Move events
2019-03-21 14:51:52 +01:00
Joakim Hove
27c78eb3dc Extract NEW_WELL event from Schedule 2019-03-21 14:49:49 +01:00
Andreas Lauser
f1d3be27a7 ISTLSolverEbos: fix valgrind complaint that isIORank_ is not initialized
like most of the rest of the code, we now simply assume that rank 0
does all printing.
2019-03-21 12:35:26 +01:00
Joakim Hove
222241b3b3 Extract production update events from Schedule 2019-03-21 11:45:29 +01:00
Atgeirr Flø Rasmussen
f18477ce71
Merge pull request #1757 from atgeirr/improve_cpr_mod
Improve CPR solver
2019-03-21 11:19:10 +01:00
Atgeirr Flø Rasmussen
19b78b78c0 Updated after review comments. 2019-03-20 10:24:44 +01:00
Andreas Lauser
685a193558 make the branch self contained
Concretely this avoids having to patch eWoms by adding a generic
`Opm::transposeDenseMatrix()` template function instead of relying on
the dense matrix class to provide a `transpose()` method.
2019-03-19 15:09:19 +01:00
hnil
41acbcf861 change verbosity level setting for cpr to be more finegrained 2019-03-19 14:38:40 +01:00
hnil
b27e56e386 fixed bug in scaling of rhs for cpr 2019-03-19 14:32:32 +01:00
hnil
31f4c01938 Changes to make CPR able to use general indexing. 2019-03-15 11:27:38 +01:00
Arne Morten Kvarving
bedd88bc77 remove unused variables 2019-03-14 15:21:59 +01:00
Arne Morten Kvarving
d8d8050de9 convert to unix eol
unmark sources as executable
2019-03-14 13:37:05 +01:00
Arne Morten Kvarving
e1db2d2344 simplify: use dotproduct in DRS for vector 2019-03-14 11:52:21 +01:00
Arne Morten Kvarving
f98be9d43b simplify: use matrix-vector product in DRS for matrix 2019-03-14 11:52:21 +01:00
Arne Morten Kvarving
41ff0da2b4 fixed: drs without matrix-add-well-contributions 2019-03-14 11:52:21 +01:00
Arne Morten Kvarving
e05e5e4f0e Fix indenting 2019-03-14 11:52:21 +01:00
Atgeirr Flø Rasmussen
111feead14 Formatting fixes and removing unused code. 2019-03-14 11:22:07 +01:00
Atgeirr Flø Rasmussen
6ee5406a9f Formatting and indentation fixes. 2019-03-14 10:37:46 +01:00
Atgeirr Flø Rasmussen
4eb44b4808 Remove unused code and fix indentation changes. 2019-03-14 10:05:20 +01:00
Franz G. Fuchs
25299b7a0a correct exception handling in wells for parallel runs 2019-03-13 15:19:31 +01:00
hnil
40537f1999 Changes to make cpr work 2019-03-12 13:55:11 +01:00
Joakim Hove
485db348f0 Move well includes to subdirectory Well/ 2019-03-07 15:30:33 +01:00
Kai Bao
3c88cb2f9d correcting the sign of the accumulation term of StandardWell
Following the sign of the production rates.

And also keep the primary variables updated when calculating the
explicit quantities.
2019-03-06 09:48:30 +01:00
Andreas Lauser
c37bc1cf38 flow: hide a few unused eWoms parameters
these parameters where introduced with support for the TUNIING keyword
in `ebos`. since `flow` implements its own time stepping these
parameters are unused and should thus be hidden from view in it.
2019-03-04 13:58:38 +01:00
Andreas Lauser
21f5c1fbd3 ISTLSolverEbos: throw NumericalIssue instead of LinearSolverProblem
the former is caught by `ebos`, while the latter isn't. Alternatively,
this can be fixed by deriving `LinearSolverProblem` from
`NumericalIssue`, if preferred.
2019-03-04 13:58:38 +01:00
Andreas Lauser
0a9d6a0760 include missing header files
this makes the well model and the equil initializer header more autonomous.
2019-03-04 13:58:38 +01:00
Andreas Lauser
f36680bf3a EclProblem: Rename NewtonRawTolerance to NewtonTolerance
this property is not used by `flow` because `flow` implements its own
Newton method, but it not renaming the property prevents `flow` from
building.
2019-03-01 10:48:06 +01:00
Andreas Lauser
6753e9ca31 aquifers: add missing serialize() and deserialize() methods
the original purpose of those is to provide a checkpoint/restart
mechanism using an ad-hoc file format. They might also be useful for
implementing the adjoint functionality, though.
2019-02-25 15:04:16 +01:00
Andreas Lauser
46e41228b5 flow: call getConvergence() on the raw reservoir residual
i.e., the residual without the Schur complement for the wells being
applied. This hopefully fixes the issue pointed out by
[at]totto82.
2019-02-25 11:24:30 +01:00
Andreas Lauser
f5e7ca9bb3 well model: fix application of Schur complements
using the eWoms API for wells, the Schur compliment was not applied at
all. If `BlackOilWellModel::linearize()` was made non-trivial, the
Schur complement was applied twice in `flow`. With this patch, we only
apply this using the eWoms API (in
`BlackOilWellModel::linearize()`). I could not observe a signficant
effect on the convergence behaviour of `flow` for the cases which I
tested (Norne and realization 5 of Model 2).
2019-02-25 10:51:30 +01:00
Joakim Hove
935642ba88
Merge pull request #1716 from joakim-hove/unsupported-keywords
The missing features check takes a ParseContext argument
2019-02-22 07:49:43 +01:00
Andreas Lauser
d1fa4e3248 do not print the new core-ebos time step tuning parameters in the usage message
they are not used by `flow`.
2019-02-20 10:51:24 +01:00
WesselDeZeeuw
73faaf95b4 added aquiferConstants() 2019-02-18 09:19:26 +01:00
Arne Morten Kvarving
2bba0a395f fix initialization order 2019-02-18 09:19:26 +01:00
WesselDeZeeuw
fd4bdd6492 Trying to fix the WReorder Warning 2019-02-18 09:19:26 +01:00
WesselDeZeeuw
a72d61cb50 Base Class and AquiferCarterTracy and AquiferFetkovich implementation
Reordering of Aquifer Codes
2019-02-18 09:19:26 +01:00
Markus Blatt
2575cf715c
Merge pull request #1724 from blattms/strip-milu-debug-out
Remove bogus debug output printing in MILU.
2019-02-07 16:34:41 +01:00
Atgeirr Flø Rasmussen
dbd8b323da
Merge pull request #1721 from fgfuchs/parallel_well_logging
Correct Logging for Black Oil Well Model for parallel runs
2019-02-06 11:38:29 +01:00
Markus Blatt
29464cd832 Remove bogus debug output printing in MILU.
Somehow some standard output when running MILU () is still there and
it really clutters the output and and makes it unusable. This commit
removes it from flow.
2019-02-06 10:37:35 +01:00
Franz G. Fuchs
42f6f4d784 Correct Logging for Black Oil Well Model for parallel runs using DeferredLogger 2019-02-05 15:24:10 +01:00
Andreas Lauser
c379823dec Really adapt to the new linear solver API used by eWoms
I tested #1712 without deriving the `EclFlowProblem` type tag from
`FlowIstlSolver`, and it worked because the linear solver was still
`Opm::ISTLSolverEbos` because the linear solver is set via the
`LinearSolverSplice` a few lines down.

This time, I verified that the
`Ewoms::Linear::ParallelBiCGStabSolverBackend` was used if the
offending line was commented out. also, Norne worked fine with the
default solver as long as the Schur complement for the wells was done
explicitly.

Finally, the naming of the eWoms API is a bit inconsistent
(`setMatrix()` vs. `setResidual()`). any opinions here? I'm fine with
whatever.
2019-01-30 15:26:39 +01:00
Joakim Hove
13aeee109c The missing features check takes a ParseContext argument 2019-01-25 18:03:32 +01:00
Atgeirr Flø Rasmussen
e39f68787f
Merge pull request #1715 from atgeirr/fix-missing-virtual-destructor
Add virtual destructor to base class.
2019-01-21 21:58:15 +01:00
Atgeirr Flø Rasmussen
7c30ee46ce
Merge pull request #1713 from fgfuchs/replace_well_switching_logger
Replace well switching logger
2019-01-21 21:56:56 +01:00
Atgeirr Flø Rasmussen
6b6daa228a Add virtual destructor to base class. 2019-01-21 15:05:05 +01:00
Atgeirr Flø Rasmussen
037367bb03
Merge pull request #1714 from akva2/janitoring
Some janitoring
2019-01-21 15:00:58 +01:00
Atgeirr Flø Rasmussen
a00972dc0b
Merge pull request #1712 from andlaus/fix_ebos_convergence
adapt to the new preparation procedure of ewoms linear solvers
2019-01-21 14:54:09 +01:00
Arne Morten Kvarving
3f79495593 convert to unix line endings 2019-01-21 12:41:52 +01:00
Arne Morten Kvarving
fbc3491fe9 fixed: initializer list order 2019-01-21 12:41:36 +01:00
Franz G. Fuchs
7f1df40b74 fixed naming conventions, messages and comments 2019-01-21 08:26:28 +01:00
Franz G. Fuchs
26bc063a0c report rank only if size>1 2019-01-18 15:48:05 +01:00
Franz G. Fuchs
80747fc123 log rank 2019-01-18 15:16:59 +01:00
Franz G. Fuchs
129e7d181e replace well switching logger with deferred logger 2019-01-18 14:04:30 +01:00
Andreas Lauser
2563a58db8 adapt to the new preparation procedure of ewoms linear solvers 2019-01-18 09:05:24 +01:00
Bård Skaflestad
a689973760
Merge pull request #1708 from blattms/warn-parallel-logging-fallout
Warn about parallel logging fallout only on request / Use uppercase logfiles

Fixes OPM/opm-common#606
2019-01-17 16:13:25 +01:00
Markus Blatt
2dd0b62eff [bugfix] Added missing ) to make code compile 2019-01-16 12:03:01 +01:00
Markus Blatt
4f4f5cbca3 [bugfix] Only strip ".DATA" or "." extensions.
As there might models named MODEL.01.DATA for which a call
"flow MODEL.01" would have stripped the extension.
2019-01-16 12:03:01 +01:00
Markus Blatt
20d12f5b53 [bugfix] Use file not filename to remove files not in current directory.
Passing just the filename to remove only will remove files in the
current directory. When --output-dir the files would not have been
removed.
2019-01-16 12:01:46 +01:00
Markus Blatt
0c2edcfe47 Remove debugging output 2019-01-16 11:56:47 +01:00
Atgeirr Flø Rasmussen
f9f02724b9
Merge pull request #1710 from blattms/fix-parallel-well-hasTHPConstraints
Make BlackoilWellModel::hasTHPConstraints() work correctly in parallel.
2019-01-15 09:50:55 +01:00
Markus Blatt
89ec35e0d2 Make BlackoilWellModel::hasTHPConstraints() work correctly in parallel.
Previously, this method did not take parallelism into account but just
checked the local wells for the constraints. Depending on the load balancing
of the wells this sometimes led to different return values of the function on different
processors. As the output is used to limit the time step size, different processors
were sometimes using different time steps in their local computations. This screwed
up convergence checks int the nonlinear operator such that only some processor thought
convergence was already achieved while others wanted to do more iterations.

With this commit the method now returns whether there is any well on any processor
with the constraint being true.
2019-01-14 22:14:01 +01:00
Bård Skaflestad
767df6c6fe Deferred Logger: Support Older MPI Implementations
The MPI_Pack() function does not support pointers-to-const until
MPI-3.
2019-01-14 18:10:53 +01:00
Atgeirr Flø Rasmussen
8927df3095
Merge pull request #1705 from fgfuchs/feature_gatherdeferredlogger
gather deferredLogger implemented
2019-01-14 14:56:45 +01:00
Markus Blatt
4b6144bb65 Only warn and show parallel logging fallout on demand.
This commit adds an option that allows to enable detecting parallel
logging fallout (option --enable-logging-fallout-warning). It is now
false by default (previous behavior was as if the option was true).

If option is true a warning will be printed for any process with nonzero
rank that does try to log to *.PRT or *.DBG and the logged output will be appended
to these files at the end.
2019-01-14 13:06:21 +01:00
Markus Blatt
52270e7ac7 Use uppercase basename for *DBG and *PRT files for any extension.
Previously runs of flow started with 'flow base.' Would result in base..DBG
files; note the double dot and the case sensitivity. Now the file will be
BASE.DBG in this case. Note that any extension will be stipped (not only
.DATA as before).
2019-01-14 13:03:03 +01:00
Franz G. Fuchs
70425a681f style changes 2019-01-14 09:22:17 +01:00
Franz G. Fuchs
f61e55995a query mpi pack size 2019-01-11 21:23:09 +01:00
Franz G. Fuchs
828c3c7949 fix for variable number of messages 2019-01-11 19:05:11 +01:00
Joakim Hove
848072f658
Merge pull request #1362 from GitPaean/fixing_history_mode
Fixing history mode
2019-01-11 18:05:01 +01:00
Franz G. Fuchs
37d691e678 bugfixes 2019-01-11 15:47:22 +01:00
Franz G. Fuchs
5d902c8bd4 removed commented out line 2019-01-11 13:56:58 +01:00
Franz G. Fuchs
831a374d02 gather deferredLogger implemented 2019-01-11 13:53:18 +01:00
Tor Harald Sandve
2d2d0c4433 Adapt to linear solver api from ewoms 2019-01-10 15:50:09 +01:00
Atgeirr Flø Rasmussen
578923f93a
Merge pull request #1685 from GitPaean/sliencing_extra_
removing some white spaces.
2019-01-10 14:52:41 +01:00
Atgeirr Flø Rasmussen
601cce155c
Merge pull request #1693 from GitPaean/ignoring_well_no_perf
not adding wells without perforations to WellsManager
2019-01-10 14:47:20 +01:00
Kai Bao
affb767017
Merge pull request #1642 from WesselDeZeeuw/AquiferFetkovich
Aquifer fetkovich
2019-01-10 13:06:08 +01:00
Atgeirr Flø Rasmussen
9c799b9c97
Merge pull request #1698 from fgfuchs/new-feature-deferredlogger
New feature deferredlogger
2019-01-09 07:27:49 +01:00
Kai Bao
a9f40df678 not adding wells without perforations to WellsManager 2019-01-08 14:08:14 +01:00
Andreas Lauser
69e21eec0b
Merge pull request #1684 from andlaus/fix_tabulation_api
use the common API opm-material for functions
2019-01-08 13:34:58 +01:00
Franz G. Fuchs
040d576839 Use angle brackets for includes
verify that the tagged messages are forwarded correctly
2019-01-08 13:26:19 +01:00
Franz G. Fuchs
5b2a38fee5 doxygen comment 2019-01-08 11:41:19 +01:00
Franz G. Fuchs
c815c56287 new feature: DeferredLogger class 2019-01-08 11:28:18 +01:00
Kai Bao
47b933a58e removing DynamicListEconLimited
it is not used anymore. A lot of related implementation has been moved
to WellTestState.

Its existence makes some logic rather confusing and some new development
not easy.
2019-01-08 11:28:11 +01:00
Kai Bao
60e5a95972 only using Wells for determination of the RESV well
One of them is redundant, we do not need both of them.
2019-01-07 12:14:33 +01:00
Joakim Hove
8a9df385af Add ErrorGuard when parsing 2019-01-07 10:44:33 +01:00
Kai Bao
98450b5aa8 fixing the way in handling the RESV rates for WCONHIST 2019-01-04 15:10:18 +01:00
WesselDeZeeuw
1b5e65eedd fixing grid_index for AquiferFetkovich 2019-01-03 15:56:55 +01:00
Zeeuw
73445a3055 solves merging conflicts 2019-01-03 13:18:01 +01:00
WesselZ
d6f1f1bd3d Implementation of Fetkovich Aquifers. Makes changes to the files for BlackOilAquiferModel(_impl) and AquiferFetkovich file. 2019-01-03 13:04:10 +01:00
Kai Bao
bfc915849a BHP limit is taken care of from parser side
WellsManager does not need to provide default bhp limit anymore.
2019-01-03 09:48:02 +01:00
Kai Bao
ecdb299671 handling the RESV well distr calculation correctly
more work has been done in the parser side, and the simulator side is
also updated accoridingly.
2019-01-03 09:48:02 +01:00
Kai Bao
9a6f390f38
Merge pull request #1691 from atgeirr/fix-missing-grat
Fix missing GRAT in switch.
2019-01-02 21:22:41 +01:00
Atgeirr Flø Rasmussen
9ba0184da4
Merge pull request #1676 from GitPaean/fixing_grid_indices
fixing grid_index for AquiferCarterTracy
2019-01-02 15:32:28 +01:00
Atgeirr Flø Rasmussen
10c77257ad Fix missing GRAT in switch. 2019-01-02 15:29:22 +01:00
Kai Bao
b3f29de675 using compressed cell index for cellToConnectionIdx_ in AquiferCarterTracy 2019-01-02 14:59:12 +01:00
Kai Bao
dcf036e757 removing some white spaces. 2019-01-02 13:39:00 +01:00
Andreas Lauser
868f447f20 use the common API opm-material for functions
the way to get the result of an evaluation is by return value, i.e.,

 z = fn.eval(x, y);

not by passing a separate argument to the eval() function like

 fn.eval(x, y, z);

the `XYTabulated2DFunction` used the latter approach causing an API
inconsistency with all other tabulation classes in
opm-material. OPM/opm-material#319 fixes that but requires this mop-up
as a consequence.
2018-12-20 10:46:22 +01:00
Atgeirr Flø Rasmussen
483d6c50e1
Merge pull request #1681 from atgeirr/fix-shutting-new-well
Avoid opening well that was shut on same time step.
2018-12-17 11:47:31 +01:00
Atgeirr Flø Rasmussen
a48fbac322
Merge pull request #1680 from GitPaean/flow_polymw_remake
adding the simulator for flow injectivity study
2018-12-17 10:26:41 +01:00
Kai Bao
3a55e4aac2 fixing grid_index for AquiferCarterTracy
adding the mapping from cartisian indices to the actual grid indices.
2018-12-14 15:36:49 +01:00
Kai Bao
0c42a179d5 makig StandardWellV can handle producer
now StandardWellV should be able to be used as the general Standard
Well.
2018-12-14 10:24:08 +01:00
Atgeirr Flø Rasmussen
b1c16e536b Avoid opening well that was shut on same time step. 2018-12-14 10:04:59 +01:00
Kai Bao
76edcc0d91 addressing the second part of comments form PR#1680 2018-12-13 21:31:36 +01:00
Kai Bao
c4254240e2 addressing the first part of comments form PR#1680
there should be no functional change.
2018-12-13 13:29:59 +01:00
Kai Bao
5535406b67 cleaning StandardWell and StandardWellV
to make them more comparable, so that we can do refactoring easier
later.
2018-12-12 15:58:15 +01:00
Kai Bao
525caad508 finishing the function addWellContributions for StandardWellV 2018-12-11 21:40:47 +01:00
Kai Bao
612ac74b89 finish the injecivity functionality
the result looks okay
2018-12-11 21:40:47 +01:00
Kai Bao
391d31e1d6 adding the polymer molecular related to the well model 2018-12-11 21:40:47 +01:00
Kai Bao
7923628f83 adding the few injectivity related functions to StandardWellV 2018-12-11 21:40:47 +01:00
Kai Bao
a08216efd5 creating StandardWellV as the new well model
to employ dynamic-size Evalution, vectors and matrices.
2018-12-11 21:40:47 +01:00
Kai Bao
b079c0a1e5 adding flow_injecitivity executable target 2018-12-11 21:40:47 +01:00
Kai Bao
e1ede3c9d5 adding polymer molecular weight to BlackoilPhases and phaseUsageFromDeck 2018-12-11 21:31:47 +01:00
Kai Bao
93fb5a2c52 add a few fields related to injectivity to WellStateFullyImplicitBlackoil
to account for the water throughput, skin pressure and water velocity
for each perforation.
2018-12-11 21:31:47 +01:00
Atgeirr Flø Rasmussen
56cc37f255 Move throw-if-nan to after storing convergence report. 2018-12-11 13:10:22 +01:00
Tor Harald Sandve
3d866812a6
Merge pull request #1671 from atgeirr/fix-infinite-loop
Fix potential infinite loop
2018-12-07 12:41:37 +01:00
Atgeirr Flø Rasmussen
69cd2f9b84
Merge pull request #1668 from totto82/remove_logging
Remove repetitive logging info
2018-12-07 10:53:31 +01:00
Atgeirr Flø Rasmussen
cb06770b54
Merge pull request #1638 from trinemykk/addtracer
add method for getting the surfacevolume well connection rate
2018-12-07 10:38:21 +01:00
Atgeirr Flø Rasmussen
cf687c19fb
Merge pull request #1571 from kel85uk/fix_#14_aquifer_making_connections
Fixes for carter tracy aquifer model
2018-12-07 09:56:36 +01:00
Tor Harald Sandve
77869606f3 Remove repetitive logging info 2018-12-07 09:28:27 +01:00
Atgeirr Flø Rasmussen
23edd39c63 Revise logic of shutting wells vs. chopping step.
An infinite loop was possible if no wells were actually shut,
yet the step was restarted with no chopping.
2018-12-03 13:25:19 +01:00
Atgeirr Flø Rasmussen
6b896d178e Add bool return value to forceShutWellByNameIfPredictionMode().
Returns true if the well requested was actually shut.
2018-12-03 13:24:34 +01:00
kel85uk
4ccbfefe0b Factor out face area calculation to a separate function. 2018-11-29 09:43:55 +01:00
kel85uk
875fec79fc Makes the necessary interface changes to check for nullptr instead of values for the influx_coeff and aquifer initial pressure. 2018-11-29 07:56:53 +01:00
Kai Bao
575907941d removing some repeated code in phaseUsageFromDeck 2018-11-27 14:55:26 +01:00
Arne Morten Kvarving
51da91c1ad remove files moved to opm-simulators-legacy 2018-11-27 11:00:21 +01:00
Atgeirr Flø Rasmussen
b6f8128260
Merge pull request #1661 from akva2/removeBlackoilStateCorr
Remove usage of BlackoilState class
2018-11-27 10:14:06 +01:00
Tor Harald Sandve
b661791a63 Remove usage of BlackoilState class
This allows (re)moving of the following files
opm/autodiff/RateConverter.hpp
opm/autodiff/Compat.cpp
opm/autodiff/Compat.hpp
opm/core/props/BlackoilPropertiesInterface.hpp
opm/core/simulator/BlackoilState.cpp
opm/core/simulator/BlackoilState.hpp
opm/core/simulator/BlackoilStateToFluidState.hpp
opm/core/utility/initHydroCarbonState.hpp
opm/polymer/PolymerBlackoilState.cpp
opm/polymer/PolymerBlackoilState.hpp
tests/test_blackoilstate.cpp
2018-11-27 09:38:38 +01:00
Atgeirr Flø Rasmussen
7e91381cd8 Fix another parallel bug.
A WellSwitchingLogger was created in a local context (meaning not
all processes might be there), but since its destructor does
communication it must be called in a global context (guaranteeing
that all processes create it).
2018-11-26 10:21:25 +01:00
Atgeirr Flø Rasmussen
09405ce6f5 Fix bug in parallel case.
Since computeAverageFormationFactor() involves communication to reduce
values across the whole reservoir, it must be called by all processes,
also those with no wells to reopen.
2018-11-26 09:39:54 +01:00
Kai Bao
76271e3960 not shut a well because of cannot-produce-inject reason
which is a numerical reason. Removing it for now for better result.

It minght come back with more complete strategy and understanding.
2018-11-25 20:31:56 +01:00
Kai Bao
3dac7266b0 typo correction and message output adjustment for WTEST
recovering the const for updateWellStateWithTarget

there is no functional change.
2018-11-25 20:31:56 +01:00
Kai Bao
680c45b8f8 not updateWellControl for non-operable wells 2018-11-25 20:31:56 +01:00
Kai Bao
eaa3ad19f5 first version of the well testing for physical reason
the key difficulty is that we do not have reliable explicit information
to do the testing.

In this version, we try to obtain the explicit information by finishing
one converged solving.
2018-11-25 20:31:56 +01:00
Atgeirr Flø Rasmussen
48db4062b5 Count lower/upper entries simpler and faster. 2018-11-23 21:38:22 +01:00
Atgeirr Flø Rasmussen
8a038401ce Avoid in-loop allocation in convertToCRS().
This is done by counting entries first.
2018-11-23 21:38:22 +01:00
Atgeirr Flø Rasmussen
8bd3cbc1c1 Only shut down wells if under prediction-type control. 2018-11-23 12:51:13 +01:00
Atgeirr Flø Rasmussen
1979fc8f5d Avoid deep chopping by shutting down misbehaving wells. 2018-11-22 16:24:52 +01:00
Atgeirr Flø Rasmussen
422d477945 Add method BlackoilWellModel::forceShutWellByName(). 2018-11-22 16:24:17 +01:00
Atgeirr Flø Rasmussen
3bbc13a9ce Add step numbers to convergence reports, add query method. 2018-11-22 11:14:39 +01:00
Atgeirr Flø Rasmussen
9167d08839 Limit timestep when we have THP constraints present.
Using 16 days as the current limit. Could be made a user parameter.
2018-11-22 11:03:18 +01:00
Kai Bao
7d721408f2 adding canProduceInjectWithCurrentBhp to StandardWell
and use it the operability_status determination.
2018-11-22 07:05:46 +01:00