PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • water activity convergence. (Acid-base titration)
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: water activity convergence. (Acid-base titration)  (Read 1336 times)

jungsdao

  • Frequent Contributor
  • Posts: 14
water activity convergence. (Acid-base titration)
« on: February 17, 2019, 03:50:50 PM »
Dear Developer..
I'm beginner to PHREEQC.
I'm trying to simulate acid base titration of high concentration Nitric acid with Calcium hydroxide.
However, water activity convergence error occurs repeatedly even though I tried several different mass of water; 0.2~1~2
I tried similarly to HCl solution, but it worked quite well.
Following is the script I used.. Any suggestion would be really helpful.

Regards,,


USER_PUNCH
-head Spec_Cond
PUNCH SC
SELECTED_OUTPUT
-activities H+ Ca+2
-ionic_strength true
-pH
-charge_balance true
-saturation_indices
-equilibrium_phases

SOLUTION 1
pH 7 charge
temp 25
units mol/L
water 1   # kg
N(5) 11.39
Ca 0

PHASES
Ca(OH)2
Ca(OH)2 = Ca+2 + 2OH-
log_k    -5.26
delta_h  -18.94

Ca(NO3)2
Ca(NO3)2 = Ca+2 + 2NO3-
log_k     3.21
delta_h   -19.2

equilibrium_phases 1
Ca(OH)2 0 10
Ca(NO3)2 0 10

REACTION 1 
Ca(OH)2 0.1
8 in 100 steps

USER_GRAPH 1
-headings Addition "NO3-" "Ca+2" "pH"
-axis_titles "Added Ca(OH)2 (mol)","MOL PER LITRE (M)" ,"pH"
-chart_title  "Titration Curve"
     -axis_scale x_axis 0 8.0 1
     -axis_scale y_axis 1e-2 12 auto auto
     -axis_scale sy_axis -1 14 1
-start
10 pH=-LA("H+")
20 GRAPH_X RXN
30 GRAPH_Y MOL("NO3-"), MOL("Ca+2")
40 GRAPH_SY pH
-end
-active                 true

USER_GRAPH 2
-axis_titles "Added Ca(OH)2 (mol)", "Saturation Index"
-headings Addition "Ca(OH)2" "Ca(NO3)2"
-chart_title  "Saturation index"
-axis_scale x_axis  0 8 1
-axis_scale y_axis  auto auto 1
-start
10 GRAPH_X RXN
20 GRAPH_Y SI("Ca(OH)2") SI("Ca(NO3)2") 
-end
-active                 true

USER_GRAPH 3
-axis_titles "Added Ca(OH)2 (mol)", "Water mass (g)"
-headings Addition
-chart_title  "Water mass change"
-axis_scale x_axis  0 8 1
-axis_scale y_axis  auto auto 10
-start
10 GRAPH_X RXN
20 GRAPH_Y TOT("water")*1000 
-end

END

« Last Edit: February 17, 2019, 03:53:43 PM by jungsdao »
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: water activity convergence. (Acid-base titration)
« Reply #1 on: February 17, 2019, 06:25:19 PM »
Here is a titration that allows Ca(OH)2 and Ca(NO3)2 to precipitate if they become supersaturated.

Code: [Select]
PHASES
Ca(OH)2
Ca(OH)2 = Ca+2 + 2OH-
log_k    -5.26
delta_h  -18.94

Ca(NO3)2
Ca(NO3)2 = Ca+2 + 2NO3-
log_k     3.21
delta_h   -19.2

equilibrium_phases 1
Ca(OH)2 0 0
Ca(NO3)2 0 

SOLUTION 1
pH 7 charge
temp 25
units mol/L
water 1   # kg
N(5) 11.39

REACTION 1 
Ca(OH)2 1
12 in 100 steps

USER_GRAPH 1
-headings Addition "NO3-" "Ca+2" "pH"
-axis_titles "Added Ca(OH)2 (mol)","MOL PER LITRE (M)" ,"pH"
-chart_title  "Titration Curve"
-start
10 pH=-LA("H+")
20 GRAPH_X RXN
30 GRAPH_Y MOL("NO3-"), MOL("Ca+2")
40 GRAPH_SY pH
-end
Logged

jungsdao

  • Frequent Contributor
  • Posts: 14
Re: water activity convergence. (Acid-base titration)
« Reply #2 on: February 18, 2019, 03:57:45 AM »
Thank you for your prompt reply.
I have applied as you suggested, but still error in water activity convergence occurs..
Following is the input and output.

INPUT:

USER_PUNCH
-head Spec_Cond
PUNCH SC
SELECTED_OUTPUT
-activities H+ Ca+2
-ionic_strength true
-pH
-charge_balance true
-saturation_indices
-equilibrium_phases


PHASES
Ca(OH)2
Ca(OH)2 = Ca+2 + 2OH-
log_k    -5.26
delta_h  -18.94

Ca(NO3)2
Ca(NO3)2 = Ca+2 + 2NO3-
log_k     3.21
delta_h   -19.2

equilibrium_phases 1
Ca(OH)2 0 0
Ca(NO3)2 0

SOLUTION 1
pH 7 charge
temp 25
units mol/L
water 1   # kg
N(5) 11.39


REACTION 1 
Ca(OH)2 1
12 in 100 steps

USER_GRAPH 1
-headings Addition "NO3-" "Ca+2" "pH"
-axis_titles "Added Ca(OH)2 (mol)","MOL PER LITRE (M)" ,"pH"
-chart_title  "Titration Curve"
     -axis_scale x_axis 0 8.0 1
     -axis_scale y_axis 1e-2 12 auto auto
     -axis_scale sy_axis -1 14 1
-start
10 pH=-LA("H+")
20 GRAPH_X RXN
30 GRAPH_Y MOL("NO3-"), MOL("Ca+2")
40 GRAPH_SY pH
-end
-active                 true

USER_GRAPH 2
-axis_titles "Added Ca(OH)2 (mol)", "Saturation Index"
-headings Addition "Ca(OH)2" "Ca(NO3)2"
-chart_title  "Saturation index"
-axis_scale x_axis  0 8 1
-axis_scale y_axis  auto auto 1
-start
10 GRAPH_X RXN
20 GRAPH_Y SI("Ca(OH)2") SI("Ca(NO3)2") 
-end
-active                 true

USER_GRAPH 3
-axis_titles "Added Ca(OH)2 (mol)", "Water mass (g)"
-headings Addition
-chart_title  "Water mass change"
-axis_scale x_axis  0 8 1
-axis_scale y_axis  auto auto 10
-start
10 GRAPH_X RXN
20 GRAPH_Y TOT("water")*1000 
-end

END

OUTPUT:
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------

Initial solution 1.   

WARNING: Maximum iterations exceeded, 100

WARNING: Maximum iterations exceeded, 100

WARNING: The program has failed to converge to a numerical solution.

The following equations were not satisfied:
ERROR:               A(H2O) Activity of water has not converged.    Residual: 3.183602e-01

-----------------------------Solution composition------------------------------

   Elements           Molality       Moles

   N(5)              3.878e+01   3.878e+01

----------------------------Description of solution----------------------------

                                       pH  =  -1.425      Charge balance
                                       pe  =   4.000   
      Specific Conductance (µS/cm,  25°C)  = 3197627
                          Density (g/cm³)  =   1.37422
                               Volume (L)  =   2.50572
                        Activity of water  =   0.000
                 Ionic strength (mol/kgw)  =   3.878e+01
                       Mass of water (kg)  =   1.000e+00
                 Total alkalinity (eq/kg)  =  -3.878e+01
                         Temperature (°C)  =  25.00
                  Electrical balance (eq)  =  -2.611e-29
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =  -0.00
                               Iterations  = 101 (202 overall)
                                  Total H  = 1.497877e+02
                                  Total O  = 1.718321e+02

----------------------------Distribution of species----------------------------

                                               Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma   cm³/mol

   H+              3.878e+01   2.660e+01     1.589     1.425    -0.164      0.00
   OH-             2.611e-29   1.066e-29   -28.583   -28.972    -0.389     44.00
   H2O             5.551e+01   2.801e-14     1.744   -13.553     0.000     18.07
H(0)          1.328e-12
   H2              6.642e-13   5.010e-09   -12.178    -8.300     3.878     28.61
N(5)          3.878e+01
   NO3-            3.878e+01   1.392e+01     1.589     1.144    -0.445     38.76
O(0)          0.000e+00
   O2              0.000e+00   0.000e+00  -106.763  -102.885     3.878     30.40

------------------------------Saturation indices-------------------------------

  Phase               SI** log IAP   log K(298 K,   1 atm)

  H2(g)            -5.20     -8.30   -3.10  H2
  H2O(g)          -15.06    -13.55    1.50  H2O
  O2(g)           -99.99   -102.89   -2.89  O2

**For a gas, SI = log10(fugacity). Fugacity = pressure * phi / 1 atm.
  For ideal gases, phi = 1.

ERROR: Model failed to converge for initial solution  1.
Stopping.


 
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2736
Re: water activity convergence. (Acid-base titration)
« Reply #3 on: February 18, 2019, 05:44:35 AM »
First, the ion-association model used in all databases except pitzer.dat and sit.dat is limited to relatively low ionic strengths. The concentrations that you are using are well beyond the range of confidence in the aqueous model.

Next, with such concentrated solutions, there is a big difference between mol/L and mol/kgw. To convert the units you need to use the appropriate gram formula weight for NO3 (most databases use N for the units of N(5)). It is also necessary to know the density of the solution.

If you run the initial solution sequentially with phreeqc.dat, starting with an estimated density of 1.2, taking the calculated density and entering it as the solution density, you converge on a density of 1.3122 and a molality of 18.8. The volume of the acid that has 1 kg of water is 1.66 L.

In this case, you would need to add about 9.4 moles of Ca(OH)2 to neutralize the acid (which has 1 kgw). A liter of the acid could be formed by MIXing 1/1.66 of the acid.

Code: [Select]
solution_master_species
N(+5) NO3- 0 NO3-

SOLUTION 1
pH 7 charge
temp 25
units mol/L
-density 1.3122  #calc
N(5) 11.39


Also, my mistake, should have defined equilibrium phases as follows:

equilibrium_phases 1
Ca(OH)2 0 0
Ca(NO3)2 0  0
« Last Edit: February 18, 2019, 06:33:33 AM by dlparkhurst »
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • water activity convergence. (Acid-base titration)
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2