Kai Bao
338828fdce
fixing the running of the vfp related for flow_ebos
...
the output of the THP is still not yet correct.
2017-08-07 11:39:11 +02:00
Kai Bao
ab1b57b994
fixing the if condition for 2p + dummy phase
...
from if (numComp < numEq) to if (numComp < numWellEq)
2017-07-31 12:43:50 +02:00
Kai Bao
e0e1fc65e2
removing ebosCompToFlowPhaseIdx from StandardWellsDense
2017-06-21 11:44:43 +02:00
Kai Bao
aaa66e0982
not switching the order of well equations.
2017-06-21 11:44:43 +02:00
Kai Bao
70e193696d
removing the order switiching of the well primary variables.
...
Order swtiching of the well primary variables make the code more
complicated, and harder to understand and extend.
2017-06-21 11:44:43 +02:00
Kai Bao
908b2bdf81
making wellMod_ in WellModelMatrixAdapter is actually a well model
...
instead of the BlackoilModelEbos, which reduces some confusion and also
removes a few unnecessary wrapping functions.
2017-06-07 14:26:00 +02:00
Kai Bao
0700c8cf67
adding more checking for the potential values
...
during the well well potential calculation.
2017-04-11 16:51:16 +02:00
Kai Bao
ce0e580cee
fixing comments.
...
no functional change.
2017-04-11 16:51:16 +02:00
Kai Bao
dd95114e6d
fixing well potentials calculation after introducing the saturation table
...
The calculation of well potentials of newly added well failed after using the saturation
table. Here, we fix it using much smaller parameters to stablize the
calculation, while it slows down the iteration process.
TODO: improves the convergence rate by either introducing better
paramters or better iteration strategy.
2017-04-11 16:51:16 +02:00
Kai Bao
972b911495
fixing two warnings.
...
no function change.
2017-04-11 16:51:16 +02:00
Kai Bao
72e2b7c6c3
fixing errors resulting from the rebasing procedure.
2017-04-11 16:51:16 +02:00
Kai Bao
7a4d0bb8aa
slightly re-organizing prepareTimeStep()
...
should not impact the simulation results.
2017-04-11 16:51:16 +02:00
Kai Bao
7038b6eb57
recovering the running of flow_multsigement without group control
...
flow_multisegment should not be able to handel group control yet.
2017-04-11 16:51:16 +02:00
Kai Bao
e0d96b3410
removing compute_well_potentials_ from BlackoilModelParameters
2017-04-11 16:51:16 +02:00
Kai Bao
4ed95fcbf0
calculate well potentials based on requireWellPotentials()
...
from well_colllection. Not based on command line paramters anymore.
2017-04-11 16:51:16 +02:00
Kai Bao
181112491b
recovering group control for legacy_flow.
2017-04-11 16:51:16 +02:00
Kai Bao
8fa3c4b324
removing one unnecessary if condition
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
72d0d4ddb8
revising the computeWellPotentials in StandardWells
...
so it compute the potentials for each well instead of each perforation.
2017-04-11 16:51:16 +02:00
Kai Bao
8d96d835b3
removing the well potential from WellsManager constructor.
2017-04-11 16:51:16 +02:00
Kai Bao
1aff98c4f4
adding the extra template type from recent merged PR
2017-04-11 16:51:16 +02:00
Kai Bao
22b2217dd3
removing setWellSolutionsFromPrevState from WellStateFullyImplicitBlackoilDense
...
Not used anymore.
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
279fbad17c
removing the comments from the NonlinearSolver_impl
...
which is from the development process.
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
b21f577989
when there is VREP control, updateRateConverter in prepareStep
...
in BlackoilModelEbos.
2017-04-11 16:51:16 +02:00
Kai Bao
68eaf6ac1f
Not copying the wellSolutions from previous WellState
...
in WellStateFullyImplicitBlackoilDense.
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
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
Kai Bao
57f7650228
adding a function computeWellPotentials for StandardWellsDense
...
for each well. It is a temporay approach for testing without breaking
any compilation before changing the interface for WellsManager.
2017-04-11 16:51:16 +02: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
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
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
Kai Bao
4159542186
setting tolerance_wells to be 1.e-4.
...
for better convergence behavoir.
2017-01-31 10:50:10 +01:00
Kai Bao
c3f3fed47a
applying the efficiency factor to all the Jacobians
...
of the cq_s when entering the reservoir mass balance equations.
2017-01-25 15:56:15 +01:00
Kai Bao
68558bec76
moving the update the well_state at the end of the updatewellCotnrols
...
in StandardWellsDense.
The reason is that the update the well controls can change the well
controls. It is better to update the well states after all the control
checking is done.
2017-01-25 14:11:27 +01:00
Kai Bao
26785597b9
putting the update of the well states to one function
...
in StandardWellsDense to simplify the updateWellControls() function.
2017-01-25 14:11:27 +01:00
Kai Bao
19eb0d96c8
adding applyVREPGroupControl() to StandardWellsDense.
2017-01-25 14:11:27 +01:00
Kai Bao
849dae8ec5
adding computeWellVoidageRates() to StandardWellsDense
2017-01-25 14:11:27 +01:00
Kai Bao
f53bf6f957
adding a pointer to rate_converter in BlackoilModelEbos
...
in StandardWellsDense.
2017-01-25 14:11:27 +01:00
Kai Bao
af26b70fc9
adding a rate converter to BlackoilModelEbos
...
and also function updateRateConverter() to update its state.
2017-01-25 14:11:27 +01:00
Kai Bao
2dd4fa5bb2
fixing the LRAT control for StandardWellsDense
2017-01-23 11:30:23 +01:00
Kai Bao
31e7dec018
removing a few blank lines.
...
and adding a assertion that bhp != 0 when calculating well potentials.
2017-01-17 15:33:45 +01:00
Kai Bao
9e93ebcc64
check whether the group targets are converged.
2017-01-16 16:18:35 +01:00
Kai Bao
65a3fff6f2
moving computeWellPotentials to be earlier in assemble()
...
in StandardWellsDense.
solveWellEq then have access to the updated well potentials.
does not change the result.
2017-01-16 16:18:35 +01:00
Kai Bao
01322b740e
fixing the mistakes in the code due to rebasing.
2017-01-16 16:18:35 +01:00
Kai Bao
a95977e716
making the group control works for StandardWellsDense
2017-01-16 16:18:35 +01:00
Kai Bao
b0e2bd9221
adding well perforation efficiency factor to StandardWellsDense
...
And also calculateEfficiencyFactor to initialize the values.
2017-01-16 16:18:35 +01:00
Kai Bao
4b47fa52ca
adding well collection to StandardWellsDense
...
to make StandardWellsDense have access to the group information.
2017-01-16 16:18:35 +01:00
Kai Bao
941689722f
adding functioin computeWellPotentials to StandardWellsDense
2017-01-16 16:18:35 +01:00
Kai Bao
92a4d8687f
adding bhp as a parameter of computeWellFlux in StandardWellsDense
...
To make the function usable for computing well potentionals.
2017-01-16 16:18:35 +01:00
Kai Bao
b8e0cda83a
putting update of water injection mobility to a separate function
...
computeInjectionMobility() in BlackoilPolymerModel
2016-12-16 08:56:35 +01:00
Kai Bao
4f3ce37b8e
correcting one not helpful comments.
...
which results from the re-organization of the code.
2016-12-16 08:56:35 +01:00
Kai Bao
894bffd1b3
handling the injection mobility when mixing paramter not 1
...
The treatment with shear-thinning is not well tested yet.
2016-12-16 08:56:35 +01:00
Kai Bao
4f8ae4be73
putting the re-calculating wellflux inside if plyshlog
...
it only happens when shear effect calculation is needed. No point to
re-calculate the well flux when no shear thinning needed.
2016-12-16 08:56:35 +01:00
Kai Bao
9307a41fd5
using the polymer concentration in the polymer transport
...
since we already introduce the polymer viscosity there, we should apply
the water and polymer viscosity ratio again.
2016-12-16 08:56:35 +01:00
Kai Bao
8148105ae3
Revert "changing polymer production concentration to be the grid block concnetration."
2016-12-05 15:05:56 +01:00
Kai Bao
81a73650de
polymer production concentration to be the grid block concnetration.
...
To be more consistent with the injection well.
2016-12-05 12:52:21 +01:00
Kai Bao
69d5ec94c9
adding localWellsActive() checking for two MSW functions
...
updatePerfPhaseRatesAndPressures() and addWellFluxEq()
2016-11-25 13:45:38 +01:00
Kai Bao
e57da11fbd
making the updateWellControls an iterative process for StandardWells
...
Seperating the updateWellStateWithTarget from updateWellControls, will
update the controls when any of the control constraints gets broken.
The reason is that the updated well control can still break some of
other the contstaints. We need to choose one control to make sure all the
constraints are honored.
2016-11-24 11:27:59 +01:00
Kai Bao
0ab04b04cd
checking whethter group control is active
...
When applying group control related functions.
2016-11-17 16:01:59 +01:00
Kai Bao
d38a6eb459
adapting the change of the function findWellNode().
2016-11-16 14:28:35 +01:00
Kai Bao
d06acaa4b5
adapting to the change in opm-core
2016-11-16 14:06:20 +01:00
Kai Bao
f85da3768e
cleaning up and updating MultisegmentWells
2016-11-16 13:27:30 +01:00
Kai Bao
6bbc726bc2
checking and outputing the residuals for the well equations.
...
Before, the tolerance for the norm of the residual of the well control
equations was 1bar, which makes no sense for rate control.
For some rate controls, we are not able to update the well state with
the target rates, we have to enforce the convergence throught the
residual checking.
2016-11-16 13:26:54 +01:00
Kai Bao
002439c5b1
WIP in testing new group update strtegy.
...
results with min_iter=2 works okay, while not min_iter=1.
It means the iteration stop at the wrong situation.
2016-11-16 13:26:28 +01:00
Kai Bao
753da2dd36
putting the VREP control update after updateWellControls
...
which makes it almost should be put inside updateWellControls function.
it does not change the result.
2016-11-16 13:25:35 +01:00
Kai Bao
a5aaf9b802
easier way to update whether the well under group control
...
potentially can be more consistent way.
It does not change the result.
2016-11-16 13:25:35 +01:00
Kai Bao
8a1e1e010a
using findWellNode() to avoid dynamic_casting
...
form WellGroupInterface* to WellNode*.
2016-11-16 13:25:35 +01:00