-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuture-fetkovich.py
77 lines (56 loc) · 2.52 KB
/
future-fetkovich.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
from src.future_ipr import OilWell
from src.ipr import eq
import matplotlib.pyplot as plt
def separate_line():
print()
# Let's test on creating our first performance
reservoir_pressure = 1224.9
production_data = OilWell(reservoir_pressure)
production_data.water_cut = 0.3
production_data.future_water_cut = 0.3
production_data.production_change = 0.2
production_data.future_p_res = reservoir_pressure * (1 - production_data.production_change)
# Initial testing in repr production instance
print(repr(production_data))
separate_line()
# Add several data on the production instance
production_cases = [
{ "q": 1361, "p": 680.5 },
]
production_data.insert_data(production_cases)
print("Here is the production data:")
print(production_data.data)
separate_line()
# Another testing in repr production instance
print(repr(production_data))
separate_line()
production_data.insert_future_data("fetkovich", production_data.data)
print(production_data.future_data)
# Using Fetkovich Equation for calculating
## max flow rate using single data
for data in production_data.data:
print("q: %d, p: %d" % (data["q"], data["p"]))
j_present = round(production_data.calculate_present_pi("fetkovich", data), 2)
q_max = round(production_data.calculate_q_max("fetkovich", reservoir_pressure, data), 2)
j_future = round(production_data.calculate_future_pi("fetkovich", data), 2)
future_q = round(production_data.calculate_future_q("fetkovich", data), 2)
print(future_q)
future_q_max = production_data.calculate_future_q("fetkovich", {
"q": future_q,
"p": production_data.data[-1]["p"]
})
print("Current Production Index (PI) (j_p): " + str(j_present))
print("Reservoir pressure at present condition: " + str(reservoir_pressure))
print("Pressure at present condition: " + str(production_data.data[0]["p"]))
print("Flow rate at present condition: " + str(production_data.data[0]["q"]))
print("Max flow rate using Fetkovich equation (present) (stbd): " + str(q_max))
separate_line()
print("Future Production Index (PI) (j_f): " + str(j_future))
print("Reservoir pressure at future condition: " + str(production_data.future_p_res))
print("Flow rate at future condition: " + str(future_q))
print("Max flow rate using Fetkovich equation (future) (stbd): " + str(future_q_max))
# plt.scatter(production_data.data[0]["q"], production_data.data[0]["p"], label="a")
# plt.scatter(q_max, 0, label="b")
# plt.scatter(future_q, 680.5 * 0.8, label="c")
# plt.legend()
# plt.show()