Finite difference and Runge-Kutta for PDEs

Click For Summary

Discussion Overview

The discussion revolves around the numerical simulation of a 1D wavepacket governed by the Schrödinger equation using finite difference and Runge-Kutta methods. Participants explore issues related to stability, accuracy, and the behavior of the wavepacket during propagation.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant describes using a three-point finite-difference discretization for the Laplacian and a 4th order Runge-Kutta method, noting that the wavepacket develops oscillations and eventually blows up.
  • Another participant suggests reducing the time step as a potential solution, indicating that the current time step may be close to the stability limit.
  • A participant mentions that using a higher order accuracy method than the differential equation can lead to conditional stability, questioning the effectiveness of the 4th order Runge-Kutta method compared to lower order methods like Crank-Nicholson.
  • A later reply reveals that the initial participant had not debugged their program properly, leading to the instability issues, but concludes that FD+RK4 works fine with the Schrödinger equation.
  • Another participant inquires about the specific problem in the code, expressing their own challenges with maintaining the norm of the wave function while propagating a free Gaussian wave packet.

Areas of Agreement / Disagreement

The discussion reflects a mix of agreement and disagreement. While one participant resolves their initial concerns about the FD+RK4 method, others raise questions about stability and accuracy, indicating that multiple views on the effectiveness of different methods remain unresolved.

Contextual Notes

Participants express uncertainty regarding the stability of their numerical methods and the impact of time step size on the simulation results. There are also unresolved issues related to the accuracy of the wave function norm in the context of the second participant's approach.

Who May Find This Useful

Readers interested in numerical methods for solving partial differential equations, particularly in the context of quantum mechanics and wave propagation, may find this discussion relevant.

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   Reactions: 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).
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 65 ·
3
Replies
65
Views
9K
  • · 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
19K
  • · Replies 12 ·
Replies
12
Views
7K