[Test] Add Debye-Huckel test using IAPWS water equation

Failing test cases documented in #1500
This commit is contained in:
Ray Speth
2023-06-13 13:05:25 -06:00
committed by Ingmar Schoegl
parent d7fe516be0
commit e2cdb1c607
3 changed files with 180 additions and 0 deletions
+48
View File
@@ -180,6 +180,19 @@ debye-huckel-dilute:
molalities: {Na+: 9.3549, Cl-: 9.3549, H+: 1.05e-08, OH-: 1.3765e-06,
NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06}}
debye-huckel-dilute-IAPWS:
setup:
file: debye-huckel-all.yaml
phase: debye-huckel-dilute-IAPWS
rtol_fd: 1e-5 # Good finite difference results with IAPWS are challenging
known-failures:
cv_eq_.+: cv not implemented
activity_coeffs: "Activity coeffs are incorrect. See GitHub Issue #1311"
cp_eq_.+: "cp with variable A_Debye is incorrect. See GitHub Issue #1500"
dsdP_const_T_eq_minus_dV_dT_const_P.+:
"Error with dilute limit with variable A_Debye. See GitHub Issue #1502"
states: *debye-huckel-states
debye-huckel-B-dot-ak:
setup:
file: debye-huckel-all.yaml
@@ -187,6 +200,17 @@ debye-huckel-B-dot-ak:
known-failures: *debye-huckel-failures
states: *debye-huckel-states
debye-huckel-B-dot-ak-IAPWS:
setup:
file: debye-huckel-all.yaml
phase: debye-huckel-B-dot-ak-IAPWS
rtol_fd: 1e-5 # Good finite difference results with IAPWS are challenging
known-failures: &debye-huckel-IAPWS-failures
cv_eq_.+: cv not implemented
activity_coeffs: "Activity coeffs are incorrect. See GitHub Issue #1311"
cp_eq_.+: "cp with variable A_debye is incorrect. See GitHub Issue #1500"
states: *debye-huckel-states
debye-huckel-B-dot-a:
setup:
file: debye-huckel-all.yaml
@@ -194,6 +218,14 @@ debye-huckel-B-dot-a:
known-failures: *debye-huckel-failures
states: *debye-huckel-states
debye-huckel-B-dot-a-IAPWS:
setup:
file: debye-huckel-all.yaml
phase: debye-huckel-B-dot-a-IAPWS
rtol_fd: 1e-5 # Good finite difference results with IAPWS are challenging
known-failures: *debye-huckel-IAPWS-failures
states: *debye-huckel-states
debye-huckel-pitzer-beta_ij:
setup:
file: debye-huckel-all.yaml
@@ -201,6 +233,14 @@ debye-huckel-pitzer-beta_ij:
known-failures: *debye-huckel-failures
states: *debye-huckel-states
debye-huckel-pitzer-beta_ij-IAPWS:
setup:
file: debye-huckel-all.yaml
phase: debye-huckel-pitzer-beta_ij-IAPWS
rtol_fd: 1e-5 # Good finite difference results with IAPWS are challenging
known-failures: *debye-huckel-IAPWS-failures
states: *debye-huckel-states
debye-huckel-beta_ij:
setup:
file: debye-huckel-all.yaml
@@ -208,6 +248,14 @@ debye-huckel-beta_ij:
known-failures: *debye-huckel-failures
states: *debye-huckel-states
debye-huckel-beta_ij-IAPWS:
setup:
file: debye-huckel-all.yaml
phase: debye-huckel-beta_ij-IAPWS
rtol_fd: 1e-5 # Good finite difference results with IAPWS are challenging
known-failures: *debye-huckel-IAPWS-failures
states: *debye-huckel-states
margules:
setup:
file: LiKCl_liquid.yaml
+102
View File
@@ -20,6 +20,24 @@ phases:
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 9.3549, Cl-: 9.3549, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-dilute-IAPWS
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
species:
- water_IAPWS: [H2O(L)]
- species_waterSolution: [Na+, Cl-, H+, OH-, NaCl(aq), NaOH(aq), SiO2(aq),
NaH3SiO4(aq), H3SiO4-]
thermo: Debye-Huckel
activity-data:
model: dilute-limit
A_Debye: variable
B_Debye: 3.28640E9 kg^0.5/gmol^0.5/m
max-ionic-strength: 3.0
use-Helgeson-fixed-form: true
default-ionic-radius: 3.5 angstrom
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 9.3549, Cl-: 9.3549, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-B-dot-ak
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
@@ -36,6 +54,23 @@ phases:
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 9.3549, Cl-: 9.3549, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-B-dot-ak-IAPWS
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
- water_IAPWS: [H2O(L)]
- species_waterSolution: [Na+, Cl-, H+, OH-, NaCl(aq), NaOH(aq), SiO2(aq),
NaH3SiO4(aq), H3SiO4-]
thermo: Debye-Huckel
activity-data:
model: B-dot-with-variable-a
A_Debye: variable
B_Debye: 3.28640E9 kg^0.5/gmol^0.5/m
max-ionic-strength: 50.0
B-dot: 0.041
default-ionic-radius: 4.0 angstrom
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 9.3549, Cl-: 9.3549, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-B-dot-a
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
@@ -52,6 +87,23 @@ phases:
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 9.3549, Cl-: 9.3549, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-B-dot-a-IAPWS
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
- water_IAPWS: [H2O(L)]
- species_waterSolution: [Na+, Cl-, H+, OH-, NaCl(aq), NaOH(aq), SiO2(aq),
NaH3SiO4(aq), H3SiO4-]
thermo: Debye-Huckel
activity-data:
model: B-dot-with-common-a
A_Debye: variable
B_Debye: 3.28640E9 kg^0.5/gmol^0.5/m
max-ionic-strength: 50.0
B-dot: 0.0
default-ionic-radius: 3.5 angstrom
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 9.3549, Cl-: 9.3549, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-pitzer-beta_ij
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
@@ -73,6 +125,28 @@ phases:
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 3.0, Cl-: 3.0, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-pitzer-beta_ij-IAPWS
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
- water_IAPWS: [H2O(L)]
- species_waterSolution: [Na+, Cl-, H+, OH-, NaCl(aq), NaOH(aq), SiO2(aq),
NaH3SiO4(aq), H3SiO4-]
thermo: Debye-Huckel
activity-data:
model: Pitzer-with-beta_ij
A_Debye: variable
B_Debye: 3.28640E9 kg^0.5/gmol^0.5/m
default-ionic-radius: 3.042843 angstrom
beta:
- species: [H+, Cl-]
beta: 0.27
- species: [Na+, Cl-]
beta: 0.15
- species: [Na+, OH-]
beta: 0.06
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 3.0, Cl-: 3.0, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-beta_ij
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
@@ -94,6 +168,28 @@ phases:
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 3.0, Cl-: 3.0, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
- name: debye-huckel-beta_ij-IAPWS
elements: [O, H, C, E, Fe, Si, N, Na, Cl]
species:
- water_IAPWS: [H2O(L)]
- species_waterSolution: [Na+, Cl-, H+, OH-, NaCl(aq), NaOH(aq), SiO2(aq),
NaH3SiO4(aq), H3SiO4-]
thermo: Debye-Huckel
activity-data:
model: beta_ij
A_Debye: variable
B_Debye: 3.28640E9 kg^0.5/gmol^0.5/m
default-ionic-radius: 3.042843 angstrom
beta:
- species: [H+, Cl-]
beta: 0.27
- species: [Na+, Cl-]
beta: 0.15
- species: [Na+, OH-]
beta: 0.06
state: {T: 300.0 K, P: 1.01325e+05 Pa, molalities: {Na+: 3.0, Cl-: 3.0, H+: 1.0499e-08,
OH-: 1.3765e-06, NaCl(aq): 0.98492, NaOH(aq): 3.8836e-06, NaH3SiO4(aq): 6.8798e-05,
SiO2(aq): 3.0179e-05, H3SiO4-: 1.0231e-06}}
species_waterSolution:
- name: H2O(L)
@@ -266,3 +362,9 @@ species_waterSolution:
Debye-Huckel:
electrolyte-species-type: charged-species
weak-acid-charge: -1.0
water_IAPWS:
- name: H2O(L)
composition: {H: 2, O: 1}
equation-of-state:
model: liquid-water-IAPWS95
+30
View File
@@ -737,30 +737,60 @@ INSTANTIATE_TEST_SUITE_P(DebyeHuckelDilute, TestConsistency,
testing::ValuesIn(getStates("debye-huckel-dilute")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckelDilute_IAPWS, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-dilute-IAPWS")),
testing::ValuesIn(getStates("debye-huckel-dilute-IAPWS")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_b_dot_ak, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-B-dot-ak")),
testing::ValuesIn(getStates("debye-huckel-B-dot-ak")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_b_dot_ak_IAPWS, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-B-dot-ak-IAPWS")),
testing::ValuesIn(getStates("debye-huckel-B-dot-ak-IAPWS")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_b_dot_a, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-B-dot-a")),
testing::ValuesIn(getStates("debye-huckel-B-dot-a")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_b_dot_a_IAPWS, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-B-dot-a-IAPWS")),
testing::ValuesIn(getStates("debye-huckel-B-dot-a-IAPWS")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_pitzer_beta_ij, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-pitzer-beta_ij")),
testing::ValuesIn(getStates("debye-huckel-pitzer-beta_ij")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_pitzer_beta_ij_IAPWS, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-pitzer-beta_ij-IAPWS")),
testing::ValuesIn(getStates("debye-huckel-pitzer-beta_ij-IAPWS")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_beta_ij, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-beta_ij")),
testing::ValuesIn(getStates("debye-huckel-beta_ij")))
);
INSTANTIATE_TEST_SUITE_P(DebyeHuckel_beta_ij_IAPWS, TestConsistency,
testing::Combine(
testing::Values(getSetup("debye-huckel-beta_ij-IAPWS")),
testing::ValuesIn(getStates("debye-huckel-beta_ij-IAPWS")))
);
INSTANTIATE_TEST_SUITE_P(Margules, TestConsistency,
testing::Combine(
testing::Values(getSetup("margules")),