# Bulk material¶

The geometrical setup of this example is a simple planar infinite substrate layer, covered by air.

The air/substrate interface is illuminated under a certain angle and the reflected light is computed. For computation of ellipsometric quantities like Mueller and Jones Matrix first the `FourierTransform`

of the reflected near field is computed. This is needed as an input for the `ScatteringMatrix`

post process in the project file, which determines all relevant ellipsometric parameters:

```
PostProcess {
FourierTransform {
FieldBagPath = "project_results/fieldbag.jcm"
OutputFileName = "project_results/fourier_modes.jcm"
NormalDirection = Z
}
}
PostProcess{
ScatteringMatrix{
InputFileName="project_results/fourier_modes.jcm"
OutputFileName="project_results/sm.jcm"
}
}
```

For computation of the scattering matrix, two incoming fields with non-parallel polarization states have to be defined in the source file for each direction of interest:

```
...
PlaneWave {
...
ThetaPhi = [20 15]
SP = [1 0]
}
...
PlaneWave {
...
ThetaPhi = [20 15]
SP = [0 1]
}
```

In this project a number of parameter derivatives up to second order are computed. The derivative parameters are the global position of the interface, the permittivity of the bulk material, the wavelength and incidence angle. In an ellipsometric setup, geometrical and material derivatives can be used in the inverse fitting process of the model data to the measurement. The derivatives of the incident field can be used to speed up computation of a wavelength and angle scan of the ellipsometer.

The wavelength derivative is defined in the `sources.jcm`

file

```
DerivativeParameter {
Name = "Lambda0"
TreeEntry {
Path = SourceBag/Source/ElectricFieldStrength/PlaneWave/Lambda0
Scaling = 1e-9
}
}
```

The `Scaling`

is introduced to compute the derivative with respect to a change in wavelength in nanometers. Since a change in wavelength usually leads to a change of the refractive index, the same derivative parameter is also used in the `materials.jcm`

file:

```
DerivativeParameter {
Name = "Lambda0"
TreeEntry {
Path = Substrate/RelPermittivity
Scaling = 1e-3
}
}
```

Here, it is assumed, that the permittivity of the bulk material changes by 0.001 when the wavelength changes by 1nm. This `Scaling`

can also be complex.

When computing parameter derivatives with `JCMsuite`

, only a single matrix decomposition is done by the solver. Since this often takes most of computation time, the parameter derivative capability of `JCMsuite`

can save a lot of computational effort, e.g. compared to a finite difference approximation. Also, the accuracy of numerical parameter derivatives is similar to the accuracy of the primary solution. With 4 parameters, 4 first and 10 mixed second derivatives are computed.

In the `data_analysis/run_derivatives`

script the primary solution and the parameter derivatives computed with `JCMsuite`

are compared to the corresponding quantities determined analytically from Fresnel’s equations. The output shows accuracy of the `SS`

and `PP`

components of the Jones matrix and its derivatives. The output file `sm.jcm`

of the scattering matrix post process, includes further relevant quantities, like Mueller the matrix etc.