NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.25k stars 626 forks source link

TE and TM polarization in adjoint optimization #2763

Open leilamehrvar opened 10 months ago

leilamehrvar commented 10 months ago

Hi, I am simulating a 3D polarization independent wavelength demultiplexer using adjoint optimization method in MEEP, however, I have an issue with defining eigen mode source for TE and TM source. In my simulation, waveguide is a single mode waveguide supporting both TE0 and TM0, however using different combination of eig_parity I could not get this eigenmode source. This is my recent try, however still the response is weird for TM polarization: source_center = [-Sx / 2 + pml_size, 0, -Sz/2 + pml_size + dsub + d/2] source_size = mp.Vector3(0, waveguide_width+2, d+2) kpoint = mp.Vector3(1, 0, 0) src = mp.GaussianSource(frequency=fcen, fwidth=fwidth) source_te = [ mp.EigenModeSource( src, eig_band=eigband_te, direction=mp.NO_DIRECTION, eig_kpoint=kpoint, size=source_size, center=source_center,

    eig_parity=parity_te,
)

]

source_tm = [ mp.EigenModeSource( src, eig_band=eigband_tm, direction=mp.NO_DIRECTION, eig_kpoint=kpoint, size=source_size, center=source_center,

    eig_parity=parity_tm,
)

] Is anyone here to have this experience in MEEP to help me in solving this issue?

leilamehrvar commented 10 months ago

I would be grateful if you could help me?. @smartalecH