We choose 1.5 micron which corresponds to about one and a half wavelengths of free space below and above the silicon slab. We will add some free space below and above the silicon slab so that we can accommodate the source and the monitor on either side of the silicon slab. In our case, we will put the silicon slab in the middle of the computational domain. To start any FDTD simulation, the first thing that you need to do is to set up the computational cell or the computational domain. How to set up FDTD to simulate the transmission spectrum Medium ( permittivity = n_slab ** 2, name = 'silicon' ) # Grid resolution (cells per um) # dl = lambda_range / 30 / n_slab dl = 6e-3 # space between slabs and sources and PML spacing = 1 * lambda_range # simulation size sim_size = Lx, Ly, Lz = ( 2.0, 2.0, 2 * spacing + t_slab ) 0.38 for broadband freqw = bandwidth * ( freq_range - freq_range ) t_stop = 100 / freq0 # Thickness and refractive index of slab t_slab = 0.5 n_slab = 3.5 mat_slab = td. C_0 / freq0 bandwidth = 0.18 # bandwidth of source in units of delta frequency. C_0 / monitor_freqs # central frequency, frequency pulse width and total running time lambda0 = td. linspace ( freq_range, freq_range, Nfreq ) monitor_lambdas = td. sum ( freq_range ) / 2 Nfreq = 301 # frequencies and wavelengths of monitor monitor_freqs = np. # Wavelength and frequency range freq_range = ( 200e12, 400e12 ) lambda_range = ( td.