import math
# given data
rho=996 # density in kg/m^3
effi=0.55 # oveall efficiency
Q=100/1000.0 # discharge in m^3/sec
h=30 # gross head in m
g=9.81 # gravitational acceleration in m/sec^2
Pnet=effi*rho*Q*g*h/1000 # net power in watts
print "Power available is",round(Pnet,3),"kilowatts"
import math
# given data
pf=0.8 # power factor
Load=3 # load in kW
V=230 # voltage of kettle in V
P=500 # power of kettle in W
VA=pf*Load # VA load in kVA
C=4200 # specific heat of water in j/kg-K
T=45-20 # temperature difference in degree celsius
VAR=VA*1.6 # net required VAR rating thus 60% extra capacity
R=(V**2)/P # resistance by kettle in ohms
Po=7*(V**2)/R # power dissipation in W for 7 elements
print "7 elements are connected in parallel"
Q=Load*1000.0/(C*T) # flow rate in kg/sec
print"The required flow rate is ",round(Q,5),"litre/sec"