Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equilibrate concentration & species wrong using PHREEQC in pyEQL when specified with pure elements concentration #229

Open
abhardwaj73 opened this issue Mar 4, 2025 · 0 comments
Assignees

Comments

@abhardwaj73
Copy link
Contributor

When specifying [M] without the charge of the metallic cation:

  • It doesn't assign it to the respective cation [M+n] as done in PHREEQC
  • Causes elements to be double counted

Example:

comp = {"Na": "313.449122807018 mg/L", "Ca": "146.356944444444 mg/L", "Mg": "10.0854166666667 mg/L"}
solution = Solution(comp, balance_charge='auto')
solution.equilibrate()
species_concentrations = solution.list_concentrations(unit='mol/L')
print(species_concentrations)

Output

Na(aq):  313.4491 mg / l
Na[+1]:  313.4491 mg / l
Ca(aq):  146.3569 mg / l
Ca[+2]:  146.3568 mg / l
Mg[+2]:  10.0854 mg / l
Mg(aq):  10.0854 mg / l
OH[-1]:  0.0019 mg / l
CaOH[+1]: 0.0002 mg / l

This output confirms that ionic species like [Na+1] and neutral species Na(aq) are both present. This shows that there could be double counting of elements.

Comparing it with the case of providing charge in the concentration:

comp = {"Na+": "313.449122807018 mg/L", "Ca++": "146.356944444444 mg/L", "Mg++": "10.0854166666667 mg/L"}
solution = Solution(comp, balance_charge='auto')
solution.equilibrate()
species_concentrations = solution.list_concentrations(unit='mol/L')
print(species_concentrations)

Output

OH[-1]:  370.1403 mg / l
Na[+1]:  313.3702 mg / l
Ca[+2]:  146.3199 mg / l
Mg[+2]:  10.0829 mg / l
H[+1]:   0.0001 mg / l
CaOH[+1]:  0.0002 mg / l
@rkingsbury rkingsbury added release:minor will issue a minor release and removed release:minor will issue a minor release labels Mar 4, 2025
@rkingsbury rkingsbury self-assigned this Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants