Skip to content

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

@abhardwaj73

Description

@abhardwaj73

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions