how to make velocity triangle in python ?
from math import *
from matplotlib.pyplot import *
from numpy import *
cbl = 400 # blade velocity
c1 = 1200 # steam velocity at inlet
a = 20 # nozzle blade angle
k =0.8 #blade velocity coefficient
cw1 = c1 * cos(radians(a)) # cw1 curl velocity at entrance
cf1 = c1 * sin(radians(a)) # flow velocit at entrance
b1 = cw1 - cbl # difference between curl velocity and blade velocity
cwr = (b1**2+cf1**2)**0.5 # curl velocity at exit
d = degrees(atan(cf1/b1)) # angle
cr2 = k*cwr # relative velocity at exit
bw2 = cr2*cos(radians(d))
cf2 = cr2 *sin(radians(d)) # flow velocity at exit
# x =([0,cbl,-cw1,0,bw2,cbl])
# y =([0, 0 , cf1,0,cf2,0])
plot([0,cbl],[0,0],label= "C bl")
plot([cbl,-cw1],[0,cf1],label = "blade velocity")
plot([-cw1,0],[cf1,0],label = "v_1 relative velocity")
plot([0,bw2],[0,cf2],label ="velocit at exit")
plot([bw2,cbl],[cf2,0],label= "relative v2")
legend()
axis('equal')
show()
# please support us
from math import *
from matplotlib.pyplot import *
from numpy import *
cbl = 400 # blade velocity
c1 = 1200 # steam velocity at inlet
a = 20 # nozzle blade angle
k =0.8 #blade velocity coefficient
cw1 = c1 * cos(radians(a)) # cw1 curl velocity at entrance
cf1 = c1 * sin(radians(a)) # flow velocit at entrance
b1 = cw1 - cbl # difference between curl velocity and blade velocity
cwr = (b1**2+cf1**2)**0.5 # curl velocity at exit
d = degrees(atan(cf1/b1)) # angle
cr2 = k*cwr # relative velocity at exit
bw2 = cr2*cos(radians(d))
cf2 = cr2 *sin(radians(d)) # flow velocity at exit
# x =([0,cbl,-cw1,0,bw2,cbl])
# y =([0, 0 , cf1,0,cf2,0])
plot([0,cbl],[0,0],label= "C bl")
plot([cbl,-cw1],[0,cf1],label = "blade velocity")
plot([-cw1,0],[cf1,0],label = "v_1 relative velocity")
plot([0,bw2],[0,cf2],label ="velocit at exit")
plot([bw2,cbl],[cf2,0],label= "relative v2")
legend()
axis('equal')
show()
# please support us

0 Comments