Skip to content

Commit

Permalink
added relaxed fper benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmyhill committed May 15, 2024
1 parent b444367 commit d518750
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions misc/benchmarks/slb_2024_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d518750

Please sign in to comment.