Commit Graph
100 Commits
Author SHA1 Message Date
Kai Bao 575907941d removing some repeated code in phaseUsageFromDeck 2018-11-27 14:55:26 +01:00
Kai Bao 76271e3960 not shut a well because of cannot-produce-inject reason
which is a numerical reason. Removing it for now for better result.

It minght come back with more complete strategy and understanding.
2018-11-25 20:31:56 +01:00
Kai Bao 3dac7266b0 typo correction and message output adjustment for WTEST
recovering the const for updateWellStateWithTarget

there is no functional change.
2018-11-25 20:31:56 +01:00
Kai Bao 680c45b8f8 not updateWellControl for non-operable wells 2018-11-25 20:31:56 +01:00
Kai Bao eaa3ad19f5 first version of the well testing for physical reason
the key difficulty is that we do not have reliable explicit information
to do the testing.

In this version, we try to obtain the explicit information by finishing
one converged solving.
2018-11-25 20:31:56 +01:00
Kai Bao 7d721408f2 adding canProduceInjectWithCurrentBhp to StandardWell
and use it the operability_status determination.
2018-11-22 07:05:46 +01:00
Kai Bao f9988057af fixing comments from review of PR#1648
there should be no functional change
2018-11-20 13:56:14 +01:00
Kai Bao 8330c3a6a7 adjusting OperabilityStatus of WellInterface
hopefully, it improves the readability
2018-11-20 13:56:14 +01:00
Kai Bao bf9b5367d9 some cleaning up, no functional changes 2018-11-20 13:56:14 +01:00
Kai Bao 90f805bf3e we need to open the cross-flow to solve the sigularity
if a well is banned from cross-flow. When it is under RATE control, its
BHP might be initialized in way causing all the drawdown in the wrong
direction. It will cause singular well equations.

here, we open the croff-flow to fix the singularity and rely on Newton
iteraton to get desired result.

possible alternative approach is to adust the BHP to avoid the situation
that all the drawdown are in the wrong direction.
2018-11-20 13:56:14 +01:00
Kai Bao bba373c0b5 THP control tolerance changed to 1.e4
to fix some convergence problem.
2018-11-20 13:55:34 +01:00
Kai Bao c994a99583 WCON keyword can open a well closed due to physical reason
more tests will be required to figure out more accurate specific way to
open a well closed due to physcal reason with WCON input.
2018-11-20 13:55:34 +01:00
Kai Bao 30742112c6 switching to BHP limit when THP limit is not operable
a well is specified with THP target, while it can not work under its THP
target. For this case, we will switch to its BHP limit.
2018-11-20 13:55:34 +01:00
Kai Bao 8e17d4aeba shut/close well based on physical limits 2018-11-20 13:55:34 +01:00
Kai Bao ea42d1de9d adding function isOperable() to WellInterface
to indicate if the well is operable.
2018-11-20 13:55:34 +01:00
Kai Bao ae3b514e0b not switching to THP/BHP limit when not operable under them 2018-11-20 13:54:45 +01:00
Kai Bao 5204bbe4ca adding function checkWellOperatability() to StandardWell
it includes BHPLimit check, THPlimit check, and also to see whether if
the well can produce/inject in the correct direction.
2018-11-20 13:54:45 +01:00
Kai Bao dbe047a8a5 adding function operabilityCheckingUnderTHP to VFPProdProperties
To test the operability under THP limit.
2018-11-20 13:54:21 +01:00
Kai Bao b27dc3ec2e stopping use function crossflowAllowed()
it turns on the crossflow when all the drawdown in the wrong direction,
then the well get rates in the wrong direction.

flow is not ready to handle this type of situation, then the only result
will be chopped time step.
2018-11-20 13:54:21 +01:00
Kai Bao 2e43b440e0 adding OperabilityStatus to WellInterface
to check the operability status of a well.
2018-11-20 13:54:21 +01:00
Kai Bao 7ded0907fe using control in DECK to initialize the control in WellState
otherwise, it might not be initialized if the well does not exisit in
previous well state, which will result in undefined behavoir.

it causes failure in running some realizations.
2018-11-16 13:47:43 +01:00
Kai Bao 0e1ef4993b Merge pull request #1641 from akva2/fix_sign_unsigned
fixed: signed/unsigned warnings
2018-11-16 09:35:31 +01:00
Kai Bao b2be13ced4 changing std::cout to OpmLog with VFPProdProperties
for better output of information.
2018-11-15 11:46:22 +01:00
Kai Bao 76a3f2a1f5 adding function updateWellStateWithTHPTargetIPR()
this function can update the well state related based on the inflow
perfomance relationship and THP target.
2018-11-15 11:46:22 +01:00
Kai Bao eeae6aa4fc adding two THP control related fucntions to WellInterface
getTHPConstraint() and getTHPControlIndex();
2018-11-15 11:46:22 +01:00
Kai Bao 01efbc639c adding function underPredictionMode() to WellInterface
to indicate whether a well is under prediction mode.
2018-11-15 11:46:22 +01:00
Kai Bao 9bfa39224f re-organize the interface of function findIntersectionForBhp()
hopefully, make it easier to use.

and also, there is no mistake introduced.
2018-11-15 11:46:22 +01:00
Kai Bao 8445c802c0 adding function calculateBhpWithTHPTarget to VFPProdProperties
it calculate bhp value based on THP target/limit, VFP curves and
inflow-performance relationship
2018-11-15 11:46:22 +01:00
Kai Bao 9b5e25ae0f function to calculate bhp from thp through intersection
of VFP curves and IPR relationship.

Some small adjustment of the interface will be done later.
2018-11-15 11:46:22 +01:00
Kai Bao 32b8e79eae adding function updateIPR() to StandardWell 2018-11-15 11:46:22 +01:00
Kai Bao bf967e50a7 adding hasTable() method to the VFP properties
and give a clear message about non-accessible table ID in the function
isVFPActive() in WellInterface.
2018-11-14 14:29:28 +01:00
Kai Bao cf2eb1c336 remove a useless #if HAVE_OPENMP in BlackoilWellModel 2018-11-14 12:47:49 +01:00
Kai Bao 5a5c1bfcd3 addressing review comments from PR 1622 2018-11-14 12:45:41 +01:00
Kai Bao afcdbcf202 detecting the NAN and INF values during VFP calculation
and give warning messages when they happen, since they can be the
culprits of the termination of simulation later.

For ADB related, I did not find a good way to do the detection, so there
is no warning message given.
2018-11-14 11:35:44 +01:00
Kai Bao 32b00b61f8 updating the thp value if VFP table is valid
through function isVFPActive().
2018-11-14 11:27:00 +01:00
Kai Bao 0d1a4b2d13 adding function isVFPActive() for WellInterface
Even the well does not have a THP target/constraint, but if it is
specified with a valid VFP table, we are supposed to update the thp
value for output purposes.
2018-11-14 11:27:00 +01:00
Kai Bao 8f56634b69 fixing different well number between Wells and Well_containers
when the solveWellEq did not get converged.
2018-11-13 20:01:38 +01:00
Kai Bao 2ed2c20f12 Merge pull request #1623 from atgeirr/use-convergencereport-gather
Use gatherConvergenceReport() in BlackoilWellModel.
2018-11-13 15:16:34 +01:00
Kai Bao eb86404934 addressing review comments of PR #1615 2018-11-12 15:20:23 +01:00
Kai Bao 5e736fc4c7 decoupe the rate and fraction relaxation
the relaxation for these two have different goals and problems, it is
wise to decuple them.
2018-11-09 14:28:44 +01:00
Kai Bao 179a505b83 addressing the review comments #1597 2018-11-09 14:28:44 +01:00
Kai Bao 7e17a60c58 relaxation to avoid overshoot during Newton update in StandardWell
Solvent model is not handled yet.
2018-11-09 14:28:44 +01:00
Kai Bao 73f8ed912e detecting whether some well control events happens to a well
When there is some events happen to a well, we use the control mode
 from the DECK, and update the WellState based on the new control model.
 Otherwise, we can use the control mode from the previous well state,
 and keep the values from the previous well state as an intial guess.
2018-11-09 13:36:49 +01:00
Kai Bao 0c24a30459 some cleaning up
no funtionality changes.
2018-10-31 15:32:50 +01:00
Kai Bao 702c6e7b1f refactoring the wellTesting in BlackoilWellModel
so that we can do well test for different closing reason.
2018-10-31 15:00:21 +01:00
Kai Bao 4d58b9c34d splitting updateWellTestState to be two functions
one testing physical limits, and the other testing economic limits.
2018-10-31 12:54:39 +01:00
Kai Bao 6e2334dcad removing the extra ; after BEGIN_PROPERTIES and END_PROPERTIES
which causes compilation warning.
2018-09-18 13:35:27 +02:00
Kai Bao a154d89197 Merge pull request #1501 from totto82/wtest
Implement WTEST support
2018-07-04 10:45:27 +02:00
Kai Bao 1b587fa118 removing some whitespaces 2018-06-05 09:24:50 +02:00
Kai Bao b3e3b625b6 Merge pull request #1371 from kel85uk/task/#3/BlackoilAquiferModel
[WIP] Task/#1372/blackoil aquifer model
2018-06-04 22:02:26 +02:00
Kai Bao 477740ca38 introducing aquiferActive() to reduce of the overhead
for the models that does not include a aquifer model.
2018-05-31 09:51:54 +02:00
Kai Bao cb9fea6ba0 changing GTotal to WQTotal for StandardWell 2018-05-30 15:44:05 +02:00
Kai Bao 53ab8bc132 lowering the singular limit for the invertMatrix function.
to avoid failure due to singularity detection.
2018-05-29 09:36:55 +02:00
Kai Bao 97c51a7d02 addressing some comments
and handle the situation that a non-zero target specified for a
non-producing phases. We set the rates to zero for this case.
2018-05-28 16:05:02 +02:00
Kai Bao ce849fe18e adding a fix for the zero rate control for StandardWell
to avoid under-determined problem.
2018-05-28 16:05:02 +02:00
Kai Bao efbac8a628 adding function updateThp() to StandardWell
hopefully, to improve the readability.
2018-05-28 16:05:02 +02:00
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 b2bace449e adding function processFractions()
to reduce the length of the function updatePrimaryVariablesNewton()
2018-05-28 16:05:02 +02:00
Kai Bao e2e24ec355 adding the checking of tolerance of well control equation 2018-05-28 16:05:02 +02:00
Kai Bao 179a03144f more bug fixing
mainly to recover the runnign related to group control example
2018-05-28 16:05:02 +02:00
Kai Bao 1d218d2fe4 small bug fixes. 2018-05-28 16:05:02 +02:00
Kai Bao 3b70f5004f adding assembleControlEq to StandardWell
solvent model needs to be handled for the injector control.
2018-05-28 16:05:02 +02:00
Kai Bao 62947c85b9 updating updatePrimaryVariablesNewton with new primary variables. 2018-05-28 16:05:02 +02:00
Kai Bao 6066884a3d refactoring updateWellState in StandardWell to be two functions
for other use.
2018-05-28 16:05:02 +02:00
Kai Bao eb851b6580 adding BHP to the primary variables for StandardWell 2018-05-28 16:05:02 +02:00
Kai Bao 979d67e714 Merge pull request #1477 from totto82/vfp_fixes
WIP fix vfp in flow
2018-05-16 10:06:10 +02:00
Kai Bao 45023f304e Merge pull request #1465 from atgeirr/fix-ilu-serial
Make sure we (re-)throw MatrixBlockError also in the serial case.
2018-05-08 10:39:15 +02:00
Kai Bao 78cc2b8ca4 adapting to the interface change of VFP related in parser. 2018-04-20 11:29:22 +02:00
Kai Bao ed49fd1e88 adapting to the change related to VFP from the parser. 2018-04-11 09:22:52 +02:00
Kai Bao 87b3cccd7f removing WPIMULT from MissingFeatures 2018-04-03 11:11:25 +02:00
Kai Bao 7eaaae3906 removing FlowMainPolymer.hpp 2018-04-03 11:08:25 +02:00
Kai Bao 90e69b59cf silencing warning related to extra ; from BlackoilAmg 2018-03-14 12:02:07 +01:00
Kai Bao f098579e0b fixing test_multmatrixtransposed 2018-03-13 12:58:44 +01:00
Kai Bao b0edfd2f04 adding POLYMW to the injectorType determination
just to silence a warning resulting from OPM/opm-common#348.
2018-03-09 14:40:49 +01:00
Kai Bao 75e6bcefbb fixing test_transmissibilitymultipliers
due to the change of the PVTO table policy from the parser
2018-03-07 10:01:34 +01:00
Kai Bao 56caffab67 fixing comments for PR#1416 2018-02-28 10:26:54 +01:00
Kai Bao ec8dc4f534 trying to fix a problematic situation when updateWellState
for example, distr = 0 1 0, for rate control, F = 1 0 0, we will get a
zero F_target, then it is wrong to do the division with F_target.

It is okay when target = 0. When target != 0, the result is already very
wrong. Non-linear iteration can send us anywhere, not sure the best
solution for this kind of strange situation.
2018-02-28 09:47:22 +01:00
Kai Bao b71949b09e adding a test for polymer oil water 2018-02-28 08:39:38 +01:00
Kai Bao 635f6c7db2 trying to add the functionality to handle oil/water polymer 2018-02-28 08:39:38 +01:00
Kai Bao a8f560b046 addressing the comments. 2018-02-21 14:45:22 +01: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
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