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.

关于profile monitor画电场的问题

    • xuanlunhuang20
      Subscriber

      你好,我在做超结构的仿真,然后我想用profile monitor去画仿真区域内场的分布。这是我的仿真结构(图1):

      仿真完,我点击field的E结果,然后选择x分量,其结果如图(图2):

      但当我直接选择画Ex结果时,场的分布范围就变得不一样了(图3):

      但这个monitor保存的x和y范围,又是和图2一样的范围,所以当我提取这些数据,然后在matlab画的时候,结果就和图2不一样了(图4,即使我保存的是getresult的E,而不是getdata的Ex):

      这是什么原因导致的,是mesh大小的问题吗?但为什么图2又显示正确,图3又不对了?这应该怎么解决,感谢。

    • Guilin Sun
      Ansys Employee

      这个问题好像是重复帖子吧?

      你看的是不同结果,第一个是正常/正确的结果,第二个是原始数据,没有归化过,请不要使用也不要看它,因为它不是Dataset,没有与坐标关联,是按网格点画的,因此有变形。

      需要注意,Matlab直接用来作图可能有失真,参见 

      Ansys Insight: Matlab画图失真问题

      • xuanlunhuang20
        Subscriber

        你好,感谢解答。因为另外一个英文帖子发了几天没回复,所以又重新提问了一次中文的帖子。我待会儿看看如何删除那篇英文帖子。

        但还有一个疑问,自带的image函数,是会自动适应网格吗?我取原始数据Ex,然后使用image画图,它也可以得出正确结果:

        Efield_Ex = pinch(getdata('field','Ex'));

        Efield_x = getdata('field','x');

        Efield_y = getdata('field','z');

        image(Efield_x,Efield_y,real(Efield_Ex),"x","y","real(Ex)");

        setplot("colorbar min",-1); setplot("colorbar max",1);

        但当我直接画Ex时,它又变形了:

        mat_size=size(Efield_Ex);

        n1=mat_size(1);

        n2=mat_size(2);

        image(1:n1,1:n2,Efield_Ex);

        setplot("colorbar min",-1); setplot("colorbar max",1);

         

    • Guilin Sun
      Ansys Employee

      直接用网格的坐标画当然是正确的,不管是Image还是plot,因为坐标网格是原始非均匀的,但是一旦直接在Matlab里面画,而且没有把原始坐标网格均匀化后再转给Matlab,或者直接在Matlab里面用新坐标画都是均匀网格,参见之前给出的链接。

      用点数画当然就是均匀网格,因此有变形。

      必须使用原始坐标在Script里或者将坐标和E先均匀插值再送Matlab才可以。

      应该讲述清楚了此问题。

Viewing 2 reply threads
  • The topic ‘关于profile monitor画电场的问题’ is closed to new replies.