Commit Graph

52 Commits

Author SHA1 Message Date
Kai Bao
f3f096dbbb recovering some unecessary changes.
PR #1477 introduced different ways to improve the WellState initialization.
Basically, the WellState initialization will be something challenging to
handle along with the improvement of the well model.
2018-05-28 16:05:02 +02:00
Kai Bao
18917b81f4 adding THP well control equation 2018-05-28 16:05:02 +02:00
Kai Bao
89bb589755 update the reservoir volume in WellState 2018-02-21 12:20:43 +01:00
Kai Bao
abfe9d445b recoring solution gas rate and solutiion oil rate in StandardWell 2018-02-21 12:20:43 +01:00
Kai Bao
f33657aabf adding a few memebers to WellStateFullyImplicitBlackoil
to get ready for populating well reservoir rates, solution gas
production rates and solution oil production rates.
2018-02-21 12:20:43 +01:00
Tor Harald Sandve
a89a6af854 Some more cleaning in the output code in opm-output, ewoms and opm-
simulator

1) Don't depend on legacy code for communicating the data::wells
2) Bugfix. Store globalIdx instead localIdx in data::wells::complitions
3) Move ThreadHandle to ebos
2018-02-12 08:44:43 +01:00
Kai Bao
8274fc9275 replacing BlackoilPhases:: with Oil Water Gas in well model
and also WellStateFullyImplicitBlackoil.

There are more places to do so, while it might be easier to create a
header file for this.
2017-11-16 12:08:58 +01:00
Tor Harald Sandve
b9bc4b00cb Make the wellModel self-contained
The wellModel is now persistent over the time steps,
with an update method called every reportStep/episode.

This allows the following simplifications:

    1. move the wellState to the WellModel
    2. add a ref to the ebosSimulator to the wellModel
    3. clean up the parameters passed to the wellModel methods
    4. move RESV handling to the WellModel and the rateConverter
    5. move the econLimit update to the WellModel
2017-11-08 13:57:36 +01:00
Kai Bao
ba8eb708d1 fixing reviewing comments from PR 1279. 2017-10-16 17:01:15 +02:00
Kai Bao
4efaf64cf7 adapting to the interface change in OPM-parser#1145. 2017-10-16 14:39:07 +02:00
Kai Bao
86269e0de2 cleaning up.
no functional change.
2017-10-12 15:36:54 +02:00
Kai Bao
93b7cceaf3 removing WellStateFullyImplicitBlackoilDense as the master
it caused some problem in rebasing.
2017-10-12 15:05:45 +02:00
Tor Harald Sandve
dc8f811cbe Remove WellStateFullyImplicitBlackoilDense
After the restructuring of of the well model, keeping an extra class for
the "Dense" model is not needed. The only thing still left in
WellStateFullyImplicitBlackoilDense was some solvent related stuff, this
PR moves this to WellStateFullyImplicitBlackoil and removes
WellStateFullyImplicitBlackoilDense.

In addition to a cleaning code this PR fixes missing solvent well output.
2017-10-11 10:54:59 +02:00
Tor Harald Sandve
ce84a59b29 Remove reservoirState from BlackoilModelEbos
1) Use the solution variable directly in RelativeChange(...)
2) Add a method in the RateConverter that takes the simulator instead of the state.
3) Pass the reservoir pressure directly to the well initialization.
4) Move convertInput(...) to SimulatorFullyImplicitBlackoilEbos.hpp.
This code is only used to convert the initial reservoir state.
5) Modify  updateState(...). The solution variable is updated directly and adaptPrimaryVariable(...)
from ewoms is used to switch primary variables. An epsilon is passed to adaptPrimaryVarible(...) after a switch
of primary variables to make it harder to immediately switch back.

The following code used by flow_ebos still uses the reservoirState
1) the initialization
2) restart
3) output of the initial state
4) the step methods in AdaptiveTimeStepping and NonlinearSolver.
The reservoirState is not used by this methods, so after the initial step, an empty reservoirState is passed around in the code.
2017-08-17 11:13:00 +02:00
Kai Bao
ce0e580cee fixing comments.
no functional change.
2017-04-11 16:51:16 +02:00
Kai Bao
e627f35176 removing well_potential_ from WellStateFullyImplicitBlackoil 2017-04-11 16:51:16 +02:00
Kai Bao
032f9803be cleaning up unuseful comments and code fragments. 2017-04-11 16:51:16 +02:00
Kai Bao
ef7769b77e tracking if wells are newly added in WellStateFullyImplicitBlackoil
For a newly added well, the initialized rate cans cause big problem when
applied to VFP interploation when THP control is involved.
2017-04-11 16:51:16 +02:00
Kai Bao
2bc1c8702e copying the thp value from prevState. 2017-04-11 16:51:16 +02:00
Kai Bao
ed4e87ac24 not copying the contrl_index from the previous WellState
when there is new control keywords enter, the combination of control /
constraints change. Under this kind of situation, copying the control
index does not mean you copy the same types of control.

Using the control index from the previous WellState for many situation
is a good practice, while it also risks copying a random and rather bad
choice. It is a major problem when we have VFP, VFP can have very
damaging values for certain situation to show it is not desirable to
be in this kind of situation.
2017-04-11 16:51:16 +02:00
Kai Bao
4129928be4 when no THP control/limit, thp value will be set to zero.
It provides a strategy to reset the zero thp value when no thp control
is involved anymore.
2017-02-17 17:12:52 +01:00
Robert Kloefkorn
82658c92d0 Removal of SimulatorFullyImplicitBlackoilOutputEbos.{h,c}pp.
All simulators now use SimulationDataContainer to store intermediate data that
is passed to the output Solution container. This is in cases not the most
efficient way, but it's unified to avoid errors from code duplication.
2017-02-09 16:57:45 +01:00
Kai Bao
75e0ff0018 Trying always to give a valid control when initing WellState.
Without the fix, when we specify GRUP control for WCONINJE, the control
mode will be initialized to be -1.
2016-11-16 13:25:35 +01:00
Atgeirr Flø Rasmussen
17a9f28fb8 Update well data output integration.
Includes the following changes:
 - update to match API change in opm-output (vector not map for data::Wells::completions),
 - restore WellStateFullyImplicitBlackoil::perfPhaseRates() from output,
 - restore WellStateFullyImplicitBlackoil::currentControls() from output.

Remaining non-restored well-related data are:
 - well potentials,
 - the dynamic list of econ-limited completions.
2016-10-25 10:53:40 +02:00
Jørgen Kvalsvik
545f55bd3b Write control to data::Wells. Missing ability to restore. 2016-10-19 12:06:46 +02:00
Jørgen Kvalsvik
df4e163796 Avoid using buggy wellstate api 2016-10-19 12:06:46 +02:00
Jørgen Kvalsvik
dfb7f8ff63 Stop report early if there are no wells 2016-10-19 12:06:46 +02:00
Jørgen Kvalsvik
6ba21fd4c0 Update to interface change in opm-output 2016-10-19 12:06:43 +02:00
Arne Morten Kvarving
78049a174e fix output of gas phase
fixes a regression caused by 65b512e903
2016-09-21 10:46:50 +02:00
Anders Matheson
65b512e903 Use PhaseUsage to determine output phases 2016-09-20 09:44:17 +02:00
Anders Matheson
0ac0c97612 Output rates for present phases 2016-09-19 16:43:41 +02:00
Markus Blatt
5ed788ce6f Fix handling of no wells in WellStateFullyImplicitBlackoil.hpp
In that case we cannot call numPhases() on the wells as it produces
a floating point exception. As we do not use that information in this case
anyway, we simply use -1 instead to prevent the call.
2016-06-27 11:57:04 +02:00
Jørgen Kvalsvik
71560b5fb2 BlackoilOutputWriter rewritten to use opm-output
Changes to BlackoilOutputWriter as mandated by the split and rewrite of
opm-output. Notable changes:

* BlackoilOutputWriter is no longer a child class of OutputWriter.
* Minor interface changes; writeTimeStep requires a Wells pointer
* restore requires a Wells* pointer
* VTK/Matlab support rewrites; no longer inherits OutputWriter
* WellStateFullyImplicitBlackoil::report added, to write its data to a
  opm-output understood format

Relies on utility/Compat.hpp for quick conversion to the opm-output
defined formats.
2016-06-07 10:15:07 +02:00
Tor Harald Sandve
18246263e9 Move computation of well potentials from simulator class ot model class
- the computation of well potentials in the model class calculates the
well potentials using computeWellFlux()
- in this way the well potential calculations also handle well where
some perforations are closed by the simulator due to cross-flow.
- the well potentials pr perforation and phase is stored in the well
state.
2016-04-19 09:21:15 +02:00
Atgeirr Flø Rasmussen
a356a100f7 Fix minor issue with const POD requirements.
A user-defined default constructor is required in this situation
unless explicitly using the empty-brace-init syntax.

See discussion here:
http://stackoverflow.com/questions/7411515/why-does-c-require-a-user-provided-default-constructor-to-default-construct-a
2016-02-11 16:17:17 +01:00
chflo
399b4f11c4 restart flow 2016-02-10 14:47:55 +01:00
Markus Blatt
975ac0dc37 Removes superfluous wellMap_ member from WellStateFullyImplicitBlackoil.hpp
There is a using `BaseType::wellMap` directive that redirects all the
well map accesses to the base class. In consequence the local wellMap_
is alway empty and just makes debugging harder. Therefore it is
removed in this commit.
2015-10-23 10:47:14 +02:00
Andreas Lauser
72b0cb2c3e use the error macros from opm-common 2015-10-08 12:08:28 +02:00
Robert Kloefkorn
dd4f362aa4 WellStateFullyImplicitBlackoil: call init of base class first. 2015-09-16 12:40:14 +02:00
Robert Kloefkorn
326faa99d7 ParallelDebugOutput: make the output in ecl format work in parallel by communicating
to an io rank and then proceed with serial output.
2015-09-16 09:48:22 +02:00
Tor Harald Sandve
70a6a2ebf8 Use the average well block pressure when evaluating the properties
The average well block pressure is used instead of the well cell
pressure when the well properties are evaluated.
Temperature, rs, rv, phase conditions are still well cells values.

Perforation pressures are stored in the well state
2015-02-19 09:58:17 +01:00
Robert K
a834e55f5a BlackoilOutputWriter: added support for backup and restore.
This first implementation is mainly to support faster debugging.
2015-02-11 13:18:07 +01:00
Atgeirr Flø Rasmussen
ce3519dadb Fix issues in init().
- Failed to set all rates to zero initially.
 - Could set out-of-bounds index if number of controls changed.
2015-01-26 16:46:51 +01:00
Tor Harald Sandve
7bf7b52dd8 Only copy perfPhaseRates if number of perforations is equal.
The number of perforations may change due to completions beeing shut.
If the number of perforations changes the perfPhaseRates are set to
equal the wellRates/(number of perforations) instead of the values from
the previous time step.
2015-01-23 14:10:10 +01:00
Robert K
463e4bc5e3 BlockOilSimulator: allow to run without wells (mainly for testing and debugging). 2015-01-20 11:38:46 +01:00
Robert K
e7e63e1989 make writing of substeps work 2015-01-09 16:26:30 +01:00
Tor Harald Sandve
5572a14c20 Account for the renaming in the wellsManager
Shut is renamed to stopped in the wellsManager in order to better
reflect the name logic in the deck. This PR implements the nessesary
change in opm-autodiff
2014-12-19 07:18:36 +01:00
Tor Harald Sandve
b614aa5f90 Adressing comments in the PR
The following comments has been adressed
1. An array is used in stead of pair
2. is not empty is used instead of size>0 to check if the well has been
initialized before
3. const_iterator is used instead of iterator
4. partial copy is removed
5. WellMapType is no longer mutable
2014-11-11 07:33:15 +01:00
Tor Harald Sandve
b4a7b6157b Use well to name mapping when copying the old well state to the new
With the introduction of shut wells the same ordering in the well states
can no longer be assumed. The well names is instead used to map the old
well state to the new. Also the partial_copying is moved into the
initialization.

Tested on SPE1, SPE3, SPE9 and Norne. (Do not change the SPEs and is
nessesary for the Norne)
2014-11-10 08:47:42 +01:00
Atgeirr Flø Rasmussen
43c00773db Add partialCopy() method for transferring well states.
Also add numWells() and numPhases() helpers.
2014-08-13 15:55:50 +02:00