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 »
  • Surface Complexation »
  • Queation about EXCHANGE_MODIFY
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Queation about EXCHANGE_MODIFY  (Read 1139 times)

Jeonghwan Hwang

  • Top Contributor
  • Posts: 77
Queation about EXCHANGE_MODIFY
« on: 10/07/24 09:54 »
I have discovered something unusual regarding the Comsol-PHREEQC coupling.
Initially, PHREEQC calculates the cation exchange reaction (Z ≈ 71) and sends this data to COMSOL.
However, the data received back from COMSOL shows a different amount at the cation exchange site (Z ≈ 13).
This discrepancy appears to be due to the influence of the boundary condition near this point.
Interestingly, when running the modified code that reflects these values, Z is recalculated to be 71.
The same result was observed in the subsequent steps.
I am curious to understand why this outcome occurs.

I attacted my code.

Thank you
Sincerely,

Jeonghwan Hwang

Code: [Select]
Database D:\2024_9 PHREEQC\Speciation\PA_Speciation_Ver1b_Re\PHREEQC_SIT_e-_ThermoChimie_v12a.dat

#APRO TDB 0609 updated ver.
     
     Solution_Species
     H2O + 0.01e- = H2O-0.01 #FORUM
      log_K -9.0
     end
     
         
     EXCHANGE_MASTER_SPECIES
      Z Z-
     EXCHANGE_SPECIES
      Z- = Z- 
      log_k 0.0
      Z- + Na+ = NaZ
      log_K -0.9 #0.12598
      2Z- + Ca+2 = CaZ2
      log_k 0
      2Z- + Mg+2 = MgZ2
      log_k -0.16 #0.69183
     end
     
         
     KNOBS
      -convergence_tolerance 1E-12
     End
     
     SOLUTION 1
      units mol/L
      pH 4.5
      #Temp
      Ca 5.2e-3
      Cl 1e-3. charge
      Mg 4.55e-3
      Na 4.65e-3
      -water 600.00000
     
     Exchange 1
      CaZ2              2.213e+01   
      MgZ2              1.311e+01 
      NaZ               5.276e-01 
     -exchange_gammas false
     
     END
         
     
     
     SELECTED_OUTPUT
     -reset false
     -file HWANG.txt
     USER_PUNCH
     headings cb nonO nonH Ca Cl Mg Na NaZ CaZ2 MgZ2
     -start
     10 punch charge_balance/TOT("Water"), (TOTMOLE("O")-TOT("Water")/GFW("H2O")*1000)/TOT("Water")*1000, (TOTMOLE("H")-2*TOT("Water")/GFW("H2O")*1000)/TOT("Water")*1000, TOT("Ca")*1000, TOT("Cl")*1000, TOT("Mg")*1000, TOT("Na")*1000
     20 punch MOL("NaZ")*TOT("Water"), MOL("CaZ2")*TOT("Water"), MOL("MgZ2")*TOT("Water")
     -end
     END
     RUN_CELLS
     -cells 1
     #DUMP
     #-all
     END
     
     
     SOLUTION_MODIFY 1
     -total_o 3.330520893551067274529486894608e+04
     -total_h 6.661043500227773620281368494034e+04
     -cb -6.290252240873866265516745178049e-14
     -totals
     Ca 3.180500991093322848968227845035e+00
     Cl 6.407336683262156995510849810671e+00
     Mg 9.663343665806132035123177104197e-03
     Na 9.876762830217662714193949113906e-03
     EXCHANGE_MODIFY 1
      -component Z
      -totals
      Na 9.939102527107890328039729865850e-02
      Ca 4.168613857675806499969439755660e+00
      Mg 2.469619224842378724105174114811e+00
      Z 1.337585719030744968449653242715e+01
     RUN_CELLS
     -cells 1
     #DUMP
     #-all
     END
     
     SOLUTION_MODIFY 1
     -total_o 3.330520893551046901848167181015e+04
     -total_h 6.661043499097191670443862676620e+04
     -cb -2.496252688522365502697670978422e-14
     -totals
     Ca 3.177591862254799170983687872649e+00
     Cl 6.390450499028672126655692409258e+00
     Mg 6.726392894227745979096599882041e-03
     Na 4.937391567652786930620045779960e-03
     EXCHANGE_MODIFY 1
      -component Z
      -totals
      Na 5.354419713161577554227932296271e-02
      Ca 5.332282044833786649462581408443e+00
      Mg 2.783219071078864459423130028881e+00
      Z 1.628454642895691861781415354926e+01
     RUN_CELLS
     -cells 1
     #DUMP
     #-all
     END

The result is here
Code: [Select]
WARNING: Database file from DATABASE keyword is used; command line argument ignored.
   Input file: 0710.phr
  Output file: 0710.phr.out
Using PHREEQC: version 3.7.3, compiled December 2, 2021
Database file: D:\2024_9 PHREEQC\Speciation\PA_Speciation_Ver1b_Re\PHREEQC_SIT_e-_ThermoChimie_v12a.dat

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

SOLUTION_MASTER_SPECIES
SIT
SOLUTION_SPECIES
PHASES
------------------------------------
Reading input data for simulation 1.
------------------------------------

Database D:\2024_9 PHREEQC\Speciation\PA_Speciation_Ver1b_Re\PHREEQC_SIT_e-_ThermoChimie_v12a.dat
     Solution_Species
     H2O + 0.01e- = H2O-0.01 #FORUM
      log_K -9.0
     end
------------------
End of simulation.
------------------

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

     EXCHANGE_MASTER_SPECIES
      Z Z-
     EXCHANGE_SPECIES
      Z- = Z- 
      log_k 0.0
      Z- + Na+ = NaZ
      log_K -0.9 #0.12598
      2Z- + Ca+2 = CaZ2
      log_k 0
      2Z- + Mg+2 = MgZ2
      log_k -0.16 #0.69183
     end
------------------
End of simulation.
------------------

------------------------------------
Reading input data for simulation 3.
------------------------------------

     KNOBS
      convergence_tolerance 1E-12
     End
------------------
End of simulation.
------------------

------------------------------------
Reading input data for simulation 4.
------------------------------------

     SOLUTION 1
      units mol/L
      pH 4.5
      Ca 5.2e-3
      Cl 1e-3. charge
      Mg 4.55e-3
      Na 4.65e-3
      water 600.00000
     Exchange 1
      CaZ2              2.213e+01   
      MgZ2              1.311e+01 
      NaZ               5.276e-01 
     exchange_gammas false
     END
-------------------------------------------
Beginning of initial solution calculations.
-------------------------------------------

Initial solution 1.

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

Elements           Molality       Moles

Ca                5.202e-03   3.121e+00
Cl                2.420e-02   1.452e+01  Charge balance
Mg                4.552e-03   2.731e+00
Na                4.652e-03   2.791e+00

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

                                       pH  =   4.500   
                                       pe  =   4.000   
                        Activity of water  =   0.999
                 Ionic strength (mol/kgw)  =   3.371e-02
                       Mass of water (kg)  =   6.000e+02
                 Total alkalinity (eq/kg)  =  -3.720e-05
                         Temperature (캜)  =  25.00
                  Electrical balance (eq)  =  -9.202e-15
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =  -0.00
                               Iterations  =  18
                         Gamma iterations  =   5
                      Osmotic coefficient  =   0.91553
                                  Total H  = 6.661044e+04
                                  Total O  = 3.330521e+04

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

                                               Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma    cm?mol

   H+              3.720e-05   3.162e-05    -4.429    -4.500    -0.071      0.00
   H2O-0.01        9.114e-10   9.114e-10    -9.040    -9.040    -0.000     (0) 
   OH-             3.741e-10   3.160e-10    -9.427    -9.500    -0.073     (0) 
   H2O             5.551e+01   9.994e-01     1.744    -0.000     0.000     18.07
Ca            5.202e-03
   Ca+2            5.202e-03   2.666e-03    -2.284    -2.574    -0.290     (0) 
   Ca(OH)+         1.656e-11   1.398e-11   -10.781   -10.854    -0.073     (0) 
Cl            2.420e-02
   Cl-             2.408e-02   2.041e-02    -1.618    -1.690    -0.072     (0) 
   MgCl+           1.232e-04   1.040e-04    -3.910    -3.983    -0.073     (0) 
   Cl2             0.000e+00   0.000e+00   -42.590   -42.590     0.000     (0) 
   ClO4-           0.000e+00   0.000e+00  -121.411  -121.481    -0.071     (0) 
H(0)          1.664e-20
   H2              8.318e-21   8.318e-21   -20.080   -20.080     0.000     (0) 
Mg            4.552e-03
   Mg+2            4.429e-03   2.276e-03    -2.354    -2.643    -0.289     (0) 
   MgCl+           1.232e-04   1.040e-04    -3.910    -3.983    -0.073     (0) 
   Mg(OH)+         1.780e-10   1.503e-10    -9.750    -9.823    -0.073     (0) 
   Mg4(OH)4+4      7.118e-32   4.761e-33   -31.148   -32.322    -1.175     (0) 
Na            4.652e-03
   Na+             4.652e-03   3.935e-03    -2.332    -2.405    -0.073     (0) 
O(0)          0.000e+00
   O2              0.000e+00   0.000e+00   -51.991   -51.991     0.000     (0) 

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

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

  Antarcticite     -9.90     -5.96    3.94  CaCl2:6H2O
  Bischofite      -10.48     -6.02    4.46  MgCl2:6H2O
  Brucite         -10.74      6.36   17.10  Mg(OH)2
  Ca(cr)         -107.42    -10.57   96.85  Ca
  Ca2Cl2(OH)2:H2O(s) -26.06      0.47   26.53  Ca2Cl2(OH)2:H2O
  Ca4Cl2(OH)6:13H2O(s) -55.41     13.32   68.73  Ca4Cl2(OH)6:13H2O
  CaCl2:2H2O(cr)  -13.90     -5.95    7.95  CaCl2:2H2O
  CaCl2:4H2O(cr)  -11.31     -5.96    5.35  CaCl2:4H2O
  CaCl2:H2O(s)    -13.80     -5.95    7.85  CaCl2:H2O
  CaO(cr)         -26.27      6.43   32.70  CaO
  Cl2(g)          -41.36      4.62   45.98  Cl2
  H2(g)           -17.00    -17.00    0.00  H2
  H2O(g)           -1.50    -43.00  -41.50  H2O
  Halite           -5.69     -4.10    1.59  NaCl
  HCl(g)          -12.48     -6.19    6.29  HCl
  Hydrophilite    -17.72     -5.95   11.77  CaCl2
  Mg(cr)          -90.42    -10.64   79.78  Mg
  Mg-oxychlorur   -19.51      6.52   26.03  Mg2Cl(OH)3:4H2O
  MgCl2(s)        -28.05     -6.02   22.03  MgCl2
  MgCl2:2H2O(s)   -18.92     -6.02   12.90  MgCl2:2H2O
  MgCl2:4H2O(s)   -13.46     -6.02    7.44  MgCl2:4H2O
  MgCl2:H2O(s)    -22.24     -6.02   16.22  MgCl2:H2O
  Na(cr)          -52.30     -6.41   45.89  Na
  Na2O(cr)        -63.27      4.19   67.46  Na2O
  O2(g)           -49.09    -51.99   -2.90  O2
  Periclase       -15.22      6.36   21.58  MgO
  Portlandite     -16.38      6.43   22.81  Ca(OH)2
  Tachyhydrite    -35.38    -18.00   17.38  Mg2CaCl6:12H2O

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

-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------

Reaction step 1.

Using solution 1.
Using exchange 1.

-----------------------------Exchange composition------------------------------

Z                7.101e+01 mol

                               Equiv-    Equivalent      Log
Species             Moles      alents      Fraction     Gamma

CaZ2              2.213e+01   4.426e+01   6.234e-01    -0.000
MgZ2              1.310e+01   2.621e+01   3.691e-01    -0.000
NaZ               5.363e-01   5.363e-01   7.553e-03    -0.000

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

Elements           Molality       Moles

Ca                5.200e-03   3.120e+00
Cl                2.420e-02   1.452e+01
Mg                4.562e-03   2.737e+00
Na                4.638e-03   2.783e+00

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

                                       pH  =   4.500      Charge balance
                                       pe  =   4.025      Adjusted to redox equilibrium
                        Activity of water  =   0.999
                 Ionic strength (mol/kgw)  =   3.371e-02
                       Mass of water (kg)  =   6.000e+02
                 Total alkalinity (eq/kg)  =  -3.720e-05
                         Temperature (캜)  =  25.00
                  Electrical balance (eq)  =   4.958e-14
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =   0.00
                               Iterations  =  14
                         Gamma iterations  =   3
                      Osmotic coefficient  =   0.91549
                                  Total H  = 6.661044e+04
                                  Total O  = 3.330521e+04

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

                                               Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma    cm?mol

   H+              3.720e-05   3.162e-05    -4.429    -4.500    -0.071      0.00
   H2O-0.01        9.109e-10   9.109e-10    -9.041    -9.041    -0.000     (0) 
   OH-             3.741e-10   3.160e-10    -9.427    -9.500    -0.073     (0) 
   H2O             5.551e+01   9.994e-01     1.744    -0.000     0.000     18.07
Ca            5.200e-03
   Ca+2            5.200e-03   2.665e-03    -2.284    -2.574    -0.290     (0) 
   Ca(OH)+         1.655e-11   1.398e-11   -10.781   -10.855    -0.073     (0) 
Cl            2.420e-02
   Cl-             2.407e-02   2.041e-02    -1.618    -1.690    -0.072     (0) 
   MgCl+           1.234e-04   1.042e-04    -3.909    -3.982    -0.073     (0) 
   Cl2             0.000e+00   0.000e+00   -42.540   -42.540     0.000     (0) 
   ClO4-           0.000e+00   0.000e+00  -121.210  -121.280    -0.071     (0) 
H(0)          1.482e-20
   H2              7.409e-21   7.409e-21   -20.130   -20.130     0.000     (0) 
Mg            4.562e-03
   Mg+2            4.438e-03   2.281e-03    -2.353    -2.642    -0.289     (0) 
   MgCl+           1.234e-04   1.042e-04    -3.909    -3.982    -0.073     (0) 
   Mg(OH)+         1.783e-10   1.506e-10    -9.749    -9.822    -0.073     (0) 
   Mg4(OH)4+4      7.179e-32   4.800e-33   -31.144   -32.319    -1.175     (0) 
Na            4.638e-03
   Na+             4.638e-03   3.923e-03    -2.334    -2.406    -0.073     (0) 
O(0)          0.000e+00
   O2              0.000e+00   0.000e+00   -51.890   -51.890     0.000     (0) 

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

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

  Antarcticite     -9.90     -5.96    3.94  CaCl2:6H2O
  Bischofite      -10.48     -6.02    4.46  MgCl2:6H2O
  Brucite         -10.74      6.36   17.10  Mg(OH)2
  Ca(cr)         -107.47    -10.62   96.85  Ca
  Ca2Cl2(OH)2:H2O(s) -26.06      0.47   26.53  Ca2Cl2(OH)2:H2O
  Ca4Cl2(OH)6:13H2O(s) -55.41     13.32   68.73  Ca4Cl2(OH)6:13H2O
  CaCl2:2H2O(cr)  -13.91     -5.96    7.95  CaCl2:2H2O
  CaCl2:4H2O(cr)  -11.31     -5.96    5.35  CaCl2:4H2O
  CaCl2:H2O(s)    -13.80     -5.95    7.85  CaCl2:H2O
  CaO(cr)         -26.27      6.43   32.70  CaO
  Cl2(g)          -41.31      4.67   45.98  Cl2
  H2(g)           -17.05    -17.05    0.00  H2
  H2O(g)           -1.50    -43.00  -41.50  H2O
  Halite           -5.69     -4.10    1.59  NaCl
  HCl(g)          -12.48     -6.19    6.29  HCl
  Hydrophilite    -17.72     -5.95   11.77  CaCl2
  Mg(cr)          -90.47    -10.69   79.78  Mg
  Mg-oxychlorur   -19.51      6.52   26.03  Mg2Cl(OH)3:4H2O
  MgCl2(s)        -28.05     -6.02   22.03  MgCl2
  MgCl2:2H2O(s)   -18.92     -6.02   12.90  MgCl2:2H2O
  MgCl2:4H2O(s)   -13.46     -6.02    7.44  MgCl2:4H2O
  MgCl2:H2O(s)    -22.24     -6.02   16.22  MgCl2:H2O
  Na(cr)          -52.32     -6.43   45.89  Na
  Na2O(cr)        -63.27      4.19   67.46  Na2O
  O2(g)           -48.99    -51.89   -2.90  O2
  Periclase       -15.22      6.36   21.58  MgO
  Portlandite     -16.38      6.43   22.81  Ca(OH)2
  Tachyhydrite    -35.38    -18.00   17.38  Mg2CaCl6:12H2O

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

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

------------------------------------
Reading input data for simulation 5.
------------------------------------

     SELECTED_OUTPUT
     reset false
     file HWANG.txt
     USER_PUNCH
     headings cb nonO nonH Ca Cl Mg Na NaZ CaZ2 MgZ2
     start
     10 punch charge_balance/TOT("Water"), (TOTMOLE("O")-TOT("Water")/GFW("H2O")*1000)/TOT("Water")*1000, (TOTMOLE("H")-2*TOT("Water")/GFW("H2O")*1000)/TOT("Water")*1000, TOT("Ca")*1000, TOT("Cl")*1000, TOT("Mg")*1000, TOT("Na")*1000
     20 punch MOL("NaZ")*TOT("Water"), MOL("CaZ2")*TOT("Water"), MOL("MgZ2")*TOT("Water")
     end
     END
------------------
End of simulation.
------------------

------------------------------------
Reading input data for simulation 6.
------------------------------------

     RUN_CELLS
     -cells 1
     END
--------------------------
Beginning of run as cells.
--------------------------

-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------

Reaction step 1.

Using solution 1.
Using exchange 1.

-----------------------------Exchange composition------------------------------

Z                7.101e+01 mol

                               Equiv-    Equivalent      Log
Species             Moles      alents      Fraction     Gamma

CaZ2              2.213e+01   4.426e+01   6.234e-01    -0.000
MgZ2              1.310e+01   2.621e+01   3.691e-01    -0.000
NaZ               5.363e-01   5.363e-01   7.553e-03    -0.000

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

Elements           Molality       Moles

Ca                5.200e-03   3.120e+00
Cl                2.420e-02   1.452e+01
Mg                4.562e-03   2.737e+00
Na                4.638e-03   2.783e+00

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

                                       pH  =   4.500      Charge balance
                                       pe  =   4.025      Adjusted to redox equilibrium
                        Activity of water  =   0.999
                 Ionic strength (mol/kgw)  =   3.371e-02
                       Mass of water (kg)  =   6.000e+02
                 Total alkalinity (eq/kg)  =  -3.720e-05
                         Temperature (캜)  =  25.00
                  Electrical balance (eq)  =   4.958e-14
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =   0.00
                               Iterations  =  14
                         Gamma iterations  =   3
                      Osmotic coefficient  =   0.91549
                                  Total H  = 6.661044e+04
                                  Total O  = 3.330521e+04

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

                                               Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma    cm?mol

   H+              3.720e-05   3.162e-05    -4.429    -4.500    -0.071      0.00
   H2O-0.01        9.109e-10   9.109e-10    -9.041    -9.041    -0.000     (0) 
   OH-             3.741e-10   3.160e-10    -9.427    -9.500    -0.073     (0) 
   H2O             5.551e+01   9.994e-01     1.744    -0.000     0.000     18.07
Ca            5.200e-03
   Ca+2            5.200e-03   2.665e-03    -2.284    -2.574    -0.290     (0) 
   Ca(OH)+         1.655e-11   1.398e-11   -10.781   -10.855    -0.073     (0) 
Cl            2.420e-02
   Cl-             2.407e-02   2.041e-02    -1.618    -1.690    -0.072     (0) 
   MgCl+           1.234e-04   1.042e-04    -3.909    -3.982    -0.073     (0) 
   Cl2             0.000e+00   0.000e+00   -42.540   -42.540     0.000     (0) 
   ClO4-           0.000e+00   0.000e+00  -121.210  -121.280    -0.071     (0) 
H(0)          1.482e-20
   H2              7.409e-21   7.409e-21   -20.130   -20.130     0.000     (0) 
Mg            4.562e-03
   Mg+2            4.438e-03   2.281e-03    -2.353    -2.642    -0.289     (0) 
   MgCl+           1.234e-04   1.042e-04    -3.909    -3.982    -0.073     (0) 
   Mg(OH)+         1.783e-10   1.506e-10    -9.749    -9.822    -0.073     (0) 
   Mg4(OH)4+4      7.179e-32   4.800e-33   -31.144   -32.319    -1.175     (0) 
Na            4.638e-03
   Na+             4.638e-03   3.923e-03    -2.334    -2.406    -0.073     (0) 
O(0)          0.000e+00
   O2              0.000e+00   0.000e+00   -51.890   -51.890     0.000     (0) 

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

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

  Antarcticite     -9.90     -5.96    3.94  CaCl2:6H2O
  Bischofite      -10.48     -6.02    4.46  MgCl2:6H2O
  Brucite         -10.74      6.36   17.10  Mg(OH)2
  Ca(cr)         -107.47    -10.62   96.85  Ca
  Ca2Cl2(OH)2:H2O(s) -26.06      0.47   26.53  Ca2Cl2(OH)2:H2O
  Ca4Cl2(OH)6:13H2O(s) -55.41     13.32   68.73  Ca4Cl2(OH)6:13H2O
  CaCl2:2H2O(cr)  -13.91     -5.96    7.95  CaCl2:2H2O
  CaCl2:4H2O(cr)  -11.31     -5.96    5.35  CaCl2:4H2O
  CaCl2:H2O(s)    -13.80     -5.95    7.85  CaCl2:H2O
  CaO(cr)         -26.27      6.43   32.70  CaO
  Cl2(g)          -41.31      4.67   45.98  Cl2
  H2(g)           -17.05    -17.05    0.00  H2
  H2O(g)           -1.50    -43.00  -41.50  H2O
  Halite           -5.69     -4.10    1.59  NaCl
  HCl(g)          -12.48     -6.19    6.29  HCl
  Hydrophilite    -17.72     -5.95   11.77  CaCl2
  Mg(cr)          -90.47    -10.69   79.78  Mg
  Mg-oxychlorur   -19.51      6.52   26.03  Mg2Cl(OH)3:4H2O
  MgCl2(s)        -28.05     -6.02   22.03  MgCl2
  MgCl2:2H2O(s)   -18.92     -6.02   12.90  MgCl2:2H2O
  MgCl2:4H2O(s)   -13.46     -6.02    7.44  MgCl2:4H2O
  MgCl2:H2O(s)    -22.24     -6.02   16.22  MgCl2:H2O
  Na(cr)          -52.32     -6.43   45.89  Na
  Na2O(cr)        -63.27      4.19   67.46  Na2O
  O2(g)           -48.99    -51.89   -2.90  O2
  Periclase       -15.22      6.36   21.58  MgO
  Portlandite     -16.38      6.43   22.81  Ca(OH)2
  Tachyhydrite    -35.38    -18.00   17.38  Mg2CaCl6:12H2O

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

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

------------------------------------
Reading input data for simulation 7.
------------------------------------

     SOLUTION_MODIFY 1
     -total_o 3.330520893551067274529486894608e+04
     -total_h 6.661043500227773620281368494034e+04
     -cb -6.290252240873866265516745178049e-14
     -totals
     Ca 3.180500991093322848968227845035e+00
     Cl 6.407336683262156995510849810671e+00
     Mg 9.663343665806132035123177104197e-03
     Na 9.876762830217662714193949113906e-03
     EXCHANGE_MODIFY 1
      -component Z
      -totals
      Na 9.939102527107890328039729865850e-02
      Ca 4.168613857675806499969439755660e+00
      Mg 2.469619224842378724105174114811e+00
      Z 1.337585719030744968449653242715e+01
     RUN_CELLS
     -cells 1
     END
--------------------------
Beginning of run as cells.
--------------------------

-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------

Reaction step 1.

Using solution 1.
Using exchange 1.

-----------------------------Exchange composition------------------------------

Z                7.101e+01 mol

                               Equiv-    Equivalent      Log
Species             Moles      alents      Fraction     Gamma

CaZ2              2.360e+01   4.719e+01   6.646e-01     0.000
MgZ2              1.185e+01   2.370e+01   3.338e-01     0.000
NaZ               1.116e-01   1.116e-01   1.571e-03     0.000

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

Elements           Molality       Moles

Ca                2.859e-03   1.716e+00
Cl                1.068e-02   6.407e+00
Mg                2.104e-03   1.262e+00
Na                7.243e-04   4.346e-01

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

                                       pH  =   4.597      Charge balance
                                       pe  =   3.949      Adjusted to redox equilibrium
                        Activity of water  =   1.000
                 Ionic strength (mol/kgw)  =   1.558e-02
                       Mass of water (kg)  =   6.000e+02
                 Total alkalinity (eq/kg)  =  -2.855e-05
                         Temperature (캜)  =  25.00
                  Electrical balance (eq)  =  -1.267e-12
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =  -0.00
                               Iterations  =  12
                         Gamma iterations  =   3
                      Osmotic coefficient  =   0.92946
                                  Total H  = 6.661044e+04
                                  Total O  = 3.330521e+04

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

                                               Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma    cm?mol

   H+              2.855e-05   2.531e-05    -4.544    -4.597    -0.052      0.00
   H2O-0.01        9.128e-10   9.128e-10    -9.040    -9.040    -0.000     (0) 
   OH-             4.469e-10   3.950e-10    -9.350    -9.403    -0.054     (0) 
   H2O             5.551e+01   9.997e-01     1.744    -0.000     0.000     18.07
Ca            2.859e-03
   Ca+2            2.859e-03   1.751e-03    -2.544    -2.757    -0.213     (0) 
   Ca(OH)+         1.299e-11   1.148e-11   -10.887   -10.940    -0.054     (0) 
Cl            1.068e-02
   Cl-             1.065e-02   9.429e-03    -1.973    -2.026    -0.053     (0) 
   MgCl+           3.036e-05   2.683e-05    -4.518    -4.571    -0.054     (0) 
   Cl2             0.000e+00   0.000e+00   -43.363   -43.363     0.000     (0) 
   ClO4-           0.000e+00   0.000e+00  -121.400  -121.452    -0.052     (0) 
H(0)          1.349e-20
   H2              6.744e-21   6.744e-21   -20.171   -20.171     0.000     (0) 
Mg            2.104e-03
   Mg+2            2.073e-03   1.271e-03    -2.683    -2.896    -0.212     (0) 
   MgCl+           3.036e-05   2.683e-05    -4.518    -4.571    -0.054     (0) 
   Mg(OH)+         1.187e-10   1.049e-10    -9.926    -9.979    -0.054     (0) 
   Mg4(OH)4+4      8.148e-33   1.130e-33   -32.089   -32.947    -0.858     (0) 
Na            7.243e-04
   Na+             7.243e-04   6.407e-04    -3.140    -3.193    -0.053     (0) 
O(0)          0.000e+00
   O2              0.000e+00   0.000e+00   -51.808   -51.808     0.000     (0) 

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

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

  Antarcticite    -10.75     -6.81    3.94  CaCl2:6H2O
  Bischofite      -11.41     -6.95    4.46  MgCl2:6H2O
  Brucite         -10.80      6.30   17.10  Mg(OH)2
  Ca(cr)         -107.50    -10.65   96.85  Ca
  Ca2Cl2(OH)2:H2O(s) -26.90     -0.37   26.53  Ca2Cl2(OH)2:H2O
  Ca4Cl2(OH)6:13H2O(s) -56.23     12.50   68.73  Ca4Cl2(OH)6:13H2O
  CaCl2:2H2O(cr)  -14.76     -6.81    7.95  CaCl2:2H2O
  CaCl2:4H2O(cr)  -12.16     -6.81    5.35  CaCl2:4H2O
  CaCl2:H2O(s)    -14.66     -6.81    7.85  CaCl2:H2O
  CaO(cr)         -26.26      6.44   32.70  CaO
  Cl2(g)          -42.13      3.85   45.98  Cl2
  H2(g)           -17.09    -17.09    0.00  H2
  H2O(g)           -1.50    -43.00  -41.50  H2O
  Halite           -6.81     -5.22    1.59  NaCl
  HCl(g)          -12.91     -6.62    6.29  HCl
  Hydrophilite    -18.58     -6.81   11.77  CaCl2
  Mg(cr)          -90.57    -10.79   79.78  Mg
  Mg-oxychlorur   -20.06      5.97   26.03  Mg2Cl(OH)3:4H2O
  MgCl2(s)        -28.98     -6.95   22.03  MgCl2
  MgCl2:2H2O(s)   -19.85     -6.95   12.90  MgCl2:2H2O
  MgCl2:4H2O(s)   -14.39     -6.95    7.44  MgCl2:4H2O
  MgCl2:H2O(s)    -23.17     -6.95   16.22  MgCl2:H2O
  Na(cr)          -53.03     -7.14   45.89  Na
  Na2O(cr)        -64.65      2.81   67.46  Na2O
  O2(g)           -48.91    -51.81   -2.90  O2
  Periclase       -15.28      6.30   21.58  MgO
  Portlandite     -16.37      6.44   22.81  Ca(OH)2
  Tachyhydrite    -38.08    -20.70   17.38  Mg2CaCl6:12H2O

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

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

------------------------------------
Reading input data for simulation 8.
------------------------------------

     SOLUTION_MODIFY 1
     -total_o 3.330520893551046901848167181015e+04
     -total_h 6.661043499097191670443862676620e+04
     -cb -2.496252688522365502697670978422e-14
     -totals
     Ca 3.177591862254799170983687872649e+00
     Cl 6.390450499028672126655692409258e+00
     Mg 6.726392894227745979096599882041e-03
     Na 4.937391567652786930620045779960e-03
     EXCHANGE_MODIFY 1
      -component Z
      -totals
      Na 5.354419713161577554227932296271e-02
      Ca 5.332282044833786649462581408443e+00
      Mg 2.783219071078864459423130028881e+00
      Z 1.628454642895691861781415354926e+01
     RUN_CELLS
     -cells 1
     END
--------------------------
Beginning of run as cells.
--------------------------

-----------------------------------------
Beginning of batch-reaction calculations.
-----------------------------------------

Reaction step 1.

Using solution 1.
Using exchange 1.

-----------------------------Exchange composition------------------------------

Z                7.101e+01 mol

                               Equiv-    Equivalent      Log
Species             Moles      alents      Fraction     Gamma

CaZ2              2.484e+01   4.969e+01   6.998e-01     0.000
MgZ2              1.065e+01   2.129e+01   2.999e-01     0.000
NaZ               2.320e-02   2.320e-02   3.268e-04     0.000

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

Elements           Molality       Moles

Ca                3.215e-03   1.929e+00
Cl                1.065e-02   6.390e+00
Mg                2.018e-03   1.211e+00
Na                1.555e-04   9.332e-02

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

                                       pH  =   4.604      Charge balance
                                       pe  =  -2.797      Adjusted to redox equilibrium
                        Activity of water  =   1.000
                 Ionic strength (mol/kgw)  =   1.583e-02
                       Mass of water (kg)  =   6.000e+02
                 Total alkalinity (eq/kg)  =  -2.813e-05
                         Temperature (캜)  =  25.00
                  Electrical balance (eq)  =  -3.717e-12
 Percent error, 100*(Cat-|An|)/(Cat+|An|)  =  -0.00
                               Iterations  =  16
                         Gamma iterations  =   3
                      Osmotic coefficient  =   0.92645
                                  Total H  = 6.661043e+04
                                  Total O  = 3.330521e+04

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

                                               Log       Log       Log    mole V
   Species          Molality    Activity  Molality  Activity     Gamma    cm?mol

   H+              2.813e-05   2.491e-05    -4.551    -4.604    -0.053      0.00
   H2O-0.01        1.066e-09   1.066e-09    -8.972    -8.972    -0.000     (0) 
   OH-             4.544e-10   4.013e-10    -9.343    -9.397    -0.054     (0) 
   H2O             5.551e+01   9.997e-01     1.744    -0.000     0.000     18.07
Ca            3.215e-03
   Ca+2            3.215e-03   1.962e-03    -2.493    -2.707    -0.214     (0) 
   Ca(OH)+         1.480e-11   1.307e-11   -10.830   -10.884    -0.054     (0) 
Cl            1.065e-02
   Cl-             1.062e-02   9.398e-03    -1.974    -2.027    -0.053     (0) 
   MgCl+           2.896e-05   2.558e-05    -4.538    -4.592    -0.054     (0) 
   Cl2             0.000e+00   0.000e+00   -56.858   -56.858     0.000     (0) 
   ClO4-           0.000e+00   0.000e+00  -175.313  -175.366    -0.052     (0) 
H(0)          4.056e-07
   H2              2.028e-07   2.028e-07    -6.693    -6.693     0.000     (0) 
Mg            2.018e-03
   Mg+2            1.989e-03   1.216e-03    -2.701    -2.915    -0.214     (0) 
   MgCl+           2.896e-05   2.558e-05    -4.538    -4.592    -0.054     (0) 
   Mg(OH)+         1.154e-10   1.019e-10    -9.938    -9.992    -0.054     (0) 
   Mg4(OH)4+4      7.356e-33   1.007e-33   -32.133   -32.997    -0.864     (0) 
Na            1.555e-04
   Na+             1.555e-04   1.375e-04    -3.808    -3.862    -0.054     (0) 
O(0)          0.000e+00
   O2              0.000e+00   0.000e+00   -78.764   -78.764     0.000     (0) 

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

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

  Antarcticite    -10.70     -6.76    3.94  CaCl2:6H2O
  Bischofite      -11.43     -6.97    4.46  MgCl2:6H2O
  Brucite         -10.81      6.29   17.10  Mg(OH)2
  Ca(cr)          -93.96      2.89   96.85  Ca
  Ca2Cl2(OH)2:H2O(s) -26.79     -0.26   26.53  Ca2Cl2(OH)2:H2O
  Ca4Cl2(OH)6:13H2O(s) -55.99     12.74   68.73  Ca4Cl2(OH)6:13H2O
  CaCl2:2H2O(cr)  -14.71     -6.76    7.95  CaCl2:2H2O
  CaCl2:4H2O(cr)  -12.11     -6.76    5.35  CaCl2:4H2O
  CaCl2:H2O(s)    -14.61     -6.76    7.85  CaCl2:H2O
  CaO(cr)         -26.20      6.50   32.70  CaO
  Cl2(g)          -55.63     -9.65   45.98  Cl2
  H2(g)            -3.61     -3.61    0.00  H2
  H2O(g)           -1.50    -43.00  -41.50  H2O
  Halite           -7.48     -5.89    1.59  NaCl
  HCl(g)          -12.92     -6.63    6.29  HCl
  Hydrophilite    -18.53     -6.76   11.77  CaCl2
  Mg(cr)          -77.10      2.68   79.78  Mg
  Mg-oxychlorur   -20.08      5.95   26.03  Mg2Cl(OH)3:4H2O
  MgCl2(s)        -29.00     -6.97   22.03  MgCl2
  MgCl2:2H2O(s)   -19.87     -6.97   12.90  MgCl2:2H2O
  MgCl2:4H2O(s)   -14.41     -6.97    7.44  MgCl2:4H2O
  MgCl2:H2O(s)    -23.19     -6.97   16.22  MgCl2:H2O
  Na(cr)          -46.95     -1.06   45.89  Na
  Na2O(cr)        -65.98      1.48   67.46  Na2O
  O2(g)           -75.86    -78.76   -2.90  O2
  Periclase       -15.29      6.29   21.58  MgO
  Portlandite     -16.31      6.50   22.81  Ca(OH)2
  Tachyhydrite    -38.08    -20.70   17.38  Mg2CaCl6:12H2O

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

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

------------------------------------
Reading input data for simulation 9.
------------------------------------

-------------------------------
End of Run after 0.432 Seconds.
-------------------------------

Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4035
Re: Queation about EXCHANGE_MODIFY
« Reply #1 on: 10/07/24 17:32 »
Are you using PhreeqcRM with COMSOL? If not, you should. The following comments apply to PhreeqcRM.

First, I strongly recommend that you use a representative volume of about 1 L for your porous medium so that you have something approximating a liter of water or less in your model cells.

Second, I also recommend that you not use the _MODIFY commands. They should not be necessary.

Further, unless you are somehow transporting the exchangers, the number of exchange sites and exchange composition should not change during transport. It is only when the new solution composition react with the old exchange composition in a cell (RunCells) that both solution and exchange compositions react to the new equilibrium.

The number of exchange sites in the model cell may be modified from the definition in the initial phreeqc definition. It depends on the representative volume and the porosity. See SetUnitsExchange for details.

Your EXCHANGE_MODIFY would need to use the component CaZ2 to modify the exchange composition. (There is a bug in the DUMP routine that sometimes writes the exchange composition twice for a user number. However, the second definition is correct, and overwrites the first definition.)


Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Surface Complexation »
  • Queation about EXCHANGE_MODIFY
 

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