Skip to content

Commit

Permalink
add doctest for BatchExperiment
Browse files Browse the repository at this point in the history
  • Loading branch information
joyxyz1994 committed Oct 23, 2024
1 parent 7f566bb commit 69140a4
Show file tree
Hide file tree
Showing 2 changed files with 269 additions and 253 deletions.
9 changes: 0 additions & 9 deletions qsdsan/processes/_adm1_p_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ def acid_base_rxn(h_ion, weak_acids_tot, Kas):
nh3, hpo4, hco3, ac, pro, bu, va = Kas[1:] * weak_acids_tot[4:] / (Kas[1:] + h_ion)
return S_cat + S_K + 2*S_Mg + h_ion + (S_IN - nh3) - S_an - oh_ion - hco3 - ac - pro - bu - va - 2*hpo4 - (S_IP - hpo4)

# The function 'fprime_abr' is not used in the code
def fprime_abr(h_ion, weak_acids_tot, Kas):
# S_cat, S_K, S_Mg, S_an, S_IN, S_IP = weak_acids_tot[:6]
Kw = Kas[0]
doh_ion = - Kw / h_ion ** 2
dnh3, dhpo4, dhco3, dac, dpro, dbu, dva = - Kas[1:] * weak_acids_tot[4:] / (Kas[1:] + h_ion)**2
return 1 + (-dnh3) - doh_ion - dhco3 - dac - dpro - dbu - dva - dhpo4


rhos = np.zeros(28) # 28 kinetic processes (25 as defined in modified ADM1 + 3 for gases)
Cs = np.empty(25) # 25 processes as defined in modified ADM1

Expand Down
Loading

0 comments on commit 69140a4

Please sign in to comment.