All test cases run. Fixed CALCULATED_VALUES and RATES in Amm.dat and phreeqc.dat

This commit is contained in:
David Parkhurst 2024-03-15 23:20:47 -06:00
parent 5c6d1c5ab1
commit d18452f369
2 changed files with 104 additions and 118 deletions

111
Amm.dat
View File

@ -1554,62 +1554,13 @@ SURFACE_SPECIES
Hfo_wOH + H4SiO4 = Hfo_wH2SiO4- + H+ + H2O ; log_K -3.22
Hfo_wOH + H4SiO4 = Hfo_wHSiO4-2 + 2H+ + H2O ; log_K -11.69
RATES
###########
#Quartz
###########
#
#######
# Example of quartz kinetic rates block:
# KINETICS
# Quartz
# -m0 158.8 # 90 % Qu
# -parms 0.146 1.5
# -step 3.1536e8 in 10
# -tol 1e-12
Quartz
-start
1 REM Specific rate k from Rimstidt and Barnes, 1980, GCA 44,1683
2 REM k = 10^-13.7 mol/m2/s (25 C), Ea = 90 kJ/mol
3 REM sp. rate * parm(2) due to salts (Dove and Rimstidt, MSA Rev. 29, 259)
4 REM PARM(1) = Specific area of Quartz, m^2/mol Quartz
5 REM PARM(2) = salt correction: (1 + 1.5 * c_Na (mM)), < 35
10 dif_temp = 1/TK - 1/298
20 pk_w = 13.7 + 4700.4 * dif_temp
40 moles = PARM(1) * M0 * PARM(2) * (M/M0)^0.67 * 10^-pk_w * (1 - SR("Quartz"))
# Integrate...
50 SAVE moles * TIME
-end
CALCULATE_VALUES
#INCLUDE$ \phreeqc\database\kinetic_rates.dat
# Loads subroutines for calculating mineral dissolution rates compiled by Palandri and Kharaka (2004), Sverdrup et al. (2019), and Hermanska et al., 2022, 2023.
# Numbers can be copied from the tables in the publications; when unavailable enter -30 for log_k, 0 for exponents and 1 for other parameters.
# The data are entered in a KINETICS block with -parms, the 'parms' are stored in memory by the RATES block, and used by Calc_value("name").
# For example:
# KINETICS 1
# Albite_PK
# -formula NaAlSi3O8
# # parms affinity_factor m^2/mol roughness, lgkH e_H nH, lgkH2O e_H2O, lgkOH e_OH nOH
# # parm number 1 2 3, 4 5 6, 7 8, 9 10 11
# -parms 0 1 1, -10.16 65.0 0.457, -12.56 69.8, -15.60 71.0 -0.572 # parms 4-11 from TABLE 13
# In the RATES block, the parms are stored in memory (put(parm(i), -99, i)), and retrieved by the subroutine calc_value("Palandri_rate"), as e.g. roughness = get(-99, 3).
# RATES
# Albite_PK # Palandri and Kharaka, 2004
# 10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
# 20 put(affinity, -99, 1) # store number in memory
# 30 for i = 2 to 11 : put(parm(i), -99, i) : next i
# 40 SAVE calc_value("Palandri_rate")
# -end
# For an example file using the rates, see: kinetic_rates.phr from https://www.hydrochemistry.eu/exmpls/kin_silicates.html
# References
@ -1640,15 +1591,6 @@ Quartz
# 40 SAVE calc_value("Palandri_rate")
# -end
# For an example file using the rates, see: kinetic_rates.phr in https://www.hydrochemistry.eu/exmpls/kin_silicates.html
# References
# Palandri, J.L. and Kharaka, J.K. (2004). A compilation of rate parameters of water-mineral interaction kinetics for application to geochemical modeling. USGS Open-File Report 2004-1068.
# Sverdrup, H.U., Oelkers, E., Erlandsson Lampa, M., Belyazid, S., Kurz, D. and Akselsson, C. (2019). Reviews and Syntheses: weathering of silicate minerals in soils and watersheds: parameterization of the weathering kinetics module in the PROFILE and ForSAFE models. Biogeosciences Discuss. 1-58.
# Hermanská, M., Voigt, M.J., Marieni, C., Declercq, J. and Oelkers, E.H., 2022. A comprehensive and internally consistent mineral dissolution rate database: Part I: Primary silicate minerals and glasses. Chemical Geology, 597, p.120807
# Hermanská, M., Voigt, M.J., Marieni, C., Declercq, J. and Oelkers, E.H., 2023. A comprehensive and consistent mineral dissolution rate database: Part II: Secondary silicate minerals. Chemical Geology, p.121632.
CALCULATE_VALUES
Palandri_rate
# in KINETICS, define 11 parms:
# affinity_factor m^2/mol roughness, lgkH e_H nH, lgkH2O e_H2O, lgkOH e_OH nOH
@ -1770,6 +1712,36 @@ Hermanska_rate
250 SAVE rate * TIME
-end
RATES
###########
#Quartz
###########
#
#######
# Example of quartz kinetic rates block:
# KINETICS
# Quartz
# -m0 158.8 # 90 % Qu
# -parms 0.146 1.5
# -step 3.1536e8 in 10
# -tol 1e-12
Quartz
-start
1 REM Specific rate k from Rimstidt and Barnes, 1980, GCA 44,1683
2 REM k = 10^-13.7 mol/m2/s (25 C), Ea = 90 kJ/mol
3 REM sp. rate * parm(2) due to salts (Dove and Rimstidt, MSA Rev. 29, 259)
4 REM PARM(1) = Specific area of Quartz, m^2/mol Quartz
5 REM PARM(2) = salt correction: (1 + 1.5 * c_Na (mM)), < 35
10 dif_temp = 1/TK - 1/298
20 pk_w = 13.7 + 4700.4 * dif_temp
40 moles = PARM(1) * M0 * PARM(2) * (M/M0)^0.67 * 10^-pk_w * (1 - SR("Quartz"))
# Integrate...
50 SAVE moles * TIME
-end
###########
#K-feldspar
###########
@ -2042,6 +2014,27 @@ Pyrolusite
110 moles = 2e-3 * 6.98e-5 * (1 - sr_pl) * TIME
200 SAVE moles * SOLN_VOL
-end
Albite_PK # Palandri and Kharaka, 2004
10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
20 put(affinity, -99, 1) # store value in memory
30 for i = 2 to 11 : put(parm(i), -99, i) : next i
40 SAVE calc_value("Palandri_rate")
-end
Albite_Svd # Sverdrup, 2019
10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
20 put(affinity, -99, 1)
30 for i = 2 to 34 : put(parm(i), -99, i) : next i
40 save calc_value("Sverdrup_rate")
-end
Albite_Hermanska # Hermanska et al., 2022, 2023
10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
20 put(affinity, -99, 1) # store value in memory
30 for i = 2 to 14 : put(parm(i), -99, i) : next i
40 SAVE calc_value("Hermanska_rate")
-end
END
# =============================================================================================
#(a) means amorphous. (d) means disordered, or less crystalline.

View File

@ -1566,62 +1566,13 @@ SURFACE_SPECIES
Hfo_wOH + H4SiO4 = Hfo_wH2SiO4- + H+ + H2O ; log_K -3.22
Hfo_wOH + H4SiO4 = Hfo_wHSiO4-2 + 2H+ + H2O ; log_K -11.69
RATES
###########
#Quartz
###########
#
#######
# Example of quartz kinetic rates block:
# KINETICS
# Quartz
# -m0 158.8 # 90 % Qu
# -parms 0.146 1.5
# -step 3.1536e8 in 10
# -tol 1e-12
Quartz
-start
1 REM Specific rate k from Rimstidt and Barnes, 1980, GCA 44,1683
2 REM k = 10^-13.7 mol/m2/s (25 C), Ea = 90 kJ/mol
3 REM sp. rate * parm(2) due to salts (Dove and Rimstidt, MSA Rev. 29, 259)
4 REM PARM(1) = Specific area of Quartz, m^2/mol Quartz
5 REM PARM(2) = salt correction: (1 + 1.5 * c_Na (mM)), < 35
10 dif_temp = 1/TK - 1/298
20 pk_w = 13.7 + 4700.4 * dif_temp
40 moles = PARM(1) * M0 * PARM(2) * (M/M0)^0.67 * 10^-pk_w * (1 - SR("Quartz"))
# Integrate...
50 SAVE moles * TIME
-end
CALCULATE_VALUES
#INCLUDE$ \phreeqc\database\kinetic_rates.dat
# Loads subroutines for calculating mineral dissolution rates compiled by Palandri and Kharaka (2004), Sverdrup et al. (2019), and Hermanska et al., 2022, 2023.
# Numbers can be copied from the tables in the publications; when unavailable enter -30 for log_k, 0 for exponents and 1 for other parameters.
# The data are entered in a KINETICS block with -parms, the 'parms' are stored in memory by the RATES block, and used by Calc_value("name").
# For example:
# KINETICS 1
# Albite_PK
# -formula NaAlSi3O8
# # parms affinity_factor m^2/mol roughness, lgkH e_H nH, lgkH2O e_H2O, lgkOH e_OH nOH
# # parm number 1 2 3, 4 5 6, 7 8, 9 10 11
# -parms 0 1 1, -10.16 65.0 0.457, -12.56 69.8, -15.60 71.0 -0.572 # parms 4-11 from TABLE 13
# In the RATES block, the parms are stored in memory (put(parm(i), -99, i)), and retrieved by the subroutine calc_value("Palandri_rate"), as e.g. roughness = get(-99, 3).
# RATES
# Albite_PK # Palandri and Kharaka, 2004
# 10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
# 20 put(affinity, -99, 1) # store number in memory
# 30 for i = 2 to 11 : put(parm(i), -99, i) : next i
# 40 SAVE calc_value("Palandri_rate")
# -end
# For an example file using the rates, see: kinetic_rates.phr from https://www.hydrochemistry.eu/exmpls/kin_silicates.html
# References
@ -1652,15 +1603,6 @@ Quartz
# 40 SAVE calc_value("Palandri_rate")
# -end
# For an example file using the rates, see: kinetic_rates.phr in https://www.hydrochemistry.eu/exmpls/kin_silicates.html
# References
# Palandri, J.L. and Kharaka, J.K. (2004). A compilation of rate parameters of water-mineral interaction kinetics for application to geochemical modeling. USGS Open-File Report 2004-1068.
# Sverdrup, H.U., Oelkers, E., Erlandsson Lampa, M., Belyazid, S., Kurz, D. and Akselsson, C. (2019). Reviews and Syntheses: weathering of silicate minerals in soils and watersheds: parameterization of the weathering kinetics module in the PROFILE and ForSAFE models. Biogeosciences Discuss. 1-58.
# Hermanská, M., Voigt, M.J., Marieni, C., Declercq, J. and Oelkers, E.H., 2022. A comprehensive and internally consistent mineral dissolution rate database: Part I: Primary silicate minerals and glasses. Chemical Geology, 597, p.120807
# Hermanská, M., Voigt, M.J., Marieni, C., Declercq, J. and Oelkers, E.H., 2023. A comprehensive and consistent mineral dissolution rate database: Part II: Secondary silicate minerals. Chemical Geology, p.121632.
CALCULATE_VALUES
Palandri_rate
# in KINETICS, define 11 parms:
# affinity_factor m^2/mol roughness, lgkH e_H nH, lgkH2O e_H2O, lgkOH e_OH nOH
@ -1782,6 +1724,36 @@ Hermanska_rate
250 SAVE rate * TIME
-end
RATES
###########
#Quartz
###########
#
#######
# Example of quartz kinetic rates block:
# KINETICS
# Quartz
# -m0 158.8 # 90 % Qu
# -parms 0.146 1.5
# -step 3.1536e8 in 10
# -tol 1e-12
Quartz
-start
1 REM Specific rate k from Rimstidt and Barnes, 1980, GCA 44,1683
2 REM k = 10^-13.7 mol/m2/s (25 C), Ea = 90 kJ/mol
3 REM sp. rate * parm(2) due to salts (Dove and Rimstidt, MSA Rev. 29, 259)
4 REM PARM(1) = Specific area of Quartz, m^2/mol Quartz
5 REM PARM(2) = salt correction: (1 + 1.5 * c_Na (mM)), < 35
10 dif_temp = 1/TK - 1/298
20 pk_w = 13.7 + 4700.4 * dif_temp
40 moles = PARM(1) * M0 * PARM(2) * (M/M0)^0.67 * 10^-pk_w * (1 - SR("Quartz"))
# Integrate...
50 SAVE moles * TIME
-end
###########
#K-feldspar
###########
@ -2054,6 +2026,27 @@ Pyrolusite
110 moles = 2e-3 * 6.98e-5 * (1 - sr_pl) * TIME
200 SAVE moles * SOLN_VOL
-end
Albite_PK # Palandri and Kharaka, 2004
10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
20 put(affinity, -99, 1) # store value in memory
30 for i = 2 to 11 : put(parm(i), -99, i) : next i
40 SAVE calc_value("Palandri_rate")
-end
Albite_Svd # Sverdrup, 2019
10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
20 put(affinity, -99, 1)
30 for i = 2 to 34 : put(parm(i), -99, i) : next i
40 save calc_value("Sverdrup_rate")
-end
Albite_Hermanska # Hermanska et al., 2022, 2023
10 if parm(1) = 1 then affinity = 1 else affinity = 1 - SR("Albite") : if affinity < parm(1) then SAVE 0 : END
20 put(affinity, -99, 1) # store value in memory
30 for i = 2 to 14 : put(parm(i), -99, i) : next i
40 SAVE calc_value("Hermanska_rate")
-end
END
# =============================================================================================
#(a) means amorphous. (d) means disordered, or less crystalline.