TORCWA: GPU-accelerated Fourier modal method and gradient-based optimization for metasurface design
TORCWA is an electromagnetic wave simulation and optimization tool utilizing rigorous coupled-wave analysis. One of the advantages of TORCWA is that it provides GPU-accelerated simulation. It shows a greatly accelerated simulation speed compared to when the same simulation is performed on a CPU-based. Although it has accelerated speed, the simulation results are almost identical to the commercialized electromagnetic wave simulations. The second advantage is that it provides GPU-accelerated gradient calculation for the simulation results with reverse-mode automatic differentiation of PyTorch version 1.10.1. In particular, the instability of gradient calculation of eigendecomposition is also improved. With this property, TORCWA can be utilized for the optimization of various nanophotonic devices. Here, we first introduce the formulation used in TORCWA, compare it with other commercial simulations, and show the computational performance in multiple environments. Then, the gradient calculation and optimization examples are shown. Thanks to accelerated computational performance and gradient calculation, TORCWA is a worthy program for designing and optimizing various nanophotonic devices.