Calculating Bound States of a Particle in a Triangular Well Using MatLab"

  • Context: MATLAB 
  • Thread starter Thread starter ShayanJ
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

This discussion focuses on calculating the bound states of a particle in a symmetric triangular well using GNU Octave, specifically employing Numerov's method. The user has encountered an issue where the calculated end points yield NaN values. The Schrödinger equation is non-dimensionalized, and classical turning points are calculated to determine the energy levels. The code provided demonstrates the implementation of the numerical method, but errors in the calculation lead to undefined results.

PREREQUISITES
  • Understanding of quantum mechanics, specifically the Schrödinger equation.
  • Familiarity with numerical methods, particularly Numerov's method.
  • Proficiency in GNU Octave or MATLAB for numerical simulations.
  • Knowledge of potential wells and bound state calculations in quantum physics.
NEXT STEPS
  • Debug the provided GNU Octave code to resolve the NaN issue in the end points calculation.
  • Explore advanced numerical methods for solving differential equations in quantum mechanics.
  • Research the implications of classical turning points in quantum systems.
  • Learn about the stability and convergence of numerical methods like Numerov's method.
USEFUL FOR

Quantum physicists, computational physicists, and students engaged in numerical simulations of quantum systems will benefit from this discussion.

ShayanJ
Science Advisor
Insights Author
Messages
2,802
Reaction score
605
Hi
I'm trying to figure out in what energies the bound states of a particle in a symmetric triangular well happen to be, using MatLab(Actually GNU Octave!)
At first I non-dimensionalized the associated Schrödinger equation and got:
<br /> \frac{d^2 \varphi}{dy^2}+[ \varepsilon-v(\pm 2y-1) ]\varphi=0<br />
Where the plus and minus signs refer to two sides of the well.
Then I calculated the classical turning points (where the total energy equals the potential energy) and considered a multiple of it as a measure of the distance that the wave function should go to zero:
<br /> y=\frac 1 2 (\frac \varepsilon v +1)<br />

In this program, I calculate thes stationary states from zero to a multiple of the mentioned point and store its value at that point. Then plot the end points vs the energy to see in what energies the end point is zero.
The problem is, I'm getting NaN as end points! What is wrong?
Thanks

Ohhh...this is the code and I'm using Numerov's method.

PHP:
clear
clc

v=3;
P=-1;

de=.01;
e=[-18:de:-17];
m=length(e);

if(P==1)
	
	phi(1)=1;
	dphi=0;
	
else
	
	phi=0;
	dphi=1;
	
end
	
for j=1:m

	CTP=.5*((abs(e(j))/v)+1);

	dy=.001;
	y=[0:dy:CTP];
	n=length(y);
	y(1)=0;
	
	phi(2)=phi(1)+dphi*dy+(1/2)*(-v-e(j))*phi(1)*dy^2+(1/6)*(2*v*phi(1)+(-v-e(j))*dphi)*dy^3+(1/24)*(4*v*dphi+((-v-e(j))^2)*phi(1))*dy+(1/120)*(4*v*(-v-e(j))*phi(1)+((-v-e(j))^2)*dphi)*dy^5;
	
	for i=2:n-1
	
		phi(i+1)=(2*phi(i)-phi(i-1)+(dy^2)*phi(i)*(v*(2*y(i)-1)-e)+(1/12)*(dy^2)*(phi(i-1)*(v*(2*y(i-1)-1)-e))-2*phi(i)*(v*(2*y(i)-1)-e))/(1-(1/12)*(dy^2)*(v*(2*y(i+1)-1)-e));
	
	end
	
	ephi(j)=phi(n)
	
end
	
plot(e,ephi)
 
  • Like
Likes   Reactions: Milan Bok
Physics news on Phys.org
I'm sorry you are not generating any responses at the moment. Is there any additional information you can share with us? Any new findings?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 41 ·
2
Replies
41
Views
10K
  • · Replies 2 ·
Replies
2
Views
3K