Finite Quantum Well Width issue

5 次查看(过去 30 天)
Ege Tunç
Ege Tunç 2019-3-13
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
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 CenterFile Exchange 中查找有关 Quantum Mechanics 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by