Skip to content
Snippets Groups Projects

Update figure comparing Debye and Einstein models. Added experimental data for silver.

Merged Joana Fraxanet Morales requested to merge plot_Einstein_Debye into master
+ 2
6
@@ -123,19 +123,15 @@ temp = np.linspace(1, 215, 100)
fit = curve_fit(c_einstein, T, c, 500)
T_E = fit[0][0]
#delta_T_E = np.sqrt(fit[1][0, 0])
#print(f"T_E = {T_E:.5} ± {delta_T_E:.3} K")
fit = curve_fit(c_debye, T, c, 500)
T_D = fit[0][0]
#delta_T_D = np.sqrt(fit[1][0, 0])
#print(f"T_D = {T_D:.5} ± {delta_T_D:.3} K")
fig, ax = pyplot.subplots()
ax.scatter(T, c)
ax.set_title('Heat capacity of silver compared to the Debye and Einstein models')
ax.plot(temp, c_debye(temp, T_D), label=f'Debye model, $T_e={T_E:.5}$')
ax.plot(temp, c_einstein(temp, T_E), label=f'Einstein model, $T_e={T_E:.5}$')
ax.plot(temp, c_debye(temp, T_D), label=f'Debye model, $T_D={T_D:.5}K$')
ax.plot(temp, c_einstein(temp, T_E), label=f'Einstein model, $T_E={T_E:.5}K$')
ax.set_ylim(bottom=0, top=3)
ax.set_xlim(0, 215)
ax.set_xlabel('$T(K)$')
Loading