HW4soln - %CONSTANTS c=2.998e10;%cm/s hbar=6.582e-16; %in...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
%CONSTANTS c=2.998e10;%cm/s hbar=6.582e-16; %in eV*sec m=5.11e5/c^2; %in eV/c^2 hbar2o2m=hbar^2/(2*m); %UNIT CELL AND LATTICE SPACING a=15e-8; dx=0.3e-8; x=0:dx:(a-dx); N=round(a/dx); %POTENTIAL Vx=0.5*cos(2*pi*x/a); %POTENTIAL PART OF HAMILTONIAN R=fft(eye(N)); Hpot=R'*diag(Vx)*R/N; %%OR %VG=fft(Vx)/N; %for ii=1:NXPTS % Hpot(ii,:)=shift(VG,ii-1); %end %OR %Hpot=zeros(NXPTS); %for ii=1:(NXPTS-1) % Hpot=Hpot+diag(VG(NXPTS+1-ii)*ones(NXPTS- ii,1),ii); %end %for ii=-(NXPTS-1):0 %LABEL THE RECIPROCAL LATTICE VECTORS G=pi/a*[-fliplr(2:2:(N-1)) 0:2:N]; %PICK SOME POINTS IN THE FIRST B-ZONE NKPTS=51; ZONES=1; ks=ZONES*linspace(-pi/a,pi/a ,NKPTS*ZONES); jj=1; for k = ks %ADD KINETIC ENERGY TO HAMILTONIAN H=diag(hbar2o2m*(k+G).^2)+Hpot; %FIND ENERGY EIGENVALUES [v,d]=eig(H); eig1=diag(d); evals(:,jj)=sort(real(eig1)); jj=jj+1; end figure(1) NUMBANDS=5; plot(ks*a/pi, evals(1:NUMBANDS,:)); xlabel('k [\pi/a]'); ylabel('Energy [eV]'); axis([-ZONES ZONES -.5 4]) figure(2) [e1,ei1]=min(real(eig1)); Psi1=conj(ifft(v(:,ei1))).*ifft(v(:,ei1))*N;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/29/2011 for the course PHYSICS 731 taught by Professor Appelbaum during the Fall '11 term at Maryland.

Page1 / 4

HW4soln - %CONSTANTS c=2.998e10;%cm/s hbar=6.582e-16; %in...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online