Skip to content

Commit

Permalink
Add consistency tests for BinarySolutionTabulatedThermo
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed May 31, 2022
1 parent 7f703fd commit 22cd43d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/data/consistency-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,19 @@ ideal-condensed-2:
- {T: 300, P: 0.1 atm, X: {sp1: 1.0}}
- {T: 400, P: 0.1 atm, X: {sp1: 0.01, sp2: 0.03, sp3: 0.94}}
- {T: 500, P: 2 bar, X: {sp1: 0.1, sp2: 0.89, sp3: 0.01}}

binary-solution-tabulated:
setup:
file: thermo-models.yaml
phase: graphite-anode
known-failures:
hk_eq_uk_plus_P_times_vk: getPartialMolarIntEnergies is not implemented
u_eq_sum_uk_Xk: getPartialMolarIntEnergies is not implemented
g_eq_h_minus_Ts: Inconsistent results when P != 1 atm (states 2 and 3)
h_eq_sum_hk_Xk: Inconsistent result for single-species state (state 3)
g_eq_sum_gk_Xk: Inconsistent result when P != 1 atm (states 2 and 3)
states:
- {T: 300, P: 1 atm, X: {"Li[anode]": 0.3, "V[anode]": 0.7}}
- {T: 320, P: 1 atm, X: {"Li[anode]": 0.3, "V[anode]": 0.7}}
- {T: 300, P: 10 atm, X: {"Li[anode]": 0.6, "V[anode]": 0.4}}
- {T: 300, P: 10 atm, X: {"Li[anode]": 0.0, "V[anode]": 1.0}}
6 changes: 6 additions & 0 deletions test/thermo/consistency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,10 @@ INSTANTIATE_TEST_SUITE_P(IdealSolidSolnPhase2, TestConsistency,
testing::ValuesIn(getStates("ideal-condensed-2")))
);

INSTANTIATE_TEST_SUITE_P(BinarySolutionTabulated, TestConsistency,
testing::Combine(
testing::Values(getSetup("binary-solution-tabulated")),
testing::ValuesIn(getStates("binary-solution-tabulated")))
);

}

0 comments on commit 22cd43d

Please sign in to comment.