# S4

${\displaystyle S^{4}}$ (or simply S4) stands for Stanford Stratified Structure Solver, a frequency domain code to solve the linear Maxwell’s equations in layered periodic structures. Internally, it uses Rigorous Coupled Wave Analysis (RCWA; also called the Fourier Modal Method (FMM)) and the S-matrix algorithm. The program is implemented using a Lua frontend, or alternatively, as a Python extension. S4 was developed by Victor Liu of the Fan Group in the Stanford Electrical Engineering Department.

## Features

${\displaystyle S^{4}}$can compute transmission, reflection, or absorption spectra of structures composed of periodic, patterned, planar layers (see Fig. 1). The electromagnetic fields throughout the structure can also be obtained, as well as certain line and volume integrals. The spectra obtained from S4 are extremely smooth, making it easier for local and global optimization (see Fig. 2).

## Documentation

See the S4 manual, the S4 Introduction and S4 Tutorial. There is also a S4 FAQ.