top of page

FDTDX: An Open-Source Framework for Large-Scale Electromagnetic Simulation and Inverse Design

Introduction

The field of electromagnetic simulation has seen significant advancements in recent years, particularly in the finite-difference time-domain (FDTD) method. Although various software solutions currently exist, they often face limitations in scalability, accessibility, or computational efficiency. The newly introduced FDTDX framework addresses these challenges by offering an open-source solution that combines GPU acceleration with automatic differentiation capabilities.

Simulation setup of a waveguide bend
Figure 1: Simulation setup of a waveguide bend, illustrating a silicon dioxide substrate with a refractive index of 1.5 and a silicon waveguide with a refractive index of 3.5. The goal is to identify a design that redirects light with minimal loss.
Core Features and Architecture

FDTDX implements the FDTD based on Maxwell’s equations, discretizing in both time and space using a Yee grid structure. The framework employs a convolutional perfectly matched layer (PML) at the simulation boundaries to eliminate unwanted reflections. The light source is implemented using the total-field/scattered-field formulation, which creates distinct regions for incident and scattered fields.

A major innovation of FDTDX is its memory-efficient approach to automatic differentiation. Traditional methods require storing field values at each time step, making large-scale optimization computationally expensive. FDTDX leverages the time-reversibility of Maxwell’s equations to reconstruct previous field values without extensive storage.

dimensional constraints and various scales across multiple axes
Figure 2: Relative dimensional constraints and various scales across multiple axes. Axis 0 denotes the x-axis (horizontal), and axis 1 denotes the y-axis (vertical).
Performance and Scalability

Compared to existing solutions, FDTDX demonstrates superior performance. In benchmark tests using a simulation volume of 6μm × 4μm × 1.5μm, FDTDX significantly outperformed other open-source alternatives. For a simulation with 288 million grid cells, it was approximately 10 times faster than Meep and 415 times faster than Ceviche.

Table 1: Performance comparison showing the runtime results of various FDTD simulators under different resolution settings, highlighting FDTDX's superior performance in large-scale simulations.

Resolution (nm)

Cells

Steps

OmniSim

Ceviche

Meep

Tidy3D

FDTDX

25.0

2.3 x 106

4,196

7 min 5 s

8 min 30s

32 s

1.6s

4.7s

20.0

4.5 x 106

5,245

16 min 17 s

1h 33 min

1min 25 s

3.7 s

9.8s

10.0

36.0 x 106

10,490

x

23 h 49 min

21 min 20s

1min 47 s

1min 50s

5.0

288.0 x 106

20,980

x

180 h 3 min

4 h 36 min

3 min 35s

26 min 8s

2.5

2.3 x 106

41,960

x

x

x

14 min 26s

7 h 5min

The framework efficiently scales from a single GPU to multiple GPUs, making it suitable for both small-scale prototyping and large-scale production simulations. For example, using four NVIDIA H100 GPUs enables the simulation of 2.3 billion grid cells effectively.

Practical Applications

FDTDX excels in various real-world applications, especially in photonic device optimization. A notable example is the optimization of silicon waveguide bends. The framework successfully designed a corner element occupying only 1.6μm × 1.6μm of space, achieving 92% coupling efficiency (equivalent to -0.36 dB loss).

Optimization results of a waveguide bend
Figure 3: Optimization results of a waveguide bend, showing the performance comparison between strict constraints and a two-stage optimization method, along with visualizations of the optimized design and energy distribution.

Another important application involves polymer waveguide splicing devices. FDTDX can optimize designs that are resilient to random translational offsets, which is crucial for the two-photon polymerization (2PP) fabrication process. The framework demonstrated successful optimization of devices that can tolerate up to 2μm offsets in both the x and y directions.

waveguide splicing performance under random x-axis and y-axis shifts
Figure 4: Analysis results showing waveguide splicing performance under random x-axis and y-axis shifts, comparing standard ridge waveguide performance with optimized designs.
Validation and Accuracy

To ensure reliability, FDTDX’s results were validated against established frameworks such as Meep. Validation tests included simulating light scattering from randomly generated objects within a 6.12μm³ volume, demonstrating strong agreement with reference results.

Distribution of electric field components on the XY, XZ, and YZ planes
Figure 5: Distribution of electric field components on the XY, XZ, and YZ planes, showing FDTDX and Meep simulation results and normalized error analysis.
Future Development

The FDTDX development team plans several improvements, including integrating custom CUDA kernels to enhance computational performance, expanding the feature set beyond existing tools, and developing a graphical user interface to improve accessibility for users without programming experience.

Its open-source nature encourages community participation and collaborative advancement in nanophotonic design capabilities. By offering high performance and accessibility, FDTDX aims to make advanced electromagnetic design tools more widespread, accelerating innovation in the field of nanophotonics.

Reference

Y. Mahlau, F. Schubert, K. Bethmann, R. Caspary, A. Calà Lesina, M. Munderloh, J. Ostermann, and B. Rosenhahn, "A flexible framework for large-scale FDTD simulations: open-source inverse design for 3D nanostructures," arXiv:2412.12360v2 [physics.optics], Dec. 2024.

Comments


bottom of page