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 »
  • Applications and Case Studies »
  • Soil profile geochemistry »
  • Can anyone help me check the code of my simulation process,plz!
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Can anyone help me check the code of my simulation process,plz!  (Read 547 times)

Xavier.Qiu

  • Frequent Contributor
  • Posts: 10
Can anyone help me check the code of my simulation process,plz!
« on: August 12, 2022, 02:12:22 PM »
Hello, I want to do researches related to the simulation of groundwater nuclide species distribution, such as the element Tc,and I have the component list
Code: [Select]
component:mg/L
| Na+ :1036    | Cl- :1193      | SO42- :941.1 |
| NH4+ :0.12  | Mn2+ :0.022 | F- :2.2          |
| Ca2+ :183.0 | Li+ :0.0112   | Br- :0.0001   |
| K+ :15.95     | Sr2+ :0.715  | NO3- :32.60 |
| Mg2+ :50.40 | Al3+ :0.06    | Si4+ :4.22    |
| Fe2+ :0.033  | HCO3- :130.9 |
 Tc(total) :1*10^(-6)mol/L
I am sorry that I can't upload the attachement of the image of component list because the forum says there are some errors.
and the pH of the solution is from 5 to 12. And the relation between pH and pe in the solution is pe = 8.957 − 0.99pH.But the datas that I get is very different from the reference paper. I really need your help, thanks!
And these are the code in my program phreeqc:
Code: [Select]
SELECTED_OUTPUT 3
    -file                 Tc.csv
    -high_precision       false
    -reset                false
    -solution             true
    -pH                   true
    -pe                   true
    -molalities           TcO(OH)2  TcOOH+  TcO+2  HTcO4-
                          TcO4-  TcO4-2  (TcO(OH)2)2
    -inverse_modeling     false

SOLUTION 1
    temp      25
    pH        5
    pe        3.957
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 2
    temp      25
    pH        5.5
    pe        3.457
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Am        1e-006
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 3
    temp      25
    pH        6
    pe        2.957
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 4
    temp      25
    pH        6.5
    pe        2.457
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 5
    temp      25
    pH        7
    pe        1.957
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 6
    temp      25
    pH        7.5
    pe        1.457
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 7
    temp      25
    pH        8
    pe        0.957
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 8
    temp      25
    pH        8.5
    pe        0.457
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 9
    temp      25
    pH        9
    pe        -0.043
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 10
    temp      25
    pH        9.5
    pe        -0.543
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 11
    temp      25
    pH        10
    pe        -1.043
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 12
    temp      25
    pH        10.5
    pe        -1.543
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 13
    temp      25
    pH        11
    pe        -2.043
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 14
    temp      25
    pH        11.5
    pe        -2.543
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg

SOLUTION 15
    temp      25
    pH        12
    pe        -3.043
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Can anyone help me check the code of my simulation process,plz!
« Reply #1 on: August 12, 2022, 05:17:41 PM »
I don't see anything wrong with your code. You do not say what is inconsistent with the reference paper--saturation indices.

I have questions about how the pH varies between 5 and 12. Is it a closed system to CO2? Are acid and base added? You are charge balancing with Cl-, so you are effectively adding and removing HCl from solution in a closed system to obtain the range of pH.

pe is not going to affect any element except Tc, which appears to be in the +7 state in all cases anyway.

The choice of database could make a difference. Neither llnl.dat nor sit.dat have any aqueous species for Tc(7) other than TcO4-. Perhaps the reference paper had a more complete aqueous model, or different definitions of Tc minerals.
Logged

Xavier.Qiu

  • Frequent Contributor
  • Posts: 10
Re: Can anyone help me check the code of my simulation process,plz!
« Reply #2 on: August 12, 2022, 06:52:27 PM »
Thank you for your helpful reply, can I ask another question: how can we get the solubility of  an element, for example, I know the initial concentration of element U, and I want to get the solubility of element U with the changement of pH. But I find that the key word EQUILIBRIUM_PHASES are for definite material, it means that I must get the solubility of every species of material to get the total solubility of the element?Thank you for your patient explanation again!
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Can anyone help me check the code of my simulation process,plz!
« Reply #3 on: August 12, 2022, 10:52:32 PM »
Yes, you must know the equilibrium constants for the relevant uranium minerals.

Several databases have equilibrium constants for a number of uranium minerals. One approach is to look at the saturation indices for uranium minerals under the various pH conditions. Minerals with positive SI could precipitate. You can begin to assemble the set of minerals that might precipitate and include them in EQUILIBRIUM_PHASES.

You could also just include all uranium minerals in EQUILBRIUM_PHASES and PHREEQC should determine the most stable phases. Note that the solubility of other non-uranium minerals will also affect the solution composition and the solubility of uranium minerals.
Logged

Xavier.Qiu

  • Frequent Contributor
  • Posts: 10
Re: Can anyone help me check the code of my simulation process,plz!
« Reply #4 on: August 17, 2022, 03:44:10 AM »
I sincerely thank you, Mr.dlparkhurst!

And could I ask you another question? To calculate the solubility, I think I should know the logIAP at first, so how can I export the logIAP in the keyword Saturation Indice, or are there any other ways to get the solubility?

Thank you again!
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2823
Re: Can anyone help me check the code of my simulation process,plz!
« Reply #5 on: August 17, 2022, 06:23:19 AM »
I don't know an easy way to find the least soluble uranium phase. Not sure I have encountered a problem posed quite like this. Here is a way with a little trial and error.

First, I am assuming the predominant U valence state is U(6). At pH 5, I simply added 1e-2 moles UO2Cl2 to the solution and found a mineral Soddyite that was supersaturated. Then the following script determines the amount of UO2Cl2 that must be added to reach equilibrium with Soddyite (for a given pH). The USER_PRINT block determines all of the uranium minerals that are saturated or supersaturated in the solution that is in equilibrium with Soddyite. If Soddyite is the only mineral listed in USER_PRINT output, then you have found the mineral with the lowest solubility. If other minerals are supersaturated, then you would have to rerun the calculation, replacing Soddyite in EQUILIBRIUM_PHASES with one of the minerals that is supersaturated. You would have to repeat the process until you find the mineral with the lowest solubility (only one mineral listed in USER_PRINT). In this script, when you equilibrate with Soddyite, you find that Haiweeite and CaUO4 are supersaturated (with CaUO4 having the largest SI). A further run with CaUO4 determines that CaUO4 is the least soluble mineral at a U concentration of 1.2e-9.

You would repeat the whole process at another pH.

Code: [Select]
SOLUTION 1
    temp      25
    pH        10
    pe        3.957
    redox     pe
    units     mg/l
    density   1
    Al        0.06
    Br(-1)    0.0001
    C(4)      130.9
    Ca        183
    Cl(-1)    1193 charge
    F         2.2
    Fe(2)     0.033
    K         15.95
    Li        0.0112
    Mg        50.4
    Mn(2)     0.022
    N(5)      32.6
    Na        1036
    S(6)      941.1
    Tc        1e-006 Mol/l
    Si        4.22
    Sr        0.715
    -water    1 # kg
END
USE solution 1
EQUILIBRIUM_PHASES
Soddyite     0 UO2Cl2 1
USER_PRINT
10 t = SYS("phases", count , name$ , type$ , moles )
20 FOR i = 1 TO count
30  IF SI(name$(i)) < -1e-4 THEN GOTO 100
40  s$ = PHASE_FORMULA (name$(i), pcount , elt$ , pcoef)
50  FOR j = 1 TO pcount
60    IF elt$(j) = "U" THEN PRINT PAD$(name$(i), 15), SI(name$(i)), s$
70  NEXT J
100 NEXT i
END
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Applications and Case Studies »
  • Soil profile geochemistry »
  • Can anyone help me check the code of my simulation process,plz!
 

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