How do I describe a gradient of optical constants?

A gradient of optical constants can be implemented in an optical model using the layer type ‘concentration gradient’.

The strategy is this:
Define an effective medium, i.e. a mixture of 2 materials, using one of the simple effective medium objects Bruggeman, Maxwell-Garnett or Looyenga. The best choice for gradients is Bruggeman, also known as EMA. The only parameter to describe the topology of the mixture is the volume fraction.
In the next step, insert a concentration gradient layer into the layer stack and assign the effective medium material to it. The gradient will be described by a user-defined function that defines the depth dependence of the volume fraction from the top of the layer to the bottom. Select the layer and use the Edit command to access the formula definition window.
Finally, you go back to the layer stack definition window and specify how many sublayers should be used to sample the gradient. Be careful not to take too many sublayers – this could increase the computational times a lot. On the other hand, be careful not too ‘undersample’ the gradient – if you increase the number of sublayers by 1 the spectra should not change significantly.

Please consult the manual for further details …