Photonics – Chinese

Photonics – Chinese

Topics related to Lumerical and more, in Chinese language.

关于通过公式得到的P和N与MODE EXPANSION得到的结果不一致的问题

    • guangbin zhang
      Subscriber

      尊敬的老师: 最近我在用公式验证MODE EXPANSION中的P和N;我 查得信息得 Nm = 0.5. ∗ R Em × H∗ m · dS P in = 0.5. ∗ R Ein × H∗ m · dS 那么我化简得到 Nm = 0.5. ∗ dx. ∗ dy P (Exm ∗ Hym∗ − Eym ∗ Hxm∗ ) Pm = 0.5. ∗ dx. ∗ dy P (Exin ∗ Hyin∗ − Eyin ∗ Hxin∗ ) FDTD代码如下 selectall; delete; um=10^(-6); addrect; set('x',0); set('x span',0.22*um); set('y',0); set('y span',0.5*um); set('z min',-3*um); set('z max',10*um); set('material',''); set('index',10); addfdtd; set('mesh type',"custom non-uniform"); set('define x mesh by',"maximum mesh step"); set("dx",0.008*um); set('define y mesh by',"maximum mesh step"); set("dy",0.008*um); set('define z mesh by',"maximum mesh step"); set("dz",0.05*um); set('x',0); set('x span',1*um); set('y',0); set('y span',1*um); set('z',2*um); set('z span',6*um); addmode; set("injection axis","z"); set("wavelength start",1.55*um); set("wavelength stop",1.55*um); set("x",0); set("x span",2*um); set("y",0); set("y span",2*um); set("z",-0.1*um); addpower; set("name","T"); set('x',0); set('x span',2*um); set('y',0); set('y span',2*um); set('z',3.5*um); set("output Px",1); set("output Py",1); set("output Pz",1); addmodeexpansion; set("name","modeexpansion"); set("monitor type","2D Z-normal"); set('x',0); set('x span',2*um); set('y',0); set('y span',2*um); set('z',3.5*um); setexpansion("T","T"); run; clear; T_fund=getresult('modeexpansion','expansion for T'); Pin=T_fund.getattribute('P'); Nm=T_fund.getattribute('N'); Exin=pinch(getresult('T','Ex')); Eyin=pinch(getresult('T','Ey')); Hxin=pinch(getresult('T','Hx')); Hyin=pinch(getresult('T','Hy')); dx=getdata('source','delta_x'); dy=getdata('source','delta_y'); chang=getresult("source","mode profile"); Exm=pinch(chang.getattribute("Ex")); Eym=pinch(chang.getattribute("Ey")); Hxm=pinch(chang.getattribute("Hx")); Hym=pinch(chang.getattribute("Hy")); matlabsave("modeexpansion 结果验证"); 然后matlab代码如下 Pin1=Exin.*conj(Hyin)-Eyin.*conj(Hxin); Pin1=sum(Pin1); Pin1=Pin1'; Pin1=sum(Pin1); Pin1=0.5.*dx(1,1).*dy(1,1).*Pin1; Nm1=Exm.*conj(Hym)-Eym.*conj(Hxm); Nm1=sum(Nm1); Nm1=Nm1'; Nm1=sum(Nm1); Nm1=0.5.*dx(1,1).*dy(1,1).*Nm1; 结果得到

      Nm=4.3394e-16+1.4132e-29i;Pm=4.3393e-16-1.6214e-18i.

      Nm1=1.0921e-16;Pin1=1.0848e-16+4.0534e-19i;

      我注意到公式计算和仿真得到的有一个4倍关系,但我仍然不清楚到底为什么结果不一样。

    • Guilin Sun
      Ansys Employee

      你用的Sum? 应该用积分 https://optics.ansys.com/hc/en-us/articles/360034405814-integrate-Script-command 你试一下。

       

       

    • jenningslebsack
      Subscriber
    • Guilin Sun
      Ansys Employee

      https://optics.ansys.com/hc/en-us/articles/360034405814-integrate-Script-command  This link works fine from my end. Please check your internet link.

Viewing 3 reply threads
  • The topic ‘关于通过公式得到的P和N与MODE EXPANSION得到的结果不一致的问题’ is closed to new replies.