mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 00:28:23 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
948f243907
@ -580,6 +580,7 @@ Al+3 + 4 H2O = Al(OH)4- + 4 H+
|
||||
-delta_h 42.30 kcal
|
||||
-analytic 51.578 0.0 -11168.9 -14.865
|
||||
-gamma 4.5 0
|
||||
-dw 1.04e-9 # Mackin & Aller, 1983, GCA 47, 959
|
||||
Al+3 + SO4-2 = AlSO4+
|
||||
-log_k 3.5
|
||||
-delta_h 2.29 kcal
|
||||
@ -897,7 +898,7 @@ Calcite
|
||||
CaCO3 = CO3-2 + Ca+2
|
||||
-log_k -8.48
|
||||
-delta_h -2.297 kcal
|
||||
-analytic -171.9065 -0.077993 2839.319 71.595
|
||||
-analytic 17.118 -0.046528 -3496 # 0 - 250°C, Ellis, 1959, Plummer and Busenberg, 1982
|
||||
-Vm 36.9 cm3/mol # MW (100.09 g/mol) / rho (2.71 g/cm3)
|
||||
Aragonite
|
||||
CaCO3 = CO3-2 + Ca+2
|
||||
@ -909,6 +910,7 @@ Dolomite
|
||||
CaMg(CO3)2 = Ca+2 + Mg+2 + 2 CO3-2
|
||||
-log_k -17.09
|
||||
-delta_h -9.436 kcal
|
||||
-analytic 31.283 -0.0898 -6438 # 25°C: Hemingway and Robie, 1994; 50–175°C: Bénézeth et al., 2018, GCA 224, 262-275.
|
||||
-Vm 64.5
|
||||
Siderite
|
||||
FeCO3 = Fe+2 + CO3-2
|
||||
@ -1780,7 +1782,12 @@ Pyrolusite
|
||||
200 SAVE moles * SOLN_VOL
|
||||
-end
|
||||
END
|
||||
|
||||
# =============================================================================================
|
||||
#(a) means amorphous. (d) means disordered, or less crystalline.
|
||||
#(14A) refers to 14 angstrom spacing of clay planes. FeS(ppt),
|
||||
#precipitated, indicates an initial precipitate that is less crystalline.
|
||||
#Zn(OH)2(e) indicates a specific crystal form, epsilon.
|
||||
# =============================================================================================
|
||||
# For the reaction aA + bB = cC + dD,
|
||||
# with delta_v = c*Vm(C) + d*Vm(D) - a*Vm(A) - b*Vm(B),
|
||||
# PHREEQC adds the pressure term to log_k: -= delta_v * (P - 1) / (2.3RT).
|
||||
@ -1817,11 +1824,10 @@ END
|
||||
# a0 = -gamma x for cations, = 0 for anions.
|
||||
# For details, consult ref. 1.
|
||||
#
|
||||
# ref. 1: Appelo, Parkhurst and Post, 2014. Geochim. Cosmochim. Acta 125, 49-67.
|
||||
# ref. 1: Appelo, Parkhurst and Post, 2014. Geochim. Cosmochim. Acta 125, 49–67.
|
||||
# ref. 2: Procedures from ref. 1 using data compiled by Laliberté, 2009, J. Chem. Eng. Data 54, 1725.
|
||||
# ref. 3: Appelo, 2017, Cem. Concr. Res. 101, 102-113.
|
||||
#
|
||||
# =============================================================================================
|
||||
# It remains the responsibility of the user to check the calculated results, for example with
|
||||
# measured solubilities as a function of (P, T).
|
||||
|
||||
|
||||
158
database/OtherDatabases/Concrete_PHR.dat
Normal file
158
database/OtherDatabases/Concrete_PHR.dat
Normal file
@ -0,0 +1,158 @@
|
||||
# Concrete minerals
|
||||
# Read this file in your input file with
|
||||
# INCLUDE$ c:\phreeqc\database\concrete_phr.dat
|
||||
|
||||
PRINT; -reset false
|
||||
|
||||
# # AFm (short for monosulfoaluminate) is an anion-exchanger, with the general formula Ca4Al2(Y-2)(OH)12:6H2O.
|
||||
# # Listed are the solubilities of end-members in the neutral form as Y-AFm, and with 5% surface charge as Y-AFmsura.
|
||||
# #
|
||||
# # Example of the combination of the charged AFmsura and charge-balancing EDL calculations:
|
||||
# SURFACE_MASTER_SPECIES
|
||||
# Sura Sura+
|
||||
# SURFACE_SPECIES
|
||||
# Sura+ = Sura+
|
||||
# SOLUTION 1
|
||||
# pH 7 charge
|
||||
# REACTION 1
|
||||
# Ca3O3Al2O3 1 gypsum 1; 0.113 # MW gfw("Ca3O3Al2O3CaSO4(H2O)2") = 442.4. 0.113 for w/s = 20
|
||||
# SAVE solution 2
|
||||
# END
|
||||
|
||||
# RATES
|
||||
# Sum_all_AFmsura # Sums up with the single charge formula, Ca2Al...
|
||||
# 10 tot_ss = 2 * equi("AFmsura")
|
||||
# 20 SAVE (m - tot_ss) * time
|
||||
# -end
|
||||
|
||||
# USE solution 2
|
||||
# EQUILIBRIUM_PHASES 2
|
||||
# AFmsura 0 0
|
||||
# KINETICS 2
|
||||
# Sum_all_AFmsura; -formula H2O 0; -m0 0; -time_step 30
|
||||
# SURFACE 2
|
||||
# Sura Sum_all_AFmsura kin 0.05 8.6e3; -donnan debye 2 ; -equil 1
|
||||
# END
|
||||
|
||||
PHASES
|
||||
Portlandite # Reardon, 1990
|
||||
Ca(OH)2 = Ca+2 + 2 OH-
|
||||
-log_k -5.19; -Vm 33.1
|
||||
|
||||
Gibbsite
|
||||
Al(OH)3 + OH- = Al(OH)4-
|
||||
-log_k -1.123; -Vm 32.2
|
||||
-analyt -7.234 1.068e-2 0 1.1829 # data from Wesolowski, 1992, GCA 56, 1065
|
||||
|
||||
# AFm with a single exchange site...
|
||||
OH-AFm # Appelo, 2021
|
||||
Ca2AlOH(OH)6:6H2O = 2 Ca+2 + Al(OH)4- + 3 OH- + 6 H2O
|
||||
-log_k -12.84; -Vm 185
|
||||
OH-AFmsura
|
||||
Ca2Al(OH)0.95(OH)6:6H2O+0.05 = 2 Ca+2 + Al(OH)4- + OH- + 1.95 OH- + 6 H2O
|
||||
-log_k -12.74; -Vm 185
|
||||
|
||||
Cl-AFm # Friedel's salt. Appelo, 2021
|
||||
Ca2AlCl(OH)6:2H2O = 2 Ca+2 + Al(OH)4- + Cl- + 2 OH- + 2 H2O
|
||||
-log_k -13.68; -Vm 136
|
||||
Cl-AFmsura
|
||||
Ca2AlCl0.95(OH)6:2H2O+0.05 = 2 Ca+2 + Al(OH)4- + 0.95 Cl- + 2 OH- + 2 H2O
|
||||
-log_k -13.59; -Vm 136
|
||||
|
||||
# AFm with a double exchange site...
|
||||
SO4-AFm # Monosulfoaluminate. Appelo, 2021
|
||||
Ca4Al2(SO4)(OH)12:6H2O = 4 Ca+2 + 2 Al(OH)4- + SO4-2 + 4 OH- + 6 H2O
|
||||
-log_k -29.15; -Vm 309
|
||||
SO4-AFmsura
|
||||
Ca4Al2(SO4)0.95(OH)12:6H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.95 SO4-2 + 4 OH- + 6 H2O
|
||||
-log_k -28.88; -Vm 309
|
||||
|
||||
SO4-OH-AFm # Hemisulfoaluminate. Appelo, 2021
|
||||
Ca4Al2(SO4)0.5(OH)(OH)12:9H2O = 4 Ca+2 + 2 Al(OH)4- + 0.5 SO4-2 + 5 OH- + 9 H2O
|
||||
-log_k -27.24; -Vm 340
|
||||
SO4-OH-AFmsura
|
||||
Ca4Al2(SO4)0.475(OH)0.95(OH)12:9H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.475 SO4-2 + 4.95 OH- + 9 H2O
|
||||
-log_k -26.94; -Vm 340
|
||||
|
||||
CO3-AFm # Monocarboaluminate. Appelo, 2021
|
||||
Ca4Al2(CO3)(OH)12:5H2O = 4 Ca+2 + 2 Al(OH)4- + CO3-2 + 4 OH- + 5 H2O
|
||||
-log_k -31.32; -Vm 261
|
||||
CO3-AFmsura
|
||||
Ca4Al2(CO3)0.95(OH)12:5H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.95 CO3-2 + 4 OH- + 5 H2O
|
||||
-log_k -31.05; -Vm 261
|
||||
|
||||
CO3-OH-AFm # Hemicarboaluminate. Appelo, 2021
|
||||
Ca4Al2(CO3)0.5(OH)(OH)12:5.5H2O = 4 Ca+2 + 2 Al(OH)4- + 0.5 CO3-2 + 5 OH- + 5.5 H2O
|
||||
-log_k -29.06; -Vm 284
|
||||
CO3-OH-AFmsura
|
||||
Ca4Al2(CO3)0.475(OH)0.95(OH)12:5.5H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.475 CO3-2 + 4.95 OH- + 5.5 H2O
|
||||
-log_k -28.84; -Vm 284
|
||||
|
||||
SO4-Cl-AFm # Kuzel's salt. Appelo, 2021
|
||||
Ca4Al2(SO4)0.5Cl(OH)12:5H2O = 4 Ca+2 + 2 Al(OH)4- + 0.5 SO4-2 + Cl- + 4 OH- + 5 H2O
|
||||
-log_k -28.52; -Vm 290
|
||||
SO4-Cl-AFmsura
|
||||
Ca4Al2(SO4)0.475Cl0.95(OH)12:5H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.475 SO4-2 + 0.95 Cl- + 4 OH- + 5 H2O
|
||||
-log_k -28.41; -Vm 290
|
||||
|
||||
SO4-AFem # Lothenbach 2019
|
||||
Ca4Fe2(SO4)(OH)12:6H2O = 4 Ca+2 + 2 Fe(OH)4- + SO4-2 + 4 OH- + 6 H2O
|
||||
-log_k -31.57; -Vm 321
|
||||
CO3-AFem # Lothenbach 2019
|
||||
Ca4Fe2(CO3)(OH)12:6H2O = 4 Ca+2 + 2 Fe(OH)4- + CO3-2 + 4 OH- + 6 H2O
|
||||
-log_k -34.59; -Vm 292
|
||||
CO3-OH-AFem # Lothenbach 2019. ?? 3.5 H2O??
|
||||
Ca4Fe2(CO3)0.5(OH)(OH)12:3.5H2O = 4 Ca+2 + 2 Fe(OH)4- + 0.5 CO3-2 + 5 OH- + 3.5 H2O
|
||||
-log_k -30.83; -Vm 273
|
||||
|
||||
Ettringite # Matschei, 2007, fig. 27
|
||||
Ca6Al2(SO4)3(OH)12:26H2O = 6 Ca+2 + 2 Al(OH)4- + 3 SO4-2 + 4 OH- + 26 H2O
|
||||
-log_k -44.8; -Vm 707
|
||||
-analyt 334.09 0 -26251 -117.57 # 5 - 75 C
|
||||
|
||||
CO3-ettringite # Matschei, 2007, tbl 13
|
||||
Ca6Al2(CO3)3(OH)12:26H2O = 6 Ca+2 + 2 Al(OH)4- + 3 CO3-2 + 4 OH- + 26 H2O;
|
||||
-log_k -46.50; -Vm 652
|
||||
|
||||
C2AH8 # Matschei, fig. 19
|
||||
Ca2Al2(OH)10:3H2O = 2 Ca+2 + 2 Al(OH)4- + 2 OH- + 3 H2O
|
||||
-log_k -13.55; -Vm 184
|
||||
-analyt -225.37 -0.12380 0 100.522 # 1 - 50 °C
|
||||
|
||||
CAH10 # Matschei, fig. 19
|
||||
CaAl2(OH)8:6H2O = Ca+2 + 2 Al(OH)4- + 6 H2O
|
||||
-log_k -7.60; -Vm 194
|
||||
-delta_h 43.2 # 1 - 20 ºC
|
||||
|
||||
Hydrogarnet_Al # Matschei, 2007, Table 5
|
||||
(CaO)3Al2O3(H2O)6 = 3 Ca+2 + 2 Al(OH)4- + 4 OH-
|
||||
-log_k -20.84; -Vm 150
|
||||
# -analyt -20.64 -0.002 0 0.16 # 5 - 105 °C
|
||||
# -delta_h 6.4 kJ # Geiger et al., 2012, AM 97, 1252-1255
|
||||
|
||||
Hydrogarnet_Fe # Lothenbach 2019
|
||||
(CaO)3Fe2O3(H2O)6 = 3 Ca+2 + 2 Fe(OH)4- + 4 OH-
|
||||
-log_k -26.3; -Vm 155
|
||||
|
||||
Hydrogarnet_Si # Matschei, 2007, Table 6
|
||||
Ca3Al2Si0.8(OH)15.2 = 3 Ca+2 + 2 Al(OH)4- + 0.8 H4SiO4 + 4 OH-
|
||||
-log_k -33.69; -Vm 143
|
||||
-analyt -476.84 -0.2598 0 210.38 # 5 - 85 °C
|
||||
|
||||
Jennite # CSH2.1. Lothenbach 2019
|
||||
Ca1.67SiO3.67:2.1H2O + 0.57 H2O = 1.67 Ca+2 + 2.34 OH- + H3SiO4-
|
||||
-log_k -13.12; -Vm 78.4
|
||||
|
||||
Tobermorite-I # Lothenbach 2019
|
||||
CaSi1.2O3.4:1.6H2O + 0.6 H2O = Ca+2 + 0.8 OH- + 1.2 H3SiO4-
|
||||
-log_k -6.80; -Vm 70.4
|
||||
|
||||
Tobermorite-II # Lothenbach 2019
|
||||
Ca0.833SiO2.833:1.333H2O + 0.5 H2O = 0.833Ca+2 + 0.666 OH- + H3SiO4-
|
||||
-log_k -7.99; -Vm 58.7
|
||||
|
||||
PRINT; -reset true
|
||||
# Refs
|
||||
# Appelo 2021, Cem. Concr. Res. 140, https://doi.org/10.1016/j.cemconres.2020.106270.
|
||||
# Lothenbach, B. et al. 2019, Cem. Concr. Res. 115, 472-506.
|
||||
# Matschei, T. et al., 2007, Cem. Concr. Res. 37, 1379-1410.
|
||||
195
database/OtherDatabases/Concrete_PZ.dat
Normal file
195
database/OtherDatabases/Concrete_PZ.dat
Normal file
@ -0,0 +1,195 @@
|
||||
# Concrete minerals for use with
|
||||
# DATABASE c:\phreeqc\database\pitzer.dat
|
||||
# Read this file in your input file with
|
||||
# INCLUDE$ c:\phreeqc\database\concrete_pz.dat
|
||||
|
||||
PRINT; -reset false
|
||||
|
||||
SOLUTION_MASTER_SPECIES
|
||||
Al Al(OH)4- 0 Al 26.9815
|
||||
H(0) H2 0 H
|
||||
O(0) O2 0 O
|
||||
SOLUTION_SPECIES
|
||||
Al(OH)4- = Al(OH)4-; -dw 1.04e-9 # dw from Mackin & Aller, 1983, GCA 47, 959
|
||||
2 H2O = O2 + 4 H+ + 4 e-; log_k -86.08; delta_h 134.79 kcal; -dw 2.35e-9
|
||||
2 H+ + 2 e- = H2; log_k -3.15; delta_h -1.759 kcal; -dw 5.13e-9
|
||||
|
||||
PITZER # Using data from Weskolowski, 1992, GCA
|
||||
#Park & Englezos 99 The model Pitzer coeff's are different from pitzer.dat, data are everywhere below the calc'd osmotic from Weskolowski.
|
||||
-B0
|
||||
Al(OH)4- K+ -0.0669 0 0 8.24e-3
|
||||
Al(OH)4- Na+ -0.0289 0 0 1.18e-3
|
||||
-B1
|
||||
Al(OH)4- K+ 0.668 0 0 -1.93e-2
|
||||
Al(OH)4- Na+ 0.461 0 0 -2.33e-3
|
||||
-C0
|
||||
Al(OH)4- K+ 0.0499 0 0 -3.63e-3
|
||||
Al(OH)4- Na+ 0.0073 0 0 -1.56e-4
|
||||
-THETA
|
||||
Al(OH)4- Cl- -0.0233 0 0 -8.11e-4
|
||||
Al(OH)4- OH- 0.0718 0 0 -7.29e-4
|
||||
# Al(OH)4- SO4-2 -0.012
|
||||
-PSI
|
||||
Al(OH)4- Cl- K+ 0.0009 0 0 9.94e-4
|
||||
Al(OH)4- Cl- Na+ 0.0048 0 0 1.32e-4
|
||||
Al(OH)4- OH- Na+ -0.0048 0 0 1.00e-4
|
||||
Al(OH)4- OH- K+ 0 0 0 0
|
||||
Al(OH)4- K+ Na+ 0 0 0 0
|
||||
END
|
||||
|
||||
# # AFm (short for monosulfoaluminate) is an anion-exchanger, with the general formula Ca4Al2(Y-2)(OH)12:6H2O.
|
||||
# # Listed are the solubilities of end-members in the neutral form as Y-AFm, and with 5% surface charge as Y-AFmsura.
|
||||
# #
|
||||
# # Example of the combination of the charged AFmsura and charge-balancing EDL calculations:
|
||||
# SURFACE_MASTER_SPECIES
|
||||
# Sura Sura+
|
||||
# SURFACE_SPECIES
|
||||
# Sura+ = Sura+
|
||||
# SOLUTION 1
|
||||
# pH 7 charge
|
||||
# REACTION 1
|
||||
# Ca3O3Al2O3 1 gypsum 1; 0.113 # MW gfw("Ca3O3Al2O3CaSO4(H2O)2") = 442.4. 0.113 for w/s = 20
|
||||
# SAVE solution 2
|
||||
# END
|
||||
|
||||
# RATES
|
||||
# Sum_all_AFmsura # Sums up with the single charge formula, Ca2Al...
|
||||
# 10 tot_ss = 2 * equi("AFmsura")
|
||||
# 20 SAVE (m - tot_ss) * time
|
||||
# -end
|
||||
|
||||
# USE solution 2
|
||||
# EQUILIBRIUM_PHASES 2
|
||||
# AFmsura 0 0
|
||||
# KINETICS 2
|
||||
# Sum_all_AFmsura; -formula H2O 0; -m0 0; -time_step 30
|
||||
# SURFACE 2
|
||||
# Sura Sum_all_AFmsura kin 0.05 8.6e3; -donnan debye 2 ; -equil 1
|
||||
# END
|
||||
|
||||
PHASES
|
||||
O2(g)
|
||||
O2 = O2; -log_k -2.8983
|
||||
-analytic -7.5001 7.8981e-3 0.0 0.0 2.0027e5
|
||||
H2(g)
|
||||
H2 = H2; -log_k -3.1050
|
||||
-analytic -9.3114 4.6473e-3 -49.335 1.4341 1.2815e5
|
||||
|
||||
Portlandite # Reardon, 1990
|
||||
Ca(OH)2 = Ca+2 + 2 OH-
|
||||
-log_k -5.19; -Vm 33.1
|
||||
|
||||
Gibbsite
|
||||
Al(OH)3 + OH- = Al(OH)4-
|
||||
-log_k -1.123; -Vm 32.2
|
||||
-analyt -7.234 1.068e-2 0 1.1829 # data from Wesolowski, 1992, GCA 56, 1065
|
||||
|
||||
# AFm with a single exchange site...
|
||||
OH-AFm # Appelo, 2021
|
||||
Ca2AlOH(OH)6:6H2O = 2 Ca+2 + Al(OH)4- + 3 OH- + 6 H2O
|
||||
-log_k -12.84; -Vm 185
|
||||
OH-AFmsura
|
||||
Ca2Al(OH)0.95(OH)6:6H2O+0.05 = 2 Ca+2 + Al(OH)4- + OH- + 1.95 OH- + 6 H2O
|
||||
-log_k -12.74; -Vm 185
|
||||
|
||||
Cl-AFm # Friedel's salt. Appelo, 2021
|
||||
Ca2AlCl(OH)6:2H2O = 2 Ca+2 + Al(OH)4- + Cl- + 2 OH- + 2 H2O
|
||||
-log_k -13.68; -Vm 136
|
||||
Cl-AFmsura
|
||||
Ca2AlCl0.95(OH)6:2H2O+0.05 = 2 Ca+2 + Al(OH)4- + 0.95 Cl- + 2 OH- + 2 H2O
|
||||
-log_k -13.59; -Vm 136
|
||||
|
||||
# AFm with a double exchange site...
|
||||
SO4-AFm # Monosulfoaluminate. Appelo, 2021
|
||||
Ca4Al2(SO4)(OH)12:6H2O = 4 Ca+2 + 2 Al(OH)4- + SO4-2 + 4 OH- + 6 H2O
|
||||
-log_k -29.15; -Vm 309
|
||||
SO4-AFmsura
|
||||
Ca4Al2(SO4)0.95(OH)12:6H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.95 SO4-2 + 4 OH- + 6 H2O
|
||||
-log_k -28.88; -Vm 309
|
||||
|
||||
SO4-OH-AFm # Hemisulfoaluminate. Appelo, 2021
|
||||
Ca4Al2(SO4)0.5(OH)(OH)12:9H2O = 4 Ca+2 + 2 Al(OH)4- + 0.5 SO4-2 + 5 OH- + 9 H2O
|
||||
-log_k -27.24; -Vm 340
|
||||
SO4-OH-AFmsura
|
||||
Ca4Al2(SO4)0.475(OH)0.95(OH)12:9H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.475 SO4-2 + 4.95 OH- + 9 H2O
|
||||
-log_k -26.94; -Vm 340
|
||||
|
||||
CO3-AFm # Monocarboaluminate. Appelo, 2021
|
||||
Ca4Al2(CO3)(OH)12:5H2O = 4 Ca+2 + 2 Al(OH)4- + CO3-2 + 4 OH- + 5 H2O
|
||||
-log_k -31.32; -Vm 261
|
||||
CO3-AFmsura
|
||||
Ca4Al2(CO3)0.95(OH)12:5H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.95 CO3-2 + 4 OH- + 5 H2O
|
||||
-log_k -31.05; -Vm 261
|
||||
|
||||
CO3-OH-AFm # Hemicarboaluminate. Appelo, 2021
|
||||
Ca4Al2(CO3)0.5(OH)(OH)12:5.5H2O = 4 Ca+2 + 2 Al(OH)4- + 0.5 CO3-2 + 5 OH- + 5.5 H2O
|
||||
-log_k -29.06; -Vm 284
|
||||
CO3-OH-AFmsura
|
||||
Ca4Al2(CO3)0.475(OH)0.95(OH)12:5.5H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.475 CO3-2 + 4.95 OH- + 5.5 H2O
|
||||
-log_k -28.84; -Vm 284
|
||||
|
||||
SO4-Cl-AFm # Kuzel's salt. Appelo, 2021
|
||||
Ca4Al2(SO4)0.5Cl(OH)12:5H2O = 4 Ca+2 + 2 Al(OH)4- + 0.5 SO4-2 + Cl- + 4 OH- + 5 H2O
|
||||
-log_k -28.52; -Vm 290
|
||||
SO4-Cl-AFmsura
|
||||
Ca4Al2(SO4)0.475Cl0.95(OH)12:5H2O+0.1 = 4 Ca+2 + 2 Al(OH)4- + 0.475 SO4-2 + 0.95 Cl- + 4 OH- + 5 H2O
|
||||
-log_k -28.41; -Vm 290
|
||||
|
||||
# No Fe(OH)4- in Pitzer...
|
||||
# SO4-AFem # Lothenbach 2019
|
||||
# Ca4Fe2(SO4)(OH)12:6H2O = 4 Ca+2 + 2 Fe(OH)4- + SO4-2 + 4 OH- + 6 H2O
|
||||
# -log_k -31.57; -Vm 321
|
||||
# CO3-AFem # Lothenbach 2019
|
||||
# Ca4Fe2(CO3)(OH)12:6H2O = 4 Ca+2 + 2 Fe(OH)4- + CO3-2 + 4 OH- + 6 H2O
|
||||
# -log_k -34.59; -Vm 292
|
||||
# CO3-OH-AFem # Lothenbach 2019. ?? 3.5 H2O??
|
||||
# Ca4Fe2(CO3)0.5(OH)(OH)12:3.5H2O = 4 Ca+2 + 2 Fe(OH)4- + 0.5 CO3-2 + 5 OH- + 3.5 H2O
|
||||
# -log_k -30.83; -Vm 273
|
||||
|
||||
Ettringite # Matschei, 2007, fig. 27
|
||||
Ca6Al2(SO4)3(OH)12:26H2O = 6 Ca+2 + 2 Al(OH)4- + 3 SO4-2 + 4 OH- + 26 H2O
|
||||
-log_k -44.8; -Vm 707
|
||||
-analyt 334.09 0 -26251 -117.57 # 5 - 75 C
|
||||
|
||||
CO3-ettringite # Matschei, 2007, tbl 13
|
||||
Ca6Al2(CO3)3(OH)12:26H2O = 6 Ca+2 + 2 Al(OH)4- + 3 CO3-2 + 4 OH- + 26 H2O;
|
||||
-log_k -46.50; -Vm 652
|
||||
|
||||
C2AH8 # Matschei, fig. 19
|
||||
Ca2Al2(OH)10:3H2O = 2 Ca+2 + 2 Al(OH)4- + 2 OH- + 3 H2O
|
||||
-log_k -13.55; -Vm 184
|
||||
-analyt -225.37 -0.12380 0 100.522 # 1 - 50 °C
|
||||
|
||||
CAH10 # Matschei, fig. 19
|
||||
CaAl2(OH)8:6H2O = Ca+2 + 2 Al(OH)4- + 6 H2O
|
||||
-log_k -7.60; -Vm 194
|
||||
-delta_h 43.2 # 1 - 20 ºC
|
||||
|
||||
Hydrogarnet_Al # Matschei, 2007, Table 5
|
||||
(CaO)3Al2O3(H2O)6 = 3 Ca+2 + 2 Al(OH)4- + 4 OH-
|
||||
-log_k -20.84; -Vm 150
|
||||
# -analyt -20.64 -0.002 0 0.16 # 5 - 105 ºC
|
||||
# -delta_h 6.4 kJ # Geiger et al., 2012, AM 97, 1252-1255
|
||||
|
||||
Hydrogarnet_Si # Matschei, 2007, Table 6
|
||||
Ca3Al2Si0.8(OH)15.2 = 3 Ca+2 + 2 Al(OH)4- + 0.8 H4SiO4 + 4 OH-
|
||||
-log_k -33.69; -Vm 143
|
||||
-analyt -476.84 -0.2598 0 210.38 # 5 - 85 ºC
|
||||
|
||||
Jennite # CSH2.1. Lothenbach 2019
|
||||
Ca1.67SiO3.67:2.1H2O + 0.57 H2O = 1.67 Ca+2 + 2.34 OH- + H3SiO4-
|
||||
-log_k -13.12; -Vm 78.4
|
||||
|
||||
Tobermorite-I # Lothenbach 2019
|
||||
CaSi1.2O3.4:1.6H2O + 0.6 H2O = Ca+2 + 0.8 OH- + 1.2 H3SiO4-
|
||||
-log_k -6.80; -Vm 70.4
|
||||
|
||||
Tobermorite-II # Lothenbach 2019
|
||||
Ca0.833SiO2.833:1.333H2O + 0.5 H2O = 0.833Ca+2 + 0.666 OH- + H3SiO4-
|
||||
-log_k -7.99; -Vm 58.7
|
||||
|
||||
PRINT; -reset true
|
||||
# Refs
|
||||
# Appelo 2021, Cem. Concr. Res. 140, https://doi.org/10.1016/j.cemconres.2020.106270
|
||||
# Lothenbach, B. et al. 2019, Cem. Concr. Res. 115, 472-506.
|
||||
# Matschei, T. et al., 2007, Cem. Concr. Res. 37, 1379-1410.
|
||||
12965
database/OtherDatabases/ThermoddemV1.10_15Dec2020.dat
Normal file
12965
database/OtherDatabases/ThermoddemV1.10_15Dec2020.dat
Normal file
File diff suppressed because it is too large
Load Diff
@ -588,6 +588,7 @@ Al+3 + 4 H2O = Al(OH)4- + 4 H+
|
||||
-delta_h 42.30 kcal
|
||||
-analytic 51.578 0.0 -11168.9 -14.865
|
||||
-gamma 4.5 0
|
||||
-dw 1.04e-9 # Mackin & Aller, 1983, GCA 47, 959
|
||||
Al+3 + SO4-2 = AlSO4+
|
||||
-log_k 3.5
|
||||
-delta_h 2.29 kcal
|
||||
@ -905,7 +906,7 @@ Calcite
|
||||
CaCO3 = CO3-2 + Ca+2
|
||||
-log_k -8.48
|
||||
-delta_h -2.297 kcal
|
||||
-analytic -171.9065 -0.077993 2839.319 71.595
|
||||
-analytic 17.118 -0.046528 -3496 # 0 - 250°C, Ellis, 1959, Plummer and Busenberg, 1982
|
||||
-Vm 36.9 cm3/mol # MW (100.09 g/mol) / rho (2.71 g/cm3)
|
||||
Aragonite
|
||||
CaCO3 = CO3-2 + Ca+2
|
||||
@ -917,6 +918,7 @@ Dolomite
|
||||
CaMg(CO3)2 = Ca+2 + Mg+2 + 2 CO3-2
|
||||
-log_k -17.09
|
||||
-delta_h -9.436 kcal
|
||||
-analytic 31.283 -0.0898 -6438 # 25°C: Hemingway and Robie, 1994; 50–175°C: Bénézeth et al., 2018, GCA 224, 262-275.
|
||||
-Vm 64.5
|
||||
Siderite
|
||||
FeCO3 = Fe+2 + CO3-2
|
||||
@ -1487,6 +1489,7 @@ SURFACE_SPECIES
|
||||
Hfo_wOH + H4SiO4 = Hfo_wH3SiO4 + H2O ; log_K 4.28
|
||||
Hfo_wOH + H4SiO4 = Hfo_wH2SiO4- + H+ + H2O ; log_K -3.22
|
||||
Hfo_wOH + H4SiO4 = Hfo_wHSiO4-2 + 2H+ + H2O ; log_K -11.69
|
||||
|
||||
RATES
|
||||
|
||||
###########
|
||||
@ -1790,7 +1793,12 @@ Pyrolusite
|
||||
200 SAVE moles * SOLN_VOL
|
||||
-end
|
||||
END
|
||||
|
||||
# =============================================================================================
|
||||
#(a) means amorphous. (d) means disordered, or less crystalline.
|
||||
#(14A) refers to 14 angstrom spacing of clay planes. FeS(ppt),
|
||||
#precipitated, indicates an initial precipitate that is less crystalline.
|
||||
#Zn(OH)2(e) indicates a specific crystal form, epsilon.
|
||||
# =============================================================================================
|
||||
# For the reaction aA + bB = cC + dD,
|
||||
# with delta_v = c*Vm(C) + d*Vm(D) - a*Vm(A) - b*Vm(B),
|
||||
# PHREEQC adds the pressure term to log_k: -= delta_v * (P - 1) / (2.3RT).
|
||||
@ -1834,4 +1842,3 @@ END
|
||||
# =============================================================================================
|
||||
# It remains the responsibility of the user to check the calculated results, for example with
|
||||
# measured solubilities as a function of (P, T).
|
||||
|
||||
|
||||
@ -237,7 +237,7 @@ Calcite
|
||||
CaCO3 = CO3-2 + Ca+2
|
||||
log_k -8.406
|
||||
delta_h -2.297 kcal
|
||||
-analytic -237.04 -0.1077 0 102.25 6.79e5 # ref. 3 + data from Ellis, 1959, Plummer and Busenberg, 1982
|
||||
-analytic 8.481 -0.032644 -2133 # ref. 3 + data from Ellis, 1959, Plummer and Busenberg, 1982
|
||||
-Vm 36.9
|
||||
Carnallite
|
||||
KMgCl3:6H2O = K+ + Mg+2 + 3Cl- + 6H2O
|
||||
@ -266,8 +266,9 @@ Diopside
|
||||
Vm 67.2
|
||||
Dolomite
|
||||
CaMg(CO3)2 = Ca+2 + Mg+2 + 2 CO3-2
|
||||
log_k -17.083
|
||||
log_k -17.09
|
||||
delta_h -9.436 kcal
|
||||
-analytic -120.63 -0.1051 0 54.509 # 50–175°C: Bénézeth et al., 2018, GCA 224, 262-275.
|
||||
-Vm 64.5
|
||||
Enstatite
|
||||
MgSiO3 + 2 H+ = - H2O + Mg+2 + H4SiO4 # llnl.dat
|
||||
@ -911,7 +912,6 @@ 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
|
||||
|
||||
|
||||
END
|
||||
MEAN GAM
|
||||
CaCl2
|
||||
@ -974,9 +974,9 @@ END
|
||||
# a0 = -gamma x for cations, = 0 for anions.
|
||||
# For details, consult ref. 1.
|
||||
#
|
||||
# ref. 1: Appelo, Parkhurst and Post, 2014. Geochim. Cosmochim. Acta 125, 49-67.
|
||||
# ref. 1: Appelo, Parkhurst and Post, 2014. Geochim. Cosmochim. Acta 125, 49–67.
|
||||
# ref. 2: Procedures from ref. 1 using data compiled by Laliberté, 2009, J. Chem. Eng. Data 54, 1725.
|
||||
# ref. 3: Appelo, 2015, Appl. Geochem. 55, 62-71.
|
||||
# ref. 3: Appelo, 2015, Appl. Geochem. 55, 62–71.
|
||||
# http://www.hydrochemistry.eu/pub/pitzer_db/appendix.zip contains example files
|
||||
# for the high P,T Pitzer model and improvements for Calcite.
|
||||
# ref. 4: Appelo, 2017, Cem. Concr. Res. 101, 102-113.
|
||||
|
||||
@ -1,4 +1,85 @@
|
||||
Version @PHREEQC_VER@: @PHREEQC_DATE@
|
||||
Summary of Basic functions not include in PhreeqcI help:
|
||||
|
||||
ADD_HEADING("NewHeading") Append a new heading to the list of -headings defined
|
||||
in USER_PUNCH. Note: only useful in PhreeqcRM and takes effect
|
||||
at next RunString, RunFile, or RunCells.
|
||||
|
||||
DEBYE_LENGTH Value of the Debye length.
|
||||
|
||||
DELTA_H_PHASE("Calcite") Delta H in KJ/mol. If an analytic expression exists,
|
||||
Delta H is at reaction temperature; otherwise
|
||||
Delta H at 25 C.
|
||||
|
||||
DELTA_H_SPECIES("CaHCO3+") Delta H in KJ/mol. If an analytic expression exists,
|
||||
Delta H is at reaction temperature, otherwise
|
||||
Delta H at 25C.
|
||||
|
||||
DH_A0(Na+") Debye-Huckel species-specific ion size parameter.
|
||||
|
||||
DH_BDOT("Na+") Debye-Huckel species-specific ionic strength coefficient.
|
||||
|
||||
DIFF_C("CO3-2") Diffusion coefficient for a species at 25 C.
|
||||
|
||||
EOL_NOTAB$ Omits the tab that is normally printed after EOL$.
|
||||
|
||||
EQUIV_FRAC("AlX3", 3.0, "X") Equivalent fraction of exchange or surface species.
|
||||
Second argument is equivalents per mole. Third argument
|
||||
is exchange or surface name.
|
||||
|
||||
ITERATIONS Total number of iterations for the calculation.
|
||||
|
||||
NO_NEWLINE$ Omits the new line normally written after printing a USER_PUNCH block.
|
||||
This function can be used to completely eliminate a line for a cell
|
||||
(assuming no SELECTED_OUTPUT fields are defined.
|
||||
|
||||
SETDIFF_C Sets dw for a species (see SOLUTION_SPECIES), returns
|
||||
calculated diffusion coefficient at reaction temperature.
|
||||
|
||||
SYS("element", count , name$ , Sixth argument is new and determines the sort order,
|
||||
type$ , moles, 1) 0 sorted by 5th argument, 1, sorted by 3rd argument.
|
||||
|
||||
-------------
|
||||
March 10, 2021
|
||||
-------------
|
||||
PHREEQC: New Basic functions return (1) delta H of species,
|
||||
(2) delta H of a phase, (3) Debye Huckel a0 (species-specific
|
||||
ion size), and (4) Debye Huckel bdot (species-specific ion
|
||||
strength coefficient).
|
||||
|
||||
DELTA_H_PHASE("Calcite") Delta H in KJ/mol. If an analytic expression exists,
|
||||
Delta H is at reaction temperature; otherwise
|
||||
Delta H at 25 C.
|
||||
|
||||
DELTA_H_SPECIES("CaHCO3+") Delta H in KJ/mol. If an analytic expression exists,
|
||||
Delta H is at reaction temperature, otherwise
|
||||
Delta H at 25C.
|
||||
|
||||
DH_A0(Na+") Debye-Huckel species-specific ion size parameter.
|
||||
|
||||
DH_BDOT("Na+") Debye-Huckel species-specific ionic strength coefficient.
|
||||
|
||||
-------------
|
||||
March 10, 2021
|
||||
-------------
|
||||
PHREEQC: Merged changes from Tony Appelo's version.
|
||||
|
||||
Bug fix of removal of Donnan layer calculations when kinetic
|
||||
reactions are zero in Runge-Kutta calculations.
|
||||
|
||||
SIs of phases are now printed with the phase mole transfers
|
||||
found by INVERSE_MODELING. This is useful for checking that
|
||||
dissolving and precipitating phases are sub- and
|
||||
supersaturated, respectively.
|
||||
|
||||
Modified the -analytical_expression for calcite in
|
||||
phreeqc.dat, with data from Ellis (1959) and Plummer and
|
||||
Busenberg (1982) used in pitzer.dat.
|
||||
|
||||
Modified the -analytical_expression for dolomite in
|
||||
phreeqc.dat and pitzer.dat, using data at 25°C from Hemingway
|
||||
and Robie (1994) and 50-175°C from Bénézeth et al. (2018), GCA
|
||||
224, 262-275.
|
||||
|
||||
-------------
|
||||
March 2, 2021
|
||||
@ -135,7 +216,6 @@ Version @PHREEQC_VER@: @PHREEQC_DATE@
|
||||
Sort by 3rd field (name$):
|
||||
SYS("element", count , name$ , type$ , moles, 1)
|
||||
|
||||
|
||||
|
||||
-----------------
|
||||
February 19, 2021
|
||||
|
||||
@ -39,6 +39,7 @@ cxxNumKeyword(io)
|
||||
this->pitzer_exchange_gammas = true;
|
||||
this->new_def = false;
|
||||
this->n_solution = -999;
|
||||
this->solution_equilibria = false;
|
||||
//
|
||||
// Mix exchangers
|
||||
//
|
||||
|
||||
@ -128,6 +128,13 @@ cxxGasPhase::cxxGasPhase(std::map < int, cxxGasPhase > &entity_map,
|
||||
v_m = 0;
|
||||
pr_in = false;
|
||||
bool first = true;
|
||||
new_def = false;
|
||||
solution_equilibria = false;
|
||||
n_solution = -999;
|
||||
type = cxxGasPhase::GP_PRESSURE;
|
||||
total_moles = 0.0;
|
||||
temperature = 298.15;
|
||||
|
||||
//
|
||||
// Mix
|
||||
//
|
||||
|
||||
@ -1387,6 +1387,22 @@ listtokens(FILE * f, tokenrec * l_buf)
|
||||
output_msg("LK_SPECIES");
|
||||
break;
|
||||
|
||||
case tokdelta_h_species:
|
||||
output_msg("DELTA_H_SPECIES");
|
||||
break;
|
||||
|
||||
case tokdelta_h_phase:
|
||||
output_msg("DELTA_H_PHASE");
|
||||
break;
|
||||
|
||||
case tokdh_a0:
|
||||
output_msg("DH_A0");
|
||||
break;
|
||||
|
||||
case tokdh_bdot:
|
||||
output_msg("DH_BDOT");
|
||||
break;
|
||||
|
||||
case toklk_named:
|
||||
output_msg("LK_NAMED");
|
||||
break;
|
||||
@ -2457,6 +2473,31 @@ factor(struct LOC_exec * LINK)
|
||||
}
|
||||
break;
|
||||
|
||||
case tokdelta_h_phase:
|
||||
{
|
||||
const char* str = stringfactor(STR1, LINK);
|
||||
n.UU.val = (parse_all) ? 1 : PhreeqcPtr->calc_deltah_p(str);
|
||||
}
|
||||
break;
|
||||
|
||||
case tokdelta_h_species:
|
||||
{
|
||||
const char* str = stringfactor(STR1, LINK);
|
||||
n.UU.val = (parse_all) ? 1 : PhreeqcPtr->calc_deltah_s(str);
|
||||
}
|
||||
break;
|
||||
case tokdh_a0:
|
||||
{
|
||||
const char* str = stringfactor(STR1, LINK);
|
||||
n.UU.val = (parse_all) ? 1 : PhreeqcPtr->dh_a0(str);
|
||||
}
|
||||
break; case tokdh_bdot:
|
||||
{
|
||||
const char* str = stringfactor(STR1, LINK);
|
||||
n.UU.val = (parse_all) ? 1 : PhreeqcPtr->dh_bdot(str);
|
||||
}
|
||||
break;
|
||||
|
||||
case toklk_named:
|
||||
{
|
||||
const char* str = stringfactor(STR1, LINK);
|
||||
@ -7416,7 +7457,11 @@ const std::map<const std::string, PBasic::BASIC_TOKEN>::value_type temp_tokens[]
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("lk_species", PBasic::toklk_species),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("lk_named", PBasic::toklk_named),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("lk_phase", PBasic::toklk_phase),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("delta_h_phase", PBasic::tokdelta_h_phase),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("delta_h_species", PBasic::tokdelta_h_species),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("sum_species", PBasic::toksum_species),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("dh_a0", PBasic::tokdh_a0),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("dh_bdot", PBasic::tokdh_bdot),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("sum_gas", PBasic::toksum_gas),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("sum_s_s", PBasic::toksum_s_s),
|
||||
std::map<const std::string, PBasic::BASIC_TOKEN>::value_type("calc_value", PBasic::tokcalc_value),
|
||||
|
||||
@ -259,6 +259,10 @@ public:
|
||||
toklk_species,
|
||||
toklk_named,
|
||||
toklk_phase,
|
||||
tokdelta_h_phase,
|
||||
tokdelta_h_species,
|
||||
tokdh_a0,
|
||||
tokdh_bdot,
|
||||
toksum_species,
|
||||
toksum_gas,
|
||||
toksum_s_s,
|
||||
|
||||
@ -35,6 +35,7 @@ cxxNumKeyword(io)
|
||||
{
|
||||
this->n_user = this->n_user_end = l_n_user;
|
||||
eltList.type = cxxNameDouble::ND_ELT_MOLES;
|
||||
this->new_def = false;
|
||||
//
|
||||
// Mix
|
||||
//
|
||||
|
||||
@ -114,6 +114,10 @@ public:
|
||||
LDBLE calc_logk_n(const char *name);
|
||||
LDBLE calc_logk_p(const char *name);
|
||||
LDBLE calc_logk_s(const char *name);
|
||||
LDBLE calc_deltah_s(const char* name);
|
||||
LDBLE calc_deltah_p(const char* name);
|
||||
LDBLE dh_a0(const char* name);
|
||||
LDBLE dh_bdot(const char* name);
|
||||
LDBLE calc_surface_charge(const char *surface_name);
|
||||
LDBLE calc_t_sc(const char *name);
|
||||
LDBLE diff_layer_total(const char *total_name, const char *surface_name);
|
||||
@ -1701,7 +1705,7 @@ protected:
|
||||
bool output_newline;
|
||||
inline void Set_output_newline(bool tf) { this->output_newline = tf;}
|
||||
inline bool Get_output_newline() { return this->output_newline;}
|
||||
LDBLE *llnl_temp, *llnl_adh, *llnl_bdh, *llnl_bdot, *llnl_co2_coefs, a_llnl, b_llnl;
|
||||
LDBLE *llnl_temp, *llnl_adh, *llnl_bdh, *llnl_bdot, *llnl_co2_coefs, a_llnl, b_llnl, bdot_llnl;
|
||||
int llnl_count_temp, llnl_count_adh, llnl_count_bdh, llnl_count_bdot,
|
||||
llnl_count_co2_coefs;
|
||||
|
||||
|
||||
@ -181,7 +181,6 @@ protected:
|
||||
bool charge_balance;
|
||||
bool percent_error;
|
||||
bool new_line;
|
||||
//bool punch_newline;
|
||||
|
||||
// as-is set flags
|
||||
bool set_user_punch;
|
||||
|
||||
@ -432,7 +432,7 @@ cxxSurfaceComp::add(const cxxSurfaceComp & addee, LDBLE extensive)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss <<
|
||||
"Cannot mix surface components related to phase with exchange components related to kinetics, "
|
||||
"Cannot mix surface components related to phase with surface components related to kinetics, "
|
||||
<< this->formula;
|
||||
error_msg(oss.str().c_str(), CONTINUE);
|
||||
return;
|
||||
|
||||
@ -729,6 +729,117 @@ calc_logk_s(const char *name)
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
LDBLE Phreeqc::
|
||||
dh_a0(const char* name)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
char token[MAX_LENGTH];
|
||||
struct species* s_ptr;
|
||||
double a = -999.99;
|
||||
|
||||
strcpy(token, name);
|
||||
s_ptr = s_search(token);
|
||||
if (s_ptr != NULL)
|
||||
{
|
||||
a = s_ptr->dha;
|
||||
}
|
||||
return (a);
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
LDBLE Phreeqc::
|
||||
dh_bdot(const char* name)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
char token[MAX_LENGTH];
|
||||
struct species* s_ptr;
|
||||
double b = -999.99;
|
||||
if (llnl_count_temp > 0)
|
||||
{
|
||||
b = bdot_llnl;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(token, name);
|
||||
s_ptr = s_search(token);
|
||||
if (s_ptr != NULL)
|
||||
{
|
||||
b = s_ptr->dhb;
|
||||
}
|
||||
}
|
||||
return (b);
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
LDBLE Phreeqc::
|
||||
calc_deltah_p(const char* name)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
int i, j;
|
||||
char token[MAX_LENGTH];
|
||||
struct phase* phase_ptr;
|
||||
LDBLE lkm, lkp;
|
||||
LDBLE l_logk[MAX_LOG_K_INDICES];
|
||||
double dh = -999.99;
|
||||
strcpy(token, name);
|
||||
phase_ptr = phase_bsearch(token, &j, FALSE);
|
||||
|
||||
if (phase_ptr != NULL)
|
||||
{
|
||||
struct reaction* reaction_ptr;
|
||||
if (phase_ptr->replaced)
|
||||
reaction_ptr = phase_ptr->rxn_s;
|
||||
else
|
||||
reaction_ptr = phase_ptr->rxn;
|
||||
/*
|
||||
* Print saturation index
|
||||
*/
|
||||
reaction_ptr->logk[delta_v] = calc_delta_v(reaction_ptr, true) -
|
||||
phase_ptr->logk[vm0];
|
||||
if (reaction_ptr->logk[delta_v])
|
||||
mu_terms_in_logk = true;
|
||||
for (i = 0; i < MAX_LOG_K_INDICES; i++)
|
||||
{
|
||||
l_logk[i] = 0.0;
|
||||
}
|
||||
//lk = k_calc(reaction_ptr->logk, tk_x, patm_x * PASCAL_PER_ATM);
|
||||
select_log_k_expression(reaction_ptr->logk, l_logk);
|
||||
add_other_logk(l_logk, phase_ptr->count_add_logk, phase_ptr->add_logk);
|
||||
lkm = k_calc(l_logk, tk_x - 1.0, patm_x * PASCAL_PER_ATM);
|
||||
lkp = k_calc(l_logk, tk_x + 1.0, patm_x * PASCAL_PER_ATM);
|
||||
dh = (lkp - lkm) / 2.0 * LOG_10 * R_KJ_DEG_MOL * pow(tk_x, 2.0);
|
||||
}
|
||||
return (dh);
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
LDBLE Phreeqc::
|
||||
calc_deltah_s(const char* name)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
int i;
|
||||
char token[MAX_LENGTH];
|
||||
struct species* s_ptr;
|
||||
LDBLE lkm, lkp, l_logk[MAX_LOG_K_INDICES];
|
||||
double dh = -999.99;
|
||||
strcpy(token, name);
|
||||
s_ptr = s_search(token);
|
||||
if (s_ptr != NULL)
|
||||
{
|
||||
/* calculate delta_v for the reaction... */
|
||||
s_ptr->logk[delta_v] = calc_delta_v(s_ptr->rxn, false);
|
||||
for (i = 0; i < MAX_LOG_K_INDICES; i++)
|
||||
{
|
||||
l_logk[i] = 0.0;
|
||||
}
|
||||
select_log_k_expression(s_ptr->logk, l_logk);
|
||||
mu_terms_in_logk = true;
|
||||
add_other_logk(l_logk, s_ptr->count_add_logk, s_ptr->add_logk);
|
||||
lkm = k_calc(l_logk, tk_x-1.0, patm_x * PASCAL_PER_ATM);
|
||||
lkp = k_calc(l_logk, tk_x + 1.0, patm_x * PASCAL_PER_ATM);
|
||||
dh = (lkp - lkm) / 2.0 * LOG_10 * R_KJ_DEG_MOL * pow(tk_x,2.0);
|
||||
return (dh);
|
||||
}
|
||||
return (0.0);
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
LDBLE Phreeqc::
|
||||
calc_surface_charge(const char *surface_name)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
@ -738,7 +849,6 @@ calc_surface_charge(const char *surface_name)
|
||||
LDBLE charge;
|
||||
struct rxn_token_temp *token_ptr;
|
||||
struct master *master_ptr;
|
||||
|
||||
/*
|
||||
* Go through species, sum charge
|
||||
*/
|
||||
|
||||
@ -277,13 +277,13 @@ write_banner(void)
|
||||
char buffer[80];
|
||||
int len, indent;
|
||||
screen_msg(
|
||||
" █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█\n");
|
||||
" █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█\n");
|
||||
screen_msg(
|
||||
" ║ ║\n");
|
||||
|
||||
/* version */
|
||||
#ifdef NPP
|
||||
len = sprintf(buffer, "* PHREEQC-%s *", "3.5.2");
|
||||
len = sprintf(buffer, "* PHREEQC-%s *", "3.6.5");
|
||||
#else
|
||||
len = sprintf(buffer, "* PHREEQC-%s *", "@VERSION@");
|
||||
#endif
|
||||
@ -307,7 +307,7 @@ write_banner(void)
|
||||
|
||||
/* date */
|
||||
#ifdef NPP
|
||||
len = sprintf(buffer, "%s", "August 1, 2019");
|
||||
len = sprintf(buffer, "%s", "February 24, 2021");
|
||||
#else
|
||||
len = sprintf(buffer, "%s", "@VER_DATE@");
|
||||
#endif
|
||||
@ -316,7 +316,7 @@ write_banner(void)
|
||||
44 - indent - len, ' '));
|
||||
|
||||
screen_msg(
|
||||
" █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█\n\n");
|
||||
" █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -491,7 +491,7 @@ process_file_names(int argc, char *argv[], std::istream **db_cookie,
|
||||
}
|
||||
local_database_file->close();
|
||||
delete local_database_file;
|
||||
|
||||
|
||||
user_database = (char *) free_check_null(user_database);
|
||||
user_database = string_duplicate(token);
|
||||
screen_msg(sformatf("Database file: %s\n\n", token));
|
||||
@ -499,7 +499,7 @@ process_file_names(int argc, char *argv[], std::istream **db_cookie,
|
||||
output_msg(sformatf(" Input file: %s\n", in_file));
|
||||
output_msg(sformatf(" Output file: %s\n", out_file));
|
||||
#ifdef NPP
|
||||
output_msg(sformatf("Using PHREEQC: version 3.5.2, compiled August 1, 2019\n"));
|
||||
output_msg(sformatf("Using PHREEQC: version 3.6.5, compiled February 24, 2021\n"));
|
||||
#endif
|
||||
output_msg(sformatf("Database file: %s\n\n", token));
|
||||
#ifdef NPP
|
||||
|
||||
@ -2029,14 +2029,31 @@ print_model(struct inverse *inv_ptr)
|
||||
(double) d3));
|
||||
}
|
||||
|
||||
output_msg(sformatf( "\n%-25.25s %2s %12.12s %12.12s\n",
|
||||
"Phase mole transfers:", " ", "Minimum", "Maximum"));
|
||||
// appt, calculate and print SI's
|
||||
int i1, i2;
|
||||
LDBLE t_i, p_i, iap, lk, t;
|
||||
const char *name;
|
||||
struct rxn_token *rxn_ptr;
|
||||
struct reaction *reaction_ptr;
|
||||
|
||||
output_msg(sformatf( "\n%-25.25s %2s %12.12s %12.12s %-18.18s (Approximate SI in solution ",
|
||||
"Phase mole transfers:", " ", "Minimum", "Maximum", "Formula"));
|
||||
|
||||
for (i = 0; i < inv_ptr->count_solns - 1; i++)
|
||||
output_msg(sformatf("%d, ", inv_ptr->solns[i]));
|
||||
solution_ptr = Utilities::Rxn_find(Rxn_solution_map, inv_ptr->solns[i]);
|
||||
t_i = solution_ptr->Get_tc() + 273.15;
|
||||
p_i = solution_ptr->Get_patm();
|
||||
output_msg(sformatf("%d at %3d K, %3d atm)\n", inv_ptr->solns[i], int(t_i), int(floor(p_i + 0.5))));
|
||||
p_i *= PASCAL_PER_ATM;
|
||||
|
||||
for (i = col_phases; i < col_redox; i++)
|
||||
{
|
||||
if (equal(inv_delta1[i], 0.0, toler) == TRUE &&
|
||||
equal(min_delta[i], 0.0, toler) == TRUE &&
|
||||
equal(max_delta[i], 0.0, toler) == TRUE)
|
||||
continue;
|
||||
|
||||
d1 = inv_delta1[i];
|
||||
d2 = min_delta[i];
|
||||
d3 = max_delta[i];
|
||||
@ -2047,11 +2064,62 @@ print_model(struct inverse *inv_ptr)
|
||||
if (equal(d3, 0.0, MIN_TOTAL_INVERSE) == TRUE)
|
||||
d3 = 0.0;
|
||||
output_msg(sformatf(
|
||||
"%15.15s %12.3e %12.3e %12.3e %s\n", col_name[i],
|
||||
(double) d1, (double) d2, (double) d3,
|
||||
inv_ptr->phases[i - col_phases].phase->formula));
|
||||
}
|
||||
"%15.15s %12.3e %12.3e %12.3e %-25.25s (", col_name[i],
|
||||
(double)d1, (double)d2, (double)d3, inv_ptr->phases[i - col_phases].phase->formula));
|
||||
|
||||
i1 = 0;
|
||||
for (; i1 < count_phases; i1++)
|
||||
{
|
||||
if (Utilities::strcmp_nocase(phases[i1]->name, col_name[i]))
|
||||
continue;
|
||||
|
||||
reaction_ptr = phases[i1]->rxn_s;
|
||||
|
||||
for (i2 = 0; i2 < inv_ptr->count_solns; i2++)
|
||||
{
|
||||
solution_ptr = Utilities::Rxn_find(Rxn_solution_map, inv_ptr->solns[i2]);
|
||||
|
||||
reaction_ptr->logk[delta_v] = calc_delta_v(reaction_ptr, true) - phases[i1]->logk[vm0];
|
||||
if (reaction_ptr->logk[delta_v])
|
||||
mu_terms_in_logk = true;
|
||||
lk = k_calc(reaction_ptr->logk, t_i, p_i);
|
||||
|
||||
iap = 0.0;
|
||||
for (rxn_ptr = reaction_ptr->token + 1; rxn_ptr->s != NULL; rxn_ptr++)
|
||||
{
|
||||
t = 0;
|
||||
if (rxn_ptr->s == s_eminus)
|
||||
t = -solution_ptr->Get_pe();
|
||||
else if (!Utilities::strcmp_nocase(rxn_ptr->s->name, "H2O"))
|
||||
t = log10(solution_ptr->Get_ah2o());
|
||||
else if (!Utilities::strcmp_nocase(rxn_ptr->s->name, "H+"))
|
||||
t = -solution_ptr->Get_ph();
|
||||
else
|
||||
{
|
||||
if (rxn_ptr->s->secondary)
|
||||
name = rxn_ptr->s->secondary->elt->name;
|
||||
else
|
||||
name = rxn_ptr->s->primary->elt->name;
|
||||
t = solution_ptr->Get_master_activity()[name];
|
||||
}
|
||||
if (t)
|
||||
iap += t * rxn_ptr->coef;
|
||||
else
|
||||
{
|
||||
iap = -999; break;
|
||||
}
|
||||
}
|
||||
|
||||
if (iap == -999)
|
||||
output_msg(sformatf(" "));
|
||||
else
|
||||
output_msg(sformatf("%6.2f", iap - lk));
|
||||
if (i2 < inv_ptr->count_solns - 1)
|
||||
output_msg(sformatf(","));
|
||||
}
|
||||
}
|
||||
output_msg(sformatf(")\n"));
|
||||
}
|
||||
output_msg(sformatf( "\n%-25.25s\n", "Redox mole transfers:"));
|
||||
for (i = col_redox; i < col_epsilon; i++)
|
||||
{
|
||||
|
||||
@ -2005,7 +2005,13 @@ set_reaction(int i, int use_mix, int use_kinetics)
|
||||
/*
|
||||
* Find surface
|
||||
*/
|
||||
dl_type_x = cxxSurface::NO_DL;
|
||||
if (use.Get_surface_in() && use.Get_kinetics_in() && use.Get_kinetics_ptr() && !use.Get_kinetics_ptr()->Get_use_cvode() && reaction_step > 1)
|
||||
{
|
||||
// use.Set_surface_ptr(Utilities::Rxn_find(Rxn_surface_map, i));
|
||||
// appt: we may come here with zero kinetic reaction, but surface may have to keep DONNAN_DL
|
||||
}
|
||||
else
|
||||
dl_type_x = cxxSurface::NO_DL;
|
||||
if (use.Get_surface_in() == TRUE)
|
||||
{
|
||||
use.Set_surface_ptr(Utilities::Rxn_find(Rxn_surface_map, i));
|
||||
|
||||
@ -568,7 +568,7 @@ gammas(LDBLE mu)
|
||||
*/
|
||||
int i, j;
|
||||
int ifirst, ilast;
|
||||
LDBLE f, bdot_llnl, log_g_co2, dln_g_co2, c2_llnl;
|
||||
LDBLE f, log_g_co2, dln_g_co2, c2_llnl;
|
||||
|
||||
LDBLE c1, c2, a, b;
|
||||
LDBLE muhalf, equiv;
|
||||
@ -887,7 +887,8 @@ int Phreeqc::gammas_a_f(int i1)
|
||||
int i, j;
|
||||
//LDBLE d2, d3, coef = 0, sum = 0;
|
||||
LDBLE d2, d3, sum = 0;
|
||||
char name[MAX_LENGTH];
|
||||
//char name[MAX_LENGTH];
|
||||
std::string name;
|
||||
//struct master *m_ptr;
|
||||
|
||||
i = i1;
|
||||
@ -895,7 +896,8 @@ int Phreeqc::gammas_a_f(int i1)
|
||||
{
|
||||
if (s_x[i]->rxn_x->token[j].s->type == EX)
|
||||
{
|
||||
strcpy(name, s_x[i]->rxn_x->token[j].s->name);
|
||||
//strcpy(name, s_x[i]->rxn_x->token[j].s->name);
|
||||
name = s_x[i]->rxn_x->token[j].s->name;
|
||||
//m_ptr = s_x[i]->rxn_x->token[j].s->primary->elt->master; // appt debug
|
||||
break;
|
||||
}
|
||||
@ -909,7 +911,7 @@ int Phreeqc::gammas_a_f(int i1)
|
||||
{
|
||||
if (s_x[i]->rxn_x->token[j].s->type == EX)
|
||||
{
|
||||
if (!strcmp(name, s_x[i]->rxn_x->token[j].s->name))
|
||||
if (!strcmp(name.c_str(), s_x[i]->rxn_x->token[j].s->name))
|
||||
sum += s_x[i]->moles * s_x[i]->equiv;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ prep(void)
|
||||
|
||||
//if (!same_model && !switch_numerical)
|
||||
// numerical_fixed_volume = false;
|
||||
if (same_model == FALSE /*|| switch_numerical*/)
|
||||
if (same_model == FALSE || !my_array/*|| switch_numerical*/)
|
||||
{
|
||||
clear();
|
||||
setup_unknowns();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "Utils.h"
|
||||
#include "Utils.h"
|
||||
#include "Phreeqc.h"
|
||||
#include "phqalloc.h"
|
||||
#include "Exchange.h"
|
||||
@ -2650,7 +2650,7 @@ diffuse_implicit(LDBLE DDt, int stagnant)
|
||||
// decompose A in LU : store L in A[..][0..1] and U in A[..][2] ...
|
||||
for (i = 1; i <= count_cells + 1; i++)
|
||||
{
|
||||
A[i - 1][2] = A[i - 1][2] / A[i - 1][1];
|
||||
A[i - 1][2] /= A[i - 1][1];
|
||||
A[i][1] -= A[i][0] * A[i - 1][2];
|
||||
}
|
||||
// solve Ct2 in A.Ct2 = L.U.Ct2 = Ct1, Ct1 was put in Ct2 ...
|
||||
@ -2786,7 +2786,7 @@ diffuse_implicit(LDBLE DDt, int stagnant)
|
||||
}
|
||||
dVc = j_0e * current_cells[ifirst].R;
|
||||
cell_data[ifirst + 1].potV = cell_data[ifirst].potV + dVc;
|
||||
for (i = ifirst + 1; i < ilast; i++)
|
||||
for (i = ifirst + 1; i <= ilast; i++)
|
||||
{
|
||||
dVc = current_cells[i].R * (current_x - current_cells[i].dif);
|
||||
//if (((dV_dcell && (dVc * j_0e > 0)) ||
|
||||
@ -2825,7 +2825,7 @@ diffuse_implicit(LDBLE DDt, int stagnant)
|
||||
}
|
||||
current_A = current_x / DDt * F_C_MOL;
|
||||
|
||||
for (i = ifirst; i <= ilast + stagnant + ((bcon_last == 2 || (dV_dcell && stagnant)) ? 1 : 0); i++)
|
||||
for (i = ifirst; i <= ilast + stagnant + (bcon_last == 2 ? 1 : 0); i++)
|
||||
{
|
||||
if (i <= ilast + 1)
|
||||
{
|
||||
@ -2977,7 +2977,7 @@ diffuse_implicit(LDBLE DDt, int stagnant)
|
||||
if (icell == c && sptr_stag && ct[c1].m_s[cp].tot_stag)
|
||||
dum = ct[c1].m_s[cp].tot_stag;
|
||||
if (dum2 + ct[icell].m_s[cp].tot2 - dum < min_mol &&
|
||||
(dV_dcell || (icell >= 0 && icell <= ilast)/* || (icell == ilast && bcon_last == 2)*/))
|
||||
(dV_dcell || (icell >= 0 && icell < ilast) || (icell == ilast && bcon_last == 2)))
|
||||
{
|
||||
dum2 = moles_from_redox_states(sptr2, ct[icell].m_s[cp].name);
|
||||
if (ct[icell + 1].dl_s > 1e-8)
|
||||
@ -3016,7 +3016,7 @@ diffuse_implicit(LDBLE DDt, int stagnant)
|
||||
//ct[icell].J_ij_sum -= dum * ct[icell].m_s[cp].charge;
|
||||
}
|
||||
|
||||
if (dV_dcell || (icell >= 0 && icell < ilast)/* || (icell == ilast && bcon_last == 2)*/)
|
||||
if (dV_dcell || (icell >= 0 && icell < ilast) || (icell == ilast && bcon_last == 2))
|
||||
{
|
||||
dum = ct[icell].m_s[cp].tot1;
|
||||
if (stagnant && icell == c && dV_dcell)
|
||||
@ -3072,7 +3072,7 @@ diffuse_implicit(LDBLE DDt, int stagnant)
|
||||
}
|
||||
|
||||
// reduce oscillations in the column-boundary cells, but not for H and O, and current_A is not adjusted...
|
||||
if (icell == il1 - incr && ct[0].m_s != NULL && dV_dcell * ct[0].m_s[cp].charge < 0 && strcmp(ct[0].m_s[cp].name, "H") && strcmp(ct[0].m_s[cp].name, "O") && c > 3 && mixrun > 1)
|
||||
if (dV_dcell && icell == il1 - incr && dV_dcell * ct[0].m_s[cp].charge < 0 && strcmp(ct[0].m_s[cp].name, "H") && strcmp(ct[0].m_s[cp].name, "O") && c > 3 && mixrun > 1)
|
||||
{
|
||||
dummy = Utilities::Rxn_find(Rxn_solution_map, 0)->Get_totals()[ct[0].m_s[cp].name] / ct[0].kgw * (1 - ct[0].dl_s);
|
||||
if (dummy > 1e-6)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user