pyNLO / PyNLO

Python package for nonlinear optics
https://pynlo.readthedocs.io/en/latest/
GNU General Public License v3.0
101 stars 55 forks source link

Is it possible to do dual pump calculation in PyNLO? #51

Closed WeiWenKevinChen closed 5 years ago

WeiWenKevinChen commented 5 years ago

Hi,

The PyNLO is amazing and has helped me a lot. It works well for calculating supercontinuum generated in a piece of PCF using single pulse as the pumping source. However, I am wondering how to create two pulses (e.g. 50fs 1064nm + 100fs 532nm) as a dual pump source for the SC calculation. I appreciate it if you can show how to do it or implement this dual pump as a new function in PyNLO.

Thanks!

DanHickstein commented 5 years ago

Hi @WeiWenKevinChen,

I've done some dual-pumped (and triple-pumped!) simulations at 1-micron wavelengths. You can certainly do this with PyNLO. An issue that you may run into is that the NLSE (or at least this approach to the NLSE) performs the calculations in a reference frame that is co-propagating with the central frequency of the pump. When you have two pumps, there is no single central frequency. So, one (or both) of your pumps are going to experience group-velocity walk-off with respect to whatever central frequency you pick for your calculation. You'll need to make your temporal window wider, and this will slow down your calculations.

Anyway, you can use the pulse.set_AW function to arbitrarily set the electric field as a function of frequency to generate whatever kind of crazy pump field that you want.

Here is a full example of how you can use the set_AW function to perform a calculation on three fields: https://gist.github.com/DanHickstein/896213d8521e950b0fd4be5d77c735b0

The key is line 103:

pulse1.set_AW(pulse1.AW + pulse2.interpolate_to_new_center_wl(pulseWL1).AW + pulse3.interpolate_to_new_center_wl(pulseWL1).AW)
WeiWenKevinChen commented 5 years ago

It's amazing! Thank you so much! I appreciate it.

DanHickstein commented 5 years ago

No problem. I hope that it works for you. If you have more questions, feel free to re-open this or open a new issue.