Second-order nonlinear optical media in the body-centered tetragonal FDTD method: reproduction code

Read full text
Authors: Ho‐Seok Ee
Cited by: 1

Abstract

Standalone FDTD solvers and figure-generation scripts that reproduce every data figure (Figs. 2–5) of the paper “Second-order nonlinear optical media in the body-centered tetragonal FDTD method,” submitted to the Journal of the Optical Society of America B. The instantaneous second-order nonlinear source is implemented on the collocated body-centered tetragonal (BCT) grid using a flux-density (D) formulation, with the second-order coefficient represented as an 18-element Voigt tensor. A standard staggered Yee-grid solver is included for comparison. Because all electric-field components are stored at the same node on the BCT grid, the products E_j E_k are formed pointwise from the sampled numerical fields without spatial interpolation. This removes the staggered-source interpolation error isolated in the accuracy and convergence tests, but does not remove the ordinary discretization, numerical-dispersion, time-stepping, interface, source, or boundary errors of the underlying FDTD solution. The scripts cover nonlinear-source accuracy, equal-memory runtime benchmarks, second-harmonic generation in a model high-index slab waveguide, modal-overlap and phase-mismatch analysis, comparison with the normalized coupled-mode-theory envelope, equal-sampling-density convergence, and pump depletion validated against the coupled-wave sech/tanh solution. Fig. 1 is a schematic assembled separately and is not generated by the simulation code. Raw .npz outputs are not included because they can be regenerated using the supplied scripts. The package is self-contained and requires Python 3.9 or later, PyTorch, NumPy, and Matplotlib, with SciPy used for the Fig. 5 fit. No external FDTD package is required. Detailed reproduction instructions are provided in README.md.

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
4 August 2026