Skip to content

Commit

Permalink
TST: Add test for phase cycling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
richardotis committed Apr 24, 2017
1 parent 1828a74 commit 4f24636
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pycalphad/tests/test_equilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,13 @@ def test_eq_issue62_last_component_not_va():
"""
equilibrium(Database(test_tdb), ['AL', 'CO', 'CR', 'W', 'VA'], ['FCC_A1'],
{"T": 1248, "P": 101325, v.X("AL"): 0.081, v.X("CR"): 0.020, v.X("W"): 0.094})


def test_eq_avoid_phase_cycling():
"""
Converge without getting stuck in an add/remove phase cycle.
"""
# This set of conditions is known to trigger the issue
my_phases_alfe = ['LIQUID', 'B2_BCC', 'FCC_A1', 'HCP_A3', 'AL5FE2', 'AL2FE', 'AL13FE4', 'AL5FE4']
equilibrium(ALFE_DBF, ['AL', 'FE', 'VA'], my_phases_alfe, {v.X('AL'): 0.44,
v.T: 1600, v.P: 101325}, verbose=True)

0 comments on commit 4f24636

Please sign in to comment.