The figure above shows a doubly periodic structure with periods S<sub>x</sub> and S<sub>y</sub> along the X and Y directions, respectively. The computational domain is terminated with PBC in both X and Y directions. Along the positive and negative Z directions, it is terminated with CPML layers. Bear in mind that the PBC is also applied to the CPML layers. The computational domain is excited by a TM<sub>z</sub> or TE<sub>z</sub> plane wave incident at z = z<sub>0</sub>. The plane wave incidence angles are denoted by θ (elevation) and φ (azimuth) in the spherical coordinate system. The constant wavenumber components k<sub>x</sub> and k<sub>y</sub> in this case are defined as:
:<math>k_x = k_0 \sin\theta\cos\phi</math>:<math>k_y = k_0 \sin\theta \sin\phi</math><!--[[Image:FDTD85.png]]-->
where k<sub>0</submath> k_0 = &\omega;/c = 2&\pi;f/c = 2&\pi;/λ<sub>0\lambda_0</submath> is the free space propagation constant, f is the operational frequency, ω is the angular frequency, λ<sub>0</sub> is the free space wavelength, c is the speed of light in the free space. The constant transverse wavenumber k<sub>l</sub> is then given by:
:<math> k_l = \sqrt{k_x^2 + k_y^2} = k_0\sin\theta </math><!--[[Image:FDTD86.png]]-->
which depends only on θ and not on φ. On the excitation plane, the incident field adopts a modulated Gaussian waveform and a complex phase delay along the periodicity direction with the following form: