Skip to content

Commit

Permalink
Add consistency tests for SurfPhase and EdgePhase
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and ischoegl committed Jun 10, 2022
1 parent 43c42c5 commit f70c8ac
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/data/consistency-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,33 @@ fixed-stoichiometry:
- {T: 300, P: 1 atm}
- {T: 300, P: 10 atm}
- {T: 500, P: 10 atm}

ideal-surface:
setup:
file: surface-phases.yaml
phase: Pt-surf
atol_v: 1e-7
known-failures:
h_eq_u_plus_Pv: "Definition of volume is unclear. See GitHub Issue #1312"
gk_eq_hk_minus_T_times_sk:
"Implementation of s_k is incorrect. See GitHub Issue #1313"
s_eq_sum_sk_Xk:
"Implementation of s_k is incorrect. See GitHub Issue #1313"
g_eq_sum_gk_Xk:
"chemPotentials does not protect against inf. See GitHub Issue #1314"
states:
- {T: 800, P: 1 atm, coverages: {Pt(s): 0.5, H(s): 0.4, O(s): 0.1}}
- {T: 800, P: 5 atm, coverages: {H(s): 1.0}}
- {T: 300, P: 20 atm, coverages: {Pt(s): 1.0}}
- {T: 600, P: 5 atm, coverages: {Pt(s): 0.1, O(s): 0.9}}

ideal-edge:
setup:
file: surface-phases.yaml
phase: TPB
atol_v: 1e3 # site density of 5e-18 kmol/m = linear molar volume of 2e17 m/kmol
known-failures:
h_eq_u_plus_Pv: "Definition of volume is unclear. See GitHub Issue #1312"
states:
- {T: 300, P: 1 atm}
- {T: 900, P: 20 atm}
12 changes: 12 additions & 0 deletions test/thermo/consistency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,4 +505,16 @@ INSTANTIATE_TEST_SUITE_P(FixedStoichiometry, TestConsistency,
testing::ValuesIn(getStates("fixed-stoichiometry")))
);

INSTANTIATE_TEST_SUITE_P(IdealSurface, TestConsistency,
testing::Combine(
testing::Values(getSetup("ideal-surface")),
testing::ValuesIn(getStates("ideal-surface")))
);

INSTANTIATE_TEST_SUITE_P(IdealEdge, TestConsistency,
testing::Combine(
testing::Values(getSetup("ideal-edge")),
testing::ValuesIn(getStates("ideal-edge")))
);

}

0 comments on commit f70c8ac

Please sign in to comment.