PhreeqcUsers Discussion Forum

Beginners => PHREEQC basics => Topic started by: aleoconn on December 22, 2020, 08:40:11 PM

Title: S(6) convergence issues for environmental samples
Post by: aleoconn on December 22, 2020, 08:40:11 PM
Hello all,

I'm beginning to scale up my PHREEQC use for more complex environmental samples, and am struggling with how to ensure the quality of the model.

Right now, I have ~20 groundwater samples for which I am calculating sorption of As and V to Hfo. I would like to account for competitive binding as accurately as possible, and accordingly have a fair number of inputs. However, I'm running into unexpected convergence errors in a number of samples -- for most of them, in S(6) (sulfate). For example, here are my first three samples, run using the database minteq.v4.dat. The third sample is giving the error (input file is attached).

Code:

Code: [Select]
SOLUTION_SPREAD
    -units    mg/l
    P    C(4)      Ca      K      Mg       Na        Cl     S(6)      As      Mn       V       Fe      Si    Temperature       pH        pe
                                                charge             ug/l    ug/l    ug/l     ug/l                                         
 0.01     441     600    2.1     300      510       800     2300     120    4100     0.2     6600    42.3          15.59     7.14      2.06
 0.01     441     580    4.4     180     2000      1800     3800      59    1100     0.2      810      21          16.96     7.22      3.66
 0.01     311     600    5.2     110       55        94     1800      12    3300     0.2       92    29.5          18.77     7.03      3.65

PHASES
 Fix_pH
       H+ = H+
       log_k 0

I have measurements for -HS as well, but I tried excluding them in case it was exacerbating the issue (it doesn't seem to have been). I have pH fixed as the pH was measured in the environmental samples, and having it vary doesn't seem like it would be reflective of environmental conditions.

Error:
Code: [Select]

ERROR:                 S(6) has not converged. Total: 1.879365e-02 Calculated: 1.865977e-02 Residual: 1.338845e-04

I have previously run into issues with total charge not converging, but I'm confused as to how sulfate isn't able to converge.

Any help is greatly appreciated!
Title: Re: S(6) convergence issues for environmental samples
Post by: dlparkhurst on December 22, 2020, 09:14:59 PM
The tabs of SOLUTION_SPREAD do not transfer through the code definitions in the forum. Please attach the input as a file. Also, state or attach the database that you are using.
Title: Re: S(6) convergence issues for environmental samples
Post by: aleoconn on December 22, 2020, 11:17:54 PM
Thank you for the feedback! I've updated the original post accordingly.
Title: Re: S(6) convergence issues for environmental samples
Post by: dlparkhurst on December 22, 2020, 11:29:00 PM
You've chosen Cl- for charge balancing the solutions. However, the charge imbalance of the third solution is -2.928e-03. The total Cl- concentration is 2.659e-03. So, even by removing all of the Cl-, there is still a negative charge balance, and the program fails. Either remove the charge balance option for Cl-, or chose a different element. To be honest, I usually do not charge balance solutions (although you should make sure charge imbalance is not too large). The program will simply carry an unidentified charge imbalance through the remaining calculations.

Unfortunately, the error message is misleading. It is not really a problem with sulfate, but a problem with charge balancing.
Title: Re: S(6) convergence issues for environmental samples
Post by: aleoconn on December 22, 2020, 11:41:33 PM
Thank you so much! That makes total sense. Hopefully I'll have questions that are more fun in the future :P.