#calculate the exit area
#initialization of varaibles
import math
w=1 #lb/sec
v2=36.4
h1=1279.1 #B/lb
h2=1091.7 #B/lb
V1=100 #fps
#calculations
a2=w*v2/(math.sqrt(2*32.2*778*(h1-h2) + V1*V1)) #sq ft
a2=1.705 #sq in
#results
print '%s %.3f %s' %("Exit area =",a2,"sq. in")
#Calculate the throat area
#initialization of varaibles
import math
w=1 #lb/sec
k=1.3
P=100 #psia
#calculations
Pratio=math.pow((2/(k+1)),(k/(k-1)))
Pt=Pratio*P
print '%s' %("From table 3,")
ht=1221.5 #B/lb
vt=8.841 #cu ft/lb
at=w*vt/1700.
#results
print '%s %.4f %s' %("Throat area =",at,"sq ft")
#Calculate the Throat and exit areas for both frictionless and frictioned nozzles
#initialization of varaibles
import math
k=1.3
P=250 #psia
h0=1263.4 #B/lb
w=10000. #lb
cv=0.949
vts=3.415 #cu ft/lb
#calculations
Pratio=math.pow((2/(k+1)),(k/(k-1)))
Pt=Pratio*P
hts=1208.2 #B/lb
h2s=891 #B/lb
Vts=math.sqrt(2*32.2*778*(h0-hts))
w=w/3600. #lb/sec
at=w*vts/(Vts)
V2=cv*math.sqrt(2*32.2*778*(h0-h2s))
etan=cv*cv
h2=928. #B/lb
print '%s' %("From table 3,")
v2=276. #cu ft/lb
a2=w*v2/V2
a2s=0.17 #ft^2
Cw=0.98
at2=at/Cw
#results
print '%s %.5f %s' %("\n Throat area =",at,"ft^2")
print '%s %.3f %s' %("\n Exit area =",a2,"ft^2")
print '%s %.3f %s' %("\n For frictionless nozzle =",a2s,"ft^2")
print '%s %.5f %s' %("\n Changed throat area =",at2,"ft^2 and exit area is unchanged")
#calculate the Exit velocity, throat and exit areas
#initialization of varaibles
import math
w=1 #lb/sec
Pratio=0.53
k=1.4
T0=800. #R
cp=0.24
P0=150. #psia
P2=15. #psia
#calculations
Pt=Pratio*P0
Tratio=math.pow((Pratio),((k-1)/k))
Tts=T0*Tratio
Vts=math.sqrt(2*32.2*778*cp*(T0-Tts))
vts=53.34*Tts/(Pt*144.)
at=w*vts/(Vts)
T2s=T0*math.pow((Pt/P0),((k-1)/k))
T2=460. #R
V2=math.sqrt(2*32.2*cp*778*(T0-T2))
v2=53.34*T2/(144.*P2)
a2=w*v2/V2
#results
print '%s %d %s' %("Exit velocity =",Vts,"fps")
print '%s %.5f %s' %("\n Throat area =",at,"ft^2")
print '%s %.5f %s' %("\n Exit area =",a2,"ft^2")
#calculate the Exit velocity, throat and exit areas
#initialization of varaibles
import math
h0=191.81 #B/lb
Pr0=5.526
w=1 #lb/sec
Pratio=0.53
k=1.4
T0=800. #R
cp=0.24
P0=150. #psia
P2=15. #psia
Pt=79.5 #psia
#calculations
Prt=Pratio*Pr0
print '%s' %("From keenan and kaye steam tables,")
Pr=2.929
Tts=668 #R
hts=159.9 #B/lb
Vts=math.sqrt(2*32.2*778*(h0-hts))
vts=53.34*Tts/(Pt*144.)
at=w*vts/(Vts)
Pr2=P2*Pr0/P0
T2s=415 #R
h2s=99.13 #B/lb
h2=110.25 #B/lb
T2=462 #R
V2=math.sqrt(2*32.2*778*(h0-h2))
v2=53.34*T2/(144.*P2)
a2=w*v2/V2
#results
print '%s %d %s' %("Exit velocity =",Vts,"fps")
print '%s %.5f %s' %("\n Throat area =",at,"ft^2")
print '%s %.5f %s' %("\n Exit area =",a2,"ft^2")