grating strucutres



I have a grating strucutre as in this filegrating try.fsp (3.1 MB)
I would like to calculate the reflected light from the grating…for different angles…however the reflection monitor I use here is a global monitor and not particularly for one angle…how could i do that…



You can use the “grating order transmission” analysis group which is shown here to get the reflected and transmitted grating angles and the amount of power into each grating order direction:

However, when I checked your simulation file I noticed that you are injecting light at an angle with broadband sources. With the current settings since you are not using the BFAST method, light is being injected at different angles for each wavelength. The BFAST method allows you to inject broadband light at a single fixed angle over all wavelengths so I would recommend using that. More information about BFAST can be found here:

Otherwise, you could also avoid the problem by running single frequency simulations instead of a broadband simulation.


Hi again,
Thanks for the reply…I have used the same thing as per the example…however if I change the angles it talks about the stability of BFAST…grating_new1.fsp (274.6 KB)
could you help me please?


Hi Tapajyoti,

The BFAST technique can be unstable above the critical angle of total internal reflection of the substrate material so for angles above the critical angle, I would recommend not using the BFAST method and instead running single wavelength simulations over the wavelength range.

You can do this by editing the plane wave source and changing the “plane wave type” setting from “BFAST” back to “Bloch/periodic”, then setting the source wavelength span to 0. You would also need to edit the FDTD simulation region object and set the boundary conditions in the x direction to “Bloch”.

If you have any uncertainty about the setup, please let me know!


Hi again,
My file is here now…
i have some questions.
My experimental set up is as follows: the angle of incidence is zero.
source is a white light source
i put a white sheet of paper behind my sample ( detector) and I observe the diffraction pattern of my grating.
I would like to make a simulation as follows:
my detectors should be behind my samlpe and would be able to detct these colours.
i tried to use the time monitors but thy seem not to work…
the idea should be i will put at various points the monitors to detct the colours of diffraction
should I use far field monitors…if yes how?


Hi Tapajyoti,

I didn’t see any simulation file attachement, however you can use a frequency domain profile monitor behind the sample to measure the field profile over a range of frequency points. By plotting the field profile at a specific frequency point you can see the fields over space for the colour corresponding to that frequency.

However, I think that the distance between the sample and your detector in the real experimental case would be much larger than the wavelength of light, so it would not be practical to directly simulate the propagation of the fields over a large distance of free space. Instead, you can perform a projection from the near field monitor to a plane in the far field at a plane which is a specific distance away from the monitor. This is demonstrated in the example here:

You can project the fields for each frequency point to find the field profile for each colour.

Let me know if this helps!


thanks what i would like to see in the result is diffraction patterns…when i shine a white light through my strucutres…will it be possible ?
thanks again


If you would like to see the full diffraction pattern for a finite-sized source or finite number of periods of the structure, then the setup and analysis you would perform would be more similar to the setup and analysis of the double slit experiment here:

However instead of simulating two slits, you would include as many periods of the grating as you would like, and you can also use a beam source if you would like to simulate an incident focused laser beam with a beam spot size which is on the order of the grating size. If the beam spot size that you are using is much larger than the size of the periodic patterning then you can use a TFSF source like in the double slit experiment example.

Let me know if this is more like what you are looking for!


Hi again,
Thanks for the mail…
yes they should work …however it shows some error…i changed the priod of the slits to 1 micron and periodic along x direction and has modified the FDTD conditions accordingly…however it shows some error…usr_grating.fsp (230.8 KB)
could you please help…i prefer not to change the names because this will help me to run the script windows…
thanks a lot again,
also is it possible to somehow add some monitor which will show me the colours of diffraction pattern?


sorry the new file is this one:usr_grating.fsp (234.4 KB)
thanks again


Hi Tapajyoti,

Unfortunately there is no monitor to generate an image showing the colours that you would see. From the monitors you can only get the field intensity pattern of each colour, but the colour of the light itself isn’t plotted.

From the usr_grating.fsp simulation file which you provided, it wasn’t clear to me whether it was intended to simulate an array of squares or whether you intended to simulate a pattern of lines which has a period in the x-direction. In either case I would recommend changing the boundary conditions in the y direction to “periodic” instead of PML, otherwise if you use PML boundaries, the plane wave source will be truncated which will lead to edge effects like shown in example 3 on this page:

To simulate an array of squares then the span of the simulation region should equal the period of the array in the y-direction. Or, if you would like to simulate periodic wires then the current simulation span, or even a smaller span in the y-direction could be used since if the structure is uniform in the y-direction the period in the y-direction can be arbitrary.

Using the current simulation setup, it is possible to directly plot the E result from the “projection” monitor to get the near field pattern of the light. However, if you would like to perform a far field projection or periodic grating projection from the monitor, then it would be necessary to edit the monitor and select the “Hx”, “Hy”, and “Hz” field components to be recorded by the monitor like in the following image:

Originally the H field components were not being recorded, and they are necessary for the projection calculation, so it’s possible that you were getting an error when you try to calculate the far field result because of this.

Please try the suggestions out and let me know if you have any questions about the suggestions.


This topic was automatically closed after 2 days. New replies are no longer allowed.