Conceptual Models > Database selection and modification

Adding a multicomponent glass to database

(1/2) > >>

OLIVIA_RH:
Hi there, I am a new user of Phreeqc (just been on the course in Amsterdam which was incredibly useful!). I would like to add a multicomponent glass phase to the database llnl.dat but I am unsure on how to do this.

The data I have access to are a series of logKs from 25 - 250?C; composition of glass (mol fraction); and the reaction e.g. glass + H(+) = SiO2(aq) + Al(3+) + Fe(3+) etc.
This is all the data i needed to add the phase to a database for geochemist workbench however i see that for PHREEQC there are additional parameters. Is this essential? Is there a potential work around if I already have the logKs for the reaction at different temperatures, instead of beginning with the logK at STP and a series of constants to calculate these values?
Any help would be greatly appreciated, thankyou!

 

dlparkhurst:
To define a phase in PHASES, you only need a name, reaction, and log K. You can define temperature dependence with delta_H and the Van't Hoff equation, or you can define an analytical expression that gives the log K as a function of temperature. See the description of the PHASES data block for the analytical expression formula and other options. You may want to fit your temperature dependence data to the analytical expression; you need not use all of the terms of the expression to produce an adequate fit.

I think you probably want a fixed-composition solid, which would be defined with PHASES and implemented with EQUILIBRIUM_PHASES. The other option is to have a SOLID_SOLUTION, which considers a mixture of multiple component phases, each of which is defined in PHASES.

OLIVIA_RH:
Thank you for your response. I have now added defined a new phase called multiglass wit the dissolution reaction and coefficients. I then call this in equilibrium_phases. The script returns a series of errors however. Are these related to erroneous inputs to PHASES?
--- Code: ---Database file: C:\phreeqc\database\LLNL.DAT

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

LLNL_AQUEOUS_MODEL_PARAMETERS
NAMED_EXPRESSIONS
SOLUTION_MASTER_SPECIES
SOLUTION_SPECIES
PHASES
EXCHANGE_MASTER_SPECIES
EXCHANGE_SPECIES
SURFACE_MASTER_SPECIES
SURFACE_SPECIES
RATES
END
------------------------------------
Reading input data for simulation 1.
------------------------------------

DATABASE C:\phreeqc\database\LLNL.DAT
SOLUTION 1
    temp         150
    density     1 calculate
    units       mol/L
    pH           10
EQUILIBRIUM_PHASES 1
MultiGlass 0.0 3.5 dissolve_only
PHASES
     MultiGlass
     MultiGlass + .5535H+ = SiO2(aq) + 0.1326Al+3 + 0.0022Fe+3 0.0257Fe+2 + 0.0013Mn+2 + 9e-4Ca+2 + 0.0655Na+ +0.0269K+ 
     log_k 1.6187         # log K at 25oC. Default: 0.
     analytical_expression -2069.2633 -0.4818 104784.7039 776.5020 -5723203.3359 0.00012492 # where T is temperature in Kelvin.
     vm 31.457 cm3/mol     # molar volume 
RATES
MultiGlass
start
1 Aa     = parms(0)
2 Ac     = parms(1)
3 Eaa    = parms(2)
4 Eac    = parms(3)
4 na     = parms(4)
6 nc     = parms(5)
7 Rg     = parms(6)
8 sigma  = parms(7)
9 T      = temperature + 273.15       # convert ?C to K
10 Hydrogen = activity("H+")
11 sa = parms(8)
12 sur    = sa / 1e4
13 A_val  = SR("MultiGlass")
14 terma = Aa * (Hydrogen^na) * exp(-Eaa/(Rg*T)) * sur
15 termc = Ac * (Hydrogen^nc) * exp(-Eac/(Rg*T)) * sur
16 rateplus = terma + termc
17 rate = rateplus * (1 - A_val^(1/sigma))
18 save rate
end
KINETICS 1
MultiGlass
    m0      3.5          # ~moles of MultiGlass (from 100 cm? of 72.35 g/mol 2.5 g/cm3)
    parms 4.03e-4 0.105 45600 80000 0.30 -0.4 8.314 1 2.65e7
    steps   100           # number of calculation steps (adjust if needed)
    time_steps    691200        # total time in seconds (8 days)
    tol     1e-12
INCREMENTAL_REACTIONS true
SELECTED_OUTPUT
    file             basic_multiglass_dissolution_phreeqc.csv
    totals           Si            # Total dissolved Si (mol/kgw)
    molalities       SiO2          # mol/kgw
    saturation_indices Quartz
    temperature
    time
USER_GRAPH
-headings "Time", "Quartz (mg/kg)"
-chart_title "Quartz dissolution"
-axis_titles "Time (units?" "Si / mg/kg"
19 graph_x total_time
20 graph_y tot("Si")*gfw("SiO2")*1000
-end
END
ERROR: Elements in species have not been tabulated, Fe.
ERROR: Reaction for species has not been defined, Fe.
ERROR: Elements in species have not been tabulated, e.
ERROR: Reaction for species has not been defined, e.
ERROR: Calculations terminating due to input errors.
Stopping.
--- End code ---

dlparkhurst:
You need a balanced chemical reaction for the chemical equation, including the formula of the glass.

I think the following would work, but it is not a balanced reaction. It would be better to account for H and O correctly in the equation.


--- Code: ---PHASES
MultiGlass
SiO2Al0.1326Fe0.0022Fe0.0257Mn0.0013Ca0.0009Na0.0655K0.0269(OH)0.5526 + .5535H+ = SiO2(aq) + 0.1326Al+3 + 0.0022Fe+3 + 0.0257Fe+2 + 0.0013Mn+2 + 0.0009Ca+2 + 0.0655Na+ +0.0269K+
       -no_check
log_k 1.6187           # log K at 25oC. Default: 0.
-analytical_expression -2069.2633 -0.4818 104784.7039 776.5020 -5723203.3359 0.00012492 # where T is temperature in Kelvin.
-vm 31.457 cm3/mol     # molar volume
--- End code ---

OLIVIA_RH:
Thank you for the guidance on this. I believe I have now added Mutliglass as a phase. However, I still appear to be getting errors related to Fe. I have checked the formatting with other entries in the phreeqc database but cannot see a difference. Would you be able to check what i have overlooked here please? Thank you!

--- Code: ---DATABASE C:\phreeqc\database\LLNL.DAT
SOLUTION 1
    temp         150
    density     1 calculate
    units       mol/L
    pH           10
EQUILIBRIUM_PHASES 1
MultiGlass 0.0 3.5 dissolve_only
PHASES
     MultiGlass
     SiO2Al0.1326504481Fe0.0022Fe0.0257Mn0.0037772087Ca0.0027055058Na0.1864276569K0.0765685019P0. + .8408H+ = SiO2(aq) + 0.1327Al+3 + 0.0062Fe+3 0.0732Fe+2 + 0.0038Mn+2 + 0.0027Ca+2 + 0.1864Na+ +0.0755K+ + 0.0001HPO4-2  + 0.4203H2O
     log_k 6.6731         # log K at 25oC. Default: 0.
     analytical_expression -2069.2633 -0.4818 104784.7039 776.5020 -5723203.3359 0.00012492 # where T is temperature in Kelvin.
     vm 35.879 cm3/mol     # molar volume 
RATES
MultiGlass
start
1 Aa     = parms(0)
2 Ac     = parms(1)
3 Eaa    = parms(2)
4 Eac    = parms(3)
4 na     = parms(4)
6 nc     = parms(5)
7 Rg     = parms(6)
8 sigma  = parms(7)
9 T      = temperature + 273.15       # convert ?C to K
10 Hydrogen = activity("H+")
11 sa = parms(8)
12 sur    = sa / 1e4
13 A_val  = SR("MultiGlass")
14 terma = Aa * (Hydrogen^na) * exp(-Eaa/(Rg*T)) * sur
15 termc = Ac * (Hydrogen^nc) * exp(-Eac/(Rg*T)) * sur
16 rateplus = terma + termc
17 rate = rateplus * (1 - A_val^(1/sigma))
18 save rate
end
KINETICS 1
MultiGlass
    m0      3.5          # ~moles of MultiGlass (from 100 cm? of 72.35 g/mol 2.5 g/cm3)
    parms 4.03e-4 0.105 45600 80000 0.30 -0.4 8.314 1 2.65e7
    steps   100           # number of calculation steps (adjust if needed)
    time_steps    691200        # total time in seconds (8 days)
    tol     1e-12
INCREMENTAL_REACTIONS true
SELECTED_OUTPUT
    file             basic_multiglass_dissolution_phreeqc.csv
    totals           Si            # Total dissolved Si (mol/kgw)
    molalities       SiO2          # mol/kgw
    saturation_indices Quartz
    temperature
    time
USER_GRAPH
-headings "Time", "Quartz (mg/kg)"
-chart_title "Quartz dissolution"
-axis_titles "Time (units?" "Si / mg/kg"
19 graph_x total_time
20 graph_y tot("Si")*gfw("SiO2")*1000
-end
END
ERROR: Elements in species have not been tabulated, Fe.
ERROR: Reaction for species has not been defined, Fe.
ERROR: Calculations terminating due to input errors.
Stopping.
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version