Beginners > BASIC functions

DIFF_C not working as intended

(1/1)

khwee:
I tested both phreeqci and iphreeqccom 3.8.7, and saw that the values returned by phreeqc for DIFF_C did not account for the viscosity correction or concentration dependence. In the example given below, phreeqc returns the same value for DIFF_C("Na+") for the two solutions, where the second solution has 2 mole/kgw of NaCl.

I had reviewed an older thread, but didn't find any new info that could help with a fix.
https://phreeqcusers.org/index.php/topic,1853.0.html


--- Code: ---Database file: C:\Program Files (x86)\USGS\Phreeqc Interactive 3.8.7-17149\database\pitzer.dat

------------------
Reading data base.
------------------

SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
PITZER
GAS_BINARY_PARAMETERS
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
MEAN_GAMMAS
END
------------------------------------
Reading input data for simulation 1.
------------------------------------

DATABASE C:\Program Files (x86)\USGS\Phreeqc Interactive 3.8.7-17149\database\pitzer.dat
SOLUTION 1
temp 25
SOLUTION 2
units mole/kgw
temp 25
Na 2
Cl 2
USER_PRINT
10 REM Calculation of concentration dependence of Na+ diffusion coefficient
20 dw = 1.33e-9 # SOLUTION_SPECIES
30 damp = 75 # SOLUTION_SPECIES
40 viscos_0_25 = 0.8900239182946
50 visc = 0.7037
60 dw_temp = dw * EXP(dw_T/TK - dw_T/298.15) * viscos_0_25/VISCOS
61 dw_temp_SC = dw_temp * (VISCOS_0 / VISCOS) ^ visc
70 PRINT "DIFF_C(Na+): ", DIFF_C("Na+")
80 PRINT "Dw(TK):      ", dw_temp
90 PRINT "Dw(TK)_SC:   ", dw_temp_SC
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------

Initial solution 1.

----------------------------------User print-----------------------------------

DIFF_C(Na+):    1.3300e-09
Dw(TK):         1.3300e-09
Dw(TK)_SC:      1.3300e-09

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

Elements           Molality       Moles

Pure water     

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

                                       pH  =   7.000   
                                       pe  =   4.000   
      Specific Conductance (uS/cm,  25oC)  = 0
                          Density (g/cm3)  =   0.99704
                               Volume (L)  =   1.00297
                        Viscosity (mPa s)  =   0.89002
                        Activity of water  =   1.000
                 Ionic strength (mol/kgw)  =   1.006e-07
                       Mass of water (kg)  =   1.000e+00
                 Total alkalinity (eq/kg)  =   1.216e-09
                         Temperature (oC)  =  25.00
                  Electrical balance (eq)  =  -1.216e-09
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =  -0.60
                               Iterations  =   3
                         Gamma iterations  =   2
                      Osmotic coefficient  =   0.99988
                         Density of water  =   0.99704
                                  Total H  = 1.110124e+02
                                  Total O  = 5.550622e+01

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

                                                    MacInnes  MacInnes
                                MacInnes       Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma   cm3/mol

   OH-             1.013e-07   1.012e-07    -6.995    -6.995    -0.000     -4.14
   H+              1.000e-07   1.000e-07    -7.000    -7.000    -0.000      0.00
   H2O             5.551e+01   1.000e+00     1.744    -0.000     0.000     18.07

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

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

  H2O(g)           -1.50     -0.00    1.50  H2O

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

Initial solution 2.

----------------------------------User print-----------------------------------

DIFF_C(Na+):    1.3300e-09
Dw(TK):         1.0996e-09
Dw(TK)_SC:      9.6186e-10

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

Elements           Molality       Moles

Cl                2.000e+00   2.000e+00
Na                2.000e+00   2.000e+00

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

                                       pH  =   7.000   
                                       pe  =   4.000   
      Specific Conductance (uS/cm,  25oC)  = 145262
                          Density (g/cm3)  =   1.07204
                               Volume (L)  =   1.04183
                        Viscosity (mPa s)  =   1.07649
                        Activity of water  =   0.932
                 Ionic strength (mol/kgw)  =   2.000e+00
                       Mass of water (kg)  =   1.000e+00
                 Total alkalinity (eq/kg)  =   1.238e-07
                         Temperature (oC)  =  25.00
                  Electrical balance (eq)  =  -1.238e-07
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =  -0.00
                               Iterations  =   6 (9 overall)
                         Gamma iterations  =   4
                      Osmotic coefficient  =   0.98407
                         Density of water  =   0.99704
                                  Total H  = 1.110124e+02
                                  Total O  = 5.550622e+01

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

                                                    MacInnes  MacInnes
                                MacInnes       Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma   cm3/mol

   OH-             1.980e-07   9.429e-08    -6.703    -7.026    -0.322     -0.62
   H+              7.423e-08   1.000e-07    -7.129    -7.000     0.129      0.00
   H2O             5.551e+01   9.315e-01     1.744    -0.031     0.000     18.07
Cl            2.000e+00
   Cl-             2.000e+00   1.148e+00     0.301     0.060    -0.241     19.29
Na            2.000e+00
   Na+             2.000e+00   1.558e+00     0.301     0.193    -0.108      0.14

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

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

  H2O(g)           -1.53     -0.03    1.50  H2O
  Halite           -1.33      0.25    1.58  NaCl

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

------------------
End of simulation.
------------------

------------------------------------
Reading input data for simulation 2.
------------------------------------

------------------------------
End of Run after 0.03 Seconds.
------------------------------
--- End code ---

dlparkhurst:
To have an ionic strength effect on the diffusion coefficient, it is necessary to define  a_v_dif, the 7th parameter of -Dw in SOLUTION_SPECIES for each ion.

So far, I don't think any of the databases have these parameters defined. They range from about 0.5 to 0.9. Tony is working on a paper describing the viscosity model, and I think will add the parameters after it is published.

khwee:
Thank you for clarifying. I look forward to the next update that will complete this feature!

Navigation

[0] Message Index

Go to full version