Lumerical FDTD之api建模仿真

Maple

About FDTD

使用lumerical-fdtd进行photonic-crystal仿真

About Python API

Use Python to analyze data, automate complex workflows\optimizations, and produce publication-quality plots. The Ansys Lumerical Python APIs provides a method to seamlessly use Python to interact with Ansys Lumerical products.

Python API overview – Ansys Optics Lumerical Python API Reference – Ansys Optics

Get Start

First, ensure you have installed Ansys Optics (Lumerical). Then include the api path to your environment variable. A simple method is dynamic add path in python.

1
2
3
import sys
sys.path.append(r"C:\Program Files\Lumerical\v242\api\python")
import lumapi

For example, we want to use FDTD,

1
2
3
model = lumapi.FDTD(hide=False) # open session of FDTD, not hide GUI
fdtd = model.addfdtd() # add fdtd simulation domain
# fdtd = model.getObjectById('FDTD') # get FDTD object by ID.

A complete code for reference, maple367/Lumerical-Example.

Notes

  • The unit in script is SI unit (m, s, etc.).
  • The properties name has space need to be replaced with underscore _. e.g. fdtd.x_span.
  • Title: Lumerical FDTD之api建模仿真
  • Author: Maple
  • Created at : 2025-06-24 10:26:13
  • Updated at : 2025-06-24 11:30:29
  • Link: https://www.maple367.eu.org/Optics/Simulation/lumerical-fdtd之api建模仿真/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
Lumerical FDTD之api建模仿真