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.

inverse design material

    • firdoust
      Subscriber

      Hi, 

       

      I am simulating the Invese taper design Inverse design of y-branch – Ansys Optics: 

       

      How to replace the silicon material in the code "y_branch_opt_2D.py":

      eps_in = Material(name = 'Si: non-dispersive', mesh_order = 2)

       

      With a material of defined index? I am trying something like this but simulation doesn't work and gives me the error that index is not defined. 

      eps_in = Material(name = 'Object defined dielectric', index=2.21)

       

      Thanks,

       

    • firdoust
      Subscriber

    • daanish.peerkhan
      Ansys Employee

      Hi Firdoust,

      The error occurs because the Material class in the lumopt library does not have an index argument. It requires permittivity (base_epsilon) instead.To define a specific refractive index directly on the object, you should pass the square of the index (n^2) to base_epsilon and omit the name (it will default to automatically).Here is the corrected line of code:

      eps_in = Material(base_epsilon=2.21**2, mesh_order=2)

      The solver expects permittivity (epsilon), and the relationship is epsilon = n^2. By passing 2.21**2, you are providing the correct permittivity for your desired index. You do not need to explicitly set name='' as this is the default behavior when base_epsilon is provided.

      Hope this helps!

      Thanks,

      Daanish

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]