SWG simulation & Import Source



I’m trying to simulate the transmission through Subwavelength Grating waveguide structures.

I initially tried using a mode source to simulate this, but quickly realized that the mode source assumes a homogeneous waveguide, and thus is not suitable for the simulation of an SWG.

Therefore, I made another simulation where the homogeneous strip waveguide gradually tapers into a SWG waveguide, and obtained the mode profile at the SWG there.
Using this profile, I returned to the SWG waveguide simulation (as shown above) and used the Import Source option to start the simulation.

However, I have been noticing a lot of losses in my mode propagation through the SWG waveguide. Is there an error in my method? I’m beginning to wonder if, the fact that the SWG mode is a Bloch-Floquet mode, is inducing some sort of mode-mismatch losses in my simulation.


No, you shouldn’t be getting strong losses. I just think the number of periods you are using are not enough and the boundary conditions should be periodic instead of PML.

Please, have a look on this knowledge base example:


Hello aya_zaki,

Thank you for the suggestion.
I think you have a very good point there, especially regarding the boundary conditions.
Of course it will take a longer time to simulate, but I will test it out the next chance I get, and post an update.


So I ran the simulation with Bloch boundary conditions along the propagation direction as suggested.

What became clear to me, is that the mode that initially started from the source broadens as it propagates. Although the wavelength setting on the Import Source is set to 1550nm only, the fact that it sends a pulse seems to imply that other wavelengths are included in it as well, leading to this dispersion.

(Mode at 5second mark)

(Mode at 20second mark)

Of course because of this, the DFT monitors read low transmission.
I’m thinking of either
(1) Making a larger simulation region with PML boundaries everywhere to measure transmission and mode profile instead, or
(2) Changing the source pulse setting, to pre-broaden it or run it as CW source.

But I’m not too confident as to whether these approaches will solve my problem. So, if anyone has a good idea to try, please post! Thank you.


In theory, (1) would work if you have a simulation large enough to include enough no. of si blocks. However, this is computationally inefficient. If the simulation is super large, other error may become more noticeable like grid dispersion.

This type of device looks like a “family” of bragg grating to me. I would recommend looking at this page how we simulate the transmission of bragg grating using the EME solver in MODE Solutions. We might have to re-think about that trick to obtain the full spectrum. But if you only care about the transmission of a single wavelength, you probably don’t need to worry about that trick.

Note: In the air region, you might need to increase the number of modes used for expansion.


I am alos doing SWG simulations, but facing problem to use Import source in FDTD. I have a monitor “t” and
I am taking field profile from this monitor for importing the source, Following cod is used for importing the source:-

EM = rectilineardataset(“EM fields”,E_field.x,E_field.y,E_field.z);
EM.addparameter(“lambda”,c/E_field.f,“f”,E_field.f); # Note: Import source can only load datasets with one frequency point of data.

save dataset to .mat file which can be imported at a later time


select “new_monitor”;

After usinh the aboove code following error is displayed:-
" The fourth dimension is assumed to be frequency and should contain a single value."

Do anybody know how to resolve this problem. ?


It is likely that your frequency monitor is recording the fields for multiple frequencies. It only allows you to import the field for a frequency point. One way to fix it is to reduce the number of frequency point to 1 (this setting is in the general tab of the frequency monitor) and then re-run the simulation. The other way is to use the pinch command and re-package the data to re-import the data.