The near to far Grating Projections (GP) calculate the far field profile from a periodic grating structure. The near field data is typically obtained from Lumerical's FDTD. The far field is then calculated as a post-processing step.

A simple way to understand grating projections is to view them as a decomposition of the near field data using a set of plane waves propagating at different angles as the basis for the decomposition. The end result is that the far field projections functions provide a straightforward and numerically efficient method for calculating the EM fields in the far field region.

If your structure is not periodic, see the far field projections page. If you're using DGTD or FEEM, see grating projections in DGTD.

## Grating physics

The grating functions are used to calculate the direction and intensity of light reflected or transmitted through a periodic structure. For example, the grating order directions of a 2D grating can be calculated from the well known grating equation

$$m\lambda=a_x(sin\theta_m+sin\theta_i)$$

For our purposes, it's more convenient to re-write this equation in terms of the wave vector k:

$$(\overrightarrow{k}_m)_x=(\overrightarrow{k}_{in})_x+m\frac{2\pi}{a_x}$$

In 3D, these equations become:

$$(\overrightarrow{k}_{n,m})_x=(\overrightarrow{k}_{in})_x+n\frac{2\pi}{a_x}\\(\overrightarrow{k}_{n,m})_y=(\overrightarrow{k}_{in})_y+m\frac{2\pi}{a_y}$$

where ax and ay are the grating periods in the x and y directions respectively and (n,m) are any integers where the condition

$$\mid\overrightarrow{k}_{n,m}\mid\leq k=2\pi\cdot index/\lambda_0$$

is satisfied.

It's important to remember that the grating order directions are defined entirely by the device period, the source wavelength and angle of incidence, and the background refractive index. In principle, the grating order directions can be calculated without running a simulation. However, in practice, the simulation must first be meshed in order for these functions to obtain necessary information such as the dimensions and period of the structure. The functions gratingn , gratingm , gratingu1 , gratingu2 , gratingangle can be used to calculate the direction of each order.

After running a simulation, the grating commands can be used to calculate the fraction of power that is scattered in each direction. The grating function uses a technique similar to a far field projection to calculate what fraction of near field power propagates in each grating order direction. To get polarization and phase information, use gratingpolar and gratingvector.

### Related publications

Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech House, (2005).

John B. Schneider, Understanding the Finite-Difference Time-Domain Method, Chapter 14: Near-to-Far-Field Transformation, (2010).

### See also

Grating projection script commands

Grating order transmission analysis object

Understanding direction unit vector coordinates

Understanding field polarization in the far field

Using grating projections to calculate fields at an arbitrary location