Beginners > PHREEQC basics
Differences in results between Windows/Linux version and Mac version
(1/1)
mmelwani:
Hi all, has anyone noticed differences in results between PHREEQC versions for different OSes? The latest Windows GUI and Linux (any processor) versions of PHREEQC (phreeqci-3.8.6-17100.msi and phreeqc-3.8.6-17100.tar.gz, respectively) give the same identical result, but the older Mac version (phreeqc-3.5.0-14000.dmg) gives a different result to the Windows/Linux version.
I attach the input minimum-ish working code below. We used the core10.dat database. At the end of the run, one can see, for example, that the pH in the Windows/Linux version result (pH = 9.7) is different to the Mac version result (pH = 9.6). The model in question is an equilibration with CO2, then advection, with addition of minerals at each time step (100 years), and dissolution of minerals with specified rates of dissolution. I don't think these settings cause the difference in results between PHREEQC versions, as they are the same.
Any thoughts on why this difference might be occurring? What changed between the 3.5.0 version and 3.8.6 version? Should I be concerned about using the results from one version over the other?
--- Code: ---DATABASE core10.dat
SOLUTION 0 # Initial solution
temp 0.01
press 100
pH 7
pe 4
redox pe
units mol/kgw
density 1
-water 100.00 # kg per 100 yr
EQUILIBRIUM_PHASES 0
CO2(g) -1.0000 1000. # log(atm)
SAVE SOLUTION 0
END
USE SOLUTION 0
SOLUTION 1
temp 0.01
press 100
pH 7
pe 4
redox pe
units mol/kgw
density 1
-water 100.00 # kg per 100 yr
EQUILIBRIUM_PHASES 1
Analcime 0 0
Aragonite 0 0
Artinite 0 0
Beidellite-Ca 0 0
Beidellite-Fe 0 0
Beidellite-K 0 0
Beidellite-Mg 0 0
Beidellite-Na 0 0
Boehmite 0 0
Calcite 0 0
Clinoptilolite-Ca 0 0
Clinoptilolite-K 0 0
Clinoptilolite-Na 0 0
Cronstedtite-7A 0 0
Dawsonite 0 0
Fe(OH)2 0 0
Fe(OH)3 0 0
Gibbsite 0 0
Goethite 0 0
Greenalite 0 0
Gyrolite 0 0
Hematite 0 0
Huntite 0 0
Hydromagnesite 0 0
Kaolinite 0 0
Magnetite 0 0
Mesolite 0 0
Minnesotaite 0 0
Monohydrocalcite 0 0
Montmor-Ca 0 0
Montmor-K 0 0
Montmor-Mg 0 0
Montmor-Na 0 0
Mordenite 0 0
Na2CO3 0 0
Na2CO3:7H2O 0 0
Nahcolite 0 0
Natrolite 0 0
Natron 0 0
Nesquehonite 0 0
Nontronite-Ca 0 0
Nontronite-K 0 0
Nontronite-Mg 0 0
Nontronite-Na 0 0
Okenite 0 0
Saponite-Fe-Fe 0 0
Saponite-Fe-Ca 0 0
Saponite-Fe-K 0 0
Saponite-Fe-Mg 0 0
Saponite-Fe-Na 0 0
Saponite-Mg-Ca 0 0
Saponite-Mg-Fe 0 0
Saponite-Mg-K 0 0
Saponite-Mg-Mg 0 0
Saponite-Mg-Na 0 0
Sepiolite 0 0
SiO2(am) 0 0
Siderite 0 0
Smectite-high-Fe-Mg 0 0
Smectite-low-Fe-Mg 0 0
Thermonatrite 0 0
RATES
Ferrosilite
-start
10 kacid = 10^(-8.30) * exp(-47.2e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^0.650
20 kneut = 10^(-11.70) * exp(-66.1e3/8.314 * (1/TK-1/298.15))
30 k = kacid + kneut
40 IF SR("Ferrosilite") > 1 THEN rate = 0 ELSE rate = k * (1 - SR("Ferrosilite"))
50 moles = rate * TIME
60 SAVE moles
-end
Albite
-start
1 REM 3 mechanisms: acid, neutral, base (PK04)
2 REM Chemical affinity parameters p and q for albite are 0.760 and 90.0 respectively
3 REM (Alekseyev et al., 1997), but their use in modeling should be limited to conditions
4 REM near the experimental conditions under which they were obtained, 300 ?C and pH = 9.
10 kacid = 10^(-10.16) * exp(-65.0e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^0.457
20 kneut = 10^(-12.56) * exp(-69.8e3/8.314 * (1/TK-1/298.15))
30 kbase = 10^(-15.60) * exp(-71.0e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^-0.572
40 k = kacid + kneut + kbase
50 IF SR("Albite") > 1 THEN rate = 0 ELSE rate = k * (1 - SR("Albite"))
60 moles = rate * TIME
70 SAVE moles
-end
Anorthite
-start
1 REM Ref PK04
10 kacid = 10^(-3.50) * exp(-16.6e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^1.411
20 kneut = 10^(-9.12) * exp(-17.8e3/8.314 * (1/TK-1/298.15))
40 k = kacid + kneut
50 IF SR("Anorthite") > 1 THEN rate = 0 ELSE rate = k * (1 - SR("Anorthite"))
60 moles = rate * TIME
70 SAVE moles
-end
K-Feldspar
-start
1 REM Ref PK04
10 kacid = 10^(-10.06) * exp(-51.7e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^0.5
20 kneut = 10^(-12.41) * exp(-38.0e3/8.314 * (1/TK-1/298.15))
30 kbase = 10^(-21.20) * exp(-94.1e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^-0.823
40 k = kacid + kneut + kbase
50 IF SR("K-Feldspar") > 1 THEN rate = 0 ELSE rate = k * (1 - SR("K-Feldspar"))
60 moles = rate * TIME
70 SAVE moles
-end
Diopside
-start
1 REM Ref PK04
10 if (M < 0) then goto 200
110 kacid = 10^(-6.36) * exp(-96.1e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^0.71
120 kneut = 10^(-11.11) * exp(-40.6e3/8.314 * (1/TK-1/298.15))
140 k = kacid + kneut
150 IF SR("Diopside") > 1 THEN rate = 0 ELSE rate = k * (1 - SR("Diopside"))
160 moles = rate * TIME
200 SAVE moles
-end
Quartz
-start
1 REM Ref PK04
20 kneut = 10^(-13.99) * exp(-87.7e3/8.314 * (1/TK-1/298.15))
30 kbase = 10^(-16.29) * exp(-108366e3/8.314 * (1/TK-1/298.15)) * ACT("H+")^-0.5
40 k = kneut + kbase
50 IF SR("Quartz") > 1 THEN rate = 0 ELSE rate = k * (1 - SR("Quartz"))
60 moles = rate * TIME
70 SAVE moles
-end
KINETICS 1
Albite
-m0 0.01272678
-m 0.01272678
Anorthite
-m0 0.00505263
-m 0.00505263
Diopside
-m0 0.00270856
-m 0.00270856
Ferrosilite
-m0 0.00766498
-m 0.00766498
K-Feldspar
-m0 0.00730306
-m 0.00730306
Quartz
-m0 0.02709859
-m 0.02709859
REACTION 1 # Fresh rock exposure every 100 # 1.000kg per 100 yr
Albite 1.272677660000
Anorthite 0.505263100000
Diopside 0.270855520000
Ferrosilite 0.766498260000
K-Feldspar 0.730305910000
Quartz 2.709858720000
USER_PUNCH
-headings WaterMass_kg pCO2
-start
10 water_mass = SOLN_VOL
160 PUNCH water_mass
240 pCO2 = 10^(SI("CO2(g)"))
250 PUNCH pCO2
-end
ADVECTION
-cells 1
-shifts 3 # shifts to get to 300 years
-time_step 3153600000 # seconds = 100 years
-punch_cells 1
-punch_frequency 1
-print_cells 1
-print_frequency 10
-warnings false
SELECTED_OUTPUT 1
-file Test_out.dat
-reset true
-time true
-step true
-ph true
-pe true
-alkalinity true
-ionic_strength true
-water true
-charge_balance true
-percent_error true
-totals C Fe Mg Na Al Ca K Si
-molalities CO2 CO3-2 HCO3- H+ OH-
END
--- End code ---
dlparkhurst:
Different versions will most likely have (hopefully) slightly different results because of changes to the databases or the code.
The changes between versions is documented in a file named RELEASE.TXT, which is usually in the doc subdirectory of the installation directory, but may be in the upper level directory for some PHREEQC programs. Version 3.5 is probably 5 years ago, so there are a lot of cumulative changes.
mmelwani:
Thank you, I appreciate the reply. Reading through the RELEASE.TXT file, there have indeed been some significant changes since version 3.5., and I can't pinpoint a particular culprit for the different results in our specific problem (which is quite simple, with advection and no diffusion), although one stands out:
- I think Core10 is a LLNL-type database, and the default way that PHREEQC deals with such databases (specifically, the treatment of the molar volume of water in reactions) has changed since May 2020.
Will a newer PHREEQC version for Mac be released in the near future?
dlparkhurst:
The latest version of PHREEQC (3.8.7) is available at https://visions-of-quality.com/macphreeqc/macphreeqcdl/.
mmelwani:
Thank you!
Navigation
[0] Message Index
Go to full version