gregmoille / pyLLE

Lugiato Lefever Equation Solver in Python/Julia
Other
65 stars 39 forks source link

Question about update equation #22

Closed lucasgrjn closed 2 years ago

lucasgrjn commented 3 years ago

Hi !

I already have implemented a split-step algorithm to solve non-linear equation (RK4IP). But I was curious about yours. I took a look to the ComputeLLE.jl file. Unfortunately, I don't understand your split-step update. Especially :

  1. Why in your convergency part do you use the original update coefficient (half1 depending on u0) ? Why not simply propagate linear then non-linear etc… until convergency ?
  2. Why you divide your linear update part (half1 and half2) by the field itself ?

Have you a reference on this implementation ? (Article(s) ? Book(s) ?)

Thanks for your answer, Lucas.

gregmoille commented 3 years ago

Hi Lucas,

this is actually what is a called a “symmetric half split step” Fourier method. It is exactly the same implementation as in Prof Agrawal book that I invite you to have a look at (I don’t remember the exact chapter).

lucasgrjn commented 3 years ago

I think, you make reference to "Agrawal GP (2007) Nonlinear Fiber Optics (Academic Press)". I already use it.

After having again examine the code, I think I understand what you mean. But in this case, I have two improvement propositions :

What are your thoughts about that ?

gregmoille commented 3 years ago

Exactly, that’s the book I had in mind.

Good point for the FFT and iFFT. The idea of γ being a scalar is actually non trivial especially for ultra broadband comb spanning over an octave, as the confinement can vary quite a lot. I had in mind to, one day, implement this but never did it. I agree that if one assume γ as a constant, then these operations are useless, yet don’t cost as much as expected thanks to the pre-allocation of the FFT and iFFT operator (just the cost of a matrices multiplication)

For your second point, I would need to go back to the code a bit deeper which I don’t completely recall how I code that. I’ll come back to you later when I have a clearer idea of what I code :)

This version is starting to be quite old and in the mean time (and because COVID gave me more time to code), I made an “improved” version which should be more general. I hope to be able to update the code to this new version after the two papers that I am currently working on are on arXiv or published. By “improved”, I mostly mean that some changes have been made in the LLE equation, but most of the improvement relies on how more clean the SSF is implemented. Other improvements are in the pipeline though that will probably be in a even further version.

As I have zero timeline on when to upload it and this current version is basically the one that is available to the public, I’m down for improving this one. If you feel you’d like to modify the code, please be my guest and feel free to do it, as long as you share to the community the improvement through a pull request (and I’ll add you as contributor in the acknowledgment of the project). For me this is really the philosophy of this pyLLE thingy, anyone who want to play with it or modify it are welcome to do it as it can only bring improvement to the code.