# PhreeqcUsers Discussion Forum

## USER_PUNCH/USER_GRAPH => BASIC functions => Topic started by: Pak on June 02, 2020, 04:54:52 PM

Title: How can I run this soil solution without error
Post by: Pak on June 02, 2020, 04:54:52 PM
Dear PhreeqcUsers,

I have the following soil solution:

Solution Top Lysi 01-A
temp   10
pH   7.39
pe     10.7478
units   mg/L
Al   0.09397         #Al+3
As   1e-20      #AsO4-3
B         0.035         #B(OH)4-
Ba      0.0238         #Ba+2
Ca   68.4      #Ca+2
Co   0.00078      #CO+2
Cu      0.009        #Cu+2
Fe      0.0234       #Fe+2
K        23           #K+
Mg      10.72      #Mg+2
Mo      0.000384        #MoO4-2
Na        16.19       #Na+
Ni        0.002500   #Ni+2
Pb        0.000051    #Pb+2
S         4.3        #SO4-2
Sb       0.0009100   #Sb(OH)3
Si     5.676        #H4(SiO4)
Sr        0.11030      #Sr+2
Zr       0.000150   #Zr+4
Rb        0.003160   #Rb+
U       0.000058   #UO2+2
F       0.221           #F-
Cl   70.92      #Cl-
Br        2.15      #Br-
P         0.724          #H2(PO4)-
N         121.6          #NO3-
C     36 charge      #DOC 36 mg/L

All the parameters have been obtained from lab data, except for the inorganic C composition that is unknown. Hence, I am trying to get the value through the use of charge (maybe not the better approach).

When running this composition in Phreeqc using the Thermochemie database, I got the following error:
The following equations were not satisfied:
ERROR:                   Al has not converged. Total: 8.709977e-05   Calculated: 7.228308e-05   Residual: 1.481669e-05

ERROR:                    B has not converged. Total: 8.096476e-05   Calculated: 6.336095e-05   Residual: 1.760381e-05

ERROR:                   Ba has not converged. Total: 4.334259e-06   Calculated: 7.744177e-02   Residual: -7.743744e-02

ERROR:                   Br has not converged. Total: 6.729206e-04   Calculated: 7.400606e-04   Residual: -6.714005e-05

ERROR:                    C Charge balance has not converged.    Residual: 2.479581e-02

ERROR:                   Ca has not converged. Total: 4.268192e-02   Calculated: 3.108072e-02   Residual: 1.160120e-02

ERROR:                   Cl has not converged. Total: 5.002802e-02   Calculated: 5.517496e-02   Residual: -5.146941e-03

ERROR:                   Co has not converged. Total: 3.310003e-07   Calculated: 3.126381e-07   Residual: 1.836224e-08

ERROR:                   Cu has not converged. Total: 3.541997e-06   Calculated: 6.664584e-07   Residual: 2.875538e-06

ERROR:                    F has not converged. Total: 2.909170e-04   Calculated: 4.513397e-05   Residual: 2.457830e-04

ERROR:                   Fe has not converged. Total: 1.047876e-05   Calculated: 3.122501e-06   Residual: 7.356259e-06

ERROR:                    K has not converged. Total: 1.471173e-02   Calculated: 1.627218e-02   Residual: -1.560448e-03

ERROR:                   Mg has not converged. Total: 1.103044e-02   Calculated: 1.076359e-02   Residual: 2.668525e-04

ERROR:                   Mo has not converged. Total: 1.000980e-07   Calculated: 6.269685e-38   Residual: 1.000980e-07

ERROR:                    N has not converged. Total: 2.171159e-01   Calculated: 2.397854e-01   Residual: -2.266946e-02

ERROR:                   Na has not converged. Total: 1.761187e-02   Calculated: 1.943689e-02   Residual: -1.825016e-03

ERROR:                   Ni has not converged. Total: 1.065295e-06   Calculated: 1.022847e-06   Residual: 4.244736e-08

ERROR:                    P has not converged. Total: 5.845719e-04   Calculated: 4.052186e-04   Residual: 1.793533e-04

ERROR:                   Pb has not converged. Total: 6.155655e-09   Calculated: 1.826546e-09   Residual: 4.329110e-09

ERROR:                   Rb has not converged. Total: 9.246522e-07   Calculated: 1.016846e-06   Residual: -9.219397e-08

ERROR:                    S has not converged. Total: 1.119465e-03   Calculated: 1.321341e-03   Residual: -2.018755e-04

ERROR:                   Sb has not converged. Total: 1.869092e-07   Calculated: 1.865714e-07   Residual: 3.377954e-10

ERROR:                   Si has not converged. Total: 5.054219e-03   Calculated: 5.053555e-03   Residual: 6.643322e-07

ERROR:                   Sr has not converged. Total: 3.148228e-05   Calculated: 3.407051e-05   Residual: -2.588229e-06

ERROR:                    U has not converged. Total: 6.093856e-09   Calculated: 8.722405e-10   Residual: 5.221615e-09

ERROR:                   Zr has not converged. Total: 4.112397e-08   Calculated: 4.112499e-08   Residual: -1.021273e-12

ERROR:                   Mu Ionic strength has not converged.    Residual: -1.449449e-01

ERROR:               A(H2O) Activity of water has not converged.    Residual: 7.313500e-03

So apparently, anything converge, I wonder how I can make the residual values to be closed to 0 and then make them converge. Any suggestion is welcome.

Thanks
Title: Re: How can I run this soil solution without error
Post by: John Mahoney on June 02, 2020, 05:38:49 PM
The file appears to run fine with some of the other databases such as LLNL.dat, I get warnings with the WATEQ4f.dat file because some of the components are not included in the database.  I do get the errors with
ThermoChimie_PHREEQC_Davies_electron_v9b0.dat

But by removing the charge balance constraint on C it runs.

I suggest you try another element for charge balance BUT as the original charge balance was
100*(Cat-|An|)/(Cat+|An|)  = -34.52

you might want to check the analysis first.  You will need to use a cation, I used Na+ and it worked because the charge is already so negative you need to add positive charge (before using the Na I tried Cl- and it crashed).  C is essentially CO3-2 and so it tried to remove CO3-2 from solution but apparently you need to remove more than the amount available from your 36 mg/L of C.  So it cannot converge.
Title: Re: How can I run this soil solution without error
Post by: Pak on June 03, 2020, 06:52:07 AM
Thanks, John.

I tried to do charge balance in C because, I do not know the inorganic amount of C (It is the only parameter that was not measured apparently). I have the DOC but not the inorganic amount, but I will go for you approach.
Title: Re: How can I run this soil solution without error
Post by: John Mahoney on June 03, 2020, 03:49:35 PM
I suppose the importance of C (inorganic) will depend upon what you intend to do with the solution in subsequent model steps.  So you do not have any type of alkalinity result?

Obviously without an alkalinity or inorganic C concentration any Carbonate phase SI values will be compromised. Titrations and buffering (essentially the same thing in this situation) will also be less reliable if you are guessing at the C concentration.