Photonics

Photonics

Topics related to Lumerical and more

export of refractive index profile into array of specific size

    • Nirvan Gajadharsingh
      Subscriber

      Hello.

      I have found the eigen modes for my ridge waveguide geometry, and now I want to integrate the electric field over the entire profile to get the total electric flux outside the waveguide expressed as a ratio to the total electric flux in the entire simulation domain. This is expressed as: 

      ∫ExEzdxdz (air) / ∫ExEzdxdz(total)

      I can perform this integration easily in python using the pinch command to grab the 2D data and placing it into an array. I would now like to specify boundaries over the simulation domain to just integrate the E-field contained in air. From the picture attached, you can see the 3 regions of the simulation domain, air in dark blue, LibNO3 in red and glass in sky blue.

      1)How can I export the refractive index information into an array which has the same dimensions as that of the array used to store the fields Ex, Ey or Ez. This way all points associated with air has the refractive index 1, all points associated with LibNO3 and glass have the corresponding refractive index associated with that point.

      2)Can this be done directly in lumerical without using python or matlab? If yes what commands will be useful

      Thanks

    • Guilin Sun
      Ansys Employee

      A1: Unfortunately FDE cannot output the refractive index profile. You may file a feature request by referring this post: 

      New Feature vote:   Vote new features, and file your feature request

      A2: you can either directly calcualte the integration by specifying the region in GUI:

      or you can use script:

      x1=.1e06;

      x2=.5e-6;

      y1=-2e-6;

      y2=1e-6;

      You specify the coordinates of the region.

      setanalysis("integration shape","rectangular");

      setanalysis("y1",y1);setanalysis("y2",y2);

      setanalysis("x1",x1);setanalysis("x2",x2);

      area=getanalysis("fraction integrated");

       

      You can do a loop or two region integration to get the ratio.

    • Nirvan Gajadharsingh
      Subscriber

      Hi,

       

      Thanks, that does help but on my version of Lumerical Mode there are only 2 geometries available for use with the integrate function, rectangular and circular, neither of these allows me to select the profile shape accurately along the air/LbNO3 boundary of my ridge waveguide(ridge is at an angle). Is there another way to get this done? I used a rectangle and a polygon to build my structure and the integrate "solid" specification is not available.

    • Guilin Sun
      Ansys Employee

      You can either use the "rectangular", or export the data, use whatever the window function you want and do the integration. you can use script:

      E1=getresult("mode1","E");

      Ex=E1.Ex;

      Ey=E1.Ey;

      H1 = getresult( "mode1", "H" );

      Hx=H1.Hx;

      Hy=H1.Hy;

      EH=pinch(Ex*conj(Hy)-Ey*conj(Hx));

      x=E1.x;

      y=E1.y;

      then you can use a window function to further process the data.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.