def free_metal(Ctotal, logbeta_list, C_list, EDTA, Rinorganic): count = 1 count += C_list[0] * logbeta_list[0] count += mat.pow(C_list[0], 2) * logbeta_list[1] count += C_list[1] * mat.pow(10, logbeta_list[2]) count += C_list[2] * mat.pow(10, logbeta_list[3]) Y4 = EDTA / count result = Ctotal / (mat.pow(10, Rinorganic) + mat.pow(10, logbeta_list[4]) * Y4) ratio = result / Ctotal * 100 return result, ratio
def Martin(initial, z): return initial * mat.pow(z / 100, -0.858)
def stokes_sink(g, viscosity, radius, density_diff): return 2 * g * mat.pow(radius, 2) * (density_diff) / (9 * viscosity)
def pCO2(k0, k1, k2, ALK, DIC): return (k2 * mat.pow(2 * (DIC - ALK), 2)) / (k0 * k1 * (ALK - DIC))
def h_plus(ph): return mat.pow(10, -ph)