From d5187504038fff44ca89afe40f19d1a3bb8d86d3 Mon Sep 17 00:00:00 2001 From: Bob Myhill Date: Thu, 16 May 2024 00:35:49 +0100 Subject: [PATCH] added relaxed fper benchmark --- misc/benchmarks/slb_2024_benchmarks.py | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/misc/benchmarks/slb_2024_benchmarks.py b/misc/benchmarks/slb_2024_benchmarks.py index 2073999f..2b35a9e5 100644 --- a/misc/benchmarks/slb_2024_benchmarks.py +++ b/misc/benchmarks/slb_2024_benchmarks.py @@ -2,6 +2,7 @@ from burnman import Composite, equilibrate, RelaxedSolution from burnman.tools.eos import check_eos_consistency +from burnman.tools.unitcell import molar_volume_from_unit_cell_volume from burnman.minerals import SLB_2024 import numpy as np @@ -14,6 +15,40 @@ check_eos_consistency(fe_bcc, verbose=True) +fper = RelaxedSolution( + SLB_2024.ferropericlase(), + [[0.0, 0.5, -0.5, 0.0, 0.0]], + [ + [1.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 0.5, 0.5, 0.0, 0.0], + [0.0, 0.0, 0.0, 1.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 1.0], + ], +) + +c = molar_volume_from_unit_cell_volume(1.0, SLB_2024.periclase().params["Z"]) + +pressures = np.linspace(1.0e5, 140.0e9, 141) +temperatures = pressures * 0.0 + 300.0 + +fig = plt.figure(figsize=(10, 5)) +ax = [fig.add_subplot(1, 2, i) for i in range(1, 3)] + +fig1 = mpimg.imread("figures/SLB_2024_fper_V.png") +fig2 = mpimg.imread("figures/SLB_2024_fper_K_T.png") +ax[0].imshow(fig1, extent=[0.0, 140.0, 50.0, 80.0], aspect="auto") +ax[1].imshow(fig2, extent=[0.0, 140.0, 100.0, 700.0], aspect="auto") + +for x_fe in [0.1, 0.3, 0.5, 1.0]: + fper.set_composition([1.0 - x_fe, x_fe, 0.0, 0.0]) + Vs, K_Ss = fper.evaluate(["V", "K_S"], pressures, temperatures) + + ax[0].plot(pressures / 1.0e9, Vs / c, linestyle=":", linewidth=3.0) + ax[1].plot(pressures / 1.0e9, K_Ss / 1.0e9, linestyle=":", linewidth=3.0) + +ax[0].set_ylim(50.0, 80.0) +ax[1].set_ylim(100.0, 700.0) +plt.show() temperatures = np.linspace(1.0, 2000.0, 101) pressures = temperatures * 0.0 + 1.0e5