You are on page 1of 61

TM 6009

ALIRAN FLUIDA DALAM MEDIA BERPORI


UJIAN AKHIR SEMESTER - FINAL EXAM

Nama : Babas Samudera Hafwandi


NIM : 22220003

Dosen : Prof. Ir. Asep Kurnia Permadi, M.Sc., Ph.D.


Tanggal Penyerahan : 19 Desember 2020

PROGRAM STUDI TEKNIK PERMINYAKAN


FAKULTAS TEKNIK PERTAMBANGAN DAN PERMINYAKAN
INSTITUT TEKNOLOGI BANDUNG
2020
FINAL EXAM
TM6009/TM8009 - Fluid Flow in Porous Media
Wednesday, 16 December 2020
3x24 Hours Take Home Exam
Instructor: Prof. Asep Kurnia Permadi, Ph.D

Please note the following instructions:

• The final exam is due by 19 December 2020 at 9.00 a.m and submit the all work to google
classroom.
• This is a 3-problem take-home exam; you are free to open course materials, papers, and
textbooks for your work reference.
• Discussion among exam participants, classmates, and any other persons is strictly
PROHIBITED
• You have to submit your work in a scanned handwriting single file pdf to google classroom
assignment post for final exam. Your work and file must be readable.
• Be as neat and organized as possible
• Your work will be graded based on:
o Comprehensiveness of your answer (show all necessary steps in your own words)
o Correctness
o Neatness
o Innovation (efforts to show other implication of problem or limitation of your
solution/better solution other than provided in literature)
• Submission file name format:
o S2: TM6009_UAS_<NIM>_Name
o S3: TM8009_UAS_<NIM>_Name
• You are required write (by your own handwriting)
1. Problem 1 – Solution for Linear Flow Diffusivity equation

The following illustration below describes bilinear flow into single vertical fracture in wells.
Assuming “infinite conductivity” in the fracture, the linear flow into vertical fracture can be
described as
𝜕2𝑃 𝜕𝑃
• PDE : 𝐷 𝑑𝑧 2 = ………………………………………………. (1)
𝜕𝑡

D is hydraulic diffusivity whereas 𝐷 = 𝑘/𝑐𝑡


• Initial Boundary Condition (Uniform Initial Pressure Distribution)
𝑃(𝑧, 𝑡 = 0) = 𝑃𝑖 ………………………………………………………… (2)
• Inner Boundary Condition (Constant BHP case)
𝜕𝑃
| = −𝑃𝑓 …………………………………………………………. (3)
𝜕𝑧 𝑧=0

• Outer Boundary Condition (Infinite Acting Reservoir)


𝑃(𝑧 → , 𝑡) = 0 ………………………………………………………… (4)

Figure 1. Linear Flow into Vertical Fracture in Hydraulically Fractured Well

You are ask to:


(a) Derive the solution for this case using Laplace transform (in Laplace domain)
(b) Show the inverse of solution in point (a) in exact solution (real domain)
(c) Plot Laplace function of Pwf in bilinear flow fractured well versus t (0  t  10000) using
Stehfest Algorithm (N=2, 4, 6, 8, …, 20) then compare to exact solution in point (b).
Elaborate the results and give the conclusion which number the Stehfest terms give the most
approximation?
Notes:
- You can modify and run the MATLAB code attached in this document (Filename:
GaverStehfestEq.m) or you are to free to use any programming tools you wish.
2. Problem 2 – Solution for Wellbore Phase Redistribution

This problem has been given to analysis the effects of wellbore phase redistribution on pressure build
up test. The governing relations for this case are:
• Dimensionless Diffusivity Equation
𝜕 2𝑃𝐷 1  𝑃𝐷  𝑃𝐷
+𝑟 = …………………………………………………………. (1)
𝐷  𝑟𝐷  𝑡𝐷
𝜕𝑟𝐷2

• Initial condition (Uniform Pressure Distribution)


𝑃𝐷 (𝑟𝐷 , 𝑡𝐷 = 0) = 0 ………………………………………………………… (2)
• Inner Boundary Condition 1 (Wellbore Storage Effect)
𝑃 𝑑𝑃𝑤𝐷  𝑃𝜙𝐷
− (  𝑟𝐷 ) = 1 − 𝐶𝐷 ( − ) ………………………………………… (3)
𝐷 𝑟𝐷 =1  𝑡𝐷  𝑡𝐷

• Inner Boundary Condition 2 (Skin Effect near Wellbore)


𝑃
𝑃𝑤𝐷 = [𝑃𝐷 − 𝑠 (  𝑟𝐷 )] …………………………………………………. (4)
𝐷 𝑟𝐷 =1

• Outer Boundary Condition (Infinite Acting Reservoir)


lim 𝑃𝐷 (𝑟𝐷 , 𝑡𝐷 ) = 0 …………………………………………………………... (5)
𝑟𝐷→ ∞

• Dimensionless Phase-Redistribution Variables


𝜙 𝑘ℎ𝑃
𝑃𝜙𝐷 = 141.2𝑞𝐵 …………………………………………………………………… (6)

𝜙 𝑘ℎ𝐶
𝐶𝜙𝐷 = 141.2𝑞𝐵 …………………………………………………………………… (7)

0.000264 𝑘𝑡
𝑡𝐷 = …………………………………………………………………… (8)
𝑐𝑡𝑟𝑤
2

You are given the following Laplace domain with phase redistribution effect for cylindrical source
well:
𝐾 (√𝑠) 1 1
[ 0 +𝑆][1+𝐶𝐷𝐶𝜙𝐷𝑠2 ( − ]
𝑠𝐾1 (√𝑠) 𝑠 𝑠+1⁄
𝜕𝐷
ℒ(𝑃𝑤𝐷 ) = 𝐾 (√𝑠)
………………………………………………… (9)
𝑠{1+𝐶𝐷𝑠[ 0 +𝑆]}
𝑠𝐾1 (√𝑠)

Your tasks are:

(a) List all the assumptions used in equation (1) to (5) and explain the physical meaning of phase
redistribution during wellbore storage and its implication on pressure transient analysis
interpretation.
(b) Derive the diffusivity equation in equation (1) for wellbore phase redistribution to obtain
Laplace domain for cylindrical source well as shown in equation (9).
(c) Using Gaver-Stehfest Algorithm in problem#1, generate type curve with phase redistribution
for cylindrical source well. You can modify the code run in problem #1 by MATLAB or you
can run the algorithm using any programming tools you wish then submit the modified script
as attachment in your work

Notes:
- You can use the reference from: Fair, W. Pressure Buildup Analysis with Wellbore Phase
Redistribution. SPE 8206 PA

3. Problem 3 – Solution for Naturally Fractured Reservoir (Dual Porosity)

The following illustration below describes the flow of idealized dual porosity model, developed by
Barenblatt et. al. (1960) and used by Warren & Root (1963). The governing relations for this case
are:
• Dimensionless Diffusivity Equation
- Fracture Well System

………………………………… (1)

- Matrix – Fracture System

…………………………………………. ….. (2)

- Storage Capacity Coefficient ()

…………………………………………………. (3)

- Interporosity Flow Coefficient ()

……………………………………………………….. (4)

• Initial condition (Uniform Pressure Distribution)


𝑝𝐷 (𝑟𝐷, 𝑡𝐷 = 0) = 0 …………………………………………………………………………………… (5)
• Inner Boundary Condition 1 (Wellbore Storage Effect)
𝑃 𝑑𝑃𝑤𝐷  𝑃𝜙𝐷
− (  𝑟𝐷 ) = 1 − 𝐶𝐷 ( − ) …………………………………………….. (6)
𝐷 𝑟𝐷 =1  𝑡𝐷  𝑡𝐷

• Inner Boundary Condition 2 (Skin Effect near Wellbore)


𝑃
𝑃𝑤𝐷 = [𝑃𝐷 − 𝑠 (  𝑟𝐷 )] ……………………………………………………… (7)
𝐷 𝑟𝐷 =1
• Outer Boundary Condition (Infinite Acting Reservoir)
lim 𝑃𝐷 (𝑟𝐷 , 𝑡𝐷 ) = 0 …………………………………………………………... ….. (8)
𝑟𝐷→ ∞

Figure 2. Dual Porosity System proposed by Barenblatt et. al. (1960) & Warren & Root (1963)

Your tasks are:

(a) List all the assumptions used in equation (1) to (8) and explain the physical meaning of the
assumption used in Warren and Root dual porosity model
(b) Derive the general diffusivity equation for dual porosity in equation (1) and (2) by applying
Laplace transformation as follow:

𝑃𝐷𝑓 = 𝐶1 𝐼0 (√𝑠𝑓𝑟𝐷 ) + 𝐶2 𝐾0 (√𝑠𝑓𝑟𝐷 )

(c) Show that the solution for dimensionless pressure at the wellbore as a function of time with
skin effect is presented in dimensionless forms as:

1 −𝜆𝑡𝐷 −𝜆𝑡𝐷
𝑃𝐷𝑓 = [𝑙𝑛𝑡𝐷 + 0.80908 + 𝐸𝑖 ( ) − 𝐸𝑖( + 2𝑠]
2 𝜔 (1 − 𝜔 ) (1 − 𝜔 )

(d) Plot the dimensionless variable solution (𝑝𝐷ƒ 𝑣𝑠 𝑡𝐷) given in (c) for 𝜔 = 10−3 ; 𝜆 =

10−7 ; 𝑠 = 10 using semi-log scale. Use time domain up to 1010. Give physical explanation of
pressure behaviour change from early to late time
Notes:
- You can use the reference from: Mavor, M.J., and Cinco Ley. Transient Pressure Behavior
of Naturally Fractured Reservoirs. SPE 7977
Table 1. Results of Matlab Simulation for Problem 1
pwf pwf pwf
t pwf (n=6) pwf (n=8) pwf (n=12) pwf (n=14) pwf (n=16) pwf (n=18) pwf (n=20)
(n=2) (n=4) (n=10)
0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
100 988.141 991.242 9.91E+02 9.91E+02 9.91E+02 9.91E+02 9.91E+02 9.91E+02 9.91E+02 9.91E+02
200 983.228 987.614 987.8056 9.88E+02 9.88E+02 9.88E+02 9.88E+02 9.88E+02 9.88E+02 9.88E+02
300 979.459 984.831 985.065 9.85E+02 9.85E+02 9.85E+02 9.85E+02 9.85E+02 9.85E+02 9.85E+02
400 976.281 982.484 982.7545 9.83E+02 982.7657 982.7657 982.76569 982.76568 982.76482 982.7618886
500 973.482 980.417 980.719 980.73114 980.7315 980.7315 980.73145 980.7315 980.73063 980.7204294
600 970.951 978.548 978.8787 978.89202 978.8924 978.8924 978.89237 978.89238 978.89044 978.920319
700 968.623 976.829 977.1864 977.20078 977.2011 977.2012 977.20116 977.20114 977.20086 977.2135008
800 966.457 975.229 975.6112 975.6266 975.627 975.627 975.62701 975.62694 975.62622 975.630758
900 964.422 973.726 974.1318 974.14811 974.1485 974.1485 974.14854 974.14853 974.14747 974.192273
1000 962.498 972.305 972.7325 972.74971 972.7502 972.7502 972.75017 972.75016 972.74946 972.757208
1100 960.667 970.953 971.4016 971.41966 971.4201 971.4201 971.42014 971.42011 971.4187 971.4400236
1200 958.918 969.662 970.13 970.14881 970.1493 970.1493 970.1493 970.14922 970.14774 970.1587942
1300 957.241 968.423 968.9103 968.92989 968.9304 968.9304 968.93041 968.93047 968.92829 968.9441121
1400 955.627 967.231 967.7367 967.75703 967.7576 967.7576 967.75757 967.75754 967.75684 967.7738264
1500 954.069 966.081 966.6043 966.62535 966.6259 966.6259 966.62591 966.62584 966.62558 966.6437654
1600 952.563 964.968 965.509 965.53081 965.5314 965.5314 965.53139 965.53134 965.5304 965.5466578
1700 951.103 963.89 964.4475 964.46997 964.4706 964.4706 964.47057 964.47055 964.47061 964.4809186
1800 949.685 962.843 963.4168 963.43991 963.4405 963.4405 963.44051 963.44054 963.43878 963.4612957
1900 948.307 961.825 962.4144 962.43807 962.4387 962.4387 962.4387 962.43869 962.43677 962.466371
2000 946.964 960.833 961.4379 961.46228 961.4629 961.4629 961.46292 961.46284 961.46388 961.4451327
2100 945.654 959.866 960.4857 960.51058 960.5112 960.5112 960.51124 960.51126 960.51022 960.5275915
2200 944.375 958.922 959.5558 959.58129 959.582 959.582 959.58197 959.58199 959.58125 959.5862222
2300 943.125 957.998 958.6468 958.6729 958.6736 958.6736 958.67358 958.67361 958.67279 958.6902079
2400 941.902 957.095 957.7574 957.78404 957.7847 957.7848 957.78474 957.78465 957.78405 957.7969113
2500 940.704 956.21 956.8863 956.91352 956.9142 956.9142 956.91424 956.91413 956.91379 956.9379258
2600 939.529 955.343 956.0325 956.06023 956.061 956.061 956.06096 956.06106 956.05858 956.1137578
2700 938.377 954.493 955.1949 955.22321 955.2239 955.224 955.22396 955.22391 955.22377 955.2232093
2800 937.247 953.657 954.3728 954.40155 954.4023 954.4023 954.40231 954.40231 954.40108 954.4169111
2900 936.136 952.837 953.5651 953.59444 953.5952 953.5952 953.59521 953.59525 953.59445 953.5858804
3000 935.044 952.031 952.7713 952.80112 952.8019 952.8019 952.80191 952.80182 952.80207 952.8215731
3100 933.97 951.238 951.9906 952.02092 952.0217 952.0217 952.02172 952.02179 952.02043 952.0228952
3200 932.914 950.458 951.2224 951.25321 951.254 951.254 951.25402 951.254 951.25363 951.2541254
3300 931.874 949.69 950.4661 950.4974 950.4982 950.4982 950.49822 950.49822 950.49691 950.5105232
3400 930.849 948.933 949.7212 949.75296 949.7538 949.7538 949.75379 949.75377 949.75236 949.7911421
3500 929.839 948.187 948.9872 949.01938 949.0202 949.0202 949.02023 949.02017 949.02057 949.0165705
3600 928.844 947.452 948.2636 948.29622 948.2971 948.2971 948.29708 948.29715 948.29549 948.3148264
3700 927.863 946.728 947.5499 947.58303 947.5839 947.5839 947.58391 947.58389 947.58341 947.6106432
3800 926.894 946.013 946.8459 946.87941 946.8803 946.8803 946.8803 946.88031 946.87862 946.8953669
3900 925.939 945.307 946.151 946.185 946.1859 946.1859 946.1859 946.18593 946.18462 946.2257911
4000 924.995 944.61 945.465 945.49943 945.5003 945.5003 945.50034 945.50028 945.49994 945.5157874
4100 924.063 943.922 944.7875 944.82238 944.8233 944.8233 944.8233 944.82326 944.82298 944.8215677
4200 923.143 943.242 944.1183 944.15353 944.1544 944.1545 944.15446 944.15448 944.15454 944.1589621
4300 922.233 942.57 943.4569 943.49261 943.4935 943.4936 943.49355 943.49358 943.49159 943.5173826
4400 921.334 941.907 942.8032 942.83932 942.8403 942.8403 942.84027 942.84032 942.83967 942.8480175
4500 920.445 941.25 942.1569 942.19341 942.1944 942.1944 942.19438 942.19434 942.19486 942.1927676
4600 919.566 940.601 941.5177 941.55465 941.5556 941.5556 941.55563 941.55564 941.55383 941.5607705
4700 918.697 939.959 940.8855 940.92279 940.9238 940.9238 940.92377 940.92382 940.92207 940.9749498
4800 917.836 939.323 940.2599 940.29762 940.2986 940.2986 940.29861 940.29866 940.29634 940.3286999
4900 916.985 938.695 939.6408 939.67892 939.6799 939.6799 939.67992 939.67999 939.67849 939.6885282
5000 916.142 938.072 939.028 939.06651 939.0675 939.0675 939.06753 939.0675 939.06666 939.0783649
5100 915.308 937.456 938.4213 938.46019 938.4612 938.4612 938.46122 938.4612 938.46039 938.476024
5200 914.481 936.846 937.8206 937.85979 937.8608 937.8608 937.86082 937.86087 937.85891 937.8628593
5300 913.663 936.241 937.2255 937.26513 937.2662 937.2662 937.26618 937.26614 937.266 937.2703807
5400 912.852 935.643 936.6361 936.67606 936.6771 936.6771 936.67712 936.67713 936.67718 936.7109489
5500 912.049 935.05 936.0521 936.09242 936.0935 936.0935 936.09348 936.09345 936.09327 936.0862249
5600 911.253 934.462 935.4733 935.51405 935.5151 935.5151 935.51513 935.51516 935.51491 935.5315592
5700 910.464 933.879 934.8998 934.94084 934.9419 934.9419 934.94192 934.94197 934.93964 934.9974499
5800 909.682 933.302 934.3312 934.37262 934.3737 934.3737 934.37372 934.37371 934.37246 934.3598598
5900 908.907 932.729 933.7675 933.80929 933.8104 933.8104 933.81039 933.81037 933.81051 933.8043572
6000 908.138 932.161 933.2086 933.25071 933.2518 933.2518 933.25182 933.25184 933.2497 933.2929311
6100 907.376 931.598 932.6543 932.69676 932.6979 932.6979 932.69789 932.69782 932.69638 932.6966304
6200 906.62 931.04 932.1045 932.14734 932.1484 932.1485 932.14846 932.1485 932.14782 932.1870352
6300 905.87 930.486 931.5591 931.60233 931.6034 931.6035 931.60347 931.60355 931.60228 931.6239179
6400 905.126 929.937 931.0181 931.06162 931.0628 931.0628 931.06277 931.06279 931.06245 931.0508346
6500 904.387 929.391 930.4813 930.52513 930.5263 930.5263 930.52629 930.52629 930.52565 930.5046621
6600 903.655 928.85 929.9485 929.99275 929.9939 929.9939 929.99392 929.99393 929.99393 929.9729399
6700 902.928 928.313 929.4198 929.46438 929.4655 929.4656 929.46556 929.46559 929.46251 929.5103174
6800 902.206 927.78 928.8951 928.93995 928.9411 928.9411 928.94113 928.94109 928.93983 928.9699692
6900 901.489 927.251 928.3742 928.41936 928.4205 928.4206 928.42055 928.42052 928.41927 928.4446302
7000 900.778 926.726 927.857 927.90252 927.9037 927.9037 927.90373 927.90364 927.90441 927.8976137
7100 900.072 926.204 927.3435 927.38937 927.3906 927.3906 927.39058 927.39058 927.38942 927.3950987
7200 899.371 925.687 926.8336 926.87981 926.881 926.881 926.88103 926.88106 926.88022 926.911356
7300 898.674 925.172 926.3273 926.37378 926.375 926.375 926.37501 926.37499 926.37527 926.3778186
7400 897.983 924.662 925.8244 925.87121 925.8724 925.8725 925.87245 925.87241 925.87079 925.8953256
7500 897.296 924.154 925.3249 925.37202 925.3732 925.3733 925.37326 925.37325 925.37244 925.3769014
7600 896.613 923.65 924.8287 924.87615 924.8774 924.8774 924.8774 924.87748 924.87464 924.91152
7700 895.935 923.15 924.3358 924.38353 924.3848 924.3848 924.38479 924.3847 924.3849 924.4072756
7800 895.262 922.652 923.846 923.89409 923.8953 923.8954 923.89536 923.89544 923.89393 923.9181821
7900 894.592 922.158 923.3594 923.40779 923.409 923.4091 923.40907 923.40908 923.40972 923.3868086
8000 893.927 921.667 922.8759 922.92455 922.9258 922.9259 922.92584 922.92586 922.92522 922.930193
8100 893.266 921.179 922.3954 922.44433 922.4456 922.4456 922.44562 922.44562 922.44469 922.4633728
8200 892.61 920.694 921.9178 921.96706 921.9683 921.9684 921.96836 921.9683 921.96741 921.9889192
8300 891.957 920.212 921.4431 921.49269 921.494 921.494 921.494 921.494 921.49274 921.4980053
8400 891.308 919.732 920.9713 921.02117 921.0225 921.0225 921.02249 921.02244 921.02232 921.0380889
8500 890.663 919.256 920.5023 920.55245 920.5537 920.5538 920.55378 920.55373 920.55403 920.5591888
8600 890.021 918.782 920.036 920.08648 920.0878 920.0878 920.08781 920.0878 920.0865 920.0966647
8700 889.384 918.312 919.5725 919.62321 919.6245 919.6246 919.62455 919.62458 919.62395 919.6342169
8800 888.75 917.843 919.1115 919.16259 919.1639 919.164 919.16394 919.16394 919.16362 919.2015771
8900 888.12 917.378 918.6533 918.70458 918.7059 918.706 918.70594 918.70592 918.7055 918.6923666
9000 887.493 916.915 918.1975 918.24914 918.2505 918.2505 918.25051 918.25047 918.25054 918.2558154
9100 886.87 916.455 917.7443 917.79623 917.7976 917.7976 917.7976 917.79768 917.7956 917.8050175
9200 886.25 915.997 917.2936 917.34579 917.3471 917.3472 917.34717 917.34721 917.34498 917.3947592
9300 885.633 915.542 916.8453 916.8978 916.8992 916.8992 916.89918 916.89916 916.89823 916.9041833
9400 885.02 915.089 916.3995 916.45221 916.4536 916.4536 916.4536 916.4536 916.45114 916.4966414
9500 884.41 914.638 915.9559 916.00898 916.0104 916.0104 916.01038 916.01042 916.00981 916.0457298
9600 883.803 914.19 915.5148 915.56808 915.5695 915.5695 915.56949 915.56955 915.56789 915.5819015
9700 883.2 913.744 915.0759 915.12947 915.1309 915.1309 915.13088 915.13095 915.1298 915.1376765
9800 882.599 913.301 914.6393 914.69311 914.6945 914.6945 914.69453 914.69455 914.69311 914.6804498
9900 882.002 912.86 914.2048 914.25898 914.2604 914.2604 914.26041 914.26043 914.25898 914.2788099
10000 881.407 912.421 913.7726 913.82703 913.8284 913.8285 913.82847 913.82841 913.82817 913.8344991
Table 2. Results of Exact Solution Calculation for Problem 1

t Pwf
0 1000
100 991.3828
200 987.8135
300 985.0747
400 982.7657
500 980.7315
600 978.8924
700 977.2012
800 975.627
900 974.1485
1000 972.7502
1100 971.4201
1200 970.1493
1300 968.9304
1400 967.7576
1500 966.6259
1600 965.5314
1700 964.4706
1800 963.4405
1900 962.4387
2000 961.4629
2100 960.5112
2200 959.582
2300 958.6736
2400 957.7847
2500 956.9142
2600 956.061
2700 955.224
2800 954.4023
2900 953.5952
3000 952.8019
3100 952.0217
3200 951.254
3300 950.4982
3400 949.7538
3500 949.0202
3600 948.2971
3700 947.5839
3800 946.8803
3900 946.1859
4000 945.5003
4100 944.8233
4200 944.1545
4300 943.4935
4400 942.8403
4500 942.1944
4600 941.5556
4700 940.9238
4800 940.2986
4900 939.6799
5000 939.0675
5100 938.4612
5200 937.8608
5300 937.2662
5400 936.6771
5500 936.0935
5600 935.5151
5700 934.9419
5800 934.3737
5900 933.8104
6000 933.2518
6100 932.6979
6200 932.1485
6300 931.6035
6400 931.0628
6500 930.5263
6600 929.9939
6700 929.4656
6800 928.9411
6900 928.4205
7000 927.9037
7100 927.3906
7200 926.881
7300 926.375
7400 925.8724
7500 925.3733
7600 924.8774
7700 924.3848
7800 923.8954
7900 923.4091
8000 922.9258
8100 922.4456
8200 921.9684
8300 921.494
8400 921.0225
8500 920.5538
8600 920.0878
8700 919.6245
8800 919.1639
8900 918.7059
9000 918.2505
9100 917.7976
9200 917.3472
9300 916.8992
9400 916.4536
9500 916.0104
9600 915.5695
9700 915.1309
9800 914.6945
9900 914.2604
10000 913.8285
Table 3. Error Calculation Result Between Results of Matlab Simulations ans Exact Solution
e rror pwf e rror pwf e rror pwf e rror pwf e rror pwf e rror pwf e rror pwf e rror pwf e rror pwf e rror pwf
t
(n=2) (n=4) (n=6) (n=8) (n=10) (n=12) (n=14) (n=16) (n=18) (n=20)

0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
100 0.32703174 0.0141993 0.0005633 1.44901E-05 2.56127E-07 1.28564E-07 4.7217E-08 1.73818E-06 9.05658E-05 0.001863224
200 0.46416389 0.0201534 0.0007995 2.05661E-05 3.64484E-07 2.0688E-07 1.31062E-07 5.16716E-07 0.00013345 0.001553299
300 0.57006292 0.0247513 0.0009819 2.52584E-05 4.46237E-07 2.5546E-07 2.16961E-07 2.5275E-07 7.13736E-05 0.001911305
400 0.65979849 0.0286475 0.0011365 2.92343E-05 5.17869E-07 2.88655E-07 1.09541E-07 1.40099E-06 8.89181E-05 0.000387156
500 0.73920723 0.0320954 0.0012733 3.27528E-05 5.81034E-07 3.37661E-07 4.81952E-07 4.44867E-06 8.44147E-05 0.001124685
600 0.81128229 0.0352248 0.0013974 3.59463E-05 6.35312E-07 3.47011E-07 2.26536E-07 4.50555E-07 0.000197721 0.00285501
700 0.87780158 0.0381129 0.001512 3.88936E-05 6.88795E-07 3.80977E-07 3.2243E-08 2.02374E-06 2.98305E-05 0.001263331
800 0.93992346 0.0408102 0.001619 4.16461E-05 7.36876E-07 4.18941E-07 9.20226E-08 7.62663E-06 8.13875E-05 0.00038416
900 0.99845244 0.0433514 0.0017198 4.42394E-05 7.8238E-07 4.57761E-07 1.99706E-07 1.38677E-06 0.000109747 0.004489332
1000 1.05397424 0.0457621 0.0018155 4.66995E-05 8.26976E-07 4.53984E-07 3.14901E-08 1.06224E-06 7.24231E-05 0.000723645
1100 1.10693101 0.0480614 0.0019067 4.90459E-05 8.67996E-07 4.87777E-07 7.29423E-08 2.27821E-06 0.000148071 0.002047281
1200 1.15766621 0.0502643 0.0019941 5.12939E-05 9.06305E-07 5.09822E-07 2.70127E-07 8.87182E-06 0.000161093 0.000978066
1300 1.20645298 0.0523825 0.0020781 5.34556E-05 9.45532E-07 5.43731E-07 5.41965E-07 5.69848E-06 0.000218877 0.001413929
1400 1.25351275 0.0544258 0.0021592 5.55406E-05 9.82379E-07 5.3743E-07 2.90358E-07 2.95711E-06 7.51008E-05 0.001680328
1500 1.29902799 0.056402 0.0022376 5.75574E-05 1.01807E-06 5.87403E-07 2.13195E-07 7.30306E-06 3.39134E-05 0.001847299
1600 1.34315121 0.0583178 0.0023136 5.95124E-05 1.05267E-06 5.93448E-07 2.20321E-07 4.6488E-06 0.00010236 0.001581601
1700 1.38601137 0.0601787 0.0023874 6.14114E-05 1.08696E-06 6.0748E-07 2.90105E-07 1.75348E-06 4.85205E-06 0.001073296
1800 1.42771874 0.0619896 0.0024592 6.32594E-05 1.11812E-06 6.23254E-07 2.36075E-07 2.67186E-06 0.00018004 0.002156923
1900 1.46836842 0.0637545 0.0025292 6.50605E-05 1.15066E-06 6.6193E-07 2.84312E-07 6.77615E-07 0.000200531 0.00287512
2000 1.50804316 0.0654772 0.0025976 6.68184E-05 1.18156E-06 6.66524E-07 4.06912E-07 8.28789E-06 9.99572E-05 0.001849932
2100 1.54681547 0.0671606 0.0026644 6.85363E-05 1.21332E-06 6.83326E-07 1.04252E-07 2.29099E-06 0.000106875 0.001702067
2200 1.58474932 0.0688076 0.0027297 7.02171E-05 1.2426E-06 6.98791E-07 1.62434E-07 2.46282E-06 7.48761E-05 0.000443282
2300 1.62190148 0.0704207 0.0027937 7.18633E-05 1.27149E-06 7.22634E-07 1.31951E-08 2.96799E-06 8.29283E-05 0.001733972
2400 1.65832259 0.0720021 0.0028564 7.3477E-05 1.29988E-06 7.36131E-07 2.24129E-07 9.489E-06 7.28008E-05 0.00127047
2500 1.6940581 0.0735537 0.002918 7.50603E-05 1.32795E-06 7.20961E-07 8.55363E-07 1.06396E-05 4.66876E-05 0.002475884
2600 1.72914892 0.0750773 0.0029784 7.66152E-05 1.356E-06 7.9654E-07 5.70976E-07 9.41266E-06 0.00024961 0.005521658
2700 1.76363207 0.0765745 0.0030378 7.8143E-05 1.38354E-06 7.80232E-07 4.60773E-07 4.75554E-06 2.00305E-05 7.84007E-05
2800 1.79754117 0.0780468 0.0030962 7.96454E-05 1.4087E-06 7.7626E-07 4.76253E-08 4.12928E-08 0.000129446 0.001529773
2900 1.83090685 0.0794955 0.0031537 8.11238E-05 1.4363E-06 8.12741E-07 5.50926E-08 4.69354E-06 7.99E-05 0.000978315
3000 1.86375714 0.0809218 0.0032103 8.25794E-05 1.46095E-06 8.27047E-07 1.53246E-07 9.38431E-06 1.67596E-05 0.002063942
3100 1.89611774 0.0823268 0.003266 8.40132E-05 1.48717E-06 8.43919E-07 4.30461E-07 7.44231E-06 0.000135403 0.000123315
3200 1.92801228 0.0837116 0.003321 8.54264E-05 1.51232E-06 8.45117E-07 1.93986E-07 2.56898E-06 4.05055E-05 1.10846E-05
3300 1.95946257 0.0850772 0.0033752 8.68199E-05 1.5371E-06 8.92517E-07 5.22283E-08 2.98454E-07 0.000138197 0.001294053
3400 1.99048878 0.0864243 0.0034286 8.81946E-05 1.55995E-06 8.66624E-07 5.43412E-08 2.60261E-06 0.00015135 0.00393241
3500 2.02110959 0.0877538 0.0034813 8.95514E-05 1.58501E-06 9.01864E-07 2.01147E-07 6.83959E-06 3.49373E-05 0.00038601
3600 2.05134236 0.0890665 0.0035334 9.08909E-05 1.60748E-06 8.99869E-07 1.49504E-07 7.27766E-06 0.000167922 0.001871346
3700 2.08120327 0.090363 0.0035848 9.22139E-05 1.63301E-06 9.22626E-07 4.6349E-07 1.50578E-06 5.24366E-05 0.002821932
3800 2.11070738 0.091644 0.0036357 9.35214E-05 1.65456E-06 9.47078E-07 3.12185E-07 6.33144E-07 0.000177145 0.001591231
3900 2.1398688 0.0929102 0.0036859 9.48133E-05 1.67837E-06 9.49417E-07 1.04465E-07 3.23663E-06 0.000134891 0.004216503
4000 2.1687007 0.094162 0.0037356 9.60908E-05 1.70098E-06 9.60086E-07 1.31746E-07 6.06095E-06 4.17853E-05 0.001634038
4100 2.19721546 0.0954001 0.0037847 9.73543E-05 1.72266E-06 9.92833E-07 7.69004E-08 3.445E-06 3.31857E-05 0.000183042
4200 2.22542471 0.0966249 0.0038333 9.86041E-05 1.74507E-06 1.00333E-06 1.16677E-08 1.57357E-06 7.71877E-06 0.000476392
4300 2.25333937 0.0978369 0.0038813 9.9841E-05 1.767E-06 9.81866E-07 1.28861E-07 3.72441E-06 0.000207871 0.002526283
4400 2.28096975 0.0990366 0.0039289 0.000101065 1.78959E-06 1.0104E-06 2.49117E-07 5.13192E-06 6.40186E-05 0.000821526
4500 2.30832556 0.1002243 0.0039761 0.000102277 1.80963E-06 1.01632E-06 1.36161E-07 4.57048E-06 5.07327E-05 0.000170991
4600 2.33541597 0.1014005 0.0040227 0.000103478 1.83014E-06 1.02776E-06 2.70263E-07 1.94253E-06 0.000189977 0.000546695
4700 2.36224968 0.1025656 0.0040689 0.000104667 1.8523E-06 1.05622E-06 1.1568E-07 4.47624E-06 0.000180609 0.005438924
4800 2.3888349 0.1037199 0.0041147 0.000105845 1.87248E-06 1.0798E-06 4.41512E-07 5.28378E-06 0.000241575 0.003199928
4900 2.41517943 0.1048638 0.0041601 0.000107012 1.8949E-06 1.08207E-06 2.55727E-07 7.07644E-06 0.000152577 0.00091531
5000 2.44129067 0.1059975 0.0042051 0.000108169 1.91411E-06 1.07736E-06 1.50204E-07 2.27897E-06 9.218E-05 0.001154325
5100 2.46717565 0.1071214 0.0042497 0.000109316 1.93538E-06 1.09976E-06 1.37604E-07 1.99444E-06 8.76439E-05 0.001577826
5200 2.49284106 0.1082357 0.0042939 0.000110453 1.95465E-06 1.11534E-06 4.95586E-07 4.35888E-06 0.000204505 0.000216998
5300 2.51829325 0.1093408 0.0043377 0.000111581 1.9747E-06 1.12386E-06 9.1218E-08 3.82642E-06 1.85431E-05 0.000448467
5400 2.54353831 0.1104369 0.0043812 0.000112699 1.99638E-06 1.12376E-06 1.6732E-07 1.43533E-06 7.21663E-06 0.003612179
5500 2.56858201 0.1115243 0.0044244 0.000113809 2.01386E-06 1.15022E-06 8.81761E-09 3.65397E-06 2.20605E-05 0.00077515
5600 2.59342988 0.1126032 0.0044672 0.00011491 2.03342E-06 1.12651E-06 4.47986E-08 3.21684E-06 2.33482E-05 0.001756197
5700 2.6180872 0.1136737 0.0045096 0.000116002 2.05358E-06 1.16881E-06 1.50587E-07 5.29849E-06 0.000244013 0.005939437
5800 2.64255902 0.1147363 0.0045518 0.000117087 2.07171E-06 1.17048E-06 2.29409E-07 2.70208E-07 0.000133968 0.001482933
5900 2.66685017 0.115791 0.0045936 0.000118163 2.08982E-06 1.18563E-06 2.83756E-07 2.38848E-06 1.25023E-05 0.000646034
6000 2.69096527 0.116838 0.0046352 0.000119231 2.11001E-06 1.19948E-06 6.95733E-08 2.75324E-06 0.000227365 0.004405367
6100 2.71490876 0.1178776 0.0046764 0.000120292 2.12756E-06 1.18491E-06 7.1459E-07 6.18E-06 0.0001608 0.000134149
6200 2.7386849 0.1189099 0.0047174 0.000121346 2.14822E-06 1.24245E-06 5.22106E-07 3.34301E-06 6.99771E-05 0.004137519
6300 2.76229776 0.1199352 0.004758 0.000122392 2.16562E-06 1.21553E-06 1.14103E-07 8.72372E-06 0.000127231 0.0021953
6400 2.78575126 0.1209535 0.0047984 0.000123431 2.18491E-06 1.24221E-06 3.18527E-08 1.58122E-06 3.44063E-05 0.001282337
6500 2.80904918 0.121965 0.0048386 0.000124463 2.20313E-06 1.24762E-06 3.66997E-07 4.66761E-07 6.8376E-05 0.002324199
6600 2.83219513 0.12297 0.0048784 0.000125489 2.22214E-06 1.26348E-06 4.4041E-08 1.98513E-06 1.63223E-06 0.002255515
6700 2.85519261 0.1239685 0.004918 0.000126508 2.23948E-06 1.24324E-06 3.33579E-07 3.17057E-06 0.000328399 0.004815315
6800 2.87804496 0.1249607 0.0049574 0.00012752 2.25733E-06 1.3006E-06 4.6483E-09 4.36208E-06 0.000140154 0.003104104
6900 2.90075542 0.1259468 0.0049965 0.000128527 2.27451E-06 1.28335E-06 1.93306E-08 3.43592E-06 0.000137631 0.002593771
7000 2.92332711 0.1269268 0.0050354 0.000129527 2.29299E-06 1.30071E-06 1.95398E-07 8.92851E-06 7.4234E-05 0.00065843
7100 2.94576303 0.127901 0.005074 0.000130521 2.30923E-06 1.29075E-06 2.79427E-07 1.86905E-07 0.000124533 0.000487677
7200 2.96806608 0.1288693 0.0051125 0.000131509 2.3278E-06 1.32132E-06 2.79757E-07 3.29732E-06 8.75439E-05 0.003271838
7300 2.99023906 0.1298321 0.0051506 0.000132492 2.34406E-06 1.31272E-06 3.53056E-07 1.8991E-06 2.76892E-05 0.000303153
7400 3.01228468 0.1307892 0.0051886 0.000133468 2.3628E-06 1.3268E-06 1.66552E-07 4.22496E-06 0.000178384 0.002471266
7500 3.03420553 0.131741 0.0052264 0.00013444 2.3792E-06 1.35864E-06 1.23637E-07 1.9733E-06 8.87768E-05 0.000393109
7600 3.05600416 0.1326875 0.0052639 0.000135406 2.39536E-06 1.35321E-06 1.66658E-08 8.85741E-06 0.000298726 0.003689186
7700 3.07768299 0.1336288 0.0053013 0.000136366 2.4131E-06 1.35644E-06 1.4153E-07 9.48262E-06 1.22383E-05 0.002432808
7800 3.0992444 0.1345649 0.0053384 0.000137321 2.43002E-06 1.39414E-06 5.65015E-08 8.092E-06 0.000154784 0.002469869
7900 3.12069067 0.1354961 0.0053754 0.000138272 2.44668E-06 1.37796E-06 5.96778E-07 9.26185E-07 7.07419E-05 0.002410406
8000 3.14202402 0.1364224 0.0054121 0.000139217 2.46429E-06 1.40212E-06 2.79053E-07 2.01178E-06 6.6784E-05 0.000471847
8100 3.16324659 0.1373438 0.0054487 0.000140157 2.48094E-06 1.40384E-06 2.86868E-07 1.19269E-07 0.000100787 0.001924461
8200 3.18436045 0.1382605 0.005485 0.000141093 2.49647E-06 1.41854E-06 4.92085E-08 6.3302E-06 0.000102706 0.002230089
8300 3.20536763 0.1391726 0.0055212 0.000142023 2.51282E-06 1.43079E-06 2.0393E-07 1.8623E-07 0.000136037 0.00043491
8400 3.22627009 0.1400802 0.0055572 0.00014295 2.52933E-06 1.42107E-06 3.81287E-08 4.84839E-06 1.76924E-05 0.001694101
8500 3.24706971 0.1409833 0.005593 0.000143871 2.54635E-06 1.43972E-06 3.13492E-07 4.37958E-06 2.75247E-05 0.000588375
8600 3.26776835 0.141882 0.0056287 0.000144788 2.56296E-06 1.45154E-06 2.44274E-07 1.28272E-06 0.000141714 0.000962577
8700 3.28836778 0.1427764 0.0056642 0.000145701 2.57839E-06 1.47577E-06 2.06695E-07 3.23978E-06 6.4275E-05 0.001051698
8800 3.30886974 0.1436666 0.0056995 0.000146609 2.59515E-06 1.45032E-06 5.05723E-07 7.94438E-07 3.43534E-05 0.00409502
8900 3.32927593 0.1445526 0.0057346 0.000147514 2.60989E-06 1.47012E-06 4.94796E-07 2.39445E-06 4.72978E-05 0.001477317
9000 3.34958799 0.1454345 0.0057696 0.000148414 2.62684E-06 1.48823E-06 1.22938E-07 4.38195E-06 4.16915E-06 0.000578174
9100 3.36980749 0.1463124 0.0058045 0.000149309 2.64215E-06 1.49986E-06 1.87944E-07 8.80017E-06 0.000218002 0.000808508
9200 3.38993601 0.1471863 0.0058391 0.000150201 2.65658E-06 1.47845E-06 5.73093E-08 4.22398E-06 0.000239023 0.005187743
9300 3.40997504 0.1480564 0.0058736 0.000151089 2.67554E-06 1.50373E-06 4.40945E-08 2.49215E-06 0.000103974 0.000545306
9400 3.42992606 0.1489227 0.005908 0.000151973 2.68934E-06 1.51377E-06 5.8158E-08 2.78169E-07 0.00026889 0.004696579
9500 3.44979048 0.1497851 0.0059422 0.000152853 2.70639E-06 1.54365E-06 9.05062E-08 4.03426E-06 6.22394E-05 0.003859171
9600 3.46956971 0.1506439 0.0059763 0.00015373 2.71907E-06 1.5268E-06 1.1047E-08 6.83924E-06 0.000173864 0.001356042
9700 3.48926511 0.1514991 0.0060102 0.000154602 2.7348E-06 1.54098E-06 3.49678E-07 7.50463E-06 0.000118042 0.000742363
9800 3.50887797 0.1523506 0.006044 0.000155471 2.75149E-06 1.54427E-06 3.49226E-07 2.04832E-06 0.000156228 0.001539872
9900 3.52840961 0.1531987 0.0060776 0.000156337 2.7667E-06 1.55745E-06 3.10397E-07 2.25483E-06 0.000155873 0.002012802
10000 3.54786126 0.1540432 0.0061111 0.000157199 2.78148E-06 1.54798E-06 7.74382E-07 6.55886E-06 3.25734E-05 0.00066004
Avg. Error 2.32857011 0.1011033 0.0040109 0.000103174 1.82586E-06 1.03195E-06 2.19888E-07 3.85479E-06 0.00010799 0.001843796
MATLAB CODE USED ON THE PROBLEM 1

%% Numerical Inversion using Gaver-Stehfest Algorithm [MATLAB]

% Advisor : Prof. Asep K. Permadi, Ph.D

% Code Written by : Billal Aslam, M.T.

% Modified by : Babas Samudera Hafwandi

% Revision History : (1) 30 January 2020 - first created

%****************************************************************************

% Purpose : Numerically inverse flow solution from Laplace Domain

% using Gvr-Sthfst Algorithm.

% Program Features : Provide comparison with exact solution from

% [0] Simple Exponential Functions

% [1] Transient Bilinear flow in fractured well

% [2] Transient radial flow in no-flow bounded reservoir

%****************************************************************************

clc;

clearvars;

close all;

%% Main Calculation (Analytically Derived Solution/Numerical LT Inverse)

t = 0:1000:10000000; %time interval

n = 20; %stehfest sum (must be EVEN!)

f=zeros(size(t,2),1);

G=zeros(size(t,2),1);

abse=zeros(size(t,2),1);

for i=1:size(t,2)

%f(i) = feval('fun2',t(i)); %Analytical function

G(i) = gavsteh('Lfun3',t(i),n); %Inverse Laplace function

%abse(i)=abs(G(i)-f(i)); %Absolute error


end

%% Plot Setting

figure

% Cartesian plot (function #1 & #2)

% plot(t,f,'o'); hold on

% plot(t,G,'LineWidth',2);

% xlabel('t'); ylabel('f(t)');

%legend('analytic','GS approximation');

% figure

% plot(t,abse);

%log log plot (function #3)

loglog(t,G,'LineWidth',2);

xlabel('tD'); ylabel('pD(tD)');

title('pD(tD) for rD = 300')

%% Function Libraries

function f=fun1(t)

%simple function

f=exp(-t);

end

function f=Lfun1(s)

f=1/(s+1);

end

function f=fun2(t)

%Exact Solution of Pwf in bilinear transient flow fractured well

Pi = 1000;

mu = 18;

q = 3000;

L = 0.1;

H = 5;

D = 2e-8;
k = 5;

C = mu*q/(2*k*L*H);

f=Pi-C*sqrt(D*t/pi());

end

function f=Lfun2(s)

%Laplace Domain Solution of Pwf in bilinear transient flow fractured well

Pi = 1000;

mu = 18;

q = 3000;

L = 0.1;

H = 5;

D = 2e-8;

k = 5;

C = mu*q/(2*k*L*H);

f=(Pi/s)-(0.5*C*sqrt(D)*s^(-3/2));

end

function f=Lfun3(s)

%Laplace Domain Solution of PD in const. rate radial bounded reservoir

rD=100;

reD=1000;

f=(1/s^1.5)*((besselk(1,reD*sqrt(s))*besseli(0,rD*sqrt(s)))+...

(besseli(1,reD*sqrt(s))*besselk(0,rD*sqrt(s))))/...

(besseli(1,reD*sqrt(s))*besselk(1,sqrt(s))-...

besselk(1,reD*sqrt(s))*besseli(1,sqrt(s)));

end

%% Laplace Transform Inversion Subroutine

% ilt=gavsteh(funname,t,L)

%
% funname The name of the function to be transformed.

% t The transform argument (usually a snapshot of time).

% ilt The value of the inverse transform

% L number of coefficient ---> depends on computer word length used

% (examples: L=8, 10, 12, 14, 16, so on..)

% Wahyu Srigutomo

% Physics Department, Bandung Institute of Tech., Indonesia, 2006

% Numerical Inverse Laplace Transform using Gaver-Stehfest method

%References:

% 1. Stehfest, H., 1970, Algorithm 368: Numerical inversion of Laplace transform,

% Communication of the ACM, vol. 13 no. 1 p. 47-49

function ilt=gavsteh(funname,t,L)

nn2 = L/2;

%nn21= nn2+1;

for n = 1:L

z = 0.0;

for k = floor( ( n + 1 ) / 2 ):min(n,nn2)

z = z + ((k^nn2)*factorial(2*k))/ ...

(factorial(nn2-k)*factorial(k)*factorial(k-1)* ...

factorial(n-k)*factorial(2*k - n));

end

v(n)=(-1)^(n+nn2)*z;

end

sum = 0.0;

ln2_on_t = log(2.0) / t;

for n = 1:L

p = n * ln2_on_t;

sum = sum + v(n) * feval(funname,p);

end

ilt = sum * ln2_on_t;


end

You might also like