import math
#Given
Q = 0.0108 #discharge through well
y = 0.075 #average depth of flow
I = 0.05 #average infiltration rate
A = 0.1 #area to cover
# Calculations
t = (60*2.303*y*math.log10(Q/(Q-I*A)))/I
# Results
print "Time required to cover given area = %.f minutes."%(t)
#Given
Q = 0.0108 #discharge through well
y = 0.075 #average depth of flow
I = 0.05 #average infiltration rate
A = 0.1 #area to cover
# Calculations
Amax = Q/I;
# Results
print "Maximum area that can be irrigated = %.2f hectare."%(Amax);
import math
#time of water application
#optimum length of each border strip
#dischrge for each border strip
#Given
d = 0.05; #depth of root zone
I = 1.25E-5; #average infiltration rate
s = 0.0035 #slope of border strip
t = d/(I*3600);
# Calculations and Results
t = round(t*1000)/1000;
print "Time of water application = %.2f hours."%(t);
#Part (a)
q = 2E-3; #discharge entering water source
qdash = q*100**2*60;
n = 0.55425-(0.0001386*qdash);
yo = (n*q/(s**0.5))**0.6;
y = 0.665*yo;
L = (q/I)*(1-math.e**(-d/y));
L = round(10*L)/10;
print "Part a:";
print "Optimum length of each border strip = %.2f m."%(L);
#Part (b)
Lgiven = 150 #given value of length
#First Trial
q = 3E-3;
qdash = q*100**2*60;
n = 0.55425-(0.0001386*qdash);
yo = (n*q/(s**0.5))**0.6;
y = 0.665*yo;
L = (q/I)*(1-math.e**(-d/y));
#second trial
q = 3.15E-3;
qdash = q*100**2*60;
n = 0.55425-(0.0001386*qdash);
yo = (n*q/(s**0.5))**0.6;
y = 0.665*yo;
L = (q/I)*(1-math.e**(-d/y));
q = 9*Lgiven*q*1000/L;
q = round(q*10)/10;
print "Part b:";
print "Discharge for each border strip = %.2f lps."%(q);
import math
#deep percolation loss
#water application efficiency and time of irrigation.
#Given
B = 12.; #breadth of bamath.sin
L = 36. #length of bamath.sin
d = 70. #depth of irrigation
Ic = 70. #cumulative infiltration
kdash = 9;
ndash = 0.42;
#Part (a)
a = 5;
b = 0.6;
q = 1.5; #stream size
# Calculations and Results
Q = (q*B)/1000;
tl = (L/a)**(1/b);
td = (Ic/kdash)**(1/ndash);
T = tl+td;
p = (1-(td/T)**(ndash))*100;
eita = (1-p/100)*100;
Tdash = (d*L*B)/(10*eita*Q*60);
p = round(p*100)/100;
eita = round(eita*100)/100;
Tdash = round(Tdash*10)/10;
print "Part a:"
print "Deep percolation loss = %.2f percent."%(p);
print "Water application efficiency = %.2f percent."%(eita);
print "Time of irrigation = %.2f minutes."%(Tdash);
#part (b)
a = 8;
b = 0.6;
q = 3;
Q = (q*B)/1000;
tl = (L/a)**(1/b);
td = (Ic/kdash)**(1/ndash);
T = tl+td;
p = (1-(td/T)**(ndash))*100;
eita = (1-p/100)*100;
Tdash = (d*L*B)/(10*eita*Q*60);
p = round(p*100)/100;
eita = round(eita*100)/100;
Tdash = round(Tdash*10)/10;
print "Part b:"
print "Deep percolation loss = %.2f percent."%(p);
print "Water application efficiency = %.2f percent."%(eita);
print "Time of irrigation = %.2f minutes."%(Tdash);
import math
from numpy import zeros
#given
d = 37.5 #crop water requirement
W = 1. #furrow spacing
L = 120. #length of furrow
n = -0.49;
k = 38.;
Ttotal = 143.; #Total time of irrigation
A = [0 ,23, 52 ,88, 127] #given values of time of advance
B = zeros(5)
C = zeros(5)
D = zeros(5)
E = zeros(5)
# Calculations
for i in range(5): #loop to find respective values of time of ponding
B[i] = 143-A[i]
for j in range(5): #loop to find respective furrow infiltration
C[j] = B[j]**(n)*k;
for K in range(4): #loop to find respective average infiltration
D[K] = (C[K]+C[K+1])/2;
E[0] = D[0];
for l in range(1,4): #loop to determine cumulative infiltration
E[l] = D[l]+E[l-1];
I = E[3];
T = (30*d*W*(n+1)/k)**(1/(n+1));
dav = ((24.5*Ttotal)+(I*(T-Ttotal)))/L;
q = ((120*37.5)-(24.5*143))/62;
T = round(T);
dav = round(dav*10)/10;
q = round(q*100)/100;
I = round(I*100)/100;
# Results
print "Maximum size of cut-back stream = %.2f lpm."%(I);
print "Minimum size of cut-back stream = %.2f lpm."%(q);
print "Time required for putting 37.5mm depth of water = %.2f minutes."%(T);
print "Average depth of water required = %.2f mm."%(dav);
#Given
L = 100.; #length of furrow
W = 1.; #furrow spacing
s = 0.3 #longitudnal slope of furrow
t1 = 80. #initial time flow of stream
t2 = 35. #final time flow of stream
# Calculations
qm = 0.6/s;
q = qm*0.4;
dav = ((q*t2*60)+(2*t1*60))/100;
# Results
print "Average depth of water applied = %.2f mm."%(dav);
import math
#Given
Q = 0.0072; #discharge through well
y = 0.1; #average depth of flow
I = 0.05 #infiltration capacity of soil
A = 0.04 #area of land
# Calculations
t = (2.303*y*60/I)*math.log10(Q/(Q-I*A));
Amax = Q/I;
t = round(t*100)/100;
# Results
print "Time required to irrigate = %.2f minutes."%(t);
print "Maximum area that can be irrigated = %.2f ha."%(Amax);