In [1]:

```
#calculate the Final velocity and percentage reduction in velocity
#Input data
P1=12.;#Pressure of Dry saturated steam entering a steam nozzle in bar
P2=1.5;#Discharge pressure of Dry saturated steam in bar
f=0.95;#Dryness fraction of the discharged steam
l=12.;#Heat drop lost in friction in percentage
hg1=2784.8;#Specific enthalpy of steam at 12 bar from steam tables in kJ/kg
hg2=2582.3;#Specific enthalpy of 0.95 dry steam at 1.5 bar from steam tables in kJ/kg
#Calculations
hd=hg1-hg2;#Heat drop in kJ/kg
V1=44.72*(hd)**(0.5);#Velocity of steam at discharge from the nozzle in m/s
n=1-(l/100.);#Nozzle coefficient when 12 percent heat drop is lost in friction
V2=44.72*(n*hd)**(0.5);#Velocity of steam in m/s
percentV=((V2-550.)/V2)*100;#Percentage reduction in velocity
#Output
print '(a)Final velocity of steam is (m/s) = ',round(V2,2)
print '(b)Percentage reduction in velocity is (percent) = ',round(percentV,2)
```

In [2]:

```
#calculate the mass of steam
#Input data
P1=12.;#Initial pressure of dry saturated steam expanded in a nozzle in bar
P2=0.95;#Final pressure of dry saturated steam expanded in a nozzle in bar
f=10.;#Frictional loss in the nozzle of the total heat drop in percentage
d=12.;#Exit diameter of the nozzle in mm
hd=437.1;#Heat drop in kJ/kg from steam tables
q=0.859;#Dryness fraction of steam at discharge pressure
vg=1.777;#Specific volume of dry saturated steam at 0.95 bar
#Calculations
n=1.-(f/100.);#Nozzle coefficient from moiller chart
V2=44.72*(n*hd)**(0.5);#Velocity of steam at nozzle exit in m/s
A=(3.14/4)*(0.012)**(2);#Area of the nozzle at the exit in mm**2
m=((A*V2)/(q*vg))*3600;#Mass of steam discharged through the nozzle per hour in kg/hour
#Output
print 'Velocity (m/s) = ',round(V2,2)
print 'The mass of steam discharged,when the exit diameter of the nozzle is 12mm is (kg/hour) = ',round(m,2)
print 'The answers given in textbook are wrong. Please check using a calculator'
```

In [3]:

```
#calculate the throat area of steam and exit area,exit velocity
#Input data
P1=12.;#Inlet pressure of steam nozzle in bar
T1=250.;#Inlet temperature of steam nozzle in degrees celcius
P2=2.;#Final pressure of the steam nozzle in bar
n=1.3;#Polytropic constant for superheated steam
St=6.831;#For isentropic expansion, entropy remains constant in kJ/kg
h1=2935.4#Enthalpy of steam at P1 from steam table in kJ/kg
ht=2860.;#Enthalpy of steam at pt in kJ/kg
vt=0.325;#Specific volume of steam at the throat conditions in m**3/kg
m=0.2;#Mass of steam discharged through the nozzle in kg/hour
q=0.947;#The dryness fraction of steam at exit from steam tables
hg=2589.6;#Enthalpy of steam at exit in kJ/kg
vs=0.8854;#Specific volume of saturated steam in m**3/kg
#Calculations
pt=(P2/(n+1))**(n/(n-1))*P1;#Critical pressure ratio i.e.,Throat pressure in bar
Vt=(2*1000*(h1-ht))**(0.5);#Velocity of steam at throat in m/s
At=((m*vt)/Vt)*10**4;#Area of the throat in cm**2 from continuity equation
ve=q*vs;#Specific volume of steam at exit in m**3/kg
Ve=(2*1000*(h1-hg))**(0.5);#Velocity of steam at nozzle exit in m/s
Ae=((m*ve)/Ve)*10**4;#Exit area in cm**2
#Output
print '(a)Throat area of steam nozzle is (cm^2) = ',round(At,3)
print '(b)Exit area of steam nozzle is (cm^2) = ',round(Ae,3)
print '(c)Exit velocity of the nozzle is (m/s) = ',round(Ve,2)
```

In [4]:

```
#calculate the Final exit velocity, Cross sectional area
#Input data
P1=10.;#Pressure of steam in bar
f=0.9;#Dryness fraction of steam
At=350.;#Throat area in mm**2
Pb=1.4;#Back pressure in bar
h1=2574.8;#Enthalpy of steam at nozzle inlet from steam tables in kJ/kg
ft=0.87;#Dryness fraction of steam at throat pressure
fe=0.81;#Dryness fraction of steam at exit pressure
ht=2481.;#Enthalpy of steam at throat pressure at ft in kJ/kg
vt=0.285;#Specific volume of steam at throat in m**3/kg
he=2266.2;#Enthalpy of steam at exit conditions in kJ/kg
ve=1.001;#Specific volume of steam at exit conditions in m**3/kg
#Calculations
Pt=0.582*P1;#Steam pressure at the throat in bar
hd=h1-ht;#Enthalpy drop upto the throat in kJ/kg
Vt=44.7*(hd)**(0.5);#Velocity of steam at the throat in m/s
hde=h1-he;#Enthalpy drop from nozzle entrance to exit in kJ/kg
Ve=44.7*(hde)**(0.5);#Velocity of steam at nozzle exit in m/s
Ae=(At*Vt*ve)/(Ve*vt);#Exit area of nozzle from the mass rate of flow equation in mm**2
#Output
print '(a)Final exit velocity of steam is (m/s) = ',round(Ve,1)
print '(b)Cross sectional area of the nozzle at exit for maximum discharge is (mm^2) = ',round(Ae,0)
```

In [5]:

```
#calculate the Velocity of steam at throat, temperature and cone angle
#Input data
import math
P1=7.;#Inlet pressure of a convergent divergent steam nozzle in bar
T1=275.;#Inlet temperature of the nozzle in degrees celcius
P2=1.;#Discharge pressure of steam in bar
l=60.;#Length of diverging portion of the nozzle in mm
dt=6.;#Diameter of the throat in mm
f1=10.;#Percent of total available enthalpy drop lost in friction in the diverging portion in percentage
h1=3006.9;#Enthalpy of steam at 7bar pressure and 275 degrees celcius in kJ/kg
ht=2865.9;#Enthalpy at the throat from Moiller chart in kJ/kg
he=2616.7;#Enthalpy at the exit from moiller chart in kJ/kg
vt=0.555;#Specific volume of steam at throat in m**3/kg
Tt=202.8;#Temperature of steam at throat in degrees celcius from moiller chart
ve=1.65;#Volume of steam at exit in m**3/kg
#Calculations
Pt=0.546*P1;#The throat pressure for maximum discharge in bar
hd=h1-ht;#Enthalpy drop upto throat in kJ/kg
Vt=44.7*(hd)**(0.5);#Velocity of steam at throat in m/s
hid=h1-he;#Total isentropic drop from 7 bar,275 degrees celcius to 1 bar in kJ/kg
hda=(1-(f1/100.))*(hid);#Actual heat drop in kJ/kg
Ve=44.7*(hda)**(0.5);#Velocity at exit in m/s
At=(3.14/4)*(6./1000)**(2);#Throat area of the nozzle in m**2
m=(At*Vt)/vt;#Mass flow rate at nozzle throat in kg/s
Ae=((m*ve)/Ve)*10**4;#Exit area of the nozzle in cm**2
de=(((Ae*4)/3.14)**(0.5))*10;#Diameter of the nozzle at exit in mm
alpha=math.atan((de-dt)/(2*60))*180/math.pi;#Half of the cone angle of the nozzle in degrees
alpha1=2*alpha;#Cone angle of the nozzle in degrees
#Output
print '(a)Velocity of steam at throat is (m/s) = ',round(Vt,0)
print '(b)Temperature of steam at the throat is (degrees celcius) =',Tt
print '(c)Cone angle of the divergent portion is (degrees) =',round(alpha1,3)
```