Photonics

Photonics

Topics related to Lumerical and more.

Ansys Insight: Custom TFSF source

    • Guilin Sun
      Ansys Employee

      This example shows how to create a customized TFSF source with focused beam for analysis of nano particle scattering and compare the result with regular TFSF source. The TFSF source uses plane wave, and has a built-in reference, which makes the simulation very effective. In some cases, users may want to test some other forms of beam sources in order to explore possibly new properties. This example uses the fundamental idea of TFSF, that is, the differential method for illustration.

      Customizing a TFSF source is an advanced feature. In the vast majority of simulations, the plane wave TFSF is sufficient to analyze the scattering of a nano scatter. This is true even when in experiment a Gaussian beam or a NA focus beam is used where the illumination on the particle is almost uniform. Only in the cases where a very large numerical aperture (NA) beam is used, or a beam with specialized polarization form is used, may the custom TFSF be used.

      This approach can be used for FDTD and VarFDTD.

      This exmaple uses custom TFSF source. But its main goal is not for such TFSF. You may get some help to understand how does it work to get the field difference, and then integrate the Poynting vector to get the power.

      https://optics.ansys.com/hc/en-us/articles/360042160993-Plasmon-mode-excitation

    • Yevh
      Subscriber
      Hi gsun,
      Thanks for the post. Could you also advice please where one can download "Associated files"from https://support.lumerical.com/hc/en-us/articles/360042703433 after the Knowledge Exchange moving?

      Best wishes,
      Yevhenii.
    • Guilin Sun
      Ansys Employee
      Hi, Yevhenii,

      Have you tried to visit the website through the link? I clicked the link, the file is there. It seems it does not need log in. Please try.
    • Guilin Sun
      Ansys Employee

      The new ALF website does not allow long post, so I have to cut it into 2 sections. And due to Ansys policy, only part of the script is pasted. We encourage users to write their own script based on the principle.

      Simulation settings and analysis

      We take the Mie scattering 3D as an example to use custom NA beam TFSF with NA=0.6. Different from the regular TFSF where the plane wave is limited into the source region, NA beam is composed of many angled plane waves. Due to diffraction, its lateral size can be large. Larger source size means that the simulation region must also be large, which leads to longer simulation time. However, the nano particle is usually quite small, thus the light-matter interaction occurs in a small region. Since the differential method is used, we can use relatively small simulation region, whereas the diffraction effect can be minimized as long as the diffraction fields do not interact with the particle (place the source as close to the particle as possible). In this example, we choose the simulation region as 2.51.02.5 um. In practice, you may do a converging test to choose the proper simulation region. Other settings are the same as the Mie scattering case, except that now we use the wavelength range from 400nm to 900nm.

      In calculation of the scattering cross section and absorption cross section, the source intensity is usually used, please refer the nanowire example. The function sourceintensity gives correct result for a plane wave. However, for a NA beam, the source profile is not uniform and this function does not give the correct result. To get correct result, we use the intensity on the front monitor (in this example it is y1) as the source intensity illuminating the particle.

      Once the scattering and absorption fields are obtained after running the simulations, we use the integration of the Poynting vector to get the power, then use the definition of the cross sections to obtain the scattering and absorption cross sections as shown below:

      The two results show a good agreement. This is because the particle is small and the illumination from the NA source on the particle is quite uniform. If the illumination is not uniform across the particle, the results might be significantly different.

      The minor difference is mainly due to the small simulation region we used. If you use a larger simulation region, you would be able to get a better agreement between the results.

      The Script

      In the first part of the script , choosing doTFSF=1 is to get the regular plane wave TFSF results, which are used to validate the custom TFSF in this example. You can choose doTFSF=0 to avoid it. Next, the reference simulation without the sphere is run, where the illumination profile at the focus and the fields in the monitors are recorded, and the averaged intensity in y1 monitor is calculated as the source intensity to be used later. Then the simulation with the scatter “sphere” is run. Note that to save simulation time, some objects are enabled or disabled. Finally the scattering fields are obtained with the differential method, the powers are calculated though the integration of the Poynting vectors, and the cross sections are obtained by the use of the averaged intensity of the illumination beam. Running the script you can duplicate the figure above.

      Tips:

      1. keep the the same mesh for the two simulations: Usually TFSF gives better results using a uniform mesh in TFSF region. An override mesh can be used for this purpose to have a uniform mesh. Since the differential fields need to be in the same grid, this override mesh should be kept even when there is no particle in the reference simulation.
      2. Far field projection: Some times users want to get the far field properties using the custom TFSF method. If this is the case, users must add a proper analysis group such as the “scat_ff” in Mie scattering 3D . At the same time, the script inside the analysis group should be modified in order to output the fields instead of the intensity. Then in the script file users can add scripts to get the far field projection in the reference simulation and the scatter simulation. Their difference is the scattered far fields and can be easily plotted as intensity.
      3. Refer to the Mie scattering 3D page to get more tips on scattering simulations.

      Note about Custom TFSF

      1. If necessary, the user can always modify the Gaussian source to be a plane wave source instead. The same script and methodology can be employed to obtain the plane-wave custom TFSF results,which will be the same as using the built-in TFSF.
      2. Since BFAST assumes the structure is periodic, users should not use BFAST source at an angle to build the custom TFSF to get broadband, oblique incidence result for a non-periodic structure.
      3. you may refer to this example https://optics.ansys.com/hc/en-us/articles/360042703313-Scattering-of-PSL-and-Cu-spherical-particles-on-a-substrate  but it only gives the difference of the electric field components in the farfield, and you do not need to get the farfield results. Furhter scritping to get H fields and then get the power is required from the monitor data (near field), in order to get the scattering scross section.

       

       

       

       

    • Yevh
      Subscriber

      Hi gsun,

      Sure, I tried. After a few seconds after pushing "Download" button the following screen always appears

      However, I am registered for support and a few weeks ago everything was fine with the files downloading.


      Best wishes,

      Yevhenii.


    • Guilin Sun
      Ansys Employee

      Sorry I could not see your screenshot.

      Are you able to log in? I did not find your current email address in our support system. The first step is to make sure you can log in, and download other examples. Please let me know your log in status and other file downloads.

    • Lito
      Ansys Employee

      Yevh,

      Lumerical Support is linked to the current/active license. The license you registered with before might have expired. You will have to register for support while accessing the current/active license from your license server.

      Best,

      Lito

    • Yevh
      Subscriber

      gsun ,Lito

      Thank you very much for the help. Indeed, I re-do Registration for support from our server and everything is fine now.


      Best wishes,

      Yevhenii.

    • Lito
      Ansys Employee

      Yevh

      Glad to hear this.

      Best,

      Lito

Viewing 8 reply threads
  • The topic ‘Ansys Insight: Custom TFSF source’ is closed to new replies.