Commit Graph
100 Commits
Author SHA1 Message Date
Kai Bao ecdb299671 handling the RESV well distr calculation correctly
more work has been done in the parser side, and the simulator side is
also updated accoridingly.
2019-01-03 09:48:02 +01:00
Kai Bao 9a6f390f38 Merge pull request #1691 from atgeirr/fix-missing-grat
Fix missing GRAT in switch.
2019-01-02 21:22:41 +01:00
Kai Bao b3f29de675 using compressed cell index for cellToConnectionIdx_ in AquiferCarterTracy 2019-01-02 14:59:12 +01:00
Kai Bao f5648b13a1 adding --use-multisegment-well=true to msw-model-1 test 2018-12-19 16:36:56 +01:00
Kai Bao 3a55e4aac2 fixing grid_index for AquiferCarterTracy
adding the mapping from cartisian indices to the actual grid indices.
2018-12-14 15:36:49 +01:00
Kai Bao 0c42a179d5 makig StandardWellV can handle producer
now StandardWellV should be able to be used as the general Standard
Well.
2018-12-14 10:24:08 +01:00
Kai Bao 76edcc0d91 addressing the second part of comments form PR#1680 2018-12-13 21:31:36 +01:00
Kai Bao c4254240e2 addressing the first part of comments form PR#1680
there should be no functional change.
2018-12-13 13:29:59 +01:00
Kai Bao 1ddcfcb679 adding test for polymer_injectivity 2018-12-12 16:24:24 +01:00
Kai Bao 5535406b67 cleaning StandardWell and StandardWellV
to make them more comparable, so that we can do refactoring easier
later.
2018-12-12 15:58:15 +01:00
Kai Bao 167306169b including the injectivity program to flow 2018-12-11 21:41:44 +01:00
Kai Bao 525caad508 finishing the function addWellContributions for StandardWellV 2018-12-11 21:40:47 +01:00
Kai Bao 612ac74b89 finish the injecivity functionality
the result looks okay
2018-12-11 21:40:47 +01:00
Kai Bao 391d31e1d6 adding the polymer molecular related to the well model 2018-12-11 21:40:47 +01:00
Kai Bao 7923628f83 adding the few injectivity related functions to StandardWellV 2018-12-11 21:40:47 +01:00
Kai Bao a08216efd5 creating StandardWellV as the new well model
to employ dynamic-size Evalution, vectors and matrices.
2018-12-11 21:40:47 +01:00
Kai Bao b079c0a1e5 adding flow_injecitivity executable target 2018-12-11 21:40:47 +01:00
Kai Bao e1ede3c9d5 adding polymer molecular weight to BlackoilPhases and phaseUsageFromDeck 2018-12-11 21:31:47 +01:00
Kai Bao 93fb5a2c52 add a few fields related to injectivity to WellStateFullyImplicitBlackoil
to account for the water throughput, skin pressure and water velocity
for each perforation.
2018-12-11 21:31:47 +01:00
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