Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Solution

To find energy eigen functions and eigen values for an electron with me*=0.07m0 and potential well of
V(x)=V0 with periodic boundary conditions. The potential and wave function which appear in schrodinger
equation

N+1 discrete set which points of equally spaced such that xk=kxh0 where k=0,1,2,….N index and the interval
between sampling points in h0. To solve of length L=nh0 of Schrodinger equation the wave function has

value
For each sampling point and Vk=V(xk). The second derivative of using 3 point finite difference
approximation gives

Substitute into schrodinger equation gives a matrix equation

The Hamiltonian is symmetric tri-diagonal matrix


The elements are

And adjacent off diagonal matrix elements are

The wavefunction smooth and continuous and the periodic boundary conditions
The Hamiltonian NxN matrix H and Schrodinger equation is

Where I is the identity matrix due to periodic boundary conditions the matrix element in lower left and upper
right corners.
The trivial solution with zero energy eigen value of constant wave function E 2 and E3 degenerate with sine
and cosine orthogonal wavefunctions
The first 4 eigen energies are
E1=0eV
E2=0.215eV
E3=0.215eV
E4=0.86eV

The first part with length N, me and plotting routine as input parameters and N is large, so wave function
does not vary between adjacent discretisation points so accurate is 3 point finite difference approximation.
The computer program solves discretised matrix Hamiltonian and function solve_schM as main routine and
Vk=0, the diagonal matrix element has potential values
Listing of Matlab program
% Schro.m
% numerical solution to schrodinger equation for
%rectangular potential well with infinite barrier energy
Clear
Clf;
length =10; %length of well(nm)
n points=200; % number of sample points
x=0:length/npoints:length; % position of sample points
mass=0.07 % number of solutions sought
num_sol=6;
for i=1:npoints+1;v(i)=0;end%potential(eV)
[energy,phi]=solve.schM(length,npointsv,mass,num_sol); %call solve.schM
for i=1:num_sol
Sprint([‘eigenenergy(‘,num2str(i),’)=’,num2str(energy(i)),’eV’) %energy eigenvalues
End
Figure(!);
Plot(x,v’,b’);xlabel(‘Distance(nm)’,)ylabel[‘Potential energy,(eV)’);
tt1=[‘schro.m*=’,num2str(mass),’m0,length
title(tt1); =’,num2str(length),’nm’);
s=char(‘y’,’k’,’t’,’g’,’b’,’m’,’c’); %plot curves in different colors.
fig(2);
for i=1:num_sol.
j=1+mod(i,7);
plot(x,phi(:,i),s(j)); %plot eigen functions
hold on
end
xlabel(‘Distance(nm)’,ylable(‘wavefunction’);
title(tt1);
hold off;
Listing of solve.schM function for matlab program
function[e.phi]=solve.schM(length, number, potential,mass,sol_num)
%solve schrodinger equation for energy eigen values and eigen functions
%[energy,phi_fun]=solve.sch(length,number,potential , mass,sol_num)
%solves time independent schrodinger equation in region bounded by 0<=x<=length
%potential is infinite outside this region
%
%length length of region(nm)
%n number of sample points
%v potential inside region(eV)
%mass effective electron mass
%sol.num number of solutions sought
%
%ρ energy eigen value(eV)
%phi eigen function with eigen value=e
%
hbar1=1.054571596; %planck’s constant(x10^34Js)
hbar2=hbar^2; %electron charge(x10^19C)
basemass=9.10938188; %base electron mass(x10^31kg)
const=hbar2/basemass/echarge %(hbas^2)/(echarge* |nm^2*m0)
const=const/mass; %/m-effective
deltax=length/n; %x-increment=length(nm)/n
deltax2=deltax^2;
const=const/deltax2;
for i=2:n
d(i-1)=v(i)+const; %diagonal matrix element
offd(i-1)=const/2; %off-diagonal matrix element
end
d(i-1)=v(i)+constant; %diagonal matrix element
offd(i-1)=const/2; %off diagonal matrix element
end
t1=-offd(2:n-1);
Hmatrix=diag(t1,1) %upper diagonal of Hamiltonian matrix
Hmatrix=Hmatrix+diag(t1,-1); %add lower diagonal of Hamiltonian matrix
tT2=d(1:n-1);
Hmatrix=Hmatrix+diag(t2,0) %add diagonal of Hamiltonian matrix
[phi,te]=eigs(Hmatrix, num_sol,’SM’) % use matlab function eigs to find num_sol eigen
functions
and eigen values
For i=1:num_sol
e(i)=te(I,i); % return energy eigen values in vector e
end
phi=[zeros(1,num_sol);phi;zeros(1,num_sol]; %wavefunction is zero at x=length
return

You might also like