Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/QSD-Group/QSDsan into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
yalinli2 committed Oct 25, 2024
2 parents 066f42f + 7bf6ab2 commit 3f6be56
Show file tree
Hide file tree
Showing 5 changed files with 304 additions and 1,044 deletions.
6 changes: 3 additions & 3 deletions qsdsan/processes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self):
from ._asm2d import *
from ._adm1 import *
from ._adm1_p_extension import *
from ._madm1 import *
# from ._madm1 import *
from ._decay import *
from ._kinetic_reaction import *
from ._pm2 import *
Expand All @@ -74,7 +74,7 @@ def __init__(self):
_asm2d,
_adm1,
_adm1_p_extension,
_madm1,
# _madm1,
_decay,
_kinetic_reaction,
_pm2
Expand All @@ -86,7 +86,7 @@ def __init__(self):
*_asm2d.__all__,
*_adm1.__all__,
*_adm1_p_extension.__all__,
*_madm1.__all__,
# *_madm1.__all__,
*_decay.__all__,
*_kinetic_reaction.__all__,
*_pm2.__all__,
Expand Down
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 3f6be56

Please sign in to comment.