Finite difference and Runge-Kutta for PDEs

AI Thread Summary
A program simulating the time development of a 1D wavepacket under the Schrödinger equation using a three-point finite-difference method and a fourth-order Runge-Kutta method exhibits instability, leading to oscillations and blowup. This instability occurs when the wavepacket encounters a step potential or scatters against itself at periodic boundaries. Switching to a five-point stencil exacerbates the issue, indicating that the chosen numerical methods may not be suitable for this problem. Suggestions include reducing the time step to improve stability, as larger time steps may approach the stability limit. The discussion highlights the challenges of using higher-order methods like Runge-Kutta for problems typically better suited to lower-order methods like Crank-Nicholson.
EmpaDoc
Messages
28
Reaction score
1
I made a small program to simulate the time development of a 1D wavepacket obeying the Schrodinger 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 Schrodinger 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).
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...

Similar threads

Back
Top