### Light trapping limit in index near zero materials

In this tutorial, we will calculate the light absorption in a solar cell to demonstrate the light trapping effect in index-near-zero materials. We will use S4 to simulate the absorption. This is a large simulation that would take tens of hours to complete on a desktop PC. Here, we will use a large number of cores to reduce the time to around 10 minutes. This can be conveniently done by replacing normal loop for with parallel loop parfor in the input script.

The structure consists of a 3μm-thick absorber (refractive index = 3.5) placed on a back mirror that is realized by setting its dielectric constant at -10000. A random surface structure is built into the absorber with its top view shown in Figure 1b (this layer is called ‘Top-layer’ in the script below). This surface texture helps to improve the light trapping effect in the absorber. A 1μm-thick index-near-zero material (INZ) is placed on top of the absorber. Its refractive index is 0.33. The structure is periodic with a periodicity of 1.8 μm. The unit cell is shown in Figure 1a.

In order to test the light trapping limit, we have to use a small absorption coefficient in the absorber. We set the imaginary part of the dielectric constant to be 0.00002. This extremely weak absorption helps us to identify all absorption peaks in the spectrum. Consequently, we will need to do an ultra-fine frequency sweep. For example, here we calculate the absorption spectrum in the wavelength range from 600 nm to 700 nm with a resolution of 0.1 nm. That is 1,000 points!

Figure 1 a) The periodic nanostructure used for simulation. b) The surface structure of the absorber shown in a). Grooves (black color) with a depth of cut into the slab (blue color).

The calculated polarization-averaged absorption spectrum is shown by Figure 2.

Figure 2 Absorption spectrum for the solar cell.

The Lua script for s-polarized incident light in this case is shown below and can be downloaded here.

```S = S4.NewSimulation()
S:SetLattice({1.8,0}, {0,1.8})
--set a square lattice with a period of 1.8 micron
S:SetNumG(400)
--set number of harmonics. This number should go up with large periods.
--a fake Si material with real and imaginary part of the dielectric constant
--bottom mirror
--INZ material
--vacuum
t_lowi=1
t_grating=0.05
t_Si = 3
--thickness of INZ layer, grating layer and absorber layer, respectively
-- all the layers in this structure, from the top to the bottom
S:SetLayerPatternCircle('Top layer','lowi',{1.8/2,1.8/2},1.5*1.8/4)
S:SetLayerPatternCircle('Top layer','Si',{1.8/2,1.8/2},1.4*1.8/4)
S:SetLayerPatternRectangle('Top layer', 'lowi', {0.0279,1.8/2}, 0, {0.0274,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {0.1088,1.8/2}, 0, {0.0135,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {0.5256,1.8/2}, 0, {0.0205,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {0.7187,1.8/2}, 0, {0.0118,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {0.7502,1.8/2}, 0, {0.0053,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {0.777,1.8/2}, 0, {0.0131,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {0.9484,1.8/2}, 0, {0.0582,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.1304,1.8/2}, 0, {0.0495,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.1823,1.8/2}, 0, {0.0479,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.4461,1.8/2}, 0, {0.1,1.8/2})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,0.0279}, 0, {1.8/2,0.0274})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,0.1088}, 0, {1.8/2,0.0135})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,0.5256}, 0, {1.8/2,0.0205})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,0.7187}, 0, {1.8/2,0.0118})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,0.7502}, 0, {1.8/2,0.0053})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,0.777}, 0, {1.8/2,0.0131})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,0.9484}, 0, {1.8/2,0.0582})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,1.1304}, 0, {1.8/2,0.0495})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,1.1823}, 0, {1.8/2,0.0479})
S:SetLayerPatternRectangle('Top layer', 'lowi', {1.8/2,1.4461}, 0, {1.8/2,0.1})
--add surface patterns to the grating layer, i.e. the ‘Top layer’
S:SetExcitationPlanewave(
{0,0}, -- incidence angles (spherical coordinates: phi in [0,180], theta in [0,360])
{1,0}, -- s-polarization amplitude and phase (in degrees)
{0,0}) -- p-polarization amplitude and phase
--set the excitation condition, incident angle and polarization.
parfor lda=0.6001,0.7,0.0001 do
--loop that does the wavelength sweep
freq = 1/lda
--convert to frequency
S:SetFrequency(freq)
forward, backward = S:GetPowerFlux('AirAbove',0)
--forward and backward flux at the very top of the entire structure. The forward is total incident power.
lamda = lda*1000
print(lamda,(forward+backward)/forward)
--note the sign of backward since the flux has direction. This is normalized absorption.
--because there is a back mirror. There is no transmission through the structure
parend
```