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 »
  • Calcite solubility as function of pH - fails at high pH
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Calcite solubility as function of pH - fails at high pH  (Read 950 times)

mCPBA

  • Contributor
  • Posts: 2
Calcite solubility as function of pH - fails at high pH
« on: 22/07/24 12:46 »
Hello every one,
I?m trying to calculate the solubility of calcite at ambient pCO2 as a function of pH (pH 5.5-12). For this, 10 mol of Calcite is added, the pH is fixed with HCl and NaOH, respectively. However, for pH > 10.5 I encounter a "Numerical method failed" error. Why does this happen? Thank you very much in advance!

Code: [Select]
DATABASE D:\PHREEQC\databases\PHREEQC_SIT_e-_ThermoChimie_v12a.dat
TITTLE Test Calcite

PHASES
Fix_pH
H+ = H+
log_k   0.0
SOLUTION 1 
    temp      25
    units     mol/kgw
    Ca        0.0
    Cl        0.0
USE SOLUTION 1
SELECTED_OUTPUT 1
    -file                 Calcite_22-07-24.dat
    -totals               Ca Cl
    -molalities   H+ OH- CO3-2 HCO3- Na+ Ca+2 Cl-
    -saturation_indices Calcite CO2(g)
    -equilibrium_phases Calcite CO2(g)
   
use solution 1; EQUILIBRIUM_PHASES 1; Calcite 0 10;CO2(g) -3.4; Fix_pH -5.5 HCl;End
use solution 1; EQUILIBRIUM_PHASES 2; Calcite 0 10;CO2(g) -3.4; Fix_pH -6.0 HCl;End
use solution 1; EQUILIBRIUM_PHASES 3; Calcite 0 10;CO2(g) -3.4; Fix_pH -6.5 HCl;End
use solution 1; EQUILIBRIUM_PHASES 4; Calcite 0 10;CO2(g) -3.4; Fix_pH -7.0 HCl;End
use solution 1; EQUILIBRIUM_PHASES 5; Calcite 0 10;CO2(g) -3.4; Fix_pH -7.5 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 6; Calcite 0 10;CO2(g) -3.4; Fix_pH -8.0 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 7; Calcite 0 10;CO2(g) -3.4; Fix_pH -8.5 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 8; Calcite 0 10;CO2(g) -3.4; Fix_pH -9.0 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 9; Calcite 0 10;CO2(g) -3.4; Fix_pH -9.5 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 10; Calcite 0 10;CO2(g) -3.4; Fix_pH -10.0 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 11; Calcite 0 10; CO2(g) -3.4; Fix_pH -10.5 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 12; Calcite 0 10; CO2(g) -3.4; Fix_pH -11.0 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 13; Calcite 0 10; CO2(g) -3.4; Fix_pH -11.5 NaOH;End
use solution 1; EQUILIBRIUM_PHASES 14; Calcite 0 10; CO2(g) -3.4; Fix_pH -12.0 NaOH;End
END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4030
Re: Calcite solubility as function of pH - fails at high pH
« Reply #1 on: 22/07/24 18:08 »
I think the short answer is that the conditions you are trying to model are infeasible.

First, just in terms of the databases, there is a maximum pH with thermochemie or pitzer.dat for your system. You can calculate it with the following script, which shows that, for these databases, at some point adding NaOH does not increase the calculated pH. Fundamentally, it is not possible to calculate a higher pH value with these databases. (I think the solubility of NaOH is about 20 molal, which is the reason for the range of NaOH addition. I eliminated calcite because it has little effect on the results.)

Code: [Select]
SOLUTION 1
END
USER_GRAPH 1
    -headings               rxn Na C pH
    -axis_titles            "NaOH added" "Molality" "pH"
    -axis_scale y_axis      auto auto auto auto log
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X RXN
20 GRAPH_Y TOT("Na")
30 GRAPH_Y TOT("C")
50 GRAPH_SY -LA("H+")
  -end

USE solution 1
EQUILIBRIUM_PHASES
CO2(g) -3.4 100
#Trona 0 0
REACTION
NaOH 1
20 in 40
END

Na-CO3 minerals are supersaturated after about 6 mol of NaOH added (uncomment Trona in the EQUILIBRIUM_PHASES definition), so, I think that conditions of higher pH are not attainable physically. Thus, there is no data to fit Pitzer parameters at these concentrations. In addition, the high concentrations are probably outside the range of sit or other ion-association models.

My guess is that you were just trying to make a graph, and the simple answer is to limit the pH to about 10, where concentrations are relatively smaller, the minerals are soluble, and the models are applicable.



Logged

mCPBA

  • Contributor
  • Posts: 2
Re: Calcite solubility as function of pH - fails at high pH
« Reply #2 on: 22/07/24 19:53 »
I appreciate your quick and helpful reply - thank you!
I would like to ask two follow-up questions:

1) Is it possible to fix pH in the alkaline range with something other than NaOH? In my case, experimentally, pH is adjusted by the addition of Ca(OH)2.

2) When doing the calculation mentioned in my initial post for pH 6-10 (in 0.5 steps), the pH is fixed to a deviating value in the case of pH 6, 7.5 and 8. Do you know why this is happening?

Again, thank you so much!
Daniel

Code: [Select]
pH     pe           Ca           Cl         m_H+        m_OH-      m_CO3-2      m_HCO3-        m_Na+       m_Ca+2        m_Cl-      Calcite    d_Calcite       CO2(g)     d_CO2(g)   si_Calcite    si_CO2(g)
6.23822 -1.01073 4.59E+00 9.17E+00 8.90E-08 2.12E-08 7.58E-09 1.28E-05 0.00E+00 4.59E+00 9.17E+00 5.00E+00 -5.00E+00 1.50E+01 5.00E+00 0 -3.4
6.5 -0.841511 2.92E+00 5.83E+00 1.20E-07 4.75E-08 2.88E-08 2.86E-05 0.00E+00 2.92E+00 5.83E+00 6.92E+00 -3.08E+00 1.31E+01 3.08E+00 0 -3.4
7 -1.3587 6.65E-01 1.33E+00 1.18E-07 1.64E-07 2.29E-07 9.91E-05 0.00E+00 6.65E-01 1.33E+00 9.33E+00 -6.73E-01 1.07E+01 6.73E-01 0 -3.4
8.21421 -2.47176 5.34E-04 0.00E+00 6.38E-09 1.71E-06 9.02E-06 1.03E-03 2.38E-30 5.23E-04 0.00E+00 1.00E+01 -5.34E-04 1.00E+01 -5.31E-04 0 -3.4
8.21421 10.1022 5.34E-04 0.00E+00 6.38E-09 1.71E-06 9.02E-06 1.03E-03 3.94E-39 5.23E-04 0.00E+00 1.00E+01 -5.34E-04 1.00E+01 -5.31E-04 0 -3.4
8.5 -2.75845 1.53E-04 0.00E+00 3.33E-09 3.33E-06 3.47E-05 2.01E-03 1.79E-03 1.45E-04 0.00E+00 1.00E+01 -1.53E-04 1.00E+01 -1.91E-03 0 -3.4
9 -3.19387 2.35E-05 0.00E+00 1.10E-09 1.10E-05 4.08E-04 6.61E-03 7.44E-03 1.70E-05 0.00E+00 1.00E+01 -2.35E-05 9.99E+00 -7.07E-03 0 -3.4
9.5 -3.70251 8.30E-06 0.00E+00 3.81E-10 3.79E-05 5.95E-03 2.29E-02 3.68E-02 2.47E-06 0.00E+00 1.00E+01 -8.30E-06 9.97E+00 -3.11E-02 0 -3.4
10 -4.27438 6.55E-06 0.00E+00 1.65E-10 1.44E-04 2.52E-01 9.64E-02 1.17E+00 9.03E-07 0.00E+00 1.00E+01 -6.64E-06 9.05E+00 -9.50E-01 0 -3.4
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4030
Re: Calcite solubility as function of pH - fails at high pH
« Reply #3 on: 22/07/24 22:56 »
(1) Yes, you can use Ca(OH)2 in place of NaOH. You will be precipitating calcite in the process.

(2) A couple reasons why the pH is not correct.

At the low pH, you need more calcite or HCl to reach equilibrium. If you allow 100 moles, I think the pH will be correct at the low end, but it results in extremely large concentrations of Ca and Cl.

Sometimes PHREEQC gets confused when adding an alternative reactant, especially when fixing the pH. The process of finding the stable phase assemblage uses an optimization scheme where inequalities with saturation indices are used. There is an option to force equality in the equilibrium constraint for a mineral, in this case Fix_pH. Here is an example of its use:

Code: [Select]
Fix_pH -8 NaOH 100
-force_equality

It is tedious to determine when acid and when base are needed to fix the pH. A footnote to example 8 in the manual provides a kluge for allowing either acid or base to be used in the calculations.

The following performs your original calculation using the acid/base kludge:

Code: [Select]
PHASES
Fix_pH
H+ = H+
log_k   0.0
NaCl
NaCl = Na+ + Cl-
log_k -20
SOLUTION 1
    temp      25
    units     mol/kgw
    Ca        0.0
    Cl        0.0
END
USER_GRAPH 1
    -headings               pH Ca C
    -axis_titles            "pH" "Molality" ""
    -axis_scale y_axis      auto auto auto auto log
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X -LA("H+")
20 GRAPH_Y TOT("Ca"), TOT("C")
  -end
    -active                 true
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -5.5 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -6 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -6.5 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -7 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -7.5 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -8 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -8.5 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -9 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -9.5 NaOH 100
END
USE solution 1
EQUILIBRIUM_PHASES
Calcite 0 100
CO2(g) -3.4 10
NaCl 0 100
Fix_pH -10 NaOH 100
END

It is also tedious to generate all of the sequence of pH values for the calculation. It is more work, but can save time in the long run if you use the other trick in example 8 to use USER_PUNCH to write the sequence of repetitive calculations that you want.

Code: [Select]
PHASES
Fix_pH
H+ = H+
log_k   0.0
NaCl
NaCl = Na+ + Cl-
log_k -20
SOLUTION 1
    temp      25
    units     mol/kgw
    Ca        0.0
    Cl        0.0
SELECTED_OUTPUT 100
-file pH_scan
USER_PUNCH 100
-start
10 FOR i = 5.5 TO 10 STEP 0.1
20 s$ = s$ + "USE solution 1" + EOL$
30 s$ = s$ + "EQUILIBRIUM_PHASES 1" + EOL$
40 s$ = s$ + "Calcite 0 100" + EOL$
50 s$ = s$ + "CO2(g) -3.4 100" + EOL$
60 s$ = s$ + "NaCl 0 100" + EOL$
70 s$ = s$ + "Fix_pH " + STR_F$(-i, 5, 2) + " NaOH 100" + EOL$
75 s$ = s$ + "  -force_equality" + EOL$
80 s$ = s$ + "END" + EOL$
90 NEXT i
100 PUNCH s$
110 END
-end
END
SELECTED_OUTPUT 100
-active false
END
USER_GRAPH 1
    -headings               pH Ca C
    -axis_titles            "pH" "Molality" ""
    -axis_scale y_axis      auto auto auto auto log
    -initial_solutions      false
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 GRAPH_X -LA("H+")
20 GRAPH_Y TOT("Ca"), TOT("C")
  -end
    -active                 true
END
INCLUDE$ pH_scan
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Dissolution and precipitation »
  • Calcite solubility as function of pH - fails at high pH
 

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