In [3]:

```
from __future__ import division
head=205 #m(Mean Head)
A=1000 #km**2(Catchment area)
rf=125 #cm(Annual Rainfall)
a=80 #%(Available rainfall for power generation)
LF=75 #%(Load factor)
head_loss=5 #m(Head Loss)
Eta_turbine=0.9 #Efficiency of turbine
Eta_generator=0.95 #Efficiency of generator
#Calculation
WaterUsed=A*10**6*rf/100*a/100 #m**3/year(Discharge)
WaterUsed=WaterUsed/(365*24*60*60) #m**3/sec
Eff_Head=head-head_loss #m(Effective Head)
P=735.5/75*WaterUsed*Eff_Head*Eta_turbine*Eta_generator/1000 #MW(Load of station)
Ppeak=P/(LF/100) #MW(Peak Load )
print "MW rating of station = %0.2f MW"%Ppeak
#type ot turbine
if head>200:
print "Pelton turbine is more suitable because head>200 meter."
else:
print "Pelton turbine is not suitable"
```

In [4]:

```
WF=50 #m**3/sec(Water flow)
head=90 #m
LF=75 #%(Load factor)
Eta=90 #%(Efficiency of hydro plant)
L=5 #%(Transmission losses)
TC=350 #MW
hp=140 #MW#Hydro power
#Calculation
P=735.5/75*WF*head*Eta/100/1000 #MW(Power available)
Pnet=P*(100-L)/100 #MW#/Net Available hydro power
E=Pnet*24 #MW-hours##Hydro Energy
print "Available hydro energy = %0.2f MW-hours"%E
C1=hp/((100-L)/100) #MW#Capacity of hydro plant
print "Capacity of hydro plant = %0.2f MW "%C1
C2=TC-hp #MW#Capacity of thermal plant
print "Capacity of thermal plant = %0.2f MW "%C2
```

In [5]:

```
P1=700 #MW(Load for 14 hours)
P2=500 #MW(Load for 10 hours)
B22=0.0005 #Loss Coefficient
t1=14 #hour
t2=10 #hour
r2=2.5 #Rs/hour/(m**3/sec
#Characteristics of units :
#C1=(24+0.02*P1)*P1 #Rs./hour
#W2=(6+0.0025*P2)*P2 #m**3/sec
lamda=37.944 #Rs./MWh(For peak load conditions)
P1=348.6 #MW(For peak load conditions)
P2=454.84 #MW(For peak load conditions)
PL=103.44 #MW(For peak load conditions)
lambda_dash=31.73 #Rs./MWh(For peak load conditions)
P1_dash=193.25 #MW(For peak off conditions)
P2_dash=378.25 #MW(For peak off conditions)
PL_dash=71.50 #MW(For peak off conditions)
W=((6+0.0025*P2)*P2*t1+(6+0.0025*P2_dash)*P2_dash*t2)*3600/10**3 #m**3#D3ily water used
print "Daily water used by plant = %0.2f m**3" %W
C=(24+0.02*P1)*P1*t1+(24+0.02*P1_dash)*P1_dash*t2 #Rs.
print "Daily operating cost of plant = %0.2f Rs. "%C
```

In [7]:

```
from sympy import symbols, solve
t1=14 #hour(working hour of hydro station)
t2=24 #hour(Working hour of steam station)
#Characteristics of units :
#C=(5+8*Ps+0.05*Ps**2) #Rs./hour
#dW/dPh=30+0.05*Ph #m**3/MW-sec
W=500*10**6 #m**3(Water Quantity used)
Ps=250 #MW(Load on steam station)
lamda=8+0.1*Ps #Rs./MW-hour
#W=Ph*(30+0.05*Ph)*t1*3600 #
#0.05*Ph**2*t1*3600+Ph*30*t1*3600-W=0
Ph=symbols('Ph')
Ph=solve(0.05*Ph**2*t1*3600+Ph*30*t1*3600-W, Ph) #MW
Ph=Ph[1] #MW#Leaving negative root
print "Load on hydro plant = %0.2f MW"%Ph
r=lamda/(30+0.05*Ph) #Rs./hour/(m**3/sec)
print "Cost of water use = %0.2f Rs./hour/(m**3/sec)"%r
#Answer is slightly differ due to accuracy in calculations.
```