I am trying to solve a system of differential equations using finite difference method.

There are few terms of the form $\frac{A(r)}{r}$, both $A(r)$ and r go to zero at the boundary. Analytically this term is well defined but numerically these terms are leading to error which very quickly break the simulation.

I am using leapfrog method if that matters. I read somewhere that leapfrog method has dissipation inbuilt so it should be stable, but it's clearly not the case.

Any advice on how to proceed? Should I change my algorithm? Or use higher order schemes?

Thanks in advance

| cite | improve this question | | | | |
  • 1
    $\begingroup$ sciencedirect.com/science/article/pii/S0021999199963829 $\endgroup$ – Spencer Bryngelson Feb 25 at 6:51
  • $\begingroup$ The basic advice is to consider the new variable $v(r) = A(r)/r$. One does that in the solution of the Schrödinger equation for atomic systems, for example. $\endgroup$ – davidhigh Feb 29 at 21:16
  • 1
    $\begingroup$ Do you know the limit $$\lim_{r \to 0} \frac{A(r)} {r}$$, it's pretty important in this case. If the limit is a finite constant, then there is a lot of methods like in the paper linked by Spencer. If the limit is infinity, then there's a problem $\endgroup$ – Yuriy S Mar 3 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.