PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Dissolution and precipitation »
  • Phreeqc Python MgOH2 Precipitation Example
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Phreeqc Python MgOH2 Precipitation Example  (Read 1219 times)

EV_8221

  • Contributor
  • Posts: 2
Phreeqc Python MgOH2 Precipitation Example
« on: 21/10/23 17:55 »
Hi all, I am using PhreeqPython to interact with PHREEQC, and currently trying to solve a relatively simple problem. Any guidance would be helpful. For those unfamiliar with the Python version, an easy to search manual is here: https://www.phreeqpy.com/phreeqpy.pdf

The problem:

Sodium hydroxide is added to a groundwater containing 10-4 M Mg2+ and 10-3
M Ca2+. At what pH will Mg(OH)2(s) begin to precipitate?

What I have tried:

Right now I am defining my solution with the concentrations of Mg and Ca ion given. One solution could be to identify the pH where Mg(OH)2 is saturated, and find the corresponding NaOH concentration associated with this pH. Although the version I am working with does not recognize MgOH2, or variants of this. A quick summary of my code is below, all advice is appreciated!

Solution_A = pp.add_solution({'units':'mmol/kgw',
                                 'Ca': 1,
                                 'temp': 25.0,
                                 'Mg':0.1
                                })

Solution_A.saturate('MgOH2',1.0) 

   
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4030
Re: Phreeqc Python MgOH2 Precipitation Example
« Reply #1 on: 21/10/23 21:01 »
Here is a way to do it in PHREEQC using the pitzer.dat database. I leave it as an exercise for you to do it with phreeqpy or phreeqpython.

Code: [Select]
SOLUTION 1
pH 7 charge
Ca 1
Mg 0.1
Cl 2.2
EQUILIBRIUM_PHASES
Brucite 0 NaOH 10
END

Note that MgOH2 is incorrect, both because there is no mineral with this name, and because the formula is incorrect.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Dissolution and precipitation »
  • Phreeqc Python MgOH2 Precipitation Example
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2