-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5_1.py
101 lines (78 loc) · 2.31 KB
/
5_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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
from math import *
import numpy as np
#given parameters
Ur = 150 #[m/s]
Um = 200 #[m/s]
Ut = 250 #[m/s]
deltaT = 20 #[K]
Va = 150 #[m/s]
work_done_factor = 0.93
reaction_m = 0.5
#constant
cp = 1005
gamma = 1.4
aux = gamma/(gamma-1)
R = 0.287
#calculate
#(a) air angles at root, mean and tip
#(b) degree of reaction at root and tip
#free vortex design
root_coeff1 = deltaT*cp/(work_done_factor*Ur*Va)
mean_coeff1 = deltaT*cp/(work_done_factor*Um*Va)
tip_coeff1 = deltaT*cp/(work_done_factor*Ut*Va)
reaction_tip = 1 - (1/((Ut/Um)**2))*(1-reaction_m)
reaction_root = 1 - (1/((Ur/Um)**2))*(1-reaction_m)
print(reaction_root)
print(reaction_tip)
root_coeff2 = (reaction_root-1)*(-2)*Ur/Va
tip_coeff2 = (reaction_tip-1)*(-2)*Ut/Va
mean_coeff2 = (reaction_m-1)*(-2)*Um/Va
Am = np.array([[-1,1],[1,1]])
Bm = np.array([mean_coeff1,mean_coeff2])
Ar = np.array([[-1,1],[1,1]])
Br = np.array([root_coeff1,root_coeff2])
At = np.array([[-1,1],[1,1]])
Bt = np.array([tip_coeff1,tip_coeff2])
solution_t = np.linalg.solve(At, Bt)
solution_m = np.linalg.solve(Am, Bm)
solution_r = np.linalg.solve(Ar, Br)
alpha1_t = degrees(atan(solution_t[0]))
alpha1_r = degrees(atan(solution_r[0]))
alpha1_m = degrees(atan(solution_m[0]))
alpha2_t = degrees(atan(solution_t[1]))
alpha2_r = degrees(atan(solution_r[1]))
alpha2_m = degrees(atan(solution_m[1]))
beta2_m = alpha1_m
beta1_m = alpha2_m
root_coeff3 = reaction_root*2*Ur/Va
tip_coeff3 = reaction_tip*2*Ut/Va
Ar = np.array([[1,-1],[1,1]])
Br = np.array([root_coeff1,root_coeff3])
At = np.array([[1,-1],[1,1]])
Bt = np.array([tip_coeff1,tip_coeff3])
solution_t = np.linalg.solve(At, Bt)
solution_r = np.linalg.solve(Ar, Br)
beta1_t = degrees(atan(solution_t[0]))
beta1_r = degrees(atan(solution_r[0]))
beta2_t = degrees(atan(solution_t[1]))
beta2_r = degrees(atan(solution_r[1]))
print("Root:")
print("Alpha 1: ", alpha1_r)
print("Alpha 2: ", alpha2_r)
print("Beta 1: ", beta1_r)
print("Beta 2: ", beta2_r)
print("reaction: ", reaction_root)
print("-----------------")
print("Mean:")
print("Alpha 1: ", alpha1_m)
print("Alpha 2: ", alpha2_m)
print("Beta 1: ", beta1_m)
print("Beta 2: ", beta2_m)
print("reaction: ", reaction_m)
print("-----------------")
print("Tip:")
print("Alpha 1: ", alpha1_t)
print("Alpha 2: ", alpha2_t)
print("Beta 1: ", beta1_t)
print("Beta 2: ", beta2_t)
print("reaction: ", reaction_tip)