Finite Quantum Well Width issue
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a code to solve Schrödinger equation for finite square well. However, when i change width of the well between 100-200 or anything like 150,250,350 etc. the solution for equation is not symetric. However, schrödinger equation should have been symetrical sinus function. How can i fix this? Here is my code:
clc
close all
clear all
dx=0.01;
n=1:1:1;
for l=1:1
E=n(l)*n(l)*pi*pi/2;
%Potential Energy Function for a Square well
Width=100;
U=zeros(1,Width);
U(1)=10;
U(Width)=10;
K(1:Width)=(2).*(E-U(1:Width));
% initial condition
W(1)=1;
W(2)=0;
% updating the wave function
for i=2:Width-1
W(i+1)=W(i)*(2-K(i)*dx*dx)-W(i-1);
end
% Normalizing probability density funtion of the particle
Ws=W.*W./trapz(W.*W);
V=ones(1,Width+100).*100;
Wtemp=zeros(1,Width+100);
V(51:Width+50)=U;
V=(V./100).*max(Ws);
Wtemp(51:Width+50)=Ws;
Wa(l,:)=Wtemp;
L=length(Wtemp);
X=linspace(0,2,L)-1;
figure(1)
plot(X,Wa(l,:),'linewidth',2)
hold on
plot(X,V,'r','linewidth',2)
h=gca;
xlabel('X','fontSize', 15);
ylabel('psi','fontSize', 15);
end
댓글 수: 1
Jaime Varela
2021년 2월 5일
This is a likely incorrect way of getting bound states for the finite square well. It doesn't look like you took the boundary conditions at infinity into account. Could you describe your strategy? The infinite square well function has an analytic solution but the energy levels require some numerics.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Quantum Mechanics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!