I'm trying to simulate self focusing in the case of anomalous dispersion and positive Kerr nonlinearity in the nonlinear Schrödinger equation $$\frac{\partial a}{\partial t} - i\frac{\partial^2 a}{\partial z^2} + i\epsilon|a|^2a = 0$$

Here $t$ is time and $z$ is a spatial coordinate (Though I guess it doesn't really matter). I set $\epsilon$ to be 50 just to make sure that I am above the critical power. In order to simulate the wave propagation, I use the split step method applied on initial Gaussian pulse.

No matter how I change the values of the code, the initial pulse starts to focus and then it get dispersed after a while. I tried to change the resolution in both spatial and frequency domain, it didn't help. Is there some conditions under which the split step method breaks down?

  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it is about debugging code and not about physics. $\endgroup$ Jan 2, 2017 at 17:00
  • $\begingroup$ Only physicists can answer this question. Beside, every physicist who practice theory has skills in MATLAB. $\endgroup$
    – jack
    Jan 2, 2017 at 17:21
  • 2
    $\begingroup$ no, not at all, neither of your two statements is correct. $\endgroup$ Jan 2, 2017 at 17:22
  • 1
    $\begingroup$ This question is probably more appropriate for Computational Science than here. $\endgroup$
    – Kyle Kanos
    Jan 2, 2017 at 18:13
  • 1
    $\begingroup$ What step size did you use? The splitting requires a small step size for stability, but it may need an even smaller one for accuracy. Also, I agree with what @KyleKanos has said -- this is probably better on Computational Science, although it is on topic here. And as another computational scientist, I haven't used Matlab since my freshman intro course because it is not suitable for serious computational work. And analysis/processing work is better done in Python or R than Matlab. $\endgroup$
    – tpg2114
    Jan 4, 2017 at 20:03

1 Answer 1


Have you tried plotting the wavenumbers of the solution? Since you are trying to focus your initial condition you should expect more energy at larger and larger wavenumbers. At some point your lattice will not be able describe the smallest length scales and all sorts of trouble will happen. The dispersion you are seeing might be due to aliasing which is an effect of a to coarse lattice. If you want to know more and since you like MATLAB a place to start could be Spectral Methods in Matlab by Trefethen. As far as I remember he has a few examples in an early chapter.

I tried(very quickly) implementing the equation using the wiki article and it was quite obvious that problems started when the fourier transform of the solution did not decay towards zero.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.