In [1]:

```
from __future__ import division
#input data
Nm=1000#Speed of the model in rpm
Hm=8#Head of the model in m
Pm=30#Power of the model in kW
Hp=25#Head of the prototype in m
DmDp=1/5#The scale of the model to original
#calculations
Np=((Hp/Hm)**(1/2))*(DmDp)*(Nm)#Speed of the prototype in rpm
Pp=(Pm)*((1/DmDp)**(5))*(Np/Nm)**(3)#Power developed by the prototype in kW
QpQm=((1/DmDp)**(3))*(Np/Nm)#Ratio of the flow rates of two pump(model and prototype)
#output
print '(1)Speed of prototype pump is %3.1f rpm\n(2)Power developed by the prototype pump is %3i kW\n(3)Ratio of the flow rates of two pumps is %3.4f'%(Np,Pp,QpQm)
```

In [2]:

```
#input data
Hp=85#Head of the prototype in m
Qp=(20000/3600)#Flow rate of the prototype in m**3/s
Np=1490#Speed of the prototype in rpm
Dp=1.2#Diameter of the prototype in m
dp=714#Density of the prototype fluid in kg/m**3
Pp=4#Power of the prototype in MW
Pm=500*10**-3#Power of the model in MW
Qm=0.5#Flow rate of the prototype in m**3/s
dm=1000#Density of the model fluid (water) in kg/m**3
#calculations
NpNm=(Qp/Qm)#Ratio of the speeds of the prototype and the model in terms of (Dm/Dp)**(3)
DmDp=1/(((NpNm)**(3))*(dp/dm)*(Pm/Pp))**(1/4)#The ratio of the diameters of model and the prototype or the scale ratio
NmNp=1/(NpNm*((DmDp)**(3)))#The speed ratio or the ratio of speeds of the model and the prototype
HmHp=((1/NmNp)**(2))*((1/DmDp)**(2))#The head ratio or the ratio of heads of the model and the prototype
#output
print '(1)The head ratio of the model is %3.1f\n(2)The speed ratio of the model is %3.1f\n(3)The scale ratio of the model is %3.1f'%(HmHp,NmNp,DmDp)
# Answer in the textbook is wrong
```

In [3]:

```
#input data
Np=400#The speed of the prototype in rpm
Qp=1.7#The discharge of the prototype in m**3/s
Hp=36.5#The head of the prototype in m
Pp=720#The power input of the prototype in kW
Hm=9#The head of the model in m
DmDp=1/6#The scale of model to prototype
#calculations
Nm=((Hm/Hp)**(1/2))*(1/DmDp)*Np#Speed of the model in rpm
Qm=((DmDp)**(3))*(Nm/Np)*(Qp)#Discharge of the model in m**3/s
Pm=((DmDp)**(5))*((Nm/Np)**(3))*Pp#Power required by the model in kW
#output
print '(a)Speed of the model is %3.2f rpm\n(b)Discharge of the model is %3.4f m**3/s\n(c)Power required by the model is %3.2f kW'%(Nm,Qm,Pm)
```

In [4]:

```
#input data
N1=1000#The running speed of the pump-1 in rpm
D1=0.3#The impeller diameter of pump-1 in m
Q1=0.02#The discharge of pump-1 in m**3/s
H1=15#The head developed by the pump-1 in m
N2=1000#The running speed of the pump-2 in rpm
Q2=0.01#The discharge of pump-2 in m**3/s
#calculations
D2=(((Q2/Q1)*(N1/N2))**(1/3))*(D1)#Impeller diameter of the pump-2 in m
H2=(((D2/D1)*(N2/N1))**(2))*(H1)#Head developed by the pump-2 in m
#output
print '(a)Impeller diameter of the pump-2 is %3.3f m\n(b)Head developed by the pump-2 is %3.2f m'%(D2,H2)
```

In [5]:

```
#input data
DmDp=1/10#The model ratio to prototype
Pm=1.84#Power developed by the model in kW
Hm=5#Head developed by the model in m
Nm=480#Speed of the model in rpm
Hp=40#Head developed by the prototype in m
#calculations
Np=((Hp/Hm)**(1/2))*(DmDp)*(Nm)#Speed of the prototype in rpm
Pp=((1/DmDp)**(5))*((Np/Nm)**(3))*Pm#Power developed by the prototype in kW
Nsp=((Np*((Pp)**(1/2)))/((Hp)**(5/4)))#Specific speed of the prototype
Nsm=((Nm*((Pm)**(1/2)))/((Hm)**(5/4)))#Specific speed of the prototype
#output
print '(a)Power developed by the prototype is %3i kW\n(b)Speed of the prototype is %3.2f rpm\n(c)Specific speed of the prototype is %3.1f\n(d)Specific speed of the model is %3.1f\n Thus the specific speed of the model is equal to the prototype and thus it is verified'%(Pp,Np,Nsp,Nsm)
```

In [6]:

```
from __future__ import division
#input data
DmDp=1/10#The model ratio to prototype
Hm=5#The head developed by the model in m
Hp=8.5#The head developed by the prototype in m
Pp=8000*10**3#The power developed by the prototype in W
Np=120#The speed of running of the prototype in rpm
d=1000#density of the water in kg/m**3
g=9.81#Acceleration due to gravity in m/s**2
n0=0.85#Overall efficiency of the prototype
#calculations
Nm=((Hm/Hp)**(1/2))*(1/DmDp)*(Np)#Speed of the mpdel in rpm
Qp=Pp/(d*g*n0*Hp)#Discharge from the prototype in m**3/s
Qm=((DmDp)**(3))*(Nm/Np)*(Qp)#Discharge from the model in m**3/s
Pm=((DmDp)**(5))*((Nm/Np)**(3))*(Pp)*10**-3#Power of the model in kW
#output
print '(a)Speed of the model is %3.1f rpm\n(b)Discharge from the model is %3.3f m**3/s\n(c)Power of the model is %3.1f kW'%(Nm,Qm,Pm)
```

In [7]:

```
#input data
P1=6600#Initial power developed by the turbine in kW
N1=100#Initial speed of the turbine in rpm
H1=30#Initial head of the turbine in m
H2=18#Final head of the turbine in m
#calculations
N2=N1*((H2/H1)**(1/2))#The final speed of the turbine in rpm
P2=P1*((H2/H1)**(3/2))#The final power developed by the turbine in kW
#output
print '(1)The final speed of the turbine is %3.2f rpm\n(2)The final power developed by the turbine is %3i kW'%(N2,P2)
```

In [8]:

```
#input data
H1=25#The initial head on the turbine in m
N1=200#The initial speed of the turbine in rpm
Q1=9#The initial discharge of the turbine in m**3/s
n0=0.9#Overall efficiency of the turbine
H2=20#The final head on the turbine in m
d=1000#density of the water in kg/m**3
g=9.81#Acceleration due to gravity in m/s**2
#calculations
N2=N1*((H2/H1)**(1/2))#The final speed of the turbine in rpm
Q2=Q1*((H2/H1)**(1/2))#The final discharge of the turbine in m**3/s
P1=n0*d*g*Q1*H1*10**-3#Power produced by the turbine initially in kW
P2=P1*((H2/H1)**(3/2))#Power produced by the turbine finally in kW
#output
print '(a)The final speed of the turbine is %3.2f rpm\n(b)The final discharge of the turbine is %3.2f m**3/s\n(c)Power produced by the turbine initially is %3.3f kW\n(d)Power produced by the turbine finally is %3.2f kW'%(N2,Q2,P1,P2)
```

In [9]:

```
#input data
P1=5000*10**3#The initial power produced in W
H1=250#The initial head produced in m
N1=210#The initial speed of turbine in rpm
n0=0.85#Overall efficiency of the turbine
H2=160#The final head produced in m
d=1000#density of the water in kg/m**3
g=9.81#Acceleration due to gravity in m/s**2
#calculations
Nu=N1/((H1)**(1/2))#The unit speed of the turbine
Pu=P1/((H1)**(3/2))*10**-3#The unit power of the turbine
Q1=P1/(d*g*n0*H1)#The initial discharge of the turbine in m**3/s
Qu=Q1/((H1)**(1/2))#The unit discharge of the turbine
Q2=Qu*((H2)**(1/2))#The final discharge of the turbine in m**3/s
N2=Nu*((H2)**(1/2))#The final speed of the turbine in rpm
P2=Pu*((H2)**(3/2))#The final power of the turbine in kW
Ns=(N2*((P2)**(1/2)))/((H2)**(5/4))#The specific speed of the turbine
#output
print '(a)The unit speed of the turbine is %3.2f\n(b)The unit power of the turbine is %3.3f\n(c)The unit discharge of the turbine is %3.3f\n(d)The final discharge of the turbine is %3.2f m**3/s\n(e)The final speed of the turbine is %3.2f rpm\n(f)The final power of the turbine is %3.1f kW\n(g)The specific speed of the turbine is %3.2f'%(Nu,Pu,Qu,Q2,N2,P2,Ns)
```