FDTD Tutorial

Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

欢迎进入 FDTD Solutions 的入门教程!

入门教程由四章内容组成。第一章介绍 FDTD Solutions 的基本功能,以及器件建构,程


序运行和结果分析。后面三章则针对 v 个实际问题,提供详细指导,帮助用户一步步地了解
每一模块的功能及其使用。文中涉及的所有模拟设计文件都可以从 LUMERICAL 的相应网
页上免费下载。
第一章 简介
第二章 银质纳米线谐振腔散射教程
第三章 环形谐振腔教程
第四章 光子晶体微腔教程

简介
The goal of the Getting Started Guide is to introduce the Finite Difference Time Domain
(FDTD) technique and explain how modeling is done with the software.
The FDTD algorithm is useful for design and investigation in a wide variety of applications
involving the propagation of electromagnetic radiation through complicated media. It is
especially useful for describing radiation incident upon or propagating through structures
with strong scattering or diffractive properties. The available alternative computational
methods - often relying on approximate models - frequently provide inaccurate results.
FDTD Solutions is useful for numerous engineering problems of commercial interest
including:
• display technologies
• optical storage devices
• LED design
• biophotonic sensors
• plasmon polariton resonance devices
• optical waveguide devices
• photonic crystal devices
• integrated optical filters
• optical micro cavity design
FDTD Solutions is an accurate and easy to use, versatile design tool capable of treating
this wide variety of applications. This introductory chapter of the Getting Started Guide
introduces the general FDTD method and provides a basic overview of the product usage.
The final sections contain examples that are accompanied by step-by-step instructions so
that you can set up and run the simulations yourself.

Application Type Description Example

Particle Scattering Calculation of the absorption, Silver nanowire resonant

1
scattering and extinction scattering
cross-sections of a
sub-wavelength particle.

Waveguide Devices Determination of the insertion loss Ring resonator design for
or return loss, and frequency channel drop filter
response of waveguide-based
components. Manufacturing
tolerances are also calculated.

Cavities and Analysis of resonant modes and Photonic crystal micro cavity
Resonators the corresponding decay constants design
for cavities and resonators.

什么是时域有限差分?
The Finite Difference Time Domain (FDTD) method has become the state-of-the-art
method for solving Maxwell’s equations in complex geometries. It is a fully vectorial
method that naturally gives both time domain, and frequency domain information to the
user, offering unique insight into all types of problems and applications in
electromagnetics and photonics.
The technique is discrete in both space and time. The electromagnetic fields and
structural materials of interest are described on a discrete mesh made up of so-called
Yee cells. Maxwell’s equations are solved discretely in time, where the time step used is
related to the mesh size through the speed of light. This technique is an exact
representation of Maxwell’s equations in the limit that the mesh cell size goes to zero.

Structures to be simulated can have a wide variety of electromagnetic material properties.


Light sources may be added to the simulation. The FDTD method is used to calculate
how the EM fields propagate from the source through the structure. Subsequent
iteration results in the electromagnetic field propagation in time. Typically, the simulation
is run until there are essentially no electromagnetic fields left in the simulation region.

2
Time domain information can be recorded at any spatial point (or group of points). This
data can be recorded for the duration of the simulation, or it can be recorded as a series of
"snapshots" at times specified by the user.
Frequency domain information at any spatial point (or group of points) may be obtained
through the Fourier transform of the time domain information at that point. Thus, the
frequency dependence of power flow and modal profiles may be obtained over a wide
range of frequencies from a single simulation.
In addition, results obtained in the near field using the FDTD technique may be
transformed to the far field, in applications where scattering patterns are important.
More information about the FDTD method, including references, can be found in the
Physics of the FDTD Algorithm section of the reference guide.

FDTD 的用户界面
This section discusses useful features of the FDTD Solutions Graphical User Interface
(GUI).
In this topic
Graphical User Interface: Windows and
Toolbars
Add Objects to the simulation
Edit Objects
Start a new 2D/3D simulation

Graphical User Interface: Windows and Toolbars


The graphical user interface contains useful tools for editing simulations, including
• a toolbar for adding objects to the simulation
• a toolbar to edit objects
• a toolbar to run simulations
• an objects tree to show the objects which are currently included in the simulation
• a script file editor window
• an object library
• a window to set up parameter sweeps and optimizations
In the default configuration some of the Windows are hidden. To open hidden windows,
click the right mouse button anywhere on the main title bar or the toolbar to get the pop up
window shown in the screen shot below. The visible windows/toolbars have a check mark
next to their name; the hidden ones do not have check marks. A second way to obtain the
pop up window is to go to the main title toolbar and select VIEW->WINDOWS.

3
For more information about the toolbars and windows see the Layout editor section of the
reference guide.

Add Objects to the simulation


The Graphical User interface contains buttons to add objects to the simulation. Click on
the arrow next to the image to get a pull down menu which shows all the available options
in a group. The screenshot below shows what happens when we click on the arrow next to
the COMPONENTS button. Note that the picture on the button is the same as the MORE
CHOICES option in the list. If we click on the button itself (instead of the arrow) we will go
directly to the MORE CHOICES section of the object library.

4
Also notice that the picture for the COMPONENTS button will change depending on what
the last component that was added to the simulation was. Finally, the ZOOM EXTENT

button in the toolbar will resize the viewports to fit all the objects currently included in
the simulation.
Edit objects
To edit an object, select the object and press E on the keyboard or press the EDIT button

on the toolbar. The easiest way to select an object is to click on the name of the
object in the objects tree. However, objects can also be selected by clicking on the
graphical depiction of them when the SELECT button is pressed. For more information
see the Layout editor section of the reference guide.
When we edit objects in FDTD, we get an edit window. The edit windows have units for

the settings; in the GEOMETRY tab, the x, y and z location will be in μm by default. The

units can be changed to nm if we choose SETTINGS->LENGTH units in the main menu.


Fields in the edit windows act like calculators, so that equations can be entered in the
fields. See the y span field below for an example.

Start a new 2D/3D simulation


By default FDTD Solutions opens with a blank 3D simulation. In the following Getting
Started Examples, we often begin with a 2D simulation, which can be obtained as shown
in the screenshot below.

5
模拟运行与优化
This section discusses important checks which should be made before running a
simulation (memory requirements, material fits) and gives links to more information about
running simulations and parameter sweeps or optimizations.

In this topic
Check memory requirements
Check material fits
Setup parallel options
Run simulation
Run parameter sweeps and optimizations

Check memory requirements

To check the memory requirements, press the CHECK button If this is not the
current icon, you can find it by pressing the arrow. Note that the memory report indicates
the amount of memory used by each object in the simulation project as well as the total
memory requirements. This allows for judicious choice of monitor properties in large and
extensive simulations.
Check material fits

The CHECK button also contains a material explorer option . Many of the
materials used in FDTD Simulations come from experimental data (see the materials
section of the Reference Guide for references for the material data and descriptions of the
FDTD material models). Before running a simulation, FDTD Solutions automatically
generates a multi-coefficient model fit to the material data in the wavelength range for the
source. It is a good idea to check and optimize the material fit before running a simulation.
Setup the resource configuration
Before running any simulations, the resource options must be set up. These options can

be accessed by pressing the Resources button . In most cases, the default


settings should be fine. The 'number of processes' is typically set to the number of cores
in your computer.
Run simulation

You can run simulations by pressing the RUN button on the mail toolbar. For more
details, such as how to run multiple simulations in distributed mode, please see the Run

6
Simulations section in the online User Guide, or the Running simulations and analysis
section of the Reference Guide.
Run parameter sweeps and Optimizations
FDTD Solutions also has a built in parameter sweep and optimization window. This
window can be seen at the top of the page, and can be opened using the instructions in
the Graphical User Interface discussion just prior to this topic.Optimization Window
includes buttons to add a parameter sweep and add an optimization. Parameter sweeps
and optimizations can include multiple parameters, or be nested. Each optimization or
sweep can be run by pressing the right-most button.

仿真数据分析
This section discusses the tools used to analyze simulation data: the Analysis Window,
the script environment and data export to third party software such as MATLAB. For
more details please see the Analysis tools and the Scripting language chapters in the
Reference Guide.
In this topic
Analysis window
Scripting
Data export

Analysis window
The screen shot below shows the open analysis window. The analysis window can be
used to plot monitor data.

7
A variety of monitor data can be plotted via the Analysis window, depending on the
monitor type. Spatial refractive index data, field vs time, field vs frequency, fields vs spatial
dimensions, and power transmission vs frequency are a few examples. The terminology
'Intensity' indicates a squared quantity. For example, 'E intensity' means |E|^2. 'Ex
intensity' means |Ex|^2. Field data from frequency monitors is always plotted as an
Intensity. If you want to see the real or imaginary parts of the field, or if you want to obtain
phase information, the scripting language will be required.
Scripting
FDTD Solutions contains a built in scripting language which can be used to obtain
simulation data, and do plotting or post-processing of data. The script prompt can be used
to execute a few commands, or the built in script file editor can be used to create more
complex scripts.
A thorough introduction to the Lumerical scripting language can be found in the Scripting
section of the FDTD Solutions online user guide. Definitions for all of the script commands
are given in the Scripting language chapter in the Reference Guide.
Data Export
FDTD simulation data can be exported into text file format using the analysis window, into
a Lumerical data file format (*.ldf) which can be loaded into another simulation, or into a
Matlab data (*.mat) file. Instructions for exporting to these file formats can be found in the
links under the Scripting section.

银质纳米线谐振腔散射教程
问题综述
当光波入射到金属纳米粒子上时,光与金属表面附近的电荷密度相互作用产生的表面等离子
体极化 surface plasmon polaritons 扮演着重要角色。 本例研究的是一个直径为 50 nm
的银纳米线,我们来确定表面等离子体极化谐振并计算在这个谐振附近作为波长函数的吸
收、散射和消光截面积。

8
相关文件
建议读者先下载相关文件。这些文件可以从
Lumerical 的在线帮助网页上得到,也可以
在 FDTD Solutions 的安装目录里找到。这
些 fsp 文件含有设计参数和模拟运算的所有
信息,因此你可以快速地浏览,而不需要重
新输入每一个参数。 lsf 文件就是用于高级
分析的文本程序。
nanowire.fsp
plotcs.lsf,
nanowire_theory.csv

In this topic
Simulation set up
Results
Modeling instructions

See also
Online Help -> Surface Plasmons

问题综述:更多细节
散射截面积被定义为

,
这里 Pscat 是总散射功率[W],I 是入射强度[W/m2]。在二维情况下,功率通常以 [W/m] 描
inc

述,因此,散射截面积 σ 具有长度单位。把散射区的四个功率监视器的功率相加即得到总
scat

散射功率。

类似地,吸收截面积定义为

,
这里 Pabs 是由纳米线吸收的总功率。其吸收可以通过计算流入四个位于全场区的监视器的
功率来计算。
消光截面积是吸收和散射截面积的总和:

结果及讨论

9
关于建模
建模完成后就可以看到如下的图形(纳米线是模拟中心的圆形)。围绕纳米线的两个黄色框
是监示器,在两个监视器之间的灰线形成的第三个框显示 TFSF 光源的范围。
TFSF 光源是平面波,光源的传播方向 (k vector)显示为紫红色箭头而电场的偏振方向 (E
field vector)由蓝色的双箭头表示。此光源把模拟区分为两个:内部区是全场,包含入射的
平面波和粒子的散射场;外部区只计算散射场 (从光源之外的全场中减去入射的平面波)。
您可以在用户指南中光源的部分找到更多关于 TFSF 光源的介绍。
由于我们使用的光源是 TFSF 光源,纳米线的散射功率可以从流出光源外 (散射场部区)
的监视器的透射率算出。纳米线吸收功率可以通过流入四个位于全场区的监视器的功率来计
算。

在用户界面 (CAD) 中,橘黄色的线显示 FDTD 的模拟网格。 FDTD Solutions 含有两种


不同的网格区域:一个渐变网格区域 (自动网)和网格覆盖区(mesh override region)。
当使用自动网格时,网格尺寸基于折射率来决定的,折射率越高的材料需要越细的网格(网
格尺寸和折射率成反比)。当材料有复折射率时,实部和虚部都会被包括在自动网格算法里。
然而,当特征尺寸小,特别是当材料的折射率差比较大或有弧形或斜界面时, 必须使用更
小的模拟网格。这时可以使用网格覆盖区来定义网格细分。
以上的屏幕截图并没有显示整个模拟区域。虽然我们不需要在最大的黄色监示器框之外的任
何数据,模拟跨度的设置必须足够大。这是因为边界的 PML 不只会吸收入射光源,也会
吸收速失场(evanescent field)。因此,PML 应放在离结构足够远的地方才不会影响速失
场。在这个例子中,PML 边界和结构有一波长左右的距离。
在制造纳米线时使用的银(Ag)材料来源是实验数据,而不是分析模型。 FDTD Solutions
会自动利用实验折射率数据拟合宽带中的材料色散曲线。我们可以在运行模拟之前从
Material explorer 里检查材料色散模型和实验数据的拟合度。材料色散模型(图标中的
FDTD model)可以通过改变 Material explorer 里的最大系数 (Max coefficients) 和容差
(tolerance) 参数而调整。

10
我们可以从以上图中看出该材料的数据和背景折射率(1)是同一量级。同时,我们也能够
使用比 1nm 还小的网格尺寸。因此,我们可以从 mesh refinement option 里选择
“conformal variant 1“ 来充分利用共形计算的功能。请注意 “conformal variant 1“ 通常只适
合在低折射率对比的情况下使用,并不一定适合所有的金属材料(缺省的共形算法 default
conformal mesh 在当界面有金属材料和 PEC 时会还原成 staircase 算法)。请参考
Mesh refinement and Conformal mesh 的详细内容。
请注意此页第一图中的黄十字形时域监视器。时域监视器在 FDTD 模拟中通常是用来检查
场衰减现像。若电磁场没有衰减到适当程度,模拟结果可能会受影响。 FDTD Solutions 缺
省设置的模拟时间是 1000fs,而模拟会在场衰减到小于用户定义的电场强度时自动结束。
以下图中 Ex 在 32fs 自动结束之前已几乎下降到零。

仿真结果
纳米线的散射,吸收和消光截面积可以从理论上求出,我们已将解析计算的结果存在数据文
件 “nanowire_theory.csv“ 里,可以在第一页找到。
左下图显示的 FDTD Solutions 和解析计算的吸收,散射和消光截面积。很明显,它们非
常一致。右下图显示同样的 FDTD 的计算结果,但解析结果是半径为 24 和 26 纳米。因

11
为模拟计算的网格用的是 1 纳米,有理由期望的 FDTD 的结果在此范围内。正如图中所
示,事实的确如此。

从以上的图中可以看出消光截面积在波长 345nm 时是最高值。下图显示 Ey 在此波长的


强度稳态分布(以 0.5nm 网格尺寸计算)。

建模说明

此页面包含二个独立的章节。模拟可以从新的二维模拟从新建设(从模型建立章节开始),
或下载相关文件,从第二章节开始。

In this topic
Set up model
Run simulation, plot cross sections
Plot near field data

模型建立

按下 STRUCTURES 按钮上的箭头 并从下拉菜单中选择 CIRCLE。按照 下


• 面的参数来设置此圆的特性:

tab property value

12
name nanowire

Geometry x (nm) 0

y (nm) 0

radius (nm) 25

Material material Ag (Silver) - Palik (0-2um)

点击 SIMULATION 按钮 产生模拟区. 注意如果您的按钮看起来不象左边的


• 按钮,必须从按钮上的箭头中获得仿真地区。按照下面的参数来设置模拟区:

tab property value

General simulation time (fs) 200

Geometry x (nm) 0

y (nm) 0

x span (nm) 800

y span (nm) 800

Mesh Settings mesh accuracy 4

mesh refinement conformal variant


1

按下 SIMULATION 按钮上的箭头并从下拉菜单中选择 MESH OVERRIDE。按照下面的


• 参数来设置网覆盖区:

tab property value

General dx (nm) 1

dy (nm) 1

Geometry x (nm) 0

y (nm) 0

x span (nm) 110

y span (nm) 110

• 按下 SOURCES 按钮上的箭头 并从下拉菜单中选择 TFSF 光源。按照下面

13
的参数来设置光源:

tab property value

Geometry x (nm) 0

y (nm) 0

x span (nm) 100

y span (nm) 100

Frequency/Wavelength Wavelength start (nm) 300

Wavelength stop (nm) 400

按下 ANALYSIS 按钮上的箭头 并从下拉菜单中选择 OPTICAL POWER,这


• 将打开 Object Library 窗口。
加一个 SCATTERED FIELD 散射场分析组和一个 TOTAL FIELD 全场分析组。散射场
• 分析组将被命名为 "scat_2D",而全场分析组将被命名为 "total_2D"。
• 按照下面的参数来设置 "scat_2D" 分析组:

tab property value

name scat

Setup  Variables x (nm) 0

y (nm) 0

width (nm) 110

• 按照下面的参数来设置 "total_2D" 分析组:

tab property value

name total

Setup  Variables x (nm) 0

y (nm) 0

width (nm) 90

按下 MONITORS 按钮上的箭头 并从下拉菜单中选择 GLOBAL


• PROPERTIES。将 FREQUENCY POINTS 设置为 100。
按下 MONITORS 按钮上的箭头并从下拉菜单中选择 FIELD TIME。按照下面的参数来
• 设置监视器:

14
tab property value

name time

Geometry x (nm) 28

y (nm) 26

仿真运行, 截面积绘图

点击 CHECK 按钮 打开 MATERIAL EXPLORER。点击 FIT AND PLOT 按钮


• 画出折光折射率作为波长的函数的绘图。

点击 VIEW SIMULATION MESH 按钮 (和 ZOOM 按钮) 检查仿真时所用的网格


尺寸是否足够细。如需有关如何使用这些工具的信息,请参考 Layout editor section of the
• reference guide。

• 点击 RUN 按钮 运行模拟。
切换到分析 (ANALYSIS) 窗口 (请参考以下说明 Introduction section of the Getting
• Started examples)。
• 绘制时域监视器数据。按照下面的参数来设置分析窗口, 并点击 PLOT。

property value

monitor Time Monitor: ::model::time

Data to output Field vs time

Component Ex

打开文本编辑器 SCRIPT FILE EDITOR (请参考以下说明 Introduction section of the


• Getting Started examples)。
• 从第一页下载 “plotcs.lsf“ 脚本文件。

• 点击 OPEN SCRIPT 按钮 浏览并打开 "plotcs.lsf" 脚本文件。

点击 RUN SCRIPT 按钮 运行脚本文件。此文件将自动产生如下图所示的吸收、散


• 射和消光截面积。
近场绘图

• 点击 SWITCH 按钮 切换回布局模式 (layout mode)。


• 编辑网格, 设置 dx = dy = 0.5nm。

15
按下 MONITORS 按钮上的箭头并从下拉菜单中选择 FREQUENCY DOMAIN FIELD
• PROFILE。 按照下面的参数来设置监视器:

tab property value

name profile

General override global monitor check


settings

use source limits uncheck

frequency points 1

wavelength center (nm) 345

Geometry monitor type 2D Z-normal

x (nm) 0

y (nm) 0

x span (nm) 90

y span (nm) 90

• 点击 RUN 按钮运行模拟。
• 一旦模拟已运行完毕,绘制场分布: 切换到分析窗口,输入以下设置,按 PLOT。

property value

monitor Frequency Domain Power monitor: ::model::profile

Data to output Intensity vs position

Component Ey

到图中的 SETTINGS 菜单设置 colorbar limits。将 colorbar min 设置为 0, colorbar


• max 设置为 5 将绘制出和讨论和结果部分完全相同的图。

环形谐振腔教程

问题综述
本例中的环行谐振腔滤波器设计由两个高折射率波导(一个“贯通”通道和一个“下拉”通道)
和一个环形谐振腔组成。当入射波导光源经过环时,一部分的光会耦合入环中。该模式将在
环里循环, 产生电磁波干涉。由于这种干涉非常容易受波长影响,因此这是个很好的滤波器。
光在某些波长上会毫无影响的通过贯通通道,在某些波长上会被转到下拉通道。 在这个例
子中,波导和谐振腔均为 200 纳米宽,折射率为 2.915,包层折射率为 1.0。

16
我们从一个特殊的系统结构开始。首先要检查稳态的场分布以获得环形谐振腔工作原理的直
观印象,然后再进行一系列仿真计算以确定环形谐振腔的折射率是多少时谐振频率才能调谐
到 193.1THz (光通信中 C--波段的中心波长),且此波长信息被下拉 (drop)而不是全
部通过 (through) 。

相关文件
建议读者先下载相关文件。这些文件可以从
Lumerical 的在线帮助网页上得到,也可以
在 FDTD Solutions 的安装目录里找到。这
些 fsp 文件含有设计参数和模拟运算的所有
信息,因此你可以快速地浏览,而不需要重
新输入每一个参数。 lsf 文件就是用于高级
分析的文本程序。
ring.fsp

In this topic
Simulation set up
Results
2D Approximation to 3D Geometries
Modeling Instructions

See also
FDTD Solutions Online User Guide ->
Monitors and Analysis Groups -> Making a
cw movie

结果及讨论

仿真建模
FDTD Solutions 含有“模式“光源(集成模式求解器)可以使我们在感兴趣的波长上计算结
构的导模,并选择所需要的模式作光源。
在左下图中,导模的入射平面显示为垂直灰线,而传播方向显示为紫红色箭头。右下图是导
模的电场强度分布(彩色的背景显示结构的折射率)。注意模式光源的轮廓应该足够宽,不
能随意截断。由右下图所示,在注入区的边缘,模式的强度几乎为零。同样的,模拟区域周
围的 PML 吸收边界不能太接近结构,不然会截断导模。

17
当合适波长的光被耦合到环中时,它会因相加干涉而强度增加,然后耦合出下拉通道。因此,
模拟时间必须足够,以便让光通过波导 (5.45 µm) 并在环内循环大约十几次(如 14 次,

14*2*π*r = 193.52 µm),总距离约 199 µm。如果材料的折射率是 2.9,我们可以粗略得估

计 t = d / (c/n) = 199µm / (3e8 /2.9) m/s = 1920fs,因此我们将模拟时间设置为 2000 fs。


注意这比缺省模拟时间 (1000fs) 还要长,这是因为我们必须保确模拟时间足够(若电磁
场没有衰减到一定成度,模拟结果可能会受影响)。关于这个例子的进一步讨论可以在 User
Guide -> Monitors and Analysis Groups -> Simulation time and Frequency domain
monitors 里找到。
仿真结果
左下图显示下拉通道的 Ez 场。我们可以看出 13 个明显的脉冲,和以上的估计一致(由于
光源需要时间入射,我们没有 14 个完整的峰)。
右下图显示贯通通道的传输功率。在这例子里,环行谐振腔的设置已被调整到在频率 193.1
THz 时产生最高传输功率。我们可以看到在传输功率最大值周围有小型的波纹,这可以由
加长模拟时间而消除。这现象在以上建模指示中提到的网页里有详细的解说。

我们也可以绘制在不同频率上的稳态场分布。右下图是在 189.6 THz 的场强分布,所有的


光都由下拉通道穿过;左下图是在 193.1 THz 的场强分布,这是最高传输功率的频率。

18
注意传输功率和场分布是用不同的监视器得到的,传输功率是由 "frequency domain field
and power" 监视器得到; 而场分部是由 "frequency domain field profile monitor" 得到。这
两种监视器虽然非常接近(而且通常都会得到几乎相同的结果),但 power monitor 能收集较
高精度的功率流信息,而 profile monitor 能给出准确的场分布数据。

假设我们希望在 193.1 THz 频率时能让最多的功率从下拉通道穿过,可以使用参数扫描工


具来测量功率由环内圈半径改变的响应。我们要找到能在 193.1THz 提供最大下拉通道功
率的内圈半径。如下图扫描结果所示,最适合的内圈半径大约是 2.0825 微米。

近似三维几何的二维模拟
本节讨论为什么我们使用的是 2.915 的折射率。
三维模拟比二维模拟需要更多的时间和内存。在很多情况下我们可以用简单的模型来捕捉三
维特性,因此达到更高效的计算。集成光学设计人员常用的一种方式是 effective index
approximation (有效折射率)
我们在这个例子上使用的有效折射率是 2.915,这是三维的 SOI (硅厚度为 245 纳米)
结构的有效折射率近似值。在下图中,我们使用一个简单的 FDTD 模式源取得限制在 245
纳米厚的硅板中的模式(硅板在左下图中显示为红色)。由右下图所示,这模式的有效折射
率是 neff = 2.915。因此,我们将这二维环行谐振腔滤波器的折射率设置为 2.915 来模拟
厚度为 245 纳米的三维 SOI 环行谐振腔滤波器。

19
建模说明

此页面包含四个独立的章节。模拟可以从新的二维模拟从新建设(从模型建立部分开始),
或下载相关文件,从第二章节开始。最后三章节描述如何运行仿真,模拟结果绘图 (如场分
布和透射光谱),并运行参数扫描。

In this topic
Object setup
Run simulation, plot time monitor and transmission data
Plot field profile
Sweep inner ring radius

模型建立
结构

按下 STRUCTURES 按钮上的箭头 并从下拉菜单中选择 RING。按照下面


• 的参数来设置此环的特性:

tab property value

Geometry x (μm) 0

y (μm) 0

inner radius (μm) 2.1

outer radius (μm) 2.3

Material index 2.915

按下结构按钮上的箭头,并从下拉菜单中选择 RECTANGLE。按照下面的参数来设置此
• 方形的特性:

20
tab property value

Geometry x (μm) 0

y (μm) 2.6

x span (μm) 10

y span (μm) 0.2

Material index 2.915

• 挑选输入波导,点击工具栏中的 DUPLICATE 按钮 (或使用键盘上的简捷键 D)。


• 编辑粘贴的波导,将其中心 (x,y) 设为 (0, -2.6) µm,然后点击 “OK”。
FDTD 模拟区域

点击 SIMULATION 按钮 产生模拟区. 注意如果您的按钮看起来不象左边的


• 按钮,必须从按钮上的箭头中获得仿真地区。按照下面的参数来设置模拟区:

tab property value

General simulation time (fs) 2000

Geometry x (μm) 0

y (μm) 0

x span (μm) 5.45

y span (μm) 6.25

光源

按下 SOURCES 按钮上的箭头 并从下拉菜单中选择 MODE 光源,按照下面


• 的参数来设置光源。设置完成后不要关闭这窗口

tab property value

Geometry x (μm) -2.175

y (μm) 2.725

y span (μm) 3

Frequency/Wavelength Center Frequency (THz) 193.1

Frequency span (THz) 20

• 回到 GENERAL 图标,点击 SELECT MODE 按钮开始启动模式计算程序。点击

21
SELECT MODE 按钮,等待模式计算结束。注意列表中的第一个模式是有被强调,点击
选择模式按钮选取这模式。
监视器

按下 MONITORS 按钮上的箭头 并从下拉菜单中选择 GLOBAL


• PROPERTIES。将 FREQUENCY POINTS 设置为 200。
按下 MONITORS 按钮上的箭头并从下拉菜单中选择 FREQUENCY DOMAIN FIELD
• AND POWER。按照下面的参数来设置监视器:

tab property value

name power

Geometry monitor type linear y

x (μm) 0

y (μm) 0

y span (μm) 2

按下 GROUPS 按钮上的箭头 并从下拉菜单中选择 ANALYSIS GROUP。在


ANALYSIS  Variables 图标下添加一个 result "fmax", ,并在 ANALYSIS  Script 图
• 标下填入以下的脚本指令:
T = -transmission("power"); # get transmission data from power
monitor
f = getdata("power","f"); # get frequency data from power monitor
peak = findpeaks(T,3); # find the 3 peaks in the Transmission spectrum
peak0 = find(f(peak),193.1e12); # pick the peak closest to 193.1 THz
fmax = f(peak(peak0));
plot(f*1e-12,T,"f (THz)","Transmission");
按照下面的参数来设置分析组:

tab property value

name drop

Setup - Variables x (μm) -2.4

y (μm) -2.6

• 选择这两个监视器,并将其添加到分析组。用 MOVE DOWN 按钮将监视器移到在

22
OBJECT TREE 中的分析组下,并用 MOVE RIGHT 按钮将其添加到分析组。

在分析组仍在选中状态时,点击工具栏中的 DUPLICATE 按钮,将其名称设为 "through",


• 其中心 (x,y) 设为 (2.4, 2.6) µm。
按下 MONITORS 按钮上的箭头并从下拉菜单中选择 FIELD TIME。按照下面的参数来
• 设置监视器:

tab property value

name time_drop

Geometry x (μm) -2.4

y (μm) -2.6

在监视器仍在选中状态时,点击工具栏中的 DUPLICATE 按钮,将其名称设为


• "time_through", 其中心 (x,y) 设为 (2.4, 2.6) µm。
运行仿真,模拟结果绘图

• 点击 RUN 按钮 运行模拟。
切换到分析 (ANALYSIS) 窗口 (请参考以下说明 Introduction section of the Getting
• Started examples)。
• 绘制时域监视器的 Ez。按照下面的参数来设置分析窗口, 并点击 PLOT。

property value

monitor Time Monitor: ::model::time_drop

Data to output Field vs time

Component Ez

• 绘制频域监视器的透射率。按照下面的参数来设置分析窗口, 并点击 PLOT。

property value

monitor Frequency Domain Power monitor: ::model::through::power

Convert frequency to 
wavelength

Data to output x-transmission vs frequency/wavelength

场分布绘图

• 点击 SWITCH 按钮 切换回布局模式 (layout mode)。


• 按下 MONITORS 按钮上的箭头并从下拉菜单中选择 FREQUENCY DOMAIN FIELD

23
PROFILE。 按照下面的参数来设置监视器:

tab property value

name spatial

General override global monitor check


settings

use source limits uncheck

frequency points 2

minimum frequency (THz) 189.6

maximum frequency (THz) 193.1

Geometry x (μm) 0

y (μm) 0

x span (μm) 7

y span (μm) 7

• 点击 RUN 按钮再次运行模拟。
• 一旦模拟运行完毕,绘制场分布: 切换到分析窗口,输入以下设置,按 PLOT。

property value

monitor Frequency Domain Power monitor: ::model::spatial

Data to output Intensity vs position

Component E intensity

Frequency (THz) 189.6

• 移动频率滑块到 193.1 绘制第二个频率的场分布,按 PLOT。


内圈半径扫描
切换到/打开优化和参数扫描 optimization and parameter sweep 窗口 (请参考以下说明
• Introduction section of the Getting Started examples)。

• 点击 CREATE NEW PARAMETER SWEEP 按钮 。

按照下面屏幕截图的设置参数扫描,按确定(APPLY 和 OK 的功能是一样的,但不会
• 关闭此窗口申请)。

24
• 点击在优化和参数扫描窗口里的 RUN 按钮运行参数扫描。
一旦参数扫描运行完毕,切换到 SCRIPT PROMPT (请参考以下说明 Introduction
• section of the Getting Started examples)。
• 图标下填入以下的脚本指令,按 ENTER 键运行指令。
fmax = getsweepdata("sweep","fmax");
r = getsweepdata("sweep","r");
plot(r*1e6,transpose(pinch(fmax)*1e-12),"inner radius (um)","f
(THz)","Frequencies at which max power drop occurs","plot points");

光子晶体微腔教程
问题综述
本范例目的是示范如何使用 FDTD Solutions 来分析光子晶体共振腔,并得到共振频率
(resonant frequency)、品质因数(Quality factor)、共振腔的模态分布。我们学习如何找寻感
兴趣的模态以及量测品质因数 (Q 值) 后,我们将会使用 PSO (particle swarm optimization)
优化算法去找寻最大品质因素的孔洞半径。
注意:本范例图片为 FDTD Solutions Mac 版,与 Windows 和 Linux 使用接口有些微的
不同。

相关文件
建议读者先下载相关文件。这些文件可以从
Lumerical 的在线帮助网页上得到,也可以
在 FDTD Solutions 的安装目录里找到。这
些 fsp 文件含有设计参数和模拟运算的所有
信息,因此你可以快速地浏览,而不需要重
新输入每一个参数。 lsf 文件就是用于高级
分析的文本程序。

25
ppc_cavity.fsp

In this topic
Simulation set up
Simulation results
Further analysis: Symmetry
Further analysis: Optimization of inner hole
radius

See also
FDTD Solutions Online help -> Cavities and
Resonators
FDTD Solutions Online help -> Photonic
Crystals

仿真建模
共振腔结构为一 Ta2O5 平板 (折射率为 2.0995),包含排列成六角晶格之空气柱,晶格常
数 (lattice constant) 为 575 nm,空气柱半径为 194 nm,并藉由移除正中心空气柱而形成
一共振腔,最内圈空气柱半径为 100 nm,结果如下图。

当我们用 FDTD Solutions 建立此结构,首先建立一矩形平板,接着加入圆柱状结构至平


板中。在平板与圆柱重叠的位置中,为使圆柱取代平板,我们使用 mesh order 来选择圆
柱的折射率, 而不是平板的折射率。更多有关 mesh order 的细节,请参照 Reference
Guide。
两个 dipole 光源(绿色箭头代表磁场方向) 被用于激发共振模态,我们不将 dipole 置于光
子晶体结构中心是为了减少光源处在模式零点的机会。dipole 光源将入射能量注入模拟范
围,部分 dipole 辐射将被耦合至共振腔模态中并缓慢地衰减,无法耦合进入共振腔模态的
辐射将迅速地散射并离开模拟范围。

26
在 FDTD Solutions 模拟中,频域监视器 (frequency domain monitors) 采用了时域讯号
(time domain data) 的离散傅立叶转换来计算模态。显然,我们并不想要包含初始模拟的那
部分时间讯号,因为它包含无激发模态的辐射,我们只对后部分的时间讯号有兴趣,因为这
些讯号的能量保留为共振腔的模态。您可在下页 (构建说明) 看到,我们可使用监视器中的
切趾 (apodization) 功能去选择我们想要的时间讯号。更深入的讨论有关监视器
apodization 的说明可在 Online User Guide->Monitors and Analysis
Groups->Apodization 中找到。
本节将继续讨论重要的模拟设置,即边界条件设置、网格设置与模拟时间。
边界条件
上面的截图中,橙色的边界为 Perfectly Matched Layer (PML) 边界。 PML 边界吸收入射
辐射,其目的是吸收所有离开共振腔的辐射。因此,相当重要的是共振腔与 PML 边界须
维持一段距离,假使边界过于靠近共振腔,就可能吸收存在于共振腔内的非传播速失场
(non-propagating local evanescent fields)。一个简单的规则,在结构以上和以下保留至少
半个波长的距离。
接下来,请注意模拟范围下半部的蓝色阴影 (Z<0),这是因为我们在 z min 的边界上使用
了对称性边界条件,目的是减少计算时间。使用对称性边界条件的缺点在于将使某些模态无
法在结果中显现 (因为用对称性边界只能激发对称的模态)。在这个光子晶体共振腔中,有
一个通过薄板中心的对称平面(z=0),使用在这个平面上的对称性边界条件。结果将只显现
近似 TE 的模态而消除近似 TM 的模态。
注意,dipole 位于 z=0 的原因是因为这是光源理想的位置。磁偶极子在 z=0 平面有一个指
向电场,蓝色对称性边界条件是特意的,它表示,电场应该位于沿着 (平行) 此边界。在
FDTD Solutions 中,大部分的光源包含蓝色箭头(表电场方向),它应该总是要位于蓝色边
界上。
网格
为使共振腔模拟得到最好的结果,很重要的一点是在两个方向上晶格常数为网格尺寸
(mesh cell) 的整数倍。材料中的波长为 λ = c / f / n = 3e8 / 160e12 / 2.0995 = 890 nm,我
们预期 λ/10 的网格会有较可靠的精确度,而 x 方向每个周期有八个网格我们可以得到网
格大小 575nm/ 8 = 71.875nm(<λ/10)。因为 y 方向的晶格常数是 575*sin(60) nm,故 y
方向网格会小于 x 方向。如此设定,可得到较为可靠的精确度。
确认晶格常数为网格尺寸的整数倍,模拟范围 (FDTD) 也必须是晶格常数的整数倍。因此,
我们设定 FDTD 范围的 x span 为 575*12nm,y span 为 575*sin(60)*12nm。
在下图中 (亦或是你在 FDTD Solutions 中观察网格),能够看到在每一个圆柱上的网格,都
切在相同的位置上。这点相当重要,因为 FDTD 需要在每一个圆柱上切出相同的网格。假
使网格线落在不同的位置上,每一个圆柱将有细微的形状及大小不同。

27
周期结构在模拟前,比较好的方式是使用折射率监视器 (index monitor) 来确认被切成网格
的结构实际上是否呈现周期,下图折射率监视器的结果显现出每一个像是十字架的圆柱,这
是因为使用较为粗糙的网格。请注意,每一个十字架(除了六个最内圈圆柱)形状都是相同的,
假使我们想要得到一个好的结果,确认每个被切割成网格的圆柱形状是十分重要的。在下页
的模型说明中,包含了如何创建折射率监视器图的每一步详细设定步骤。

模拟时间
为了达到准确的频域资料,一般模拟需等到时域场衰减至零。不过,幸运的是,高品质因素
(High quality factor) 共振腔模拟为一例外 (High Q mode 衰减非常慢,High Q 共振腔模拟
运算需要较长的时间)。
时域分析与频域切趾 (apodization) 的结合,使我们能够不需要等到时域场完全衰减,即可
准确的计算品质因素 (quality factor) 与共振腔模态 (cavity modes),然而,使用此方法仍
需要小心,当模拟提早结束时。其他量测结果像是 power transmission 和 field amplitudes
不一定是正确的。
模拟结果

28
模拟包含 Q analysis 群组,其中包含计算共振腔模态中的共振峰值与品质因素的程序。 Q
analysis 群组中包含 time 监视器且并未放置于模拟中心,其原因是由于 dipoles 并未置
于中心。
我们可以使用分析程序在光源的频带中得到最大的两个共振峰值与品质因素。也能够轻易得
到更多共振峰值:只需修改 Q analysis→ Analysis-> Variables 中的 number_resonances
参数即可。

也可得到电场对时间函数的输出曲线 (下左图) 及共振峰值 (下右图),品质因素的计算将在


Online Help 中的 Cavities and Resonators 章节仔细讨论。

一次的模拟即可得到共振频率及对应的电场模态分布图。

29
下图为模态在 201 THz 下的 real(Ey)。

进阶分析:对称性边界条件
为了在 201 THz 拥有最大的品质因素,我们需要藉由几次的模拟来找到适合的孔洞内径。
由于模态在 x 及 y 方向具有对称性,可以使用 anti-symmetric/symmetric 边界条件设定
来减少模拟时间。
从上图中及 User Guide - Simulation 章节中的 Choosing between symmetric and
anti-symmetric BCs 讨论,我们可看见有兴趣模态的电场在 x=0 平面上具反对称性,y=0
上具对称性。
无论何时,模拟区域中心具有电磁场的对称平面通过,使用对称性边界条件将能够得到相同
的结果。下图为分别设置 x min 与 y min 为 anti-symmetric / symmetric 边界条件所得到
的结果。除了强度外与上图结果几乎相同,而造成强度改变的原因,是由于光源被镜像。因
全范围模拟仅含两个光源,而使用对称性边界条件模拟将包含有八个光源。

30
.
进阶分析:孔洞内径优化
FDTD Solutions 内建优化功能,我们选择使用 PSO (Particle Swarm Optimization) 算法,
用户也能够自定义其他算法。更多有关算法的细节,详见 Online help 中 User Guide 的
Running Simulations and Analysis -> Optimization。
在这个例子中,我们试着使用六种光子晶体共振腔内径来优化品质因素,下图可见优化后的
半径结果为 91.9 nm

建模说明

31
本页包含四个独立章节。第一个章节描述设置共振腔结构与 FDTD 模拟区域,第二个章节
描述光源与监视器设置以及初始分析设置,第三个章节提供使用对称性边界条件进一步的资
讯,第四个章节描述如何使用 FDTD Solutions 优化功能。

In this topic
Create PC and check material index
Add sources and monitors. Run simulation and get data.
Symmetry
Optimize inner hole radius

创建光子晶体与验证材料折射率

点击 STRUCTURES 箭头 接着选择下拉选单中的 RECTANGLE,根据下


• 表设置形状特性。

tab property value

Geometry x (μm) 0

y (μm) 0

z (μm) 0

x span (μm) 10

y span (μm) 10

z span (μm) 1

Material index 2.0995

点击 COMPONENTS 箭头 并自下拉选单中选择 PHOTONIC


• CRYSTALS,这将开启物件资料视窗。
• 自清单中选择 HEXAGONAL LATTICE PC CAVITY 并点选 INSERT。
• 根据下表设置光子晶体共振腔特性。

tab property value

Setup  Variables x (μm) 0

y (μm) 0

z (μm) 0

material etch

32
H_number 2

h (μm) 1

side_length (μm) 5*.575

a (μm) .575

r (μm) .194

• 点击 DUPLICATE 来复制一组六角晶格的光子晶体共振腔,并根据下表编辑特性。

tab property value

name inner

Setup  Variables x (μm) 0

y (μm) 0

z (μm) 0

H_number 1

side_length (μm) .575

r (μm) .100

点击 SIMULATION 来新增仿真区域。注意假使你的按钮与左图不同,你将
• 需要点选箭头自下拉选单中点击真正的按钮。并根据下表设置特性。

tab property value

General simulation time (fs) 1500

Geometry x (μm) 0

y (μm) 0

z (μm) 0

x span (μm) 12 * .575

y span (μm) 12 * .575 * sqrt(3) / 2

z span (μm) 3

Boundary conditions z min bc Symmetric

Advanced options force symmetric x mesh check

33
force symmetric y mesh check

force symmetric z mesh check

注意:使用强制 x 网格对称 (force symmetric x mesh) 可确保网格线位在 x=0,因而当我


们改变 x min 边界条件自 PML 到 symmetric 或 anti-symmetric 时,网格将不受影响。
严格的来说,在这个例子中我们并不需要这个选项,因在此范例中,我们已经设置好了网格
参数,故网格线将总是位于 x=0。
点击 SIMULATION 钮的箭头并选择下拉选单中的 MESH OVERRIDE。并根据下表设置
• 特性。

tab property value

General dx (μm) .575 / 8

dy (μm) .575 * sqrt(3) / 2 / 8

override z mesh uncheck

Geometry x (μm) 0

y (μm) 0

z (μm) 0

x span (μm) 10

y span (μm) 10

z span (μm) 1

点击 MONITORS 箭头 并选择下拉选单中的 INDEX 监视器。根据下表设置特


• 性。

tab property value

name index

Geometry x (μm) 0

y (μm) 0

x span (μm) 10

y span (μm) 10

取得 INDEX 监视器资料:注意这项动作需要运行模拟 - INDEX 监视器资料的取得须在


• 网格划分期间,我们仅需开始运行模拟,并在网格划分完成后即可结束:

34
点击 RUN 钮 ,即跳出进程视窗并开始进行初始化及网格划分,不久后初始化及
• 网格划分完成,你将能够在进程视窗(如下图)中点选 EXIT 钮来停止运行模拟。

进程视窗将显示 “The simulation will be saved at its current state, which is not
completed. Do you really want to exit?” 请点选 YES,即使模拟尚未完成,但此时 INDEX
• 监视器资料已在初始化及网格划分的过程中取得。
切换到分析 (ANALYSIS) 窗口 (请参考以下说明 Introduction section of the Getting
• Started examples)。
在本范例的结果与讨论章节中 (上页),绘出 INDEX 监视器资料:在分析视窗中 (analysis
• window) 输入下表设定与点选 PLOT。

property value

monitor Index Monitor: ::model::index

Data to output Value vs position (x,y)

Component n_x

• 点击 SWITCH TO LAYOUT 钮 切换回编辑模式,继续以下的模拟设定。


加入光源及监视器,运行模拟及取得资料
加入光源和 Q 值分析对象(Q analysis)

点击 SOURCES 钮 的箭头及自下拉选单中选择 DIPOLE 光源。根据下表设


• 置特性。

tab property value

name dipole1

General dipole type Magnetic

35
dipole

Geometry x (μm) .1

y (μm) .2

Frequency/Wavelength frequency start (THz) 160

frequency stop (THz) 250

当 DIPOLE 依然被选取的状态下点选工具栏上的 DUPLICATE 钮 (或是使用键盘


• 上的快捷键 D),设定其名称为 dipole2 并将 x 位置设为 0.3 microns。

点击 ANALYSIS 钮 箭头与自下拉选单中选择 RESONATORS,这将开启物


• 件资料库 (Object Library) 视窗。
• 插入 Q ANALYSIS 群组,设置监视器位置为 x = 0.4 μm, y = 0.2 μm, z = 0μm。
模拟运行与取得资料:得到 Q analysis 资料

首次设置平行计算选项。请点击 RUN 钮 箭头,并自下拉选单中选择 RUN


PARALLEL FDTD。更多有关平行计算设置的资讯请见 Introduction section of the
• Getting Started exampless。
切换至物件树视窗 Objects Tree (详细说明可见 Introduction section of the Getting
• Started examples)。
取得共振腔 Q 值:编辑 Q analysis 群组,进入 Analysis -> Script window,点选 RUN
• ANALYSIS 钮运行程序。
加入 profile 监视器(现在已知此结构的共振频率)

点击 MONITORS 钮 ,并自下拉选单中选择 FREQUENCY DOMAIN FIELD


• PROFILE 监视器,根据下表设置特性。

tab property value

name profile

General override global monitor check


settings

use source limits uncheck

frequency points 2

minimum frequency (THz) 201

36
maximum frequency (THz) 209.5

Geometry x (μm) 0

y (μm) 0

x span (μm) 10

y span (μm) 10

Spectral averaging and apodization Full


apodization

apodization center (fs) 1000

apodization time width (fs) 250

运行模拟与取得资料:取得 profile 监视器资料

• 请点击 RUN 钮 箭头,并自下拉选单中选择 RUN PARALLEL FDTD。


使用分析视窗绘出电场强度:切换至分析视窗与设置下表参数,移动频率滑杆至想要画出
• 的电场频率,点击 ENTER。

property value

monitor Frequency Domain Profile Monitor: ::model::profile

Data to output Intensity vs position (x,y)

Component E intensity

使用 script prompt 绘出 real(Ey):开启 script prompt (详细说明可见 Introduction


section of the Getting Started examples),输入下表指令至 script prompt 中并点选
• ENTER 执行每一行指令绘图。
Ey = getdata("profile","Ey");
x = getdata("profile","x");
y = getdata("profile","y");
Ey = pinch(Ey,4,1);
image(x*1e-6,y*1e-6,real(Ey),"x (microns)","y
(microns)","real(Ey)");
注意:Ey field 的强度可在分析视窗中绘出;但想绘出 Ey field 的实部必须使用程序语言。
对称

• 点击 SWITCH TO LAYOUT 钮 。

37
编辑 FDTD 模拟范围,在 BOUNDARY CONDITIONS 标签,设置 x min bc 为
• Anti-Symmetric、y min bc 为 Symmetric。
• 点击 RUN FDTD 钮再次运行模拟。
• 使用 script prompt 绘出 real(Ey):有关如何执行请参照先前灰色方框中的指令。
更多有关对称性边界的设置,请见 Online help - User guide - Simulation - Symmetry
boundaries page。
优化孔洞内径
• 在 Q analysis 群组中设置下面变数:

tab property value

Setup  Variables make_plots 0

number_resonances 1

• 切换至(开启) optimization and parameter sweep 视窗

点击 CREATE NEW OPTIMIZATION 钮 ,参照下图作优化设置。注意:这些设置

将运行 200 次模拟 (Maximum Generations*Generation size = 20*10 = 200),您可以减


• 少 Maximum Generation Size 来减少模拟次数,并得到更快速的优化。

38

You might also like