Kai Bao
efeccd8e74
fixing a test related to history mode.
2018-01-08 09:08:05 +01:00
Kai Bao
9317c1f023
removing the current argument in updateWellStateWithTarget
...
and some other cleaning up.
2017-11-30 17:14:29 +01:00
Kai Bao
ea3cbd1fe8
removing numComponents() from WellInterface
...
which is dumplicated from BlackoilWellModel.
2017-11-30 16:31:48 +01:00
Kai Bao
7b61f3e692
moving polymer related to updateWaterMobilityWithPolymer
...
in StandardWell.
And not calculating the shear effect for the injecting wells when the
injection wells do not inject polymer.
2017-11-27 09:24:02 +01:00
Kai Bao
f87e6d35db
removing more legacy Multisegment Wells related.
2017-11-24 12:27:43 +01:00
Kai Bao
59722e552c
making the single phase RESV injection work.
2017-11-24 11:44:53 +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
Kai Bao
89416720cb
removing more HAVE_UMFAPACK related in MultisegmentWell_impl
...
which are left from the previous PR.
2017-11-03 14:54:32 +01:00
Kai Bao
d9ed5a36b5
using looser tolerance for two failed cases related to umfpack.
...
24 - compareECLFiles_flow_legacy+SPE1CASE2_2P (Failed)
36 - compareECLFiles_flow_solvent+SPE5CASE1 (Failed)
2017-11-03 13:48:49 +01:00
Kai Bao
790db957f5
giving more information when umfpack is not available.
...
when calling invDXDirect.
2017-11-03 10:03:03 +01:00
Kai Bao
9fde417066
checking use_multisegment_well_ first in BlackoilModelParameters
2017-10-17 13:21:02 +02:00
Kai Bao
6b00d912c3
fixing jenkins warning.
2017-10-16 19:08:12 +02: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
7054317d98
checking the results from the direct solver invDX
...
since I has not figure out a way to detect/catch the singularity of the
matrix with UMFPack, currently, we only check the validity of the
results to make sure inf or nan not enter other part of the simulation.
It can easiliy results in assertion failure, and causes the running to
be terminated. After all, it mostly likely is a numerical issue
generated during the non-linear iteration process.
2017-10-15 12:13:42 +02:00
Kai Bao
d407e516ce
throw for unsupported situations and fix warnings
...
for MultisegmentWell.
2017-10-13 10:16:44 +02:00
Kai Bao
7a29c5098f
changing the strategy of the updateWellState in MultisegmentWell
...
only applying relaxation during the inner iteration.
2017-10-12 16:46:25 +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
Kai Bao
6a4260c264
various improvement and bug fixing.
...
fixed one invalid memory reading of perforation_segment_depth_diffs_
in computePerfRate, which caused different results for different
running.
2017-10-12 14:10:36 +02:00
Kai Bao
1a7b5571b6
trying to add an inner well iteration to speed up convergence.
2017-10-12 14:10:24 +02:00
Kai Bao
8a19b719d6
when Reynolds number is zero, return zero friction factor
...
which means there is not friction pressure loss. The formualtion has
problem in handling zero-value Reynolds number.
2017-10-12 13:43:04 +02:00
Kai Bao
6366087efd
using UMFPACK for the function invDX
...
for better robustness.
The iterative solvers require more improvement.
2017-10-12 13:43:04 +02:00
Kai Bao
78a28abf91
fixing a bug related to adding ms well during simulation.
...
When there is not ms well involved, all the ms well related is not
initialized. It causes problem when we want to add ms well after some
time of running.
The bug fix the running with model 2.
2017-10-12 13:43:04 +02:00
Kai Bao
c3a368e58e
adding two more parameters related to ms wells
...
to help to tune and improve the convergence.
2017-10-12 13:43:04 +02:00
Kai Bao
fc64d34bc2
cleaning up some comments.
2017-10-12 13:43:04 +02:00
Kai Bao
6fb459a797
introducing tolerance_pressure_ms_wells for pressure equations
...
for the multisegment wells. More detailedly, we should distinguish the
rate control equations, bhp control equations and ordinary pressure
equations.
2017-10-12 13:43:04 +02:00
Kai Bao
92abdc4f23
correcting some bugs in frictional pressure loss.
2017-10-12 13:43:04 +02:00
Kai Bao
f6ad3669f8
considering the two pressure difference to MultisegmentWell
...
while the sign of the pressure differences are not sure or well tested
yet.
2017-10-12 13:43:04 +02:00
Kai Bao
aa8b1ae0f8
giving the friction pressure loss a direction.
2017-10-12 13:43:04 +02:00
Kai Bao
ccc21e9dcd
removing WellStateMSWell.hpp
...
what was designed to use as WellState for one single Multisegment well.
2017-10-12 13:39:58 +02:00
Kai Bao
8c3f45f58e
fixing a few of bugs.
2017-10-12 13:39:58 +02:00
Kai Bao
4c207eb1f5
implementing computePerfCellPressDiffs
...
to calculate the pressure difference between perforation and perforated
grid cell.
2017-10-12 13:39:58 +02:00
Kai Bao
df593cf1d2
adding the calculation of depth differences
...
between the perforations and their segments, and also the perforations
and perforated grid blocks.
2017-10-12 13:39:58 +02:00
Kai Bao
2b4a99edf9
handling the acceleration pressure drop
...
not tested yet.
2017-10-12 13:39:58 +02:00
Kai Bao
4893334567
adding function getFrictionPressureLoss()
...
it should be related to the flow direction, which needs some tests.
2017-10-12 13:39:58 +02:00
Kai Bao
aa8ffe9386
removing the unit conversion factors in frictional formular.
...
since we are using the SI unit internally, they should not be needed.
2017-10-12 13:39:58 +02:00
Kai Bao
7ae5bd5187
adding the code to calculate the segment viscosities.
...
not tested yet.
2017-10-12 13:39:58 +02:00
Kai Bao
391abcec7f
adding helper fuction to calculate frictional pressure loss
...
not tested yet.
2017-10-12 13:39:58 +02:00
Kai Bao
f4f26395f6
fixing two compilation warning.
2017-10-12 13:39:58 +02:00
Kai Bao
ad964210e5
move invDX to MSWellHelpers.hpp.
2017-10-12 13:39:58 +02:00
Kai Bao
20c21a6cb2
removing a few variables related to matrix opertaion
2017-10-12 13:39:58 +02:00
Kai Bao
fc06923c50
changing StandardWellsDense to BlackoilModelEbos
...
for a better naming.
2017-10-12 13:39:58 +02:00
Kai Bao
6ef0c5010c
adapting the change of PR 1263
2017-10-12 13:37:05 +02:00
Kai Bao
dd9ad42a28
correcting the size of seg_comp_initial_ based on num_comp
...
for standards wells, all the three equations are mass balance
equatiions, it is safe to use numWellEq.
for MS wells, there is one extra pressure equation, it should be the
number of mass balance equations. If we do not put the polymer equation
inside the well equations, we will face dilemma soon.
2017-10-12 13:37:05 +02:00
Kai Bao
282d678622
removing flowToEbosPvIdx from MultisegmentWell
...
as a result from rebase.
2017-10-12 13:37:05 +02:00
Kai Bao
0dc041d46a
adding a use_multisegment_well_
...
to determine whether we will treat mutlisegment wells with
MultisegmentWell well model. Currently, it will be faulse by default.
It might be changed to be true by default when considering the
multisegment well model is well tested.
2017-10-12 13:37:05 +02:00
Kai Bao
3255626b2e
scaling the gas rates a little bit for MS well.
...
It can possibly benefit the StandardWell, while it is something needs a
little bit more investigation before using it.
2017-10-12 13:37:05 +02:00
Kai Bao
f7e1623b7a
only clearing matrix B and C when only_wells false.
...
to save a little calculation.
2017-10-12 13:37:05 +02:00
Kai Bao
c6be20c5cb
copying the segment rates and segment pressure from old well state.
...
It can be something rather tricky. It looks like with simple trival
initization, it is difficutl to converge. But when there is change to
the well, direct copying will not work anymore. Will we also facing
convergence problem?
2017-10-12 13:37:05 +02:00
Kai Bao
5dee45dc0a
various small improvements.
2017-10-12 13:37:05 +02:00
Kai Bao
a03a67c85e
not checking getWellConvergence more than one times
...
which is a bug. Not it is moved out of the for loop.
2017-10-12 13:37:05 +02:00
Kai Bao
bafe292af0
adding some comments for later implementation.
2017-10-12 13:37:05 +02:00
Kai Bao
b6d324c95e
implement recoverWellSolutionAndUpdateWellState
...
for MultisegmentWell_impl.
2017-10-12 13:37:05 +02:00
Kai Bao
596814943c
bug fixing to make the hydroPrssureLoss correct.
2017-10-12 13:37:05 +02:00
Kai Bao
f784cf97eb
a few bug fixing for MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
5ffd2bf026
correct the treatment of the pressure equation
...
the derivative of the inlet contribution should go to the correction
location in duneD_.
2017-10-12 13:37:05 +02:00
Kai Bao
c3b4188295
making message about catching FMatrixError more specific
...
in BlackoilModelEbos.
2017-10-12 13:37:05 +02:00
Kai Bao
23b0deb928
a few bug fixing for MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
fe1f854138
adding getWellConvergence() to MultisegmentWell_impl
2017-10-12 13:37:05 +02:00
Kai Bao
1f380713e8
using function invDX to implement functions in MultisegmentWell
...
it compiles, while not sure how it gonna work.
2017-10-12 13:37:05 +02:00
Kai Bao
ba3c7a88db
adding a functin invDX to calculate D^-1 X
...
not sure why putting it in ISTLSolver.hpp caused linking problem.
Putting it in MultisegmentWell for now.
2017-10-12 13:37:05 +02:00
Kai Bao
6f6f3ead5e
adding updateWellState for MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
1adc081430
adding function processFractions() to MultisegmentWell
...
to handle the undershooting and overshooting of the fractions during
updateWellState.
2017-10-12 13:37:05 +02:00
Kai Bao
0e7b77fac2
adding getHydorPressureLoss() to MultisegmentWell
...
to handle the hydrostatic pressure loss.
2017-10-12 13:37:05 +02:00
Kai Bao
d30c1eb2c5
adding getPressureEq() to MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
2bf82b4262
adding getControlEq() to MultisegmentWell
...
to handle the well control equation. THP control is not handled there
yet.
2017-10-12 13:37:05 +02:00
Kai Bao
ae91296339
generating the pattern of the matrix of MultisegmentWell
...
need to be verified.
2017-10-12 13:37:05 +02:00
Kai Bao
b3a233eecc
WIP in adding assembleWellEq for MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
1ffa87561b
adding computePerfRate() in MultisegmentWell
...
not tested yet.
2017-10-12 13:37:05 +02:00
Kai Bao
5d79a7f11b
adding computeSegmentFluidProperties for MultisegmentWell
...
only considering the fluid densities for now.
more fluid densities needs to be considered.
2017-10-12 13:37:05 +02:00
Kai Bao
7b873d97c9
small improvements in StandardWell
...
there is not functional change.
2017-10-12 13:37:05 +02:00
Kai Bao
1e32b40837
adding function computeInitialComposition to MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
eb119f245d
adding a few functions to calculate the fractions in MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
3e2a34239c
removing two functions from WellInterface
...
computeWellConnectionPressures() and computeAccumWell().
They belongs to the implementation details of well models now.
2017-10-12 13:37:05 +02:00
Kai Bao
8922f3e041
adding a function calculateExplictQuantities to WellInterface
...
to hide some implementation details.
2017-10-12 13:37:05 +02:00
Kai Bao
47c7c54548
making the updateWellControl to WellInterface
...
instead of having two of them in StandardWell and MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
553eeaaa82
adding updateWellControl to MultisegmentWell
...
it turned out to be same with the one in StandardWell
considerng to make it in the WellInterface.
2017-10-12 13:37:05 +02:00
Kai Bao
86c9115f1d
adding function updateWellStateWithTarget for MultisegmentWell
2017-10-12 13:37:05 +02:00
Kai Bao
c26b5905a8
re-organizting the function prepareTimeStep() for StandardWellsDense
...
for better readibility and organization.
2017-10-12 13:37:05 +02:00
Kai Bao
1024ce31f6
adding function updatePrimaryVariables() to MultisegmentWell
...
Basically, calculate the value of primary variables based on WellState.
2017-10-12 13:37:05 +02:00
Kai Bao
16ecbddefb
when encountering a multisegment well
...
we create a multisegment well instead of treating all the wells as
StandardWell. Making it compile.
2017-10-12 13:37:05 +02:00
Kai Bao
d694a72b53
adding initMSWell() to handle MS well related WellState.
2017-10-12 13:37:05 +02:00
Kai Bao
315c4a1659
more implementatin in WellStateMSWell
...
very likely that we will not use it.
2017-10-12 13:36:27 +02:00
Kai Bao
8c0af08056
adding comments for MultisegmentWell
2017-10-12 13:36:27 +02:00
Kai Bao
b5323b1b79
begin the class WellStateMSWell
...
it will be for each individual MS well.
it is kind of the start of the refactoring of the WellState.
2017-10-12 13:36:27 +02:00
Kai Bao
359de15f2b
begining MultisegmentWell.hpp
2017-10-12 13:36:27 +02:00
Kai Bao
5328de6361
handling WELL workover over ratio economic limit.
2017-10-11 13:35:07 +02:00
Kai Bao
2458b45901
removing GEFAC and SSOL from MissingFeatures.cpp
2017-10-10 15:53:12 +02:00
Kai Bao
28a7167d61
avoiding the oscillation treatment applied to well solution
...
it is a design to avoid some performance degeneration for parallel
running.
2017-09-29 17:15:39 +02:00
Kai Bao
fa03db07f8
correcting the way to use efficiency factor in assembleWelEq
2017-09-11 13:01:55 +02:00
Kai Bao
5d9c8350a2
Merge pull request #1267 from GitPaean/removing_new_variables
...
removing a few unused nw variable in StandardWell_impl.
2017-09-11 10:37:38 +02:00
Kai Bao
cd4d17bfa7
removing a few unused nw variable in StandardWell_impl.
2017-09-07 15:04:09 +02:00
Kai Bao
f982faed05
not using std::make_unique in test_wellmodel
...
to avoid using C++14 specific functions.
2017-09-04 15:50:01 +02:00
Kai Bao
b4538af164
not throwing when encountering multisegment wells.
2017-08-29 10:01:31 +02:00
Kai Bao
9accb56c86
adding a test for well model.
...
It is just test for StandardWell.
2017-08-25 14:09:26 +02:00
Kai Bao
355be6c26c
collecting the NaN and too large well residuals
...
make sure all the processes will throw if there is any of the processes
found abnormal residual values.
2017-08-25 14:09:26 +02:00
Kai Bao
8abe48a693
making destructor of WellInterface virtual
...
to avoid memory leaking.
2017-08-25 14:09:26 +02:00
Kai Bao
a60a969257
fixing one memory-leaking for flow_ebos running 2p case.
2017-08-25 14:09:26 +02:00
Kai Bao
96340a23ff
computePerfRate and crossFlowAllowed protected in StandardWell
2017-08-25 14:09:26 +02:00