Commit Graph

2983 Commits

Author SHA1 Message Date
Markus Blatt
327d146caa Fix uninitialized warning intpfa calculation 2017-05-24 12:12:52 +02:00
Markus Blatt
1231870e56 Add missing include of config.h
Closes OPM/opm-core#1164
2017-05-24 12:11:49 +02:00
Tor Harald Sandve
dbe7930ef7 Add SSOL to blackoilState
Stores the solvent saturation in the simulator container.
2017-05-10 11:14:53 +02:00
Tor Harald Sandve
daecfa7e55 Add solvent to phaseUsage 2017-05-08 10:29:51 +02:00
Arne Morten Kvarving
f5999e3fcb changed: remove embedded 'parameters' namespace in ParamGroup
inconsistent and unnecessary.

this is purely a cosmetic change, the only exception was a function with
the generic name 'split', which was renamed to splitParam to avoid confusion.
2017-04-28 15:34:11 +02:00
Arne Morten Kvarving
a59ce6581f changed: remove XML support for ParameterGroup 2017-04-28 11:26:38 +02:00
Atgeirr Flø Rasmussen
fdd7b39587 Merge pull request #1157 from andlaus/fix-non-MPI-build
fix non-MPI builds
2017-04-20 21:47:08 +02:00
Andreas Lauser
d690549842 fix non-MPI builds
some headers must be included unconditionally.
2017-04-20 15:12:34 +02:00
Tor Harald Sandve
a96c1f9ea0 FIX memory leakage in well_controls
The Alq and vfp is set free in well_controls_destroy to avoid memory
leakage.
2017-04-20 12:58:16 +02:00
Kai Bao
e77f726906 adding flag to tell when using well potential for guide rate
for WellNode.
2017-04-11 16:53:19 +02:00
Kai Bao
29372e287c removing well potentails from WellsManager 2017-04-11 16:53:19 +02:00
Kai Bao
44924b9ee9 small corrections in WellsGroup
should not change reults.
2017-04-11 16:53:19 +02:00
Kai Bao
bd9ff2ad94 not negative rate_for_group_control
in WellsGroup::updateWellProductionTargets. The current implementation
of group control is allowed tiny over-producing of the group target
while it cause negative rate_for_group_control . When all the wells are
not under group controls, it can cause oscillation of the control mode
later.

Probably a better way is to do something when we see overproducing
happens.
2017-04-11 16:53:19 +02:00
Kai Bao
b7ea707928 Tracking situation when group overproducing its target
Bascially it means that something wrong with our algorithms. Not sure
how to handle it properly yet.
2017-04-11 16:53:19 +02:00
Kai Bao
a6f4772ca1 not applying the group control in WellsManager
since the guide rates are not completed yet.
2017-04-11 16:53:19 +02:00
Kai Bao
17fb6f9ffe not setting up guide_rates in WellsManager based on well potentials
That part is moved to well_collection, will be handled in the beginning
of time step.
2017-04-11 16:53:19 +02:00
Kai Bao
d50d21d8e0 Wells specified with GRUP will be put under group control
immediately.
2017-04-11 16:53:19 +02:00
Kai Bao
2fcb449196 Always updating the well targets under group control
for each iteration. Even all the wells are under individual controls,
their group targets/constraints should also be updated for correct group
behavoirs.
2017-04-11 16:53:19 +02:00
Kai Bao
7701b68814 handle the situatioin when giving a NaN prod target to injectors
When all production wells are under individual controls, the group can
have zero production guide rates, which can result NaN value targets for
injectors.
2017-04-11 16:53:19 +02:00
Kai Bao
81fb20160c Considering the injection phase when applying VREP group controls
GCONINJE only support single phase injection. When we inject one phase,
the values of distr for other phases should be set to be zero.

It will provide one strategy to figure out which phase we are
injecting. It is important when we inject one phase while the well is
claimed to be another phase in WELSPECS.
2017-04-11 16:53:19 +02:00
Kai Bao
aaaacce49e adding a flag to indicate whether group controls applied
for WellCollection.
2017-04-11 16:53:19 +02:00
Kai Bao
be00224a4b adding a function setGuideRatesWithPotentials() to WellCollection
it only handles the calculation based on wellPotentials though.

Or it should also give each well a value for wells does not specify a
guide rates? which will be some value same for all the wells?
2017-04-11 16:53:19 +02:00
Andreas Lauser
b368cb0177 SimulatorReport: make it possible to report failed time steps
the method can still be called as it used to be. in this case no
failures are reported, though.
2017-04-10 23:31:24 +02:00
Atgeirr Flø Rasmussen
3b5e15771b Merge pull request #1153 from babrodtk/hysteresis_output
Added functions in SaturationProps for hysteresis IO
2017-04-07 15:54:26 +02:00
babrodtk
c3dc875005 Added functions in SaturationProps for hysteresis IO 2017-04-07 14:31:22 +02:00
Tor Harald Sandve
a8261b62da Add sat table id to well struct 2017-04-06 13:52:27 +02:00
Tor Harald Sandve
7579f2bdb9 Do not extrapolate initial rs and rv values in the depth tables 2017-03-16 12:57:56 +01:00
Kai Bao
70b19780b4 putting wells under immidatel group control when specified
with GRUP.
2017-03-07 12:48:30 +01:00
Atgeirr Flø Rasmussen
03e005bb76 Merge pull request #1143 from GitPaean/fixing_thp_initialization
Fixing thp initialization
2017-03-02 15:51:38 +01:00
Tor Harald Sandve
70b6a6e5ef Do not set rs=rsSat and rv=rvSat for the saturated case 2017-02-22 15:57:53 +01:00
Kai Bao
b97c585519 do not assign non-zero THP value when no THP involved. 2017-02-17 13:45:55 +01:00
Kai Bao
6ca48313ca correcting the confusing indent in WellState init 2017-02-17 13:28:29 +01:00
Kai Bao
8198c256a9 adding thp to the report for summary output. 2017-02-13 10:15:58 +01:00
Atgeirr Flø Rasmussen
d5a9f27e5e Merge pull request #1141 from akva2/remove_adaptive_time_stepping
remove AdaptiveTimeStepping class
2017-02-10 15:16:56 +01:00
Arne Morten Kvarving
e6cad074c2 Remove adaptive time stepping and simulator timer classes and tests/examples
They have been moved to opm-simulators
2017-02-10 14:53:22 +01:00
Atgeirr Flø Rasmussen
119b5b1a3a Merge pull request #1140 from andlaus/fix_gcc7_warnings
fix a GCC 7 warning
2017-02-10 10:31:13 +01:00
Arne Morten Kvarving
1e25b6fcfb changed: pass fipnum array into adaptive time stepping loop
needed as substep summary reports requires FIP data to be available.
add calculation of this data if output is requested and summary
config holds relevant keywords.
2017-02-09 09:33:32 +01:00
Andreas Lauser
8ef2a923ec fix a GCC 7 warning
GCC 7 warns

```
dynamic exception specifications are deprecated in C++11; use ‘noexcept’ instead [-Wdeprecated]
```

here.
2017-02-07 12:55:26 +01:00
Atgeirr Flø Rasmussen
c5a80e97a2 Merge pull request #1138 from andlaus/refactor_well_permeability
do not explicitly pass the permeability to the well model anymore
2017-01-27 13:15:50 +01:00
Andreas Lauser
c5a0ea7524 do not explicitly pass the permeability to the well model anymore
this information is already part of the EclipseState. The reason why
this should IMO be avoided is that this enforces an implementation
(ordering of the permeability matrices) the simulator on the well
model. If this needs to be done for performance reasons, IMO it would
be smarter to pass an array of matrices, instead of passing a raw
array of doubles.  I doubt that this is necessary, though: completing
the full Norne deck takes about 0.25 seconds longer on my machine,
that's substantially less than 0.1% of the total runtime.

in order to avoid code duplication, the permeability extraction
function of the RockFromDeck class is now made a public static
function and used as an implementation detail of the WellsManager.

finally, the permfield_valid_ attribute is removed from the
RockFromDeck class because this data was unused and not accessible via
the class' public API.
2017-01-27 12:51:12 +01:00
Kai Bao
78bf488a2a set the VREP control as current control when applying VREP control
for the first time

Not sure it is always the better things to do here, while it can help
the consistence of the two current controls in the well_controls and
well_state.
2017-01-25 14:11:37 +01:00
Kai Bao
cb84571540 considering effieciency factor when calculating production rate. 2017-01-16 16:13:44 +01:00
Kai Bao
9fe6d80f99 adding groupTargetConverged() to WellCollection 2017-01-16 15:55:35 +01:00
Kai Bao
3a06a2dd50 adding groupProdTargetConverged() to WellsGroup
When the group is producing its target, we consider it is converged.
When the group is not producing its target, while the group can not
produce more based on its own limits, we also consider it is converged.

When the group is not producing its target, while the group can
potentially produce more, we consider it is not converged.
2017-01-16 14:19:52 +01:00
Kai Bao
8f658a92f2 adding canProdueMore() function to wellsGroup
to indicate whether the group can produce more to match the group target
when they are not producing enough compared with the group target.
2017-01-16 11:25:23 +01:00
Kai Bao
713c833b0a updating the group control limit for individual control wells
to provide a better standard for the wells under individual control to
return to group control. For example, some wells get really big group
control limit and switch to individual control, it is very difficult for
them to return to group control with that kind of unreasonable fixed
group limit.
2017-01-12 15:44:44 +01:00
Atgeirr Flø Rasmussen
7830083e9b Merge pull request #1133 from blattms/parallel-accumulate
Added an accumulate method that allows to switch off non-owner entries.
2017-01-11 15:16:48 +01:00
Markus Blatt
ac6965de2e Added an accumulate method that allows to switch off overlap entries.
It does using a mask vector with entries 0 or 1. If that is not provided
it falls back to std::accumulate.
2017-01-11 12:18:39 +01:00
Atgeirr Flø Rasmussen
00dad30432 Throw if solvent phase injected. 2017-01-09 16:33:03 +01:00
Atgeirr Flø Rasmussen
7ef8971be4 Merge pull request #1120 from jokva/density-from-eclipsestate
Use Density from EclipseState
2017-01-09 10:38:30 +01:00
Atgeirr Flø Rasmussen
8daa0f440c Merge pull request #1125 from jokva/reduce-deck-use-relperm-diagnostics
Don't rely on Deck for checkTable and checkPhase
2017-01-09 09:35:25 +01:00
Atgeirr Flø Rasmussen
e2023ed38e Merge pull request #1124 from jokva/read-rock-from-eclipsestate
Read ROCK from EclipseState, not Deck
2017-01-09 09:33:47 +01:00
Atgeirr Flø Rasmussen
898ca1b7e0 Merge pull request #1131 from atgeirr/increase-iters-for-equil
Increase max iterations for capillary curve inversion.
2017-01-09 09:31:14 +01:00
Atgeirr Flø Rasmussen
be26c072e1 Increase max iterations for capillary curve inversion.
Triggered by a new two-phase case.
2017-01-06 15:24:08 +01:00
Tor Harald Sandve
5ac89ad8a7 Make it optinal to apply SWATINIT
The reasoning behind this to make it possible to initialize the case
without SWATINIT in order to compute the same defaulted THPRES values as
Ecl. The initialization needs to be re-computed to account for SWATINIT
in the simulations.
2017-01-02 15:10:09 +01:00
Atgeirr Flø Rasmussen
fdd81eacaa Remove unused Deck function argument. 2017-01-02 09:47:57 +01:00
Atgeirr Flø Rasmussen
2e49273da7 Fix order of initialization. 2016-12-29 13:55:42 +01:00
Jørgen Kvalsvik
bca5c8e8de Don't rely on Deck for checkTable and checkPhase
Prefer using EclipseState over Deck.
2016-12-20 14:08:58 +01:00
Jørgen Kvalsvik
ad4033b9dc Read ROCK from EclipseState, not Deck 2016-12-20 12:24:27 +01:00
jokva
ec060d513b Merge pull request #1123 from jokva/read-pressure-swat-sgas-from-es
Read RS,RV,PRESSURE,SWAT,SGAS from EclipseState
2016-12-20 10:01:13 +01:00
Jørgen Kvalsvik
8cc624fd0d Read RS,RV,PRESSURE,SWAT,SGAS from EclipseState
Prefer reading these values from EclipseState rather than the Deck type.
2016-12-19 14:26:27 +01:00
Tor Harald Sandve
2a3a825895 Store whether timestep failed or not
Used in flow ebos to tell the simulator to recalculate the cached
quantities for failed timesteps.
2016-12-19 10:52:59 +01:00
Jørgen Kvalsvik
59cc0a1635 Use Density from EclipseState 2016-12-15 16:06:46 +01:00
Jørgen Kvalsvik
f0b4c4f390 Read PVTW from EclipseState
Read the PVTW table entries from EclipseState rather than manually
through the Deck object.
2016-12-06 14:53:41 +01:00
Andreas Lauser
b5b3507cb0 AdaptiveTimeStepping: fix stupid (but harmless) mistake in the sub-step info message
that was a copy-and-pasto: newton iterations = linearizations - 1
2016-12-03 15:04:32 +01:00
Andreas Lauser
ce02a4bb92 clean up and extend the SimulationReport class
it now also accounts for assembly, linear solve, update and output
write time and indicates if an operation has converged.
2016-11-30 11:27:49 +01:00
Atgeirr Flø Rasmussen
8d129d7172 Merge pull request #1113 from atgeirr/remove-grid-stuff
Move grid things to opm-grid.
2016-11-29 21:04:14 +01:00
Atgeirr Flø Rasmussen
c7cc24385a Remove files moved to opm-grid. 2016-11-29 13:25:22 +01:00
Atgeirr Flø Rasmussen
602f3252e6 Merge pull request #1103 from GitPaean/fixing_warning
warning fixed related to petsc
2016-11-23 12:37:31 +01:00
Jørgen Kvalsvik
cadb14c9e8 Ask for reference depth at timestep. 2016-11-22 14:22:09 +01:00
Atgeirr Flø Rasmussen
1e462f4c04 Merge pull request #1107 from GitPaean/fixing_findWellNode
Adding a flag to WellCollection whether group control active
2016-11-17 23:27:06 +01:00
Kai Bao
4427c85d77 a flag to WellCollection whether group control active 2016-11-17 16:26:19 +01:00
Bård Skaflestad
1429046029 Merge pull request #1105 from andlaus/fix_valgrind_errors
fix some valgrind errors in the init code
2016-11-16 19:08:48 +01:00
Andreas Lauser
1d98c3b8ca fix some valgrind errors in the EQUIL code
this fixes some valgrind errors while doing the twophase capability
for flow_ebos: In all previously tested cases, these errors were
probably non-fatal because the memory illegally accessed here is
likely to be allocated (but after this function was finished it
contained garbage).

note that I'm not completely sure if this patch is semantically
correct, so I'd appreciate some input who understands it. (what is
"z"?)
2016-11-16 17:20:24 +01:00
Kai Bao
fda1016532 warning fixed related to petsc 2016-11-16 15:35:35 +01:00
Kai Bao
6e4f9e708e rewriting the findWellNode function
with assuming we should always find the well in the well collection.
2016-11-16 14:27:15 +01:00
Joakim Hove
df920e4970 Merge pull request #1101 from jokva/changes-in-grouptree
GroupTree interface changed upstream
2016-11-16 13:26:58 +01:00
Kai Bao
c3b00dc7fd fixing the comments.
No change in the functions and results.
2016-11-16 11:40:10 +01:00
Kai Bao
708bfd169b addressing a few comments. 2016-11-16 09:51:06 +01:00
Kai Bao
bf2f9b3f06 adding target_updated_ flag to WellNode
to save some repeated efforts when updating Well Targets.
2016-11-16 09:43:28 +01:00
Kai Bao
55eec0b2ed checking whehter need to update before updateWellTargets. 2016-11-15 13:56:49 +01:00
Kai Bao
f9f5bacee4 cleaning up more unused flag from WellsGroup 2016-11-11 11:29:12 +01:00
Kai Bao
91b8c872eb removing a few not-used function with the new strategy. 2016-11-10 17:50:30 +01:00
Kai Bao
95997e208c different strategy is using when updating the well targets
When the group has wells both under individual control and group
control, since the well rates under individual control changes each
iteration, the well targets for this kind of group need to be updated
each iteration.

When we change to use implicit well potentials later, which is supposed
to be more accurate, we probably should always (unless we decided not to)
update the well targets each iteration.
2016-11-10 17:22:25 +01:00
Kai Bao
085785bf26 adding function findWellNode() to WellCollection
to return the WellNode* instead of WellGroupInterface*
2016-11-10 16:28:40 +01:00
Kai Bao
b319e1a75d cleaning up and adding more comments for better understanding.
No functional change.
2016-11-10 16:28:40 +01:00
Kai Bao
3e8b1bdb82 applying the efficiency factor to VREP control. 2016-11-10 16:28:40 +01:00
Kai Bao
76a2108ea9 adding VREP injection support.
not handling multiple injection wells for moment.
2016-11-10 16:28:40 +01:00
Kai Bao
88181f4948 using variable only_group instead of hard-coded false.
when applying group production control.
2016-11-10 16:28:40 +01:00
Kai Bao
06d380df51 correcting the typo in efficiency
It was efficicency, which causes inconvenience when searching variables
or functions.
2016-11-10 16:28:40 +01:00
Kai Bao
2b289f8964 adding basic support for group injection control.
more testing will be required later.
2016-11-10 16:28:40 +01:00
Kai Bao
63e5755fa9 applying efficiency factor to the group control. 2016-11-10 16:28:40 +01:00
Kai Bao
a0e1fcf89d function for accumulative efficiency factor for WellNode
This is the final efficiency factor that goes to the source/sink terms
in the material balance equations.
2016-11-10 16:28:40 +01:00
Kai Bao
013c907e66 adding efficiency factor to the WellsGroupInterface.
The one for the WellNode should be specified with WEFAC, which we are
not handling for the moment, so we just set it to be 1.0 for the moment.
2016-11-10 16:28:40 +01:00
Kai Bao
2e135388a6 refactoring function updateWellProductionTargets()
To handle different types of control mode.
2016-11-10 16:28:40 +01:00
Kai Bao
b8ac674f9b When NONE is specified, no group control enforcement.
NONE is specified in GCONPROD or GCONINJE.
2016-11-10 16:28:40 +01:00
Kai Bao
65d61d1c4f output cleanining up 2016-11-10 16:28:40 +01:00
Kai Bao
352c185edf removing the use of cast between base class and derived class
between WellsGroupInterface and WellsGroup, WellNode.
2016-11-10 16:28:40 +01:00
Kai Bao
32e9b26ce8 revising updateWellTargets to remove the dependency of WellState
avoiding template using here. It is possible we will need WellState
eventually, while only using the well_rates for the moment.
2016-11-10 16:28:40 +01:00
Kai Bao
fec53a1af5 fixing the comilation problem from rebasing. 2016-11-10 16:28:40 +01:00