Finite difference and Runge-Kutta for PDEs

Click For Summary
SUMMARY

This discussion focuses on simulating the time development of a 1D wavepacket governed by the Schrödinger equation using a three-point finite-difference discretization for the Laplacian and a fourth-order Runge-Kutta (RK4) method. The user experiences instability in the simulation, leading to oscillations and blowup of the wavepacket, particularly when encountering a step potential or scattering against itself. The conversation highlights the importance of stability in numerical methods, suggesting that reducing the time step may alleviate the issue. It concludes that while higher-order methods like RK4 can be effective, they may not always be superior to lower-order methods such as Crank-Nicolson due to conditional stability.

PREREQUISITES
  • Understanding of the Schrödinger equation and wavepacket dynamics
  • Familiarity with finite-difference methods for numerical PDEs
  • Knowledge of the Runge-Kutta method, specifically RK4
  • Concept of numerical stability and time step selection in simulations
NEXT STEPS
  • Research the Crank-Nicolson method for solving PDEs
  • Learn about numerical stability criteria for finite-difference methods
  • Explore techniques for debugging numerical simulations in programming
  • Investigate the implications of higher-order accuracy in numerical methods
USEFUL FOR

Researchers and developers working on numerical simulations of quantum mechanics, particularly those interested in wavepacket dynamics and stability in finite-difference methods.

EmpaDoc
Messages
28
Reaction score
1
I made a small program to simulate the time development of a 1D wavepacket obeying the Schrödinger equation, mostly in order to learn a new programming language - so in order to not have to invoke big numerical methods packages, I opted for the simplest solution: The standard three-point finite-difference discretization for the Laplacian (kinetic term), and the 4-order Runge-Kutta method to propagate the wavepacket forward.

I notice that sooner or later, my wavepacket will start to develop oscillations on the smallest wavelengths, followed by a blowup. If I include a step potential to reflect against, this happens once the wavepacket encounters the potential. Otherwise it seems to happen when the wavepacket scatters against itself across the periodic boundary (as it expands).

Changing my three-point finite-difference to a five-point stencil only makes the problem worse.

I know that there are much better methods for PDE solving (e.g. Crank-Nicolson). But that's not really the point here. Now I am curious: What is the cause of this behavior? And-can I tweak the FD+RK so I can get it to work?
 
  • Like
Likes Milan Bok
Technology news on Phys.org
The first thing I would try is reducing your time step (e.g. halve it). Possibly (by happenstance) your time step is close to the limit for stability, so it appears to be working OK until the instability has grown from 10^-6 or (10^-16) to be bigger than the true solution.

Using a solution scheme that has a higher order of accuracy than the order of the differential equation almost always results in conditional stability. That's why a 4th order method like RK is rarely "better" than a well-chosen lower order method like Crank Nicholson - there are very few 4th order differential equations in physics!
 
Forget it! I just hadn't debugged the program properly...
Sorry. :(
At least I know now that FD+RK4 works fine with the Schrödinger equation.
 
Can you explain what was the problem in your code ? I am also trying such a way but norm of wave function isn't constant and differs from analytical solution (Im trying to propagate free gaussian wave packet).
 
We have many threads on AI, which are mostly AI/LLM, e.g,. ChatGPT, Claude, etc. It is important to draw a distinction between AI/LLM and AI/ML/DL, where ML - Machine Learning and DL = Deep Learning. AI is a broad technology; the AI/ML/DL is being developed to handle large data sets, and even seemingly disparate datasets to rapidly evaluated the data and determine the quantitative relationships in order to understand what those relationships (about the variaboles) mean. At the Harvard &...

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 65 ·
3
Replies
65
Views
8K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
8
Views
15K
  • · Replies 10 ·
Replies
10
Views
13K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 10 ·
Replies
10
Views
18K
  • · Replies 12 ·
Replies
12
Views
7K