Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Photonics

Photonics

Topics related to Lumerical and more.

Effective index data in MODE Eigensolver Analysis with more significant figures

    • King Lam
      Subscriber

      Using script, the getresult("mode1", "neff"); returns the effective index to 5 decimal places, e.g, 2.14161+1.99136e-11i. In modal analysis, effective index data exported to a text file contains more significant figures, e.g.

      f
      3.747405725000e+14

      effective_index(real),effective_index(imag),loss
      2.141613322230e+00,1.991363184436e-11,1.358484420378e-03
      2.125338278328e+00,2.536038929807e-11,1.730055774125e-03

      Is it possible to change the number of signficant figures? I am hoping to achieve this using script, rather than manually exporting the data file. Thanks

    • Guilin Sun
      Ansys Employee

      The getresult by default gives short-format data, which has 6 digits in total. The saved data seems using long format to give more digitst. This might be desired for example later those data are used in INTERCONNECT and the component can be very long, say meters or kilimeters. 

      You can use

      format long;

      ?getresult("mode1", "neff"); 

      and then

      format short;

      ?getresult("mode1", "neff"); 

       

      If you want to have short format data, you can write the data into a text file using "write":

      https://optics.ansys.com/hc/en-us/articles/360034411134-write-Script-command

       

       

Viewing 1 reply thread
  • The topic ‘Effective index data in MODE Eigensolver Analysis with more significant figures’ is closed to new replies.
[bingo_chatbox]