We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Photonics – Chinese

Photonics – Chinese

Topics related to Lumerical and more, in Chinese language.

FDTD通过全局变量定义结构组数据

    • 2023020268
      Subscriber

      FDTD中我定义了全局变h1想用其控制基底的高度和组成结构组四个圆形结构的参数,我应该怎样编写脚本,尝试过利用select先选择出结构组,再直接对结构组中的结构参数进行定义,报出无法找到该结构的错误,我应该怎样进行修改,谢谢老师!

    • olivia.liu
      Subscriber

      select结构组和其中参数的前提是你已经搭建好了结构,并且定义了这个参数。

      举个例子,可以先设置好结构组,在结构组的properties中设置高度参数h1,在结构组的script中利用该参数(h1)设置基底和圆柱的具体结构。之后,在model的setup中设置变量H,在setup的script中select之前的结构组,并set(“h1”,H)。这样就可以使用model中的变量H对结构组中的h1进行调整。

      同样的,如果涉及到多个结构组,比如结构组1的h1参数和结构组2的h2参数都希望通过model中的H控制,只需要在model中分别选中并set。

      更多的脚本语言可以参考:Lumerical scripting language – By category – Ansys Optics

       

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.