From 85f12006b0731d1cfe949f2d305d0ef255135f96 Mon Sep 17 00:00:00 2001 From: Joy Zhang Date: Fri, 2 Aug 2024 13:08:29 -0700 Subject: [PATCH] minor update --- qsdsan/processes/_asm2d.py | 8 ++------ qsdsan/sanunits/_anaerobic_reactor.py | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/qsdsan/processes/_asm2d.py b/qsdsan/processes/_asm2d.py index 751ef1b6..0bd73f91 100644 --- a/qsdsan/processes/_asm2d.py +++ b/qsdsan/processes/_asm2d.py @@ -556,7 +556,6 @@ def _rhos_masm2d(state_arr, params, acceptor_dependent_decay=True, h=None): rhos[14:17] *= (aero[3] +eta_decay[1:4]*(1-aero[3])*anox[3]) rhos[18] *= (aero[5] + eta_decay[4]*(1-aero[5])*anox[5]) - # breakpoint() ######### pH ############ mass2mol = params['mass2mol'] Ka = params['Ka'] @@ -583,25 +582,22 @@ def _rhos_masm2d(state_arr, params, acceptor_dependent_decay=True, h=None): # else: rhos[22] = S_Ca**3 * po4**2 # if X_MgCO3 > 0: rhos[23] = (S_Mg * co3 - Ksp[4]) * f_dis[4] # else: rhos[23] = S_Mg * co3 + + rhos[19:26] = 0. SI = (S_Ca * co3 / Ksp[0])**(1/2) if SI > 1: rhos[19] = X_CaCO3 * (SI-1)**2 - else: rhos[19] = 0 SI = (S_Mg * nh4 * po4 / Ksp[1])**(1/3) if SI > 1: rhos[20] = X_struv * (SI-1)**3 - else: rhos[20] = 0 SI = (S_Mg * hpo4 / Ksp[2])**(1/2) if SI > 1: rhos[21] = X_newb * (SI-1)**2 - else: rhos[21] = 0 SI = (S_Ca**3 * po4**2 / Ksp[3])**(1/5) if SI > 1: rhos[22] = X_ACP * (SI-1)**5 - else: rhos[22] = 0 SI = (S_Mg * co3 / Ksp[4])**(1/2) if SI > 1: rhos[23] = X_MgCO3 * (SI-1)**2 - else: rhos[23] = 0 rhos[24] = X_AlOH * po4 * Monod(X_AlOH, K_AlOH) rhos[25] = X_FeOH * po4 * Monod(X_FeOH, K_FeOH) diff --git a/qsdsan/sanunits/_anaerobic_reactor.py b/qsdsan/sanunits/_anaerobic_reactor.py index 2cacbe9f..be4eeb34 100644 --- a/qsdsan/sanunits/_anaerobic_reactor.py +++ b/qsdsan/sanunits/_anaerobic_reactor.py @@ -599,7 +599,7 @@ def update_h2_dstate(dstate): def update_h2_dstate(dstate): pass def dy_dt(t, QC_ins, QC, dQC_ins): - QC[QC < 0] = 0. + # QC[QC < 0] = 0. Q_ins = QC_ins[:, -1] S_ins = QC_ins[:, :-1] * 1e-3 # mg/L to kg/m3 Q = sum(Q_ins)