Finite difference problem

In summary, the conversation discusses a high school summer project related to quantum mechanics and using the finite difference method to solve the Schrodinger equation. The procedure involves dividing space into points and using a correction for boundary conditions. The results show some incorrect energies and complex wave functions, and the speaker seeks help in identifying mistakes in theory or code. The expert suggests doubling the number of sample points to check the accuracy of the results and recommends referring to Boyd's book for criteria on rejecting unphysical eigenvalues. Additionally, utilizing the symmetry of the equation can help minimize numerical errors.
  • #1
Anonymous119
9
0
I found this part of forum the most relevant to this theme so excuse me if I missed.

This year I'm doing a high school summer project related to quantum mechanics. Anyway I'm using finite difference method to solve Schrodinger equation. Before starting to work on a project I decided to get some practice so here is the problem that I am trying to do.

I'm trying to find energies and wave function for electron in 2D circle potential well.
Wave function outside is zero and inside It is determined by Schrodinger equation.
And here is my procedure:

1. Divide space into point separated by distance h (see the picture)
2. Write Laplacian in point ψ(x,y) by It's neighbors and It looks like for example

d^2ψ(x,y)/dx^2 = [ψ(x-h,y)-2*ψ(x,y)+ψ(x+h,y)]/h^2

Also here is the correction for boundary conditions for example if I am looking at the point (x,y) where (x+h,y) is out of the well: i find distance ε so that the point (x+ε,y) is exactly on the boundary and i write d^2ψ(x,y)/dx^2 in terms of ψ(x-h,y), ψ(x,y), ψ(x+ε,y), h and ε. I derive the formula using Taylor series around (x,y) and taking terms up to h^2 or ε^2. Now i have ψ(x+ε,y)=0 and formula is:

d^2ψ(x,y)/dx^2=-2*ψ(x,y)/ε/h+2*ψ(x-h,y)/h/(h+ε)

3. Putting all coefficients in the Hamiltonian using MATLAB i calculate eigenvalues and eigenvectors.

And finally here is the problem i found on the internet that energy should be going like this E1=5.8*E0, E2=14.7*E0, E3=26,4*E0, E4=30,5*E0 and so on...(http://www.st-andrews.ac.uk/physics...s/2DCircularWell/infinite circular well5.html CHECK CONTROLS AND SHOW ENERGY TO SEE)

And here are my results

As you can see i got this values for energy but there are many others wrong energies also i got some complex energy :(. The wave function has some points where the value is 10^10 times bigger than normally.

I don't have much experience so I ask if anyone can help me to see what is wrong here. It will be significantly if anyone can see is mistake in a theory or it could be in a code.

Thanks!
 

Attachments

  • e.jpg
    e.jpg
    15.4 KB · Views: 480
  • f.png
    f.png
    11.6 KB · Views: 498
Physics news on Phys.org
  • #2
Assuming that there is no error in your implementation you can perform a quick check: double the number of sample points simultaneously in x and y and see how the eigenvalues are shifting. As the energy is increasing the values should display a larger shift, in this way you can determine which values you should trust and which don't. For large energy values and wavefunctions of complex structure (nodes, angular momentum etc) one should increase the number of sample points (or decrease the spatial step h).
This fact is due to the discretization of a continuous system, the eigenvalues you get are only approximate values or even spurious values (i.e. values which don't correspond to any eigenvalues of the continuous equation). In your case, for instance, the complex eigenvalues. The task of discriminating the spurious eigenvalues from physical ones is not trivial and requires some practice. I didn't work with finite diferences, but I came across this problem using spectral methods. I can recommend you the sections 7.5 and 7.6 from Boyd's book Spectral metods where he discuss some criteria for rejecting spurious and unphysical eigenvalues. Maybe they can help you.

PS: other thing that you can do to minime the numerical errors is to take advantage of the symmetry of the equation, e.g. if you look for radial symmetric solutions then use polar coordinates instead of cartesian ones.
 

1. What is a finite difference problem?

A finite difference problem is a mathematical problem that involves solving a differential equation by approximating it with finite differences. This is typically done by dividing the domain into discrete points and using the values at these points to approximate the derivatives in the differential equation.

2. What are the applications of finite difference problems?

Finite difference problems have many applications in various fields such as physics, engineering, and finance. They are used to model and solve problems involving heat transfer, fluid mechanics, and option pricing, among others.

3. How is a finite difference problem solved?

A finite difference problem is typically solved by using numerical methods such as the Euler method, the Runge-Kutta method, or the finite difference method. These methods involve approximating the derivatives in the differential equation with finite differences and using iterative techniques to find the solution.

4. What are the advantages of using finite difference methods?

Finite difference methods are relatively easy to implement and can provide accurate solutions for a wide range of problems. They also allow for the use of computers to solve complex problems that may not have analytical solutions.

5. What are the limitations of finite difference problems?

One limitation of finite difference problems is that the approximation of derivatives can introduce errors, especially for highly nonlinear equations. They also require a large number of discretization points to achieve accurate solutions, which can be computationally expensive.

Similar threads

  • Atomic and Condensed Matter
Replies
4
Views
1K
  • Atomic and Condensed Matter
Replies
1
Views
2K
  • Atomic and Condensed Matter
Replies
4
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
293
  • Classical Physics
Replies
3
Views
762
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
452
  • Advanced Physics Homework Help
Replies
5
Views
755
  • Topology and Analysis
Replies
1
Views
387
Back
Top