-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph-vogel-1.py
85 lines (62 loc) · 2.3 KB
/
graph-vogel-1.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
78
79
80
81
82
83
84
85
import numpy as np
import matplotlib.pyplot as plt
from src.ipr import TwoPhaseProduction
# Let's test on creating our first performance
reservoir_pressure = 1734
production1 = TwoPhaseProduction(reservoir_pressure)
# Add several data on the production instance
production_data = [
{ "q": 252, "p": 1653 },
{ "q": 516, "p": 1507 },
{ "q": 768, "p": 1335 },
]
for data in production_data:
production1.data.append(data)
# Get production graph interval
## Based on max flow obtained from Vogel eq.
test_production_data_2 = production1.data[0]
q_max_2 = production1.calculate_q_max("vogel", test_production_data_2)
iteration_2 = 12
production_graph = production1.get_production_graph(
"vogel",
q_max_2,
iteration_2
)
flowrate_x_2 = [data["q"] for data in production_graph]
pressure_y_2 = [data["p"] for data in production_graph]
plt.plot(flowrate_x_2, pressure_y_2, linestyle="dashed", linewidth=.75)
plt.scatter(flowrate_x_2, pressure_y_2, label=("p_wf = " + str(production1.data[0]["p"])))
# =========================
test_production_data_3 = production1.data[1]
q_max_3 = production1.calculate_q_max("vogel", test_production_data_3)
iteration_3 = 12
production_graph = production1.get_production_graph(
"vogel",
q_max_3,
iteration_3
)
flowrate_x_3 = [data["q"] for data in production_graph]
pressure_y_3 = [data["p"] for data in production_graph]
plt.plot(flowrate_x_3, pressure_y_3, linestyle="dashed", linewidth=.75)
plt.scatter(flowrate_x_3, pressure_y_3, label=("p_wf = " + str(production1.data[1]["p"])))
# =========================
test_production_data_1 = production1.data[2]
q_max_1 = production1.calculate_q_max("vogel", test_production_data_1)
iteration_1 = 12
production_graph = production1.get_production_graph(
"vogel",
q_max_1,
iteration_1
)
flowrate_x = [data["q"] for data in production_graph]
pressure_y = [data["p"] for data in production_graph]
plt.plot(flowrate_x, pressure_y, linestyle="dashed", linewidth=.75)
plt.scatter(flowrate_x, pressure_y, label=("p_wf = " + str(production1.data[2]["p"])))
# =========================
plt.xlim(0, q_max_3 + 1000)
plt.ylim(0, reservoir_pressure + 1000)
plt.title("Several IPRs for several wellbore pressures\nUsing Vogel equation")
plt.xlabel('Flow rate (stbd)')
plt.ylabel('Pressure (psia)')
plt.legend()
plt.show()