Professional Documents
Culture Documents
import math
import matplotlib.pyplot as plt
import statistics
import numpy as np
QEFL = QEFL*FMET**3
OUTBNK = input("Enter the side of the bank of the effluent: ")
REFLD = []
for i in range(1, NTR+1):
REFLD.append(input("Enter the reference field for transect %d: "
% i))
X = []
for i in range(1, NTR+1):
X.append(float(input("Enter the distance from outfall for
transect %d: " % i)))
Q = []
for i in range(1, NTR+1):
Q.append(float(input("Enter the flow for transect %d: " % i)))
MVEL = []
for i in range(1, NTR + 1):
Q.append(float(input("Enter the mean velocity for transect %d: "
% i)))
squared_Q = [i ** 2 for i in Q]
Dh = []
for index in range(len(CONC_row)):
Dh.append(CONC_row[index] / squared_Q[index])
BKFX = [0]*NTR
TFLX = [0]*NTR
for i in range(NTR):
BKFX[i] = CBKG*(Q[i]-QEFL)
EFLX = CEFL*QEFL
TFLX[i] = BKFX[i]+EFLX
An = []
for i in range(1, NTR + 1):
An.append(ZAV[i-1]/X[i-1])
# To find slope(Beta)
slope = np.polyfit(An, Dh, 1)[0]
beta = round(slope/2, 2)
import math
def calculate_deoxygenation_rate(dL_dt, K1):
rate_of_deoxygenation = -dL_dt
rate_of_deoxygenation *= K1
return rate_of_deoxygenation
X1 = solve_for_X1(L_prime, K1, t)
print("Value of X:", X1)
#REAERATION CONSTANT
import math
import matplotlib.pyplot as plt
# Initial condition
D_initial = int()
# Time span
t_start = 0.0
t_end = 10.0
t_points = 100
dt = (t_end - t_start) / t_points