-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvogel.py
48 lines (35 loc) · 1.03 KB
/
vogel.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
from src.ipr import TwoPhaseProduction
def separate_line():
print()
# Let's test on creating our first performance
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
production_cases = [
{ "q": 252, "p": 1653 },
{ "q": 516, "p": 1507 },
{ "q": 768, "p": 1335 },
]
for data in production_cases:
production_data.data.append(data)
print("Here is the production data:")
print(production_data.data)
separate_line()
# Another testing in repr production instance
print(repr(production_data))
separate_line()
# Using Vogel 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 Vogel equation: " + str(
round(
production_data.calculate_q_max(
"vogel",
data
)
)
))