Skip to content

Commit 181359f

Browse files
committed
Updated reaction constans (EQ and kb) to use molarity-based units until activity model is implemented
1 parent 3aac5c6 commit 181359f

File tree

3 files changed

+46
-46
lines changed

3 files changed

+46
-46
lines changed

src/reactions/geochemistry/Forge.hpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,24 @@ constexpr CArrayWrapper< double, 24, 29 > stoichMatrix =
5757
constexpr CArrayWrapper< double, 24 > equilibriumConstants =
5858
{
5959
104351.8133, // CaCO₃(aq) + H⁺ ⇌ Ca²⁺ + HCO₃⁻
60-
3.98107E-03, // CaHCO₃⁺ ⇌ Ca²⁺ + HCO₃⁻
61-
3.6915E-04, // CaSO₄ ⇌ Ca²⁺ + SO₄²⁻
62-
0.2930, // CaCl⁺ ⇌ Ca²⁺ + Cl⁻
63-
0.1228, // CaCl₂ ⇌ Ca²⁺ + 2Cl⁻ (approximate, same source)
64-
0.0038, // MgHCO₃⁺ ⇌ Mg²⁺ + HCO₃⁻
60+
3.9739, //3.98107E-03, // CaHCO₃⁺ ⇌ Ca²⁺ + HCO₃⁻
61+
0.3685, //3.6915E-04, // CaSO₄ ⇌ Ca²⁺ + SO₄²⁻
62+
292.4726, //0.2930 // CaCl⁺ ⇌ Ca²⁺ + Cl⁻
63+
1.2236e+05, //0.1228 // CaCl₂ ⇌ Ca²⁺ + 2Cl⁻ (approximate, same source)
64+
3.7932, //0.0038 // MgHCO₃⁺ ⇌ Mg²⁺ + HCO₃⁻
6565
7.4559E+05, // MgCO₃(aq) + H⁺ ⇌ Mg²⁺ + HCO₃⁻
66-
0.0726, // MgCl⁺ ⇌ Mg²⁺ + Cl⁻
67-
6.3548E-08, // CO₂(aq) + H₂O ⇌ H⁺ + HCO₃⁻
68-
3.4017E-05, // HSO₄⁻ ⇌ H⁺ + SO₄²⁻
69-
3.7068E-05, // KHSO₄ ⇌ H⁺ + K⁺ + SO₄²⁻
70-
6.9088E+08, // HSiO₃⁻ ⇌ H⁺ + SiO₂(aq)
71-
4.5520E+07, // NaHSiO₃ ⇌ H⁺ + Na⁺ + SiO₂(aq)
72-
0.8067, // NaCl ⇌ Na⁺ + Cl⁻
73-
1.6398, // KCl ⇌ K⁺ + Cl⁻
74-
0.0121, // KSO₄⁻ ⇌ K⁺ + SO₄²⁻
75-
14.6994, // AlOH²⁺ + H⁺ ⇌ Al³⁺ + H₂O
76-
3.8530E+03, // Al(OH)₂⁺ + 2H⁺ ⇌ Al³⁺ + 2H₂O
77-
1.9213E+11, // OH⁻ + H⁺ ⇌ H₂O
66+
72.4693, //0.0726 // MgCl⁺ ⇌ Mg²⁺ + Cl⁻
67+
6.3434e-05, //6.3548E-08 // CO₂(aq) + H₂O ⇌ H⁺ + HCO₃⁻
68+
0.0340, //3.4017E-05, // HSO₄⁻ ⇌ H⁺ + SO₄²⁻
69+
36.9347, //3.7068E-05, // KHSO₄ ⇌ H⁺ + K⁺ + SO₄²⁻
70+
6.8964e+11, // 6.9088E+08, // HSiO₃⁻ ⇌ H⁺ + SiO₂(aq)
71+
4.5356e+13, //4.5520E+07, // NaHSiO₃ ⇌ H⁺ + Na⁺ + SiO₂(aq)
72+
805.2479, //0.8067, // NaCl ⇌ Na⁺ + Cl⁻
73+
1.6368e+03, //1.6398, // KCl ⇌ K⁺ + Cl⁻
74+
12.0782, //0.0121, // KSO₄⁻ ⇌ K⁺ + SO₄²⁻
75+
0.0147, //14.6994, // AlOH²⁺ + H⁺ ⇌ Al³⁺ + H₂O
76+
0.0039, //3.8530E+03, // Al(OH)₂⁺ + 2H⁺ ⇌ Al³⁺ + 2H₂O
77+
1.9282e+05, //1.9213E+11, // OH⁻ + H⁺ ⇌ H₂O
7878
0.0036, // SiO2(s) ⇌ SiO2(aq)
7979
6.6130E+15, // KAlMg3Si3O10(OH)2(s) + 10H+ ⇌ Al3+ + K+ + 3Mg2+ + 3SiO2(aq) + 6H2O
8080
1.3047E+05, // CaAl2(SiO4)2(s) + 8H+ ⇌ Ca2+ + 2 Al3+ + 2 SiO2(aq) + 4H2O
@@ -106,8 +106,8 @@ constexpr CArrayWrapper< double, 24 > fwRateConstant =
106106
2.7043E-08, // SiO2(s) ⇌ SiO2(aq)
107107
3.0145E-11, // KAlMg3Si3O10(OH)2(s) + 10H+ ⇌ Al3+ + K+ + 3Mg2+ + 3SiO2(aq) + 6H2O
108108
1.0801E-08, // CaAl2(SiO4)2(s) + 8H+ ⇌ Ca2+ + 2 Al3+ + 2 SiO2(aq) + 4H2O
109-
1.1283e-10, // KAlSi3O8(s) + 4H+ ⇌ Al3+ + K+ + 3 SiO2 + 2H2O
110-
1.8137e-12 // Al2Si2O5(OH)4(s) + 6H+ ⇌ Al3+ + 2 SiO2 + 5H2O
109+
1.1283e-10, // KAlSi3O8(s) + 4H+ ⇌ Al3+ + K+ + 3 SiO2 + 2H2O
110+
1.8137e-12 // Al2Si2O5(OH)4(s) + 6H+ ⇌ Al3+ + 2 SiO2 + 5H2O
111111
};
112112

113113

@@ -132,11 +132,11 @@ constexpr CArrayWrapper< double, 24 > reverseRateConstant =
132132
0.0, // AlOH²⁺ + H⁺ ⇌ Al³⁺ + H₂O
133133
0.0, // Al(OH)₂⁺ + 2H⁺ ⇌ Al³⁺ + 2H₂O
134134
0.0, // OH⁻ + H⁺ ⇌ H₂O
135-
7.5119E-06, // SiO2(s) ⇌ SiO2(aq)
136-
4.5584E-27, // KAlMg3Si3O10(OH)2(s) + 10H+ ⇌ Al3+ + K+ + 3Mg2+ + 3SiO2(aq) + 6H2O
137-
8.2785E-14, // CaAl2(SiO4)2(s) + 8H+ ⇌ Ca2+ + 2 Al3+ + 2 SiO2(aq) + 4H2O
138-
6.3858E-07, // KAlSi3O8(s) + 4H+ ⇌ Al3+ + K+ + 3 SiO2 + 2H2O
139-
5.7645E-08 // Al2Si2O5(OH)4(s) + 6H+ ⇌ Al3+ + 2 SiO2 + 5H2O
135+
7.4240e-09, //7.5119E-06, // SiO2(s) ⇌ SiO2(aq)
136+
4.5420e-21, //4.5584E-27, // KAlMg3Si3O10(OH)2(s) + 10H+ ⇌ Al3+ + K+ + 3Mg2+ + 3SiO2(aq) + 6H2O
137+
8.2341e-05, //8.2785E-14, // CaAl2(SiO4)2(s) + 8H+ ⇌ Ca2+ + 2 Al3+ + 2 SiO2(aq) + 4H2O
138+
6.3975e-10, //6.3858E-07, // KAlSi3O8(s) + 4H+ ⇌ Al3+ + K+ + 3 SiO2 + 2H2O
139+
57.3348 //5.7645E-08 // Al2Si2O5(OH)4(s) + 6H+ ⇌ Al3+ + 2 SiO2 + 5H2O
140140
};
141141

142142
constexpr CArrayWrapper< int, 24 > mobileSpeciesFlag =

src/reactions/geochemistry/unitTests/testForgeReactions.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,34 @@ TEST( testForgeReactions, testTimeStep_forgeSystem )
3030

3131
double const initialAggregateSpeciesConcentration[numPrimarySpecies] =
3232
{
33-
5e-08, // H+
34-
8.3991e-0, // Ca+2
35-
0.00014146, // Mg+2
36-
0.0034061, // Na+
37-
0.00020949, // K+
38-
2.3494e-08, // Al+++
39-
0.0016047, // HCO3-
40-
0.00038069, // SO4-2
41-
0.0010018, // Cl-
42-
4.4047e-06 //SiO2(aq)
33+
1.9964e-04, // H+
34+
0.1050, // Ca+2
35+
0.1209, // Mg+2
36+
3.4000, // Na+
37+
0.1250, // K+
38+
5.4367e-04, // Al+++
39+
2.60, // HCO3-
40+
0.380, // SO4-2
41+
1.0, // Cl-
42+
0.0103 //SiO2(aq)
4343
};
4444

4545
double const expectedSpeciesConcentrations[numPrimarySpecies] =
4646
{
47-
5e-08, // H+
48-
8.3991e-0, // Ca+2
49-
0.00014146, // Mg+2
50-
0.0034061, // Na+
51-
0.00020949, // K+
52-
2.3494e-08, // Al+++
53-
0.0016047, // HCO3-
54-
0.00038069, // SO4-2
55-
0.0010018, // Cl-
56-
4.4047e-06 //SiO2(aq)
47+
1.9964e-04, // H+
48+
0.1050, // Ca+2
49+
0.1209, // Mg+2
50+
3.4000, // Na+
51+
0.1250, // K+
52+
5.4367e-04, // Al+++
53+
2.60, // HCO3-
54+
0.380, // SO4-2
55+
1.0, // Cl-
56+
0.0103 //SiO2(aq)
5757
};
5858

5959
timeStepTest< double, true >( forgeSystem,
60-
1.e-3,
60+
1.e-5,
6161
10,
6262
initialAggregateSpeciesConcentration,
6363
surfaceArea,

src/reactions/unitTestUtilities/mixedReactionsTestUtilities.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void timeStepTest( PARAMS_DATA const & params,
130130
}
131131
};
132132

133-
nonlinearSolvers::newtonRaphson< numPrimarySpecies >( logPrimarySpeciesConcentration, computeResidualAndJacobian, 25 );
133+
nonlinearSolvers::newtonRaphson< numPrimarySpecies >( logPrimarySpeciesConcentration, computeResidualAndJacobian, 50 );
134134

135135
time += dt;
136136
}

0 commit comments

Comments
 (0)