ochubar / SRW

Synchrotron Radiation Workshop
Other
86 stars 70 forks source link

Adding Gouy phase to simulation of an optical resonance cavity #20

Open phoenix5485 opened 5 years ago

phoenix5485 commented 5 years ago

Hello, I am trying to simulate an optical resonance cavity composed of two spherical mirrors, using a representative thin lens system. I have implemented SRW code to do this, but I am not seeing the correct modal structure when I try to run simulations of misalignment in the cavity. I believe the reason for this is the Gouy phase is not being taken into account. Is it possible to add this phase, so it is accounted for as the transverse electric field is propagated?

ochubar commented 5 years ago

Hi! We seem to have the Gouy phase shift implemented at computation of the initial Gaussian beam wavefront in the frequency domain (before propagation simulations); see e.g. lines #285-290 in https://github.com/ochubar/SRW/blob/master/cpp/src/core/srgsnbm.cpp However, I don't think we ever tested this thoroughly, e.g. vs. the analytical approximation. If you can help to do this, e.g. by providing a simple example involving the Gouy phase shift that can be calculated both with SRW and analytically, we would appreciate this.

phoenix5485 commented 4 years ago

Please forgive the delay on getting back you. I am working on an analytical model as you requested. How is the Gouy phase handled by the PropagElecField function? I need to be able to graph the changes in the Gouy phase as the transverse field propagates. Also, is PropRatz (line 272 of srgsnbm.cpp) supposed to be unit less as it will be placed inside the arctan function. I checked the analysis of units with Buf (line 168 of srgsnbm.cpp) eV/m^2, InvTwoSigZe2 (line 165 of srgsnbm.cpp) 1/m^2. These units lead PropagMultz (line 170 srgsnbm.cpp) which is Buf/InvTwoSigZe2 (eV/m^2 / 1/m^2) = eV. Thus PropRatz, with en (line 269) representing the starting energy eStart with units eV, would have units of eV^2 as PropRatz = en*PropagMultz. Should this instead be defined as PropRatz = en/PropagMultz to ensure the a unit less quantity is input into the arctan function for the Gouy phase as InvPropRatz (line 274) is equal to 1/PropRatz?