Skip to content

Commit 0f609bc

Browse files
committed
tweak garnet solvus example to below closure temperature to avoid solver failure
1 parent 5ff20b1 commit 0f609bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/example_equilibrate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,19 @@
240240

241241
# Run the equilibration
242242
pressure = 1.0e5
243-
temperatures = np.linspace(300.0, 601.4, 41)
243+
temperatures = np.linspace(300.0, 601.0, 41)
244244
equality_constraints = [("P", pressure), ("T", temperatures)]
245245

246246
sols, prm = equilibrate(composition, assemblage, equality_constraints)
247247

248248
# Interrogate the stable assemblages for phase compositions.
249249
x1s = np.array(
250-
[sol.assemblage.phases[0].molar_fractions[1] for sol in sols if sol.code == 0]
250+
[sol.assemblage.phases[0].molar_fractions[1] for sol in sols if sol.success]
251251
)
252252
x2s = np.array(
253-
[sol.assemblage.phases[1].molar_fractions[1] for sol in sols if sol.code == 0]
253+
[sol.assemblage.phases[1].molar_fractions[1] for sol in sols if sol.success]
254254
)
255-
Ts = np.array([sol.assemblage.temperature for sol in sols if sol.code == 0])
255+
Ts = np.array([sol.assemblage.temperature for sol in sols if sol.success])
256256

257257
plt.plot(x1s, Ts)
258258
plt.plot(x2s, Ts)

0 commit comments

Comments
 (0)