Skip to content

Commit 0609b6d

Browse files
authored
Merge pull request #90 from dlparkhurst/mix_error
Mix error
2 parents 8891a6a + 4bb7b85 commit 0609b6d

24 files changed

+66
-48
lines changed

database/Amm.dat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PHREEQC.DAT for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution. Based on:
1+
# Amm.dat for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution. Based on:
22
# diffusion coefficients and molal volumina of aqueous species, solubility and volume of minerals, and critical temperatures and pressures of gases in Peng-Robinson's EOS.
33
# Details are given at the end of this file.
44

database/Kinec.v2.dat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# KINEC.v2.dat - last edited April 18, 2024 by MA and EHO.
1+
# Kinec.v2.dat - last edited April 18, 2024 by MA and EHO.
22
#
33
# This database contains the parameters for calculating mineral dissolution rates for primary and secondary silicate minerals using the equations and parameters reported by Hermanska et al. (2022, 2023),
44
# and dissolution rates for other non)-silicate mineral systems using the equations and parameters reported by Oelkers and Addassi (2024, in preparation).

database/Kinec_v3.dat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# KINEC_v3.dat - last edited July 23, 2024 by MA and EHO.
1+
# Kinec_v3.dat - last edited July 23, 2024 by MA and EHO.
22
#
33
# This database contains the parameters for calculating mineral dissolution rates for primary and secondary silicate minerals using the equations and parameters reported by Hermanska et al. (2022, 2023),
44
# and dissolution rates for other mineral systems using the equations and parameters reported by Oelkers and addassi (2024*).

database/Tipping_Hurley.dat

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Created 17 May 2024 14:30:44
33
# c:\3rdParty\lsp\lsp.exe -f2 -k="asis" -ts "Tipping_Hurley.dat"
44

5-
# $Id: wateq4f.dat 6895 2012-08-21 18:10:05Z dlpark $
65
# Revised arsenic data from Archer and Nordstrom (2002)
76

87
SOLUTION_MASTER_SPECIES

database/phreeqc.dat

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# File 1 = C:\GitPrograms\phreeqc3-1\database\Amm.dat, 22/05/2024 19:38, 1948 lines, 55817 bytes, md5=78b3659799b73ddca128328b6ee7533b
1+
# File 1 = C:\GitPrograms\phreeqc3-1\database\phreeqc.dat, 22/05/2024 19:38, 1948 lines, 55817 bytes, md5=78b3659799b73ddca128328b6ee7533b
22
# Created 22 May 2024 19:55:37
3-
# C:\3rdParty\lsp\lsp.exe -f2 -k=asis -ts Amm.dat
3+
# C:\3rdParty\lsp\lsp.exe -f2 -k=asis -ts phreeqc.dat
44

5-
# PHREEQC.DAT for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution. Based on:
5+
# phreeqc.dat for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution. Based on:
66
# diffusion coefficients and molal volumina of aqueous species, solubility and volume of minerals, and critical temperatures and pressures of gases in Peng-Robinson's EOS.
77
# Details are given at the end of this file.
88

database/phreeqc_rates.dat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PHREEQC.DAT for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution. Augmented with kinetic rates for minerals from compilations. Based on:
1+
# phreeqc_rates.dat for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution. Augmented with kinetic rates for minerals from compilations. Based on:
22
# diffusion coefficients and molal volumina of aqueous species, solubility and volume of minerals, and critical temperatures and pressures of gases in Peng-Robinson's EOS.
33
# Details are given at the end of this file.
44

database/pitzer.dat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pitzer.DAT for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution, using
1+
# pitzer.dat for calculating temperature and pressure dependence of reactions, and the specific conductance and viscosity of the solution, using
22
# diffusion coefficients of species, molal volumina of aqueous species and minerals, and critical temperatures and pressures of gases used in Peng-Robinson's EOS.
33
# Details are given at the end of this file.
44

examples/Makefile.am

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ examplesdir = $(docdir)/examples
88
dist_examples_DATA = $(EXAMPLES)
99

1010
EXAMPLES= \
11+
co2.dat \
12+
co2_VP.dat \
1113
co2.tsv \
1214
ex1 \
1315
ex2 \

examples/ex11

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ USER_GRAPH 1
5858
END
5959
TRANSPORT
6060
-cells 40
61-
-lengths 0.002
61+
-lengths 40*0.002
6262
-shifts 100
6363
-time_step 720.0
6464
-flow_direction forward
6565
-boundary_conditions flux flux
6666
-diffusion_coefficient 0.0e-9
67-
-dispersivities 0.002
67+
-dispersivities 40*0.002
6868
-correct_disp true
6969
-punch_cells 40
7070
-punch_frequency 1

examples/ex12

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ TRANSPORT # Make column temperature 0C, displace Cl
4747
-shifts 60
4848
-flow_direction forward
4949
-boundary_conditions flux flux
50-
-lengths 0.333333
51-
-dispersivities 0.0 # No dispersion
50+
-lengths 60*0.333333
51+
-dispersivities 60*0.0 # No dispersion
5252
-diffusion_coefficient 0.0 # No diffusion
5353
-thermal_diffusion 1.0 # No retardation for heat
5454
END

examples/ex12a

+4-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ TRANSPORT # Diffuse 24C, NaCl solution from column ends
5656
-shifts 1
5757
-flow_direction diffusion
5858
-boundary_conditions constant closed
59-
-lengths 1.0
59+
-lengths 20*1.0
6060
-thermal_diffusion 3.0 # Heat is retarded equal to Na
61-
-dispersivities 0.0 # No dispersion
61+
-dispersivities 20*0.0 # No dispersion
6262
-diffusion_coefficient 0.3e-9 # m^2/s
6363
-time_step 1.0e+10 # 317 years, 19 substeps will be used
6464
SELECTED_OUTPUT
@@ -121,7 +121,8 @@ END
121121
#
122122
TRANSPORT # no need to redefine parameters that don't change from 20 cell model
123123
-cells 60
124-
-lengths 0.33333333333333333
124+
-lengths 60*0.33333333333333333
125+
-disp 60*0.0
125126
-punch_cells 1-60
126127
SELECTED_OUTPUT
127128
-active true # See also PRINT; selected_output false

examples/ex13a

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ TRANSPORT
3434
-time_step 3600
3535
-boundary_conditions flux flux
3636
-diffusion_coefficient 0.0
37-
-lengths 0.1
38-
-dispersivities 0.015
37+
-lengths 20*0.1
38+
-dispersivities 20*0.015
3939
-stagnant 1 6.8e-6 0.3 0.1
4040
# 1 stagnant layer^, ^alpha, ^epsil(m), ^epsil(im)
4141
END

examples/ex13ac

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ TRANSPORT
3434
-time_step 3600
3535
-boundary_conditions flux flux
3636
-diffusion_coefficient 0.0
37-
-lengths 0.1
38-
-dispersivities 0.015
37+
-lengths 20*0.1
38+
-dispersivities 20*0.015
3939
-stagnant 1 6.8e-6 0.3 0.1
4040
# 1 stagnant layer^, ^alpha, ^epsil(m), ^epsil(im)
4141
END
@@ -228,8 +228,8 @@ TRANSPORT
228228
-time_step 3600
229229
-boundary_conditions flux flux
230230
-diffusion_coefficient 0.0
231-
-lengths 0.1
232-
-dispersivities 0.015
231+
-lengths 20*0.1
232+
-dispersivities 20*0.015
233233
-stagnant 5
234234
END
235235
SOLUTION 0 # Original solution reenters

examples/ex13b

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ TRANSPORT
5555
-time_step 3600
5656
-boundary_conditions flux flux
5757
-diffusion_coefficient 0.0
58-
-lengths 0.1
59-
-dispersivities 0.015
58+
-lengths 20*0.1
59+
-dispersivities 20*0.015
6060
-stagnant 1
6161
END
6262
SOLUTION 0 # Original solution reenters

examples/ex13c

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ TRANSPORT
155155
-time_step 3600
156156
-boundary_conditions flux flux
157157
-diffusion_coefficient 0.0
158-
-lengths 0.1
159-
-dispersivities 0.015
158+
-lengths 20*0.1
159+
-dispersivities 20*0.015
160160
-stagnant 5
161161
END
162162
SOLUTION 0 # Original solution reenters

examples/ex15

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ USER_GRAPH 2 Example 15
135135
-end -end
136136
TRANSPORT First 20 hours have NTA and cobalt in infilling solution
137137
-cells 10
138-
-lengths 1
138+
-lengths 10*1
139139
-shifts 20
140140
-time_step 3600
141141
-flow_direction forward
142142
-boundary_conditions flux flux
143-
-dispersivities .05
143+
-dispersivities 10*.05
144144
-correct_disp true
145145
-diffusion_coefficient 0.0
146146
-punch_cells 10
@@ -183,13 +183,13 @@ USER_GRAPH 2
183183
-end
184184
TRANSPORT First 20 hours have NTA and cobalt in infilling solution
185185
-cells 20
186-
-lengths 0.5
186+
-lengths 20*0.5
187187
-shifts 40
188188
-initial_time 0
189189
-time_step 1800
190190
-flow_direction forward
191191
-boundary_conditions flux flux
192-
-dispersivities .05
192+
-dispersivities 20*.05
193193
-correct_disp true
194194
-diffusion_coefficient 0.0
195195
-punch_cells 20

examples/ex15a

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ USER_GRAPH Example 15A
118118
-end
119119
TRANSPORT First 20 hours have NTA and cobalt in infilling solution
120120
-cells 10
121-
-lengths 1
121+
-lengths 10*1
122122
-shifts 20
123123
-time_step 3600
124124
-flow_direction forward
125125
-boundary_conditions flux flux
126-
-dispersivities .05
126+
-dispersivities 10*.05
127127
-correct_disp true
128128
-diffusion_coefficient 0.0
129129
-punch_cells 10
@@ -156,13 +156,13 @@ USER_GRAPH
156156
-end
157157
TRANSPORT First 20 hours have NTA and cobalt in infilling solution
158158
-cells 20
159-
-lengths 0.5
159+
-lengths 20*0.5
160160
-shifts 40
161161
-initial_time 0
162162
-time_step 1800
163163
-flow_direction forward
164164
-boundary_conditions flux flux
165-
-dispersivities .05
165+
-dispersivities 20*.05
166166
-correct_disp true
167167
-diffusion_coefficient 0.0
168168
-punch_cells 20

examples/ex15b

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ USER_PUNCH
103103
-end
104104
TRANSPORT First 20 hours have NTA and cobalt in infilling solution
105105
-cells 10
106-
-lengths 1
106+
-lengths 10*1
107107
-shifts 20
108108
-time_step 3600
109109
-flow_direction forward
110110
-boundary_conditions flux flux
111-
-dispersivities .05
111+
-dispersivities 10*.05
112112
-correct_disp true
113113
-diffusion_coefficient 0.0
114114
-punch_cells 10
@@ -147,13 +147,13 @@ USER_PUNCH
147147
-end
148148
TRANSPORT First 20 hours have NTA and cobalt in infilling solution
149149
-cells 20
150-
-lengths 0.5
150+
-lengths 20*0.5
151151
-shifts 40
152152
-initial_time 0
153153
-time_step 1800
154154
-flow_direction forward
155155
-boundary_conditions flux flux
156-
-dispersivities .05
156+
-dispersivities 20*.05
157157
-correct_disp true
158158
-diffusion_coefficient 0.0
159159
-punch_cells 20

examples/ex20b

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ USER_PUNCH
9696
END
9797
PRINT
9898
-selected_output false
99+
-warnings 0
99100
END
100101
INCLUDE$ ex20_open
101102
END

examples/ex21

+1
Original file line numberDiff line numberDiff line change
@@ -357,5 +357,6 @@ USER_PUNCH
357357
END
358358
PRINT
359359
-selected_out false
360+
-status false
360361
INCLUDE$ radial
361362
END

examples/ex22

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
TITLE Example 22.--Compare experimental CO2 solubilities at high CO2 pressure with
22
Peng-Robinson calc`ns with fixed-volume gas_phase, 25, 50, 75, 100, 150 oC.
33
#PRINT; -reset false
4+
PRINT
5+
-warnings 0
46
SOLUTION 1
57
GAS_PHASE 1
68
-fixed_volume

examples/ex9

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ Goethite
9696
Fe_triOOH + 3 H+ = Fe_tri+3 + 2 H2O
9797
log_k -1.0
9898
END
99+
PRINT
100+
-warnings 0
99101
SOLUTION 1
100102
pH 7.0
101103
pe 10.0 O2(g) -0.67

src/mainsubs.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -681,9 +681,15 @@ initial_gas_phases(int print)
681681
if (pr.user_print)
682682
print_user_print();
683683
if (PR /*&& use.Get_gas_phase_ptr()->total_p > 1.0*/)
684-
warning_msg("While initializing gas phase composition by equilibrating:\n"
685-
" Found definitions of gas` critical temperature and pressure.\n"
686-
" Going to use Peng-Robinson in subsequent calculations.\n");
684+
{
685+
std::ostringstream msg;
686+
msg << "\nWhile initializing gas phase composition by equilibrating:\n";
687+
msg << " Found definitions of gas critical temperature and pressure.\n";
688+
msg << " Going to use Peng-Robinson in subsequent calculations.\n";
689+
screen_msg(msg.str().c_str());
690+
output_msg(msg.str().c_str());
691+
log_msg(msg.str().c_str());
692+
}
687693
xgas_save(n_user);
688694
punch_all();
689695
/* free_model_allocs(); */

src/transport.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,17 @@ transport(void)
508508
/*
509509
* Now transport
510510
*/
511-
if (implicit)
512-
snprintf(token, sizeof(token), "\nCalculating implicit transport: %d (mobile) cells, %d shifts, %d mixruns, max. mixf = %g.\n\n",
513-
count_cells, count_shifts - transport_start + 1, nmix, max_mixf);
514-
else
515-
snprintf(token, sizeof(token), "\nCalculating transport: %d (mobile) cells, %d shifts, %d mixruns...\n\n",
516-
count_cells, count_shifts - transport_start + 1, nmix);
517-
warning_msg(token);
511+
{
512+
if (implicit)
513+
snprintf(token, sizeof(token), "\nCalculating implicit transport: %d (mobile) cells, %d shifts, %d mixruns, max. mixf = %g.\n\n",
514+
count_cells, count_shifts - transport_start + 1, nmix, max_mixf);
515+
else
516+
snprintf(token, sizeof(token), "\nCalculating transport: %d (mobile) cells, %d shifts, %d mixruns...\n\n",
517+
count_cells, count_shifts - transport_start + 1, nmix);
518+
screen_msg(token);
519+
output_msg(token);
520+
log_msg(token);
521+
}
518522
max_iter = 0;
519523
for (transport_step = transport_start; transport_step <= count_shifts;
520524
transport_step++)

0 commit comments

Comments
 (0)