-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfetkovich.py
45 lines (33 loc) · 1003 Bytes
/
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
from src.ipr import TwoPhaseProduction
def separate_line():
print()
# Initial reservoir pressure
reservoir_pressure = 1734
production_data = TwoPhaseProduction(reservoir_pressure)
# Initial testing in repr production instance
print(repr(production_data))
separate_line()
# Add several data on the production instance
input_data = [
{ "q": 252, "p": 1653 },
{ "q": 516, "p": 1507 },
{ "q": 768, "p": 1335 },
]
for data in input_data:
production_data.data.append(data)
print("Here's the production data:")
print(production_data.data)
separate_line()
# Another testing in repr production instance
print(repr(production_data))
separate_line()
# 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"]))
print("Max flow rate using Fetkovich equation: " + str(
round(production_data.calculate_q_max(
"fetkovich",
data
), 2)
))