Commit Graph

45 Commits

Author SHA1 Message Date
Kai Bao
1aff98c4f4 adding the extra template type from recent merged PR 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
a8ae9276c5 adding computeWellPotentialWithTHP() to compute well potential
in an iterative way. When VFP interpolation is performed, the bhp and
rates are coupled together. Some iteration will be required to get the
consistent bhp and well potential.
2017-04-11 16:51:16 +02:00
Kai Bao
182c5897c8 adding leastStrictBhpFromBhpLimits()
to pick the least strict bhp limits in the well controls. It is used to
calculate the well potential when there is no thp limits there.

If there is thp limits there, it will be used for further chosing of the
bhp value for well potential calculation.
2017-04-11 16:51:16 +02:00
Kai Bao
402a5a125a adding computeWellRatesWithBhp() to calculate well rates
for one well based on the give Bhp.
2017-04-11 16:51:16 +02:00
Kai Bao
7b2e6760e1 adding wellHasTHPConstraints() to decide if there is THP control
for a specific well.
2017-04-11 16:51:16 +02:00
Kai Bao
86dc231cc3 adding more things related to group control when restarting
with a new time step due to convergence failure.
2017-04-11 16:51:16 +02:00
Kai Bao
e39ffefb2e performing prepareTimeStep in assemble for StandardWellsDense
instead of model->preppareStep()

to avoid segmenttation error from eclSimulator and also not intervening
with NonlinearSolver
2017-04-11 16:51:16 +02:00
Kai Bao
4a6dbbe0a7 updating the control index for both well state and well_controls struct
when applying VREP group controls.
2017-04-11 16:51:16 +02:00
Kai Bao
cb85319a72 set thp() value to zero when no THP constraints exist
in updateWellState()
2017-04-11 16:51:16 +02:00
Kai Bao
7a7dcdf3ba correcting a comment in computeWellFlux() in StandardWellsDense 2017-04-11 16:51:16 +02:00
Kai Bao
d02f028260 not resetWellControlFromState in assemble() in StandardWellsDense
other places should gurantee the control indices from the well_state and
well_controls struct are the same.

And also, since the first element in wellSolutions() depends on the type
of the control, this function is complete yet.
2017-04-11 16:51:16 +02:00
Kai Bao
34385ee58f synchronizing the control index at the beginning of assemble()
in StandardWellsDense class.

It takes effects after restarting from a previous unconverged solution.
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
77ec45cdd2 recovering the well_controls if solveWellEq not convergent
since we are using the control index from both WellState and
well_controls.
2017-04-11 16:51:16 +02:00
Kai Bao
ea3adb3c37 using reference of WellState in resetWellControlFromState() 2017-04-11 16:51:16 +02:00
Kai Bao
0acb646a4d when there is group control, we should update WellState
since the group targets are updated.
TODO: maybe it is not necessary, need to investigate the design of getBhp() and
getQs().
2017-04-11 16:51:16 +02:00
Kai Bao
087b9471c7 completing prepareTimeStep() for StandardWellsDense
updating all the group control related.
2017-04-11 16:51:16 +02:00
Kai Bao
b83f37dcc0 considering the distr has zero values for non-injecting phases
to avoid NaN resulting from devided by zero.
2017-04-11 16:51:16 +02:00
Kai Bao
653baae039 making the computeWellPotentials calculate potential for each well
Not store the well potentials to WellState anymore.
2017-04-11 16:51:16 +02:00
Kai Bao
4b5e1dfadc more treatment for zero rate wells in updateWellStateWithTarget 2017-04-11 16:51:16 +02:00
Kai Bao
f70bb960dd updating rates of multiphase with updateWellStateWithTargets
for StandardWellsDense model.
2017-04-11 16:51:16 +02:00
Kai Bao
819aa90d84 adding prepareTimeStep() to the StandardWellsDense
to handle the well potential related calculation
2017-04-11 16:51:16 +02:00
Tor Harald Sandve
cd564ade5f Support for saturation table for each well completion
Compute relperms for each well completion based on saturation table ids
(satnums)

Does not work in combination with hysteresis.
2017-04-06 14:21:59 +02:00
Markus Blatt
30f3d4e2d0 Get rid off TypeTag system in StandardWellsDense.
Previously, we kind of hard coded the problem using the TypeTag system.
Instead of this we now simply pass the only additional thing needed, the
ElementContext, as an additional template parameter.

Removes the include of removed header BlackoilModelEbosTypeTags.hpp.
2017-04-04 11:08:17 +02:00
Markus Blatt
e56e2cae15 Added requested braces. 2017-04-04 11:08:17 +02:00
Markus Blatt
cde162b3d6 Use the global number of cells for the average.
This number is still wrong in master but well become correct once
PR #1107 is merged.
2017-04-04 11:07:57 +02:00
Markus Blatt
0e83496740 Make getWellConvergence parallel and omit unnecessary computations.
detail::getConvergence computes a lot more than we actually need.
We only need the average over B and the maximum of the well residual.

Therefore we now compute these quantities in getWellConvergence and
do the global reductions manually.
2017-04-04 11:05:50 +02:00
Markus Blatt
4768bc9e90 Remove usage of cachedIntensiveQuantities from getWellConvergence 2017-04-04 11:05:50 +02:00
Atgeirr Flø Rasmussen
553f345670 Merge pull request #1088 from GitPaean/correcting_bhp_limits_for_well_potentials
more careful determination of the most restrictive bhp value
2017-03-19 14:08:13 +01:00
Atgeirr Flø Rasmussen
eaf9d136bf Merge pull request #1091 from GitPaean/calculating_surface_volume_fraction
[WIP] using surface volume fraction instead of wellVolumeFraction() and wellVolumeFractionScaled() in a few places
2017-03-17 14:31:31 +01:00
Kai Bao
2f3d142b38 a little more generalized implementation of BHP determination
for well potentials calculation, not caring much about how many THP/BHP constraints exist.
2017-03-14 15:07:10 +01:00
Kai Bao
18a75dcabc more careful determination of the most restrictive bhp value
when computing the well potentials
2017-03-14 14:58:21 +01:00
Kai Bao
3a89f07f3c not using comp_frac for producers in getQs 2017-03-08 11:02:47 +01:00
Kai Bao
f48de7f146 using wellSurfaceVolumeFraction() in a few places
instead of using wellVolumeFraction() to give more correct physical
meaning.
2017-03-08 11:01:46 +01:00
Kai Bao
9c62d6d26c adding support of three phase suraface rate in getQs()
and a few comments.
2017-03-07 15:49:45 +01:00
Kai Bao
01d8813f53 A function to calulate the surface volume fraction of the rates
for StandardWellsDense.
2017-03-07 13:31:40 +01:00
Kai Bao
b5e2c5262f using rs rv from grid cells when calculating the volume ratio
during computeWellFlux for StandardWellsDense.
2017-03-02 14:21:00 +01:00
Kai Bao
71d777f839 update the thp value for flow_ebos
otherwise the thp constraint will not work.
2017-02-15 20:50:43 +01:00
Kai Bao
8b38b7b8a3 finishing separating the StandardWellsDense.hpp implementations. 2017-02-15 10:07:22 +01:00
Kai Bao
498f40f896 fourth part in separating the StandardWellsDense.hpp implementations. 2017-02-15 10:07:22 +01:00
Kai Bao
2a3fe58ac2 third part in separating the StandardWellsDense.hpp implementations. 2017-02-15 10:07:22 +01:00
Kai Bao
8de7795629 the second part in separating the StandardWellsDense.hpp implementations. 2017-02-15 10:07:22 +01:00
Kai Bao
8354f3600f the first part in separating the StandardWellsDense.hpp implementations.
split into commits for easy debugging purpose.
2017-02-15 10:07:22 +01:00