Skip to content
Snippets Groups Projects
Commit 9bdc0a16 authored by Joana Fraxanet Morales's avatar Joana Fraxanet Morales
Browse files

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

parent 8bdc6408
No related branches found
No related tags found
No related merge requests found
......@@ -101,33 +101,37 @@ $$
where $x=\frac{\hbar\omega}{k_{\rm B}T}$ and $\Theta_{\rm D}\equiv\frac{\hbar\omega_{\rm D}}{k_{\rm B}}$, the _Debye temperature_.
```python
def integrand(y):
return y**4 * np.exp(y) / (np.exp(y) - 1)**2
def c_einstein(T, T_E=1):
T = [1.35,2.,3.,4.,5.,6.,7.,8.,10.,12.,14.,16.,20.,28.56,36.16,47.09,55.88,65.19,74.56,83.91,103.14,124.2,144.38,166.78,190.17,205.3]
c = [0.,0.,0.,0.,0.,0.,0.0719648,0.1075288,0.2100368,0.364008,0.573208,0.866088,1.648496,4.242576,7.07096,10.8784,13.47248,15.60632,17.27992,18.6188,20.33424,21.63128,22.46808,23.05384,23.47224,23.68144]
def c_einstein(T, T_E):
x = T_E / T
return 3 * x**2 * np.exp(x) / (np.exp(x) - 1)**2
return 24.945 * x**2 * np.exp(x) / (np.exp(x) - 1)**2
def integrand(y):
return y**4 * np.exp(y) / (np.exp(y) - 1)**2
@np.vectorize
def c_debye(T, T_D=1):
def c_debye(T, T_D):
x = T / T_D
return 9 * x**3 * quad(integrand, 0, 1/x)[0]
return 24.945 * 3 * x**3 * quad(integrand, 0, 1/x)[0]
T = np.linspace(0.01, 1.5, 500)
fig, ax = pyplot.subplots()
ax.plot(T, c_einstein(T), label="Einstein model")
ax.plot(T, c_debye(T), label="Debye model")
ax.set_ylim(bottom=0, top=3.4)
ax.set_xlabel('$T$')
ax.set_ylabel(r'$\omega$')
ax.set_xticks([1])
ax.set_xticklabels([r'$\Theta_D$'])
ax.set_yticks([3])
ax.set_yticklabels(['$3Nk_B$'])
ax.scatter(T, c)
ax.title('Heat capacity of silver compared to the Debye and Einstein models')
ax.plot(T, c_einstein(T, 151), label='Einstein model')
ax.plot(T, c_debye(T, 215), label='Debye model')
ax.set_ylim(bottom=0, top=26)
ax.set_xlim(0, 215)
ax.set_xlabel('T(K)')
ax.set_ylabel(r'C(J/mol-K)')
ax.set_xticks([0, 100, 200])
ax.set_yticks([24.945])
ax.set_yticklabels(['$3R$'])
ax.legend(loc='lower right')
pyplot.hlines([3], 0, 1.5, linestyles='dashed')
pyplot.hlines([24.945], 0, T[-1], linestyles='dashed')
draw_classic_axes(ax, xlabeloffset=0.3)
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment