Skip to content
Snippets Groups Projects
Commit 1e3a3f5e authored by Lars kleyn Winkel's avatar Lars kleyn Winkel
Browse files

Update src/8_many_atoms_sol.md

parent 0364c245
No related branches found
No related tags found
1 merge request!58Solutions lecture 7
Pipeline #28288 passed
......@@ -57,14 +57,16 @@ The dispersion is given by: $$ E = \epsilon \pm \sqrt{t_1^2 + t_2^2 + 2t_1t_2\co
```python
pyplot.figure()
k = np.linspace(-2*pi, 2*pi, 400)
pyplot.plot(k, np.sqrt(5+2*2*np.cos(k)),'b',label='2 atom dispersion')
pyplot.plot(k, -np.sqrt(5+2*2*np.cos(k)),'b')
pyplot.plot(k, -3*np.cos(k/2),'r',label='1 atom dispersion')
pyplot.plot(k[199:100:-1],-3*np.cos(k[0:99]/2),'r--')
t1 = 1;
t2 = 1.1;
pyplot.plot(k, np.sqrt(t1**2 + t2**2+2*t1*t2*np.cos(k)),'b',label='2 atom dispersion')
pyplot.plot(k, -np.sqrt(t1**2 + t2**2+2*t1*t2*np.cos(k)),'b')
pyplot.plot(k, -(t1+t2)*np.cos(k/2),'r',label='1 atom dispersion')
pyplot.plot(k[199:100:-1],-(t1+t2)*np.cos(k[0:99]/2),'r--')
pyplot.xlabel('$ka$'); pyplot.ylabel(r'$E-\epsilon$')
pyplot.xticks([-2*pi, -pi, 0, pi,2*pi], [r'$-2ka$',r'$-ka$', 0, r'$ka$',r'$2ka$'])
pyplot.yticks([-3, 0, 3], [r'$-t_1-t_2$', '$E_0$', r'$t_1+t_2$']);
pyplot.yticks([-t1-t2, 0, t1+t2], [r'$-t_1-t_2$', '$E_0$', r'$t_1+t_2$']);
pyplot.vlines([-pi, pi], -3, 3, linestyles='dashed');
pyplot.legend();
......
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