# Variables
b = 6. # m width
i = 1./1000 # slope
d = 2. # m, depth of water
C = 50 # Constant
# Calculations
A = b*d
m = A/(b+2*d)
Q = A*C*((i*m)**0.5)
# Results
print "flow rate assuming chezys consmath.tant eqaul to 50 in m3/sec",round(Q,4)
# Variables
b = 5. #m wide
d = 3. #m deep
i = 1./1000 #slope
C = 55. #constant
# Calculations
A = b*d
m = A/(b+2*d)
Q = A*C*((i*m)**0.5)
v = Q/A
# Results
print "flow rate assuming chezys constant eqaul to 55 in m3/sec & velocity of flow in m/sec : ",v,Q
# Variables
b = 2.5 #m wide
d = 2.5 #m depth
C = 56. #constant
A = b*(7.5+d)*0.5
# Calculations
P = 2.5+((b*b+d*d)**0.5)*2
m = A/P
i = 1./1200
Q = A*C*((m*i)**0.5)
# Results
print "the diacharge through the channel in litres/sec",round((Q*1000),4)
# note : rounding off error.
import math
# Variables
b = 3.5 #m, width
i = 1./1000 # slope
d = 1.5 #m, depth of flow
C = 60. # degree C
y = 60. #Constant
# Calculations
x = 1.5/math.tan(math.radians(y))
w = b+x*2
A = (w+b)*0.5*d
P = b+2*((x*x+d*d)**0.5)
m = A/P
Q = A*C*((m*i)**0.5)
# Results
print "discharge carried by the canal in litres/sec : %.2f"%(Q*1000)
# note : rounding off error.
# Variables
b = 9. #m, width
i = 1./3000 #slope
d = 1.2 #m, water depth
# Calculations
w = b+d
A = (w+b)*0.5*d
P = b+2*((d*d+d*d*0.25)**0.5)
m = A/P
C = 50.
V = C*((m*i)**0.5)
Q = V*A
# Results
print "average velocity of flow, rate of flow",round(V,7),round((Q*1000),3)
# Variables
Q = 0.1
b = 0.6 #m, width
C = 56 # constant
d = 0.3 #m, depth of flow
# Calculations
a = b*d
v = Q/a
p = b+2*d
m = a/p
i = (v*v)/(C*C*m)
k = a*C*(m**0.5)
# Results
print "bottom slope neccessary for uniform flow,conveyance of the channel section",round(i,7),round(k,7)
# Variables
i = 1./1000 #slope
d = 1.5 #m, depth of water
Cd = 0.55 #co-effient
a = d*d
C = 40. # constant
g = 9.81
# Calculations
m = d
Q = a*C*((d*i)**0.5)
H = (3*Q/(Cd*2*((2*g)**0.5)))**0.4
height = d+3-H
# Results
print "height of the dam in m",round(height,3)
# note : book answer is wrong. kindly check.
# Variables
b = 1.4 #m, width
d = 1.4 #m, depth
n = 1./4 # side slope
i = 1./700 #bad slope
# Calculations
N = 0.025
a = d*(b+(n*d))
p = b+(2*d*((n*n+1)**0.5))
m = a/p
q = (a*(m**0.6666)*(i**0.5))/N
# Results
print "discharge from the trapezoidal channel in litres/sec",round((q*1000),3)
# note : rounding off error.
# Variables
Q = 0.3 #m**3/s rate
D = 1.5 #m diameter
N = 0.02 #N
A = 3.142*D*D/(4*2)
p = 3.142*D/2
# Calculations
m = A/p
i = ((Q*N)/(A*(m**0.6666)))**2
# Results
print "the slope of the sewer",round(i,7)
import math
# Variables
D = 2.4 #m diameter
d = 1.5 #m, depth of water
i = 1./1500 #gradient
N = 0.02 # N Manning formula
# Calculations
a = (d-(D/2))/(D/2)
z = math.degrees(math.acos(a))
z1 = math.radians(180 - z)
P = D*z1
A = D*D*0.25*(z1-(math.sin(2*z1)/2))
m = A/P
Q = (A*(m**0.6666)*(i**0.5))/N
# Results
print "the discharge through the sewer in m**3/s : %.5f"%Q
# Variables
b = 1.5 #m, wide
d = 0.8 #m, depth
Q = 0.75 #m**3/s
i = 1./2500 #slope
# Calculations
A = b*d
P = b+(2*d)
m = A/P
C = Q/(((m*i)**0.5)*A)
z = (157.6/C)-1.81
K = z*(m**0.5)
# Results
print "Chezys constant and coefficient of roughness",round(C,2),round(K,3)
# Variables
b = 10. #m wide
d = 4. #m, depth of water
i = 1./1000 #slope
N = 0.03 #N Kutter's fprmula
# Calculations
A = b*d
P = b+(2*d)
m = A/P
z1 = 23+(0.00155/i)+(1/N)
z2 = 1+((23+(0.00155/i))*(N/(m**0.5)))
C = z1/z2
Q = A*C*((m*i)**0.5)
# Results
print "discharge through the recmath.tangular channel in litres/sec",round((Q*1000),3)
# Variables
b = 4. #m wide
d = 1.5 #m, depth of water
i = 1./1000 #slope
C = 55. # constant
# Calculations and Results
A = b*d
P = b+(2*d)
m = A/P
Q = A*C*((m*i)**0.5)
d1 = (A/2)**0.5
b1 = d1*2
print "the new dimension of the channel",round(b1,3),round(d1,3)
P1 = b1+(2*d1)
m1 = A/P1
Q1 = A*C*((m1*i)**0.5)
Qf = Q1-Q
print "increase in discharge in m3/sec",round(Qf,3)
import math
# Variables
i = 1./2500 #slope
N = 0.02 # N, Manning's formula
Q = 14. #m**3/s
# Calculations
n = 1./(math.radians(math.tan(60)))
a = (3**0.5)
d = ((Q*N*(2**0.6666))/((i**0.5)*a))**(3./8)
b = d*2/(3**0.5)
# Results
print "dimension of the channel",round(b,4),round(d,4)
import math
# Variables
Q = 20.2 #m**3/s
i = 1./2500 #slope
C = 60. #Constant
# Calculations
n = 1./(math.radians(math.tan(60)))
a = (3**0.5)
d = ((Q*(2**0.5))/(C*a*(i**0.5)))**0.4
b = 2*d/(a)
# Results
print "dimension of the cross section in m",round(b,4),round(d,4)
import math
# Variables
Q = 10. #m**3/s
V = 2. #m/s, velocity
A = Q/V
n = 1. #m length
# Calculations
d = (A/1.828)**0.5
b = 0.828*d
A1 = (b+(2*d*((n*n+1)**0.5)))
print "area in m2 of lining required for 1m canal lenght",round(A1,3)
# note : rounding off error.
# Variables
n = 1.
Q = 14. #m**3/s
i = 1./1000 #slope
C = 44. #constant
a = 1.828
# Calculations
d = ((Q*(2**0.5))/(C*a*(i**0.5)))**0.4
b = d*0.828
cost = (b+n*d)*4
A = 1.828*d*d
C1 = 70.
d1 = ((Q*(2**0.5))/(C1*a*(i**0.5)))**0.4
b1 = 0.828*d1
cost1 = (b1+n*d1)*4
costl = (b1+(2*d1*((n*n+1)**0.5)))
totalcost = cost1+costl
# Results
print "lined channel is cheaper ,dimension in m",round(b1,4),round(d1,3)
import math
# Variables
d = 1.2 #m diameter
i = 1./1500 #slope
C = 52. #constant
z = 1.9-1./1
# Calculations
z1 = math.acos(z)
x = math.pi-z1
A = d*d*0.25*(x-(math.sin(2*x)/2))
P = d*x
m = A/P
Q = A*C*((m*i)**0.5)
# Results
print "the maximium discharge through the channel in litres/sec",round((Q*1000),3)
# note : rounding off error.