Professional Documents
Culture Documents
Release 2016b
Contents 1
Table of Contents
Part I Knowledge Base 15
Part II Installation Manual 16
1 Windows Installation ............................................................................................................ 17
FDTD Solutions Install Instructions
................................................................................................................................................. 17
MODE Solutions Install Instructions
................................................................................................................................................. 22
DEVICE Install Instructions ................................................................................................................................................. 26
INTERCONNECT Install Instructions
................................................................................................................................................. 30
Running jobs on other com puters
.................................................................................................................................................
in your local netw ork 34
2 Linux Installation ............................................................................................................ 35
FDTD Solutions Install Instructions
................................................................................................................................................. 36
MODE Solutions Install Instructions
................................................................................................................................................. 39
DEVICE Install Instructions ................................................................................................................................................. 42
INTERCONNECT Install Instructions
................................................................................................................................................. 46
Configure engine ................................................................................................................................................. 49
Cluster setup ................................................................................................................................................. 50
Running sim ulations ................................................................................................................................................. 52
3 Mac Installation ............................................................................................................ 58
FDTD Solutions Install Instructions
................................................................................................................................................. 58
MODE Solutions Install Instructions
................................................................................................................................................. 62
DEVICE Install Instructions ................................................................................................................................................. 65
INTERCONNECT Install Instructions
................................................................................................................................................. 69
Configure engine ................................................................................................................................................. 72
4 Product Licensing ............................................................................................................ 73
Node Trusted Storage ................................................................................................................................................. 74
Node MAC Locked ................................................................................................................................................. 82
Node USB key ................................................................................................................................................. 83
Floating Trusted Storage ................................................................................................................................................. 85
Floating MAC Locked ................................................................................................................................................. 88
Floating USB key ................................................................................................................................................. 91
Floating Triad Redundant ................................................................................................................................................. 95
Part III Solvers 101
1 Optical solvers ............................................................................................................ 103
FDTD ................................................................................................................................................. 103
varFDTD ................................................................................................................................................. 107
FDE ................................................................................................................................................. 109
EME ................................................................................................................................................. 114
Units and norm alization ................................................................................................................................................. 116
2 Optical toolbox ............................................................................................................ 126
Near to far field projections ................................................................................................................................................. 126
Grating projections ................................................................................................................................................. 150
Eigenm ode propagate script .................................................................................................................................................
com m and 156
Multilayer stack RT calculator................................................................................................................................................. 156
3 DEVICE solvers ............................................................................................................ 157
CHARGE ................................................................................................................................................. 157
HEAT ................................................................................................................................................. 163
4 Schematic solvers ............................................................................................................ 166
DDF ................................................................................................................................................. 166
SDA ................................................................................................................................................. 168
Part IV Getting Started 171
Part V Component Tools Reference Guide 172
1 New Features ............................................................................................................ 172
New features in 2016b ................................................................................................................................................. 172
New features in 2016a ................................................................................................................................................. 173
New features in 2015b ................................................................................................................................................. 176
New features in 2015a ................................................................................................................................................. 176
New features in 2014a ................................................................................................................................................. 177
1 Knowledge Base
Welcome to the Lumerical Solutions Knowledge Base for release 2016b
You may browse the online Knowledge Base via the Table of Contents or use the search to find specific pages. The
Previous and Next buttons located at the upper and lower right can also be used to navigate through the pages.
New users: We recommend working through a couple of Getting Started 171 Tutorials. You can also watch the
introductory product videos on the Video page.
Lumerical recommends that users always upgrade to the latest product version (currently release 2016b) to gain
access to all new features and bug fixes. Customers with a current license are always entitled to upgrade to the
latest version at no additional cost. For users that are not ready to upgrade, an older snapshot of the Knowledge
Base can be found at 2015b Knowledge Base.
We recommend using this online Knowledge Base to access the most up-to-date documentation. However, a PDF
copy of the Knowledge Base is available for customers working without an internet connection. Please note that
example files and movies are not available in the PDF; such files must be accessed via the online Knowledge base.
Download: Knowledge_Base.pdf
2 Installation Manual
Please select the appropriate section
FDTD Solutions 17
MODE Solutions 22
INTERCONNECT 30
DEVICE 26
Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.
Installation Procedure
1. Download the FDTD Solutions installation package
View details
FLOATING LICENSE:
5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
Online vs Offline activation
Two license activation modes are available: Online Mode and Offline Mode.
Online activation is generally faster and easier, so this is the recommended method for all users.
Offline activation is a backup solution for customers who are unable to activate license through the internet.
License activation will be done by sending a "request XML file" to Lumerical Support, and a "response XML file"
will be provided. For more information, see the Offline Activation page.
Please note: Offline mode activation is only available for customers. Trial / evaluation licenses must be
activated using online mode.
Save your activation code
Please keep your Activation Code for your records. If you need to change your license server, you can "de-
activate" the license and re-use the Activation Code on the new server.
Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.
Installation Procedure
1. Download the MODE Solutions installation package
View details
Download the installation package from the Download
Center (registration required)
FLOATING LICENSE:
5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
Online vs Offline activation
Two license activation modes are available: Online Mode and Offline Mode.
Online activation is generally faster and easier, so this is the recommended method for all users.
Offline activation is a backup solution for customers who are unable to activate license through the internet.
License activation will be done by sending a "request XML file" to Lumerical Support, and a "response XML file"
will be provided. For more information, see the Offline Activation page.
Please note: Offline mode activation is only available for customers. Trial / evaluation licenses must be
activated using online mode.
Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.
Installation Procedure
1. Download the DEVICE installation package
View details
Download the installation package from the Download
Center (registration required)
FLOATING LICENSE:
5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Purchased licenses can be either Node Lock or Floating. For Floating licenses,
the Flexnet License Manager must be installed on one computer on your network.
See the detailed instructions below.
Installation Procedure
1. Download the INTERCONNECT installation package
View details
FLOATING LICENSE:
5.Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
Concurrent computing refers to running multiple simultaneous simulations, usually on different computers.
Distributed computing refers to running a single simulation using multiple cores/processors/workstations, giving
access to a greater total amount of memory and reducing computation time. Additional information and requirements
can be found on the Resource configuration utility 213 page. For example, all computers must run the same
operating system.
1. Ensure you have the same username and password on all machines
You must have the same credentials (username and password) on all machines. Your account must have a
password.
Network drives are often setup in office networks, but you can create your own file share by using the Windows
Explorer to navigate to a folder, then right click on the folder and select the "sharing and security" or "sharing" option
(depending on the version of Windows you are using). For more information on creating a shared folder, see your
Windows operating system documentation.
FDTD Solutions 36
MODE Solutions 39
INTERCONNECT 46
DEVICE 42
The following section describes the standard installation process for FDTD Solutions. In order to use the software,
you will need at least two install packages: The Lumerical FlexNet License Manager and FDTD Solutions.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for FDTD Solutions. This can be done on multiple computers.
If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm
Follow the steps and instructions on the script to complete the installation.
Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.
9. Next steps
View details
Optionally, add FDTD Solutions to your system path
Adding FDTD to the system path allows you to start FDTD Solutions simply by typing fdtd-solutions at the
prompt, without having to specify the full path.
sh /opt/lumerical/fdtd/bin/fdtd-config.sh
This script will add the install directory of FDTD Solutions to your system path and add an icon on your desktop.
After running the script, you can start FDTD Solutions by typing fdtd-solutions.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
The following section describes the standard installation process for MODE Solutions. In order to use our software,
you will need at least two install packages: The Lumerical FlexNet License Manager and MODE Solutions.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for MODE Solutions. This can be done on multiple computers.
If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm
Follow the steps and instructions on the script to complete the installation.
Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.
View details
This can be done from your terminal by using the
following command
/opt/lumerical/mode/bin/mode-solutions&
9. Next steps
View details
Optionally, add MODE Solutions to your system path
Adding MODE to the system path allows you to start MODE Solutions simply by typing mode-solutions at the
prompt, without having to specify the full path.
sh /opt/lumerical/mode/bin/mode-config.sh
This script will add the install directory of MODE Solutions to your system path and add an icon on your desktop.
After running the script, you can start MODE Solutions by typing mode-solutions.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
The following section describes the standard installation process for DEVICE. In order to use our software, you
would need at least two install packages: The Lumerical FlexNet License Manager and DEVICE.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
page.
Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for DEVICE. This can be done on multiple computers.
If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm
Upon successful download, unpack both installation packages with the following command:
tar -zxf <name of downloaded file>
Follow the steps and instructions on the script to complete the installation.
Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.
4. Re-launch DEVICE
9. Next steps
View details
Optionally, add DEVICE to your system path
Adding DEVICE to the system path allows you to start DEVICE simply by typing device at the prompt, without
having to specify the full path.
sh /opt/lumerical/device/bin/device-config.sh
This script will add the install directory of DEVICE to your system path and add an icon on your desktop. After
running the script, you can start DEVICE by typing device.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
The following section describes the standard installation process for INTERCONNECT. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and INTERCONNECT.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
Installation Procedure
Steps 1-4 outline the installation procedure for Lumerical FlexNet License Manager. This must be done on one
computer.
Steps 5-8 outline the installation procedure for INTERCONNECT. This can be done on multiple computers.
If you don't have yum installed, you can use the following:
sudo rpm -ivh lumerical-flexlm-<version>.i386.rpm
Follow the steps and instructions on the script to complete the installation.
Note: The install.sh script will remove any old versions. If you want to install multiple versions, you should
not use the install script. Instead, manually install the RPM.
2. On the "Server" box, enter the host name or the IP address of your license
server.
4. Re-launch INTERCONNECT
9. Next steps
View details
Optionally, add INTERCONNECT to your system path
Adding INTERCONNECT to the system path allows you to start INTERCONNECT simply by typing interconnect
at the prompt, without having to specify the full path.
sh /opt/lumerical/interconnect/bin/interconnect-config.sh
This script will add the install directory of INTERCONNECT to your system path and add an icon on your desktop.
After running the script, you can start INTERCONNECT by typing interconnect.
Getting started examples
Work through one of the introductory getting started 171 examples.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
This page describes how to configure the simulation engine so you can run jobs on computers within your local area
network. The FDTD Solutions and/or MODE Solutions must be installed on each computer, as described in the
main Installation instructions 36 section, before you attempt to configure the engine.
Concurrent computing refers to running multiple simultaneous simulations, usually on different computers.
Distributed computing refers to running a single simulation using multiple cores/processors/workstations, giving
access to a greater total amount of memory and reducing computation time.
3. Configure your compute nodes to allow remote login without a password, as the version of MPICH2 included with
the installation package uses ssh to start remote jobs. If this is not setup, the user will have to type their password
many times. On your primary computer, enter the following commands to create a set of ssh keys.
ssh-keygen -t rsa
Press enter several times to accept all the defaults and an empty passphrase. This creates your public/private keys
and saves them in your home directory under the $HOME/.ssh folder. Next you must place your public key in the
text file $HOME/.ssh/authorized_keys on each compute node. This can be accomplished using the following
commands for each compute node:
ssh <node name> "mkdir -p ~/.ssh; chmod 700 ~/.ssh"
cat ~/.ssh/id_rsa.pub | ssh <node name> "cat - >> ~/.ssh/authorized_keys"
ssh <node name> "chmod 600 ~/.ssh/authorized_keys"
Note that if your home directory is on a network file system and is the same directory for all compute nodes, then
you will only have to run the above command one time. Once you have completed this step, you should be able to
login to any of the compute nodes using the ssh <node name> command without entering a password.
4. Check resources
1. Open the Lumerical software (only for FDTD and MODE
Solutions)
2. Open the Resource configuration utility 213 , (in the
Simulation -> Configure resources menu)
MODE Solutions Only: Notice that Resources are
configured on a per-Solver basis (one solver per tab)
3. Add additional resources to the list (Optional)
4. Edit the resource properties if necessary
5. Use the Run tests button to confirm the resources are
setup properly
To install Lumerical software on a computer cluster or network of workstations, follow these instructions. On a
computer cluster, the computers are generally referred to as compute nodes rather than workstations. Often one or
more computers in a cluster are designated as management nodes and are reserved for launching jobs and/or
storing data files. For the purpose of these instructions, we will use the terminology of compute nodes and
management nodes.
1. Install software
Install the product on each node of your cluster (or group of workstations) as described in the main installation 35
section.
On many Linux clusters each user's home directory is a network file system and is common to all nodes. If this is
the case you may use your home directory to store your fsp files for parallel simulation. Otherwise, you can create a
network file share on your management node. For more information on creating a network file systems, see your
Linux operating system documentation.
For a complete list of MPI and engine versions, see the Run solver with MPI page.
Your compute nodes must be configure to allow remote login to all other compute nodes without a password. This
will allow jobs to start without the user having to type a password for each compute node. By default, the version of
MPICH2 that is included will use the ssh command to start remote jobs. The ssh command can be configured to
use public keys instead of passwords for login. To set this up, run the following command on the management node
where you plan to launch your jobs:
ssh-keygen -t rsa
Press enter several times to accept all the defaults and an empty passphrase. This creates your public/private keys
and saves them in your home directory under the $HOME/.ssh folder. Next you must place your public key in the
text file $HOME/.ssh/authorized_keys on each compute node. This can be accomplished using the following
commands for each compute node in your cluster:
Note that if your home directory is on a network file system and is the same directory for all compute nodes, then
you will only have to run the above command one time for one of the nodes. Once you have completed this step, you
should be able to login to any of the compute nodes using the ssh <node name> command without entering a
password.
Using a remote shell other than ssh
If you are using the MPICH MPI environment all you have to do is set the environment variable
P4_RSHCOMMAND to rsh on your cluster nodes. If you only launch jobs from specific management nodes, you
only have to set this variable on those machines.
The option -n specifies the number of processes to use in the computation. You may change the number 4 to match
the number of compute nodes or processors in your system. There are also other advanced options for mpiexec/
mpirun that can be listed with the command mpiexec -h. You should try to run CPI with the same arguments that
will be used to run the actual simulation engine.
Copy the file installDir/examples/paralleltest.lms to your working directory. The command required to run the
simulation should be similar to what was required for the cpi test.
installDir/mpich2/nemesis/bin/mpiexec -n 4 installDir/bin/varfdtd-engine-mpich2nem parall
You can also try running the eigensolver engine, although it doesn't make use of MPI
installDir/bin/fd-engine paralleltest.lms
In this section we will explain how to configure your system to launch jobs in two common ways:
From the Graphical User Interface (GUI) using the Run button, script commands and the optimization and
parameter sweep windows.
The list below explains how to configure your system, depending on your hardware and how you intend to launch
simulation:
1. Launch simulations from the GUI using your local workstation for the simulations.
It's likely that this will work after installation immediately without further configuration. Please see Resource
configuration in the User Guide if you want to change the default number of cores used for each simulation.
2. Launch simulations from the GUI using several computers on your LAN or on a cluster without a
scheduler.
This may take some configuration initially. Please see Configure engine 49 for the necessary steps and then
Resource configuration in the User Guide.
For FDTD Solutions, the complete command to start the simulation engine in parallel using MPI is quite lengthy
and complex. The fdtd-run-local.sh shell file automatically generates the complete command, making it
much easier to start simulations from the command line. If you want to use non-default MPI options, you can edit
this file as needed. To run a simulation with this shell file, use
/opt/lumerical/fdtd/bin/fdtd-run-local.sh -n 8 file1.fsp
to run the file using 8 cores. If the bin directory is in your path, the command can be shorted to
fdtd-run-local.sh -n 8 file1.fsp
You can also use this command to run multiple fsp files. For example
fdtd-run-local.sh -n 8 file1.fsp file2.fsp
will run both files sequentially using 8 cores and
fdtd-run-local.sh -n 8 *.fsp
will run all the simulation files in the current directory.
For MODE Solutions, the command required to run a varfdtd (progator) simulation will be something like this:
installDir/mpich2/nemesis/bin/mpiexec -n 4 installDir/bin/varfdtd-engine-mpich2nem parall
To run fd-engine (eigensolver), the command will be something like:
installDir/bin/fd-engine paralleltest.lms
Please note that the remainder of this page contains instructions for FDTD Solutions only.
The template of submission scripts composed of 3 parts for easier customization and reuse
/opt/lumerical/fdtd/bin/fdtd-run-pbs.sh: The master script file used to submit your simulations to
the scheduler. It takes fsp files as arguments, produces the submission script and runs the qsub command. It is
documented with comments in case it needs to be customized. If you modify this file, we recommend that you
make a copy of it under a different name, such as fdtd-run.sh so that your changes will not be overwritten when
you upgrade the software.
/opt/lumerical/fdtd/bin/fdtd-process-template.sh: this script is reference by fdtd-run-
pbs.sh but should not have to be modified.
/opt/lumerical/fdtd/templates/fdtd-pbs-template.sh: This is the template script that is used to
create a job submission script for your scheduler. it must be configured once to ensure that we create the correct
submission script as required by your System Administrator. When modifying this file, we recommend that you
make a copy of this file (to avoid overwriting when you upgrade the software). You will also then need to modify the
TEMPLATE variable in fdtd-run-pbs.sh script to specify the correct template file.
Once configured, you can submit jobs to the scheduler with a command like
sh ./fdtd-run-pbs.sh [-n <procs>] fsp1 [fsp2 ... [fspN]]
For example, to submit all the fsp files in a directory to the scheduler, asking for 8 processes per simulation, you
can use
sh ./fdtd-run-pbs.sh *.fsp
First, it is important to be sure that you can correctly submit jobs to the scheduler form the command line using
step 4. Once that is working, there are 2 additional steps
Modify your fdtd-pbs-template.sh template or fdtd-pbs-run.sh script so that it will wait after
submission of the job until the job is completed. Some schedulers have a simple blocking options, such as the -K
option with lsf, or the "-W block=true" option with some versions of qsub. If there is not a simple blocking option
for your scheduler, please contact Lumerical support for assistance.
Configure your resources as shown in the screenshots below. Please note that you will likely not get any
information about the job progress in the job manager. It will simply indicate 0% complete until the job is finished.
To see job progress, you will have to monitor the log files. Furthermore, you should not try to pause or terminate
jobs. Job cancellation or deletion should be done as directed by your System Administrator to correctly terminate
jobs that have been submitted to a scheduler.
Add a new Cluster resource. Don't worry about the number of Processes listed or the IP/Hostname.
Edit the advanced options and set it up as below. Please note that we use -n 16 to use 16 processes per simulation.
You can change this as desired.
It is likely that your Job Manager window will not display any progress at all until the job is 100% complete. To try
and make it update progress, you can try adding the -remote flag to the fdtd-engine. However, you may only see
something like the screenshot below. Please look at the log file from the job to monitor progress. Please do not try
to use the Quit buttons, but cancel your jobs if necessary as directed by your System Administrator.
Once everything is working, duplicate your cluster resource as many times as you have licenses on your cluster.
Your Resource Configuration Window might look like the following if you want to run 10 concurrent simulations on
your cluster.
This is not an officially supported feature of FDTD Solutions, but it is possible to launch simulation on a Linux
machine from Windows. The fsp file must be saved in a network folder that can be read and written by both the
Windows and the Linux machine. Also, there must be no spaces in the path or file name. The steps are:
a. Download and install an ssh client for Windows such as PuTTY.
b. Ensure that you can login using ssh from Windows without having to type a password. For example, using
PuTTY, you can generate a set of public/private keys. The public key must be placed in the your home the text
file $HOME/.ssh/authorized_keys on the Linux machine.
c. Create and save a session with PuTTY. For example, if you are connecting to a Linux machine called wkst1,
you can create a PuTTY session called grouse.lcs.local.
d. Add a resource and configure the basic and advanced options as shown below. Note that the IP/Hostname is
only listed as PuTTY as a reminder and the number of processes specified is only a reminder. The key part of
the setup is done in the Resource advanced options windows. Please verify carefully that the Command
to execute displayed at the bottom of the window is correct, and note that the number of processors to be
used is actually controlled with the option -n 4 (for 4 processes) in the Extra FDTD command line
options field.
e. Save the file fdtd_launch_from_windows.sh in /opt/lumerical/fdtd/bin and ensure that it is executable with the
command:
sudo chmod 755 /opt/lumerical/fdtd/bin/fdtd_launch_from_windows.sh
f. Modify the lines in fdtd_launch_from_windows.sh that translate the Windows PATH to the Linux PATH. For
example, if you have access a file in Windows from \\solar.lcs.local\support\Temp and on Linux
from /home/USERNAME, then you need could modify the lines to be
# replace the file path
FSPFILE=$(echo $FSPFILE | sed 's_//solar.lcs.local/support/Temp_/home/USERNAME_')
Please note that both the Windows and the Linux path should be specified with only forward slashes ('/') because
the lines immediately before this in the script automatically convert all backslashes ('\') to forward slashes ('/').
Tips: You can also use echo to see on how your command is being interpreted by the command line. For e.g.:
echo \\123.123.123.123\fdtd\file.fsp
g. Test the setup. We recommend first trying to use the file fdtd_launch_from_windows.sh directly from
Linux while typing a Windows style path to the fsp file. Next, please try running a simple fsp file. Once running
you should get a progress update for your simulations, and you can right click on the job to display additional job
information, as shown in the windows below.
Note: The "Run tests" button in the resource configuration utility can not be used to test if the system is configured
properly. The test will always fail with this configuration, even if everything is configured properly and the simulation
will actually run.
FDTD Solutions 58
MODE Solutions 62
INTERCONNECT 69
DEVICE 65
The following section describes the standard installation process for FDTD Solutions. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and FDTD Solutions.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.
LICENSE MANAGER INSTALLATION
Installation Procedure
1. Download the Installation Packages of FDTD Solutions
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)
FLOATING LICENSE:
4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of FDTD Solutions Graphical User Interface window is open on the MAC computer
4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
The following section describes the standard installation process for MODE Solutions. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and MODE Solutions.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.
LICENSE MANAGER INSTALLATION
Installation Procedure
1. Download the Installation Packages of MODE Solutions
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)
FLOATING LICENSE:
4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of MODE Solutions Graphical User Interface window is open on the MAC computer
4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
The following section describes the standard installation process for DEVICE. In order to use our software, you
would need at least two install packages: The Lumerical FlexNet License Manager and DEVICE.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.
Installation Procedure
1. Download the Installation Packages of DEVICE
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)
FLOATING LICENSE:
4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of DEVICE Graphical User Interface window is open on the MAC computer
4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
The following section describes the standard installation process for INTERCONNECT. In order to use our software,
you would need at least two install packages: The Lumerical FlexNet License Manager and INTERCONNECT.
Lumerical provides a floating license; which means that the license can be shared between multiple machines in the
same broadcast domain or subnet.
Please ensure that you have an Administrator privilege before continuing with the install process.
Purchased licenses may be either node-locked or floating. For node-locked licenses, please continue to
Installation Procedure step 1.
LICENSE MANAGER INSTALLATION
Installation Procedure
1. Download the Installation Packages of INTERCONNECT
View details
The installation packages are available
from Lumerical Download Center page
(registration is required)
FLOATING LICENSE:
4. Next steps
View details
Getting started examples
Work through one of the introductory getting started 171 examples.
Opening multiple Graphical Interface instances
MAC OS X, by defaults, only allows the user to open one instance of the application at the same time. However,
using a command line workaround, it is possible to open multiple Graphical User Interface with a single license.
To do this:
1. Please ensure that none of INTERCONNECT Graphical User Interface window is open on the MAC computer
4. You can repeat step #3 as many times as required, but please note that you should only do this on a single
terminal. Running the command on the 2nd terminal, would use a 2nd license.
More product licensing information
See the Product Licensing 73 chapter.
Advanced setup and configuration
See the Setup and Configuration section for information on advanced configuration of Lumerical's software.
Running simulations
See the Running Simulations section for information on running simulations, including from the command line.
In order to run any simulation, the engine must be configured. This page describes how to configure the parallel
simulation engine to run on the local computer, and to send jobs to other computers in the local area network. The
product must be installed on each computer, as described in the main Installation instructions 58 section, before
you attempt to configure the engine.
Distributed computing refers to running a single simulation using multiple processors/cores/workstations, giving
access to a greater total amount of memory and reducing computation time. Concurrent computing refers to running
multiple simultaneous simulations on different machines.
2. Configure your computers to allow remote login without a password. This will allow simulations to start without the
user having to type a password for each computer. By default, the version of MPI that is included with the installation
package will use ssh to start remote jobs. The ssh command can be configured to use public keys instead of
passwords for login. To set this up, run the following command on the management node where you plan to launch
your jobs:
ssh-keygen -t rsa
Press enter several times to accept all the defaults and an empty passphrase. This creates your public/private keys
and saves them in your home directory under the $HOME/.ssh folder. Next you must place your public key in the
text file $HOME/.ssh/authorized_keys on each compute node. This can be accomplished using the following
commands for each compute node in your cluster:
Note that if your home directory is on a network file system and is the same directory for all compute nodes, then
you will only have to run the above command one time for one of the nodes. Once you have completed this step, you
should be able to login to any of the compute nodes using the ssh <node name> command without entering a
password.
3. Check resources
1. Open MODE Solutions
2. Open the Resource configuration utility 213 , (in
the Simulation -> Configure resources menu)
MODE Solutions Only: Notice that Resources are
configured on a per-Solver basis (one solver per tab)
3. Add additional resources to the list (Optional)
4. Edit the resource properties if necessary
5. Use the Run tests button to confirm the
resources are setup properly
This completes the configuration for a single workstation and for distributing tasks to multiple computers on a local
area network.
Floating
Floating Trusted Floating MAC Locked Floating USB key 91 Floating Triad
Storage 85 88 Redundant 95
* Default license model
For more information on advanced configuration of your Lumerical product licenses, see the Advanced configuration
section.
Notes
This license can not be accessed by other networked workstations.
This license can only be used by a single user at a time.
This is the default license model for product trials and training courses.
Does not offer a Dashboard to show the availability of licenses.
Not available for Linux operating systems.
Launching the product immediately after successful installation will bring up a message prompt similar to the
following. Clicking the 'Yes' button will launch the the product configuration utility.
3. Enter the eight-character activation code (including hyphen " - ") from the license notification email received.
4. Click the Activate button. The utility will authenticate the license with the activation server. This may take
several minutes, depending on the network connection, during which time the utility may appear inactive.
Optional: Once completed, click on the Licenses tab to verify the license activated successfully. For more
information on the license status, please see Trusted Storage Activation Status.
Once you have configured your license, you should be able to start using the software.
Activating your license (offline)
Note: This feature is not available for free licenses (product evaluations,
training courses, etc), which must use the online activation method above.
Activating a node locked license is processed using the product license configuration utility. Launching the
product after successful installation will bring up a message prompt similar to that below. Clicking the 'Yes'
button will load the the product configuration utility:
4. Enter the eight-character activation code (including hyphen " - ") from the license notification email received.
Clicking the Activate button will bring up the save file window. Save the XML file to an accessible location
as the file will need to be attached and sent to Lumerical for processing.
5. Send the request XML file to install@lumerical.com, with the subject title: Offline Activation Request for
prompt attention from Support.
2. Click the "Browse" button, towards the lower half of the window. A "Load File dialog box" will appear
allowing you to locate for the saved file.
3. Click and select the saved responseXML file and click Open. This will apply the activated license (this may
take a few minutes to complete).
Optional: Once completed, click on the Licenses tab to verify the license activated successfully. For more
information on the license status, please see Trusted Storage Activation Status.
Once you have configured your license, you should be able to start using the software.
Checking the license availability
See the Check license availability page.
Transferring your license to a new computer
Although node-locked licenses are intended to be used on one selected workstation, the case may come up
where we need to transfer the product for use on another workstation. This is to accommodate certain
circumstances, such as hardware failure, installation troubleshooting, workstation upgrade, etc. This is not
intended for use as a portability option (there are other licensing models better suited for this); there is a limit
of how many times a license can be re-activated.
To transfer the license for use on another workstation, we will need to deactivate it first in order to free it up. To
do this:
Part 1 - Deactivate License on Current Workstation.
Window Start -> All Programs -> Lumerical -> Lumerical FlexLM -> Activate or Deactivate a license
s
Linux /opt/lumerical/lumerical-flexlm/lumerical-activation-utility
MAC Applications -> Lumerical -> Lumerical FlexLM -> Lumerical Activation Utility
1. Verify the Node Locked tab is selected, then choose the Licenses tab:
2. Then select the license listed and click the Deactivate button:
This will remove the license from the listing and free it up.
NOTE: This procedure can be used to safely protect and reactivate your
product if you should need to reformat / re-install the operating system on
the same workstation as well.
You may find additional useful information in the Advanced configuration chapter.
Notes
This license can not be accessed by other networked workstations.
This license can only be used by a single user at a time.
Does not offer a Dashboard to show the availability of licenses.
This license model uses a file-based (.lic) license, which is received pre-activated.
Not available for Linux operating systems.
These licenses are locked to the computer hardware and cannot be moved to a different computer.
This license model is typically used for customers that experience technical problems with the Trusted Storage
license model.
To import the license file, navigate to the following default installation directory, replacing <Product> with that
which you have installed:
C:\Program Files\Lumerical\<Product>\bin\licenses\
Notice there is an existing file called start.lic; do not move or alter this file. Copy and paste, or move, the
received license to this directory. You may see the warning prompt below; click Continue to save the license
file to this location.
Launch the product to verify the license has been imported successfully.
See also
Common FlexNet Error Codes
You may find additional useful information in the Advanced configuration chapter.
Notes
Can be used to run products on different computers by moving the USB key.
This license model uses a file-based (.lic) license in addition to the USB key.
There is an extra charge for USB key locked licenses.
Not available for Linux operating systems.
Does not offer a Dashboard to show the availability of licenses.
to a code-based activation. The license file is processed and sent pre-activated, which does not require an
internet connection for further processing.
To import the license file, navigate to the following default installation directory, replacing <Product> with that
which you have installed:
C:\Program Files\Lumerical\<Product>\bin\licenses\
Notice there is an existing file called start.lic; do not move or alter this file. Copy and paste, or move, the
received license to this directory. You may see the warning prompt below; click Continue to save the license
file to this location.
Launch the product to verify the license has been imported successfully.
Common issues
See also
Common FlexNet Error Codes
You may find additional useful information in the Advanced configuration chapter.
Notes
Floating licenses allow users to access their licenses on any computer in the local network.
Floating Trusted Storage is one of the most flexible licensing models.
This is the default license model for customers wanting a Floating license.
This is the default license model for Linux users.
License can be transferred between computers up to three times.
Also see:
Trusted Storage Activation Status
Configuring Lumericals products
1. Open License Configuration utility of the products that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.
Window Start -> All Programs -> Lumerical -> Lumerical FlexLM -> Activate or Deactivate a license
s
Linux /opt/lumerical/lumerical-flexlm/lumerical-activation-utility
MAC Applications -> Lumerical -> Lumerical FlexLM -> Lumerical Activation Utility
See also
License Activation Errors
You may find additional useful information in the Advanced configuration chapter.
Notes
Floating licenses allow users to access their licenses on any computer in the local network.
This license model is typically used for customers with existing FlexNet license manager installations, or for
customers that experience technical problems with the Trusted Storage license model.
This license model uses a file (.lic) base license.
These licenses are locked to the computer hardware and cannot be moved to a different computer.
1. Go to the Vendor Daemon Configuration on your FlexNet Publisher dashboard, or by simply visiting the
following link: http://localhost:8095/vendor
2. You will be asked to Sign In with an administrator user name and password, which are both set to admin
by default.
Afterwards, you can verify the status of your licenses by following the instructions here: Checking License
Status.
Please note that if your new license is a license extension or renewal of your previous license that is still
valid, your new license may not be activated right away. Once your existing license expire, then the new
license will be activated automatically after you have done the above steps.
One of the common error that you may encounter is the message: "License file exists. Cannot overwrite an
existing file, licenses/LUMERICL/LicenseFile.lic, unless overwrite option is enabled"
When this happens, it means that you have an license with the same file name in the same location.
Please verify whether the previous license is still valid or not.
If the previous license is still valid: You must rename your new license to a unique name. Please only
use alphabetical characters and numbers for the file name (e.g. LicenseFile2013.lic)
If the previous license has expired: You can manually remove them, or alternatively during Step 4 please
select "Overwrite License File on License Server" to overwrite your previous license file.
If you are using Linux and wish to install the license file through command line interface, please see the
following instructions.
Open your terminal / command line interface
Copy the license file that you received and put it in the "licenses" folder
sudo cp /home/lumerical/Desk top/LicenseFile.lic /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/
Change owner of the license file to lumlmadmin so that the license manager able to access it
sudo chown lumlmadmin /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/LicenseFile.lic
Restart your license manager so the changes could take effects
Please see the the Restart License Manager section to restart the Lumerical FlexNet License Manager
Configuring Lumericals products
1. Open License Configuration utility of the products that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.
See also
Common FlexNet Error Codes
You may find additional useful information in the Advanced configuration chapter.
Notes
The license manager can be moved between computers by moving the USB key.
This license model uses a file (.lic) base license in addition to the USB key.
There is an extra charge for USB key locked licenses.
This license model is rarely the best option.
Ensure the USB key driver check-box is selected during the License Manager installation process.
1. Go to the Vendor Daemon Configuration on your FlexNet Publisher dashboard, or by simply visiting the
following link: http://localhost:8095/vendor
2. You will be asked to Sign In with an administrator user name and password, which are both set to admin
by default.
Afterwards, you can verify the status of your licenses by following the instructions here: Checking License
Status.
Please note that if your new license is a license extension or renewal of your previous license that is still
valid, your new license may not be activated right away. Once your existing license expire, then the new
license will be activated automatically after you have done the above steps.
One of the common error that you may encounter is the message: "License file exists. Cannot overwrite an
existing file, licenses/LUMERICL/LicenseFile.lic, unless overwrite option is enabled"
When this happens, it means that you have an license with the same file name in the same location.
Please verify whether the previous license is still valid or not.
If the previous license is still valid: You must rename your new license to a unique name. Please only
use alphabetical characters and numbers for the file name (e.g. LicenseFile2013.lic)
If the previous license has expired: You can manually remove them, or alternatively during Step 4 please
select "Overwrite License File on License Server" to overwrite your previous license file.
If you are using Linux and wish to install the license file through command line interface, please see the
following instructions.
Open your terminal / command line interface
Copy the license file that you received and put it in the "licenses" folder
sudo cp /home/lumerical/Desk top/LicenseFile.lic /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/
Change owner of the license file to lumlmadmin so that the license manager able to access it
sudo chown lumlmadmin /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/LicenseFile.lic
Restart your license manager so the changes could take effects
Please see the the Restart License Manager section to restart the Lumerical FlexNet License Manager
Configuring Lumericals products
1. Open License Configuration utility of the products that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.
Common issues
See also
Common FlexNet Error Codes
You may find additional useful information in the Advanced configuration chapter.
Notes
Floating licenses allow users to access their licenses on any computer in the local network.
The Triad configuration provides redundancy if the primary license server fails.
This license model uses a file (.lic) base license. These licenses are locked to the computer hardware and cannot
be transferred to a different computer.
This license model is appropriate for large institutions with experience running redundant license servers.
The three license servers should be on the same local network and should be running the same OS.
On the heading of your license file, you will see the following information:
#Please Do not delete this comment line.
SERVER this_host 0060dd469ca8
SERVER this_host2 000c290a498c
SERVER this_host3 001CC0F3684F
VENDOR LUMERICL
USE_SERVER
Other parameter that you can enter is PRIMARY_IS_MASTER. This parameter is optional and should be
placed on the first SERVER line
The PRIMARY_IS_MASTER keyword is a feature for FlexNet Licensing that ensures that the primary server is
the Master whenever it is running and communicating with one of the other license servers.
If this is set and the primary server goes down, when the primary server comes back up again, it will always
become the master.
If this is not set and the primary server goes down, the secondary server becomes the master and remains
the master even when the primary server comes back up. The primary can only become the master again
1. Go to the Vendor Daemon Configuration on your FlexNet Publisher dashboard, or by simply visiting the
following link: http://localhost:8095/vendor
2. You will be asked to Sign In with an administrator user name and password, which are both set to admin
by default.
Afterwards, you can verify the status of your licenses by following the instructions here: Checking License
Status.
Please note that if your new license is a license extension or renewal of your previous license that is still
valid, your new license may not be activated right away. Once your existing license expire, then the new
license will be activated automatically after you have done the above steps.
One of the common error that you may encounter is the message: "License file exists. Cannot overwrite an
existing file, licenses/LUMERICL/LicenseFile.lic, unless overwrite option is enabled"
When this happens, it means that you have an license with the same file name in the same location.
If you are using Linux and wish to install the license file through command line interface, please see the
following instructions.
Open your terminal / command line interface
Copy the license file that you received and put it in the "licenses" folder
sudo cp /home/lumerical/Desk top/LicenseFile.lic /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/
Change owner of the license file to lumlmadmin so that the license manager able to access it
sudo chown lumlmadmin /opt/lumerical/lumerical-flexlm/licenses/LUMERICL/LicenseFile.lic
Restart your license manager so the changes could take effects
Please see the the Restart License Manager section to restart the Lumerical FlexNet License Manager
Configuring Lumericals products
If you haven't setup your license configuration yet, you will be required to configure your license upon
launching the program for the first time. This page will show you how to easily configure your license.
1. Open Configure License utility of the product that you would like to configure
Window Start-> All Programs-> Lumerical-> <PRODUCT>-> Configure license
s
Linux /opt/lumerical/<PRODUCT>/bin/<PRODUCT>-config-license
MAC Applications/Lumerical/<PRODUCT>/License Configure
* replace 'PRODUCT' with the Lumerical application name, such as FDTD, MODE, DEVICE, or
INTERCONNECT.
4. Click OK
Once you have configured your license, you should be able to start using the software.
Optional: You can check your license status anytime by visiting the FlexNet Publisher Dashboard. See
Check License Status guide.
Firewall
If your license server is using a third party firewall or is bound by IP tables rules you may be required to
additional configuration. Please see the following page to Configure Firewall.
*Please note that Windows firewall is automatically configured by Lumerical installer
Checking the license availability
See the Check license availability page.
Transferring your license to a new computer
Triad redundant licenses can not be transferred to other computers. Please see https://www.lumerical.com/
support/ for instructions to contact Lumerical technical support for assistance.
Common issues
Connecting to a non-Master
License Server
See also
Common FlexNet Error Codes
You may find additional useful information in the Advanced configuration chapter.
3 Solvers
Lumerical is a recognized leader in the fields of optoelectronic device simulation and photonic integrated circuit
design. Our optoelectronic device and circuit simulation products are used at hundreds of locations in more than 30
countries around the world, and have been used in more than 900 scientific publications. Learn more about our
solvers in this chapter.
Solver physics
This section will introduce the basic mathematical and physics formalism behind the FDTD algorithm.
where H, E, and D are the magnetic, electric, and displacement fields, respectively, while
e r ( w ) is the complex
In three dimensions, Maxwell equations have six electromagnetic field components: Ex , Ey , Ez and Hx , Hy , and
Hz. If we assume that the structure is infinite in the z dimension and that the fields are independent of z,
specifically that
e r ( w , x, y , z ) = e r ( w , x, y )
r r
E H
= =0
z z
then Maxwell's equations split into two independent sets of equations composed of three vector quantities each
which can be solved in the x-y plane only. These are termed the TE (transverse electric), and TM (transverse
magnetic) equations. We can solve both sets of equations with the following components:
TE: Ex , Ey , Hz
TM: Hx , Hy , Ez
The FDTD method solves these equations on a discrete spatial and temporal grid. Each field component is solved
at a slightly different location within the grid cell (Yee cell), as shown below. By default, data collected from the
FDTD solver is automatically interpolated to the origin of each grid point, so the end user does not have to deal
with this issue in their analysis.
Dispersive materials with tabulated refractive index (n,k) data as a function of wavelength can be incorporated by
using the multi-coefficient material models that automatically generates a material model based on the tabulated
data. Alternatively, specific models such as Plasma (Drude), Debye or Lorentz can be used. See the Materials
215 chapter for details. The FDTD solver supports a range of boundary conditions, such as PML, periodic, and
Bloch. See the boundary conditions 459 section here for the complete list. The FDTD solver supports a number
of different types of sources such as point dipoles, beams, plane waves, a total-field scattered-field (TFSF)
source, a guided-mode source for integrated optical components, and an imported source to interface with
external photonic design softwares. Detailed information about each of these sources is contained in the sources
510 section.
See the FDTD Numerical methods video for additional information: http://www.lumerical.com/support/courses/
fdtd_numerical_methods/video.html. You can also find more information on Wikipedia.
Meshing
FDTD Solutions uses a rectangular, Cartesian style mesh, like the one shown in the following screenshot. It's
important to understand that of the fundamental simulation quantities (material properties and geometrical
information, electric and magnetic fields) are calculated at each mesh point. Obviously, using a smaller mesh
allows for a more accurate representation of the device, but at a substantial cost. As the mesh becomes smaller,
the simulation time and memory requirements will increase. The FDTD solver provides a number of features,
including the conformal mesh algorithm, that allow you to obtain accurate results, even when using a relatively
coarse mesh.
References
1 Dennis M. Sullivan, Electromagnetic simulation using the FDTD method. New York: IEEE Press Series, (2000).
2 Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).
3 Stephen D. Gedney, Introduction to the Finite-Difference Time-Domain (FDTD) Method for Electromagnetics.
Morgan & Claypool publishers, (2011).
Solvers 101
FDTD
Associated files
ray vs wave.fsp
switchtolayout;
save("400nm.fsp");
setnamed("source","center wavelength",400e-9);
run;
switchtolayout;
save("4000nm.fsp");
setnamed("source","center wavelength",4000e-9);
run;
3.1.2 varFDTD
Introduction
The 2.5D varFDTD solver accurately describes the propagation of light in planar integrated optical systems, from
ridge waveguide-based systems to more complex geometries such as photonic crystals. The propagator allows for
planar (omni-directional) propagation without any assumptions about an optical axis, which allows for structures like
ring resonators and photonic crystal cavities to be efficiently modeled devices that have been traditionally treated
with 3D FDTD. The varFDTD solver can model devices on the scale of hundreds of microns quickly.
Video resources
varFDTD introduction (YouTube.com)
MODE Solutions overview (YouTube.com)
MODE Solutions Introductory Webinar (lumerical.com)
More videos (lumerical.com)
Solver physics
The varFDTD solver is based on collapsing a 3D geometry into a 2D set of effective indices that can be solved
with 2D FDTD 103 . This works best with waveguides made from planar structures, as the main assumption of this
method is that there is little coupling between different supported slab modes. For many devices, such as SOI
based slab waveguide structures, that only support 2 vertical modes with different polarizations, this is an
excellent assumption.
1. Identification of the vertical slab modes of the core waveguide structure, over a desired range of wavelengths.
2. Meshing of the structure and collapse of the 3rd dimension by calculation of the corresponding effective 2D
indices (taking into account the vertical slab mode profile). There are currently two approaches to doing this:
a) Variational
A variational procedure based on Hammer and Ivanova1. Here, the effective permittivities of the TE and TM-like
modes have the form:
2
TE b
2 ( e ( x, y , z ) - e ( z , w ) ) M ( z , w )
r dz
e ( x, y , w ) = r +
eff
z
2
k M ( z, w ) dz
z
2
1 1 1 M
| M |2 dz - dz
e ( x, y, z ) z
2
TM br e
z r z r
e
e eff ( x, y, w ) = +
k 1 2 1 2
z e ( x, y, z ) | M | dz k2 M dz
z
e ( x, y , z )
where r, M and r are the 1-D reference permittivity profile, the associated guided slab mode and the
propagation constant.
b) Reciprocity Based
This is a procedure based on the reciprocity theorem, as described in Snyder and Love2:
r 2
b e
1
2 ( e ( x, y , z ) - e r ( z , w ) ) E ( z , w ) dz
neff ( x, y, w ) = r + 0 z
k m0
P ndz
z
Note that in both cases, the generated effective materials are also dispersive, where the dispersion comes both
from the original material properties (material dispersion) and the slab waveguide geometry (waveguide
dispersion). These new materials are then fitted using Lumerical Solutions' multi-coefficient model into a time-
domain form that can be used in the 2D FDTD simulation in step 3. Note that the effective index treatment
may lead to generated materials that have properties that are unphysical (for example, having an artificial
negative imaginary index). In this case, one has the option of restricting the range of generated indices to the
min/max values defined by the physical material properties of the original materials. All of these settings can
be found under the Effective index tab 425 of the varFDTD simulation region.
For additional information on the varFDTD solver, see the Lumericals 2.5D FDTD Propagation Method whitepaper
on our website.
Meshing
The MODE Solutions Propagator uses a rectangular, Cartesian style mesh, like the one shown in the following
screenshot. It's important to understand that of the fundamental simulation quantities (material properties and
geometrical information, electric and magnetic fields) are calculated at each mesh point. Obviously, using a
smaller mesh allows for a more accurate representation of the device, but at a substantial cost. As the mesh
becomes smaller, the simulation time and memory requirements will increase. MODE Solutions provides a
number of features, including the conformal mesh algorithm, that allow you to obtain accurate results, even when
using a relatively coarse mesh.
References
1 Manfred Hammer and Olena V. Ivanova, MESA Institute for Nanotechnology, University of Twente, Enschede,
The Netherlands
"Effective index approximation of photonic crystal slabs: a 2-to-1-D assessment", Optical and Quantum
Electronics ,Volume 41, Number 4, 267-283, DOI: 10.1007/s11082-009-9349-3
2 Allan W. Snyder and John D. Love, Optical Waveguide Theory. Chapman & Hall, London, England, 1983.
3.1.3 FDE
Introduction
The Finite Difference Eigenmode (FDE) solver calculates the spatial profile and frequency dependence of modes
solves Maxwell's equations on a cross-sectional mesh of the waveguide. The solver calculates the mode field
profiles, effective index, and loss. Integrated frequency sweep makes it easy to calculate group delay, dispersion,
etc. The solver can also treat bent waveguides.
Video resources
MODE Solutions overview (YouTube.com)
MODE Solutions Introductory Webinar (lumerical.com)
Solver physics
In the z-normal eigenmode solver simulation example shown in the figure above, we have the vector fields:
E ( x, y )e i ( - wt + bz ) and H ( x, y )e i ( - wt + bz )
where is the angular frequency and is the propagation constant. The modal effective index is then defined as
cb
neff =
w .
The Eigensolver find these modes by solving Maxwell's equations on a cross-sectional mesh of the waveguide.
The finite difference algorithm is the current method used for meshing the waveguide geometry, and has the ability
to accommodate arbitrary waveguide structure. Once the structure is meshed, Maxwell's equations are then
formulated into a matrix eigenvalue problem and solved using sparse matrix techniques to obtain the effective
index and mode profiles of the waveguide modes. This method is based on Zhu and Brown1, with proprietary
modifications and extensions.
The fields are normalized such that the maximum electric field intensity |E|^2 is 1.
Note: The FDE solves an eigenvalue problem where beta2 (beta square) is the eigenvalue (see the reference
below) and in some cases, such as evanescent modes or waveguides made from lossy material, beta2 is a
negative or complex number. The choice of root for beta2 determines if we are returning the forward or backward
propagating modes. By default, the root chosen is the one with a positive value of the real part of beta which, in
most cases, corresponds to the forward propagating mode. However, we know that a waveguide will not create
gain if the material has no gain. To ensure that the correct forward propagating modes are reported, the FDE may
flip the sign of the default root to ensure that the mode has loss (and a negative phase velocity) which is physical.
Detailed settings can be found in Advanced options 767 .
Meshing
The MODE Solutions Eigenmode Solver uses a rectangular, Cartesian style mesh, like the one shown in the
following screenshot. It's important to understand that of the fundamental simulation quantities (material
properties and geometrical information, electric and magnetic fields) are calculated at each mesh point.
Obviously, using a smaller mesh allows for a more accurate representation of the device, but at a substantial
cost. As the mesh becomes smaller, the simulation time and memory requirements will increase. MODE
Solutions provides a number of features, including the conformal mesh algorithm, that allow you to obtain
accurate results, even when using a relatively coarse mesh.
By default, the simulation will use a uniform mesh. You simply set the
number of mesh points along each axis. In some cases, it is necessary to
add additional meshing constraints. Usually, this involves forcing the mesh
to be smaller near complex structures where the fields are changing very
rapidly.
References
Z. Zhu and T. G. Brown, Full-vectorial finite-difference analysis of microstructured optical fibers, Opt. Express
10, 853864 (2002), http://www.opticsexpress.org/abstract.cfm?URI=OPEX-10-17-853
r r
E ( x, y, z = 0) = f ( x, y )
In a bent waveguide, the MODE Solutions - Eigenmode solver will solve for modes of the form
r r
E ( r , y ' , q ) = f ( r , y ' ) exp( i br 0 q )
2p
b = neff k0 = neff
l0
Where the (r,y',q) represent a cylindrical coordinate system described in the Bend orientation section.
The bend can lead to radiative losses. The losses can be measured by using Perfectly Matched Layer (PML)
boundary conditions to absorb the radiation from the waveguide. To illustrate the effect of the bend orientation angle,
the following images show the fundamental mode for a bent fiber with a circular cross-section in the xy-plane.
bend orientation 0 degree (ie. w aveguide bends in XZ bend orientation 90 degrees (ie. w aveguide bends in
plane) YZ plane)
The left figure above clearly shows that the mode is shifted away from the center horizontally and no symmetry is in
x axis, since the bend is in xz plane and the bend center is in the negative x side. Similarly the right figure shows
the mode center moves upwards because the bend orientation is set to be 90 degree.
NOTE: This discussion assumes we are using a 2D Eigenmode solver region oriented
in the XY plane. For other Eigenmode solver orientations, see the FDE solver in
other orientations section.
E x ( x, y )
r r
E ( r , y ' , q = 0) = E ( x, y, z = 0) = E y ( x, y )
E ( x, y )
z
r - r0 = x cos( j ) + y sin( j )
y ' = - x sin( j ) + y cos( j )
1. When the waveguide cross section is in XY plane and Z is the propagation direction, if the bend is in xz plane
around an axis parallel to y, the bend orientation property is 0 when the bend center is in negative x, and the
bend orientation property is 180 degrees when the bend center is in positive x; if the bend is in yz plane around
an axis parallel to x, the orientation is 90 degrees when the bend center is in the negative y, and the orientation
is 270 degrees when the bend center is in the positive y; in the case that the bend is in between xz and yz
planes, the orientation angle is in between;
2. When the waveguide cross section is in YZ plane and X is the propagation direction, if the bend is in yx plane,
the orientation is 0 (negative y) or 180 degrees (positive y); in zx plane, the orientation is 90 (negative z) or 270
(positive z) degrees;
3. When the waveguide cross section is in ZX plane and Y is the propagation direction, if the bend is in zy plane,
the orientation is 0/180; in xy plane, the orientation is 90/270 degrees.
For 1D Eigenmode solver, as long as the propagation direction is set, you can follow up the rules summarized
above. For example, a 1D waveguide is in x axis and the propagation direction is y, using the rule #3 we know that
the bend orientation can only be in xy plane, thus the bend orientation is 90 degrees. If the bend orientation is set to
be 0 or 180 degrees,which means the bend is in zy plane, because it is infinite in size ( 1D waveguide along x) ,
there is no effect to the mode.
To understand the bend orientation clearly, we suggest that you create a waveguide, and use bend orientation either
in 0 or 90 degrees to check where the mode is shifted.
3.1.4 EME
Introduction
The bidirectional eigenmode expansion (EME) solver is ideal for simulating light propagation over long distances. The
computational cost of the method scales exceptionally well with the device length, making it much more efficient for
the design and optimization of long tapers and periodic devices compared to FDTD-based methods.
Video resources
Eigenmode Expansion Solver Webinar (lumerical.com)
MODE Solutions Introductory Webinar (lumerical.com)
More videos (lumerical.com)
Solver physics
The EME method is a frequency domain method for solving Maxwell's equations. The algorithm is fully vectorial
and bi-directional, and offers a good alternative to FDTD-based methods for long propagation distances
1. The modal decomposition of electromagnetic fields into a basis set of eigenmodes. These modes are
computed by dividing the geometry into multiple cells and then solving for the modes at the interface between
adjacent cells. Scattering matrices for each section are then formulated by matching the tangential E and H fields
at the cell boundaries. This is the most time consuming portion of the EME calculation. In this step, FDE 109
solver is used.
2. The simulation is now in analysis mode, and the solution to each section can be propagated bi-directionally to
calculate the S matrix of the entire device. The internal fields can also be reconstructed, if desired. This step can
be carried out very quickly.
Once in analysis mode, the user can change the propagation distance of each section arbitrarily without having to
repeat step 1. This is why the EME method is very efficient for scanning the lengths of devices, as demonstrated
in the Spot Size Converter Example 2053 .
The EME method has several advantages over other propagation methods:
Beam propagation methods (BPM): unlike BPM, which relies on a slowly varying envelope approximation, the
EME method makes no such approximations and is a rigorous technique. The accuracy of BPM also becomes
compromised for propagation at large angles, or in components with high refractive-index contrast, making it
unsuitable for photonic components manufactured from silicon or other high index contrast material systems.
Finite-difference time-domain (FDTD) methods: the EME method scales exceptionally well with propagation
distance and is an ideal method for simulating long structures whereas FDTD-based methods, while rigorous,
exhibit significant increases in simulation times as the length of the device increases .
Meshing
Transverse mesh (y,z)
The EME solver uses a rectangular, Cartesian style mesh, like the one
shown in the figure to the right. It is important to understand that the
fundamental simulation quantities (material properties and geometrical
information, electric and magnetic fields) are calculated at each mesh
point. Obviously, using a smaller mesh allows for a more accurate
representation of the device, but at a substantial cost. As the mesh
becomes smaller, the simulation time and memory requirements will
increase. MODE Solutions provides a number of features, including the
conformal mesh algorithm, that allow you to obtain accurate results, even
when using a relatively coarse mesh.
General
Solvers: All
|H(t)|2 Magnetic field intensity as a function of time (A/m)2 Amperes squared per
meter squared
Dipole moments
Solvers: FDTD, varFDTD
Steady state data can be collected from FDTD and varFDTD simulations by using frequency domain monitors
with the cwnorm option enabled. For more information, see the Frequency domain normalization 119 page.
The nonorm state units only apply to data collected by frequency domain monitors when the normalization state
is set to nonorm. The nonorm state is rarely used, since the cwnorm state is more useful in most situations.
For more information, see the Frequency domain normalization 119 page.
Source amplitudes
Solvers: FDTD, varFDTD
Beam sources
When specifying the amplitude for beam sources, the "amplitude" refers to the peak electric field amplitude in
units of V/m. For example, if a Gaussian beam has the following electric field distribution in time and space:
(t - t0 ) 2 (x2 + y2 )
E ( x, y, z , t ) = E0 sin (w0 (t - t0 ) ) exp -
2
exp - 2
2 ( Dt ) w 0
Then the "amplitude" refers to the value of E0 and has units of V/m. It is worth noting that different beams will
inject different amounts of power for a given source amplitude.
Dipole sources
For dipole sources, amplitude refers to the amplitude of the point source whose units are listed below. Base
amplitude refers to the amplitude that will generate a radiated CW power of 10 nW/m in 2D simulations and 1 fW
in 3D simulations, and total amplitude refers to the amplitude actually used in the simulations which is the
product of the amplitude and the base amplitude.
In the nonorm state, the returned fields are simply the Fourier transform of the simulated time domain fields, and we
use the subscript sim to refer to these fields in the table below. In the cwnorm state, the fields are normalized by
the Fourier transform of the source pulse, thereby yielding the impulse response of the system, and we use a
subscript imp to refer to these fields in the table below.
Hsim (w)
r r nonorm
H sim ( w ) = exp (i wt )H (t )dt
Psim (w)
r r r* nonorm
Psim ( w ) = Esim ( w ) H sim (w)
r
Eimp(w) r 1 r Esim ( w ) cwnorm
Eimp ( w ) = exp (i wt )E (t )dt =
s( w ) s( w )
r
Himp(w) r 1 r H sim ( w ) cwnorm
H imp ( w ) = exp (i wt )H (t )dt =
s( w ) s( w )
r r*
Pimp(w) r r r* Esim ( w ) H sim (w) cwnorm
Pimp ( w ) = Eimp ( w ) H imp ( w ) = 2
| s( w ) |
s(w) 1 N/A
s( w ) =
N
exp (i wt )s (t )dt
sources
j
, where s j(t) is the source time
th
signal of the j source and N is the number of active sources in
the simulation volume
Ideally, s(t) would be a dirac delta function (in which case s(w) = 1). This would allow us to obtain the response of
the system at all frequencies from a single simulation. For a variety of reasons, it is more efficient and numerically
accurate to excite the system with a short pulse such that the spectrum, |s(w)|2, has a reasonably large value over
all frequencies of interest.
In the nonorm state, power and profile monitors return the response of the system to the simulated input pulse s(t):
r r
Esim ( w ) = exp (i wt )E (t )dt
The simulated electric field as a function of angular frequency, Esim (w), depends on both the source pulse used, s(t),
and the system under study.
In the default cwnorm state, power and profile monitors return the impulse response of the system.
r
r Esim ( w )
Eimp ( w ) =
s( w )
The impulse response of the system is a much more useful quantity because it is completely independent of the
source pulse used to excite the system.
Example
Consider a beam source injected into free space at z=z 0. The source signal is
(t - t0 ) 2
s (t ) = sin (w0 (t - t0 ) ) exp - 2
2(Dt )
The electric field at the source injection plane has the following form:
E ( x, y, z0 , t ) = E0 ( x, y, z0 ) s (t )
The frequency power and frequency profile monitors can record spectral averages of various quantities during the
simulation. Like the other quantities calculated by these monitors, these can be returned in the Continuous Wave
Normalization state (cwnorm), or the No Normalization state (nonorm). For most applications, the default cwnorm
state is the best choice. In the tables below, we use the subscripts sim and imp to refer to the quantities returned in
the nonorm and cwnorm states respectively. Please refer to Frequency domain normalization 119 for more details on
the two normalization states, and obtaining the impulse response of the system.
<|Eimp|2> total +
2 r 2 cwnorm
s ( w ) Eimp ( w ) d w
r 2 0
Eimp = +
total 2
s( w )
0
dw
<|Himp|2> total +
2 r 2 cwnorm
s ( w ) H imp ( w ) d w
r 2 0
H imp = +
total 2
s( w )
0
dw
2 r
<Pimp> total + cwnorm
s ( w ) Pimp ( w )d w
r 0
Pimp = +
total
2
s( w )
0
dw
s(w) 1 N/A
s( w ) = exp (i wt )s j (t )dt
N sources
, where s j(t) is the source time
signal of the jth source and N is the number of active sources in the
simulation volume
Total spectral averaging can be turned on by selecting total spectral average as shown in the screenshot below.
<|Eimp(w)|2> partial +
2 2 r 2 cwnorm
h( w , w ' ) s ( w ' ) Eimp ( w ' ) d w '
r 2
-
Eimp ( w ) = +
partial 2 2
h( w , w ' )
-
s( w ' ) d w '
<|Himp(w)|2> partial +
2 2 r 2 cwnorm
h( w , w ' ) s ( w ' ) H imp ( w ' ) d w '
r 2
-
H imp ( w ) = +
partial 2 2
h( w , w ' )
-
s( w ' ) d w '
2 r
<Pimp(w)> partial + cwnorm
2
h( w , w ' ) s ( w ' ) Pimp ( w ' )d w '
r -
Pimp ( w ) = +
partial
2 2
h( w , w ' )
-
s( w ' ) d w '
|h(w,w')|2 2 d N/A
hi ( w , w ' ) =
( w - w ' ) 2 + ( pd ) 2
2
h( w , w ' ) d w' = 1
s(w) 1 N/A
s( w ) = exp (i wt )s j (t )dt
N sources
, where s j(t) is the source time
signal of the jth source and N is the number of active sources in the
simulation volume
Partial spectral averaging can be turned on by selecting partial spectral average as shown in the screenshot below.
Please note that when considered as a function of angular frequency, the FWHM of |h(w,w')|2 is 2pd rad/seconds.
Objective
Parseval's theorem refers to that information is not lost in Fourier transform. In this example, we verify Parseval's
theorem by evaluating the energy carried by a short pulse both in the time and frequency domain, which is basically
energy conservation. In this example, we employ the "power" rawdata returned by both planar time and frequency
monitor for calculation.
Associated files
Parsevals_theorem.fsp
Parsevals_theorem.lsf
See also
Units and normalization 116
Frequency domain normalization 119
CW normalization 618
Integrating the Poynting vector 865
2 2
e(t ) dt = E ( f ) df
- -
Suppose that e(t) and E(f) are the fields in the time and frequency domain respectively, where E(f) is obtained by the
fourier transform of e(t). According to Parseval's theorem, the following equation holds,
2 2
e(t ) dt = E ( f ) df
- -
For a simple plane wave, the Poynting vector is directly proportional to abs(E)^2, where E is the electric field. This
relation holds in both time and frequency domain. For a short pulse in the nonorm state (without time averaging),
e0 2
Power _ time(t ) = real (Poynting ^ (t )) dS = n e(t ) dS
m0
e0 2
Energy _ spectrum( f ) = real (Poynting ^ ( f )) dS = n E( f ) dS
m0
In order words, for the same area dS, the theorem can be written as a form of conservation of energy. Note that
Energy_spectrum(f) has a unit of Watt/Hz^2, while power_time(t) has a unit of Watt.
Energy = power (t )dt = Energy _ spectrum( f )df
- -
To verify the above equation, a simple simulation with a plane wave and planar monitors (both time and frequency) is
performed in the nonorm state. Download the above associated files and run the script. The script contains two
parts: 1) the "power" returned by the monitors and 2) Poynting vector integration.
First, it extracts the "power" recorded by the time and frequency monitor accordingly. The reason for this step is
because the returned "power" is not computational expensive since it's just a 1D vector. One can integrate
power_time(t) and energy_spectrum(f) to calculate the amount of energy carried by a pulse, in Joule. Note that, the
"power" returned by the time monitor is the instantaneous power, while the "power" returned by the frequency
monitor is the time averaged power (therefore needs a factor of 2 to compensate the 0.5 set by default, see the
sourcepower 1601 command). The sourcepower command is also used for comparison, where another factor of 2 is
introduced from the integration of the negative frequencies due to Fourier transform.
Second, an integration of Poynting vector is performed. Note that, this step could be quite computational expensive
since the field data is usually a 3D matrix, especially the time domain data. Pz is used to calculate power in the
both domains, using the above equation.
This is an example to show that the time and frequency domain monitors record the same data without losing
information during Fourier transform.
A simple way to understand far field projections is to view them as a decomposition of the near field data using a set
of plane waves propagating at different angles as the basis for the decomposition. The end result is that the far field
projections functions provide a straightforward and numerically efficient method for calculating the EM fields
anywhere in the intermediate and far field regions.
If your structure is periodic, see the Grating projections 150 toolbox feature page.
In this topic
Simple example 130
Direction unit vector coordinates 132
Far field filtering 134
Field polarization 136
Magnetic fields 140
Periodic structures 142
Power integration on hemisphere 145
Creating line plots 146
Projection distance scaling 148
Changing the far field index 814
Far field analysis objects 813
Associated files
solver_far_field_dvd.fsp
See also
Grating projections 150 toolbox
Far field projection 1657 script functions
Far field projection
Related publications
Allen Taflove, Computational
Electromagnetics: The Finite-Difference Time-
Domain Method. Boston: Artech House,
(2005).
Example
The example below shows how the far field projection can be used to see the angular distribution of reflected light
from a DVD surface. The light is reflected off a "bump" on the DVD surface from a focused beam that is slightly
misaligned with the track. The FDTD simulation runs in the time domain and a movie shows how the fields
interact with the defect (bump). The reflected light is recorded in the near field approximately 50 nm above the
surface by a frequency monitor that performs a running Fourier transform to collect the CW response at 650 nm.
After the simulation is complete, the far field projection is used to propagate the reflected radiation to a
hemisphere at a distance of 1 m. The final result is an image of the field intensity on the hemisphere, as viewed
from above. The effects of the misalignment of the spot can clearly be seen.
Screenshot of simulation
There are two types of situations where these conditions are satisfied:
Additional resources
Simple far field example 130
Direction unit vector coordinates 132
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
Associated files
solver_far_field.fsp
solver_far_field.lsf
See also
Far field projection 1657 script functions
Grating projections 150 toolbox
The simulation file is a simple simulation with a Gaussian source propagating at 30 degrees to the z-axis with an
azimuthal angle of 15 degrees.
After running the simulation, right click on the monitor 'z2' and select Visualize Far field. The following window will
appear. Notice that you can choose to visualize the far field intensity E2 (that is |E|2), or the complex vector field
components Es and Ep.
It is also possible to calculate the far field with a few script commands. The script file will perform a projection to the
far field using the farfield3d function, which returns |E|2. The plot that is created is shown below. This plot represents
the electric field intensity (|E|2) on a hemisphere of radius R = 1m for z > 0.
Note: To obtain the far field vector components in spherical coordinates, use the farfieldpolar3d script function. Es
corresponds to Ephi (Ez in 2D), while Ep corresponds to Etheta.
Note: The projection direction is automatically determined by the direction of net power flow through the monitor.
As we expect, the Gaussian beam is propagating at 30 degrees to the z axis with an azimuthal angle of
approximately 15 degrees.
Associated files
solver_far_field.fsp
solver_far_field.lsf
See also
Far field projection 1657 script functions
Coordinate transformations between spherical and direction cosine units are described below.
Coordinate limits and units
radius 0<r m
polar angl e 0 rad
azimuthal angle 0 2 rad
unit vector -1 u 1
u x2 + u 2y + u z2 = 1
Note: farfieldspherical
The farfieldspherical function can be used to
interpolate far field data from ux,uy coordinates to
spherical coordinates. Specific exam ple: The m onitor is in the X-Y
plane. The direction of propagation is
prim arily in the Z direction.
power = P( q , j ) R 2 sin (q )d qd j
du x du y
= P(u x , u y ) R 2
cos(q )
Care must be taken to avoid numerical errors due to the cos(q) term. It's best to use the
farfield3dintegrate function to evaluate these integrals.
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
Associated files
solver_far_field_filter.fsp
solver_far_field_filter.lsf
See also
farfieldfilter 1658 script function
Far field projection 1657 script functions
For far field projections to be accurate, all radiation that will propagate to the far field must pass through the monitor
being used for the projection. The far field projection functions assume that the EM fields are zero beyond the edge
of the monitor. This effectively truncates the near fields at the monitor edge.
In some cases, the monitor (and simulation region) would have to be impractically large to ensure that all of the
radiation passes through the monitor. One such simulation is the angular distribution of a dipole near an interface. To
reproduce these results, run the simulation file and then the script.
The blue line in the following figure shows the near field data just above the interface surface. The far field projection
functions will use this data to calculate the far field intensity. The important point to notice is that the near field data
is non-zero near the edge of the plot (red circles). It is obvious that the these near fields do not immediately go to
zero at x=8um, but that is what the far field projections assume.
This truncation will lead to high frequency ripple in the far field projection data. The far field filter option allows us to
apply a spatial filter to the near field data (shown in green). When the fields go more smoothly to zero, the high
frequency ripple is removed from the projection. Both projections are shown below. Change the far field filter setting
in the script file to reproduce each of these results.
farfieldfilter(0); farfieldfilter(1);
It is important to realize that the far field filter does not make the projection more accurate. The filter simply removes
high frequency ripple caused by the field truncation. To increase the accuracy, the monitor (and simulation region)
must be made wider, so the monitor can record more of the fields that will eventually propagate to the far field.
The far field filter has a single input parameter, which is a number between 0 and 1. By default, it is 0, which turns
the filter off. This filter is applied to all far field projections. The filter parameter defines the width of the filter by the
following formula: = (a)/(a+b).
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
Associated files
solver_far_field.fsp
solver_far_field.lsf
See also
Far field projection 1657 script functions
We will continue to study the far field example file described in Simple example 130 .
For some far field projections, it is important to calculate the vectorial components of the electric field in order to
determine the polarization properties. In this section, we will focus on the script commands farfieldvector3d
and farfieldpolar3d. The concepts dealt with here can also be applied to the two dimensional commands
farfieldvector2d and farfieldpolar2d.
These commands return three complex components of the electromagnetic field. All the properties of the polarization
of the field can be determined from the amplitudes and phases of these components.
The difference between farfieldvector3d and farfieldpolar3d is the coordinate system for defining the components of
the electric field. farfieldvector3d uses a cartesian coordinate system and farfieldpolar3d uses a
spherical coordinate system.
farfieldvector3d farfieldpolar3d
The script file performs a projection in both coordinate systems. The results are shown below
farfieldvector3d farfieldpolar3d
Ex Er
Ey Eq
Ez Ej
The results in spherical coordinates are the easiest to interpret. Er is 15 orders of magnitude smaller than the other
components. We expect that Er should be zero because in the far field the electric field is perpendicular to the
direction of propagation. The small non-zero terms are due to numerical rounding error on double precision numbers.
The polarization of the original source is P polarized. Therefore we expect that at the center of the beam, Ej is zero
and this is clearly the case on the image plots above. Due to the diffraction of the gaussian beam Ej is non zero
when the azimuthal angle is different than 15 degrees.
To see the effect of changing to S polarization, modify the property "polarization angle" to 90 degrees from 0, see
the polarization angle 521 definition
After re-running the FDTD Simulation, run the script file again. A comparison of the two source polarizations is
shown below. We can see the expected result that at the beam center there is only an Eq component when the
source is P polarized, but only an Ej component when the source is S polarized.
P polarized source (polarization angle = 0 degree) S polarized source (polarization angle = 90 degree)
Eq Eq
Ej Ej
Associated files
solver_far_field_magnetic.fsp
solver_far_field_magnetic.lsf
See also
Far field projection 1657 script functions
Related publications
B. Wang and G. P. Wang, "Directional beaming of
light from a nanoslit surrounded by metallic
heterostructures," Appl. Phys. Lett. 88, 013114
(2006)
E2 = farfieldexact2d('monitor1',x,y);
E2 = sum(abs(E2)^2,3); # calculate E2 from Ex, Ey, Ez
Next, we can calculate the H fields numerically from the E fields using Maxwell's equation:
E z E y
- = i wm 0 H x
y z
E x E z
- = i wm 0 H y
z x
E y E x
- = i wm 0 H z
x y
For example, in the attached script, Hz is calculated using the following script commands:
Ey1 = pinch(farfieldexact2d("T",x-delta,y),3,2);
Ey2 = pinch(farfieldexact2d("T",x+delta,y),3,2);
Ex1 = pinch(farfieldexact2d("T",x,y-delta),3,1);
Ex2 = pinch(farfieldexact2d("T",x,y+delta),3,1);
dEy_dx = (Ey2-Ey1)/(2*delta);
dEx_dy = (Ex2-Ex1)/(2*delta);
Hz = (dEy_dx - dEx_dy) / (1i * 2* pi * f * mu0);
As discussed in previous sections, far field projections are typically used for isolated structures rather than periodic
arrays. However, it is possible to use the projection functions to calculate the approximate far field distribution of
finite sized periodic arrays. For infinitely periodic structures, the grating functions should be used.
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
Associated files
solver_far_field_periodic.fsp
See also
Far field projection 1657 script functions
Grating projections 150 toolbox
Far field from periodic structures 152
Non-periodic projection
By default, the far field functions assume that the near fields are zero beyond the monitor boundary (as discussed in
the Far field filtering 134 section). This occurs even when using periodic boundary conditions. Physically, this acts
like an aperture placed over the structure, only allowing radiation from one period of the structure to propagate to the
far field. The aperture causes strong diffraction, which tends to make these projections not very useful.
See the image below. To simulate an infinite plane wave source (red) incident on a periodic array of structures
(blue), we model a single period (orange) by using periodic boundary conditions. The default far field projection gives
the far field distribution (yellow) from a single period. It is as if an aperture (black) only allows light from one period to
propagate to the far field.
The following figure shows the reflected far field |E|^2 distribution from the FDTD Blaze grating application example
when using the default far field projection settings. To reproduce this figure, run blaze_grating.fsp which you
can download from FDTD Blaze grating example page. Using the Analysis window to plot the far field projection of
the reflection monitor. Don't select the 'assume periodic' option.
For structures with a finite number of periods, there are two cases:
The device is uniformly illuminated by the source. In other words, the source beam is much larger than the finite
sized device. Top hat illumination is appropriate for this case.
The device is much larger than the source beam. In this case, the source is only illuminating a portion of the
device and Gaussian illumination should be used.
The final result is the phase correct sum of m periods, where k bloch=0 for normal incidence,
Gaussian illumination
The difference between Top hat and Gaussian illumination tends to be small. Projections using Gaussian
illumination are smoother because the Gaussian weighting function is smoother than the top hat function.
The final result is the phase correct sum of m periods with a Gaussian weighting, where k bloch=0 for normal
incidence,
2
m
r r i (k -k )ma -
inplane bloch 5 / 2
E far = E0far e
m = -
e
The Gaussian illumination projection looks very similar to the top hat illumination.
Associated files
solver_far_field.fsp
solver_far_field.lsf
See also
Far field projection 1657 script functions
Power Integrals
In general, we want to integrate power over a given solid angle in the far field. There are 2 ways this can be done
1. We integrate the fraction of total electric field intensity (|E|2) over the solid angle that we are interested in, and
multiply by the normalized power transmission through the monitor in the near field.
r2
E
cone
far _ field _ fraction = r2
E
hemisphere
The script file will calculate the normalized power in a given cone around the z-axis defined by a half-angle. It will do
the calculation by both methods described above. The desired half angle can be set in the first executed line of the
script file
# choose the half angle over which we will integrate
half_angle = 30; #in degrees
We expect that using a half angle of 30 degrees will account for 50% of the power. When we run with 30 degrees,
we find have the following output
> solver_far_field2;
The half angle is: 30 degrees at (theta,phi)=(0,0)
The normalized transmission by Method 1 is: 45.6613 %
The normalized transmission by Method 2 is: 44.5107 %
As expected, we find that half the power is radiated within a half-angle cone of 30 degrees around the z-axis.
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
Associated files
solver_far_field.fsp
solver_far_field.lsf
See also
farfieldspherical 1663 script function
Direction unit vector coordinates 132
Far field projection 1657 script functions
The farfield3d functions generally returns the far field projection as a 2D function of ux and uy. This is shown in
figure 1 below. Often we want to create a line plot of this data at a specific value of theta or phi, such as the lines
marked in red on the following figure. The associated script shows how to use the farfieldspherical script
function to interpolate the standard farfield data to an arbitrary location defined by theta/phi.
Line plot of E^2 vs theta at phi=15. Line plot of E^2 vs phi at theta=30.
Objective
This section describes how to rescale far field projections to distances other than the default of 1m. It also
describes how to use the farfieldexact functions to calculate the field distribution at arbitrary positions,
including the so called intermediate field (beyond the simulation region boundary, but not yet the far field).
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
Associated files
solver_far_field.fsp
solver_far_field.lsf
See also
Far field projection 1657 script functions
The script file first calculates the standard far field distribution. Rather than calculating the distribution on the entire
hemisphere, we only get one line at y=0. This data is calculated with both the farfield3d and
farfieldexact3d functions. As the following figure shows, both functions return the same result for the field
distribution on a hemisphere with a radius of 1m.
In most cases, the standard projection location is sufficient. However, if you wish to know the field amplitude at a
different distance (such as a hemisphere with a radius of 1mm), we recognize that the E and |E|^2 scale as shown in
the following table. This formula is valid anywhere in the far field.
3D
r r r 2
E ( R) = E0 / R r 2 E (1)
E (r ) =
r2
For example, suppose we wish to know the fields on an a hemisphere with a radius of 10um. One approach (blue
line in following figure) might be to simply scale the fields by a factor of (1m/10um)^2. This is NOT correct because
10um is not far enough to be considered as the far field. The EM fields are not yet propagating like simple plane
waves. The correct approach is to use the farfieldexact3d function (green line).
As you can see, the two calculations do not give the same results. The blue line is not quite correct because
rescaling the far field distribution is not correct in the intermediate field.
Note: Projections to
surfaces other than
hemispheres
Use the farfieldexact
functions when you want the field
distribution on a surface other than
a hemisphere. The following figure
shows the field intensity along a
straight line for x=-20:20um at
y=0um, z=10um.
A simple way to understand far field projections is to view them as a decomposition of the near field data using a set
of plane waves propagating at different angles as the basis for the decomposition. The end result is that the far field
projections functions provide a straightforward and numerically efficient method for calculating the EM fields
anywhere in the intermediate and far field regions.
If your structure is not periodic, see the far field projection 126 toolbox feature page.
See also
Far field projection 126 toolbox
Grating projection 1666 script functions
Far field projection video
Grating and far field analysis objects 813
Grating order transmission analysis object
1790
Related publications
Allen Taflove, Computational
Electromagnetics: The Finite-Difference Time-
Domain Method. Boston: Artech House,
(2005).
Grating physics
The grating functions are used to calculate the direction and intensity of light reflected or transmitted through a
periodic structure. For example, the grating order directions of a 2D grating can be calculated from the well known
grating equation
m l = a x (sin q m + sin qi )
For our purposes, it's more convenient to re-write this equation in terms of the wave vector k:
2p
(k m ) x = (kin ) x + m
ax
In 3D, these equations become:
2p
(k n, m ) x = (kin ) x + n
ax
2p
(k n, m ) y = (kin ) y + m
ay
It's important to remember that the grating order directions are defined entirely by the device period, the source
wavelength and angle of incidence, and the background refractive index. In principle, the grating order directions can
be calculated without running a simulation. However, in practice, the simulation must first be meshed in order for
these functions to obtain necessary information such as the dimensions and period of the structure. The functions
gratingn, gratingm, gratingu1, gratingu2 and gratingangle can be used to calculate the direction of
each order.
After running a simulation the grating commands can be used to calculate the fraction of power that is scattered
in each direction. The grating function uses a technique similar to a far field projection to calculate what fraction of
near field power propagates in each grating order direction. To get polarization and phase information, use
gratingpolar and gratingvector.
Additional resources
Direction unit vector coordinates 132 (in far field projections section)
Field polarization 136 (in far field projections section)
Magnetic fields 140 (in far field projections section)
Projection distance scaling 148 (in far field projections section)
Associated files
solvers_propagate_periodic.fsp
solvers_propagate_periodic.lsf
See also
Lithography - projections to resist 1715
Setup
The example simulation file contains a thin film of gold on glass with a circular etch hole in it. The simulation volume
represents one unit cell of a periodic structure which has a period of 1.5 microns in both the x and y directions. The
source covers a wavelength range of 0.4 to 0.6 microns, and is polarized with the E field along the x-axis. We take
advantage of the symmetry of the structure to reduce the simulation volume to 1/4 of the unit cell.
Analysis
The script file uses the grating script commands to decompose the field recorded at the monitor called
"transmission" onto a basis state of plane waves. The plane waves can then be propagated to any distance and
summed up to calculate the E field at any distance. In principle, this approach is straightforward, but in practice, it
can be somewhat complicated. It is important to test your analysis against known results to ensure there are no
mistakes in your analysis.
This summing is most conveniently done using the chirped z-transform, or czt, script function. There are a number of
amplitude and phase correction factors in the script that must be correctly taken into account, however, the idea of
the plane wave decomposition and is quite simple and involves 2 steps:
Step 1: The E field at the "transmission" monitor surface is decomposed into a sum of plane waves
E ( x, y, z0 ) = E n ,m exp( ik x ,n x +ik y ,m y )
n ,m
2n p
k x ,n =
ax
2m p
k y ,m =
ay
where kx,n and ky,m are the in-plane wave vectors associated with the (n,m) diffracted order and ax, ay are the x
and y periods respectively. The En,m coefficients are calculated using the gratingvector script command.
Step 2: The E field at any distance z can then be constructed simply by taking the sum
E ( x, y, z ) = E n ,m exp( ik x ,n x +ik y ,m y + ik z ,n ,m z )
n ,m
k z ,n ,m = k 2 - k x2,n - k y2,m
and this final sum is most easily accomplished uzing the czt script function.
Results
The script file propagate_periodic_test.lsf is used to test this projection method by comparing it to
simulated FDTD results. After running the file propagate_periodic.fsp, running the script file will generate the following
figures.
The electric field intensity in the x-z plane for the first 10
m icrons of propagation, as calculated by the plane w ave
The electric field intensity in the x-z plane for the first 10
decom position and projection.
m icrons of propagation, as calculated by FDTD
We see that there is good agreement between the projected fields and the fields as calculated by FDTD. There is
some discrepancy which increases as the propagation distance increases. This difference is due to grid dispersion
(the speed of light on the FDTD mesh is slightly different than free space as well as being anisotropic) and therefore
we can expect that the projected result is in fact more accurate for long propagation lengths. Here, we show a plot
based projection and post-processing, for up to 100 um. To obtain this plot below, set test=0 in
solvers_propagate_periodic.lsf and run the script.
Toolbox physics
See the propagate 1609 script function for details.
See also
stackrt 1504 script command
4 layer stack 1782 application example
Video resources
DEVICE overview (YouTube.com)
DEVICE Introductory Webinar (lumerical.com)
More videos (lumerical.com)
Solver physics
Charge Transport Solver
This section will introduce the basic mathematical and physics formalism behind the self-consistent algorithm
used in DEVICE, starting from the non-linear Poisson and drift-diffusion equations. DEVICE solves the drift-
diffusion equations for electrons and holes (carriers)
J n = q mn n E + qDnn
J p = q m p p E - qDp p
where Jn,p is the current density (A/cm2), q is the positive electron charge, n,p is the mobility, E is the electric
field, Dn,p is the diffusivity, and n and p are the densities of the electrons and holes, respectively (the subscripts n
and p indicate quantities that are specific to the carrier type). Each carrier (electron or hole) moves under the
influence of two competing processes: drift due to the applied electric field, and random thermal diffusion due to
the gradient in the density. These processes are represented in the drift-diffusion equations as the sum of two
terms.
The mobility n,p describes the ease with which carriers can move through the semiconductor material, and is
related to the diffusivity Dn,p through the Einstein relation,
k BT
Dn , p = m n , p
q
where k B is the Boltzmann constant. The mobility is a key property of the material, and may be modeled as a
function of temperature, impurity (doping) concentration, carrier concentration, and electric field. For further
details, please see the section on material models.
To solve the drift-diffusion equations, the electric field must be known. To determine the electric field, Poisson's
equation is solved:
- ( eV ) = q r
r = p-n+C
Finally, the auxiliary continuity equations are required to account for charge conservation
n 1
= J n - Rn
t q
p 1
= - J p - Rp
t q
where Rn,p is the net recombination rate (the difference between the recombination rate and generation rate). The
physical processes associated with the material are assumed to act equivalently when applied to electrons or
holes, and as a result, R = Rn = Rp. The recombination and generation processes are important factors in the
material-specific calculation of carrier behavior. Multiple recombination and generation processes are modeled,
which may depend on temperature, impurity (doping) concentration, carrier concentration, electric field, and
current density. For further details, please see the section on material models.
DEVICE discretizes and solves the drift-diffusion and Poissons equations on an unstructured finite-element mesh
in one and two dimensions. The simulation region is partitioned into multiple domains along boundaries between
materials with unique physical descriptions. The materials used in the simulation may be categorized as
insulators, semiconductors, or conductors; each type of material has an associated user-specified model or
collection of models that describe its behavior. In particular, specialized multi-coefficient models are provided for
semiconductors that describe the fundamental properties, mobility, and recombination processes inherent to that
material.
The system of equations solved by DEVICE admits both a steady-state and time-varying result. By enforcing the
condition
n p
= =0
t t
in the continuity equations, the carrier density and electrostatic potential can be solved at steady-state. Steady-
state simulations can be used to examine the systems behavior at a fixed operating point, and are also useful
when extracting small-signal parameters for a component (e.g. for frequency response analysis). Alternately, by
specifying an initial condition for the carrier density and electrostatic potential, the equations can be solved in a
sequence of discrete times. The time-dependent behavior of the component can then be used to directly evaluate
its large-signal time-domain response or extract large-signal AC parameters.
Boundary conditions are very important in an accurate semiconductor device simulation. Two categories of
boundary condition are present in DEVICE: those that relate to the electrostatic potential (Poissons equation)
and those that relate to the carrier densities (the drift-diffusion equations). Poissons equation and the drift-
diffusion equations are second-order partial differential equations (PDE), and each requires that the solution be
explicitly specified for at least one location. This is known as a Dirichlet boundary condition. For the electrostatic
potential, the Dirichlet condition takes the form of a boundary (internal or external) with a fixed voltage specified,
V ( x) = V1
as is typical of an electrical contact. For the carrier densities, the majority carrier concentration is set to its
equilibrium value at the interface between a contact and the semiconductor, such that
p-n+C = 0
At internal boundaries between two domains that are not contacts, the boundary conditions are determined from
the physical properties of the interface. In the case of the electrostatic potential, the electric flux density must be
continuous across the boundary in the absence of a surface charge. For the electron and hole densities,
boundary conditions between the semiconductor and adjacent materials may be specified in terms of a surface
recombination current density, which will default to zero (no carrier flux across the boundary) for insulators or an
infinite recombination velocity (forcing the carrier density to its equilibrium value) for contacts. At the external
(open) boundaries of the simulation domain, homogenous Neumann boundary conditions are applied: the electric
field normal to the boundary is set to zero as is the surface recombination current density. Physically, this
corresponds to an insulating boundary across which no charge can flow.
The function
FV ,n , p
can be expanded in a Taylor series around the operating point x with a perturbation ~
x e j wt (in
FV
FV ( x) = F V ( x ) + ( x - x ) + ...
x x
FV ~ FV ~ FV ~ j wt
F V (x) + ( V+ n+ p )e
V x n x p x
FV (x )
The steady-state residual is zero. Incorporating the time derivatives, we obtain the system of equations
FV ~ FV ~ FV ~ ~
V+ n+ p = qV
V x n x p x
F ~ F F
- j wn~ + n V + n n~ + n ~ p = q~n
V x n x p x
F ~ F F
j w~
p + p V + p n~ + p ~ p = q~p
V x n x p x
q~ =0 q~V
where we assume that the perturbations to the carrier densities at the terminals are zero ( n , p ) and
represents the applied small amplitude signal. This system of equations is solved for the (complex) small
~ ~p
amplitude responses V , n~ and .
The terminal currents are calculated as the sum of their components, including the displacement and carrier
currents. The small amplitude displacement current density is
~
J d = - j we V
The electron and hole currents are found by assuming a first-order expansion around the operating point,
e.g.
~ ~ j wt J J J
J n ( x )e = J n ( x) - J n ( x ) = [ n j~n + n j~p + n u~ ]e j wt
jn x jp x u x
The net currents are resolved as the integrated flux into the terminals.
The small signal analysis is a computationally effective way of resolving the frequency domain response of a
semiconductor device under conditions where the small amplitude/linear approximation is valid. For large signal
response when the behavior of the semiconductor device is non-linear, a full time domain simulation can be
performed.
J n = mn (qE n + kT )n + mn kTn
J p = m p (qE p + kT ) p + m p kTp
where
m is the carrier mobility, k is the Boltzmann constant,
q is the elementary charge, and where the
driving fields are described as
1 kT 3 kT 1 3 kT m *
E n = Ec - log N c + logT = Ec - log( n )
q q 2 q q 2 q m0
1 kT 3 kT 1 3 kT m *
E p = Ev - log N v - logT = Ev + log( p )
q q 2 q q 2 q m0
Ec Ev Nc Nv
In these equations, and are the conduction band and valence band energies, respectively; and
mn * mp *
are the electron and hole effective densities of states, respectively; and and are the electron and
m0
hole effective masses, respectively, scaled by the electron rest mass . An additional term is added when
Fermi-Dirac statistics are used. In the absence of a temperature gradient, these equations reduce to the classic
drift-diffusion equations.
In a coupled heat and charge transport (CHCT) simulation, the drift-diffusion equations defined above are solved
self-consistently with Poissons equation and the heat transport equation (see heat transport solver physics
description),
T
cp r - (kT ) = Q
t
Q = Qn + Q p + QR
Qn , p = J n , p E n , p
1
QR = ( E g + 3kT ) R
q
The boundary conditions for the heat transport equation are set by the temperatures at the contacts, which are
assumed to be constant and uniform. All other thermal boundaries are assumed to be insulating.
Meshing
DEVICE uses an unstructured, finite-element mesh, like the one shown in the following screenshot. The solution
to the system of equations used to determine the physical quantities of interest is estimated from the discrete
formulation of those equations. Consequently, it's important to understand that of the fundamental simulation
quantities (material properties, geometry information, electrostatic potential, and carrier concentrations) are
A finer mesh (with shorter edge lengths and smaller elements) will better approximate the exact solution to the
system of equations, but at a substantial cost. As the mesh features become smaller, the simulation time and
memory requirements will increase. DEVICE provides a number of tools, including the automatic and guided
mesh refinement, that allow you to obtain accurate results, while minimizing computational effort.
3.3.2 HEAT
Introduction
The heat transport solver is a physics-based simulation tool for solid-state devices. The solver can evaluate the heat
transport equation independently, or self-consistently solve the coupled system of equations for heat transport and
conductive electrical transport to calculate thermal response to Joule heating in an electrically driven system.
Solver physics
The heat transport solver calculates the solution T (the temperature) to the heat transport equation in a solid
medium,
T
rc p - (kDT ) = Q
t
where is the mass density (kg/m3), c p is the specific heat (J/kg.K), k is the thermal conductivity (W/m.K), and
Q is the applied heat energy transfer rate (W/m3).
J = sE = - sV
with electrical conductivity (1/Ohm.m) can also be solved self-consistently with the heat transport equation.
Combined with the auxiliary continuity equation,
r
= - J
t
- ( eV ) = r
one obtains the following differential equation for a homogenous material system:
r s
+ r =0
t e
The solution to this equation is an exponential decay with a relaxation time =/. When changes to the system
are observed on time scales where t>>, the quasi-static approximation can be applied, and . Note that in
steady-state, by construction. Under the quasi-static approximation, the electric current equation
combined with the continuity equation reduces to
( sE) = 0
P = J E = sE 2
which is then applied to the heat transport equations as a heat energy transfer rate Q=P (Joule heating).
The heat transport solver discretizes and solves the heat transport equation or the coupled heat transport and
electric current equations on a finite-element mesh in two or three dimensions. The simulation region is
partitioned into multiple domains along boundaries between materials with unique physical descriptions. The
materials used in the simulation may be categorized as insulators, semiconductors, alloys of semiconductors,
conductors, or fluids; each type of material has an associated user-specified model or collection of models that
describe its behavior. Domains of fluid materials are not directly simulated: fluids can specify boundary conditions
to the simulation that depend on their physical properties.
The system of equations solved for a heat transport simulation admit both a steady-state and time-varying result.
In steady-state,
T
=0
t
and the heat transport equation reduces to
- (kT ) = Q
( sE) = Q
Steady-state simulations can be used to examine the systems behavior at a fixed operating point. Alternately, by
specifying an initial condition for the temperature (and electric field, if required), the equations can be solved in a
sequence of discrete times. The time-dependent behavior of the component can then be used to directly evaluate
its large-signal time-domain response.
Boundary conditions are very important in an accurate simulation of a solid-state device. The heat transport solver
supports a variety of boundary conditions that can be applied at the interface between two materials, at the
surface of a geometric solid, at a simulation boundary, or at the intersection of a solid and the simulation
boundary. The boundary conditions for heat transport and their applicability are enumerated in the table that
follows. For simulations that couple the electric current equations, uniform electrostatic boundary conditions are
supported (both steady-state and time-varying). For internal boundaries between material domains, continuity of
variables is enforced. Where a boundary condition is not defined, the boundary is assumed to be insulating.
indicates steady-state and time-varying. Radiative boundary conditions can be combined with convection.
Meshing
DEVICE solvers, including the heat transport solver, use a finite-element mesh, like the one shown in the
following screenshot. The solution to the system of equations used to determine the physical quantities of
interest is estimated from the discrete formulation of those equations. Consequently, it's important to understand
that the fundamental simulation quantities (material properties, geometry information, temperature, and
electrostatic potential) are calculated at each mesh vertex.
A finer mesh (with shorter edge lengths and smaller elements) will better approximate the exact solution to the
system of equations, but at a substantial cost in simulation performance. As the mesh features become smaller,
the simulation time and memory requirements will increase. DEVICE provides a number of tools, including the
automatic and guided mesh refinement, that allow you to obtain accurate results, while minimizing computational
effort.
Solver physics
This section will introduce the basic mathematical and physics formalism behind the DDF algorithm.
In the time domain simulation, data is represented as a stream of samples [1]. Each sample represents the
value of the signal at a specific point in time. Three key settings are essential to time domain simulations are
the sequence length, the time window and the sample rate. The three parameters are interactive to each other
and defined by the following equations:
LB
tw = LB TB = (1)
BR
Where LB is the sequence length, TB is the bit period and BR is the bit rate. The simulation sample rate is:
NS / B
fs = = N S / B BR (2)
TB
Where NS/B is the number of samples per bit. The number of samples is:
N S = LB N S / B = t w f s
(3)
For analog signals, we can simply define the simulation time window as the following equation with Ts
represents the sampling period:
NS
t w = N S TS = (4)
fs
The DDF solver relies upon Infinite Impulse Response (IIR) and Finite Impulse Response (FIR) digital filters to
implement frequency dependent behavior in time domain simulations. For each signal mode and signal band, a
corresponding digital filter is created, addressing complex single or multimode wavelength division multiplexing
(WDM) devices. By supporting multiple baseband signals for coarse WDM circuits, one for each channel,
different digital filters can be applied to different bands, reducing the limitations and trade-offs as to how well
these digital filters can apply a desired frequency response to a time domain signal.
The following figure shows the scattering matrix methodology of the DDF solver. The scattering matrix is a
container of multiple modes and digital filters centered at each signal baseband.
Video resources
INTERCONNECT overview
INTERCONNECT introductory webinar
More videos
References
[1] G. Zhou, Dynamic Dataflow Modeling in Ptolemy 2, Technical Memorandum UCB/ERL M05/2, University
of California, Berkeley, CA 94720, December 21, 2004.
Solvers 101
DDF
Associated files
am_transceiver.icp
The circuit in this example is a simple optical amplitude modulation transceiver. The Non-Return to Zero (NRZ)
electrical signal is generated based on a Pseudo-Random Bit Sequence, and then it is used to modulate an optical
signal which is generated by a Continuous Wave laser. The modulated optical signal is demodulated by a photo-
diode and smoothed out by a low-pass filter. At last, the eye diagram of the received signal is measured the the Eye
Diagram analyzer. The following figure is the eye diagram measured for the circuit in the example file
am_transceiver.icp.
[click to enlarge]
3.4.2 SDA
Introduction
The Scattering Data Analysis (SDA) solver is a frequency domain simulator that calculates the overall frequency
domain response of a circuit. This is done by solving a sparse matrix that represents the circuit as connected
scattering matrices, each one of them representing the frequency response of an individual element. Sophisticated
analysis and visualization tools allow for the analysis of circuits behavior, including amplitude, phase, group delay
and dispersion.
Solver physics
This section will introduce the basic mathematical and physics formalism behind the SDA algorithm.
Scattering analysis requires that the scattering matrix of each element in the circuit elements be known. The
SDA algorithm performs a preliminary simulation during which the circuit elements calculate their own
scattering matrices. The SDA algorithm is modeled on the same type of scattering analysis used in the high-
frequency electrical domain for solving microwave circuits, enabling bidirectional signals to be accurately
simulated [1]. However, it has been extended to allow for an arbitrary number of modes supported in the
waveguide elements with possible coupling between those modes that can occur in any element.
The following figure shows the block diagram of an INTERCONNECT circuit. Each element (A, B, C and D) is
represented by a scattering matrix that defines the relationship between an arbitrary number of input and output
ports and modes (y). IA is the circuit source and its output contains two modes.
The following figure illustrates the SDA effects of coupling between different waveguides by taking into account
each elements transverse mode profiles.
Video resources
INTERCONNECT overview
INTERCONNECT introductory webinar
More videos
References
[1] D. M. Pozar, Microwave Engineering, Third edition. John Wiley & Sons (2004).
Solvers 101
SDA
Associated files
ring_modulator_ona.icp
INTERCONNECT frequency domain analysis of a circuit under test is performed by the ONA element, enabling the
simultaneous analysis of multiple circuits in the same schematic. After the ONA runs the scattering data analysis of
the circuit, a comprehensive set of measurements on the complex transmission spectra are calculated; typical
results include gain, phase, dispersion and group velocity. Spectral peak analysis is also performed, which
automatically calculates free spectral range (FSR), bandwidth, Q-factor, and other key parameters. The following
figure shows the ring modulator's gain spectrum curve measured by the ONA and the peaks of the gain curve. The
FSR of the ring could be directly perceived through the peaks of the gain spectrum.
[click to enlarge]
4 Getting Started
The Getting Started examples provide step by step instructions on how to solve a number of simple realistic
problems. All simulation and script files used in the tutorials are available for download.
EME
Spot size converter 2053
DEVICE INTERCONNECT
CHARGE Ring resonator 2301
p-n juntion diode 2802 (start here) Fabry-Perot resonator 2294
After working through one or two getting started examples, see the Applications 1690 sections for more advanced
examples.
Chapters
New features
Find new product features by release.
To check the version of the software you are currently using, and to check for updates, go to the Help menu in the
main title bar.
See System design tools new features 883 for the new features in INTERCONNECT.
Also see the Product announcements page.
that is both repeatable and highly automated. The API can also be driven from MATLAB 2085 , allowing the user to
utilize any MATLAB Toolbox capabilities when optimizing their designs.
Plotting in Matlab
A feature to support direct plotting in Matlab by clicking a PLOT IN MATLAB 741 button in Lumerical's GUI. This
feature is currently only available for 1D line plot.
See Matrix transformation 263 , and Permittivity rotation 261 for examples.
Spatially-varying Liquid Crystal orientation data can now also be added using the new Import from CSV tool from the
Import menu in the main toolbar, or by using the importcsvlc 1555 script command. The file format which is
imported is typically created with TechWiz LCD from Sanayi System Co., Ltd. (http://sanayisystem.com/). See
Import object - Liquid crystal from CSV 502 for details on using this new import option.
The material database has been extended to include the thermal and conductive properties of materials. A new class
of material (thermal fluid) has been introduced for heat transport simulations. The definition of physical behavior at
interfaces between two adjacent materials is now accessed through the Interfaces 280 button in the menu bar.
The existing Electrical Contacts table has been renamed Boundary Conditions 686 . Existing electrical contacts will
appear in the Boundary Conditions table. Boundary conditions can now be associated with the surface of a solid (as
in previous versions), a surface of the simulation region, or the intersection of the surface of a simulation region and a
solid. The latter two options only apply to heat transport simulations.
These changes make it possible to perform charge and heat transport simulations from a single design environment.
Dataset builder
A new wizard has been added to the interface of FDTD, MODE, and DEVICE solvers in the 2015b release that will
assist the users in creating structures and doping regions (in DEVICE) using finite-element (FEM) data. The dataset
builder 375 will read the FEM data imported to the script workspace by the user and will guide the user through steps
in order to create custom structures based on the imported data.
Optical solvers
Stretched coordinate PML
The new stretched coordinate PML 460 (SCPML) uses a state of the art formulation [1] that incorporates many recent
advances and delivers a number of advantages including better absorption and greater numerical stability when
compared to the uniaxial anisotropic PML (UPML) provided in earlier versions of the software. The new PML is
available in the FDTD, varFDTD, FDE and EME solvers.
A more flexible PML configuration 460 utility makes it possible to independently adjust the PML parameters on each
boundary. While not typically required, this level of flexibility can be important in some advanced applications.
DEVICE solvers
Spatially varying alloy compositions
DEVICE 4.1
Support for abrupt heterojunctions
Examples applications include the SiGe photodetector, and AlGaAs/GaAs thin-film solar cells
I n , p = J n , p nd s
W
GDSII export
Geometry data can be exported from Lumericals TCAD tools into GDSII files. Each GDSII file will be able to
incorporate multiple simulation primitives from a single layer. See User guide - GDSII import/export 480 for an
example.
Note: The underlying file format of the simulation files (.fsp) created by FDTD Solutions 8.7 has changed. Version
8.7 can open simulation files created by older versions of the software, but older versions will not be able to open
simulation files created by version 8.7.
DEVICE 3.1
See Shared Features
More
FFT's and far field projections are faster due to improved multithreading.
Struct and cell arrays data structures were added to the scripting language.
Font size in script file editor and script prompt can be changed.
The CAD can run script files non-graphically.
Index monitors can be used to view the simulation mesh in layout mode (i.e. without running the simulation engine).
Users now have the ability to create plugin materials and directly modify the update equations. This will allow for
arbitrary nonlinear materials, negative index materials and many other forms of electric and magnetic field updates.
Please see the User-defined models 251 section of the Reference Guide for more detail.
In addition, the following new material models have been added to the Material database 216 (and more material
models will be introduced in the future):
1.
c ( 2)
,
c ( 3) / c ( 2 )
materials: users can now specify the
c ( 2)
and
c ( 3)
terms for nonlinear simulations. An
arbitrary dispersive base material can also be specified, in which case the added polarization will be in addition to
the polarization of any base material that is selected.
2. Paramagnetic materials: users can now specify both the Permittivity and Permeability to simulate magnetic
materials.
3. A
c ( 3)
Raman Kerr model based on the references below. This can be used model the Raman effect in Silicon.
Some examples include soliton propagation and four-wave mixing.
Goorjian and Taflove, Optics Letters, 1992, 180-182
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech House,
(2005)
4. A Four-Level, Two-Electron laser model based on the references below. This can be used to model gain and
lasing dynamics.
Chang and Taflove, Optics Express, 2004, 3827-3833
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech House,
(2005)
Please see the Waveguides - Nonlinear and Gain 2716 for examples that use these new material models.
DEVICE 3.0
3D solver
DEVICE is now capable of simulating fully three dimensional geometries. The solver type can be chosen by the user
to be 2D or 3D. This means that arbitrary structures particularly where slicing or averaging of imported 3D data is not
valid can now be solved for in 3 dimensions.
Visualization
The visualizer has been updated for 3D simulations to allow the user to better view the results, enabling image plots,
arbitrary slices of the 3D geometry or line plots of various types of data.
Also featured in MODE Solutions 6.0 is a Visualizer 741 , which significantly simplifies the process of visualizing
simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and intuitive
way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for scripting.
The Mode Expansion monitor greatly facilitates the interoperability between MODE Solutions and INTERCONNECT
as it returns the S parameters, which can be imported into INTERCONNECT directly. Please see the Ring resonator
(parameter extraction and yield analysis) 2033 getting started example for how to do this.
DEVICE 2.0
Results manager and Visualizer
The Results Manager 736 is a tool for analyzing simulation data. This includes a Results View window which displays
all the results for the simulation object that is currently selected in the Object Tree. The Results Manager also
includes a Script Workspace and a Script Favorites window, providing additional GUI-based functionalities.
Also featured in DEVICE 2.0 is the improved Visualizer 741 , which significantly simplifies the process of visualizing
simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and intuitive
way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for scripting.
Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient object.
See Dataset introduction 1461 for more information.
the ability to run extensive Monte Carlo analysis, sweeping across multiple parameters to assess statistical
variations of circuit elements on overall circuit performance.
Please see the Yield analysis 728 example for more details.
In addition, the following new material models have been added to the Material database 216 (and more
material models will be introduced in the future):
1.
c ( 2 ) , c ( 3) / c ( 2 ) materials: users can now specify the
and
c (3) terms for nonlinear simulations. An arbitrary dispersive base material can also be specified, in which
case the added polarization will be in addition to the polarization of any base material that is selected.
2. Paramagnetic materials: users can now specify both the Permittivity and Permeability to simulate magnetic
materials.
3. A
c ( 3)
Raman Kerr model based on the references below. This can be used model the Raman effect in
Silicon. Some examples include soliton propagation and four-wave mixing.
Goorjian and Taflove, Optics Letters, 1992, 180-182
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005)
4. A Four-Level, Two-Electron laser model based on the references below. This can be used to model gain
and lasing dynamics.
Chang and Taflove, Optics Express, 2004, 3827-3833
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005)
Please see the Application Library 1690 for examples that use these new material models.
e 11 e 12 e 13
e = e 21 e 22 e 23
e e 32 e 33
31
To define this tensor, users will start by specifying the diagonal elements of the tensor. Then, arbitrary
rotations to this tensor can be applied through a Grid Attribute 399 object to induce the correct rotation. Please
see Anisotropic materials 253 for more information on how to define this tensor.
This new feature allows users to simulate magneto-optical effects, as well as arbitrary Liquid Crystals
orientations.
Also featured in FDTD Solutions 8 is a Visualizer 741 , which significantly simplifies the process of visualizing
simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and
intuitive way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for
scripting.
A 2 dimensional drawing mode is provided so that it is possible to work only with a 2 dimensional slice of the
structure. The 2 dimensional drawing mode looks very similar to the 2 dimensional drawing environment from
2D FDTD or MODE 4.
The Mode Expansion monitor greatly facilitates the interoperability between FDTD Solutions and
INTERCONNECT as it returns the S parameters, which can be imported into INTERCONNECT directly.
Please see the Yield analysis 728 example for more details.
Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient
object. See Dataset introduction 1461 for more information.
Concurrent simulations
FDTD 7.5 provides a simple way to run multiple simulations at the same time. For example, suppose you
have 30 simulations from an optimization or parameter sweep 696 task. In the past, each of the 30 simulations
would run consecutively on the local computer. (It was also possible for the user to manually distribute the
jobs in some other manner.) With FDTD 7.5, the jobs can be automatically sent to several computers in your
local network. If there are three computers in the network, FDTD can run three concurrent simulations (one on
each computer), reducing the time to complete the sweep by a factor of 3. Extra FDTD simulation engine
licenses will be required to run additional simultaneous simulations.
Optimization
Optimization 716 is a key component of FDTD Solutions 7.0 Optimization is important when there is a large
parameter space, where simple parameter sweeps require too many simulations to be practical. Prior to
FDTD 7.0, it was possible to implement your own optimization algorithms via the scripting language, but this
can be a difficult task, due to the complexity of optimization algorithms. FDTD 7.0 includes a new
optimization feature which provides a graphical interface to a built in Particle Swarm based optimization
algorithm. It is also possible to create your own custom optimization algorithms within this graphical
optimization feature.
Conformal mesh
Achieve higher accuracy for a given mesh size with conformal meshing 453 . The conformal meshing technique
can resolve interfaces to much higher precision than the standard staircase meshing, making it an ideal
method to solve structures with thin layers, curved surfaces and high index contrast materials, such as
surface plasmon or silicon on insulator waveguides.
Parameter sweeps
Parameter sweeps 699 are a very common task. Prior to FDTD 7.0, creating parameter sweeps required the
scripting language. One of the major new features in FDTD 7 is the ability to do parameter sweeps in a
completely graphical way, without the use of the scripting language.
Object library
A library of complex structure groups and analysis objects have been incorporated into the graphical CAD
environment. In the past, many of these objects were available via the Online Help, but making them available
directly from within the product is much more efficient. The new object library 210 includes complex structure
groups like waveguide components, randomized clouds of particles, photonic crystal arrays, etc. It also
includes analysis objects like power transmission boxes, cavity Q calculators, S-parameter monitors, etc.
Mac OS X support
Mac OS X v10.5 Leopard and above has been added to the list of supported systems.
Windows 7 support
Windows 7 has been added to the list of supported systems.
PML boundaries perform best when the surrounding structures extend completely through the boundary
condition region. Many users are unaware of this issue, making it a common setup mistake. In FDTD 7, the
default behavior is to automatically extend the material properties through the PML boundaries, even if they
were not drawn that way. This should result in better PML performance (absorption) for these users.
Structure groups
The ability to group structures is one of the main new features in FDTD 6.5. Groups can be moved, rotated
and copied as a single object. In addition to simple grouping, it is possible to create parameterized group-
objects by adding script code to the group.
For example, it is possible to create a Photonic Crystal Array group with a Pitch input parameter. When the
Pitch parameter is changed, all objects in the group will automatically move to the appropriate position. For
an example of how to create and use a group see the pc micro cavity tutorial 1759 in the getting started section.
Simplified installation
Simplified licensing: The USB hardware keys now contain much of the licensing information (expiry dates,
quotas). In many cases, license files are no longer required.
Matlab script integration: FDTD Solutions automatically detects MATLAB. The MATLAB script integration
step of the FDTD installation has been removed.
This model is only available when using the Sampled data material definition. The coefficients are
automatically calculated from the sampled material data over the source bandwidth. See the chapter on the
Material database 216 for details.
Spectral averaging
The Spectral averaging feature of Power and Profile monitors calculates the incoherent spectral average of the
electromagnetic fields or the Poynting vector as the simulation runs. The technique is much more efficient
than measuring many frequencies and averaging after the simulation.
Two types of averaging are available. Total spectral averaging uses the source input spectrum as the
weighting function. This is most useful when the source spectrum of the simulation matches the actual
illumination conditions. Partial spectral averaging uses a Lorentzian weighting function multiplied by
the source spectrum. Partial spectral averaging is useful to extract the average response of the system to a
variety of different illumination conditions from a single simulation.
See the Spectral averaging 120 section of the Units and Normalization chapter for more details.
The farfield3dintegrate function makes integrating portions of the far field much easier.
The farfieldspherical function converts direction cosine units (returned from the far field projection
functions) into more familiar spherical coordinates.
The gratingvector function can be used to study the polarization of grating orders of periodic structures.
GUI upgrade
The entire Graphical User Interface has been updated. It is now possible to undock individual sub-windows
from the main application. This can be very helpful when trying to make one sub-window very large. Another
new feature is the ability to show/hide and rearrange toolbars.
The total simulation time of many simulations is dominated by the source pulse length. These simulations will
experience a significant speedup because of the shorter pulse. Simulations with resonant structures, where
the total simulation time is not dominated by the source pulse length, will not experience this speedup.
Unicode characters
FDTD Solutions now supports Unicode file names and file paths. This allows users to work in directories and
save simulation files with names that include characters from Japanese, Chinese, or other languages that are
supported by the Unicode format.
GDSII import
FDTD Solutions can now import GDSII files. The GDSII files use a standard data format to store 2D geometric
data. These files can be imported to create complex multi-layered structures in your simulations.
Control over the figure window color map has been expanded. The color map limits can now be adjusted. This
is useful when creating several images with a consistent color map. A grey scale color map is also available,
which is useful when creating figures to be printed in black and white.
n and k import
The import structure, used to import physical structure data from a file, has been expanded. Refractive index
(n and k) data as a function of space (3D) can be imported from a file or matrix.
Surface imports
The import structure, used to import physical structure data from a file, has been expanded. Surface data of
the form y = f(x) or z = f(x,y) can be imported from a file or matrix. This data can be generated from an
analytic formula or from an experimental source such as an AFM.
Graded mesh
FDTD Solutions now supports a non-uniform, or graded, mesh. This can dramatically increase speed and
accuracy for many problems, as well as reducing the memory requirements.
Meshing improvements
Each physical structure primitive can control its own mesh order (priority), making it easier to draw complex,
overlapping structures. Advanced users can now store the mesh from previous simulations and re-use it to
save meshing time.
Surface Objects
There is a new surface object primitive that allows conic shapes, polynomial surfaces, as well as any custom
surface defined by an analytic equation of the form z = f(x,y).
Anisotropic materials
FDTD Solutions can now handle anisotropic materials.
Surfaces of revolution
The custom primitive, which uses parametrized equations to define it surface, can be either extruded in one
dimension, or rotated about an axis to create a cylindrically-symmetric surface of revolution.
Broadband simulation
Radiation sources can now be designated as standard sources with a constant optical carrier frequency, or
broadband sources which have a chirped optical carrier (i.e. the carrier frequency varies under the pulse
envelope). The new broadband source allows you to measure the system response across very wide frequency
ranges (i.e. 200 to 1000 THz, or across the entire near-UV visible and near-IR part of the spectrum).
Improved 3D visualization
The perspective view of the 3D layout editor, located in the upper right-hand panel, now supports zoomed views
and view rotation.
MODE Solutions
New features in version 5.0
Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient
object, allowing one to package raw data into meaningful results that can be easily parameterized and
visualized.
Please see the Yield analysis 728 example for more details.
Propagator
In addition to the eigensolver, MODE 5 contains an propagator. Lumericals 2.5D propagator is based on a fully
vectorial and physically rigourous method to collapse a 3D geometry into a 2D simulation, making it possible
to solve the 2D geometry quickly using FDTD. The propagator allows for planar propagation without any
assumptions about an optical axis, which allows for structures like photonic crystal cavities and ring
resonators to be efficiency handled
For an overview of the 2.5D Propagator, see the Lumericals 2.5D FDTD Propagation Method whitepaper on our
website. For step by step instructions for a simple use case for the propagator, please see the Getting
Started examples. In addition, the online help contains application examples which use the propagator.
A 2 dimensional drawing mode is provided so that it is possible to work only with a 2 dimensional slice of the
structure. The 2 dimensional drawing mode looks very similar to the 2 dimensional drawing environment from
MODE 4.
Optimization/Sweeps
MODE 5 contains built in parameter sweeps and optimization routines. These routines make it possible to
sweep parameters such as structure sizes or bend radii through an easy to use graphical interface.
For examples of how to use the parameter sweeps, refer to the Getting Started Examples. In addition, more
information can be found in the Running Simulation chapter of the reference and online user guides.
Job Manager
The job manager provides a convenient way to run multiple simulations, and send those simulations out to any
computers on the network. You can use script commands to add multiple simulations (ie different .lms files) to
a job queue. The links for the script commands can be found under the new script commands heading below.
Conformal mesh
Achieve higher accuracy for a given mesh size with conformal meshing. The conformal meshing technique can
resolve interfaces to much higher precision than the standard staircase meshing, making it an ideal method to
solve structures with thin layers, curved surfaces and high index contrast materials, such as surface plasmon
or silicon on insulator waveguides.
MAC OS X support
Mac OS X v10.5 Leopard and above has been added to the list of supported systems. For installation
instructions, see the MAC Installation Manual 58 .
Windows 7 support
Windows 7 has been added to the list of supported systems. For installation instructions, see the Windows
Installation Manual 17 .
Structure groups
The ability to group structures is one of the main new features in MODE 4. Groups can be moved, rotated and
copied as a single object. In addition to simple grouping, it is possible to create parameterized group-objects
by adding script code to the group.
For example, it is possible to create a Photonic Crystal Array group with a Pitch input parameter. When the
Pitch parameter is changed, all objects in the group will automatically move to the appropriate position. For
an example of how to create and use a group see the Photonic Crystal fiber tutorial 1770 in the Getting Started
guide.
objects from one simulation and paste (Ctrl-V) a copy of those objects into a different simulation. This is
especially useful with the new structure groups.
In addition, near to far field projections and grating calculation script functions have been added. For more
details, see the Near to Far Field 126 and Grating Order 1666 sections in the scripting chapter of the Reference
Guide.
Simplified installation
Simplified licensing: The USB hardware keys now contain much of the licensing information (expiry dates,
quotas). In many cases, license files are no longer required.
Matlab script integration: FDTD Solutions automatically detects MATLAB. The MATLAB script integration
step of the FDTD installation has been removed.
It's possible to define materials directly from simple models like Plasma or Lorentz, from a table of
experimental (n,k) data, and from an automatically generated model based on a table of experimental (n,k)
data. The number of materials included in the Material Database has been increased. Co, Cr, Cu, Ge, In, Ni,
Pt, Ti, W, AlN, GaAs, H20 are some of the new materials. The frequency range of the data has also been
expanded. Most materials have data at least from deep UV to far infrared.
The MODE material database is now compatible with the material database in FDTD 6.5.
GUI upgrade
The entire Graphical User Interface has been updated. It is now possible to undock individual sub-windows
from the main application. This can be very helpful when trying to make one sub-window very large. Another
new feature is the ability to show/hide and rearrange toolbars 199 .
Unicode characters
MODE Solutions now supports Unicode file names and file paths. This allows users to work in directories and
save simulation files with names that include characters from Japanese, Chinese, or other languages that are
supported by the Unicode format.
GDSII import
MODE Solutions can now import GDSII files. The GDSII files use a standard data format to store 2D
geometric data. These files can be imported to create complex multi-layered structures in your simulations.
For more information, see the GDS Import 480 section.
Graded mesh
MODE Solutions now supports a non-uniform, or graded, mesh. This can dramatically increase speed and
accuracy for many problems, as well as reducing the memory requirements. For more information, please see
Non uniform mesh 455 .
n and k import
The import structure, used to import physical structure data from a file, has been expanded. Refractive index
(n and k) data as a function of space can be imported from a file or matrix. See the Import primitives 492
section.
Online help
The MODE Solutions Online Help is now available. This resource contains up to date copies of the Installation
Manuals, Getting Started Guide and Reference Guide. All content is fully searchable. The online help also
contains a number of example simulation and script files. New information and examples are constantly being
added to the online help.
Polygon primitives
MODE Solutions now supports extruded N-sided polygons and triangles.
Surface imports
The import structure, used to import physical structure data from a file, has been expanded. Surface data of
the form y = f(x) or z = f(x,y) can be imported from a file or matrix. This data can be generated from an
analytic formula or from an experimental source such as an AFM. See the Import primitives 489 section.
Mode tracker
MODE Solutions can track individual modes of complex waveguides and fibers. This makes it easy to
calculate group delay and dispersion for waveguides and fibers that support many modes. For more details,
see the Frequency analysis 773 section.
Mode searcher
MODE Solutions can search for modes near a desired effective index, or search for modes over a range of
effective indices. This makes it easy to find modes of complex waveguide or fiber geometries, including
photonic crystal fiber. For more details, please see the Modal analysis 768 section.
Overlap calculations
Overlap calculations can now be performed with Gaussian beams, modes calculated for other waveguides, and
even with arbitrary fields imported from ASAP.
DEVICE
New features in version 1.5
Results selection
In the Device region properties, users now how the option to retain a reduced set of spatial data. Under the
"Results" tab, a list of all available results can be viewed, and may be toggled on or off to reduce memory
requirements. By default all results are included.
File
The file menu includes options to create, save and load simulation files. The Import menu allows users to import
structural data stored in GDSII files 480 .
Edit
The edit menu allows users to undo/redo their actions, and to copy/paste/edit object in the simulation.
View
The view menu provides options to control the layout and visibility windows and toolbars.
Setting
This setting menu contains options to change the unit setting within the graphical interface. These option only apply
Simulation
This menu contains settings for configuring resources and running simulations. In DEVICE this also provides the
option to lock the mesh.
Help
The help menu provides links to the online knowledge base, and local PDF copies of the product documentation. It
allows the user to check which version of the software is installed and whether Matlab integration is active. If a
proxy is necessary for connection to the internet, the proxy settings can also be set from the Help menu.
5.2.2 Toolbars
The following sections describe the various toolbars. Toolbars visibility can be controlled in the View - Toolbars
menu.
5.2.2.1 Main
The main toolbar contains buttons to add various Simulation objects 314 , open the Material database 216 and import
files, as described below. When available, clicking the arrow to the right of the icon expands a drop-down menu
containing related buttons. If one of the related buttons is pressed, it replaces the default button in the toolbar. See
the Simulation objects 314 chapter for information about specific objects.
Material Database
This button opens material database window.
Structures
This button will insert the shown structure primitive into the simulation. Pressing the arrow will show all available
primitives.
Groups
This button will add an analysis, container or structure group into the simulation. Pressing the arrow will allow
selection of which group to add.
Simulation
This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.
Import
This button will open a window for importing files from other programs. Pressing the arrow will allow selection of
which kind of import.
Layer Builder
This button will add a Layer Builder group which will allow you to import GDS structure data and manipulate the
layers of the structure from the graphical user interface.
Monitors
This button will insert various monitors into the simulation. Pressing the arrow will allow selection of which monitor
to add.
5.2.2.2 Edit
The edit toolbar contains tools used to copy, delete, or modify settings of simulation objects. When applicable, the
shortcut key used to run the function from the keyboard is given in brackets next to the name of the tool. An object
must be selected in order to use these tools.
Duplicate (D)
This command makes a duplicate of the currently selected object. The copies that are created are identical to the
originals, apart from a one grid cell offset in their x position which allows the user to distinguish between the original
and the copy. When multiple objects are selected, all of the selected objects will be copied. When copying sources
and monitors, it is important to rename the copies so that each object has a unique name.
Move
The move command allows shifting a single or multiple selected objects by a specified distance in each of the x,y,z
dimensions. A pop-up window appears with field entries to specify the shift amount.
Array
The array command allows the user to create an array or arrays of objects.
The parameters in the edit window below produce the resulting array shown in the diagram.
Delete (Del)
The delete command removes the currently selected object, or objects, from the simulation.
Select (S)
This function puts the mouse into the select mode. This allows objects to be selected through the view ports
(objects may be selected in the objects tree regardless of whether the mouse is in select mode or not).
For reference, the current location of the mouse within the view ports is shown in the field at the bottom right-hand
corner of the CAD window (see the image below). The < and > buttons at the right decrease or increase the number
of decimal places shown.
Zoom (Z)
This function sets the mouse to be in the zoom mode. The default aspect ratio of the XY view and perspective views
are locked at 1:1, which means circles always appear round (rather than as ovals). The aspect ratio for the XZ and
YZ is not locked. Use the left click to zoom in and the right click to zoom out. To zoom to a particular area, drag
diagonally across the desired region. Finally, double clicking either button zooms to extent. To adjust the view, it's
easiest to set the XY view first, then adjust the Z view in the XZ or YZ views.
Ruler (R)
Once the ruler mode is selected, a distance measurement can be made by pressing the left mouse button and then
dragging the mouse. A non-permanent triangle is drawn between the locations where the mouse button was pressed
(A) and released (B). The distances are given in the lower left-hand corner of the CAD window (see the image
below). The dx and dy fields correspond to the horizontal and vertical distance between A and B, and the AB field
corresponds to the length of the hypotenuse. For more information, please visit getting the mesh size 440 .
5.2.2.4 View
The view toolbar contains tools to zoom to the extents of objects, edit grid settings and view the mesh used for the
simulation. When applicable, the shortcut key used to run the function from the keyboard is given in brackets next to
the name of the tool.
Drawing Grid
Clicking on the drawing grid brings up a window in which the following options can be edited:
SHOW GRID: when checked, the grid will be plotted in the drawing palette
SNAP TO GRID: when checked, objects can only be moved so that their centers align with intersection points of
the grid
A1 LATTICE: the distance between grid lines in the a1 direction
A2 LATTICE: the distance between grid lines in the a2 direction
AZ LATTICED: the distance between grid lines in the z direction
ANGLE BETWEEN A1 AND X-AXIS: the angle (in degrees) between the a1 direction and the x-axis
ANGLE BETWEEN A1 AND A2: the angle (in degrees) between the a1 and the a2 directions
5.2.2.5 Simulation
The simulation tools are:
Resources
Opens the resource configuration manager 213 . This window can add/remove and enable/disable computational
resources. It also contains a useful configuration test tool to check the resource setup.
Material Explorer
In FDTD Solutions and MODE Solutions, the Materials Explorer can be used to check the material's optical
properties that will be used in a simulation. For more information, please see the section on Material Explorer 220 .
Run
In FDTD Solutions this button will run the current simulation in parallel mode. For more information on how to run
simulation, see Running a simulation 213 .
In MODE Soluitons, if Eigenmode solver is the active solver, this opens the MODE Analysis 768 window. If
Propagator is the active solver, this will run the current propagator simulation (see Running a simulation) 213 .
In DEVICE, if only one solver is present then this button will run that solver (CHARGE or HEAT). If both solvers are
present then it will provide a drop down menu with both options.
Run scripts
This function will allow the user to run a Lumerical script file (*.lsf) to perform automated commands such as
plotting and saving data. This button is located in the CAD environment twice if the script editor is open: once in the
simulation toolbar and once at the top of the script editor. Pressing the button on the toolbar brings up an open file
dialog. Pressing the button in the script editor runs the script that is selected in the editor window.
5.2.2.6 Alignment
The following is only available in FDTD and MODE:
In FDTD Solutions and MODE Solutions, the alignment toolbar provides options to control the relative alignment of
simulation objects. The alignment tool consists of six buttons that control the way in which objects can be
accurately positioned with respect to other objects. The buttons are described, from top to bottom, below and
include an example of their operation.
Solvers 101
FDTD
FDE
VarFDTD
See also
Structures 318
Toolbars 199
To demonstrate their operation, first create a rectangular object, a circle, and a ring by pressing those three buttons
in the Structures drop down menu and move the ring to the lower left of the rectangle, and the circle to the upper
right of the rectangle. The figure below shows the location of the buttons used to align, center, or stack the test
objects that were just created:
Procedure
To use the alignment functions, first select a reference object (the rectangle in the screenshot below). The first
button on the toolbar is used to select the reference object. Next, select another object and use one of the
alignment options to align the second object with respect to the first. In the following screenshot, the top edge of the
circular objects were aligned with the top edge of the rectangle.
or
LOWER: This button moves all of the selected objects
to align with the lower or left edge of the fixed object.
Select either the ring and the circle or all three objects,
and press the LOWER button. Note that the result has
the left-most part of the ring and the circle aligned with
the left-hand edge of the rectangle.
or
MIDDLE: This button moves all the selected objects to
align with the center of the fixed object. Select all of the
objects, and press the MIDDLE button. Note that the
result is centered along the x-axis, with the fixed object
unmoved.
or
UPPER: This button moves all the selected objects to
align with the upper or right edge of the fixed object.
Select the ring and the circle, and press the UPPER
button. Note that the result has the right-most part of the
ring and the circle aligned with the right-hand edge of the
rectangle.
or
STACK: The stack button moves objects along the
working axis (here, x) so that they are just touch one
another, resulting in a series of stacked objects. The
ordering of objects is determined by their center
locations: if you want to stack the ring, rectangle, and
circle in that order from left to right, just move the ring so
its center lies left of the rectangles center and move the
circle so its center is just right of the rectangles center.
Select all of the objects, and press the stack button:
Now, to better see that the objects are just touching one
another, use the middle button in the y-direction. The
result should be what is seen in the image to the left.
To move the objects up and down the tree as well as into groups, we use the orange arrows at the top of the window.
The up and down arrows shift the objects relative to each other, while the left and right arrows move them out of and
into groups. To add groups, we use the button called groups in the main toolbar. Structure groups can only contain
structures and likewise, analysis groups can only contain monitors. See the online user guide section for more
information and examples about Structure groups 389 and Analysis groups 479 . The third group, "Containers" act like
folders and can hold any type of object. In the image above, the 'Sources/Monitors' container group has both
individual sources and monitors as well as an analysis group.
Note that there are buttons with green crosses at the top of the objects tree. These buttons can be used to hide or
display certain types of objects. When objects are selected, they are highlighted blue in the objects tree and the
vertices are marked with red squares in the view ports. Objects can always be selected by left-clicking on their name
in the object tree or edited by right-clicking. Using the tree is the preferred method of selection especially in
complicated simulation setups with many overlapping elements. In the image above, the power monitor, above, is
selected.
User can enable/disable simulation objects by right-clicking on each and selecting "Enable/Disable". Disabled
simulation objects will remain in the object tree (and can be re-enabled), they will have no effect on the
simulation.
MODE Solutions has more than one type of simulation regions corresponding to the different types of solvers.
Only one active region is permitted at one time, and one can set a solver "active" by right-clicking on the solver
region and selecting "Set as active". Once a solver is set as active, others will be automatically "disabled" and
removed both from CAD and the actual simulation. In MODE solutions, specific solver can be set as the active
solver using the script command setactivesolver 1588 .
See also
setactivesolver 1588
viewing the online version (Online). Structures in the Object Library are Analysis objects in the Object
organized by Structure Groups 389 Library are organized by Analysis
Groups 393
CATEGORY: Choose to only display components of a certain category (e.g. extruded polygon, photonic crystals)
TYPE: Choose to display the type of simulation object (e.g. structures, analysis groups)
KEYWORDS: The object window will only show objects that match your keyword (e.g. hemisphere, waveguide)
RESET: Sets the category to display 'all' and deletes any text in the keywords text box
SEARCH: Activates the search for objects that match the keywords (the same function as pressing enter while in
the text box)
INSERT: Pastes the object into the simulation region centered at the current view port settings (same function as
double-clicking the object)
By default the script editor is located on the right hand side of the view ports and shares the same frame as the
analysis window. When both windows are open, it is possible to toggle between the two through tabs located at the
right side of the frame. The script file editor contains buttons to create, open, save and run script files. When multiple
script files are open, pressing on the run script button runs the one in the forefront. Note that when entering scripting
code in the script file editor, each command must be followed with a semicolon.
When running a script file in the a different directory using the GUI, the current working directory is unchanged, but
the directory of the script file is added to the scripting path. This way, any files called by that script will be found.
However, the search order is the current directory first, then any other folders in the path, and then the directory of
the script file.
A number of additional options can be found by right clicking within the script file editor window. For example, F9 will
run the currently selected portion of script. Auto-indenting, changing font sizes, etc are also available.
Moving toolbars
To move a toolbar, hover the mouse over the top of the toolbar, where the dotted line is. When the mouse cursor
becomes a four-headed arrow, press the left mouse button and drag-and-drop the toolbar. If you reach a region where
you can place a toolbar, the CAD environment makes room for the toolbar indicated by a blue void.
Resource Configuration
To access actions for each job, right-clicking anywhere on the row will bring up a context menu with the following
options:
PAUSE: the engine is signaled to go into a wait mode (it will stay running, but not consume CPU)
CONTINUE: restarts a paused job
QUIT AND SAVE: As defined above.
QUIT AND DON'T SAVE: As defined above.
FORCE QUIT: As defined above.
VIEW JOB DETAILS: Opens up a modal dialog that contains the standard output messages from the engine
processes. This is helpful for debugging problems when the job fails to run.
Eigensolver analysis
Category Syntax
Algebraic operators +, -, *, /
Trigonometric operators sin, cos, tan,
asin, acos, atan, atan2,
sinh, cosh, tanh
Power operators ^ or **, exp, log10, log, sqrt
Logical operators >, <, >=, <=, ==, !=
Other operators abs, mod
Constants c - Speed of light in m/s
pi - The value of Pi
Examples
2^10
sqrt(3)/exp(1)
sin(45*pi/180)
Examples
sin(x)^2
exp(-x^2-y^2)
Note: Formulas
The position variables here are relative to object space. (x,y,z) = (0,0,0) refers to the center of the object, not
the global coordinate frame.
Material database (optical) 216 The Materials Database allows you to manage (create,
Default optical material database 217 modify, delete) the materials that are available for use in
Getting material data from the database 219 your simulations.
Material explorer (optical) 220 The Material Explorer is used to check the material fits
Material explorer for varFDTD 222 that will be used in the simulation.
Material permittivity models 223 This section describes the permittivity (or refractive
Creating sampled data materials 226 index) material models supported by the Material
Creating lossless materials 232 Database. See this section for information on the
n,k material model 235 available material models, such as Sampled data,
Analytic material model 239 plasma, lorentz, etc.
Importing arbitrary dispersive models 231
Advanced material models 243 Users can define their own plugin material models
Flexible material plugin framework 251 written in C++.
Anisotropic materials 253 In this section, we will provide some tips for simulations
Grid attribute tips 266 with anisotropic materials.
LC rotation 255
Permittivity rotation 261
Matrix transformation 263
Others and simulations tips (optical) 270 This section describes some miscellaneous and tips
Mesh order (optical) 271 regarding optical simulations.
Creating lossless materials 232
Simulations with Silver 274
Objective
The Materials Database allows you to manage (create, modify, delete) the materials that are available for use in your
simulations.
See Also
Default optical material database 217
Getting material data from the database 219
Introduction
The Materials Database allows for the definition of complex materials using experimental data or parametrized
models. The Material Database stores the material data to be used in the simulation. It also provides an interface to
change material properties like color, mesh order, and model parameters. Experimental data can also be loaded into
the database. To view the resulting index profile, use the Material Explorer.
Import / Export
The IMPORT and EXPORT buttons allow you to transfer material data between simulation files via Material Database
Files (.mdf) files.
Material list
The material list shows the materials stored in the material database. A number of materials are provided with the
product installation. To create additional materials, use the ADD button. You can also modify some of the material
properties (name, color, mesh order, etc) in the list view. A copy of the database is stored in each simulation file. A
change to the database in one file does not automatically change the materials in any other files.
If the material is being used in the current project, a "no delete" icon will indicate that the material can be
modified but not erased. To delete these materials, first modify the simulation so they are not used.
Material Properties
ANISOTROPY: This allows users to set diagonal anisotropy, see Anisotropic materials 253 for more information.
BASE MATERIAL: For plugin materials, this allows users to choose a base material for their plugins.
REVERT TO BASE MATERIAL FOR CONFORMAL MESH CELLS: For plugin materials, this allows the user to
use conformal mesh cells from the base material. For more information, see mesh refinement options and non-
linear simulation methodology 2718 .
Use the Material properties window to view and edit the material model parameters. For model parameter definitions,
see Material permittivity models 223 or Advanced material models (plugins) 243 .
Go to Material Explorer
To modify the material fits 272 , please use the Material Explorer 220 .
Objective
This section provides a list of materials included in the default material database.
Associated File
usr_default.mdf
See Also
Modifying material fits 272
Importing arbitrary dispersive models 231
Introduction
The default optical material database includes refractive index data for a number of common materials. When
creating a new simulation, the default database will be loaded. The default materials cannot be edited directly.
However, if you wish to modify one of the default materials, a copy of the material needs to be created, which can
then be edited.
The material database can be accessed through the Materials button on the main toolbar. In the material
database, materials are listed in the table, which identifies the material name and type, as well as other properties.
Below the material table, the properties for the currently selected material are displayed.
Other
Etch 271
Objective
This section describes how to get material data from the Material database or from a material fit. It is possible to get
both the raw experimental data from the database, and the automatically generated material fit that will be used in
the simulation.
See also
Creating sampled data materials 226
getindex 1673
getFDTDindex 1673
getmaterial 1673
Example
This example provides a sample script that gets material data into a script variable, plots the data, then outputs it to
text files.
# Specify material
material="Si (Silicon) - Palik";
# plot data
plot(f/1e12,real(n_exp),real(n_FDTD),"f (THz)","Re(n)");
legend("experimental data","FDTD fit");
plot(f/1e12,imag(n_exp),imag(n_FDTD),"f (THz)","Im(n)");
legend("experimental data","FDTD fit");
Users may also find the Optical material modeling recorded video to be helpful.
See Also
Material explorer for varFDTD 222
Plot window
The two figure windows at the top of the Material Explorer window show the real and imaginary parts of the
material index.
Material settings
Property Description
Material Select the material to check.
Axis If the material is anisotropic, select the axis to check.
Fit Tolerance The Tolerance setting of the material. Only applies to fitted materials.
Max Coefficients The Max coefficients setting of the material. Only applies to fitted materials.
Show/Hide Advanced Show or hide the advanced options.
Imaginary weight Increasing the weight increases the importance of the imaginary part of the permittivity
when calculating a fit. A weight of 1 gives equal weight to the imaginary and real parts
of the permittivity.
Make fit passive Check to prevent the material fit from having gain at any frequency. By default this is
checked in order to prevent diverging simulations.
Improve stability Check to restrict the range of coefficients in the material fit in order to reduce numerical
instabilities which cause simulations to diverge.
Specify fit range Decouple the bandwidth used to generate the material fit and the source bandwidth.
Bandwidth range of fit The frequency/wavelength range used for the fit if specify fit range is selected. The
bandwidth of the fit should cover the simulation bandwidth.
Save fit parameters Update the Material Database with the new Tolerance and Max coefficients values.
View settings
Property Description
Vertical axis Plot permittivity or index
Show material data Show the experimental data on the plot windows
Standard view Plot the fit over the specified bandwidth range
Extended view range Plot the fit over a wider bandwidth range
Specify view range Specify the range to plot the fit
Plot in new window Plots fit and data in a new window
Fit analysis
Property Description
RMS error The RMS error of the fit. The fitting algorithm will use the minimum number of
coefficients required to achieve an RMS error less than the value specified by the
Tolerance property of that material.
Number of coefficients The number of coefficients used in the fit.
The effective materials are generated using the methods described in 2.5D varFDTD Physics 107 . If BROADBAND is
selected for the simulation bandwidth (under the Effective index tab 425 ), a sampled dataset of effective material data
will be generated over the specified bandwidth (ie. the "Material data" shown above), which will then be fitted using
the multi-coefficient material model (ie. the "Propagator model" shown above). Alternatively, if NARROWBAND is
selected, an (n,k) material will be generated for each at the specified frequency. Note that the effective material
properties shown here include both contributions from the original material dispersion of the 3D structure, as well as
the waveguide dispersion. This is important for obtaining accurate broadband simulation results.
Unlike the Material Explorer 220 for other types of solvers, the SPECIFY FIT RANGE section is not available for the
Propagator. This is because the slab mode data is always generated for the full bandwidth range of the source, and
not outside this range.
Additional resources:
Advanced material models 243
Flexible material plugin framework 251 information
Optical material modeling recorded video
Sampled 3D data
The Sampled data model is used to import experimental material data. The experimental data can be
imported from a text file with the Import data button. This method can be used to create a lossless material.
There are two types of sampled data models available: Sampled 3D data and Sampled 2D data. Sampled data
changed its name to Sampled 3D data to differentiate it from a Sampled 2D data, where the material is defined in
terms of 2D surface conductivity. For backward compatibility, Sampled data can still be used but it is
recommended to use Sampled 3D data whenever possible. Sampled 2D data can be used for importing the
surface conductivity data from 2D materials such as graphene. For more information about the Sampled 2D data
material, see Material conductivity models 241 .
Tolerance - The desired RMS error between the permittivity of the experimental data and the material fit. The
fitting routine will use the least number of coefficients that produce a fit with an RMS error less than the
tolerance.
Max coefficients - The maximum number of coefficients allowed to be used in the material fit. More
coefficients can produce a more accurate fit, but will make the simulation slower.
Make Fit Passive - Set to be true to prevent the fit from having gain at any frequency. By default this is true
in order to prevent diverging simulations.
Improve Stability - If this setting is true, the fitting routine restricts the range of coefficients in the fit in
order to reduce numerical instabilities which cause simulations to diverge.
Imaginary Weight - Increasing the weight increases the importance of the imaginary part of the permittivity
when calculating a fit. A weight of 1 gives equal weight to the imaginary and real parts of the permittivity.
Specify Fit Range - Set to true to decouple the bandwidth used to generate the material fit and the source
bandwidth. This option is used in parameter sweeps where the source frequency is changed, and where it is
important to keep the material parameters constant over the whole parameter sweep. The fit range should cover
the simulation bandwidth.
Bandwidth range - Bandwidth to be used for the fit when Specify Fit Range is true.
Dielectric
The Dielectric model is used to create a material with a constant real index. This material will have the specified
index at all frequencies (non-dispersive).
(n,k) material
The (n,k) material model is used to create a material with a specific value of n and k at a single frequency.
Refractive index - Real part of the index at the center frequency of the simulation. Must be > 0.
Imaginary refractive index - Imaginary part of the index at the center frequency of the simulation.
Positive values correspond to loss, negative values will produce gain.
Conductive 3D
The Conductive model is used to create a material with the the following relative permittivity.
s
e total ( f ) = e + i
2p f eo
Plasma (Drude)
The Plasma model is used to create a material with the the following relative permittivity.
w P2
e total ( f ) = e -
2 p f (i n C + 2 p f )
Debye
The Debye model is used to create a material with the the following relative permittivity.
e debye n C
e total ( f ) = e +
(n C - i 2 p f )
Lorentz
The Lorentz model is used to create a material with the the following relative permittivity.
e lorentz wO2
e total ( f ) = e +
(wO2 - 2i dO 2 p f - (2 p f ) 2 )
Sellmeier
The Sellmeier model is used to create a material defined by the following formula. The C coefficients have
dimensions of micrometers squared (mm2).
B1 l2 B2 l2 B3 l2
e total ( l ) = A1 + + +
l2 - C1 l2 - C2 l2 - C3
NOTE: Single frequency simulations only!
This type of material model should only be used for single frequency simulations. The implementation of the
Sellmeier model is such that the material properties will only be correct at the center frequency of the
simulation.
PEC
A Perfect Electrical Conductor (PEC). The Electric field within this material must be zero. It will have 100%
reflection and 0% absorption. There are no parameters for this model.
Understanding the refractive index of PEC as reported in the Material Explorer and
Refractive index monitors
The refractive index of PEC is not well defined. This can be understood by considering the PEC material as a
conductive material with an infinite conductivity. As the conductivity sigma goes to infinity, the permittivity goes
to infinity. Having the Material explorer and Refractive index monitor return infinite values is not ideal, so they
report the permittivity as eps = 1+ 1e6i, meaning the refractive index is reported as sqrt(1+ 1e6i)=707+707i. It is
important to understand that these values are only for the purpose of reporting by the Material Explorer and
Refractive index monitors. The actual solver engine uses an ideal model (ie. infinite conductivity).
s
e total ( f ) = e + i ,s
2p f e o
e total ( f ) = e + i
Analytic material
The analytic material model allows the user to enter an equation for the real and imaginary part of the permittivity
or refractive index which can depend on the predefined variables listed below. For an example, see the page.
The predefined variables that can be used in the equations for "real" and "imaginary" are:
- f: the frequency in the specified frequency units
- l0: the free space wavelength in the specified length units
- w: 2*pi*f in the specified units
- k0: 2*pi/l0 where l0 is in the specified length units
Objective
This section describes how to import experimental material data into the Material database, and how to check the
material fit with the Material Explorer. The Sampled 2D Data or Sampled 3D Data material type should be used when
creating materials from measured data.
Associated files
usr_sampled_data.txt
usr_sampled_data_anisotropic.txt
See also
Getting material data from the database 219
2. Open the Material Database and click the Add button. Select the Sampled 3D Data option. This will create a
new entry in the Material list. Set the material name and color by clicking on those fields.
3. Click on the Import Data button to import the material data from the text file. Select the File to import, and
the units of the data. ?Click Next.
Data im port
4. If the columns in the text file are not in the standard order of Wavelength - Real index - Imaginary index, use
the following form to specify the order of the columns.
Data im port
Data im port
Once the source is setup, click the Material Explorer button to view the material fits. Select the material name
and set the vertical axis to either index or permittivity. Click the Fit and Plot button.
Material Explorer
The RMS error of this fit in the 400-700nm range of the source is quite small. This is not surprising, since these
numbers are based on Silicon, which tends to fit very nicely. See the Modify material fits 272 section for
information about how to modify the material fits.
Anisotropic materials
It is also possible to create anisotropic sampled data materials if we set the 'anisotropy' property to 'diagonal'.
The data import process is the same as above, except for the text file format. The file
usr_sampled_data_anistropic.txt shows the required format for anisotropic data
400 5.57 0.387 2.785 0.1935 1.85667 0.129
420 5.08894 0.237724 2.54447 0.118862 1.69631 0.0792415
440 4.78731 0.169323 2.39366 0.0846613 1.59577 0.0564409
460 4.57592 0.130235 2.28796 0.0651175 1.52531 0.0434116
480 4.4202 0.0933521 2.2101 0.0466761 1.4734 0.0311174
500 4.29748 0.0728287 2.14874 0.0364144 1.43249 0.0242762
520 4.19996 0.0568346 2.09998 0.0284173 1.39999 0.0189449
540 4.11973 0.0472312 2.05986 0.0236156 1.37324 0.0157437
560 4.05256 0.0362285 2.02628 0.0181143 1.35085 0.0120762
580 3.99543 0.027335 1.99772 0.0136675 1.33181 0.00911168
600 3.94724 0.0256523 1.97362 0.0128262 1.31575 0.00855078
620 3.90579 0.022 1.9529 0.011 1.30193 0.00733333
When using the Material Explorer to check the material fits, use the Axis drop down to view the material
properties for each direction.
Objective
This section describes how to implement dispersive models not directly supported by Lumerical Solutions. This
example shows how you might create a Plasma + Lorentz model.
One option is to use the Analytic material model, which requires an analytic function to define the refractive index.
See the Analytic material model 239 page for more information. The second option, which we will consider here, is to
evaluate the function with some other tool (eg. MATLAB) and use the Sampled data 226 material model.
Associated files
usr_create_dispersive.lsf
See also
Creating sampled data materials 226
the Max number of coefficients may need to be adjusted. Check the fit with the Material Explorer, which can
be accessed from the top menu, under Simulation --> Material Explorer or from the main toolbar under 'Check'.
In this example, the fit is very good for this Plasma + Lorentz model. In fact, only 3 coefficients were used,
even though the maximum number of allowed poles was 6. Other functions may have larger errors, or may
require more coefficients to achieve an acceptable error tolerance.
Objective
This page describes how to create lossless versions of real materials (i.e. silicon or gold).
This technique is not recommended because obtaining accurate material fits can be difficult or impossible, and
because the simulation results can be quite difficult to interpret. However, for users that do wish to create 'lossless'
materials, this page provides some information.
Associated files
usr_materials_lossle
ss.fsp
usr_materials_lossle
ss.lsf
See also
Creating sampled data
materials 226
Modifying material fits 272
Introduction
Occasionally, you may wish to create 'lossless' versions of materials. For example, while studying a Silicon based
photonic crystal cavity, you may want to remove any effects from Silicon material absorption, so you can more
easily study the loss due to leakage through the PC structure. The idea is to create a 'lossless' version of the
material, where the imaginary part of the refractive index (or sometimes the permittivity) is set to zero.
Interpretation of results
The absorption of a material is a fundamental part of its properties, and simply setting the absorption to zero can
lead to unexpected effects. Care must be taken when interpreting simulation results when the material absorption
has been artificially set to zero.
Example
Step 1: Create a 'lossless' material in the database
Creating a lossless material in the Material Database is easy and straightforward. The following lines of script
code can be used to generate a text file containing the 'lossless' refractive index data. Basically, we get the
normal refractive index data, then set the imaginary part of the refractive index to zero. Actually, we set it to
some small value like 1e-6, as non-zero numbers cause fewer problems for the material data fitting routines.
Note: If you wish to set the imaginary part of the permittivity to zero, rather than the refractive index, simply
add this command between lines 2 and 3: "n=n^2;"
Once you have this text file, the data can be imported into the Material Database by following the instructions
on the Creating sampled data materials 226 page. The associated example simulation file already has a
lossless gold and lossless Silicon material in the Material Database.
The associated simulation and script file can be used to test the material fits. To reproduce the following
results, run the script 4 times. Each time, select a different material from the database.
For broadband 237 simulations, n,k material is not used but this is also discussed in
this page.
Note: For materials with a real valued refractive index, the situation is very
simple. Use the 'Dielectric' material model. The following complications do not
apply.
See also
Material database 216
Creating lossless materials 232
Creating sampled data materials 226
Narrowband simulations
In some cases, it may be convenient to define the refractive index of a material based on a single n,k value (e.g. n +
ik = 2 + 0.05i). If you are using a single frequency source (i.e. the source 'Start' and 'Stop' wavelengths are equal),
then the best solution is to add an (n,k) Material to the database, as shown in the above screenshot. The n,k
material allows you to simply enter the desired n,k values.
It is important to remember that the (n,k) Material model should ONLY be used for single frequency sources. The
implementation of the (n,k) Material model is such that it only gives the desired refractive index values at the center
frequency of the source. Obviously, if the source is single frequency, this is not a problem. However, for a broadband
source, the resulting refractive index near the start and stop wavelengths can differ substantially from the desired
values. The following figures show the desired (Blue) and actual (Green) refractive index values that will occur for a
source set to 500-500nm and 400-700nm. The two lines always agree at the center frequency, but not necessary at
other frequencies.
Example
Screenshot of
Material Explorer
Source wavelength
limits: 500-500nm
(n,k) Material values:
2, 0.05
Screenshot of
Material Explorer
Source wavelength
limits: 400-700nm
(n,k) Material values:
2, 0.05
Broadband simulations
In some cases, you may hope to define the broadband refractive index of a material as a constant value of n,k (e.g n
+ ik = 2 + 0.05i). Unfortunately, this is a challenging problem. The root of the problem comes from the fact that
FDTD is a time domain technique, while the refractive index is known in the frequency domain. We are restricted to
describing the refractive index with a particular class of functions that are compatible with a time domain solver.
Unfortunately, a constant n,k as a function of frequency is not something that can be described perfectly with this
restriction. While we can often still get very good fits, they will never be perfect.
import a list of n,k data as a function of wavelength, as described on the Creating sampled data materials 226
page. The resulting material is shown in the above screenshot. The imported data would look something like
this, with a constant value of n,k
wavelength n k
390 2 0.05
400 2 0.05
410 2 0.05
420 2 0.05
430 2 0.05
440 2 0.05
...
The next step is to adjust the fit with the Material Explorer, as shown below. By adjusting the fitting
parameters, it is often possible to get a good (but not perfect) fit to the material data. In the screenshot below,
we can see that the desired n,k value is 2 + 0.05i. The actual fit varies from n = 1.992 - 2.007 and k = 0.0497 -
0.0506. While not perfect, the fit is quite good, especially when you consider that the experimental errors in
refractive index measurements are often quite large.
A common error is to use the (n,k) Material model when trying to create these types of materials.
Unfortunately, this model is only designed for narrowband simulations. This model will give the desired n,k
values at the center frequency of the source, but not at other wavelengths. These differences can be seen with
the Material Explorer, and will lead to errors in your simulation. Rather than using the (n,k) Material model, it is
better to use the Sampled data model described above, which allows you to adjust the fitting parameters to
get a better fit.
Objective
This section describes the Analytic material model.
Associated files
usr_analytic_material1.lms
usr_analytic_material1.lsf
usr_analytic_material1.fsp
See also
Importing arbitrary dispersive models 231
setmaterial 1672
Simple example
For dispersive materials where the index or permittivity are defined as complex equations, please see Importing
arbitrary dispersive models 231
Note: The predefined variables that can be used in the equations for "real" and
"imaginary" are:
- f: the frequency in the specified frequency units
- l0: the free space wavelength in the specified length units
- w: 2*pi*f in the specified units
- k0: 2*pi/l0 where l0 is in the specified length units
- pi: the number pi
- c: the speed of light in a vacuum, ALWAYS in SI units, ie, always equal to 3e8
- x1,...,x10: numeric values that represent a parameter of interest
Conductive 2D
Parameters and units
Layer thickness: physical thickness of the sheet which will be represented as a 2D sheet in the simulation
[m]
Conductivity: conductivity of the material [S/m]
Conductive 3D
This material is implemented as a 3D permittivity. For additional details see Material permittivity models 223 .
Graphene
This material employs the surface conductivity to model the optical properties of a graphene sheet. No base
material is needed.
PEC
A Perfect Electrical Conductor (PEC). The Electric field within this material must be zero. It will have 100%
reflection and 0% absorption. There are no parameters for this model.
RLC
The RLC material is used to specify a lumped element with a given resistance (R), inductance (L), and
capacitance (C). The material is implemented as a distributed surface conductivity is calculated based on the
lumped R, L, C values and the length of the object along the current flow direction.
The RLC material is defined from the Materials tab of a 2D rectangle 349 object when the material selected for
the object is <RLC>. RLC materials will not appear in the Material Database or Material Explorer.
Any combination of R, L, and C can be enabled by selecting the check boxes next to the R, L, and C
parameters. If multiple options are selected, the R, L, and C components are added in parallel.
Sampled 2D data
The Sampled data material definition uses an automatic fitting routine to
generate a multi-coefficient material model of the experimental data over the
frequency range specified by the source. The fits can be checked and adjusted
in the Material Explorer.
Max coefficients: The maximum number of coefficients allowed to be used in the material fit. More
coefficients can produce a more accurate fit, but will make the simulation slower.
Make Fit Passive - Set to be true to prevent the fit from having gain at any frequency. By default this is
true in order to prevent diverging simulations.
Improve Stability - If this setting is true, the fitting routine restricts the range of coefficients in the fit in
order to reduce numerical instabilities which cause simulations to diverge.
Imaginary Weight - Increasing the weight increases the importance of the imaginary part of the
permittivity when calculating a fit. A weight of 1 gives equal weight to the imaginary and real parts of the
permittivity.
Specify Fit Range - Set to true to decouple the bandwidth used to generate the material fit and the
source bandwidth. This option is used in parameter sweeps where the source frequency is changed, and
where it is important to keep the material parameters constant over the whole parameter sweep. The fit range
should cover the simulation bandwidth.
Bandwidth range - Bandwidth to be used for the fit when Specify Fit Range is true.
Additional resources:
Standard material models 223
Flexible material plugin framework 251 information
Optical material modeling
Nonlinear application 2716 examples
Material Plugins: A Practical Implementation Demo
Users that only require a Chi2 term are encouraged to use this model rather than the Chi3/Chi2 model
because it uses a more numerically accurate implementation.
Source code
chi2.h
chi2.cpp
Storage fields
No storage field specified by default
Chi3/Chi2
The usage for the Chi3/Chi2 material is the same as the Chi2 material, but with the addition of the Chi3 term.
Support for higher order terms could be added with some straightforward modifications to the source code for
this model (provided below).
Source code
chi3.h
chi3.cpp
Storage fields
No storage field specified by default
Source code
chi3ramankerr.h
chi3ramankerr.cpp
Storage fields
(3)
(1 - a ) ( c Raman (t ) * E 2 (t ))
storage_0 = Sn: Chi3 Raman term, , for the nth time step
(3)
(1 - a ) c Raman (t ) * E 2 (t )
storage_1 = Sn+1: Chi3 Raman term, , for the (n+1)th time step
References
This model was implemented based on:
Goorjian and Taflove, Optics Letters, 1992, 180-182
Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).
Four-Level Two-Electron
This model implements a four-level two-electron model that can be used for simulation of gain and lasing. The
four-level model is described in the following diagram:
The user can monitor the level populations by looking at the storage fields 4-7 which correspond to levels 0-3.
Source code
fourleveltwoelectron.h
fourleveltwoelectron.cpp
Storage fields
Polarization between levels 1 and 2:
storage_0 = Pan+1: (n+1)th time step
storage_1 = Pan: nth time step
References
The four-level two-electron model based on the implementation described in:
Chang and Taflove, Optics Express, 2004, 3827-3833.
Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).
Kerr nonlinear
In the Kerr nonlinear model, the electric polarization field P will depend on the electric field E in the following
manner.
r r r
( )
P (t ) = e 0 c (1) + c ( 3) | E (t ) |2 E (t )
Solving for the displacement field D gives
r r r
( )
D(t ) = e 0 e r + c ( 3) | E (t ) |2 E (t )
Source code
N/A. This is not a plugin material.
Paramagnetic
The paramagnetic material model allows the user to specify both the permittivity and permeability of the
material to simulate magnetic materials.
Source code
paramagnetic.h
paramagnetic.cpp
Storage fields
No storage field specified by default
D ew e2
e ( w ) = e base ( w ) + c e +
we2 - 2i d e w - w 2
D mw m2
m (w ) = 1 + cm +
wm2 - 2i d m w - w 2
where the subscript e and m refer to the electric and magnetic properties respectively and w is the angular
frequency. The user has the option of disabling either the electric or the magnetic portion of the update by
setting the property 'exclude electric' or 'exclude magnetic' to 1 (true).
The properties of this material cannot be seen in the materials explorer, but can be visualized by using the
script file magnetic_electric_lorentz.lsf
Source code
magneticelectriclorentz.h
magneticelectriclorentz.cpp
Storage fields
storage_E_0 = Pn: Polarization for the nth time step
storage_E_1 = Pn+1: Polarization for the (n+1)th time step
storage_H_0 = Mn: Magnetization for the nth time step
storage_H_1 = Mn+1: Magnetization for the (n+1)th time step
Source code
N/A. This is not a plugin material.
D ew o2
e ( w ) = e base ( w ) +
wo2 - 2i d w - w 2
Parameters and units
0 : the angular frequency of the resonance [Hz]
: the linewidth of the resonace [Hz]
: the change in relative permittivity [unitless]
base( ) : Base material permittivity. If no base material is selected, base( ) = 1
Source code
lorentzexample.zip
Source code
twolevelexample.zip
Step index
A simple plugin material model which modifies the time domain update equations in order to apply a change
in permittivity over a time step function, e.g., caused by an input electrical signal.
Source code
stepindex.dll
stepindex.h
stepindex.cpp
Storage fields
Storage_E_0 = time_dt: Raw time data
See Material database (optical) 216 for the definition of other settings in the Material Database window.
Additional resources:
Standard material models 223
Optical material modeling
Nonlinear application 2716 examples
Material Plugins: A Practical Implementation Demo
Basic concept
To create a new material, you must write a method in C++ that solves the following equation for for En
Pn
U nEn + =V n
e0
where En is the electric field at time nDt, Pn is the desired polarization at time nDt and Un and Vn are input values
that we provide. The polarization that is added will be in addition to the polarization of any base material that is
selected. If no base material is selected, the polarization will be added to the vacuum (ie. the default relative
permittivity or permeability is 1.)
FAQ
Can I solve dispersive media that include auxilliary fields? Yes, you can tell us how many storage fields
you need and we will allocate the memory and allow you to update the storage fields.
Can I solve for non-linear media? Yes, this is one of the examples we provide. In fact the c(2) medium that
The input parameters that are specified as part of the plugin implementation will appear either in isotropic or
diagonal anisotropic modes, as shown below:
Examples
A number of example materials implemented with this feature (including source code) can be found in the
Advanced material models 243 page.
Users may also find the Liquid crystal simulation and Optical material modeling recorded video to be helpful.
See also
Anisotropic materials 253
Associated files
diagonal_anisotropy.fsp
ex 0 0
e = 0 ey 0
0 0 e z
The diagonally anisotropic material in the example file has a permittivity of n_xx, n_yy, n_zz = [2, 2, 1.001]. The
anisotropic nature of the material is easily visible by comparing the field profiles of the Ex and Ez fields. Notice the
reflection and refraction visible in the Ex fields that is not present in the Ez fields.
5.3.1.6.2 LC rotation
The Liquid crystal (LC) rotation grid attribute allows you to specify a spatially varying LC director orientation in terms
of theta, phi.
See also
More grid attributes 399
Anisotropic grid attribute tips 266
Liquid crystal video
Liquid crystal application examples 1953
The liquid crystals are composed of rod-like molecular structures as shown below and the molecular has a rotational
symmetry with respect to the long axis. The refractive index with respect to long and short axis is called an
extraordinary refractive index ne and ordinary refractive index no, respectively.
Due to the rotational symmetry, the transformation matrix is reduced to a function of two rotational angles (, )
such as,
and the permittivity tensor in the reference (or simulation ) coordinate system (x,y,z) is transformed to the principal
coordinate system (X,Y,Z) as
eo 0 0 no2 0 0
~ * ~ ~
e D = U (q , f ) e U (q , f ) e D = 0 eo 0=0 no2 0
0 0 e e 0 0 ne2
In the following sections A and B, we explain how to set up an an uniform and a spatially varying orientation
distribution of LCs, respectively.
A .Uniform distribution
As an example, we set up LCs with ne=1.74 and no=1.53 where the orientation angle of LCs is defined as
=30 and =150. Add a LC attribute object by selecting Attributes => LC orientation on the tool bar,
and set the properties "theta" and 'phi" in the edit window as shown below.
By setting these angles, FDTD Solutions creates the transformation matrix U automatically. Next, we open
material database and define a diagonal anisotropic material as show below.
Once we define the transformation matrix U and the diagonal refractive indexes, we assign these to "material"
and "grid attribute names" properties on the Material tab of a structure object which we want to setup as liquid
crystal.
which are twisted in z direction as shown below, where the components of the LC director are given by
ux (x,y,z)=cos(z* ), uy (x,y,z)=sin(z* ) and uz(x,y,z)=0,
we define the director distribution in a matrix variable and put the matrix into the LC attribute property. In the
following script, matrix "n" is used to define the director distribution of the twisted nematic LCs, and this
information is put into a dataset called LC which contains the x, y, z position data and the director orientations
in an attribute called "u". At the second last line where addgridattribute command is used, a LC
attribute is added to the simulation and the director distribution is set up.
# define x/y/z
x = 0;
y = 0;
z = linspace(0e-6,5e-6,100);
X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
n = matrix(length(x),length(y),length(z),3);
We then add a material with diagonal anisotropy components and set up the object to use the LC attribute
similarly to the case of uniform distribution.
Method 2: Importing data from .mat file using the graphical user interface
In the edit window of the grid attribute, it is possible to import a .mat file containing a dataset with the required
director distribution data by clicking on the "Import data..." button. The following code shows an example of
how to save a .mat file to be imported by using the matlabsave 1642 script command.
# define x/y/z
x = 0;
y = 0;
z = linspace(0e-6,5e-6,100);
X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
n = matrix(length(x),length(y),length(z),3);
We then add a material with diagonal anisotropy components and set up the object to use the LC attribute
similarly to the case of uniform distribution.
For more details on the file format and steps for importing the data from the graphical wizard, see Import object
- Liquid crystal from CSV 502 .
The same data can also be imported using the importcsvlc 1555 script command.
See also e XX 0 0
e D ( X , Y , Z ) = 0 0
More grid attributes 399 ~
Anisotropic grid attribute tips 266
eYY
0 0 e ZZ
This type of grid attribute can be used for anisotropic materials that have a diagonal permittivity tensor in some
principle coordinate frame X,Y,Z. but have some other orientation in the simulation. The Euler angles are used to
define the orientation of the material in the simulation.
The default Euler rotation used by the permittivity rotation attribute is Z-Y'-Z''. With this convention, the first angle
(Phi) specifies a rotation around the Z axis (Z). The second angle (Theta) specifies a rotation around the new Y axis
(ie. after the first rotation has been applied). The third angle (Psi) specifies the final rotation around the new Z axis
(i.e. after the first two rotations have been applied). The rotation attribute is drawn as 3 colored arrows, where the
colors correspond to the principle coordinate frame Blue=X, Green=Y, Red=Z. The orientation of the arrows as drawn
in the CAD viewports can be used to confirm you have correctly entered the Euler angles.
Uniform Rotation
If we want to simulate an anisotropic material whose diagonal tensor is given by
(1.5 + 0.2 j ) 2 0 0
e~D ( X , Y , Z ) = 0 (1.4 + 0.1 j ) 2 0
0 0 1.22
tab of the structure object, set the material and grid attribute properties as shown below.
# Specify rotations
phi = linspace(0,pi/2,length(z));
theta = 0*phi;
psi = 0*theta;
# Generate dataset
PR=rectilineardataset("PR",x,y,z);
PR.addattribute("phi",phi);
PR.addattribute("theta",theta);
PR.addattribute("psi",psi);
Although in the graphical user interface, angles are specified in units of degrees, when specifying angles in
the script, the rotation angle units are in radians.
To add the grid attribute and import the data from the PR dataset defined above, the following code can be
used:
addgridattribute("permittivity rotation",PR); # add grid attribute and import data fro
Or
addgridattribute("permittivity rotation"); # add grid attribute
importdataset(PR); # import data from PR dataset
This example generates a grid attribute where the rotation around the z-axis changes from 0 to 90 degrees
along the z-direction between z=0 to z=1 um, as illustrated below:
It is also possible to first save the dataset to a .mat file which can be imported from the grid attribute's edit
window with the "Import data..." button, or from the script using the importdataset 1590 script command":
matlabsave("rotation_data.mat",PR); # save the PR dataset to a .mat file
addgridattribute("permittivity rotation"); # add grid attribute
importdataset("rotation_data.mat"); # import data from .mat file
Once the grid attribute has been set up with spatially-varying rotation data, a new anisotropic material with
diagonal anisotropy can be added and the grid attribute can be applied to the object, like illustrated in the
uniform rotation section above.
Associated files e xx e xy e xz
matrix_transform.lsf ~
matrix_transform_spatially_ e ( x, y, z ) = e yx e yy e yz
varying.lsf e zx e zy e zz
See also
Uniform Transform
If we want to set an anisotropic material with permittivity tensor
1.5 2 0
e ( x, y, z ) = - 2 1.5 0
~
0 0 1.2
we first calculate the eigenvalues as shown below.
After getting the eigenvalues, we create a new material and define the diagonal elements of refractive indexes
using setmaterial script commands as shown below.
>DeR=[sqrt(Evl(1));sqrt(Evl(2));sqrt(Evl(3))]; # diagonal elements of refractive index
If we open the material database, we can see that a new material is created as shown below.
Next, to setup transformation matrix we calculate eigenvectors using eig script command as show below.
Once you get the eigenvectors, you add Matrix attribute object into the layout editor using
addgridattribute script command and set the eigenvectors to the property "U" of the Matrix attribute
object using set script command as shown below.
If you open edit window of the Matrix attribute and double click the "Value" field, you can check the elements of
the matrix U.
After setting the matrix, we assign the Matrix attribute and the material to"grid attribute names" and "material"
properties on the Material tab of a structure object which we want to setup an anisotropic material as shown
below.
Spatially-varying Transform
Let's say we have an anisotropic material where the permittivity at each location varies as a function of the z
location, so the permittivity tensor is:
1.5 2 z 0
e ( x, y, z ) = - 2 z 1.5 0
~
0 0 1.2
We can use a loop to loop through the z-positions of the object, and calculate the diagonal anisotropy and
required unitary transform matrix at each location. The diagonal anisotropy values can be imported in an (n,k)
import 492 object, and the unitary transform matrix can be applied to the import object. This is done in the
matrix_transform_spatially_varying.lsf file.
eo 0 0 no2 0 0
~ * ~ ~
e D = U (q , f ) e U (q , f ) e D = 0 eo 0=0 no2 0
0 0 e e 0 0 ne2
~
In FDTD Solutions, instead of using the elements of e~ we use the diagonal elements of e D and the
transformation matrix U as input parameters.
The basic steps to set up anisotropy in FDTD Solutions which performs a simulation in a reference coordinate
system (x,y,z) are as follows.
1) Set the transformation matrix U using an appropriate grid attribute object,
2) In the material database, create a new material using the diagonalized permittivty elements and
3) On the Material tab of a structure object which we want to set up an anisotropic material,
a) Select the grid attribute defined in 1),
b) Select the material defined in 2).
In FDTD Solutions, three types of grid attribute named LC rotation, Permittivity rotation and Matrix
transformation are provided to define the matrix U. In the following pages, we will explain how to use these grid
attributes.
Diagonalization conventions
Please note that convention used above for matrix diagonalization may be different from the convention used
Rotating structures
When you rotate a geometric primitive, the permittivity tensor is not rotated. In order to do this, you must
define a rotation grid attribute that has the same rotation as the object and associate the object with that grid
attribute.
Alternatively, the magnitude of the orientation vector can be set to 0. In such cases, the grid attribute
transformation is disabled at that location, and the simulation will use the unrotated diagonal permittivity
values. For example, if we set |u(x,y,z)|=1 inside the spherical region and set |u(x,y,z)|=0 outside the region as
show below, a spherical LC region can be set up.
Grid attributes have a setting called "enable conformal meshing" which is set to "true" by default.
Conformal meshing can be disabled by setting the "enable conformal meshing" value to "false". This could be
considered in cases where there is a high refractive index contrast between the structure with grid attribute
applied and neighboring materials (such as when simulating plasmonic effects), where the behavior of the
fields near the material interface is important. This is because if conformal meshing is applied, the spatial
offset of field components within the Yee cell will not be considered by the grid attribute transform, causing
there to be some error as discussed in the "Spatial offset of field components within FDTD Yee cell
approximation" section below.
This can introduce some additional error into the simulation, compared to a similar simulation without a grid
attribute object. In some cases, this approximation can introduce asymmetries into otherwise symmetric
systems. Reducing the mesh step size can help reduce these errors, but in some cases at interfaces
between materials with high index contrast, it is challenging to make the mesh size sufficiently small.
If the dimensions of a structure object are larger than the grid attribute data, the attribute will not be applied to
the portion of the structure that is outside of the attribute data.
Simulation speed
It is worth noting that using Grid attributes will increase the simulation memory and time requirements.
Therefore, when they are not needed, it's best to ensure they are not used. For example, rather than setting
the rotation angle to zero (the grid attribute will still be included in the simulation), it's best to disable the grid
attribute entirely.
See also
Material database (optical) 216
setmaterial 1672
setnamed 1588
set 1568
In the figure above, there are two objects that partially overlap. Depending on their mesh orders, the object that is
actually being simulated will be different. In the event that both overlapping materials have the same order, the mesh
order will be inferred from the Object tree. Objects at the bottom of the tree will take priority over objects at the top of
the tree. To ensure your simulation is well defined, it is recommended that you avoid situations where two different
overlapping structure have the same mesh order. To set the mesh order using script, one can user setmaterial
(material level), setnamed or set (object level).
For simulations using the conformal mesh, the mesh order property defines the material properties in the mesh cells
where materials fully overlap one another. In the mesh cells which contain boundaries between two materials, the
conformal mesh algorithm solves Maxwell's integral equations near these boundaries.
Tip: Use an index monitor to confirm that the structures are meshed as intended.
Objective
This section describes how to modify the automatically generated material fits of Sampled Data materials.
If the Propagator (varFDTD) is the active solver, please see Material explorer for
varFDTD 222 .
See also
Importing arbitrary dispersive models 231
The Sampled data material model allows materials to be defined based on experimental n,k vs frequency data.
However, the experimental data cannot be used directly in the simulation. Instead, an analytic material model based
on the experimental data is automatically generated and will be used in the simulation. Before simulating, you
should check the model (fit) with the Material Explorer. If the fit is not very good, some fitting parameters can be
adjusted.
Fit Parameters
Fit tolerance
Tolerance specifies the target RMS error between the experimental data and the calculated model. The fitting
routine attempts to find a model that gives an RMS error below the tolerance value. The fitting routine will use
the fewest number of model coefficients that give an RMS error below the tolerance.
In most cases, setting the fit tolerance to zero is recommended, which means the fitting routines will select
the best fit that can be found.
Max coefficients
Max coefficients sets the maximum number of coefficients allowed in the model. More coefficients allow more
complicated features to be fit, but at the expense of more memory and simulation time. The fitting routine will
use the fewest number of coefficients that give an RMS error below the tolerance. If the RMS error cannot be
achieved, then the model with the smallest RMS error will be used.
The left image is the fit of Pt (Platinum) with 4 coefficients; its rms error is 8.04. The right image uses 5
coefficients and the rms error is 3.67. The additional coefficient clearly improves the fit, as shown in the plots,
and lowers the rms error value.
The left image is the fit of Ag (Silver) with 4 coefficients; its rms error is 0.14. The right image uses 7
coefficients and the rms error is 0.11.
In this case, even though more coefficients has lowered the rms error, the fit 'looks' worse due to the feature at
0.435 um. The material properties at this wavelength will have a large error when 7 coefficients are used. In this
case, the 4 coefficient is probably the better fit.
Advanced Settings
imaginary weight
Typically, the fitting routine gives equal weight to fitting the real and imaginary parts of the permittivity. Use the
Imaginary weight parameter to give more or less weight (consideration) to the imaginary part of the permittivity.
A value of 10 gives 10 times more consideration to the imaginary part, while 0.1 gives 10 times more
consideration to the real part. This parameter is most useful when the real part is much larger or smaller than
the imaginary part, and it is important to get a better fit to the smaller part.
improve stability
Restrict the range of coefficients in the material model in order to minimize numerical instabilities which can
cause simulations to diverge. By default, this is selected to make the simulation more stable. Unselecting this
option might give a better fit, but the model is more likely to be unstable and the simulation might diverge.
Reducing the dt stability factor can sometimes fix this type of divergence.
Objective
Materials with a very small real refractive index (such as silver) can be challenging to simulate. This page describes
how to obtain accurate simulation results in such cases.
In this topic
Modifying the default material database
217
Associated File
usr_material_Ag_simulations.fs
p
usr_material_Ag_simulations.ls
f
usr_Ag_CRC_theory.txt
usr_Ag_JC_theory.txt
See Also
Modifying material fits 272
Importing arbitrary dispersive models 231
Simulations involving material with a small real refractive index tend to converge slowly with mesh size, requiring very
small mesh sizes (and therefore long simulation times) to provide accurate results. These problems become more
pronounced as the real index becomes smaller. This issue starts to become important when the real index is less
than 0.25, and can be quite significant when the index is less than 0.1.
This knowledge suggests two techniques that can be used to obtain accurate simulation results from simulations
involving silver or other materials with a similarly small real index. We will use a 50nm radius silver sphere as a test
case.
Given this amount of variation in the experimental measurements, it can be argued that adjusting the fits by a
similar amount is reasonable. Similarly, unless you have a specific reason to believe the silver in your
experiment is best represented by the Palik or J&C measurements, using the CRC data is recommended.
The associated simulation file in this page includes several copies of the silver material in the material
database. This material data and the fits can be viewed with the Material Explorer.
- The model coefficients of the materials named "... 0.3-0.6um Fit" were selected to ensure the material
fit is quite good over the wavelength range 300-600nm.
- The model coefficients of the Johnson and Christy material named "... 0.3-0.6um Large_n_fit") were
selected to make the real index of the fit larger than the underlying data. This difference was intentional
introduced to minimize the convergence problems described above. It is worth noticing that the magnitude of
the difference between the experimental data and fit is similar to the differences between the various sources
of experimental measurements.
After running the parameter sweep, the script will plot the scattering cross section for each material as a
function of mesh size. As expected, both simulations converge to the analytic solution as the mesh becomes
smaller, but the simulation using the CRC model converges more quickly. A 2 nm mesh (pink link) is sufficient
to give reasonably accurate results when using the CRC material fit, while the Johnson and Christy data
material fit requires 0.75nm mesh (yellow line) to achieve a similar level of accuracy.
Material database (DEVICE) 277 The Materials Database allows you to manage (create,
Default DEVICE material database 278 modify, delete) the materials that are available for use in
your DEVICE electrical or thermal simulations.
Material interface 280 The material interface allows you to assign boundary
conditions (electrical and/or thermal) at the interface
between different materials.
DEVICE Material models 285 See this section for information on the available
Semiconductors 288 electrical and thermal material models; insulators,
Creating a new semiconductor material 298 semiconductors, conductors, binary alloys and fluids.
Calculating the effective density of states 301
Alloy material model 303
Fluid material model 311
Mesh order (DEVICE) 313 See this section for information on the mesh order
property, which defines the meshing behavior (priority)
for overlapping objects.
Objective
The Materials Database allows you to manage (create, modify, delete) the materials that are available for use in your
simulations.
See Also
Default optical material database 217
Getting material data from the database 219
Introduction
The Materials Database allows for the definition of complex materials using parametrized models. The Material
Database stores the material data to be used in the simulation. It also provides an interface to change material
properties like color, mesh order, and model parameters.
Import
The IMPORT button allows users to import material data via DEVICE simulation files (.ldev).
Material list
The material list shows the materials stored in the material database. A number of materials are provided with the
product installation. To create additional materials, use the ADD button. You can also modify some of the material
properties (name, color, mesh order, etc) in the list view. A copy of the database is stored in each simulation file. A
change to the database in one file does not automatically change the materials in any other files.
Material Properties
Use the Material properties window to view and edit the material model parameters. For model parameter definitions,
see DEVICE material models 285 .
Overview
This section describes the DEVICE materials database.
Associated File
device_default.ldev
See Also
DEVICE material Models 285
Introduction
The default material database of DEVICE includes a number of common materials used in electrical and thermal
simulations, including conductors, insulators, semiconductors, and fluids (air). When starting a new project, the
default database will be loaded. The default materials cannot be edited directly, however changes made to the
materials will be saved with the project. If you wish to modify one of the default materials, the default project file must
be edited.
The material database can be accessed through the Materials button on the main toolbar. In the material
database, materials are listed in the table, which identifies the material name and type, as well as other properties.
Below the material table, the properties for the currently selected material are displayed.
Base semiconductors
Alloys
Insulators
Metals
Ag (Silver) - CRC
Al (Aluminium) - CRC
Au (Gold) - CRC
Cu (Copper) - CRC
Fluid
Air
Note:
All fluid materials are treated as insulators in the electrical (CHARGE) simulation. And the materials are defined
by the permittivity.
The interface properties are important when modeling the behavior of a semiconductor material in the CHARGE
solver or when modeling the heat transfer at the interface of two different materials. Certain interfaces can also be
used define boundary conditions for the simulation, therefore, it is important to understand the effect of the choice of
interface properties. There are two types of interface properties in DEVICE. Electrical interface which applies to the
'CHARGE' solver and thermal interface which applies to the 'HEAT' solver. By using the 'Add' and 'Delete' button,
users can add or remove an interface property between two materials.
Material Interfaces
The surface recombination process that models the charge behavior at the interface acts effectively like a
current source or sink. Electrons and holes interact with impurity trap states at the surface, and recombine.
Therefore, a surface recombination rate specifies a Neumann (or derivative) boundary condition on the charge
density. For details on the surface recombination model used in DEVICE and the procedure for calculating the
model parameters from the trap state properties, please consult the 'surface recombination' section.
Surface recombination
Trap-Assisted Model
Like bulk Shockley-Read-Hall (SRH) recombination, the presence of deep-level trap states at the
ENABLE MODEL: Enables the temperature dependent surface recombination velocity model
T h
A(T ) = A(300)( )
300
where, A(T) is the surface recombination velocity at temperature T and ETA is the index of the power
law.
APPLY TO MAJOR CARRIERS: Enabling this options applies the surface recombination for both
majority and minority carriers. If disabled then surface recombination is applied to minority carriers
only.
TRAP Ei OFFSET (eV): Energy offset of the trap level from the mid-gap energy level (Ei).
Semiconductor-Conductor
In a DEVICE simulation, conductors specify both charge and electrostatic boundary conditions. Due to the
nature of the equations required to describe the physical behavior of the semiconductor, the charge density for
both electrons and holes must be specified explicitly on at least on surface in the system. Generally, this is
accomplished by specifying the majority carrier concentration.
On conductor surfaces where an interface model (surface recombination) is specified, the model should not be
applied to the majority carriers. This is accomplished by un-checking the "Apply to majority carriers" option,
which is the default for a newly added interface. This assumption is appropriate at a conductor interface where
the doping concentration is large: the relative change in the carrier densities due to recombination may be
large in for the minority carriers, but will typically be negligible for the majority carriers. Therefore, the physical
behavior of the interface is correctly modeled by applying the surface recombination model to the minority
carriers, while fixing the majority carriers at their equilibrium density, which in turn specifies a necessary
boundary condition.
Semiconductor-Insulator
Unlike conductors, insulator (e.g. oxide) boundaries are not used to specify charge boundary conditions in a
DEVICE simulation. In addition, insulator interfaces may not be associated with large doping concentrations.
Therefore, when specifying the properties for an insulator interface, it is correct to ensure that the "Apply to
majority carriers" box is checked. This will ensure that the density of both the majority and minority carriers at
the insulator interface are adjusted according to the surface recombination model.
HEAT FLUX: If enabled, this sets the heat flux at the interface between two materials. This option can be
used to define a cooling (or heating) boundary condition at the surface of an object in the simulation region.
HEAT FLUX (W/m2): Sets the heat flux through the interface.
CONVECTION: If enabled, this sets up a convective boundary condition between two materials. One of these
materials must be a fluid (e.g. Air).
AMBIENT TEMPERATURE (K): Sets the temperature of the fluid.
MODEL: There are 5 different convection models available.
For details about the convective boundary conditions see the following sub-section on convective heat transfer.
where, q is the amount of heat transferred (lost) due to convection, A is the surface area of the solid, h is
the convective heat transfer coefficient which depends on the surface type and fluid properties, Tsurf is
the temperature at the solid surface, and Tf luid is the nominal temperature of the fluid. The convection
boundary condition at the material interfaces either uses a constant value for the convective heat transfer
coefficient (h) or calculates its value from the fluid properties and the surface properties (length,
orientation, etc.) using analytic equations [1]. In the case of the analytic equations, all the material data
are evaluated at temperature (Tsurf + Tf luid) / 2.
Constant: When the "constant" model is chosen, the solver uses a constant value for the convective
heat transfer coefficient and calculates the amount of heat transfer due to convection using eq. (1).
Natural convection (vertical): This analytic model is used in cases where convective heat transfer
takes place at the surface of a vertical plate immersed in a fluid (e.g. air) that has no external force
acting on it. The motion of the fluid that creates the convective heat transfer arises solely from
temperature gradient in the fluid adjacent to the solid surface and from gravitational pull. The analytic
equation used by this model is given by,
1/ 6
k 0.670 Ra L
h = 0.68 + 4/9 ..............................(2)
L 0.492k 9 / 16
1 +
mC p
and
1/ 6
k 0.387 Ra L
h = 0.825 + 4/9 ..............................(3)
L 0.492k 9 / 16
1 +
mC p
where, k is the heat transfer coefficient of the fluid, L is the characteristics length defined by the height
of the vertical plate, is the dynamic viscosity of the fluid, Cp is the specific heat of the fluid, and RaL is
9
the Rayleigh number for length L. Eq. (2) is used for laminar flow (RaL ) and eq. (3) is used for
turbulent flow (109 L
13
). The value of the Rayleigh number for a vertical wall of height L is given by,
g br 2 C p (Tsurf - T fluid ) L3
Ra L = ............................(4)
mk
where, g is the gravitational acceleration and is the thermal expansivity of the fluid.
Natural convection (top plate): This analytic model is used in cases where convective heat transfer
takes place at the top surface of a horizontal plate immersed in a fluid (e.g. air) that has no external
force acting on it. The motion of the fluid that creates the convective heat transfer arises solely from
temperature gradient in the fluid adjacent to the solid surface and from gravitational pull. There are two
analytic equations in this model. For a hot plate (Tsurf > Tf luid), the convective coefficient is given by,
k 1/ 4
h= 0.54 Ra L ......................(5)
L
and
k 1/ 3
h= 0.15 Ra L ......................(6)
L
where, the Rayleigh number is given by eq. (4). Eq. (5) is used for laminar flow (104 L
7
) and eq.
7 11
(6) is used for turbulent flow (10 L
). For a cold plate (Tsurf < Tf luid), the convective coefficient is
given by,
k 1/ 4
h= 0.27 Ra L ......................(7)
L
where, the Rayleigh number is again given by eq. (4). This model is valid for both laminar and turbulent
flows (105 L
10
).
Natural convection (bottom plate): This analytic model is used in cases where convective heat
transfer takes place at the bottom surface of a horizontal plate immersed in a fluid (e.g. air) that has no
external force acting on it. The motion of the fluid that creates the convective heat transfer arises solely
from temperature gradient in the fluid adjacent to the solid surface and from gravitational pull. The
equations used in this model are similar to the ones used for natural convection on the top surface of a
horizontal plate with the difference that for a hot plate (Tsurf > Tf luid), the convective coefficient is given by
eq. (7) and for a cold plate (Tsurf < Tf luid), it is given by eqs. (5) and (6).
Forced convection: This analytic model is used for convection on a solid surface immersed in fluid
(e.g. air) where the fluid is flowing due to an external force. For example, the fluid flow can be forced by
a fan or a pump. The average convective heat transfer coefficient for a plate length of L is give by,
1/ 2
2k 0.3387 Pr 1 / 3 Re L
h= .......................(8)
L 2 / 3 1/ 4
0.0468k
1 +
mC p
and
2k 1 / 3
h=
L
( 4/5
)
Pr 0.037 Re L - 871 .......................(9)
rv fluid L
Re L = .........................(10)
m
5
where vf luid is the velocity of the fluid. Eq. (8) is used for the case of laminar flow (ReL ) and eq.
(9) is used for the case of mixed flow (laminar + turbulent) in the range ReL > 5.105.
RADIATION:
AMBIENT TEMPERATURE (K): Sets the temperature of the surrounding environment.
EMISSIVITY (a.u.): 1 for black-body radiation and <1 for gray-body radiation.
Heat transfer due to radiation is calculated using the Stefan-Boltzmann law given by,
q = A es (Tsurf - Tenv )
4
where, q is the heat loss due to radiation, A is the surface area, is the emissivity of the solid, is the
Stefan-Boltzmann constant, Tsurf is surface temperature and Tenv is the temperature of the surrounding
environment.
Reference
1. F. P. Incropera, D. P. DeWitt, T. L. Bergman, and A. S. Lavine, "Fundamentals of Heat and Mass
Transfer," John Wiley & Sons, 6th edition, 2006.
Electrical Properties
The material models used to define the electrical properties of materials fall into one of five general classes:
conductors, insulators, semiconductors, alloys, and fluids.
Conductor
Conductors are treated as perfect electrical conductors in a DEVICE simulation. Therefore, the electrostatic
potential is constant over the entire domain of the conductor. Conductors are used to specify electrostatic
boundary conditions, and must be associated with a contact in an electrical simulation.
Insulator
Materials that are defined as insulators are treated as ideal electrical insulators with a constant isotropic DC
permittivity. Insulators contain no free charge, and specify flux boundary conditions in an electrical simulation.
Semiconductor
Semiconductors, like insulators, are band gap materials. The band gap of a semiconductor is typically small
enough to allow a significant fraction of electrons to be thermally excited from the valence band to the conduction
band at room temperature (300K). The band gap for a semiconductor typically ranges from 0.5-1.5eV. When
energetically excited to a conduction band state, electrons leave behind a positively charged mobile vacancy,
known as a hole, which behaves much like a free electron in the semiconductor. The mobility of the electrons and
holes and the rates at which they are generated and recombine are determined by the models described in this
section.
Binary Alloy
Binary Alloys consist of two semiconductors. The bandgap and other properties for alloys are determined from the
properties of the semiconductors it consists of.
Fluid
Liquid and gaseous materials are defined as fluids in the material database. In the CHARGE solver, fluids are
treated as insulators. They contain no free charge, and specify flux boundary conditions in an electrical
simulation.
Thermal Properties
The material models used to define the thermal properties of materials fall into one of two general classes: non-
fluids (which includes conductors, insulators, semiconductors, and alloys) and fluids.
Non-Fuild
This includes semiconductors, conductors, alloys, and insulators. All these material types are defined using
similar models describing their density, specific heat, thermal conductivity, and electrical conductivity.
b
T
-1
300
c L (T ) = c L ,300 + c1 b
T c
+ 1
300 c L ,300
where, CL(T) is the specific heat at temperature T, CL,300 is the specific heat at 300 K, and c 1 is a constant.
THERMAL CONDUCTIVITY (W/m/K): The thermal conductivity of the material in SI unit. Can be defined
as a constant value or using a temperature dependent model. The temperature dependence of thermal
conductivity of solids is modeled using the following equation,
h
T
K L (T ) = K 300
300
where, KL(T) is the thermal conductivity at temperature T, K300 is the thermal conductivity at 300 K, and is
a constant.
-1
1
s (T ) = {1 + a (T - T0 )}
s0
where, (T) is the electrical conductivity at temperature T, 0 is the electrical conductivity at temperature
T0, and is a constant.
Fluid
Fluid material details
Electronic Properties tab
RELATIVE DIELECTRIC PERMITTIVITY
Rspecific
r (T ) = P
T
where, (T) is the mass density at temperature T, P is the pressure, and Rspecif ic is the specific gas
constant.
SPECIFIC HEAT (J/kg/K): The specific heat of the fluid in SI unit. Can be defined as a constant value or
using a temperature dependent model. The temperature dependence of specific heat of fluids is modeled
b
T
-1
300
c L (T ) = c L ,300 + c1 b
T c
+ 1
300 c L ,300
where, CL(T) is the specific heat at temperature T, CL,300 is the specific heat at 300 K, and c 1 is a constant.
THERMAL CONDUCTIVITY (W/m/K): The thermal conductivity of the fluid in SI unit. Can be defined as
a constant value or using a temperature dependent model. The temperature dependence of thermal
conductivity of fluids is modeled using the following equation,
h
T
K L (T ) = K 300
300
where, KL(T) is the thermal conductivity at temperature T, K300 is the thermal conductivity at 300 K, and is
a constant.
DYNAMIC VISCOSITY (Pa.s): The dynamic viscosity of the fluid in SI unit. Can be defined as a
constant value or using a temperature dependent model. The temperature dependence of dynamic
viscosity of fluids is modeled using the Sutherland's formula,
T3 2
m (T ) = C1
T +S
where, (T) is the dynamic viscosity at temperature T, S is the Sutherland's constant for the particular fluid,
and C1 is given by,
C1 = m 300 (300 + S )
THERMAL EXPANSIVITY (1/K): The thermal expansivity of the fluid in SI unit. Can be defined as a
constant value or using a temperature dependent model. The temperature dependence of thermal
expansivity of fluids is calculated using the ideal gas law that gives,
b =a
T
where, is the thermal expansivity at temperature T and is a constant whose value is 1 for ideal gases.
Work Function
In a semiconductor, the work function s describes the energy cost of removing an electron from the intrinsic
energy level (the Fermi energy of the undoped semiconductor) and placing it at "infinity." A related value is the
electron affinitiy s, which is the energy cost of removing an electron from the conduction band edge.
EG k BT N C
c s = fs ,i - + ln
2 2 NV
where EG is the band gap and NC and NV are the effective density of states in the conduction band and valence
band, respectively.
Effective Mass
To account for the influence of the crystal lattice potential of the semiconductor, electrons and holes can be
approximated as free charges with an effective mass (relative to the electron rest mass) that depends on the
electronic band-structure of the material. In DEVICE, the effective mass is treated as a parameter of the material
model.
The temperature variation in the effective mass can be accounted for with a quadratic model
mn*, p (T ) = mn*, p (0) + aT + bT 2
where coefficients and , and the effective mass at T=0K are inputs to the model.
Related to the effective mass is the effective density of states in the conduction and valence bands
3/ 2
2 pmn* k BT
N C = 2
h2
3/ 2
2 pm*p k BT
NV = 2
h 2
where h is Plancks constant.
Band Gap
A key physical property of the material is the band gap, which, like the effective mass, is derived from the
electronic band-structure of the material. In DEVICE, the band gap energy is treated as a parameter of the
material model.
The temperature variation in the band gap can be accounted for with a "universal" empirical model
aT 2
EG (T ) = EG , 0 -
b +T
where coefficients and , and the band gap energy at T=0K are inputs to the model.
The Slotboom model [1] for band gap narrowing is provided in DEVICE to account for this effect,
N+ + N- N + + N A-
DEG = -V1 ln D A
+ ln 2 D + C
N 0 N0
where the coefficients V1, N0, and C are inputs to the model, and the effect can be specified independently for
electrons and holes. Note that the sign implies a narrowing effect for positive coefficients.
Ec valley
The conduction band of semiconductors can have several valleys and by default the lowest valley is enabled for
each semiconductor in the default list of materials in the material database. For each valley, the different
semiconductor properties can be specified and by default only those from the lowest valley are used. The user
can choose to change this by picking between the L, X or Gamma valleys.
Mobility
The mobility parameter in the drift-diffusion equations is the physical link between the motion of carriers (electrons
and holes) and the semiconductor material. The mobility can be viewed as a measure of how readily electrons
and holes can move through the crystal lattice of the semiconductor. In the absence of any interactions with the
lattice, impurities, or other carriers, electrons and holes would move freely in the periodic potential of the lattice;
interactions that change the momentum of the carriers are termed scattering events. Different types of scattering
contribute to the mobility of the electrons and holes, including
lattice scattering,
ionized and neutral impurity scattering, and
carrier-carrier scattering.
In addition, the velocity of the carriers is observed to saturate at high-fields. Each of these scattering mechanisms
can be addressed in DEVICE by applying the appropriate models, which are detailed in the following sections.
Lattice Scattering
The fundamental process that impedes the free motion of the carriers in the lattice is thermal scattering off of the
lattice itself. The mobility due to lattice scattering is treated as a basic input into the DEVICE semiconductor
model, and may be entered as a constant value or with a temperature dependence described by the "universal"
temperature model,
h
T
A(T ) = A(300)
300
where A(300) is the value of the parameter at T=300K, and is a temperature exponent. In the case of the lattice
scattering mobility L, the temperature dependence reads
h
L L T
m (T ) = m
n, p n, p (300)
300 .
where subscripts n and p refer to electrons and holes, respectively.
For general modeling purposes, the Caughey-Thomas model or Masetti models are often sufficient, and
coefficients are available for multiple semiconductor materials. The Klaassen model is primarily tuned for silicon
at T=300K, and coefficients for other materials are not available. At moderate doping densities, the mobility
predicted by all models reduces to that of the Caughey-Thomas model.
where N is the total doping concentration (N = NA + ND ), L is the lattice scattering mobility (as determined from
the model chosen in the previous section), and min, Nref, and are temperature-dependent coefficients
described the universal temperature model.
To account for extremely large doping concentrations, the Masetti model can be selected, which adds a
correction to the Caughey-Thomas model for large N:
m nL, p - m nmin
,p m n( 2, p)
m nLI, p = m nmin
,p + a
- b
1 + ( N / Cr ) 1 + (Cs / N )
.
Again, N is the total doping concentration (N = NA + ND ) and L is the lattice scattering mobility. Parameters min,
(2), Cr (replacing Nref of the Caughey-Thomas model), Cs , , and are each temperature-dependent coefficients
described the universal temperature model.
Finally, the mobility model proposed by Klaassen can be used to account for the aforementioned doping effects
(at moderate and high impurity concentrations), as well as the influence of carrier-carrier scattering. The Klaassen
model combines the basic lattice scattering with the impurity and carrier-carrier scattering using Matthisens rule
1 1 1
LIC
= L
+ IC
m n, p mn, p mn, p
where L is the lattice scattering mobility and IC is Klaassens impurity and carrier-carrier (IC) scattering
mobility. The formulation of the IC scattering mobility is complex and involves multiple levels of coefficients and
models accounting for
majority carrier scattering by dopants,
minority carrier scattering by dopants, and
electron-hole scattering.
To begin, the IC mobility is defined as a function of the dopant and carrier concentrations,
2
+
,
(
, , , =
,
)
,
1
+
, ,
- .. -
..
, , , , , , ,
where L is the lattice scattering mobility, and coefficients min, Nref 1 (equivalent to Nref or Cr), and are defined
as for the Caughey-Thomas or Masetti models. Note that the Klaassen model accounts for temperature
dependence separately, therefore constant a constant value should be used for the lattice scattering mobility.
N A-
N A = N A- +
(
C A + N ref , A / N A- )
2
The "effective scattering densities" are defined as (using the same clustering-corrected acceptor and donor
concentrations)
p
N nsc.eff . = N D + G (Pn )N A +
F (Pn )
n
N psc.eff . = N A + G (Pp )N D +
F (Pp )
The function G describes the ratio of scattering cross-sections between repulsive and attractive screened
Coulomb potentials as a function of the factor P (itself a function of carrier density and majority dopant density).
The factor P accounts for the screening effect, and is calculated as the weighted harmonic mean of two
parameters accounting for the free-carrier and ionized impurity screening,
-1
f CW f BH
Pn ( N D , n ) = +
PCW ,n ( N D ) PBH ,n (n )
-1
f CW f BH
Pp ( N A , p ) = +
P (N ) P ( p )
CW , p A BH , p
Weights fCW and fBH are coefficients of the model.
The same factor P is used in the calculation of the function F, which describes the mobility ratio between
stationary, infinite-mass secondary scatters (e.g. ionized impurities) and mobile, finite-mass secondary scatters
(e.g. free carriers). Both functions F and G are parameterized fitting functions to physical processes, and the
coefficients of those functions (r1 to r6 for function F and s 1 to s 7 for function G) are also coefficients of the model.
High-Field Mobility
As the electric field within the semiconductor increases, the drift-velocity of the carriers is commonly observed to
saturate, reducing the mobility accordingly. To account for this effect, DEVICE includes high-field mobility models
that describe the monotonic (silicon-like) or overshoot (GaAs-like) velocity saturation behaviour. The monotonic
model is
mnLIC
,p
mnLICE
,p = 1/ b
m LIC F b
n, p n, p
1 + v sat
n, p
where LIC is the mobility accounting for lattice, impurity, and carrier-carrier scattering (as calculated using the
active models for those processes) and vsat is the model coefficient that determines the saturation velocity. F is
the driving field, which may be defined as the magnitude of the quasi-Fermi level gradient or the component of the
electric field in the direction of the current density.
transition and neutralizes a hole in the valence band. Generation describes the complementary behavior, where
an electron is excited from the valence band to the conduction band, creating a hole in the process (often, the
term electron-hole-pair is used when referring to generation). The models for bulk recombination and generation
processes relate to the physical mechanisms by which the carriers make the energetic transition. DEVICE
provides models describing
trap-assisted (Shockley-Read-Hall) recombination,
Auger recombination,
radiative recombination,
impact ionization, and
band to band tunneling.
These models and their parameterizations are the subject of the following sections.
DEVICE provides a temperature dependent model for the SRH carrier lifetime, as well as models that include
corrections for doping density and field effects. The general form of the carrier lifetime can be expressed as
t n0, p (T ) f ( N )
t n, p (T , N , F ) =
1 + g (T , F )
where f is a function of the total dopant concentration N and g is a function of the magnitude of the applied field F.
The basic temperature-dependent model for the carrier lifetime follows the usual power-law relation
hn , p
T
t nsrh ,0
, p (T ) = t nsrh ,0
, p (300)
300
Alternately, a constant value can be supplied for both electrons and holes.
To account for doping concentration effects, DEVICE provides two correction models that use the previous
expression for the SRH carrier lifetime as an input. First, a modified model in the form proposed by Fossum is
described by
t nsrh
,p
,0
N A + ND
t nsrh
,p = s n,p
, where N n , p =
a n, p + b n, p N n, p + g n, p N n, p N nref, p
The original model of Fossum can be obtained by setting coefficients , , and to one (1) and setting to zero
Alternately, a formulation proposed by Klaassen can be selected, where the SRH carrier lifetime correction is
given by the equation
s n,p
t nsrh
,p
,0
T N A + ND
t nsrh
,p = srh, 0 , where N n , p =
1+ a t
n, p n, p N n, p 300 N nref, p
Note that this model explicitly includes the temperature dependence, and should only be used in concert with a
constant value for the baseline SRH carrier lifetime.
To account for field effects, either the Hurkx [5] or Schenk [6] model may be selected. These models represent
the corrections for trap-assisted tunneling, where carriers can transition to a deep-level trap state by tunneling
through an electrostatic barrier.
Hurk x Model
The correction term g(F) for the Hurkx model (referred to as in the reference) is
~ 1 ~
[
gn = DEn exp DEn u - Kn u 3 / 2 du ]
0
where is the carrier index (n or p),
~
DEn = DEn / kT
0 E Fn > EC
DEn = EC - E Fn ET < E Fn EC
E -E E Fn ET
C T
(and a similar expression for holes), and
* 3
4 2m DEn
Kn =
3 qhF
Schenk Model
The correction term g(F) for the Schenk model is
- 1/ 2
(h )3 / 2 E - E
g = 1 + t 0 (h )3 / 4 Et - E0 1/ 4 h 3 / 2 ( )
E h 2 E E kT
0 0 0 t
E -E h - kT E + kT/ 2 E E E
exp - t 0+ 0 + t ln t - 0 ln 0
h 2h h h
0 0 0 R 0 R
Et - E0 E - E 3 / 2
exp exp - 4 t 0
kT 3 h
where the electro-optic frequency is
(
Q = q 2 F 2 / 2hmt )
1/ 3
E0 = 2 e F [ e F + Et + e R - e F - e R ]
with
eF =
(2 e R kT )2
(hQ )3
and
e R = Sh w0
which is the product of the optical phonon energy h 0 and the Huang-Rhys (coupling) factor S. The trap energy Et
is referenced to the valence band edge, and is computed from the mid-gap offset specified for the trap-assisted
tunneling model.
Auger Recombination
Auger transitions are three-particle transitions (two carriers scatter and transfer energy and/or momentum to a
third carrier) that describe four related processes, which are illustrated in the figures below. Each process has an
associated rate coefficient. According to the principle of detailed balance, the net rate for each type of carrier
must be zero at equilibrium, such that
CcnAU ni2 = CenAU and CcpAU ni2 = CepAU
Assuming that the value of the rate coefficients does not change as the system moves from equilibrium, the net
Auger recombination rate is
( )(
RAU = CcnAU n + CcpAU p np - ni2 )
Note that Auger transitions depend only on carrier density, differentiating them from other recombination
processes.
DEVICE supports three models for the capture rate coefficients, including
the universal temperature model proposed by Klaassen,
an empirical model by White accounting for a reduction in the recombination rate at high carrier concentrations,
and
a model by Clugston and Basore accounting for both high and low injection conditions.
The universal temperature model proposed by Klaassen takes the usual power-law form,
n,p
0 T
Cn,p = Cn,p( 300 )
300
and is suitable for devices where Auger recombination is moderate (low injection conditions). The Auger rate
coefficients are only weakly dependent on temperature, and constant values may be used as well.
An alternate empirical model proposed by White can be used as a correction to the previous model, taking that
coefficient as an input. The White model accounts for the reduction in the Auger recombination rate observed at
high carrier densities (due to strong screening effects), and is expressed as
0
Cn0 Cp
Cn = , Cp =
1 + an 1 + ap
where the coefficient determines the transition density.
A related model proposed by Clugston and Basore is designed to account for the two regimes related to minority
carrier injection:
N D CnHI p
Cn = Cn0 +
ND + p 2 N D + p
HI
0 NA Cp n
C p = C p +
NA + n 2 N A + n
DEVICE will use the Auger capture rate coefficient defined in the Klaassen model (or a constant value) for the low
injection conditions, and apply a second coefficient when strong minority carrier injection dominates according to
the preceding formulations.
Radiative Recombination
In a radiative transition, a conduction band electron will relax directly, emitting a photon whose energy
approximately equals that of the band gap, and then recombine with a hole in the valence band. The opposite
process occurs when a photon is absorbed by an electron in the valence band, promoting it to the conduction
band and leaving a hole in its place. Radiative recombination transitions are typically significant only in materials
with a narrow bandgap, or a bandstructure that permits direct transitions in momentum (e.g. GaAs). Radiative
recombination is typically negligible in bulk silicon.
The recombination rate is determined from the product of a capture rate coefficient and the carrier density
product,
ROPT = CcOPT np
and the corresponding generation rate is simply the emission rate constant,
GOPT = CeOPT
Once again, the coefficients are related by the principle of detailed balance at thermal equilibrium, such that
(
ROPT = CcOPT np - ni2 )
The optical capture rate coefficient can be modeled in DEVICE either as a constant or using the universal
temperature power-law,
h
OPT OPT T
C c (T ) = C c (300)
300
Impact Ionization
Impact ionization is a carrier generation process where an electron or hole, accelerated by a high field, will relax
by transferring energy to the lattice. When energy exceeding the band gap is transferred to the lattice, an
electron-hole pair is excited (and separated by the strong local field), generating additional free carriers. Above a
critical threshold, this process leads to avalanche breakdown.
E crit. bn
an = a n exp - n
Fn
The impact ionization process is exponentially dependent on the driving field F (either the quasi Fermi level
gradient or electric field component in the direction of the current density) and moderated by the critical field Ecrit .
Note: the impact ionization process is exponentially dependent on the electric field and the local variations in the
quasi-Fermi levels (through the current density). Consequently, it is a highly non-linear process, and it's inclusion
in the physical model for the semiconductor can cause divergences in the simulation. By default, the impact
ionization process is not enabled. When simulating avalanche breakdown, ensure that adequate steps are taken
to ensure simulation convergence, including reducing step size, increasing iteration limits, and enabling gradient
mixing.
Hurk x Model
The Hurkx model for band to band tunneling takes the form
F
Rbbt = - BF s D exp - 0
F
where B is a scaling parameter, F the magnitude of the electric field, F0 the critical field,
2 direct
s =
5 / 2 indirect
and
np - ni2
D=
(n + ni )( p + ni )
Schenk Model
The Schenk model is similar in form to the Hurkx model, but with explicit reference to phonon-assisted tunneling.
m -3 / 2 Fcm F
cF ( )
exp -
F
Fc
( ) -3 / 2
exp - c
s
Rbbt = AF D + F
hw hw
exp TA - 1 1 - exp - TA
kT kT
where F the magnitude of the electric field, A is a scaling factor, = 7/2 for indirect transitions,
np - ni2
D=
(n + ni )( p + ni )
and the critical field
(
Fc = B E g h wTA )3 / 2
with the acoustic phonon energy h TA.
References
1. Slotboom, J.W., Solid-State Electron., 20, 279 (1997)
2. Caughey, D. M. and Thomas, R. E., Proc. IEEE, 52, 2192 (1967)
3. Masetti, G., et al., IEEE Trans. Electron Devices, ED-30, 764 (1983)
4. Klaassen, D. B. M., Solid State Electronics, 35, 953 (1992); Klaassen, D. B. M., Solid State Electronics, 35,
961 (1992)
5. Hurkx, G. et al., IEEE Trans. Electron Devices, 39, 331 (1992)
6. Schenk, A., Sol. Stat. Elec., 35, 1585 (1992)
7. Selberherr, S. Analysis and Simulation of Semiconductor Devices, Springer Verlag, Vienna (1984)
8. Schenk, A. Sol. Stat. Elec., 36, 19 (1993)
Objective
This section describes how to create a new semiconductor material model in the material database. For details on
the Semiconductor material input parameters, see the Semiconductor 288 material model page.
See Also
Electrical material database 278
Semiconductors 288
Calculating the effective density of states 301
Defining material interfaces for semiconductors 280
Introduction
While the electrical material database contains models for many common semiconductors, it may be necessary to
add new semiconductor models for different systems. This section will describe how to set the parameters
necessary for a minimal semiconductor model. A new semiconductor can be added to the material database by
opening the material database and choosing the "Semiconductor" option from the "Add" button menu. The newly
defined semiconductor can be named and a color can be chosen to represent the material in the layout.
Electronic Properties
When a new semiconductor material is created, the first tab in the material properties displays the
fundamental electrical properties of the semiconductor. These include the basic properties that define the
electronic behaviour of a semiconductor, including the relative dielectric permittivity, effective mass, and band
gap. Both the effective mass and band gap can be visualized directly in the material database.
Minimum settings:
The minimum set of fundamental properties required to define a semiconductor include
relative dielectric permittivity,
intrinsic work function
Fundamental
Minimum settings:
effective mass of the electrons and holes, and
band gap energy.
Each of these values may be entered as constants. Note that the relative dielectric permittivity is assumed to
be the DC value and is related to the material index as r = n2. Often times the effective density of states is
known, while the effective mass is not: to convert from effective density of states to effective mass, please refer
to the section on calculating the effective density of states 301 . To verify the effective mass and band gap
values, the intrinsic carrier density ni is automatically calculated at T = 300K,
ni = N C NV e - EG / 2 kT
Additional Settings:
In addition to specifying the properties described above, temperature dependences may be specified for the
effective mass and band gap by clicking on the adjacent buttons "f(T)". This action will bring up a parameter
editor which displays the associated formula. A band gap narrowing model can also be specified by choosing
the "Slotboom" model from the list of choices. This model will correct the band gap energy with respect to the
net dopant concentration. The band gap can be visualized in the adjacent plot to verify its behaviour.
Mobility
The mobility must be defined for both the electrons and holes, and can include corrections for temperature
dependence, impurity (dopant) and free carrier scattering, and velocity saturation.
Minimum settings:
The minimum definition for a semiconductor material must include a constant lattice scattering mobility for
both the electrons and holes. These values can be entered as constants.
Additional settings:
The basic mobility may be modified by a temperature dependence, whose model can be accessed by
selecting the adjacent "f(T)" button. In addition, corrections to the mobility can be enabled for impurity and free
carrier scattering effects using a choice of models. The parameters for the models and their formulas can be
accessed by clicking the "..." button next to the model selection.
Note: For a basic correction to the mobility that accounts for doping, choose the "Caughey-Thomas" model.
Parameters for this model are available for many common semiconductors.
Note: The Klaassen model for the impurity and free-carrier scattering is only well parameterized for silicon,
and is not recommended for other materials.
In addition to corrections to the mobility based on doping density, velocity saturation may be enabled by
specifying a saturation velocity for both electrons and holes.
NOTE: A basic semiconductor model does not require recombination and generation models for the bulk
or surface. A new semiconductor material will be defined without any defined surface interfaces, and in this
case, the default behaviour (ideal surfaces) will be used. For more information on defining surface interface
properties, please see the section on Material interface 280
Objective
This section describes how to calculate the effective density of states using the material properties of a
semiconductor.
See Also
Semiconductor model 288
Creating a new semiconductor material 298
Introduction
Often the effective density of states is known for a material, while the effective mass is not. In the electrical
material model for a semiconductor, the effective mass is specified. This section describes the relation
between the two properties and illustrates how to set the semiconductor model properties to reflect a known
effective density of states.
Background
The effective density of states comes from the fundamental definition of the free carrier density in a solid,
n = N ( E ) f ( E )dE
Ec
Ev
p = N ( E )[1 - f ( E )]dE
-
which depends on the density of states N(E). The density of states (DOS) is determined by the electron
structure of the solid. For typical semiconductors, a uniform bulk material with a single conduction band is
assumed. Free electrons (holes) are assumed to occupy only the lowest (highest) energies, such that the
parabolic band approximation can be applied, and the carriers can be assigned a constant effective mass. As
a result, for a 3D bulk system,
2NC
n= F1/ 2 (hc )
p
2 NV
p= F1/ 2 (hv )
p
where F is the Fermi-Dirac integral of order 1/2, and NC,V is the effective DOS,
3/ 2
2 p mn* k BT
N C = 2
h2
3/ 2
2 p m*p k BT
NV = 2
h 2
which depend on the density of states effective masses m*n,p (the density of states effective mass is the mean
of the anisotropic band effective masses).
References
1. Pirret, Robert, Advanced Semiconductor Fundamentals, vol 4., 2nd ed. Prentice Hall (2003)
Base materials: Pick two semiconductors that the alloy consists of. The first semiconductor will assume fraction
(1-x) and the second one, x.
Interpolation: There are two interpolation schemes used for creating the binary alloy from the two specified
semiconductors:
In this scheme, the lowest valley from semiconductor A and the lowest valley from semiconductor B are considered
and by interpolating between the two, the new valley for the alloy is calculated.
In this scheme, all valleys from both semiconductors are considered. For example, in the diagram below, we
interpolate first between the two L valleys of semiconductor A and B and then we interpolate between the two
gamma valleys of semiconductor A and B and then we take the lower valley of the two interpolation results. This is a
more accurate interpolation method. If we choose to use the multi-valley method, we should have available data for
all valleys of both semiconductors int he material database.
The actual interpolation uses Vegard's law to determine the resulting properties for each valley depending on the
fraction x of each semiconductor in the alloy. For example for band gap energy of Al(1-x)Ga(x)As, we have:
The only exception is mobility for which the reciprocal equation holds:
1 (1 - x) x x(1 - x)
= + +
m AlGaAs mGaAs m AlAs b
Electronic Properties
For everything in this tab, we are setting the bowing parameter for the corresponding property in the same
units as the property.
Recombination
For everything in this tab, we have the choice to either set the bowing parameter for the corresponding property
or use an abrupt method, which just means that instead of a smooth interpolation between the values, there
will be an abrupt change from the value in one semiconductor to the other.
References
1. Vegard, L. (1921). "Die Konstitution der Mischkristalle und die Raumfllung der Atome". Zeitschrift fr
Physik 5 (1): 1726.
NOTE: Surface recombination properties of alloys are not interpolated from the semiconductor materials but
rather are defined at the Material interface 280 for the alloy itself in a manner similar to semiconductor materials.
5.3.2.3.2.1 Alloys
Overview
DEVICE supports simulation with alloy semiconductor materials, which combine two base semiconductors (either
unary or compound) to create new semiconductor. Physically, this is typically accomplished by depositing a
material where a fraction of its constituent atoms are substituted with those of another species. An example is the
alloy of aluminium arsenide (AlAs) and gallium arsenide (GaAs): replacing some of the gallium atoms in the crystal
lattice with aluminium atoms creates the alloy AlxGa1-xAs, where x is the fractional content of aluminium.
The fundamental properties of a semiconductor (effective mass, band gap, and mobility) are extracted from the band
structure of the crystalline material. The band structure itself is a three-dimensional quantity, which typically has
minima near points of symmetry. In semi-classical methods, such as the drift-diffusion formulation, the
semiconductor properties are assumed to be independent of carrier energy, and are derived using a parabolic
approximation for the carrier energies near the band minima.
In this application note, we will describe the interpolation procedure used to derive the properties of the alloy
material. In addition, important details about how to apply and interpret the material properties are provided.
Interpolation
Formulation
To determine the properties of the alloy semiconductor, the properties and behavior of the base semiconductors are
interpolated according to the formula
where x is the fractional content of species B and C is the bowing parameter. The fractional content x may vary as a
function of position (as in a graded heterojunction). The bowing parameter C can be used to specify quadratic
behavior for the interpolation function.
Figure : a comparison of the band gap energy for the silicon germanium alloy in the
multi valley and single valley models
In the alloy of two different materials, the symmetry points of the lowest energy conduction band minima for the base
semiconductors may be the same for both (e.g. InGaAs) or different (e.g. SiGe). There are two choices to interpolate
the properties of the base semiconductors
Multi-valley: interpolate the properties each pair of conduction band minima independently, then choose those from
the lowest-energy minima
Single-valley: interpolate the properties of the lowest energy conduction band minima from each base material,
ignoring differences in the location (nearest point of symmetry).
Typically, the first choice (multi-valley) is the most physically realistic; however, single-valley interpolation is useful
for strained materials (e.g. SiGe) and materials where information about the higher energy conduction band valleys is
not available.
Abrupt Transitions
For certain combinations of base semiconductors using the multi-valley selection model, properties or model
parameters may be unavailable for the higher-energy bands. This can be indicated in the material properties by
setting the parameter to zero.
In the example screenshot below, the electron mobility for the higher-energy conduction band valley for AlSb is set
to zero. Alloys with AlSb that mix the valley properties will not interpolate this parameter instead, the electron
mobility for the other base semiconductor will be used for all composition fractions.
Figure : Electron mobility set to zero disables interpolation with that parameter
A second case relates to the transitions between direct and indirect band-gap materials, when multi-valley
interpolation is selected. In this scenario, the coefficients of the recombination rate models may be expected to
change abruptly. An example of this behavior is the radiative recombination rate, which will be much larger for a
direct band gap material than an indirect material. In this scenario, it is more accurate to use two different values for
the recombination rate coefficient, depending on the direct or indirect nature of the band gap.
To account for this behaviour, the interpolation for recombination rate properties can be disabled by choosing abrupt
interpolation. With that selection, the coefficients are chosen directly from the base semiconductor whose active
(lowest energy) conduction band is the active valley for the alloy. An example of the electron lifetime for AlxGa1-xAs
is compared to the band gap in the figure below. When the alloy transitions from the direct (-valley) band gap of
GaAs to the indirect (X-valley) band gap of AlAs at x=0.42, the carrier lifetime is adjusted to match that of the
corresponding material.
In the updated material models, the intrinsic work function specifies the energy difference between the vacuum
potential and the mid-gap energy level 0.5*(EC + EV). As before, this is treated as an independent input. Therefore,
the intrinsic work function continues to specify the band offsets between materials, but it is not adjusted for the
intrinsic energy level offset, which may introduce small variations in energy levels relative to previous versions. When
materials are alloyed, the energy offsets are referred to the valence band edge, and the energy offsets are
interpolated to maintain the equivalent ratio of the valence band offset to the band gap difference between the two un-
alloyed base materials.
Objective
This section describes how to create a new alloy material model in the material database. For details on the
Semiconductor material input parameters, see the Semiconductor 288 material model page. For details about the
bowing parameters, see the Alloys 303 material model page.
See Also
Electrical material database 278
Semiconductors 288
Creating a new semiconductor material 298
Defining material interfaces for semiconductors 280
Introduction
While the electrical material database contains models for many common alloys, it may be necessary to add new
alloy models for different systems. This section will describe how to set the minimum parameters necessary for a
new alloy model. A new alloy can be added to the material database by opening the material database and choosing
the "Binary Alloy" option from the "new material" button menu. The newly defined alloy can be named and a color
can be chosen to represent the material in the layout.
Binary Alloys
Once a new alloy material is created, the base materials can be selected using the pull down menus. Any two
semiconductor materials from the material database can be selected to create a binary alloy. The first
semiconductor assumes fraction (1-x) and the second one, x. Once the base materials are selected, the proper
interpolation option needs to be defined. To learn about the two interpolation options, see the Alloys 303 material
model page.
Ternary Alloys
The default material library in DEVICE contains models for many common binary alloys (defined as 'semiconductor'
type materials). These can be directly used as base materials to create ternary alloys. For example, the GaAs and
InAs material models can be used as base materials to create InGaAs. The alloy fraction will be (InAs)x (GaAs)1-x , or
Inx Ga1-x As.
Quaternary Alloys
Quaternary alloys can be created by using a binary and a ternary alloy as base materials. The binary material in
most cases will be available in the material database (defined as a 'semiconductor' type material). The ternary alloy
is however, an 'Alloy' type material created by mixing two binary alloys. Being as 'Alloy' type material, the ternary
alloy cannot be directly used as a base material for the quaternary alloy. We therefore have to create a new
'semiconductor' type material for the ternary alloy before it can be used as a base material for the quaternary alloy.
The semiconductor material properties for the ternary alloy can be calculated from its 'Alloy' type material version.
An example of how Alx Gay In1-x-y Sb can be created in DEVICE is shown below:
Creating AlxGayIn1-x-ySb
The Alx Gay In1-x-y Sb quaternary alloy can be created by mixing AlSb, GaSb, and InSb. The first step would be to
mix InSb and AlSb together to create In1-x Alx Sb. Next, the semiconductor properties of In1-x Alx Sb are extracted from
the alloy material model and are used to create a 'semiconductor' material model for it. Finally, the semiconductor
model of In1-x Alx Sb is mixed with GaSb to get Alx Gay In1-x-y Sb.
on the available analytic model please refer to the Material interface 280 page.
NOTE: The fluid material is designed to be used by the HEAT solver to model convective heat transfer into and
out of the simulation structure. It can however be also included in the electrical simulation by the CHARGE
solver. In such cases, the CHARGE solver treats the fluid material as an insulator and it is described by its
relative dielectric permittivity.
Electronic Properties
The fluid material is designed to be used by the HEAT solver to model convective heat transfer into and out of the
simulation structure. It can however be also included in the electrical simulation by the CHARGE solver. In such
cases, the CHARGE solver treats the fluid material as an insulator and it is described by its (DC) relative
dielectric permittivity.
Thermal Properties
The thermal material model of fluids include,
Mass density: The mass density of the fluid is simply defined as the mass of the fluid per unit volume. The unit
is kg/m3. In the case of gases, the mass density can be defined as a function of temperature as discussed here
285 .
Specific heat: The specific heat, also known as the heat capacity of thermal capacity of the fluid is defined as
the ratio of the heat added to (or removed from) a fluid to the resulting temperature change. The unit is J/kg K.
The specific heat of fluids can be defined as a function of temperature as discussed here 285 .
Thermal conductivity: The thermal conductivity of a fluid is a property that quantifies its ability to conduct heat.
The unit is W/m K. The thermal conductivity of fluids can be defined as a function of temperature as discussed
here 285 .
Dynamic viscosity: The dynamic viscosity of a fluid is defined as a resistance to the movement of the fluid when
multiples layers in the fluid move at different velocities. The unit is Pa s. The dynamic viscosity can be defined
as a function of temperature as discussed here 285 .
Thermal expansivity: The thermal expansivity of a fluid defines how the volume of the fluid changes with
temperature. The unit is /K. For ideal gases, the thermal expansivity can be defined as a function of temperature
as discussed here 285 .
See also
setmaterial 1672
setnamed 1588
set 1568
In the figure above, there are two objects that partially overlap. Depending on their mesh orders, the object that is
actually being simulated will be different. In the event that both overlapping materials have the same order, the mesh
order will be inferred from the Object tree. Objects at the bottom of the tree will take priority over objects at the top of
the tree. To ensure your simulation is well defined, it is recommended that you avoid situations where two different
overlapping structure have the same mesh order. To set the mesh order using script, one can user setmaterial
(material level), setnamed or set (object level).
Structures 318
This button will insert the shown structure primitive into the simulation. Pressing the arrow will show all
available primitives.
This button will add a Layer Builder group which will allow you to import GDS structure data and manipulate
the layers of the structure from the graphical user interface.
Groups 388
This button will add an analysis, container or structure group into the simulation. Pressing the arrow will allow
selection of which group to add.
Attributes 399
In FDTD Solutions and MODE Solutions, this button will insert the shown grid attribute into the simulation.
Pressing the arrow will show all available primitives.
Components 413
In FDTD Solutions and MODE Solutions, this button will open the component object library window. Pressing
the arrow will show common component categories that the library window can open with.
This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.
Analysis 479
In FDTD Solutions and MODE Solutions, this button will open the component object library window. Pressing
the arrow will show common analysis categories that the library window can open with.
This button will open a window for importing files from other programs. Pressing the arrow will allow selection
of which kind of import.
Sources 510
In FDTD Solutions and MODE Solutions, this button will insert different sources into the simulation. Pressing
the arrow will allow selection of which source to add.
In FDTD Solutions and MODE Solutions, this button will insert various monitors into the simulation. Pressing
the arrow will allow selection of which monitor to add.
In MODE Solutions, when there is an active EME solver region, this button will add additional ports to the
solver region.
This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.
This button will open a window for importing files from other programs. Pressing the arrow will allow selection
of which kind of import.
Doping 678
In DEVICE, this button will insert various doping regions into the simulation. Pressing the arrow will allow
selection of which monitor to add.
Generation 679
In DEVICE, this button will insert various generation rate objects into the simulation. Pressing the arrow will
allow selection of which monitor to add.
In DEVICE, this button will insert various monitors into the simulation. Pressing the arrow will allow selection
of which monitor to add.
This button will insert simulation or mesh override regions. Pressing the arrow will allow selection of which
simulation object to add.
This button will open a window for importing files from other programs. Pressing the arrow will allow selection
of which kind of import.
In DEVICE, this button will insert various generation rate objects into the simulation. Pressing the arrow will
allow selection of which monitor to add.
In DEVICE, this button will insert various monitors into the simulation. Pressing the arrow will allow selection
of which monitor to add.
Once the object is selected, pressing the EDIT button will bring up a window where it is possible to modify the
properties of the simulation object. The corresponding window for the circle object is shown below.
Notes:
Structure objects support Multi-object editing. If you select multiple objects then click EDIT, you can edit
properties that are common to all of the selected objects.
Monitors and sources have some global properties that apply to many objects. For example, the global source
frequency range can be applied to all sources. The global properties can be edited with the GLOBAL
PROPERTIES button.
5.4.1 Structures
Structures are shared in both optical and electrical solvers. This section lists the primitives shared by both solvers
and describes some examples of complex structures available in optical solvers.
Triangle 321
Triangular objects denote physical objects that appear triangular from above. For 2D simulations, these objects
represent triangles while in 3D these objects are extruded in the z direction to a specific height. They are actually
polygon objects, with the number of vertices set to 3.
Rectangle 323
Rectangular regions denote physical objects that appear rectangular from above. For 2D simulations, these objects
Polygon 325
Polygons allow the user to define a custom object with a variable number of vertices. The location of each vertex can
be independently positioned within a plane, and the vertices are connected with straight lines. For 3D simulations,
the object is extruded in the z dimension. In DEVICE, the vertices have to be entered in a counter clock wise
manner for the structure to be defined and meshed properly.
Circle 328
Circles denote physical objects which appear circular or ellipsoid from above. They are either circles/ellipses in 2D,
or circular/ellipsoid cylinders in 3D.
Ring 330
Ring regions represent physical objects that consist of full or partial rings when viewed from above. Rings in 3D
simulations are extruded in the z direction to a specific height.
Waveguide 338
Waveguide allows the users to create a waveguide having an isosceles trapezoidal cross section and a Bzier-
curved path.
Sphere 340
In 3D simulations, users can define spherical regions of constant refractive index through the spherical physical
object. Spherical objects only exist in 3D simulations.
Pyramid 342
Pyramids can be configured to half flat tops and/or flat bottoms, and either narrow or expand in the vertical z
direction. Pyramids are only available for 3D simulations.
The planar solid object behaves like the polygon structure, however script commands are used to specify all the
vertices and facets of the structure.
Custom primitives can be used to create customized surfaces, specified via parametric equations. The resulting
surfaces can either exist on one or more faces of the object, or can be used to define a cylindrically-symmetric
surface of revolution.
Surface 334
Surface primitives can be used to define complex material volumes that exist above or below analytically defined
surfaces. In 3D simulations, a surface (S) is defined as a function of variables u and v, i.e. S = S(u,v). The variables
(u,v) can represent (x,y), (x,z) or (y,z) depending on the surface orientation. Similarly, in 2D simulations, a surface is
defined as a function of u (S = S(u)) where u can represent x or y.
2D Rectangle 349
This is a true 2D rectangle (or a surface object), which has no thickness in the normal direction. This object can be
used with the graphene model using the surface conductivity approach 2774 .
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
See also
Structures 318
Creating rounded corners 358
Extruding a polygon with a sidewall
angle 362
For complex shapes, scripting in the structure group is usually best. Once the script has calculated the x,y
vertex positions, they can be loaded into the polygon object with a single set("vertices",V); command.
For example, use the following code to create an octagon shaped object.
# octagon properties
n_sides=8;
r=1e-6;
y=r*sin(theta*pi/180);
To modify a polygon vertex, you must get the vertices matrix, modify the vertex matrix as desired, then re-
apply it to the polygon object:
V=get("vertices");
V(1,1)=V(1,1)+1e-6; # change the x position of the first vertex by 1um.
set("vertices",V);
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Creating rounded corners 358
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Objective
This section describes how to set and get the vertex positions of a polygon object. Polygons allow the user to define
a custom object with a variable number of vertices. The location of each vertex can be independently positioned
within a plane, and the vertices are connected with straight lines. For 3D simulations, the object is extruded in the z
dimension. In DEVICE, the vertices have to be entered in a counter clock wise manner for the structure to be defined
and meshed properly.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
See also
Structures 318
Creating rounded corners 358
Extruding a polygon with a sidewall angle 362
For complex shapes, scripting in the structure group is usually best. Once the script has calculated the x,y
vertex positions, they can be loaded into the polygon object with a single set("vertices",V); command.
For example, use the following code to create an octagon shaped object.
# octagon properties
n_sides=8;
r=1e-6;
?size(V);
To modify a polygon vertex, you must get the vertices matrix, modify the vertex matrix as desired, then re-
apply it to the polygon object:
V=get("vertices");
V(1,1)=V(1,1)+1e-6; # change the x position of the first vertex by 1um.
set("vertices",V);
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Creating rounded corners 358
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Creating rounded corners 358
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Objective
This page describes a custom object. The custom tab is only available for custom primitives in MODE and FDTD
Solutions. Custom primitives are objects that are defined by equations describing the boundaries of the physical
object. The custom primitive defaults to a rectangular region upon creation, and is shaped via entry of one or more
equations in the edit window. The custom object allows you to define the y position of the object as a function of the
x position. The z position is obtained via extrusion or revolution of the y edge. (X,Y)=(0,0) corresponds to the center
of the object.
Solvers 101
FDTD
FDE
VarFDTD
See also
Structure groups 389
Custom tab
EQUATION 1: The equation, expressed as a function of x, which defines the upper y edge of the physical
object. The origin of equation is the center of the object. Suitable syntax for the equations is shown in the
Equation interpreter 214 section.
MAKE NONSYMMETRIC: Uncheck this if you want to define the lower edge with a different equation.
EQUATION 2: The equation, expressed as a function of x, which defines the lower edge of the physical
object.
EQUATION UNITS: The default units in which x and y are expressed in equation 1 and 2. For example, a
setting of microns means that both x and y are expressed in microns.
CREATE 3D OBJECT BY: Options include "extrusion", and "revolution". Extrusion results in an object that
is extruded along the z-axis (i.e. invariant in z). The revolution object is created by revolving the equation
around the x-axis, resulting in a surface of revolution.
Equation 1 and 2 are bound such that they are only defined over specific
regions. Equations which result in undefined values (1/0) result in a zero
height; any equation left blank results in a custom primitive of zero height
everywhere. Equations that go larger than the span of the object will be
clipped at the edge of the object. Equations that go negative will be clipped
at zero. In the following figure, notice how the equations are clipped at the
edge of the object.
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Objective
This page provides an simulation file containing several example structures created with the surface object, to
demonstrate the types of structures that can be created with this object.This is only available for surface primitives in
MODE and FDTD Solutions. Surface primitives can be used to define complex material volumes that exist above or
below analytically defined surfaces. In 3D simulations, a surface (S) is defined as a function of variables u and v, i.e.
S = S(u,v). The variables (u,v) can represent (x,y), (x,z) or (y,z) depending on the surface orientation. Similarly, in 2D
simulations, a surface is defined as a function of u (S = S(u)) where u can represent x or y.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
usr_surface_example.fsp
See also
Import object surfaces 489
The simulation file usr_surface_example.fsp contains several examples of surface objects that can be created
using conic, polynomial, and custom equation options. More examples of the surface objects can be found in the
object library available in FDTD solutions.
The custom tab is only available for surface primitives in MODE and FDTD Solutions. The diagrams below show how
the surface is used to create a volume of desired material.
The surface equation can contain up to three terms, conic, polynomial and custom which are added together to
create the total surface. Not all terms have to be included.
Conic term:
cr 2
S conic =
1 + 1 - ( k + 1)c 2 r 2
c = 1/R, c is the inverse of the radius of curvature of the surface at r = 0.
k is the conic constant. When k=-1 we have a parabolic surface. When k=0 we have a spherical surface.
r2 = u2 + v2.
Polynomial term:
5
S polynomial = M ij uiv j
i , j =0
Custom term:
S custom = f (u , v)
You can choose any analytic function of (u,v).
The syntax and functions available to specify the index are found in the Equation interpreter 214 section.
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
EME
See also
Complex structures - Waveguide bends 359
Bzier curves are widely used in computer graphics for the generation of smooth curves. The path of the curve, B(t),
are defined by a set of control points, called poles, P0, P1, ...., Pn and its mathematical representation is as follows:
whe
is the binomial coefficients.
re
For n=1, the curve reduces to a straight line defined by the interpolation of the points P0 and P1.
For n=3, the curves are called cubic Bzier curves, which, together with quadratic (n=2) ones, are most commonly
used . Some of the cubic Bezier curve examples are shown below.
Geometry tab
X, Y, Z: The center position of the
object
Base width, Base height, Base
Angle: The width, height, sidewall
angle of the waveguide cross
section
Poles: Positions of Bezier poles.
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
See also
Structures 318
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Creating rounded corners 358
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Objective
This section describes how to set and get the vertex positions of a planar solid object.
Solvers 101
FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
addplanarsolid 1536
The planar solid object behaves like the polygon structure, however we can only use script commands to specify the
vertices and facets of the structure. The image below shows how a facet is defined to denote positive or negative
spaces. In the shape below one facet comprises of two paths : p1=[1,3,2,5,4] , p2=[16,17,18,19].
For complex shapes, one can use multiple primitives and set the mesh orders of overlapping structures to achieve
the desired shape, but using the planar solid primitive allows you to use just one object to implement complex
shapes.
A description of how the vertices and facets can be set is provided in the Planar solid - Scripting example 347 .
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
EME
DEVICE
See also
Structures 318
Planar solid 345
addplanarsolid 1536
1,1,1;
0,1,1;
0.25,.25,0;
0.8,.25,0;
0.25,.8,0;
0.25,.25,1;
0.8,.25,1;
0.25,.8,1;
0.5,.8,0;
0.8,.5,0;
0.8,.8,0;
0.5,.8,1;
0.8,.5,1;
0.8,.8,1]*1e-6;
if (method_type == 1) {
addplanarsolid(vtx,a);
}
else {
b = matrix(4,3,12); # max four points per polygon, max 3 polygon per facet
for (i = 1:12) {
Solvers 101
FDTD
FDE
VarFDTD
EME
See also
Graphene 2774
Material tab
The material options are as follows:
MATERIAL: The material assigned to a 2D rectangle is filtered. It can only be a dielectric with fixed index or
a graphene material type.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify the anisotropy, use the "Surface normal" option in the geometry tab.
v Spatially varying index: This is not supported in this 2D rectangle object.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Solvers 101
FDTD
FDE
VarFDTD
EME
Associated
files
2d_poly_exa
mples.lsf
See also
Structures 318
Structure -
Polygon 325
Structure - 2D
Rectangle 349
Here are some of the example structures that can be created using a 2D polygon object. To create any one of these
structures, open the 2d_poly_examples.lsf and run the corresponding part of the script.
Geometry tab
X, Y, Z: The center position of the object
For complex shapes, scripting in the structure group is usually best. Once the script has calculated the x,y
vertex positions, they can be loaded into the polygon object with a single set("vertices",V); command.
For example, use the following code to create an octagon shaped object.
# octagon properties
n_sides=8;
r=1e-6;
To modify a polygon vertex, you must get the vertices matrix, modify the vertex matrix as desired, then re-
apply it to the polygon object:
V=get("vertices");
V(1,1)=V(1,1)+1e-6; # change the x position of the first vertex by 1um.
set("vertices",V);
Material tab
The material options are as follows:
MATERIAL: The material assigned to a 2D polygon is filtered. It can only accept graphene, PEC(perfect
electric conductor), sampled 2d data material types.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Objective
This page provides a structure group that can be used to create arrays of other objects.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
Associated files
usr_array_structure_group.fsp
(surface object only available in
optical solvers)
usr_pc_structure_group.fsp
See also
Structures 318
Structure groups 389
The simulation file usr_array_structure_group.fsp contains a structure group that will create an array of
objects that are placed within the group.
Step 2
Change the name of your structure to
'object'.
Step 3
Setup the array structure group as
required.
nx, ny, nz the number of
periods in each
direction
ax, ay, az the period in each
direction
center_array specify if the center
or corner of the array
should be located at
the origin.
Step 4
The array structure group will
automatically create an array of the
objects.
For another example of a structure group that can be used to create arrays, see the Structure groups 389 page. This
page provides a detailed description of how to create your the 2D array object shown below.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
usr_round_corners.fsp
See also
Structures 318
Creating a spiral 362
Extruding a polygon with a sidewall angle 362
Method 2:
Rounded objects can also be created using a combination of rectangles, spheres and extruded circles (tubes).
Using the structure group script, the above all-rounded rectangular prism can be produced and easily modified.
Objective
This section describes how to create various waveguide bends using the waveguide object. The path of the
waveguide is a Bezier curve, which is defined by a set of points, called 'poles.' Further detail on Bezier curve can be
found on the ' Structures - Waveguide 338 ' page.
The example file, usr_waveguide_bends.fsp, contains an s-bend and a Y-branch, which can be used to build
more complex structures such as cascaded y-branches and directional couplers.
Solvers 101
FDTD
FDE
EME
VarFDTD
Associated files
usr_waveguide_bends.fsp
See also
Structures - Waveguide 338
Creating an S-bend
The s-bend waveguide can be created by specifying the poles in the 'edit waveguide' window. The red dots in the
image below corresponds to the poles in the table on the right. The example s-bend can be located in the
usr_waveguide_s_bend.fsp.
Creating a Y-branch
Using the straight and the s-bend waveguides as building blocks, a Y-branch structure group as shown below can be
created. The group contains two s-bend as well as three rectangles. The dimensions of the waveguides (x1, x2, y2)
can be parametrized and a script in the structure group can be used to build the structure automatically. This is a
good example of a parent structure script modifying child structure scripts.
The following script is used in the 'script' section of the structure group:
select("straight_in");
set("poles",[0,0;x1,0]);
select("straight_out1");
set("poles",[x1+x2,y2/2;2*x1+x2,y2/2]);
select("straight_out2");
set("poles",[x1+x2,-y2/2;2*x1+x2,-y2/2]);
select("s_bend_1");
set("poles",[x1,0;x1+x2/2,0;x1+x2/2,y2/2;x1+x2,y2/2]);
select("s_bend_2");
set("poles",[x1,0;x1+x2/2,0;x1+x2/2,-y2/2;x1+x2,-y2/2]);
Solvers 101
FDTD
FDE
VarFDTD
Associated files
usr_extrude_poly.lsf
See also
Structures 318
Setting polygon vertices 325
The above figure shows an extruded polygon that can be constructed by inserting a polygon in a simulation file,
selecting the polygon and running the script usr_extrude_poly.lsf.
This script uses one method to scale the vertices as a function of depth while retaining the original vertex shape at
all depths. The script can be modified by users who are interested in other algorithms for determining the shape of
an extruded structure with non-vertical sidewalls.
Objective
The helix and spiral objects can be found in the Object library Structures category under the "Uncategorized
structures" heading. This section describes how these two types of spiral objects are created.
In this topic
Spiral 363
Helix 363
Associated files
usr_spiral.fsp
usr_helix.fsp
See also
Structures 318
Creating a 3D contour 366
Creating rounded corners 358
Setting polygon vertices 325
Helix
Spiral
The spiral is created with a series of polygon primitives. In this example, each ring of the spiral is one polygon
object.
The top figure above shows the spiral structure group object from usr_spiral.fsp. Spiral parameters such as
radius, types of the two materials that make up the spiral, and number of turns can be modified by editing the user
properties of the group.
Helix
The helix object is created with a series of thin cylinders. The second figure above shows a helix structure group
object from usr_helix.fsp. Helix parameters such as radius and number of turns can be modified by editing the
user properties of the group.
Conical helix
With the Helix structure group, user may change the start and end radius of the helix to make it like a cone. User
may want to pay attention to the situation when the "fiber radius" is comparable to the "end radius" that makes the
structure distorted. In that case, changing the fiber radius or other parameters may need to be considered.
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Simple roughness 364
Advanced roughness 365
Associated files
usr_surface_roughness.fsp
rough_waveguide.fsp
See also
Structures 318
Import object surfaces 489
The roughness is generated creating a matrix of uniform random numbers in k space. The high frequency
components are removed, and the resulting values are transformed back to real space.
In this case, a single import object (surface option) is used to define the entire object, rather than building the
surface from many simple primitives like the previous example. The upper surface of this object is defined by a 2D
matrix containing the surface height as a function of x and y.
The set up script initially fills the surface matrix in K-space with uniform random numbers. A filter is applied to
remove all high frequency components. The matrix is transformed back into real space, where the amplitude is
corrected. The import object is then added to the simulation.
An example of a ridge waveguide with rough sidewalls based on this technique can be found in
rough_waveguide.fsp.
The surface roughness plot can also be applied to wrap around a wire. In this structure group, each slice of x
containing the array of height adjustments (y) is used to perturb points in a circle. When stacked, just like the rough
ridge waveguide example from above, it creates a continuous structure with a rough exterior.
Note that the detail setting for the graphical rendering is increased because this is a complex surface. A higher
detail setting makes the surface look better in the CAD editor, but will make the drawing slow if you have many
complex surfaces with many data points. The detail setting has no effect on the actual meshing of the structure.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
usr_contour.fsp
See also
Structures 318
Creating a spiral 362
Creating rounded corners 358
Extruding a polygon with a sidewall angle 362
This example uses a large number of polygon objects to create an arbitrary 3D contour. The user defines an arbitrary
line contour path in 3 dimensions, and a polygonal cross sectional shape. The structure is created from sections of
rotated and extruded polygons. The user can increase the number of sections used by increasing the number of
sample points of the contour. The above structure shows the contour structure group from usr_contour.fsp.
Only user properties and the first portion of the setup script in the structure group defining the cross section and
contour path should be modified. For example, a simpler structure could be created by replacing the lines defining z:
z = matrix(N_sections);
z(1) = 0;
z(N_sections) = 0;
z(2:N_sections-1) = 5e-6*sin(phi)*sin(phi/4);
with
z=0;
The structure is now bound to z=0 as shown below. Contour paths can be defined analytically, or could be read from
a text file with the readdata script command.
Objective
This section shows how to use the surface and import objects to create conformal surface coatings.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
Associated files
usr_conformal_coating.fsp
See also
Structures 318
Import objects 480
Figure 2: Screenshot of the coating and substrate Figure 3: Screenshot of the coating objects. Notice how
objects. The surface objects are on the left and the the bottom of the import object (right) has the same
import objects are on the right. surface patterning as the top.
It is important to remember that there will be a region where the two objects overlap. The mesh order property must
be used to specify that the substrate material properties should be used in these regions
At this point, the Import structures will look very similar to the surface objects. There will be a region where the two
objects overlap. However, with the Import object, it's possible to import the surface data into the lower surface as
well as the upper surface. Once the surface is imported into the lower surface, the two Import objects will not overlap
at all. The surface pattern on the bottom of the object is visible in Figure 3.
Solvers 101
FDTD
FDE
VarFDTD
See also
Structures 318
Simulation 414
PML reflection at angles 460
Simulation areas
A typical simulation is shown in the above screenshot. The simulation region outline is shown graphically in orange.
When the boundary conditions are set to PML, the simulation region outline has some thickness. This creates three
areas, labeled A,B,C in the above figure.
The boundary conditions tab of the FDTD region, shown below, contains an option to extend structures through the
PML. By default this option is selected.
If the extend structure through PML option is selected, it will extend any structures that touch the inner PML
boundary in the direction normal to the boundary. For instance, if the FDTD simulation contains the structure shown
in the left image below, then the extend structure through PML option will create extend the structure as depicted on
the right. This may not be ideal for all structures. In that case, you can uncheck this option and draw the structure
through the PML.
Examples
The left figure shows the correct setup when using substrates and
other layers with PML. The layers should extend through the PML in
both the X and Y directions. The right figure shows the layers
terminated at the inside boundary of the PML. This interface may
create an undesired reflection.
The left figure shows the correct setup when using periodic structures
with PML. The structures should extend through the PML boundary.
The right figure shows the periodic structure only defined within the
simulation volume. This effectively creates an impedance mis-match
between the PC region and the boundary condition region. The mis-
match will reduce the performance of the PML.
Note:
Anything completely outside of the orange simulation boundary region has no effect on the simulation. In the
photonic crystal example above, the two outermost rings of PC are not necessary. It is the third ring, within the
PML boundary region, that is important to minimize reflections.
The button provides two options that can be used to build structures by using imported geometric data; the
layer builder and the dataset builder.
The layer builder button creates a layer builder object that can be used to import GDS files and build layered
structures consisting of patterning defined in the GDS file cells as well as plane un-patterned layers.
The dataset builder button opens a wizard that uses finite-element data to create an unstructured dataset and then
(if appropriate) use the dataset to build structures and doping objects (in DEVICE only). The geometric data can be
imported from a variety of supported file formats such as HDF5 792 (.h5), matlab data 1642 (.mat), tecplot 1441 (.dat), or
Lumerical data file 1408 (.ldf).
The layer builder button adds a layer builder object. Layer builders can be used to import GDS files and build
up a layered structure consisting of patterning defined in GDS file cells as well as plane unpatterned layers. This tool
allows you to easily change the ordering and thickness of each layer and translate the position of the patterning
within a layer. This is an alternative to using the GDS import options to import structures that is described in the
GDSII - Import and export 480 page.
The following example shows how to set up a layer builder with a glass substrate and a silicon y-branch structure on
top of the substrate which is loaded from a GDS file.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
Associated files
layer_builder.lsf
layer_bulder_y_branch.gds
See also
Structures 318
Scripts - Layer builder 1553
GDSII Import/Export 480
Each layer builder can load data from one GDS file.
Add layers
Click on the "Add" button in the layers section twice in order to add two layers, one for the substrate, and another for
the y-branch structure.
Layers in the list are stacked upwards from the bottom, towards the positive z axis. This means that the layer at the
top of the list will be at the bottom, and each subsequent layer in the list is stacked on top of the previous layer. You
can also change the ordering of the layers by selecting the layer and using the "Up" and "Down" buttons to move the
layer up or down in the list.
To rename the layers, double-click in the Layer Name column. Set the name of the first layer in the list to
"substrate", and set the name of the second layer to "y-branch".
Set up layers
Layers can either be plain with no patterning, or they can include patterning loaded from a specified GDS file. In the
case of this example, the substrate will have no patterning and the y-branch layer will use patterning.
Set the thickness of the substrate layer to 2 um, and set the Material to "SiO2 (Glass) - Palik". This will be the
Set the thickness of the y-branch layer to 0.5 um. Leave the Material as "none". This will use the background index
of the simulation region as the background material. Set the Layer Number setting to 1. This will use the first layer
from the specified GDS file as the patterning data. Set the Pattern Material to "Si (Silicon) - Palik".
In the case of the layer_builder_y_branch.gds file, the y-branch structure includes an offset specified in the
GDS file, so we need to translate the patterning so that the y-branch structure is moved closer to the center relative
to the substrate layer. Select the "Centered at custom coordinates" option from the drop down menu, and set x to -5
um and y to -10 um.
addlayer 1552 , addlayerbuilder 1553 , getcelllist 1591 , getlayerlist 1591 , loadgdsfile 1592 ,
setlayer 1591
The dataset builder button opens a wizard that enables the user to create an unstructured dataset and then (if
appropriate) use the data to build structures and doping objects (in DEVICE only). It also generates a script file that
can later be used to perform the same task using only the script environment. The dataset builder is powerful tool
that facilitates the use of finite-element data imported into Lumerical's optical and electrical solvers.
Geometries and doping profiles can be created using 2D or 3D finite element data imported into the script workspace
of FDTD, MODE Solutions, or DEVICE. The advantage of using the dataset builder is that the finite-element data
can be imported from a variety of supported formats such as HDF5 792 (.h5), matlab data 1642 (.mat), tecplot 1441 (.dat),
or Lumerical data file 1408 (.ldf), before being used to build unstructured datasets (and eventually complex structures
and doping profiles).
The following example shows how the dataset builder can be used to create an unstructured dataset and build a
structure along with its doping profile using data imported from an HDF5 file. The example is created in DEVICE.
However, the work-flow will be identical in FDTD and MODE Solutions.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
Associated files
processdata.h5
readh5file.lsf
script_out.lsf
DSB_test.ldev
See also
Structures 318
Reading HDF5 files 792
Datasets 1461
Apart from the fact that the unstructured dataset holds finite-element data, it behaves similar to the rectilinear
datasets used in Lumerical's solvers. The dataset can be parameterized and it can have an arbitrary number of
attributes (spatial data) and parameters. For details about the different datasets used in Lumerical's solvers, refer to
the Datasets 1461 page.
Download the "readh5file.lsf" script file and the "processdata.h5" HDF5 file. Open the script file in DEVICE and run
it. The script will read the data and save the variables in the workspace. Note that the script prints the units for
doping and dimension in the script prompt. For a detailed discussion on how to read HDF5 files, please refer to the
knowledge base page related to reading HDF5 files 792 .
readh5file;
Unit of doping is cm^-3
Unit of dimension is meter
Below is a screenshot of the script workspace after the data has been imported from the HDF5 file.
Click on the build button in the DEVICE interface and select the dataset builder . This will open up the
dataset builder wizard.
Select dimension
To get started, select the dimension of the finite element data. In this example, we will create a 3D structure, so
select the 3D option.
Next select the connectivity matrix. The dataset builder wizard will automatically filter out the irrelevant matrices and
will show only the matrices that have the proper values (integer) and dimension to be used as a connectivity matrix
for 3D finite element data.
Note: Sometimes the imported data may use a '0' based indexing. For such cases, enable the "enforce to 1-
based indexing" option to make the data compatible with the 1-based indexing used by Lumerical's solvers.
The next step would be to select the vertex matrix or the vertex table containing the x, y, and z coordinates of the
vertices. The wizard will again show only the matrices that have the proper dimension for the vertex matrix or the
vertex table based on the selected connectivity matrix. The imported data in this example contains the x, y, z vertex
matrices. They can be loaded on to the appropriate coordinates by using the arrow buttons. Once all the matrices
are loaded, the wizard will show the x, y, z extent in the visualization window at the bottom.
Once the vertex matrices are selected, the wizard will give the option to select the unit of the geometric data,
change the orientation of the geometry by switching the coordinates, and mirror the geometry along any direction.
We will select the unit to be meter as our imported data is in meter (recall the information provided by the script).
Note that for the "meter" selection, the scaling factor is 1e0 since in DEVICE (and also in the optical solvers),
dimension is expressed in meter (SI unit). The user also has the option to select a custom scaling factor for their
geometric data by selecting the custom scaling option from the drop down menu.
Once the unit has been selected, the visualization window will show the proper dimension of the geometry in micron
which is the default dimension for length in the CAD environment.
Note: Please note that the default unit for length in the CAD environment is micron. The user has the option
to change this unit from the "Setting" tab. However, the dimension data saved by DEVICE and the unit for length
that is used for all calculations in the script environment is in meter (SI unit).
Choose parameters
Often, the values (attributes) in an unstructured dataset are saved as functions of some parameters such a bias
voltage, temperature, etc. The next step in the dataset builder wizard is to select the parameters for the dataset
being built. If no parameters are selected then the dataset builder assigns an empty parameter to the dataset for
visualization purpose. Since the data in this example has no parameters, we select the "use default parameter"
option. To learn more about parameters, check the Datasets 1461 page.
Choose attributes
The next step is to select the attributes. Based on the selection of the vertex matrix and the parameters, the
dataset builder wizard will again filter the matrices in the script workspace and only the matrices that have the proper
dimension will be viewed in the window. The user has the ability to select more than one attribute for a single
unstructured dataset. In our imported HDF5 file, we have only one attribute which is the doping profile of the
structure, N. We will select this matrix as our attribute in this step.
Finally, the unstructured dataset is ready to be created. To do this, simply choose a name for the dataset and click
"Finish."
Once the dataset is created, it can be viewed in the visualization window. To do this, right click on the dataset in
the script workspace and click "Visualize."
Create structure
If the "Create structure" option is enabled, the wizard moves to a new window where the structure can be named and
a material can be assigned to it. For our structure, we choose the name "silicon" and the material "Si (Silicon)" from
the drop down menu. Please note that the window also provides the option to override the default mesh order for the
structure. In FDTD (and MODE), this window is different and has different fields to set the material properties
appropriate for the corresponding solvers. A screenshot of the same window in FDTD is also shown below.
If the "Create doping import" option is enabled, the wizard opens up a new window asking for the following inputs, i)
the attributes that will be used to create the import doping objects, ii) the names of the import doping objects, iii) the
units of doping in the used data, and iv) the doping types (n or p type). In this example, we have imported n-type
doping values and the unit of the doping is cm^-3 (recall the information provided by the script). So we will choose
the unit to be cm^-3 and the doping type to be "n." Please note that there is a scaling factor of 1e6 when we choose
the unit to be cm^-3. This is because DEVICE uses a unit of m^-3 (SI unit) while creating the import doping objects.
Generate script
The final window of the dataset builder also provides the option to create a script file that can perform the same
tasks as the wizard using the choices made at different steps. This feature is very useful in automating the whole
process of building datasets and creating structures and doping objects when generating complex structures from a
large number of imported data. The script file script_out.lsf was created using the dataset builder and it can be used
to perform all the tasks described in the preceding steps.
In the attached "DSB_test.ldev" file, the background oxide and Device region has already been created. In order to
see the resulting structure and doping, download and open the file along with the script_out.lsf script file. Open the
DEVICE file and run the script. Once all the structures are generated, calculate the mesh, and visualize the grid
from the Device region.
5.4.2 Groups
The button includes options to add different types of groups of objects. Simulation objects can be
organized into various types of groupings.
Container Group
A container group is the simplest type and can contain all object types as well as other groups. This object acts like
a simple folder allowing the user to collapse and expand its contents in the object tree. Its only user setting is a
position offset in x,y,z for all contained objects.
Note:
For DEVICE, Container Groups sit under the solver region and cannot contain structures.
Solvers 101
FDTD
FDE
VarFDTD
EME
DEVICE
Associated files
usr_pc_structure_group.fsp
See also
Structures 318
Analysis groups 479
Arrays of objects 356
addstructuregroup (script command) 1536
PC Bandstructure 1843
Object Library 210
The figure above shows the 2D photonic crystal array structure group from usr_pc structure
group.fsp. The structure group consists of an array of rods, whose radius, number and spacing is set by
the setup script.
Structure groups are created using the ADD STRUCTURE GROUP option of the Groups button in the
main toolbar. If you choose to edit a structure group object, then you will see that there are three tabs in the
edit dialog box. The PROPERTIES tab contains input parameters for the script. In the PC structure group the
input parameters are the radius of the rods, the size of the array, the lattice spacing along the two axes of
symmetry, and the angle between the axes. The SCRIPT tab contains the setup script that creates a physical
structure. In the PC structure group, the script sets up the array of rods. The ROTATIONS tab is used to set
the overall orientation of the group. The first two tabs will be discussed in more detail below.
Properties tab
The PROPERTIES tab is only available for structure groups, shown in the screenshot below. It contains all the
input parameters that are needed to set up the physical structure. Custom user property variables may be
added with the ADD button, and removed with the REMOVE button.
ORIGIN: The location of the origin of the group, in the global coordinate frame.
USER PROPERTIES: User properties are parameters that can be used to set up the structure. Each user
property has a name and a type (number, frequency ect). The user properties can be set manually in the
edit GUI or through script commands.
Script Tab
The SCRIPT tab, shown in the screenshot below, contains the setup script that is used to create and/or edit
structures within the group. The script tab can contain script commands that are used to set up a structure or
edit the properties of structures located within the structure group. The structure group has access to the user
variables defined in the PROPERTIES tab, and can change properties of any objects that are contained in the
group. The script does not have access to objects which are not located in the group, and does not share the
same variable space as the script prompt.
The following buttons and regions are available in the script tab:
SCRIPT: This is where the script commands are written. To find a list of script commands, see the Scripting
Language 1383 section of the Reference Guide.
TEST/SCRIPT OUTPUT: Press the TEST button to run the script. If there are no syntax errors in the script
the SCRIPT OUTPUT will read <script complete>.
Note that:
the user parameters are used in the script to create the array. For example, the user property "radius",
which is highlighted in blue in the screenshot of the PROPERTIES tab is used in the following manner to set
the radius of the rods to 120 nm.
addcircle;
set("radius",radius);
the select and unselect script commands are used in the script. When these are called, only
elements in the group are selected. The scope of the setup script is limited to objects within the group.
the setup script does not have access to the global workspace variables (those defined in the script prompt
or in a script file). The script has its own private variable workspace. In addition, any variables defined in the
setup script cannot be obtained from the script prompt or from a script file.
objects are created relative to the origin of the group. So for example, if the origin was set to (5,0,0) microns
in the VARIABLES tab, then the following commands would add a rectangular structure centered at (10,0,0)
microns, as measured in the global coordinate frame.
addrect;
set("x",5e-6);
the TEST button runs the script and generates the array shown in the image at the top of this page. If there
are no syntax errors in the script, you will see the line <script complete> in the script output. If there is
a syntax error, the location of the error will be given in the script output. An example of an error message is:
the script is also run every time the TEST or OK button is pressed or a property of the structure group is
changed with a script command.
addstructuregroup;
set("name","cube");
adduserprop("length",2,1e-6);
set("construction group",1);
Objective
This section provides an introduction to analysis groups. Analysis objects allow you to group monitors (similar to
structure groups) and to analyze that monitor data. For example, a set of monitors can be grouped together to form
a closed box. From the raw monitor data, the group can calculate quantities like cross sections and far field
projections. See build in analysis group for examples 798 .
The files in this section were created using FDTD Solutions, but the same set up can be created using MODE
Solution's propagator. Lumerical provides many built in analysis groups in our object library. Please press this
button to open the online library of analysis groups, or see object library 210 for more details.
Solvers 101
FDTD
FDE
VarFDTD
EME
In this topic
Analysis groups 393
Setup tab 395
Analysis tab 396
Using analysis groups 394
Associated files
usr_transmission_box.fsp
See also
Monitors and analysis groups 637
addanalysisgroup (script command) 1536
Analysis groups are container objects that can contain any simulation object and associated script functions which
can be used to create customize data analysis. For example, an absorption monitor group can be created with a
power monitor, an index monitor, and the script function that calculates absorption from these objects. One can also
automate an optimization/parameter sweep procedure using an analysis group made of structures/simulation
regions/sources/monitors, and use the script function to update each parameter accordingly.
Analysis groups are created using the ADD ANALYSIS GROUP button in the layout editor. If you choose to
edit an analysis object, then you will see that there are two tabs in the edit dialog box
the SETUP TAB contains all the information about the monitors
the ANALYSIS TAB contains the analysis routine and input and output parameters to the analysis routine.
The figure above shows this example simulation file. The box of monitors will be used to measure the power
absorbed in the particle.
There are three parts to this topic: a discussion of the setup tab, a discussion of the analysis tab and a discussion
of how to use the analysis group.
Results returned
Results
Various custom results are returned by the analysis group objects.
Objective
To give a description of how analysis groups can be used.
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Analysis groups 393
Setup tab 395
Analysis tab 396
Using structure groups 394
Associated files
usr_transmission_box.fsp
Some important script functions which can be used in script files or the script prompt are:
Example:
Begin by opening and running the associated simulation, usr_transmission_box.fsp. Select the analysis
group. Then enter the following script commands in the script prompt. The commands disable the option for the
analysis object to create its own plots, runs the analysis routine, gets the results, finally sends them to the
visualizer.
setnamed("trans_box","plot results",0);
runanalysis;
Pabs = getresult("trans_box","T");
?Pabs;
?Pabs.T;
?Pabs.f;
visualize(Pabs);
There one result from this object, the power transmission out of the box (T) as a function of frequency.
You can also access the analysis object results through the graphical interface, as shown below:
Objective
To provide a description of the setup tab of the Analysis group. The setup tab is where you setup the monitors
contained within the Analysis group. This tab is similar to the Edit Structure group dialog.
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Analysis groups 393
Analysis tab 396
Using analysis groups 394
Associated files
usr_transmission_box.fsp
See also
Structure groups 389
The SETUP tab contains all the information needed to edit and set up monitors that are located in the analysis
group. From the screenshot, you can see that the setup tab is subdivided into two tabs.
Variables Tab
It contains user properties, which are input parameters for the script that is located in the script tab. The
screenshot above shows the VARIABLES TAB for the scattering box analysis group in the
usr_transmission_box.fsp file. The scattering box consists of a rectangular box of power monitors. The
widths of the monitors are given by the user properties x span, y span, z span.
Script Tab
This is where the script commands are written. To find a list of script commands, see the Scripting
Language 1383 .
Note that,
the setup script can only be used to add, delete, edit or get the properties of objects in the group. So for
example, the command selectall; selects all of the monitors located inside of the group, while ignoring
those outside.
objects are created relative to the origin of the group. So for example, if the origin was set to (5,0,0) microns
in the variables tab, then the following commands would add a power monitor centered at (10,0,0) microns.
addpower;
set("x",5e-6);
the script uses the input parameters to set up the structure (the % operator allows you to use variables with
spaces in their name)
set("x span",%x span%);
the setup script does not have access to workspace variables (those defined in the script prompt or in a
script file). In addition, any variables defined in the setup script cannot be obtained from the script prompt or
from a script file.
the script can be debugged by pressing the TEST button. If there are no syntax errors or break commands
in the script, you will see the line <script complete> in the script output. If there is a syntax error, the
location of the error will be given in the script output. An example of an error message is: syntax error:
prompt line: 38.
the script is also run every time the OK button is pressed or a property of the analysis group is changed
from the command line
it is only possible to edit information in the SETUP tab in layout mode, the edited information will not be
saved.
Usage of the "construction group" option means that objects are added from the script and changes to child
objects will not be saved.
Objective
To provide a description of the analysis tab of the Analysis group. The Analysis tab is where you specify the
customized analysis commands that will be performed by the group. For more information and examples, see the
Analysis groups 798 .
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Analysis groups 393
Setup tab 395
Using analysis groups 394
Using structure groups 394
Associated files
usr_transmission_box.fsp
The ANALYSIS tab contains all the information used to analyze the monitor data. It is divided into two sub-tabs.
Variables Tab
The VARIABLES tab contains all input parameters in the top half, and the output parameters (named results)
in the bottom half. Parameters can be added and removed using the respective buttons. The screenshot above
depicts the VARIABLES tab for the scattering box analysis group in the usr_transmission_box.fsp file.
The variables tab contains two sets of variables and two buttons.
PARAMETERS: This section contains all the input parameters
RESULTS: The results section includes all the output parameters of the script. Once the analysis script that
has been run, only the parameters that are both defined in the results section and initialized in the analysis
script can be obtained from outside the analysis object.
SAVE ANALYSIS button: It saves any changes made in the analysis tab (only in analysis mode)
RUN ANALYSIS button: It runs the analysis script (only in analysis mode)
Script Tab
It contains a customized analysis routine. The script has access to the input parameters defined in the
variables tab, and can get data from any of the monitors located in the group. However, it cannot get data from
monitors or sources not located inside that group. The script in the analysis groups does not use the global
variable space from the script prompt and script file editor. The results from the script can be obtained in the
script prompt by setting up output parameters in the variables tab.
The following buttons and regions are available in the script tab:
ANALYSIS SCRIPT: This is where the script commands are written. To find a list of script commands, see
the Scripting Language 1383 section of the Reference Guide.
ANALYSIS SCRIPT OUTPUT: Press the RUN ANALYSIS button to run the script. If there are no syntax
errors in the script the SCRIPT OUTPUT will read <script complete>. In addition, the analysis script
output will contain any results from the "?" script command.
RUN ANALYSIS: Pressing the run analysis prompt runs the analysis script and saves the results. This
button can only be pressed when the simulation is in analysis mode.
SAVE ANALYSIS: Pressing this button saves changed made to the analysis script (even when in analysis
mode).
The SCRIPT tab of an analysis object is shown below, the note highlighted in yellow at the top of the dialog
window says it is now in analysis mode.
Note that,
entries in the ANALYSIS tab can be edited in both the layout and the analysis modes. In layout mode, there
are two buttons in the lower right hand corner of the screen: OK and CANCEL. In analysis mode, any
changes to the variables can be saved using the SAVE ANALYSIS button at the bottom of the tab. The RUN
ANALYSIS button runs the analysis script located in the SCRIPT tab.
once an analysis routine has run, the results (output parameters) become monitor data, which can be
accessed from the script prompt or a script file in the same manner that monitor data is accessed for simple
monitors. However, the analysis script can only obtain monitor data from the monitors in the group. It is not
possible to select the monitors and get their properties or use variables defined in the setup tab.
the analysis script does not have access to workspace variables (those defined in the script prompt or in a
script file). In addition, any variables defined in the analysis script cannot be obtained from the script prompt
or from a script file.
if the RUN ANALYSIS button is pressed, the ANALYSIS SCRIPT OUTPUT will contain the results of the
analysis script. Once the script has run to completion, if there are no syntax errors or break commands in
the script, you will see the line <script complete> in the script output. If there is a syntax error, the
location of the error will be given in the script output. An example of an error message is: syntax error:
prompt line: 38.
print variables or comments to the analysis script output by prefacing the lines with the ? operator, the value
computed for the output parameter is printed in the Analysis Script Output portion of the window. If you run
the analysis from the script prompt or a script file, these lines are not printed to the script prompt. For
example, the first comment in the Analysis script output comes from the following line in the analysis code:
?"Projecting in x-y plane";
if you need to stop a script while it is running, press the ESC key on the keyboard. This will stop the
analysis script from running, and close the edit dialog window.
Attributes 399
Components 413
Analysis 479
Sources 510
5.4.3.1 Attributes
The Index Perturbation grid attribute consists of 'np density' and 'temperature' grid attributes, accounting for the
refractive index changes due to the electron-hole density as well as the temperature. These grid attribute data can
be recorded on a finite-element mesh in a DEVICE simulation.
The Permittivity Rotation grid attribute allows users to add an arbitrary Euler rotation to the dielectric tensor. The
main parameters are the "angle convention" and the Euler angles theta/phi/psi.
The LC Orientation grid attribute allows users to specify arbitrary orientations for the Liquid Crystal director. The
main parameters are the angles theta/pi (specifying the LC orientation), and the dielectric tensor will be set
accordingly.
The Matrix Transform grid attribute allows users to add an arbitrary unitary matrix to the dielectric tensor. The main
parameter is the unitary matrix U.
Objective
This section provides an instruction how to export electron-hole (np) density and temperature grid attribute recorded
on a finite-element mesh directly from a DEVICE simulation, and import it to FDTD or MODE.
Solvers 101
FDTD
FDE
VarFDTD
CHARGE
HEAT
See also
Charge to index conversion 402
Transferring data between electrical and
optical solvers
importdataset 1590
MZI getting started example 2206
out = getresult("HEAT","thermal");
matlabsave("filename.mat",out);
It is also possible to import the np density and temperature grid attributes using scripts. Please refer to
importdataset 1590 for further information.
Solvers 101
FDTD
FDE
VarFDTD
CHARGE
Associated files
WgImport.fsp
WgImport.lms
rectChargeWg.ldf
rectCharge.ldf
rectCharge_plasma.ldf
See also
Reference Guide - Script functions
1383
importdataset 1590
matlabsave 1642
MZI getting started example 2206
(DEVICE)
Metamaterials 1984 (FDTD Solutions)
e2 n p
em - * + *
w me w + i e mh w + i e
me mh
n + ik =
e0
where electrons and holes are treated as purely free carriers and n,p are the carrier densities, and m is the
permittivity of the unperturbed material, me/h is the effective mass of electrons/holes, and e/h is the mobility of
electrons/holes. Note that in this model, the coefficients are frequency dependent. For cases where the electron
and hole mobility values are large, the equation reduces to,
e2 n p
em - * + *
w2 me m h
n + ik =
e0
e 2 l2 DN e DN h
Dn = - 2 2 * + *
8 p c e 0 mce
n mch
e 3 l3 DN e DN h
Dn = - 2 3 2 +
*
* 2
4 p c e 0 n mce m e mch m h
where,
e is the electronic change,
0 is the permittivity of free space,
n is the index of the unperturbed material,
m is the effective mass of holes/electrons and u is the electron/hole mobility.
m*ce/h is the conductivity effective mass of electrons/holes
e/h is the electron/hole mobility.
Ne/h is the change in electron/hole carrier density.
Note that in this model, the coefficients are wavelength dependent.
n = (dn_Ap)(DP)dn_Ep + (dn_An)(DN)dn_En
where,
is the absorption coefficient variation in cm-1
n is the refractive index change
P is the hole concentration change in cm-3
N is the electron concentration change in cm-3
d_Ap is 6e-18 for 1.55 um
d_An is 8.5e-18 for 1.55 um
dn_Ap is -8.5e-18 for 1.55 um
dn_An is -8.8e-22 for 1.55 um
Note that in this model, the coefficients are wavelength dependent.
V is
the
inde
x of
the
volta
ge
arra
y
over
whic
h
the
swe
ep
in
DEV
ICE
was
don
e.
file
na
me
is
set
to
the
nam
e of
the
.ldf
file
save
d in
the
DEV
ICE
scri
pt.
lam
bda
is
the
wav
elen
gth
of
inter
est
(in
um
unit
s).
mak
e_pl
ots
is
set
to 1
to
gen
erat
e
plot
s of
dopi
ng
den
sitie
s
and
the
imp
orte
d
n,k
valu
es.
mch
,mc
e
effec
tive
mas
s of
hole
s/
elec
tron
s
ue,
uh
carri
er
mob
ility
wav
egu
ide
n/k
are
the
nom
inal
inde
x
and
abs
orpti
on
coeff
icien
t
valu
es
in
silic
on
at
wav
elen
gth
lam
bda.
Under the script tab of the ChargeToIndex_Drude, you will find the script that loads the .ldf file, uses the
wavelength and the nominal n value to calculate the coefficients in the above equation and from that, calculates the
real and imaginary parts of refractive index and creates an import (n,k) object with (n,k) values resulting from the bias
value that corresponds to index V.
Click "test", to make sure the object is correctly created from the .ldf file.
The structure is now ready to be analyzed in either MODE or FDTD Solutions for further characterization. For an
example of the full process from the calculation of charge in DEVICE to the calculation of index change in MODE
using the Drude-plasma model please see the Metamaterial application example in the DEVICE knowledgebase.
V is
the
inde
x of
the
volta
ge
arra
y
over
whic
h
the
swe
ep
in
DEV
ICE
was
don
e.
file
na
me
is
set
to
the
nam
e of
the
.ldf
file
save
d in
the
DEV
ICE
scri
pt.
lam
bda
is
the
wav
elen
gth
of
inter
est
(in
um
unit
s).
mak
e_pl
ots
is
set
to 1
to
gen
erat
e
plot
s of
dopi
ng
den
sitie
s
and
the
imp
orte
d
n,k
valu
es.
mch
,mc
e
effec
tive
mas
s of
hole
s/
elec
tron
s
ue,
uh
elec
tron/
hole
mob
ility
wav
egu
ide
n/k
are
the
nom
inal
inde
x
and
abs
orpti
on
coeff
icien
t
valu
es
in
silic
on
at
wav
elen
gth
lam
bda.
Under the script tab of the WgImport_Drude object, you will find the script that loads the .ldf file, uses the
wavelength to calculate the coefficients in the above equation and from that, calculates the change in refractive index
and absorption coefficients and creates an import (n,k) object with (n,k) values resulting from the bias value that
corresponds to index V.
Click "test", to make sure the object is correctly created from the .ldf file.
The structure is now ready to be analyzed in either MODE or FDTD Solutions for further characterization.
V is the index of the voltage array over which the sweep in DEVICE was done.
The coefficients for the equation to convert the change in carrier density to change in (n,k)
are defined as follows (see reference 1);
Under the script tab of the ChargeToIndex_Silicon object, you will find the script that loads the .ldf file, uses the
aforementioned coefficients to calculate the change in refractive index and absorption coefficients and creates an
import (n,k) object with (n,k) values resulting from the bias value that corresponds to index V.
Click "test", to make sure the object is correctly created from the .ldf file.
The structure is now ready to be analyzed in either MODE or FDTD Solutions for further characterization. For an
example of the full process from the calculation of charge in DEVICE to the calculation of index change in MODE
using the Silicon model please see the MZI getting started example 2206 .
References
1. Henry, C. H.; Logan, R. A.; Bertness, K. A. Journal of Applied Physics, vol. 52, (1981), p. 4457-4461.
2. R. A. Soref and B. R. Bennett, SPIE Integr. Opt. Circuit Eng. 704, 32 (1987).
Solvers 101
FDTD
FDE
VarFDTD
HEAT
Associated files
See also
Index Perturbation 400
Charge to index conversion 402
where, n is the real and k is the imaginary part of the refractive index at temperature T, nref is the real and k ref is the
imaginary part of the unperturbed refractive index at temperature Tref , and n is the change in the real part and k is
the change in the imaginary part of the refractive index. The values of n and k are given by,
dn
Dn = (T - Tref )
dT
dk
Dk = (T - Tref )
dT
where, dn/dT and dk/dT are the rate of change in the real and imaginary part of refractive index, respectively. In the
linear sensitivity model, the rate of change in refractive index is assumed to be constant at reference temperature
Tref and is used as a material property in the "index perturbation" type material.
where, n is the real and k is the imaginary part of the refractive index at temperature T, nref is the real and k ref is the
imaginary part of the unperturbed refractive index at temperature Tref (300 K for the materials in the default material
database), and n is the change in the real part and k is the change in the imaginary part of the refractive index.
For a nonlinear temperature sensitivity, n and k are functions of temperature T.
5.4.3.2 Components
The button includes options to open the object library 210 with a few preset categories. Components
are more complicated structures that are built from one or several primitives. Common parameters are available to be
adjusted. These pre-built Structure groups 389 enable users to quickly setup common (but often difficult to
construct), simulation environments.
Polygons allow the user to define a custom object with a variable number of vertices. The location of each vertex can
be independently positioned within a plane, and the vertices are connected with straight lines. These shapes are
extruded in the z dimension.
This category includes various shapes of waveguide paths. For 3D simulations, the sidewalls can be vertical or
angled.
Photonic crystals are optical nanostructures that are either rectangular or hexagonal periodic. This category includes
PC waveguides and PC cavities.
Gratings 318
Gratings are a regularly spaced set of elements which can have polarizing, reflecting, or coupling effects.
There are many more categories of components available that are constantly being updated.
The 2D/3D FDTD solver region defines many important simulation parameters including simulation volume, boundary
conditions, simulation time, and mesh size.
The 1D/2D FDE eigenmode solver region defines many important simulation parameters including simulation volume,
boundary conditions, and mesh size.
The 2.5D varFDTD solver region defines many important simulation parameters including simulation volume,
boundary conditions, simulation time, effective index, and mesh size.
The 2D/3D bi-directional EME solver region defines many important simulation parameters including simulation
volume, number of cells, boundary conditions, and mesh size.
The mesh override region is used to override the default mesh size in some part of the simulation region. Normally
the meshing parameters are set in the Simulation region. However, if some specific meshing conditions are required
in part of the simulation region, a mesh override region can be specified. For example, some simulations with metals
are very sensitive to meshing, and a mesh override region may be required at the metal surface.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
The MESH ACCURACY parameter is an integer from 1-8, where 1 is low accuracy, and 8 is high
accuracy (smaller mesh). Many factors go into the meshing algorithm, including source wavelength,
material properties and the structure geometry. The number of mesh points per wavelength (ppw) is a
major considerations for the meshing algorithm. Accuracy 1 corresponds to a target of 6 ppw. Acc 2 -
>10 ppw, Acc 3 ->14ppw, and so on, in increments of 4 ppw per point on the slider bar. It is important
to remember that wavelength is inversely proportional to the refractive index. In high index materials,
the effective wavelength is smaller, meaning that the meshing algorithm will use a smaller mesh in
high index materials.
Custom non-uniform:
This setting allows the user to additional options to customize how the non-uniform mesh is
generated. If setting the mesh cells using wavelength, the default setting of 10 is sufficient in general,
but may be reduced to 6-8 for coarse simulations.
The grading factor determines the maximum rate at which the mesh can be modified. For example, if
dx(i+1) = a*dx(i), then 1/(GRADING FACTOR) <= a <= GRADING FACTOR. The grading factor should
be between 1 and 2. The default setting is sqrt(2).
Uniform:
A uniform mesh is applied to the entire simulation volume, regardless of any material properties. If a
mesh override region is used in conjunction with this option, the override region will force the mesh
size everywhere, not just within the override region (afterall, the mesh is uniform).
Mesh Refinement
Mesh Refinement: Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement
options 448 page for more information.
Time Step:
DT STABILITY FACTOR: A setting which determines the size of the time step used during the simulation,
defined as a fraction of the Courant numerical stability limit. A larger number will result in faster simulation
times, and a smaller number will result in slower simulation times. The Courant stability condition requires
that this setting must be less than 1 for the FDTD algorithm to remain numerically stable.
DT: The time step of the FDTD/Propagator simulation. This is determined by the values of the spatial grid to
ensure numerical stability and cannot be directly set by the user.
PML 460
Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.
Metal 464
Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .
PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.
Periodic 478
Periodic BC should be used when both the structures and EM fields are periodic. Periodic boundary conditions
can be used in one or more directions (i.e. only in the x direction) to simulate a structure which is periodic in
one direction but not necessarily other directions.
Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations predominantly
for the following two simulations:
Launching a plane wave at an angle to a periodic structure in this situation, accurate reflection and
transmission data can be measured at a single frequency point for a given simulation.
Calculating the bandstructure of a periodic object in this situation, a broadband pulse is injected via a
dipole source into a periodic structure.
note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.
Symmetric/anti-symmetric boundary conditions are used when the user is interested in a problem that exhibits
one or more planes of symmetry; both the structure and source must be symmetric. Symmetric boundaries
are mirrors for the electric field, and anti-mirrors for the magnetic field. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric boundary conditions are required, given the vector symmetry
of the desired solution. For meaningful results, the sources used must have the same symmetry as the
boundary conditions. Further information about symmetric and anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .
ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX BOUNDARIES: These fields describe the boundary conditions to
be applied along the perimeter of the simulation region. Symmetric and asymmetric boundary conditions
should be applied to the lower boundary conditions.
ALLOW SYMMETRY ON ALL BOUNDARIES: By default, symmetric and anti-symmetric conditions can
only be used on the lower boundaries (x min, y min and z min). This box allows you to also use symmetry
and anti-symmetric conditions on the upper boundaries in order to simulate periodic structures that exhibit
symmetry.
SET BASED ON SOURCE ANGLE: Bloch boundary conditions are often used to inject plane waves on
angles into periodic structures. This option will determine the values kx, ky and kz for you based on the
source in your current simulation. Note that if more than one source is defined, all sources must require
consistent Bloch settings. By default, this box is checked. If you uncheck the box, you should set kx, ky
and kz directly.
BLOCH UNITS: Two types of units are allowed for specifying the values of kx, ky and kz:
o bandstructure: In these units kx,y,z are defined in units of (2p/ax,y ,z) where ax,y ,z is the x,y or z span of the
FDTD simulation region. These units are very convenient for bandstructure calculations.
o SI: In SI units, k x,y ,z are defined in units of m-1. This is generally more convenient for injection of plane
waves on angles.
KX, KY, KZ: The wavevector setting in the x, y and z direction for the Bloch boundary in the units specified
above.
PML SETTINGS - TYPE: Sets the type of PML boundary formulation to be used. The options are a PML
based on a stretched coordinate formulation or a PML based on a uniaxial anisotropic material formulation
(legacy option).
PML SETTINGS - SAME SETTINGS ON ALL BOUNDARIES: When unchecked, this option allows users to
set different PML settings for the XMAX, YMIN, YMAX, ZMIN and ZMAX boundaries. When checked, the
same PML settings are used for all boundaries.
PML SETTINGS - TABLE: Sets the PML profile to be used on each boundary. The section on PML
boundary conditions 460 provides a brief description of the intended use of each profile.
PML SETTINGS - EXTEND STRUCTURE THROUGH PML: see extending structures through PML 368 .
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.
Simulation bandwidth
SET SIMULATION BANDWIDTH: By default, the simulation bandwidth is inherited from the source
bandwidth. Enabling this option allows the simulation bandwidth to be set directly. Simulation bandwidth
affects many aspects of the simulation including mesh generation, material fits, monitor frequency ranges,
etc.
Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: This will force a symmetric mesh about the x, y or z axis. When this
option is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation
region. The mesh in the negative half is simply a copy of the positive half mesh. All physical structures and
mesh override regions in the negative half will not be considered by the meshing algorithm. This option also
forces a mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the
mesh does not change when going from a simulation with symmetry to a simulation without symmetry.
OVERRIDE SIMULATION BANDWIDTH FOR MESH GENERATION: This option allows the simulation mesh
to be generated following a custom wavelength or frequency range, rather than the simulation bandwidth
(with is inherited from the source by default).
SNAP PEC TO YEE CELL BOUNDARY: This option forces any structures defined as PEC to have
interfaces that are aligned with the Yee cell boundaries. This ensures that all electric field components at
the PEC interface are tangential to the interface. This setting avoids complications that can result in some
circumstances if normal electric field components are set to 0 at a PEC interface. To achieve this, the
specified PEC interface may be shifted by as much as dx/2 when creating the simulation mesh, where dx is
the size of the Yee cell.
Miscellaneous
ALWAYS USE COMPLEX FIELDS: This checkbox forces the algorithm to use complex fields during
simulation. This will result in slower simulation times and increased memory requirements and should only
be used when necessary. By default, complex fields are only used when Bloch boundary conditions are
present.
MAX SOURCE TIME SIGNAL LENGTH: This is the maximum length of data used by sources to store the
time and time_signal properties of sources. If a large number of sources are used and the simulation time
is on the order of 100ps (which is very rare), advanced users may want to reduce this to save memory.
However, since the time and time_signal properties of sources are important for calculating the
sourcepower, sourcenorm, and the normalization for the transmission functions, care must be taken with
source normalization. In particular, in most cases, nonorm option should be used.
Auto shutoff
USE EARLY SHUTOFF: This will automatically end the simulation when most of the energy has left the
simulation volume.
AUTO SHUTOFF MIN: The simulation will end when the total energy in the simulation volume drops to this
fraction of the maximum energy injected. The simulation data will automatically save.
USE DIVERGENCE CHECKING: This will automatically end the simulation when the total energy in the
simulation volume is this many times larger than maximum energy injected.
AUTO SHUTOFF MAX: The simulation will end when the total energy in the simulation volume rises to this
many times the maximum energy injected. The simulation data will automatically save.
DOWN SAMPLE TIME: Check the auto shutoff conditions every down sample time number of dT time steps
Results returned
Grid
X, Y, Z: The mesh position vectors for the x, y and z directions.
Simulation status
STATUS: Current status of the simulation, denoted by 0 for simulation in layout mode, 1 for run to full
simulation time, 2 for run to autoshutoff, or 3 for diverged.
Note:
These results can be copied to the script workspace using the function getresult 1647 with "FDTD" as the monitor
name. For example:
stat = getresult("FDTD","status");
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
Mesh definition
There are two options: NUMBER OF MESH CELLS or MAXIMUM MESH STEP
Mesh grading
grading factor: Determines the maximum rate at which the mesh can be modified. For example, if dx(i+1) =
a*dx(i), then 1/(GRADING FACTOR) <= a <= GRADING FACTOR. The grading factor should be between 1
and 2. The default setting is sqrt(2).
PML 460
Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.
Metal 464
Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .
PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.
Periodic 478
Periodic BC should be used when both the structures and EM fields are periodic. Periodic boundary conditions
can be used in one or more directions (i.e. only in the x direction) to simulate a structure which is periodic in
one direction but not necessarily other directions.
Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations predominantly
for the following two simulations:
Launching a plane wave at an angle to a periodic structure in this situation, accurate reflection and
transmission data can be measured at a single frequency point for a given simulation.
Calculating the bandstructure of a periodic object in this situation, a broadband pulse is injected via a
dipole source into a periodic structure.
note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.
Symmetric/anti-symmetric boundary conditions are used when the user is interested in a problem that exhibits
one or more planes of symmetry; both the structure and source must be symmetric. Symmetric boundaries
are mirrors for the electric field, and anti-mirrors for the magnetic field. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric boundary conditions are required, given the vector symmetry
of the desired solution. For meaningful results, the sources used must have the same symmetry as the
boundary conditions. Further information about symmetric and anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .
ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).
Material tab
Mesh Refinement:
Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement options 448 page for
more information.
If you check this option, you can choose to fit two types of materials with a multi-coefficient model. Here are
the options that are available when the checkbox is checked:
Fit sampled materials: By default this is checked. Sampled material data will be fit with a smooth multi-
coefficient material model.
Fit analytic materials: Check this option to fit a multi-coefficient model to the analytic material data. The
only reason to fit analytic models with a multi-coefficient model is to compare MODE results with FDTD.
FDTD simulations must fit a multi-coefficient model to the analytic data in order to run simulations, but the
multi-coefficient model may not be able to fit the analytic model perfectly.
Wavelength min/max or center/span: Set bandwidth over which to apply the fit.
Impedance tab
When the CALCULATE CHARACTERISTIC IMPEDANCE box is checked, the following settings are available:
Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: This will force a symmetric mesh about the x, y or z axis. When this
option is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation
region. The mesh in the negative half is simply a copy of the positive half mesh. All physical structures and
mesh override regions in the negative half will not be considered by the meshing algorithm. This option also
forces a mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the
mesh does not change when going from a simulation with symmetry to a simulation without symmetry.
PML settings
PML KAPPA: The normalized imaginary electric and magnetic conductivity used in the PML boundaries.
PML SIGMA: The maximum normalized electric and magnetic conductivity used in the PML boundaries.
PML LAYERS: The number of cells which are used for PML boundary conditions. Increasing this number
will reduce the back-reflection arising from the PML boundaries but will also increase time and memory
requirements for simulations. Defaults to a setting of 12.
PML POLYNOMIAL: The polynomial power which determines how rapidly the electric and magnetic
conductivity increases as radiation propagates at normal incidence into the PML. The default setting of 3
denotes a cubic increase of electric and magnetic conductivity with increasing depth into the PML.
SET DEFAULTS: This button resets the parameters of the advanced settings tab to the default settings.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
Effective index method:The method used to calculate the effective index of the waveguide slab, see
Propagator Physics 107 in the Solver section for more information on each method.
CAN OPTIMIZE MESH ALGORITHM FOR EXTRUDED STRUCTURES: This option allows the meshing
algorithm to run much more efficiently when the geometry is made of objects that are extruded along the z
axis with purely vertical sidewalls. Note that if the geometry contains more complex shapes (ie. when the
sidewalls are not purely vertical) this option must be unchecked.
CLAMP VALUES TO PHYSICAL MATERIAL PROPERTIES: The effective index treatment may lead to
generated materials that have properties that are unphysical (for example, having an artificial negative
imaginary index). This checkbox provides the option of restricting the range of generated indices to the min/
max values defined by the physical material properties of the original materials.
Simulation bandwidth
NARROWBAND: the material properties are only taken at the center frequency of the simulation. This
option should be used for single frequency simulations (or when the frequency range of interest is very
narrow), since only a single (n,k) value is generated over the entire frequency span of the simulation.
BROADBAND: a dispersive material model will be created to fit the effect index materials based on the
following settings:
- maximum number of materials: the maximum number of different materials that are created from the
effect index method
- number of samples: the number of sample points to use for fitting the materials
- max coefficients, fit tolerance, imaginary weight, improve stability, make fit passive: parameters used to
fit the generated sample data (see Material explorer) 220
Test
The x,y coordinates of the test points used to study the materials created in those regions. The generated test
materials corresponding to each test point can be accessed in the material explorer.
Polarization
The polarization of the slab mode. If "user select" is chosen, the "Select mode" button is enabled. This button
will open a mode solver to calculate the slab modes for the user to choose from.
Plot
The type of field components, refractive index (real or imaginary) to plot.
PLOT CURRENT MODE: Plot the current mode.
PLOT IN NEW WINDOW: Plot the current mode in a new window.
The MESH ACCURACY parameter is an integer from 1-8, where 1 is low accuracy, and 8 is high
accuracy (smaller mesh). Many factors go into the meshing algorithm, including source wavelength,
material properties and the structure geometry. The number of mesh points per wavelength (ppw) is a
major considerations for the meshing algorithm. Accuracy 1 corresponds to a target of 6 ppw. Acc 2 -
>10 ppw, Acc 3 ->14ppw, and so on, in increments of 4 ppw per point on the slider bar. It is important
to remember that wavelength is inversely proportional to the refractive index. In high index materials,
the effective wavelength is smaller, meaning that the meshing algorithm will use a smaller mesh in
high index materials.
Custom non-uniform:
This setting allows the user to additional options to customize how the non-uniform mesh is
generated. If setting the mesh cells using wavelength, the default setting of 10 is sufficient in general,
but may be reduced to 6-8 for coarse simulations.
The grading factor determines the maximum rate at which the mesh can be modified. For example, if
dx(i+1) = a*dx(i), then 1/(GRADING FACTOR) <= a <= GRADING FACTOR. The grading factor should
be between 1 and 2. The default setting is sqrt(2).
Uniform:
A uniform mesh is applied to the entire simulation volume, regardless of any material properties. If a
mesh override region is used in conjunction with this option, the override region will force the mesh
size everywhere, not just within the override region (afterall, the mesh is uniform).
Mesh Refinement
Mesh Refinement: Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement
options 448 page for more information.
Time Step:
DT STABILITY FACTOR: A setting which determines the size of the time step used during the simulation,
defined as a fraction of the Courant numerical stability limit. A larger number will result in faster simulation
times, and a smaller number will result in slower simulation times. The Courant stability condition requires
that this setting must be less than 1 for the FDTD algorithm to remain numerically stable.
DT: The time step of the FDTD/Propagator simulation. This is determined by the values of the spatial grid to
ensure numerical stability and cannot be directly set by the user.
PML 460
Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They essentially
model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can directly
specify all the parameters that control their absorption properties including the number of layers. To facilitate
the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available under the
boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the predefined
profiles and fine tune the number of layers. PML boundaries perform best when the surrounding structures
extend completely through the boundary condition region. This will be the default behavior of structures whether
or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.
Metal 464
Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting, allowing
no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the default
setting 464 .
PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.
Periodic 478
Periodic BC should be used when both the structures and EM fields are periodic. Periodic boundary conditions
can be used in one or more directions (i.e. only in the x direction) to simulate a structure which is periodic in
one direction but not necessarily other directions.
Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations predominantly
for the following two simulations:
Launching a plane wave at an angle to a periodic structure in this situation, accurate reflection and
transmission data can be measured at a single frequency point for a given simulation.
Calculating the bandstructure of a periodic object in this situation, a broadband pulse is injected via a dipole
source into a periodic structure.
note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.
Symmetric/anti-symmetric boundary conditions are used when the user is interested in a problem that exhibits
one or more planes of symmetry; both the structure and source must be symmetric. Symmetric boundaries are
mirrors for the electric field, and anti-mirrors for the magnetic field. On the other hand, antisymmetric boundaries
are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must be given to
whether symmetric or anti-symmetric boundary conditions are required, given the vector symmetry of the
desired solution. For meaningful results, the sources used must have the same symmetry as the boundary
conditions. Further information about symmetric and anti-symmetric boundary conditions can be found in
Choosing between symmetric and anti-symmetric BCs 466 .
ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).
XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX BOUNDARIES: These fields describe the boundary conditions to be
applied along the perimeter of the simulation region. Symmetric and asymmetric boundary conditions should
be applied to the lower boundary conditions.
ALLOW SYMMETRY ON ALL BOUNDARIES: By default, symmetric and anti-symmetric conditions can only
be used on the lower boundaries (x min, y min and z min). This box allows you to also use symmetry and
anti-symmetric conditions on the upper boundaries in order to simulate periodic structures that exhibit
symmetry.
SET BASED ON SOURCE ANGLE: Bloch boundary conditions are often used to inject plane waves on
angles into periodic structures. This option will determine the values kx, ky and kz for you based on the
source in your current simulation. Note that if more than one source is defined, all sources must require
consistent Bloch settings. By default, this box is checked. If you uncheck the box, you should set kx, ky and
kz directly.
BLOCH UNITS: Two types of units are allowed for specifying the values of kx, ky and kz:
o bandstructure: In these units kx,y,z are defined in units of (2p/ax,y ,z) where ax,y ,z is the x,y or z span of the
FDTD simulation region. These units are very convenient for bandstructure calculations.
o SI: In SI units, k x,y ,z are defined in units of m-1. This is generally more convenient for injection of plane
waves on angles.
KX, KY, KZ: The wavevector setting in the x, y and z direction for the Bloch boundary in the units specified
above.
PML SETTINGS - TYPE: Sets the type of PML boundary formulation to be used. The options are a PML
based on a stretched coordinate formulation or a PML based on a uniaxial anisotropic material formulation
(legacy option).
PML SETTINGS - SAME SETTINGS ON ALL BOUNDARIES: When unchecked, this option allows users to
set different PML settings for the XMAX, YMIN, YMAX, ZMIN and ZMAX boundaries. When checked, the
same PML settings are used for all boundaries.
PML SETTINGS - TABLE: Sets the PML profile to be used on each boundary. The section on PML boundary
conditions 460 provides a brief description of the intended use of each profile.
PML SETTINGS - EXTEND STRUCTURE THROUGH PML: see extending structures through PML 368 .
Simulation bandwidth
SET SIMULATION BANDWIDTH: By default, the simulation bandwidth is inherited from the source bandwidth.
Enabling this option allows the simulation bandwidth to be set directly. Simulation bandwidth affects many
aspects of the simulation including mesh generation, material fits, monitor frequency ranges, etc.
Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: This will force a symmetric mesh about the x, y or z axis. When this
option is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation region.
The mesh in the negative half is simply a copy of the positive half mesh. All physical structures and mesh
override regions in the negative half will not be considered by the meshing algorithm. This option also forces a
mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the mesh does not
change when going from a simulation with symmetry to a simulation without symmetry.
OVERRIDE SIMULATION BANDWIDTH FOR MESH GENERATION: This option allows the simulation mesh
to be generated following a custom wavelength or frequency range, rather than the simulation bandwidth (with
is inherited from the source by default).
SNAP PEC TO YEE CELL BOUNDARY: This option forces any structures defined as PEC to have interfaces
that are aligned with the Yee cell boundaries. This ensures that all electric field components at the PEC
interface are tangential to the interface. This setting avoids complications that can result in some
circumstances if normal electric field components are set to 0 at a PEC interface. To achieve this, the
specified PEC interface may be shifted by as much as dx/2 when creating the simulation mesh, where dx is
the size of the Yee cell.
ENABLE SLAB LAYER DETECTION (varFDTD only): Accurately resolve slab layer vertical thickness by
using a very small mesh at vertical interfaces. There is little cost to using a small mesh in the vertical
direction, so this option is enabled by default.
Miscellaneous
ALWAYS USE COMPLEX FIELDS: This checkbox forces the algorithm to use complex fields during
simulation. This will result in slower simulation times and increased memory requirements and should only be
used when necessary. By default, complex fields are only used when Bloch boundary conditions are present.
MAX SOURCE TIME SIGNAL LENGTH: This is the maximum length of data used by sources to store the
time and time_signal properties of sources. If a large number of sources are used and the simulation time
is on the order of 100ps (which is very rare), advanced users may want to reduce this to save memory.
However, since the time and time_signal properties of sources are important for calculating the
sourcepower, sourcenorm, and the normalization for the transmission functions, care must be taken with
source normalization. In particular, in most cases, nonorm option should be used.
Auto shutoff
USE EARLY SHUTOFF: This will automatically end the simulation when most of the energy has left the
simulation volume.
AUTO SHUTOFF MIN: The simulation will end when the total energy in the simulation volume drops to this
fraction of the maximum energy injected. The simulation data will automatically save.
USE DIVERGENCE CHECKING: This will automatically end the simulation when the total energy in the
simulation volume is this many times larger than maximum energy injected.
AUTO SHUTOFF MAX: The simulation will end when the total energy in the simulation volume rises to this
many times the maximum energy injected. The simulation data will automatically save.
DOWN SAMPLE TIME: Check the auto shutoff conditions every down sample time number of dT time steps
Periodicity
NUMBER OF PERIODIC GROUPS: Number of regions of the structure that are periodic.
PERIODIC GROUP DEFINITION: Defines the cell regions that have periodicity and the number of periods in
each region.
CELL GROUP SEQUENCE: Displays the current setup and periodicity. For example [1,(2)^10,3] indicates
that there are three cell groups and the second cell group is repeated ten times.
Mesh definition
The default uniform mesh in can be defined by setting the 'Number of mesh cells', or by setting a target mesh
size using 'Maximum mesh step'.
Mesh grading
GRADING FACTOR: Determines the maximum rate at which the mesh can be modified. For example, if dx(i
+1) = a*dx(i), then 1/(GRADING FACTOR) <= a <= GRADING FACTOR. The grading factor should be
between 1 and 2. The default setting is sqrt(2).
PML 460
Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.
Metal 464
Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .
PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.
Periodic 478
Periodic BC should be used when both the structures and EM fields are periodic. Periodic boundary conditions
can be used in one or more directions (i.e. only in the x direction) to simulate a structure which is periodic in
one direction but not necessarily other directions.
Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations predominantly
for the following two simulations:
Launching a plane wave at an angle to a periodic structure in this situation, accurate reflection and
transmission data can be measured at a single frequency point for a given simulation.
Calculating the bandstructure of a periodic object in this situation, a broadband pulse is injected via a
dipole source into a periodic structure.
note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.
Symmetric/anti-symmetric boundary conditions are used when the user is interested in a problem that exhibits
one or more planes of symmetry; both the structure and source must be symmetric. Symmetric boundaries
are mirrors for the electric field, and anti-mirrors for the magnetic field. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric boundary conditions are required, given the vector symmetry
of the desired solution. For meaningful results, the sources used must have the same symmetry as the
boundary conditions. Further information about symmetric and anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .
ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).
Material tab
Mesh Refinement:
Mesh refinement can give sub-cell accuracy for a simulation. See the Mesh refinement options 448 page for
more information.
If you check this option, you can choose to fit two types of materials with a multi-coefficient model. Here are
the options that are available when the checkbox is checked:
Fit sampled materials: By default this is checked. Sampled material data will be fit with a smooth multi-
Mesh settings
FORCE SYMMETRIC X, Y, Z MESH: Will force a symmetric mesh about the x or y axis. When this option
is enabled, the meshing algorithm ONLY considers objects in the positive half of the simulation region. The
mesh in the negative half is simply a copy of the positive half mesh. All physical structures and mesh
override regions in the negative half will not be considered by the meshing algorithm. This option also forces
a mesh point at the center of the simulation region. Forcing a symmetric mesh ensures that the mesh does
not change when going from a simulation with symmetry to a simulation without symmetry.
PML settings
PML KAPPA: The normalized imaginary electric and magnetic conductivity used in the PML boundaries.
PML SIGMA: The maximum normalized electric and magnetic conductivity used in the PML boundaries.
PML LAYERS: The number of cells which are used for PML boundary conditions. Increasing this number
will reduce the back-reflection arising from the PML boundaries but will also increase time and memory
requirements for simulations.Defaults to a setting of 12.
PML POLYNOMIAL: The polynomial power which determines how rapidly the electric and magnetic
conductivity increases as radiation propagates at normal incidence into the PML. The default setting of 3
denotes a cubic increase of electric and magnetic conductivity with increasing depth into the PML.
SET DEFAULTS: This button resets the parameters of the advanced settings tab to the default settings.
EME settings
CONVERGENCE TOLERANCE: The convergence tolerance used for the calculations - the default value
corresponds to 1e-12 but can be increased by the user to speed convergence or decreased to improve
accuracy
MAX STORED MODES: Maximum number of modes for each cell in the EME setup.
TOLERANCE 1: This setting is used when solving for the S matrix at each interface. The interface S
matrices are calculated from a linear system of equations that attempt to match the tangential E and H field
components and the solution of these equations requires a matrix inversion. When there are modes on one
side of the boundary that are not well matched by any modes on the other side of the boundary, the solution
to the linear system of equations can result in S matrix coefficients that are much larger than 1 and do not
conserve energy. This tolerance setting is used to eliminate coupling completely to modes that cannot be
expanded on the other side of the boundary. Using values close to zero will result in smaller field
discontinuities but can lead to large energy conservation violations that cannot be corrected without
perturbing the entire S matrix. Using values close to 1 will make energy conservation work much better but
can increase field discontinuities. For periodic structures where precise energy conservation is important,
this value should typically be between 0.5 and 1. This setting affects the calculation of all interface S
matrices, regardless of the choice of the "energy conservation" setting.
TOLERANCE 2: This settings is used to determine the maximum correction that will be made to a lossy
interface S matrix to make it conserve energy. Ideally, all possible incident source conditions on an interface
will result in perfect energy conservation. If the energy conservations settings is set to "conserve energy"
then source conditions which result in loss are corrected to perfectly conserve energy. However, source
conditions that result in a total transmitted and reflected power that is smaller than "tolerance 2" will be
ignored which helps to avoid over correcting the original S matrix. For periodic structures where precise
energy conservation is important, this setting should be quite small - typically 1e-5 or smaller - to ensure
that no incorrect losses can occur. This setting will only be used when the "energy conservation" setting is
set to "conserve energy".
TOLERANCE 3: This setting is used for certain internal matrix calculations when trying to correct the
interface S matrices to conserve energy or to be passive. It should be kept as small as possible, however, in
some cases numerical errors can result if it is too small. In general, this setting should not have as much
impact on the results as tolerance 1 and tolerance 2. This setting will only be used when the "energy
conservation" setting is set to "conserve energy" or "make passive".
gain_max , however some modes may have negative real(neff) correspondent to a negative phase velocity.
The value of gain_max should be zero when the waveguide is made from materials with no gain, however, we
typically use a finite value for two reasons: firstly, there can be small numerical errors such that a mode with
imag(neff) = 0 may be calculated to have a numerically small, negative value such as -1e-15, and secondly,
the waveguide itself may be composed of some materials that, intentionally, have gain in other words they
have imag(n) < 0 where n is the material refractive index. The value of gain_max is given by gain_max =
maximum tolerated gain + material_gain_max, where maximum tolerated gain is specified below and
material_gain_max is the maximum value of |imag(n)| for any material in the waveguide that has gain. If no
material in the waveguide has gain, then material_gain_max = 0.
CORRECT BACKWARD PROPAGATING MODES WHEN PML IS PRESENT: By default, the detection and
correction of backward propagating modes, as described above, is not performed when any of the FDE
solver boundaries are PML. When PML boundaries are used, you must check this box to apply the
correction of backward propagating modes. However, we do not generally recommend checking this box
because PML itself can create small amounts of gain in some modes which is typically an indication that
the PML is too close to the guiding structure and not that the backward propagating mode has been
accidentally selected. In addition, evanescent modes with negative phase velocities are rarely found when
PML is used.
MAXIMUM TOLERATED GAIN: This quantity is used to calculate gain_max, as described above. Since this
is typically used for avoiding accidental sign reversal due to small numerical errors, this value is typically
very small and the default is 1e-12.
ADD MATERIAL GAIN TO MAXIMUM TOLERATED GAIN: When this is checked, the material gain (if any
gain materials are present) will be included in the calculation of gain_max, as described above. When this is
unchecked, gain_max will be equal to maximum tolerated gain.
See EME error diagnostics 783 for more information on the tolerance parameters.
Results returned
Results
COEFFICIENTS: the modal expansion coefficients for each mode as a function of cells or x.
GLOBAL ERRORS: the source-independent global errors as a function of cells or x, see EME error
diagnostics 783 .
INTERNAL S-MATRIX: the S matrix of the whole device including all the modes that are used in the EME
calculation.
LOCAL ERRORS :the source-dependent local errors as a function of cells or x, see EME error diagnostics
783 .
USER S-MATRIX: the S matrix of the whole device including only the modes that have been selected in the
Ports 436 .
5.4.3.3.4.1 Ports
This topic applies to the Eigenmode Expansion solver in MODE Solutions.
The EME solver region contains 2 ports by default. The Ports button found in the toolbar adds additional
ports to the solver.
Ports are labeled automatically and the port number corresponds to the terms in the calculated S-matrix result. You
can change the port labels by changing the order that the ports are listed in the Objects Tree using the up and down
arrows as shown in the image below.
When you edit a port object you will have the following settings:
Geometry tab
Port location: Allows users to automatically set the port location to the left or right side of the EME solver region.
The geometry tab also contains options to set the size and location of the port.
Results returned
Modes
NEFF: the effective index of the selected mode(s)
MODE PROFILES: the spatial mode profile (E,H) of the selected mode(s)
Results
OVERLAP_FORWARD: Overlap between port mode and forward propagating modes of nearest cell.
OVERLAP_BACKWARD: Overlap between port mode and backward propagating modes of nearest cell.
PMATRIX: Power ( integrate(real(Px),1:2, y,z)) ) in the port mode, in Watts. When multiple
modes are selected, it is the power overlap between each of the port modes. The diagonal of the matrix is
the power in each mode. Typically the fields are scaled so this is about one watt.
It is possible to use a custom field profile from a .mat file as the source in an EME simulation. The field profile data
can either be from another simulation, or defined from an equation in the script.
The script below generates a field profile and saves it into a .mat file.
# define position vectors
x = 0;
y = linspace(-2e-6,2e-6,100);
z = linspace(-1.5e-6,1.5e-6,101);
X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
# create dataset
EM = rectilineardataset("EM fields",x,y,z);
EM.addattribute("E",Ex,Ey,Ez);
EM.addattribute("H",Hx,Hy,Hz);
To set this as a port mode, open the Edit EME port tab, select "user import" under mode selection and click on
"Import Fields".
To verify that the desired mode has been imported properly, right click on the port in the object tree and select
Visualize -> Fields.
See also
Sources - Import 579
5.4.3.3.4.2 Cells
This topic applies to the Eigenmode Expansion solver in MODE Solutions.
As discussed in EME solver physics 114 , the mesh along the propagation direction is defined by adding cells to the
EME simulation region. An eigenmode simulation is carried out at the center x location of each cell to calculate all
the modes supported at that cross section. Once the cells have been defined in the EME set up tab, they will
appear as children of the EME solver region, as shown in the figure below.
To get the overall S matrix of the entire device, see the results section of Simulation - EME 432 .
Results returned
Results
MODE FIELDS: the spatial mode profiles of each mode in the current cell.
NEFF: the effective indices of each mode in the current cell.
OVERLAP_i_i-1: the overlap integrals between the set of modes in the current cell and the set of modes in
the cell to the left of the current cell.
OVERLAP_i_i+1: the overlap integrals between the set of modes in the current cell and the set of modes in
the cell to the right of the current cell.
PMATRIX: the power carried in each mode, in watts. In a device with no absorbing materials, no PML
boundaries, the Pmatrix should be the identity matrix, one watt.
S_i_i+1: S parameter matrix for all modes between cell i and i+1. Only available after fields have been
propagated.
Note: The 'min mesh step' setting in the solver - Mesh settings tab determines
the absolute global minimum mesh size allowed in the simulation. This setting
takes precedence over all other mesh constraints, including mesh override
regions.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
Objective
This section describes how to get the locations of the mesh points.
Solvers 101
FDTD
FDE
VarFDTD
In this topic
View the mesh 441
Getting the mesh from monitor data 443
Getting the mesh from Simulation region
properties 442
See also
Simulation 414
get 1571
getdata 1646
View simulation mesh 203
Once the mesh is visible, the Ruler mouse mode can be used to measure the mesh size. The ruler measurements
are visible at the bottom of the screen.
When viewing the mesh (orange), it is often best to hide the drawing grid mesh (grey) to keep the screen from
becoming too cluttered. To hide the drawing grid, click on the Edit drawing grid button, and unselect Show grid.
addfdtd;
?getresult("FDTD","x"); # it will return the x positions of the grid points
result:
-8.5e-007
-8.10465e-007
-7.7093e-007
-7.31395e-007
-6.9186e-007
-6.52326e-007
-6.12791e-007
-5.73256e-007
-5.33721e-007
-4.94186e-007
...
..
.
The dx property has slightly different meanings, depending on the simulation mesh type.
Auto non-uniform The value is the target dx that would appear in an material with an index of 1. This is
not necessarily the actual mesh size in the simulation because the index of the
materials may not be 1.
Custom non-uniform The value in the dx field of the Max mesh step settings section
Uniform mesh The value in the dx field of the Max mesh step settings section
The dx value obtained from the get command may not be the actual dx used in the simulation, since dx can change
as a function of position with the non-uniform mesh, and the Simulation region mesh settings can be overridden with
a Mesh override region. If the precise dx values are required, they should be obtained from the monitor data.
Available options:
FDTD or varFDTD
Simulation - FDTD 415
Simulation - varFDTD 425
FDE
Simulation - FDE 420
Option details:
Mesh refinement 443
Using the non-uniform mesh 455
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Conformal mesh method 444
Mesh refinement choices 444
See also
Simulation 414
Please see Mesh refinement options 448 for details on how to choose the conformal mesh settings for your
application.
The default conformal setting will apply conformal meshing to all materials except metals and PEC. Please see
Mesh refinement options 448 for a detailed description of the different mesh refinement options and how to choose
the right setting for your application.
The table below shows some typical structures where problems with a finite mesh size are encountered.
A 50nm thick
layer of silicon
on glass. The
simulation
mesh size is
approximately
7nm. Without
conformal
meshing, the
layer
thickness
cannot be
defined to
better than
7nm - in other
words, a 49nm
layer and a
55nm layer
can give
exactly the
same results!
The graded
mesh solution
uses mesh
override
regions to
make the
mesh size
1nm at the
interfaces,
however many
more mesh
points are
needed.
The conformal
mesh solution
allows you to
obtain
accurate
results for this
type of
structure
without using
any mesh
override
regions.
Please note
that you
should see at
least 2 mesh
cells in your
layer.
A silver rod of
diameter
50nm. In the
default mesh,
the curved
interfaces
cannot be well
resolved.
The graded
mesh solution
forces a much
smaller mesh
over the entire
rod,
introducing
many more
grid points.
In this
application, we
use a
combination of
graded
meshing and
conformal
meshing. The
conformal
meshing can
allow you to
obtain more
accurate
results for a
given mesh
size. Even if
the mesh size
is only twice
as large, for
example 2nm
compared to
1nm, the
computation
time in 3D
simulations
can be
reduced by a
factor of 16.
Please take
care when
using
conformal
mesh
technology
with metals,
however, and
do some
convergence
testing to be
A waveguide
coupler region
made from two
silicon
waveguides a
short distance
apart. The
coupling
length is
critically
sensitive to
the distance
between the
waveguides,
which can't be
resolved to
better than the
size of dx
without
conformal
mesh
technology.
The graded
mesh solution
forces a much
smaller mesh
between the
waveguides, in
order to
resolve the
distance to
any desired
accuracy.
The conformal
mesh solution
will allow you
to obtain
accurate
results for this
type of
structure
without using
a special
mesh override
region
between the
waveguides.
Please note
that the space
between the
waveguides
should be at
least 2*dx. If
this is not the
case, a mesh
override region
may be
necessary to
ensure this,
even with the
conformal
mesh.
3D 2D
Memory requirements ~ V ( l / dx )
3
~ A ( l / dx )
2
Simulation time ~ V ( l / dx )
4
~ A ( l / dx )
3
Lumerical provides a number of mesh refinement options which can give sub-cell accuracy from a simulation. This
section explains the various options and how to choose the appropriate one for your simulation.
In this topic
How to choose which mesh refinement method to use 448
See also
Mesh refinement 443
Exceptions can be determined based on your material properties, but if options other than Conformal Variant
0 is to be used, careful convergence testing is highly recommended:
If your simulation involves metals, then you may want to consider using Conformal variant 1. In this variant,
CMT is applied to all materials, including metals. CMT will give better convergence than
staircasing for small enough mesh sizes, but at larger mesh sizes it can sometimes give much
worse results. Unfortunately, the size of a 'small enough' mesh is highly dependent on the simulation. In some
cases, a <5nm mesh is sufficient, while in other cases a 1nm is not sufficient (optical wavelengths). Please do
some careful convergence testing between Conformal variant 0 and Conformal variant 1 to test
which method you should use for your particular application. Conformal variant 1 may give numerical
artifacts when |eplasma|>> |edielectric | and the mesh size is not sufficiently small.
If your simulation uses PEC instead of metals, then you will get better convergence with Conformal variant
1.
For the Eigenmode Solver in MODE Solutions, the default setting is Conformal variant 1. Since unphysical
modes resulting from the possible numerical artifacts can be easily detected in modal analysis.
Conformal variants: Lumerical's Conformal Mesh Technology (CMT) uses a rigorous physical description of
Maxwell's integral equations near interfaces between two materials that is able to incorporate Lumerical's Multi-
Coefficient Materials. The CMT can handle interfaces between arbitrary dispersive media. In general, this provides
greater accuracy for a given mesh size, or make it possible to run jobs much faster without sacrificing accuracy.
Due to the 1/dx 4 dependence of the simulation time on the mesh size, results can often be achieved in roughly
1/10 the time. See Conformal Mesh Technology details 450 below for more information. If more than two materials
are found in a single cell, the method reverts to Staircasing for that cell. The Conformal meshing comes in three
flavors:
Conformal variant 0 CMT is not applied to interfaces involving metals or PEC
material.
Conformal variant 1 CMT is applied to all materials, including PEC and
metals.
Conformal variant 2 A simplified conformal mesh approach is applied to
interfaces involving metals and PEC.
Dielectric Volume Average: The dielectric volume average method can only handle interfaces between
one or more dielectric materials in a Yee cell. In this case, an average permittivity is created that is the simple
volume average of all the dielectric permittivities in the given cell. The volume average is calculated by dividing the
cell into NxN subcells in 2D and NxNxN subcells in 3D, where N is the "meshing refinement" value specified by
the user. If non-dielectric materials are present at the cell center, then the method reverts to the Staircase method
for that particular cell. This method has no real physical basis, but can be used for very low index contrast
dielectric structures. In particular, if there is a low index contrast spatial variation in the permittivity, such as 1.4
+0.01sin(x), then this method can give good results because it will average the permittivity over the entire Yee cell.
Volume Average: The permittivity of each cell is the simple volume average of the permittivities of the 2
materials in the cell. Each material can be fully dispersive. If more than two materials are found in a single cell, the
For more information on the Yu-Mittra method and other conformal mesh algorithms, see the following references:
Yu, W., and R. Mittra, "A conformal finite difference time domain technique for modeling curved dielectric
surfaces," IEEE Microwave Components Lett,, Vol. 11, 2001, pp. 25-27.
Allen Taflove, Computational Electromagnetics: The Finite-Difference Time-Domain Method. Boston: Artech
House, (2005).
Y. Zhao and Y. Hao, Finite-difference time-domain study of guided modes in nano-plasmonic waveguides, IEEE
Trans. Antennas Propag. 55, 30703077 (2007).
A. Mohammadi, H. Nadgaran, and M. Agio, Contour-path effective permittivities for the two dimensional finite-
difference time-domain method, Opt. Express 13, 1036710381 (2005) http://www.opticsinfobase.org/
abstract.cfm?URI=oe-13-25-10367.
By applying a more rigorous physical description of the conformal mesh approach, Lumerical has developed
Conformal Mesh Technology (CMT) that is able to incorporate arbitrary dispersive MCMs. As an extension of general
conformal mesh algorithms to handle dispersive materials, it is easily possible to generate more simple conformal
mesh models like the Yu-Mittra model from Lumericals CMT.
CMT Capabilities
Greater Accuracy for a Coarse Mesh
Lumericals CMT is capable of generating significant accuracy improvements relative to staircase results. This can
be illustrated by applying the CMT to a multilayer stack, which is a common element incorporated within various
photonic designs. As a conceptually simple but challenging test case, we consider the reflection and transmission
of non-normal incidence p-polarized light through a five layer stack which includes dielectrics, metals and
semiconductors. As the analytic transmission from this multilayer stack can be easily computed with transfer matrix
theory, it provides a good test case to demonstrate the ability of CMT to account for subcell features as shown in
Figure 3.
a) b) c)
FIGURE 3. Multi-layer stack composed of gold, a constant dielectric material of index 1.9, Si, GaAs, and Ge tested
over a wavelength range of 400-1000nm using a mesh resolution of 10 points per wavelength. The staircase result in
(b) shows significant deviations relative to the analytic response calculated from transfer matrix theory, while the
CMT result in (c) demonstrates that subcell features can be accurately accounted for.
This simple test demonstrates the ability of CMT to resolve subcell features which, in this case, is the location of
interfaces that do not necessarily match the discretized mesh. Testing shows that at a mesh resolution of 10 points
per wavelength, CMT provides significantly greater accuracy than the staircase results obtained at a much higher
mesh resolution of 34 points per wavelength. Examination of the average error calculated for the sum of the reflection
and transmission signals over the 600nm bandwidth simulated in Figure 4 shows that the level of accuracy achieved
with CMT at a coarse mesh of 10 points per wavelength could not be achieved with the staircase approach at any
reasonable mesh size, and likely that more than 60 points per wavelength would be required.
FIGURE 4. Average RMS error for reflection and transmission of five layer multilayer stack over 600nm
bandwidth. The accuracy achieved by CMT at 10 points per wavelength would likely require more than 60 points per
wavelength for the staircase approach.
The ability of CMT to produce much higher accuracy results with a more coarse mesh can also be demonstrated for
3D structures, like the organic solar cell device shown in Figure 5. While there is no analytic result that can be
calculated for such a structure, 3D FDTD results obtained with a very fine mesh can be used in place of an analytic
result. As computation time within FDTD varies with inversely with the mesh size to the fourth power (1/dx 4) using a
coarser mesh can result in significantly faster simulation times. For example, Figure 5 shows that the CMT can
achieve the same accuracy at 14 points per wavelength as the staircase method at 26 point per wavelength, which
translates into a speedup of more than 7 times.
FIGURE 5. A 3D organic solar cell structure that is comprised of a periodic nanoscale pattern in a multilayer
structure. By comparing staircase and CMT results against 3D FDTD results obtained using a very fine mesh, the
RMS error of the two methods can be compared. To achieve a 1% RMS error, CMT requires a mesh size of less
than 14 points per wavelength, while the staircase approach requires a mesh size of more than 26 points per
wavelength.
FIGURE 6. A 3D CMOS image sensor model composed of microlenses, color filters, and metallic interconnects on a
multilayer substrate. The CMT allows for much faster and smoother convergence. At coarse mesh sizes, such as 6-
14 points per wavelength, the CMT shows that 33% of the incident light is converted to electron/holes in the green
photodiodes. The staircase method, on the other hand, may not yet be converged even at 26 points per wavelength.
Summary
The conformal mesh can enhance simulation accuracy for a given mesh size, or make it possible to run jobs much
faster without sacrificing accuracy. Due to the 1/dx 4 dependence of the simulation time on the mesh size, results
can often be achieved in roughly 1/10 the time. Also, the CMT provides submesh sensitivity to changes in
geometrical parameters, which greatly facilitates design optimization. Owing to its inherent compatibility with
Lumericals MCMs, CMT allows designers to more efficiently prototype broadband, nanoscale photonic design
concepts in high index contrast, dispersive materials.
Objective
The goal of this example is to compare the performance of conformal mesh against the more conventional staircase
method.
The waveguide is rotated around the z-axis, the direction of propagation and the effective index and loss of the same
mode are calculated and compared for the two mesh refinement options.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
mesh_comparison.lms
mesh_comparison.lsf
See also
Mesh refinement options 448
The difference between the maximum and minimum effective index in the two mesh refinement cases is listed in the
table below. It is clear from these results that the conformal mesh technology delivers more reliable and consistent
results than staircasing.
Staircase Conformal
Maximum neff 2.42277 2.3932
Minimum neff 2.39408 2.39036
Change in neff 0.0286866 0.00284368
Objective
The FDTD algorithm supports a graded mesh of Cartesian (rectangular) cells. This means that the size of the mesh
cells can vary as a function of position throughout the simulation region, as shown in the screenshot below. Such a
non-uniform mesh can make FDTD calculations more accurate, while requiring less memory and less computation
time than a comparable uniform mesh. There are two ways that the non-uniform mesh improves accuracy: through
reducing numerical dispersion and improving the resolution of interfaces.
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Using the non-uniform mesh 455
Testing convergence 457
Periodic structures and non-uniform meshing
458
The automesh feature automatically configures the non-uniform mesh to minimize the effects of numerical
dispersion. In the usual use case, the user simply chooses a setting on the accuracy slider, which ranges in value
from 1 to 8. A value of 1 creates a coarse mesh (corresponding to a small N), giving the fastest and lowest memory
simulations but also introduces some (several percent) error due to the numerical dispersion artifact. At the other
end of the scale, a setting of 8 creates a very fine mesh (N is large), requiring more time and memory, while ensuring
that numerical dispersion is a negligible contribution to errors in virtually all situations. Simulation accuracy and
computational resource requirements can be traded off in this way. For most applications, a setting of between 2
and 5 on the accuracy slider is sufficiently accurate. For details on how the slider values differ, see Mesh settings
tab 443 .
Lumerical Solutions provides special mesh objects termed "mesh override" objects that enable the user to indicate
where the interfaces are physically significant to the problem. The automesh feature, which otherwise operates as it
normally does, will then also take into account the override regions, as well as continuing to reduce numerical
dispersion throughout the simulation volume. The mesh override feature is particularly useful for structures with
metallic interfaces.
Periodic structures
See the last page in this section for information.
Objective
In this section we will show in a simple example how to test convergence using the mesh accuracy slider. The
example uses a Fabry-Perot resonator, for which the analytic solution can be easily calculated. The desired
calculated result is the broadband transmission and reflection spectrum from a 500 nm thick layer of silicon. The
transmission and reflection spectrum is measured from 400 nm to 2000 nm in a single simulation.
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Using the non-uniform mesh 455
Testing convergence 457
Periodic structures and non-uniform meshing
458
Associated files
usr_fabry_perot_Si.fsp
usr_fabry_perot_Si.lsf
The reflection and transmission spectra are very complex. A comparison with the analytic result for a mesh
accuracy setting of 4 is shown below. Already with this setting, there is very good agreement between the results.
R and T for a mesh accuracy of 4 Difference with analytic result for mesh accuracy of 4
The maximum difference across the entire wavelength spectrum between the analytic result and that simulated using
FDTD Solutions is plotted below as a function of the mesh accuracy setting. It is clear that the numerical dispersion
is no longer contributing significantly to the error for a mesh accuracy setting of 5 or more, where the maximum
difference between simulated and analytic results from 400 nm to 2000 nm is well below 0.01 and becomes
dominated by other sources. For many applications a setting of 3 to 5 would be sufficient.
Summary
Convergence testing with the mesh accuracy setting makes it possible to determine the best tradeoff between
simulation accuracy, speed and memory requirements.
The non-uniform mesh generation does not necessarily produce meshes that automatically match the periodicity of
the physical structure. In some cases, such as high Q photonic crystal micro-cavities, using a mesh that has the
same periodicity as the physical structure being simulated is better for numerical accuracy. In this case, a mesh
override region can be used to ensure that a/D = N where a is the period, D is the mesh cell size and N is an integer.
To insert mesh override regions, select the Mesh option of the Simulation button.
The mesh override regions allows you to set dx, dy and dz over a particular region. For example, if you have a
triangular lattice PC in the x-y plane, with a lattice constant of 1 micron. You could use the following settings for a
mesh override regions that covers the entire simulation region in x and y. Note that dx = 1/20 microns, while dy =
sqrt(3)/2/20 microns. The simulation region has an x-span of 10 microns and a y span of 10*sqrt(3)/2 microns.
By choosing to not use "override z mesh", the default non-uniform mesh in the z-direction will be generated.
PML 460
Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They essentially
model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can directly specify all
the parameters that control their absorption properties including the number of layers. To facilitate the selection of
PML parameters, a number of profiles (or predefined sets of parameters) are available under the boundary conditions
tab. In most simulation scenarios, the user only needs to choose one of the predefined profiles and fine tune the
number of layers. PML boundaries perform best when the surrounding structures extend completely through the
boundary condition region. This will be the default behavior of structures whether or not they were drawn to end
inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational Electromagnetics.
Morgan & Claypool Publishers, 2007.
Metal 464
Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE). The
component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic field H
perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting, allowing no energy
to escape the simulation volume along that boundary. In the FDE solver, metal BC is the default setting 464 .
PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE) boundaries.
The component of the magnetic field H parallel to a PMC boundary is zero; the component of the electric field
perpendicular to a PMC boundary is also zero.
Periodic 478
Periodic BC should be used when both the structures and EM fields are periodic. Periodic boundary conditions can
be used in one or more directions (i.e. only in the x direction) to simulate a structure which is periodic in one
direction but not necessarily other directions.
Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between each
period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations predominantly for the
following two simulations:
Launching a plane wave at an angle to a periodic structure in this situation, accurate reflection and transmission
data can be measured at a single frequency point for a given simulation.
Calculating the bandstructure of a periodic object in this situation, a broadband pulse is injected via a dipole
source into a periodic structure.
note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.
Symmetric/anti-symmetric boundary conditions are used when the user is interested in a problem that exhibits one
or more planes of symmetry; both the structure and source must be symmetric. Symmetric boundaries are mirrors
for the electric field, and anti-mirrors for the magnetic field. On the other hand, antisymmetric boundaries are anti-
mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must be given to whether
symmetric or anti-symmetric boundary conditions are required, given the vector symmetry of the desired solution.
For meaningful results, the sources used must have the same symmetry as the boundary conditions. Further
information about symmetric and anti-symmetric boundary conditions can be found in Choosing between symmetric
and anti-symmetric BCs 466 .
ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures (this
option is not available in the boundary condition tab of mode sources and mode expansion monitors).
Objective
This section discusses the issues that must be taken into consideration when employing perfectly matched layer
(PML) absorbing boundaries. A new PML boundary condition formulation was introduced in the 2015a release of the
FDTD and varFDTD solvers. The new formulation is based on the stretched coordinate formulation proposed by
Gedney and Zhao.
Solvers 101
FDTD
FDE
VarFDTD
See also
Simulation 414
Extending structures through PML 368
Reference
[1] J. P. Berenger, Perfectly Matched Layer
(PML) for Computational Electromagnetics.
Morgan & Claypool Publishers, 2007.
[2] S. D. Gedney and B. Zhao, An Auxiliary
Differential Equation Formulation for the
Complex-Frequency Shifted PML, IEEE
Trans. on Antennas & Propagat., vol. 58, no.
3, 2010.
Introduction
By construction, PML absorbing boundary conditions are impedance matched to the simulation region and its
materials 1. This allows them to absorb light waves (both propagating and evanescent) with minimal reflections. An
ideal PML boundary produces zero reflections, however, in practice, there will always be small reflections due to the
discretization of the underlying PML equations. Furthermore, as a consequence of using finite difference
approximations to discretize the PML equations, there is some chance of producing numerical instabilities 2. The
goal of this section is to outline best practices for minimizing reflection errors and getting rid of numerical instabilities
without increasing simulation times unnecessarily.
PML Type
A new PML boundary condition formulation was introduced in the 2015a release of the FDTD and varFDTD solvers.
The new formulation is based on the stretched coordinate formulation proposed by Gedney and Zhao2. The
previously employed PML formulation (based on a uniaxial anisotropic material formulation) can still be used, and
any project file that was created using the old PML formulation will continue to use it unless the PML type is
updated at the top of the PML settings table.
PML Profiles
In FDTD or varFDTD simulation regions, the user can directly specify all the parameters that control the absorption
properties of the selected PML boundaries (see the screenshot on the right). To facilitate the selection of PML
parameters, a number of profiles are available on the PML settings table under the boundary conditions tab. Under
most simulation scenarios, the user only needs to choose one of the predefined profiles (standard, stabilized, steep
angle and custom) and fine tune the number of layers. For all profiles, increasing the number of layers will usually
lead to lower reflections. Having said that, each profile has a different numerical behavior and was designed with a
particular application in mind.
Stabilized
When material boundaries cut through PML regions, there is some chance that numerical instabilities will
appear. These usually manifest themselves as a localized exponential growth of the field amplitudes inside the
PML regions (usually near material interfaces). Most numerical instabilities that can occur inside PML regions
will go away with the use of this profile, however, this profile will require a higher number of PML layers than
the standard profile to achieve the same absorption performance. The stabilized profile was designed to provide
enhanced stability at the expense of having to increase the number of PML layers.
Steep Angle
This profile is very similar to the standard profile, and it is meant to be used when PML boundaries are
combined with periodic boundary conditions. It is designed to provide enhanced absorption in situations where
light travels in directions that are nearly parallel to PML boundaries. This profile is usually less absorptive than
the standard profile at very coarse discretizations (less than ten points per wavelength).
Custom
The standard, stabilized and steep anlge profiles have fixed PML parameters. The custom profile allows users
to experiment by giving the user full control over all the PML parameter values. The initial values of the custom
profile are those of the standard profile.
Using different PML profiles for different boundaries can significantly reduce simulation times. The example on the
right shows the PML settings table for a 3D simulation where a stabilized profile is only needed on the x min
boundary. Using the stabilized profile on all boundaries would lead to much longer simulation times, so it is
recommended to increase the number of layers only on the boundaries that actually need them.
boundaries. From the onset, the FDE solver has employed a stretched coordinate PML formulation. Unlike the FDTD
and varFDTD solvers, the FDE solver does not come with predefined profiles, and it employs a fixed number of
layers.
PML Parameters
Unlike conventional boundary conditions, PML boundaries have a finite thickness. In other words, they occupy a
finite volume that surrounds the simulation region. It is within this volume that the absorption of light happens.
LAYERS: For discretization purposes, PML regions are divided into layers.
KAPPA, SIGMA, ALPHA : The absorption properties of PML regions are controlled by three parameters. Their
definition can be found in the second reference at the top of this page. Kappa is unitless by definition, but sigma
and alpha must be entered into the PML settings table as normalized unitless values. Kappa, sigma and alpha are
all graded inside the PML regions using polynomial functions. Parameter alpha is sometimes described as a
complex frequency shift (CFS) in the literature2. Its main role is to improve numerical stability. Increasing the ratio
alpha / sigma will make a a PML boundary more stable, but it will reduce its absorption effectiveness; this is why
the stabilized profile requires a larger number of layers. To recover the S.I. unit values of alpha and sigma, it is
necessary to multiply by twice the permittivity of free space and divide by the time step employed in the
simulation.
POLYNOMIAL: It specifies the order of the polynomial used to grade kappa and sigma.
ALPHA POLYNOMIAL: It specifies the order of the polynomial used to grade alpha.
MIN LAYERS, MAX LAYERS: They enforce a sensible range of values for the number of PML layers.
Objective
This page describes why it is best to start most Eigenmode Solver simulations with Metal boundary conditions (BC),
even though PML boundaries may be the more obvious choice.
Solvers 101
FDE
VarFDTD
Associated files
usr_start_metal_bc.lms
usr_start_metal_bc.lsf
See also
Simulation 414
Description
In most simulations, the device substrate and other surrounding materials extend far beyond edge of the simulation.
Therefore, the most obvious choice of BC's is PML, which will absorb fields at the simulation boundary. Metal BC's
may seem like a poor choice because the real device is not surrounded by a metal box. In spite of this initial
impression, we usually recommend starting with Metal BC's. Some simulations may eventually require PML, but a
large fraction can be done entirely with Metal boundaries.
If the modal fields are very small at the edge of the simulation, then the choice of BC's is basically irrelevant (the BC
doesn't matter when the field at the boundary is zero). In such cases, we can select the most numerically efficient
BC, rather than the most physically correct BC. Metal boundaries have the following advantages over PML
boundaries:
1. Metal BC's make the simulation faster than PML.
2. PML boundaries can introduce unphysical 'PML' modes.
3. PML boundaries can introduce very small amounts of gain or loss in an otherwise lossless system.
As long as the modal fields are very small at the edge of the simulation region, Metal boundary conditions are
usually the best choice. They will give the same result as PML, but the simulation will not suffer from the problems
described above.
PML boundaries are required for modes that do extend to the edge of the simulation region. This is most likely to
occur for modes that are not completely confined to the structure and have some radiative loss. For example, when
studying bent waveguides, PML should be used because the bend can cause radiative loss.
Example
The associated file usr_start_metal_bc.lms has a very simple oval shaped waveguide. The script
usr_start_metal_bc.lsf will calculate the effective index and mode profile of this structure using both Metal
and PML BC's. As the following figures show, the mode profile and effective index from the two tests are very similar.
However there are some interesting differences to notice:
The Metal simulation runs much faster than the PML simulation.
The mode profiles are slightly different, but these differences are only visible on a log scale. Some small
differences are expected because the Metal BC's require that the fields go to zero at the edge of the simulation,
while PML does not.
The PML simulation shows that mode1 has a very small amount of loss (the imaginary part of the index). However,
this value is numerically equivalent to zero.
PML BC
Objective
Symmetry boundary conditions can be used whenever the EM fields have a plane of symmetry through the middle of
the simulation region. By taking advantage of this symmetry, the simulation volume and time can be reduced by
factors of 2, 4 or 8.
This topic describes the difference between symmetric and anti-symmetric boundary conditions, and how to select
the appropriate boundary for your simulation.
Solvers 101
FDTD
FDE
VarFDTD
In this topic
Selecting the correct symmetry option 469
Fields at the symmetry boundary 467
Reflection symmetry rules 466
Symmetric Boundary Conditions for Periodic
Structures 469
See also
Simulation 414
The non-zero field components are shown in the following figure. Note that the blue arrows are electric field and the
green arrows are magnetic field.
The above symmetry rules are helpful when determining the symmetry of modes found with the mode source, and
resonant modes of cavities. The following figure shows the Real part of Ex and Ey of a mode that was calculated
with the Mode source. The direction of propagation is +Z. Notice that Ex has the same sign on each half of the
simulation region. Ey has the opposite sign on each half. Ey also goes through zero along the plane of symmetry.
Using the above symmetry rules, we can determine that there is a plane of anti-symmetry at X=0, and a plane of
symmetry at Y=0. Therefore, the x min boundary should be set to anti-symmetric and the y-min boundary condition
should be set to symmetric.
Referring to the example below, changing from Setting A to Setting B will preserve periodicity while reducing the
computation time needed by about 4x. Again this only applies if the structure and fields are BOTH symmetric and
periodic.
Most sources show their Electric or Magnetic polarization with colored arrows.
Electric field polarization is Blue
Magnetic field polarization is Green
The following figure shows how to select the correct symmetry condition based on the source polarization.
If the source polarization is tangential to the plane of symmetry, select the symmetry option with the same
color.
If the source polarization is normal to the plane of symmetry, select the symmetry option with the opposite
color.
Examples
In the following example with the triangular structure, there is one plane of symmetry in X. The source polarization
(Blue) is tangential to the X boundary. Therefore, we use Symmetric for the X min boundary condition. This
simulation will run 2x faster than the equivalent simulation without any symmetry settings. Notice that the blue arrow
of the source is along the edge of the region with the same color.
This next example shows a simulation with two planes of symmetry (in X and Y) The source polarization (Blue) is
normal to the X boundary, and tangential to the Y boundary. Therefore, use Anti-Symmetric for the X min boundary
and Symmetric for the Y min boundary. The X and Y max boundary condition do not need to be modified. This
simulation will run 4x faster than the equivalent simulation without symmetry boundary conditions. Notice that the
blue arrow of the source is along the edge of the region with the same color, and sticking into the region with
opposite color following the rules outlined above.
Objective
This section descriBloch Boundary Conditions (BC's), when they are required, and how they are different from
periodic BC.
Bloch boundary conditions are used in a variety of situations, but the most common is in simulations of periodic
structures that are illuminated with a plane wave source propagating at an angle (as shown in the screenshot below).
If a BFAST plane wave 590 is used, this Bloch BCs are automatically overridden by use of its own built_in BCs.
Solvers 101
FDTD
FDE
VarFDTD
See also
Simulation 414
Periodic boundary conditions 478
Broadband injection angles 536
PML reflection at angles 460
Plane waves - Edge effects 526
The need for this phase correction is easy to understand when considering a plane wave propagating at an angle as
shown in the following movies. When the propagation is at an angle, the fields from one period to the next are not
exactly periodic: They will be out of phase by some amount. The Bloch BC's correct for this factor.
INCORRECT SETUP!
Same as above, but with
periodic BC in the X and Y
directions.
Computational cost
Simulations that use Bloch BC's required up to 2x the memory and time compared to an equivalent simulation
without Bloch BC's. This increase occurs because the simulation must use complex valued time domain fields,
rather than the default choice of real valued time domain fields.
Ex1=sin(w*t)*exp(-(t-10)^2/5);
Ex2=exp(1i*w*t)*exp(-(t-10)^2/5);
plot(t,real(Ex1),abs(Ex1)^2,abs(Ex2)^2);
legend("Real Ex","|Ex_real_field|^2","|Ex_complex_field|^2");
Automatic calculation of the Bloch vector when using the plane wave source
When doing simulations that involve Bloch BC and plane waves at an angle, "set based on source angle" option
should be enabled (it is by default), as shown in the following figure. This setting is only accessible when using
Bloch BC. If you disable this option, you have to input kx, ky, and kz manually. Manually setting the bloch vector is
important for bandstructure simulations.
Objective
This section describes how to do broadband parameter sweeps of the source angle of incidence with Bloch boundary
conditions, when you want to do so.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
usr_bloch_angle_sweep.fsp
usr_bloch_angle_sweep.lsf
See also
Simulation 414
Bloch boundary conditions 471
Broadband injection angles 536
PML reflection at angles 460
When using bloch boundary conditions with a broadband plane wave source, the angle of incidence changes as a
function of frequency, as described in the Bloch BCs in broadband simulations 471 section. This makes broadband
parameter sweeps of the source angle of incidence difficult because each simulation will return data at a different set
of incident angles for each frequency.
Imagine that we want to calculate the transmission of a structure for wavelengths between 300-600 THz (0.5-1um)
with a source angle of incidence between 10-45 degrees. One option is to do a series of single frequency
simulations. The problem with this solution is the large number of simulations that will be required, since it will
require a 2D parameter sweep (wavelength and source angle). An alternative solution is to do a series of broadband
simulations. The advantage here is that we only need a 1D parameter sweep (source angle), since each simulation
will return broadband data. The complication is that the source angle of incidence will be different at each frequency.
Therefore, an extra step will be required to interpolate the data onto a common source angle vector.
In the associated example, we calculate the broadband (300-600 THz) transmission of a structure for plane waves
incident at 10-45 degrees. The script will run a 1D parameter sweep over a range of incidence angles. The following
figure shows the locations of the data returned by the parameter sweep.
Note
The technique in this example has the obvious benefit of making your simulations faster, by allowing you to run
broadband simulations. However, it also adds a significant amount of complexity to your simulations. For your
initial simulations, it may be easier to simply run the full 2D sweep rather than try to use this technique.
Each line of data is from a single simulation. As you can see, the effective source angle theta changes as a function
of frequency within each simulation. This makes further analysis and plotting very difficult. The solution is to
interpolate this data onto a uniform grid, as shown in the next figure. The data is interpolated to the uniform grid
through a series of 1D interpolations (one for each frequency).
The final result, power transmission vs wavelength and angle of incidence is shown below. The locations of the
original data have been superimposed on the image.
This simulation simply calculates the power transmission through an interface. Using Snell's law, we calculate the
critical angle for a 2:1 dielectric interface to be 30 degrees. There should be no wavelength dependence. The above
figure suggests this result, although there is some noise because of the resolution of the sweep. The above results
could be made smoother by increasing the number of points in the sweep.
Note, for this example, some incidence angles are larger than the critical angle, BFAST 590 cannot be used. If the
incidence is in the opposite direction, users can use BFAST and no need to sweep.
Tips
Simulation bandwidth: In most cases, the simulation bandwidth is inherited from the source frequency range. The
simulation bandwidth affects the simulation in many ways, including the mesh size, material fits, etc. In this case,
we want these aspects of the simulation setup to be the same for each point in the sweep, even though the
source range is changing. For this reason, the script manually sets the simulation bandwidth (in the FDTD region -
advanced tab properties), rather than allowing it to be inherited from the source.
The monitors in this example always collect data over the full wavelength range (300-600THz), even though the
source range is much smaller in some situations. This makes the data analysis easier, but it can lead to some
incorrect results for data collected outside the range of frequencies injected by the source (if the source doesn't
inject any power at some frequency, the results at that frequency can't be accurate). For the most part, this is not
a problem, since those data points are outside the range of interest. However, it can cause some small problems
near the boundaries of the data. In this particular example, you will see some errors in the above results near
theta=10, f=360THz due to this problem. This problem can be minimized by increasing the number of points in the
sweep. It can also be completely avoided by slightly increasing the source angle range to slightly more than the
actual range of interest.
Solvers 101
FDTD
FDE
VarFDTD
See also
Bloch boundary conditions 471
Symmetric and anti-symmetric BCs 466
When studying periodic systems, Periodic BC's allow you to calculate the response of the entire system by only
simulating one unit cell. Periodic BC's are relatively straightforward to use in your simulation: simply set the
simulation span to be one unit cell wide and select Periodic BC's for that boundary. When the simulation runs, the
Periodic BC's simply copy the EM fields that occur at one side of the simulation and inject them at the other side.
The most important detail to remember is that when using Periodic BC's, everything in the system must be periodic:
both the the physical structure AND the EM fields. A common source of error is to use periodic boundary
conditions in systems where the structure is periodic, but the EM fields are not. Examples include:
A periodic structure is illuminated by a plane wave propagating at an angle. The fields will not be quite periodic in
this case, as there will be a phase difference between each period of the device. Use Bloch BC's 471 instead.
A periodic structure is excited by a single dipole source, such as in OLED 2682 simulations. In this case the
system is not periodic because there is only one dipole, not one dipole per period.
Additional Tips
Periodic BC's are most often used with the Plane 521 wave source.
If the Plane wave source is injecting at an angle, then the fields will not be periodic (there will be a phase
difference between each period). Use Bloch BC's 471 instead to get single frequency result, or use BFAST 590 to
get broadband result.
For systems that are both periodic and have symmetry, select symmetry (or anti-symmetry) on both boundaries.
This allows you to simulate only 1/2 of one unit cell. See Symmetric and anti-symmetric BCs 466 for details.
For best performance, enough of the structure should be drawn in the CAD so that it extends through the
boundary condition region (the one mesh cell thick boundary region drawn in a light blue color. This ensures that
the material properties are correctly defined in the boundary condition region.
5.4.3.4 Analysis
The button includes options to open the object library 210 with a few preset categories. Analysis objects
allow you to group monitors (similar to structure groups) and to analyze that monitor data. For example, a set of
393
monitors can be grouped together to form a closed box. From the raw monitor data, the group can calculate
quantities like cross sections and far field projections.
The analysis groups in the Farfield projections category provide options to calculate the farfields using the nearfield
data of monitors.
This is only available in FDTD Solutions.
This category includes analysis groups for calculation of transmission of power through a monitor or box of monitors
as well as options to calculate absorption.
This category includes analysis groups for post processing of resonator simulation results to calculate quantities
such as the Q factor as well as modal area/volume anaylsis.
There are many more categories of components available that are constantly being updated.
STL 487
This page provides an example to show how to import STL-formatted files into the layout editor.
GDSII 480
This file format is commonly used to store 2-dimensional geometric data.
Surfaces 489
Tthis tool is useful for importing data from an atomic force microscope (AFM). In two dimensional simulations, the
data must be defined as y = f(x). In three dimensional simulations, it must be defined as z = f(x,y). Both upper and
lower surfaces can be imported.
Images 499
Imports images either in JPG or PNG format . For example, this tool is useful for importing from a scanning electron
microscope (SEM) image. In three dimensions, the imported data is extruded along the z axis.
CSV 502
Imports spatial liquid crystal (LC) orientation data from a CSV file. This file is typically created with TechWiz LCD
from Sanayi System Co., Ltd. (http://sanayisystem.com/) and makes it easy to import spatial information on LC
orientation from TechWiz LCD simulations.
Objective
This page provides an example to show that a GDSII file can be imported and exported. The GDSII import function
allows you to import structures from a GDSII file into the layout editor. The GDSII file format is commonly used to
store 2-dimensional geometric data. This data can be directly imported into a 2D layout environment, or it can be
used to import 3D objects into a 3D layout environment by extruding the 2D data in the Z dimension.
A real GDSII example 483 can be found on the next page. Users may also find the built-in Layer builder 372 function
useful when importing and exporting GDS files.
Solvers 101
FDTD
FDE
EME
VarFDTD
DEVICE
Associated files
GDS_export_import.lsf
GDS_export.gds
See also
Structures 318
GDSII import/export 1677 script commands
Layer builder 372
Real GDSII example 483
GDSII export automation 484
Features Supported
General
Multiple cells in GDSII library file Yes
Layer numbers for drawing objects Yes
Primitives/Objects
Box/Rectangle Yes
Polygon Yes
Path Yes
Node No
Text No
Symbolic cell reference Yes
Array cell reference Yes
Advanced
Cell references in external library/file No
Magnifications in array and symbolic references Yes
Rotations and mirroring in array and symbolic Yes
references
Path objects in GDSII files are piecewise linear lines plus a width and optionally some information on how
to handle corners and ends. In general, GDSII files support several types of corner style options (squared,
rounded, extended squared, etc). Our import function supports type 0 (squared ends flush to the end-point)
and will default to type 2 (square ends with 1/2 the width added to the end-point) for all other types.
Import GDS button located on the main toolbar. This will bring up a standard file browser, which will
allow you to select a file with the extension .gds or .db. Selecting a GDSII file will bring up the Single layer
GDSII Import window as shown below. A downloadable associated file GDS_export.gds can be used to test
the GUI import function.
The following 3 input parameters control how the GDSII data is imported:
Cell name: This selection menu contains the valid cells available in the GDSII library. Select the cell you
wish to import.
Layer number: This selection menu contains all of the layer number present in the GDSII file. Only
structures with the selected layer number will be imported by this operation.
Material: This selection menu contains a list of the valid materials in your current simulation environment.
This material will be assigned to the imported structures.
Selecting the Import layer button imports all the structures with the selected layer number in the selected cell
into the layout environment. These structures are automatically inserted into a structure group. The material is
set as an input parameter for the structure code, and the script in the structure group sets all the objects to
the desired material. The name of the structure group includes the original number of layers. For 3D
simulations, the structure group contains a variable "z span". This used to set the width of the layer in the z
direction. The origin of the structures, as well as their orientation, can be changed by changing the properties
of the structure group.
In the simple 'GDS_export.gds' example file, valid cell/layer combinations with structure information are:
Substrate / Layer 1
Si_polygon / Layer 2
Au_particle / Layer 3
Au_particle_array / Layer 3
Import using script command
The GDSII file can also be imported via script, the command gdsimport can be used, see stage 3 of the
associated files GDS_export_import.lsf for example. For more information of the script commands,
please visit Scripting - GDSII chapter 1677 .
The graphical information can be exported to the a .gds file in the current working directory. For more
information of the commands, please visit Reference Guide - GDSII chapter 1677 .
To automate the GDSII file export process, please visit the next page GDSII export automation 484
Objective
This page provides a simple but real GDSII example in silicon photonics.
Solvers 101
FDTD
FDE
EME
VarFDTD
DEVICE
Associated files
GDS_GC_Ring.gds
GDS_GC_Ring.lsf
See also
Structures 318
GDSII import/export 1677
script commands
Layer builder 372
GDSII export automation 484
Reference
[1] Lukas Chrostowski, Xu
Wang, Jonas Flueckiger,
Yichen Wu, Yun Wang,
Sahba Talebi Fard, "Impact of
Fabrication Non-Uniformity on
Chip-Scale Silicon Photonic
Integrated Circuits", Optical
Fiber Communication
Conference, pp. Th2A.37,
03/2014.
[2] Yun Wang, Xu Wang,
Jonas Flueckiger, Han Yun,
Wei Shi, Richard Bojko,
Nicolas A. F. Jaeger, and
Lukas Chrostowski, "Focusing
sub-wavelength grating
couplers with low back
reflections for rapid prototyping
The circuit in the associated GDS_GC_Ring.gds file includes one racetrack ring resonator [1], two grating couplers
[2], and routing waveguides. Users can import the whole circuit, or the individual cells, into the simulation layout
using GUI, or using script commands such as the associated GDS_GC_Ring.lsf file.
Focusing sub-wavelength grating couplers with low back Ring resonator used to study the impact of
reflections for rapid prototyping of silicon photonic circuits. fabrication non-uniformity on silicon photonic chips.
Courtesy of the L. Chrostowski group at UBC. Courtesy of the L. Chrostowski group at UBC.
Objective
This page provides an example to automate the GDSII export process.
Solvers 101
FDTD
FDE
EME
VarFDTD
DEVICE
Associated files
GDS_auto_export.lsf
GDS_auto_export_add_cell_to_top.lsf
GDS_auto_export_check_type_and_create_cel
l.lsf
GDS_auto_export_find_layer.lsf
GDS_auto_export_test.fsp
GDS_auto_export_waveguide.lsf
output.gds
See also
Structures 318
GDSII import/export 1677 script commands
Layer builder 372
Real GDSII example 483
Currently, we can only export structures to GDSII using scripts. The basic GDSII export 1677 script commands have
very limited capabilities. Here we provide some advanced scripts that can automate the GDSII export process.
Step 2. open the simulation file GDS_auto_export_test.fsp. In this file, the structure group "export_to_GDS"
contains a list of primitive structure objects. We will export most of them, but not all - the surface, sphere, pyramid,
and disable objects will be ignored.
Step 3: open and run the script file GDS_auto_export.lsf. The scripts will create a GDSII file, in which the top
cell has the same name as the structure group and contains a list of subcells corresponding to each of the objects
within the structure group.
Users should only modify the scripts in the "User modification section", as shown below. In most cases, objects on
different layers have different positions and spans in the vertical direction; therefore, we use a matrix in the form of
[layer number, z, z span] to define the layer properties. For each object, the
GDS_auto_export_find_layer.lsf will find the right layer number based on its z and z span. Users can also
adjust the discretization resolution for circle, ring, custom, and waveguide objects.
#####################################################
# User modification section starts here
# optional settings
n_circle=64; # number of sides to use for circle approximation (64 by default).
n_ring=64; # number of slices to use for ring approximation (64 by default).
n_custom=64; # number of slices to use for custom approximation (64 by default).
n_wg=64; # number of slices to use for waveguide approximation (64 by default).
Step 4: check the generated GDSII file using your layout tools (e.g., KLayout) or Lumerical CAD tools. As shown in
the image below, the top cell is "export_to_GDS" and includes a list of subcells on different layers.
Notes
1. Users should put the objects to be exported into a specific structure group. The objects here only mean physical
structures (i.e., do not include simulation regions, mesh, source, monitor, etc).
2. Users should define the output GDS name, the structure group name, the layer properties, and optional settings
in the "User modification section" of the GDS_auto_export.lsf script file.
3. Currently, these scripts do not support hierarchy, so users should put all the physical structures directly within
the top structure group.
4. The scripts also require that all objects should have unique names.
Objective
This page provides an example to show how to import STL-formatted files into the layout editor.
STL (Standard Tessellation Language or STereoLithography) is a well-supported format for many 3D CAD products.
It is widely used for rapid prototyping and computer-aided manufacturing. STL files describe the surface geometry of
3D objects by triangular representation of the objects. The surface of the objects are broken into a series of
triangles. Each triangle is uniquely defined by its three vortices and the surface-normal vector.
STL files can be imported by selecting 'File' --> 'Import' --> 'STL'. Multiple STL objects, as shown below, can also be
imported by sequentially importing each file. Once imported, the STL-imported objects are treated as planar solid
objects in the layout editor.
The associated files below can be used to test the import. When imported, the assembly is recognized as a single
object. Alternatively, each part can be separately imported and assembled in the layout editor. In this case, each
part imported is treated as a separate object.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
Associated files
STL_import_assembly.stl (4 parts
in a single file)
part1, part2, part3, part4 (each
part in a separate file)
See also
Structures 318
GDSII import/export 1677
Notes:
1. Binary and ASCII compatible
Both Binary and ASCII STL files are recognized in the layout editor. However, Binary files are recommended
since they are smaller in size.
2. Length unit
An STL file does not contain any information about the length unit used in the CAD software where you created
the STL file. For example, a 30 (mm) x 30 (mm) x 30 (mm) cube in STL-format created in a CAD with a length
unit set to mm will be recognized as 30 (um) x 30 (um) x 30 (um) in size by default, see stlimport 1554 to
change the scaling factor. To avoid any size issues, it is recommended that you choose the right length unit in
the layout editor prior to importing STL files.
3. Material
An STL file can represent only one type of material. An STL-imported object cannot be subdivided into multiple
pieces. Therefore, if there are multiple shapes (or groups of shapes) that require separate material definitions,
they should be created into different STL files.
4. Tolerance
STL files may be created with different levels of tolerance. A tight tolerance results in a large file with many
surface facets. These files take a long time to load and display. A looser tolerance results in fewer surface
facets. It is generally a good idea to start with a loose tolerance and increase it as necessary to achieve a
balance between the file size and surface refinement.
Material tab
The material options are as follows:
MATERIAL: This field can be set to any material included in the material database. It is possible to include
new materials in the database, or edit the materials already included. See the material database section for
more information.
OVERRIDE MESH ORDER FROM MATERIAL DATABASE: Select to override the mesh order from the
material database and manually set a mesh order. The mesh order is used by the simulation engine to
select which material to use when two materials overlap. See the mesh order (optical) 271 or mesh order
(electrical) 271 section for more details.
MESH ORDER: Set the mesh order in this field if the OVERRIDE MESH ORDER FROM MATERIAL
DATABASE option is selected. If the option is not selected, the field displays the material's default mesh
order from the database. For example, a material of mesh order 1 will take precedence over a material of
mesh order 2.
If <Object defined dielectric> is selected, then the INDEX property must be set.
INDEX: The refractive index of the structure, when the material type is <Object defined dielectric>. The index
must be greater than one.
v Anisotropic index: To specify an anisotropic refractive index, use a semicolon to separate the diagonal
xx,yy,zz indices. Eg. 1;1.5;1
v Spatially varying index: It is possible to specify a spatially varying refractive index by entering an
equation of the variables x,y,z in this field. Eg. 2+0.1*x will create an object where the refractive index
increases in the X direction. The units of the spatial variables (x,y,z) must be set with the 'INDEX UNITS'
property described below. The variables x,y,z will be zero in the center of the object. When using an
equation in this field, consider using a mesh override region to control the simulation mesh size. For
more information on entering equations, see the Equation interpreter 214 section.
INDEX UNITS: Only relevant when specifying a spatially varying equation in the INDEX properly described
above. Specify the units (nm, um, m) of the x,y,z position variables.
GRID ATTRIBUTE NAME: Enter the name of the grid attribute that applies to this object, see the grid
attribute 253 section
If the material chosen from the drop down menu is a binary alloy consisting of two semiconductors, then there
will be an additional property, namely, the "composition fraction" to set as well.
COMPOSITION FRACTION: This is x, the fraction of the semiconductor in the alloy. x can either take a fixed
value or vary.
The user can see which semiconductor has fraction x and which has fraction (1-x) shown in a line above this
drop down menu.
FIXED: This means that fraction x will be a constant value between 0 and 1.
LINEAR X/Y/Z: This means that the composition fraction x will vary as a function x or y or z. In this case, user
can specify the min and max fraction values for the min and max spatial points and the fraction will be
interpolated linearly in between. x,y,z here are those of the unrotated object. x,y,z are local to the object.
EQUATION: The user can enter an equation for the fraction that varies with u,v and w. u is (x-x0), v is (y-y0)
and w is (z-z0) where x0, y0 and z0 are the center coordinates of the object. This means that u,v and w are
local to the object.
Rotations tab
Rotate objects by setting the following variables:
FIRST, SECOND, THIRD AXES: Select rotation axis. Up to three different rotations can be applied.
ROTATION 1,2,3: The rotation of the object in a clockwise direction about each axis, measured in degrees.
RENDER TYPE: The options for drawing the objects are detailed or wireframe. Detailed objects are shaded
and their transparency can be set using OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE.
DETAIL: This is a slider which takes values between 0 and 1. By default it is set to 0.5. Higher detail shows
more detail, but increases the time required to draw objects. This setting has no effect on the simulation.
OVERRIDE COLOR OPACITY FROM MATERIAL DATABASE: When unselected the opacity is determined
from the material database. When selected, you can specify a value for ALPHA between 0 (transparent) and
1 (opaque) for the object, depending on how transparent you want the object to be.
Objective
This section describes the data format for importing surface data Z(x,y) into the import primitive. It provides example
data files and example script files that generate the data files. This object is sometimes used to import atomic force
microscope (AFM) data.
Solvers 101
FDTD
FDE
VarFDTD
DEVICE
Associated files
from text file
usr_importsurface_3d.fsp
usr_importsurface_3d.lsf
usr_surface_3d_1.txt
usr_surface_3d_1.lsf
usr_surface_3d_2.txt
usr_surface_3d_2.lsf
File formats
The file formats are shown in the following tables. Spaces, commas or tabs can be used as separators in the
files. The columns do not have to be aligned. Please note that as shown below, the data ranges go from 0 to
m for x (0 to n for y). This means that there are actually m+1 data points in x and n+1 data points in y.
Z = Z(x,y): It is often easy to reverse the meaning of x and y when exporting a file. The surface import
window provides a check button to invert x and y to correct this problem easily.
Description File format
type 1: The x and y data is
contained in the file. An
example file is
usr_surface_3d_1.tx
t. A script file that
generates this example is
usr_surface_3d_1.ls
f.
To import surface data, click on the Surface option of the Import button in the main toolbar, which will
open the Surface data import wizard.
SELECT FILE: let the user specify the data file to be imported.
X, Y, Z: the data origin in the global coordinates of the Graphical Layout Editor. For example, if you are
importing a surface defined by an AFM that is on a slab of Si that ranges from 0 to 2 microns, you should
set z0 to 2 microns.
X SPAN, Y SPAN: This defines the size of surface area that you are importing. If the x and y data was
contained in the file (file format type 1), then these fields are inactive. If the x and y data was not in the file,
then these fields are active and should be set to the desired data span.`
UPPER SURFACE, LOWER SURFACE: Choose which surface is being imported.
FILE UNITS: Select units for the data in your file.
INVERT X AND Y AXIS: It is often easy to invert the x and y axis when exporting the file. Selecting this
checkbox means that the x and y axes are automatically reversed.
After surface data has been imported, the Import data tab allows the following properties to be modified:
IMPORT: You can import new data into the object, or clear the imported data via a simple GUI. For
properties of the import GUI, see bottom of page.
X,Y FINE SCALE ADJUSTMENTS: Re-scale the object X,Y span. Modifying these properties will change the
X,Y span properties. Z SCALE property not used for surface import.
DATA SIZE: These properties provide some information about the imported data. They are read-only.
LOWER, UPPER REF HEIGHT: Set the vertical location of the reference plane (height=0 in the imported
data). Modifying these properties will change the Z, Z span properties.
Using Script
The following script commands are described in detail in the Scripting chapter 1574 . Examples script files are
provided here.
Objective
This section describes the data format for importing n and k (anisotropy possible) as a function of volume into the
import primitive. It also provides example data files and example script files that generate the data files. There are
two ways to import the nk data, 1) from data stored in a text file, 2) from matrices created by script commands. The
imported nk data is only for a single frequency.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
from a text file
usr_importnk_3d.fsp
usr_importnk_3d.lsf
usr_importnk_3d.txt
See also
Structures 318
Import object 480
Script commands
importnk 1575
importnk2 1576
type 1:
Only the
real part
of the
index is
included
in the
file. The
values of
x range
from X1
to Xn, y
from Y1
to Ym
and z
from Z1
to Zp. X1
must be
the
minimu
mX
value
and Xn is
the
maximu
m value.
Also,
the
values of
x, y, and
z must
be
uniforml
y
spaced -
see
above
note.
type 2:
The
imaginar
y part of
the
index (k)
is
included
in the
second
column
of the
file after
the
header.
An
example
file is
usr_im
portnk
_3d.tx
t. A
script
file that
generate
s this
example
is
usr_im
portnk
_3d.ls
f
Note: No anisotropy is show n in the im port w izard and the CAD. Use an index m onitor to see indices in
other direction. By default, the xx-index is show n.
By default, only the xx-index is shown in the CAD and the import wizard. Use an index monitor 638 to see
indices in other direction.
Objective
This section describes the data format for importing binary data to define an object. In this binary import, the data
should have values of 1 or 0, indicating that the object is or is not present. This capability was introduced in FDTD
Solutions 8.6.3.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
from text file
usr_importbinary_3d.fsp
usr_importbinary_3d.lsf
usr_importbinary_3d.txt
See also
Structures 318
Import object 480
File formats
The file formats are shown in the following tables. Spaces, commas or tabs can be used as separators in the
files. The columns do not have to be aligned.
Description File format
type 1: The values of x
range from X1 to Xn, y from
Y1 to Ym and z from Z1 to
Zp. The values of x, y, and
z must be uniformly
spaced. The number n
should be either 1 (the
material is present at this
location) or 0 (the material
is not present). If other
values are used, any non-
zero value will be
interpreted to be 1.
To import binary data, click on the Binary import option of the Import button in the main toolbar, which will
open up the import wizard.
when exporting the file, and this check button allows you to reverse the order easily. Typically, it is very
easy to see in the figure window when you have the order incorrect.
PLOT PLANE: You can image the data in either the x-y plane, the x-z plane or the y-z plane to be sure that
it is correctly imported. Use this menu chooser to switch between planes.
Z (or X or Y): Depending on the PLOT PLANE chosen, you can view cross sections at any depth into the
structure. Use this slider or the value input field to choose the depth of cross section.
Objective
This section describes how to use the import object to create structures from an image. Images can be imported
from JPG (*.jpg) or PNG (*.png). Other image types can be exported to these two formats in most image editing
software.
Selecting the Import Image button in the main toolbar will open the Image Import Wizard. The wizard provides a
simple interface to import, threshold, crop and scale the image. The image is used to define the objects shape in the
XY plane. The object is extruded in the Z direction.
Solvers 101
FDTD
FDE
VarFDTD
Associated files
usr_import_image.fsp
usr_import_image.jpg
See also
Structures 318
Import objects 480
A) Click on the Import button expansion arrow in the main toolbar and
select the Image option to open the Image import wizard.
With the crop image and crop items selected, the image can be
cropped using the mouse to define a rectangular region.
Once a rectangle has been dragged within the plot area region, its
edges can be dragged to the correct location.
The last step of the import wizard allows you to accept the structure as
depicted, or move back through the steps to make modifications.
STEP 6:
See imported object in the CAD layout editor.
When the image import wizard is finished, you will see the imported
object in the CAD layout editor.
Objective
This section describes how to use the CSV import to directly import spatial Liquid Crystal (LC) orientation data from
a CSV (comma separated value) file. This file is typically created with TechWiz LCD from Sanayi System Co., Ltd.
(http://sanayisystem.com/) and makes it easy to import spatial information on LC orientation from TechWiz LCD
simulations.
Solvers 101
FDTD
Associated files
csv_import_example_data.cs
v
See also
Structures 318
Import objects 480
Attributes 399
importcsvlc 1555 (script command)
File format
The file format for the csv file that defines the LC orientation as a function of space can be in a 2D format or 3D
format.
2D format
The file should have the form:
THETA,X=-50,X=-49,X=-48,X=-47,X=-46,X=-45,X=-44,X=-43,X=-42,X=-41,X=-40,X=-39,X=-38,...
Y=1,90,90,90,90,90,90,90,90,-,-,90,90,-,-,
Y=2,45,45,35,25,-,-,-,-,25,
.
PHI,X=-50,X=-49,X=-48,X=-47,X=-46,X=-45,X=-44,X=-43,X=-42,X=-41,X=-40,X=-39,X=-38,...
Y=1,35,45,55,65,75,85,90,90,-,-,90,90,-,-,
Y=2,11.5,15.2,20,30,-,-,-,-,30,40,
.
Where
The orientation of the LC is defined by THETA and PHI.
PHI is the azimuthal angle in the X-Y plane with respect to the x-axis, in degrees, using a clockwise rotation
when looking down the z axis
THETA is the angle between the x-y plane and the LC, in degrees. The polar angle, measured from the z-
axis, is 90-THETA, in degrees.
The Ux, Uy and Uz components of the unit orientation vector of the LC is given by
o Ux = sin(90-THETA)*cos(-PHI)
o Uy=sin(90-THETA)*sin(-PHI)
o Uz=cos(90-THETA)
When THETA or PHI are given by -, it indicates that there is no LC at that grid location
The units of X and Y are always in micrometers (microns)
There are precisely 2 sections, one for THETA and one for PHI
The same values of X and Y are repeated in each section
Each section has the same number of values of X and Y as columns and rows for THETA or PHI
3D format
THETA
Z=0,X=0,X=1,X=2,X=3,
Y=1,90,90,90,90,90,90,90,90,-,-,90,90,-,-,
Y=2,45,10,22.5,15.7,-,-,-,-,75,
.
PHI
Z=0,X=0,X=1,X=2,X=3,
Y=1,0,0,0,0,90,90,90,90,-,-,90,90,-,-,
Y=2,13.4,10.5,3.23,15.7,-,-,-,-,75,73,
.
THETA
Z=1,X=0,X=1,X=2,X=3,
Y=1,75,75,75,90,90,90,90,90,-,-,90,90,-,-,
Y=2,45,10,22.5,15.7,-,-,-,-,75,
.
PHI
Z=1, X=0,X=1,X=2,X=3,
Y=1,10,20,30,0,90,90,90,90,-,-,90,90,-,-,
Y=2,13.4,10.5,3.23,15.7,-,-,-,-,75,73,
.
Where
The orientation of the LC is defined by THETA and PHI.
PHI is the azimuthal angle in the X-Y plane with respect to the x-axis, in degrees, using a clockwise rotation
when looking down the z axis
THETA is the angle between the x-y plane and the LC, in degrees. The polar angle, measured from the z-
axis, is 90-THETA, in degrees.
The Ux, Uy and Uz components of the unit orientation vector of the LC is given by
o Ux = sin(90-THETA)*cos(-PHI)
o Uy=sin(90-THETA)*sin(-PHI)
o Uz=cos(90-THETA)
When THETA or PHI are given by -, it indicates that there is no LC at that grid location
The units of X and Y are always in micrometers (microns)
There are an equal number of THETA and PHI sections. The number of values of Z is equal to the number of
THETA (or PHI) sections.
The same values of X and Y are repeated in each section
The same value of Z is repeated in each pair of THETA and PHI sections
Each section has the same number of values of X and Y as columns and rows for THETA or PHI
Graphical import
Opening the wizard
The CSV import feature is accessible from the import toolbar with the menu item Import from CSV.
This will open the CSV import wizard where you can import any csv file described in the file format section.
The import wizard has three pages.
Page 1
This page allows you to select a file. Press the browse button get a file browser for easier selection.
Page 2
Page 3
Scripted import
The importcsvlc 1555 script command can be used to import the LC information from csv file from the script
without using the GUI import wizard.
Imported object
The CSV data is imported into a group object that contains Lumericals grid attribute and a rectangle. The
rectangle is transparent for better viewing. The properties of the imported LC including position, scaling,
resampling for viewing and the LC material can all be set directly by the LC analysis group. The names of the
LC material and LC attribute can be changed directly in the tree view. If desired, the grid attribute can be
removed from the group for association with more complex physical geometries. Also, when scripted import is
used, it is possible to import only the grid attribute for association with more complex physical geometries.
The following properties can be edited directly in the analysis group called "LC".
Please note that the corresponding properties should not be edited directly in the "LC attribute" child or the
"LC material" child objects as they will immediately be overwritten by the "LC" analysis group.
Objective
In some cases it may be necessary for a party A to generate binary or n,k import data and send it to party B. Party
A may not want party B to be able to see the actual structure that is being simulated. This section explains a
capability that can solve this problem.
Please note that the data obfuscation presented here does not use strong encryption technology. All
parties should have other means to protect their confidential information such as Non-Disclosure
Agreements (NDAs) or similar legal agreements and should additionally use strong encryption
technologies to prevent 3rd parties from gaining access to the data. Lumerical Solutions, Inc. does not
guarantee that this data obfuscation method will prevent any person from accessing the underlying data
and Lumerical Solutions, Inc. does not accept any liability for damages resulting from using this
obfuscation method, from a third party defeating this obfuscation method, or from a software error on the
part of Lumerical Solutions, Inc.
Key generation
The first step is to generate encryption and decryption keys. This will typically be done by one party who will send
one of the keys to the other. Typically, party B would generate the keys and then send the encryption key only to
party A.
There is a utility called obfuscatedimport.exe (obfuscateimport on linux and Mac) in the bin directory of
the installation. This utility can be used to create the keys. This utility must be run from the command line, or, by
using a batch file. For example, the keys on Windows can be generated with
This can be simpler to use by creating a simple *.bat file with the following commands on windows. This will create a
file keyfile.txt which contains both keys.
"C:\Program Files\Lumerical\FDTD\bin\obfuscateimport.exe" > keyfile.txt
Once the keys have been generate, they must be saved. Any files encrypted with the encryption key cannot be
decrypted without the decryption key.
Encrypting a file
To encrypt a file, the obfuscate import command should be used with these arguments
obfuscateimport.exe inputfile outputfile encryption_key
The easiest method is to create a batch file like this
"C:\Program Files\Lumerical\FDTD\bin\obfuscateimport.exe" inputfile1.txt obfuscatedfile1.
The file obfuscatedfile1.txt will contain the obfuscated copy of the input file.
Party A does not require a software license in order to encrypt a file. If they are not licensed users of FDTD
Solutions, they can simply download and install a trial version of the software and continue to use the file
obfuscation utility which does not require a license.
The best way to test is for party A to create an obfuscated copy of a non-confidential test file. This file can then be
imported using the original file (with script commands importbinary or importnk) and can also be imported from the
obfuscated file with script commands importbinaryobfuscated and importnkobfuscated). After running both
simulations on the same compute setup, any results such as electric field, power or transmission should be
numerically identical. If this is the case, you can proceed to confidential files that are obfuscated.
5.4.3.6 Sources
The following types of sources are available in FDTD Solutions and MODE Solutions' 2.5D FDTD solver:
Oscillating dipoles act as sources in Maxwell's equation to produce electromagnetic fields. Their position and
direction are specified in terms of the center position and their orientation through angles theta, phi.
In MODE Solutions, for the 2.5D FDTD solver, the orientation of the dipole source partially depends on whether the
polarization of the propagator simulation is set to TE or TM. Depending on the simulation polarization and dipole
type, the theta, phi values may be locked.
A Gaussian source defines a beam of electromagnetic radiation propagating in a specific direction, with the
amplitude defined by a Gaussian cross-section of a given width. By default, the Gaussian sources use a scalar
beam approximation for the electric field which is valid as long as the waist beam diameter is much larger than the
diffraction limit. The scalar approximation assumes that the fields in the direction of propagation are zero. For a
highly focused beam, there is also a thin lens source that will inject a fully vectorial beam. The cross section of this
beam will be a Gaussian if the lens is not filled, and will be a sinc function if the lens is filled. In each case, the
beams are injected along a line perpendicular to the propagation direction, and are clipped at the edges of the
source. For more information on the usage of these source, visit the planewave and beam sources 521 page.
Plane wave sources are used to inject laterally-uniform electromagnetic energy from one side of the source region. In
two-dimensional simulations, the plane wave source injects along a line, while in three-dimensional simulations the
plane wave source injects along a plane. It is also possible to inject a plane wave at an angle. The plane wave
source is actually the same object as the Gaussian source, with the only difference being the SOURCE SHAPE
setting. For more information on the usage of these source, visit the planewave and beam sources 521 page as well
as BFAST 590 page for angled incidence.
Total-field scattered-field sources are used to separate the computation region into two distinct regions one
contains the total field (i.e. the sum of the incident field and the scattered field), while the second region contains
only the scattered field. The incident field is a plane wave with a wavevector normal to injection surface. This source
type is particularly useful to study the scattering behavior of objects, as the scattered field can be isolated from the
incident field.
The mode source is used to inject a guided mode into the simulation region. The geometry of the mode source (i.e.
center location, and span) is used to compute the guided modes for the structure. In three-dimensional simulations,
the modes are computed across a plane, while in two-dimensions they are computed across a line. From a list of
possible modes, a single mode is selected for injection into the simulation region. For additional details on the
operation of the mode solver, consult the integrated mode source 566 section.
The import source allows the user to specify a custom field profile for the source injection plane. The custom field
profile can be calculated from an analytic formula, imported from another FDTD simulation, or imported from other
simulation tools such as Breault Research Organizations ASAP ray tracer.
In MODE Solutions, for the 2.5D FDTD solver, the orientation of the dipole source partially depends on whether the
polarization of the propagator simulation is set to TE or TM. Depending on the simulation polarization and dipole
type, the theta, phi values may be locked.
Solvers 101
FDTD
VarFDTD
Associated files
usr_source_electric_dipole.fsp
usr_source_magnetic_dipole.fsp
See also
Sources 510
Homogeneous materials 514
Non-homogeneous materials 516
Multiple sources 519
Source movies 628
FDTD and coherence 596
Incoherent dipole 605
Incoherent unpolarized dipole 607
Using the boundary conditions tab 459
Geometry tab
The geometry tab contains options to change the size and location of the sources. The dipole position and
direction are specified in terms of the center position and their orientation through angles theta, phi.
Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.
At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.
If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, very short pulses contain many frequency components and therefore disperse quickly.
As a result, short pulses require more points per wavelength for accurate simulation.
Pulse offset: This parameter defines the temporal separation between the start of the simulation and
the center of the input pulse. To ensure that the input pulse is not truncated, the pulse offset should be at
least 2 times the pulse duration. This will ensure that the frequency distribution around the center frequency
of the source is close to symmetrical, and the initial fields are close to zero at the beginning of the
simulation.
Source type: In general, you can choose between standard and broadband source types. Standard
sources consist of a Gaussian pulse at a fixed optical carrier, while the broadband sources consist of a
Gaussian pulse with an optical carrier which varies across the pulse envelope. Broadband sources can be
used to perform simulations in which wideband frequency data is required for instance, from 200 to 1000
THz. This type of frequency range cannot be accurately simulated using the standard source type.
Advanced
ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative (smooth transitions from/to
zero) at the start and end of a user defined source time signal. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.
t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );
Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.
Advanced tab
This tab only appears for the dipole source. The tab contains a RECORD LOCAL FIELD checkbox. When
checked, the fields around the dipole are saved; this box must be checked in order to use the dipolepower
script function.
Results returned
Results
DIPOLEPOWER: The power injected into the simulation region by a dipole is returned. The units will be in
Watts if cw norm is used and Watts/Hertz 2 if no norm is used.
PURCELL: By utilizing the power measurement, the emission rate enhancement of a spontaneous emitter
inside a cavity or resonator, the Purcell factor is returned.
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.
Solvers 101
FDTD
VarFDTD
In this section
Homogeneous materials 514
Non-homogeneous materials 516
Associated files
usr_dipole_power2D.fsp
usr_dipole_power3D.fsp
usr_dipole_power.lsf
See also
Sources 510
sourcepower 1601
dipolepower 1600
The script will run a total of 6 simulations, one for each of the dipole type listed above. In each case, it will compare
the total measured power in FDTD Solutions/Propagator with the analytic expressions. It does this over a wavelength
range of 1 to 2 um. It plots both the measured power and the analytical result for each case. The sourcepower
function evaluates the analytic expression described above. The dipolepower function measures the actual power
radiated by the dipole.
The 3D electric and magnetic dipole comparisons are shown in Figure 1. The percentage difference between the
measured result and the analytical expression as a function of points per wavelength in the homogeneous material
are shown in Figure 2..
a) 2D case b) 3D case
Figure 2: The difference between the analytical power for a dipole and the simulated power in FDTD Solutions, in 2D
and 3D, TE and TM, electric and magnetic dipoles.
We should note that we can compare to the analytic expression for the power radiated from dipoles to within
approximately 5% accuracy at 10 points per wavelength. This corresponds to a Mesh Accuracy setting of
approximately 2. At 20 points per wavelength (Mesh Accuracy approximately 4-5) the injected power is better than
2%.
The CW normalization option attempts to normalize monitor data to the amount of energy injected into the
simulation at each frequency. This allows the user to extract the CW response of a system for a range of
frequencies from a single simulation. For this normalization to occur, the injected power must be known. In the case
of a dipole, the injected power is calculated from the analytic formula for "total power radiated by a dipole in a
homogeneous material".
This means that the simulation data is actually normalized to the amount of power a dipole would inject in a
homogenous material, rather than how much power was actually injected into the specific simulation. A dipoles
actual injected power can vary significantly from the homogeneous value, depending on what physical structures are
near by. Field reflected from nearby structures re-interfere with the source, causing it to inject more or less power
than expected. The next section discusses this issue in more detail.
Solvers 101
FDTD
VarFDTD
In this section
Homogeneous materials 514
Non-homogeneous materials 516
See also
Sources 510
sourcepower 1601
dipolepower 1600
Related publications
Barnes, W. L. (1998). Fluorescence near
interfaces: The role of photonic mode
density. Journal of Modern Optics, 45,661-
669. DOI: 10.1080/09500349808230614
Open the file usr_dipole_power_metal1.fsp. This structure we are modeling is shown in the following
screenshot.
All boundaries are PML, except for the lower z boundary, which is set to metal. There is a single dipole source in the
simulation volume. Run the simulation, then paste the following script commands into the script prompt to create the
following figures.
f1=c/1.5e-6;
f2=c/1.0e-6;
f=linspace(f1,f2,100);
power1=sourcepower(f,2,"real_source");
power2=dipolepower(f, "real_source"); # actual power radiated by the dipole
plot(c/f*1e6,power1,power2,"wavelength (um)","power");
legend("Analytic power radiated in homogeneous material",
"Actual power radiated by dipole near metal wall");
When the simulation is done, run the script the above commands. They will calculate the total power radiated by the
dipole, normalized to the analytic expression for the power radiated by this dipole in a homogeneous material. You'll
see the following result shown in the following figure.
You can see that the radiated power is significantly different than the same dipole in free space. To understand
these results, we can consider the equivalent problem to the metal wall. Lets look at the problem using the method
of image charges. The metal wall can be replaced by a dipole with the appropriate orientation at an equal distance
behind where the original metal wall was, as shown below:
To simulate this system, load the file usr_dipole_power_metal2.fsp. It is setup with an image charge in
place of the metal wall. The lower z boundary has been extended, and set to use PML. The dipole source is
appropriately positioned. After running the simulation, paste the same script code into the script prompt again.
Notice that the figures are exactly the same as the first simulation. In the following figure, the two curves lie on top of
one another.
This example has two dipole spaced half a wavelength apart. The script will calculate the power radiated by the two
dipole system and compare it to the power each dipole would radiate by itself. The script uses a few techniques to
measure the radiated power. To reproduce these results, open the simulation file and then run the script.
s1 only simulation
Power box method: 0.98 fW
Dipolepower method: 0.99 fW
Sourcepower method: 1 fW
s2 only simulation
Power box method: 0.98 fW
Dipolepower method: 0.99 fW
Sourcepower method: 1 fW
There are a couple of important points to notice. First, all three techniques agree that a single dipole radiates 1fW of
power.
For the simulation with two sources, the three techniques do not agree. The Power box and Dipolepower methods
report a total radiated power of 1.4 fW while the Sourcepower reports 2 fW. The correct answer is 1.4 fW.
Interference between the two sources mean the total radiated power is not simply the sum of what each dipole would
radiate by itself. The Power box and Dipolepower methods correctly take this interference into account. The
Sourcepower method is not correct because it simply reports the sum of what each source would radiated by itself.
Therefore, when calculating the total power radiated by sources in simulations with multiple sources, you should use
the Power box or Dipolepower methods.
Solvers 101
FDTD
VarFDTD
In this section
Circular polarization and phase convention 540
Gaussian beam
Geometry tab
The geometry tab contains options to change the size and location of the sources.
Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.
At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.
If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, very short pulses contain many frequency components and therefore disperse quickly.
As a result, short pulses require more points per wavelength for accurate simulation.
Pulse offset: This parameter defines the temporal separation between the start of the simulation and
the center of the input pulse. To ensure that the input pulse is not truncated, the pulse offset should be at
least 2 times the pulse duration. This will ensure that the frequency distribution around the center frequency
of the source is close to symmetrical, and the initial fields are close to zero at the beginning of the
simulation.
Source type: In general, you can choose between standard and broadband source types. Standard
sources consist of a Gaussian pulse at a fixed optical carrier, while the broadband sources consist of a
Gaussian pulse with an optical carrier which varies across the pulse envelope. Broadband sources can be
used to perform simulations in which wideband frequency data is required for instance, from 200 to 1000
THz. This type of frequency range cannot be accurately simulated using the standard source type.
Advanced
ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative (smooth transitions from/to
zero) at the start and end of a user defined source time signal. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.
t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );
Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.
M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives," J. Opt. Soc.
Am. A 3,2086-2093 (1986).
M. Mansuripur, "Certain computational aspects of vector diffraction problems," J. Opt. Soc. Am. A 6, 786-
805 (1989).
M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives: erratum,
Certain computational aspects of vector diffraction problems: erratum" J. Opt. Soc. Am. A 10, 382-383
(1993).
The figure below shows the beam parameter definitions for the scalar approximation beam.
The figure below shows the beam parameter definitions for the thin lens, fully-vectorial beam.
Results returned
Results
FIELDS: The fields injected at the injection plane is returned as a function of position and frequency/
wavelength.
INDEX: The index of the region the source covers is returned. This value does not refresh automatically, user
needs to re-calculate the FIELDS.
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.
Objective
This section describes problems that can occur when using the plane wave source is truncated, either because the
span is too small, or when PML boundary conditions are used.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
Source field profiles and movies 628
Description
Simulate a plane wave propagating through free space at
normal incidence.
Simulation Settings
Periodic BC for Y boundaries. PML for X boundaries.
Plane wave source extends through simulation boundary.
No physical structures
Results
An ideal plane wave propagates forward from the source,
and is absorbed by the PML on the right side of the
simulation.
In front of the source, a uniform intensity of 1 is measured
at all locations. This is expected for a plane wave.
Behind source injection plane, zero field is recorded
because there is no scattered field.
Recommendations
This is an appropriate way to setup simulations using plane
wave illumination and periodic structures.
For plane wave illumination of non-periodic structures,
consider using the TFSF source.
Description
Simulate a plane wave incident on a periodic array of
cylinders at normal incidence.
Simulation Settings
Periodic BC for Y boundaries. PML for X boundaries.
Plane wave extends through simulation boundary
A cylinder with index 1.4 will cause some scattering.
Results
In front of the source, a complex intensity pattern is formed
due to interference from the sphere.
Behind source injection plane, there is some scattered field
visible due to reflections from the sphere.
Recommendations
This is an appropriate way to setup simulations using plane
wave illumination and periodic structures.
For plane wave illumination of non-periodic structures
surrounded by a uniform material, consider using the TFSF
source.
Example 3
If PML boundary conditions are used in the direction normal to the wave-vector, some undesired diffraction will occur
because of energy absorbed by the PML.
Description
Simulate a plane wave propagating through free space, but
with PML on all boundaries.
Simulation Settings
PML BC on all boundaries.
Plane wave extends through simulation boundary.
No physical structures.
Results
This simulation does not produce an ideal propagating
plane wave because the PML absorbs energy at the
simulation boundary, causing diffraction.
Far from the simulation boundary, the field still
approximates a plane wave.
Recommendations
This is not a recommended configuration, since the PML
causes non-physical distortions of the plane wave.
Consider using a focused beam source if you want a finite
sized beam.
Consider using a TFSF source if you want a plane wave on
a non-periodic structure.
Example 4
If the source does not span the entire simulation width, diffraction will occur at the source boundaries. Physically,
this setup can be understood as an infinite plane wave passing through an aperture the size of the source. Diffraction
occurs as the plane wave passes through the aperture.
Description
Simulating a finite sized plane wave propagating in free space
with the planewave source.
Simulation Settings
PML BC on all boundaries.
Plane wave source does not extend through simulation
boundary.
No physical structures.
Results
This simulation does not result in an ideal propagating
plane wave because the source has a finite width. This
causes diffraction at the edges of the source.
Far from the source boundary, the field still approximates a
plane wave.
Care must be taken with this type of simulation, since any
analysis may have to compensate for the diffraction near
the source boundary.
Recommendations
This is not a recommended configuration. There are very
few situations where this simulation setup is actually
required.
Consider using a focused beam source if you want a finite
sized beam.
Consider using a TFSF source if you want a plane wave on
a non-periodic structure.
Objective
This page describes how to set up a simulation with a plane wave source injected at an angle. Issues that arise
when using angled injection sources, including PML reflections, wavelength dependence of the injection angle, and
other errors are also discussed. Even though only the plane wave source is discussed here, the same issues arise
with all the sources including the mode source.
Note that the wavelength dependence issue can be avoided by using BFAST 590 or multifrequency beam calculation
for beam source and diffracting plane wave source.
Solvers 101
FDTD
VarFDTD
In this section
Simulation setup 530
PML reflections 531
Broadband injection angles 531
Sources 510
Bloch boundary conditions 471
Broadband injection angles 536
Parameter sweep tasks 716
Simulation setup
Source
To set a non-zero injection angle for a plane wave source, edit the source object. In the GENERAL tab of the edit
source window, set ANGLE THETA and/or ANGLE PHI (Angle Theta alone for 2D, both for 3D, if needed).
ANGLE THETA sets the angle with respect to the injection axis. In this example, the injection axis is the z-axis and
the XZ view is shown below.
This angle of injection is then rotated around the injection axis by ANGLE PHI in a right-hand context. The XY view in
the image below shows phi in our example.
Boundary conditions
Bloch boundary conditions are required when using a plane wave source injected at an angle. Bloch boundary
conditions are similar to periodic boundary conditions, but they take into account a phase change across each
period. Information about setting up Bloch boundary conditions can be found on the Bloch boundary conditions 471
page.
However, when BFAST source technique 590 is used, the boundary conditions set by the users in the plane of
oblique incidence will be overridden by BFAST's own built_in boundary conditions.
PML reflections
When injecting at steep angles, light will strike the PML boundaries at grazing angles. PML boundaries are
optimized to absorb light at normal incidence. At grazing angles of incidence, large PML reflections can decrease
the accuracy of the simulation results. Increasing the number of PML layers will reduce reflections.
Steeper injection angles require more PML layers. In the multi-layer stack Planewave technique 156 application
example, the model setup script is used to set the minimum number of PML layers used based on the angle of
injection of the source.
To get the actual angle injected at any particular wavelength, you can use the getsourceangle 1598 function, or edit
the source to see a plot of theta versus wavelength in the GENERAL tab.
In order to get broadband results at a certain source angle, a parameter sweep task can be set up to run a series of
single frequency simulations sweeping over the frequency range of interest. A guide to setting up parameter sweeps
is available at the Parameter sweep tasks 699 page.
To get the broadband results over a range of injection angles, a nested sweep can be set up to sweep over the range
of injection angles and source frequencies. The Nested sweeps 707 page provides a tutorial.
Additionally, this issue can be avoided by using BFAST 590 instead of Bloch/periodic plane wave source.
Injection errors
In broadband simulations with angled injection sources, there can be large injection errors at frequencies outside of
the center frequency. This can lead to errors if you use the transmission through a monitor placed behind the source
to measure reflected power. The alternative technique of using a monitor placed in front of the source is described on
the Measuring reflection 860 page.
Advanced
Longer source pulse
A longer source pulse can be used in the case where you are running a broadband simulation and injecting at a
steep angles where wavelengths beyond a certain threshold are injected at 90 degrees. In the following image you
can see that for this particular source setup, the wavelengths above approximately 0.8um will be injected at 90
degrees.
When light is injected at 90 degrees, it propagates across the simulation interfering constructively with itself. At
these wavelengths, there can be a large field intensity because the light does not propagate out of the simulation
region. The Fourier transform of the time signal will have a large peak corresponding to the wavelengths injected at
90 degrees, and the sidelobes of this peak can create noise at wavelengths of interest.
By default, FDTD Solutions uses the shortest possible source pulses in the time domain, which means they have a
much broader spectral content than the specified source wavelength range. A longer source pulse will have narrower
spectral content, and it is possible to increase the length of the source pulse until spectrum of the source pulse
does not include the wavelengths that are injected at 90 degrees.
The spectrum vs wavelength is plot for the default source pulse. A significant amount of power is injected at
wavelengths above 0.8um.
The spectrum for a source pulse where the pulselength and offset have been increased to 10 times the default
values. The power at wavelengths above 0.8um are reduced.
Interpolation
Another method for getting broadband results over a range of injection angles is discussed in Bloch BCs in
broadband sweeps 475 . This method uses broadband simulations and runs one parameter sweep over a range of
injection angles. This requires fewer simulations than the nested sweep method, but involves more post-processing
to interpolate the data to a common source angle vector.
Since BFAST 590 source fixes the incident angle for all the frequencies set in the source, the above interpolation is
not necessary, as one simulation can give broadband results at the given angle. When users want to get broadband
results at many different incident angles, a sweep of incident angles can be used. No interpolation will be needed
since the sweep can give broadband results as a function of incident angles.
Objective
The purpose of this section is to describe how diffracting plane wave source works and how it differs from Bloch/
periodic plane wave source. Well know double slit experiment is used to demonstrate this.
Solvers
101
FDTD
Associat
ed files
Double
slit
experimen
t with
diffracti
ng plane
wave
sources.f
sp
See also
Plane wave
sources 521
Plane waves
- Edge
effects 526
BFAST 590
The following analytical formula can be used to calculate the spacing of the interference maxima on the projection
plane:
zl
s=
d
where:
z is the distance of the projection plane from the slits
d is the distance between the slits
lambda is wavelength
Simple calculation shows that the distance between the maxima at 633nm should be approximately 3.05um.
Results
The simulation results shown on the figures below demonstrate the diffracting nature of the sources and their
constructive and destructive interference. Moreover, the distance between the maxima is ~3.04um, which is well
aligned with the analytical result above.
Objective
This section describes how the source angle of incidence changes as a function of frequency for non-zero injection
angles when Bloch/periodic plane wave source type is used. Note that this issue can be avoided by using BFAST
590 or multifrequency beam calculation for beam source and diffracting plane wave source.
Solvers 101
FDTD
VarFDTD
Associated
files
usr_broadb
and_inject
ion_angles
.fsp
usr_broadb
and_inject
ion_angles
.lsf
See also
BFAST 590
Diffracting
plane wave
source 534
Multi-
frequency
beam
calculation 543
Sources 510
Simulation 479
getsourceangl
e 1598
Bloch
boundary
conditions 471
Bloch BCs in
broadband
sweeps 475
PML reflection
at angles 460
Bloch/periodic plane wave source injects fields that have a constant in-plane wavevector at all frequencies. The
following figure shows a source with a nominal injection angle of approximately 45 degrees (purple arrow). The in
plane wave vector (dotted green line) is chosen such that the actual injection angle at the center frequency fsim of the
simulation matches the nominal injection angle. Since the magnitude of the wavevector is proportional to frequency,
the actual injection angle will change as a function of frequency. Higher frequencies will be injected at smaller
angles, while lower frequencies will be injected at larger angles.
Since the magnitude of the wavevector is a function of frequency, while the in-plane component is fixed, the injection
angle must change as a function of frequency. The angular dependence can be calculated with the following formula.
k in- plane
sin [q ( f )] =
k( f )
sin( q SIM ) f SIM
=
f
sin( q SIM ) f SIM
q ( f ) = a sin
f
Therefore, while broadband sources can inject at angles, it must be recognized that the injection angle will change
as a function of frequency. At close to normal incidence, the change in angles is smaller than at steeper angles. A
source injecting light at 450 to 550 nm with a 5 degrees nominal incidence angle will actually inject at angles
between 4.5 and 5.5 degrees. If the nominal angle is increased to 25 degrees, the range of angles will be between 23
and 28 degrees.
The getsourceangle function can be used to get the actual injection angle as a function of frequency. This data is
also displayed in the GENERAL tab of the Plane wave and Gaussian sources.
Run the simulation, then run associated script. The script first calculates the actual injection angle vs frequency with
the getsourceangle function.
Notice that the injection angle changes as a function of frequency. At low frequencies, the injection angle is almost
40 degrees. At high frequencies, the angle is about 25 degrees.
Next, the script plots the fields profile at 100 and 150 THz. Both figures are from the SAME simulation. The actual
propagation direction is obviously different.
Field profile at 100THz. Angle is about 40 degrees. Field profile at 150THz. Angle is about 25 degrees.
Note: What to do
If you encounter broadband injection angle error in your
simulation, there are two options you can choose from to
avoid this problem: you can run a series of narrowband
simulations or run a series of single frequency simulations.
When using a series of narrowband simulations, you need to
again check to make sure that the angle deviance is at an
acceptable level. If not, you would have to use a series of
single frequency simulations to obtain accurate results.
Objective
This topic discusses the phase convention and describes two techniques for implementing circularly (or elliptically)
polarized sources.
1. Use two sources polarized along orthogonal axes and adjust the relative amplitudes and phases of the sources
to create the desired polarization. This method is useful to study only one polarization state of the incoming light.
2. Run two simulations. In the first simulation, set the source polarization angle to 0 degrees. In the second
simulation, set the source polarization angle to 90 degrees. Using the linearity of Maxwell's equations, the
response to any arbitrary source polarization can be created by adding the the electromagnetic fields from the
two simulations with the appropriate complex-valued weighting factors.
Solvers 101
FDTD
VarFDTD
In this topic
Phase convention 540
Two sources in one simulation 540
Summing the results from two simulations 542
Associated files
usr_polarization1.fsp
usr_polarization1.lsf
usr_polarization2.fsp
usr_polarization2.lsf
See also
Sources 510
Polarization ellipse 819
CW normalization 618
Phase convention
The sign convention used in FDTD Solutions for a forward propagating planewave is exp(-iwt+ikz), so when
introducing a phase offset, phi, to the source, you will get exp(-iwt+ikz+i*phi) for forward propagating light.
Depending on which historical convention you use, this could be called either circular right or circular left.
Note: Normalization
When using multiple sources in a simulation, extra care must be taken to ensure you understand how the the
results are normalized. In this case, with two orthogonal sources that each have an amplitude of 1, the monitor
shows that the amplitude of both Ex and Ey are 1. This implies that |E| = sqrt(2). A power transmission monitor
located in front of the sources would return 1 (not 2) because the transmission function is normalized to the sum of
the source power from all sources. In this particular simulation, the standard normalizations give very sensible
results with the two sources. However, in many simulations with multiple sources, the default normalization may
not be appropriate. It may be necessary to disable the default normalization. This is particularly important if the
sources start to have different frequencies, time offsets, etc, or if the sources can interfere with each other in any
way.
Figure 1 Figure 2
Figure 3 Figure 4
Figures 1 and 2 compare the phase of the fields along the propagation direction measured in the simulation with the
expected phase. From Figure 3 we can see that there is a constant 90 degree phase difference between the x and y
components of the electric field, and Figure 4 verifies that the amplitudes of the field components are 1 after cw
normalization.
We can also take advantage of the vector plot feature to visualize the circular nature of the wave's polarization. Click
to visualize the E field results of the Z monitor. Choose the vector plot option. you can edit the settings for more or
fewer arrows in the plot using the downsampling option.The figure below was generated using a much finer mesh for
more data points:
Open usr_polarization2.fsp and run the script file usr_polarization2.lsf. This script will run two
simulations (each with a single source) and save the data in temporary fsp files called
usr_polarization2_0.fsp and usr_polarization2_90.fsp. After running the script file once, set the
variable rerun_simulations to 0 and adjust the complex weighting factors weight_0 and weight_90 in
usr_polarization2.lsf. This demonstrates how the response to an arbitrary source polarization can be
created without having to rerun the simulations.
In the figures below, we show the results for elliptical polarization created by setting weight_0 to 1 and
weight_90 to exp( 1i * 45 * pi /180), i.e. a 45 degree phase difference.
Note: BFAST is a special source technique 590 . Users should run two separate simulations using two orthogonal
polarizations and 90 phase difference to get correct circularly polarized result, and should not add two plane wave
sources with orthogonal polarization and 90 phase difference in the same simulation file !
Objective
The example file on this page provide an example dark field beam source.
Solvers 101
FDTD
VarFDTD
Associated files
usr_beam_dark_field_source.fsp
See also
Sources 510
Sources - Planewave and Beam 521
This type of illumination is created using two beam sources with different Numerical Aperture settings. The phase of
the two sources are reversed, meaning the source with the smaller NA will cancel the middle portion of the source
with the larger NA, creating a source with a far field radiation pattern as shown above.
Note: It is necessary to run a couple of reference simulations to determine the correct relative amplitudes of the
two sources. See the description in the setup script of the source object for more details.
For more information about dark field illumination, please contact support@lumerical.com.
Objective
The purpose of this section is to describe the motivation and settings related to the use of multifrequency beam
calculation that can benefit broadband simulations involving Gaussian and Cauchy/Lorentzian beam source.
Solvers 101
FDTD
Associated files
Broadband_gaussian_source_injection_angle
_comparison.fsp
Broadband_gaussian_source_injection_angle
_comparison.lsf
See also
Broadband injection angles 536
Typically, FDTD sources, including the default settings of Gaussian beam source, are specified as a time domain
field on a 2D plane as a function of time:
(x,y,z0 ,t) = E (x,y,z0 , 0 )M(t)
where
E (x,y,z0 , 0 ) defines the field profile
M (t ) is the modulation signal
w
This approach introduces the desired field profile only at the center frequency 0 . Additionally, when such source is
injected under an angle theta, the injection angle becomes strongly frequency dependent. While this approach
provides excellent performance for single wavelength and narrow band simulations with normal incidence angle, it
has obvious drawbacks when it comes to broad band simulations. For this reason the beam source in FDTD offers
the possibility to enable the "multifrequency beam calculation" that is available on the "Beam options" tab of the
source settings:
Enabling the "multifrequency beam calculation" will employ Inverse Fourier Transform(IFT) to construct frequency
dependent field profile:
(x,y,z0 ,t) = F -1 E (x,y,z0 , )M( w)
By default, the number of frequency and IFT points is set to 15 and 125 points respectively. These values are
selected as a good tradeoff between accuracy and the performance requirements that should satisfy most
simulations using the default frequency bandwidth. While using only one frequency point will provide the same
results as the standard beam source and additional points will improve the accuracy, we recommend to use at least
7 frequency points. The number of IFT points can have more severe impact on the simulation results if the number is
too low for given bandwidth. Generally, the number of IFT points must allow for accurate reconstruction of the time
signal. The maximum number of IFT points is 251 and it cannot be set to even numbers. Note that increasing the
number of points will increase the required calculation time and resources.
The IFT calculation itself is conducted at the beginning of each simulation and it can be expected to take up to
several minutes for 3D simulation on an average machine. This is fairly negligible in case of a single simulation, but it
can become a considerable factor in case of running multiple short simulations such as in case of a parameter
sweep. For this reason, it is recommended to use this feature only when it benefits the simulation. This can typically
involve:
o Broadband simulation using thin lens or scalar approximation with non-zero distance from waist
o Broadband simulation with angled injection
The following example is using a 2D field monitor to demonstrate the propagation of a Gaussian beam injected under
an angle and interacting with a dielectric/air interface. The plots below show how the multifrequency calculation can
benefit the reflection/transmission simulations since the R/T characteristics are highly dependent on the angle of
incidence. See the associated files for more details about the simulation setup and the possibility to run the
simulation on your computer. This example also demonstrates that the multifrequency calculation has negligible
simulation time penalty in 2D mode despite the fact that the number of IFT points is set to 125.
This figure show s broadband Gaussian beam w ith injection angle of 35 degrees w ith the m ultifrequency calculation
disabled. It dem onstrates the injection angle variation w ith frequency and it's im pact on the reflection and transm ission
on the dielectric/air interface.
Identical sim ulation setup as in the previous figure, but w ith the m ultifrequncy calculation enabled. This results in
constant injection angle across the bandw idth and consequently in m ore physical R/T characteristics.
Solvers 101
FDTD
VarFDTD
In this section
TFSF - Correct usage 550
TFSF - Examples 552
TFSF - Power normalization 555
TFSF - Cross sections and normalization 562
See also
Sources - Others and advanced techniques
587
The TFSF source is often used to study scattering from small particles, such as the Mie scattering 1752 example. It is
also useful when plane wave illumination of non-periodic devices is required, such as a defect on a planar surface
(see the Defect scattering and detection 1737 example). The TFSF source can be used for:
The TFSF source allows you to separate the computation region into two distinct regions:
Total Field region - includes the sum of the incident field wave plus the scattered field, and the
Both regions are visible in the above figure. We should note that the physical field is the total field and the separation
into an incident and a scattered field requires careful interpretation. For particles in a homogeneous medium, the
incident field is a plane wave. For particles on a substrate or multi-layer stack, the incident field is the field that
would exist in the multi-layer in the absence of a particle (or defect).
The TFSF source is an advanced source and care must be taken to ensure proper setup and analysis of results.
Please see the following pages for more information.
Examples 552
Usage in periodic
boundaries 561
Geometry tab
The geometry tab contains options to change the size and location of the sources.
Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.
At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.
If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, very short pulses contain many frequency components and therefore disperse quickly.
As a result, short pulses require more points per wavelength for accurate simulation.
Pulse offset: This parameter defines the temporal separation between the start of the simulation and
the center of the input pulse. To ensure that the input pulse is not truncated, the pulse offset should be at
least 2 times the pulse duration. This will ensure that the frequency distribution around the center frequency
of the source is close to symmetrical, and the initial fields are close to zero at the beginning of the
simulation.
Source type: In general, you can choose between standard and broadband source types. Standard
sources consist of a Gaussian pulse at a fixed optical carrier, while the broadband sources consist of a
Gaussian pulse with an optical carrier which varies across the pulse envelope. Broadband sources can be
used to perform simulations in which wideband frequency data is required for instance, from 200 to 1000
THz. This type of frequency range cannot be accurately simulated using the standard source type.
Advanced
ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative (smooth transitions from/to
zero) at the start and end of a user defined source time signal. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.
script code shows how to calculate the source time signal used by the source.
# calculate standard pulse time signal
frequency = 300e12;
pulselength = 50e-15;
offset = 150e-15;
t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );
Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.
Results returned
Results
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
Source movies 628
TFSF sources 546
TFSF - Correct usage 550
The slightly confusing aspect is that the source will then 'subtract' the same plane wave when it arrives at one of the
boundaries of the source. This is much easier to understand with an example. The following screenshots show the
behavior of the TFSF source in free space. Notice that the fields are injected at one edge, and are then 'subtracted'
at the other edge. Also notice that the fields are zero in the 'Scattered field' region, since there are no scattering
objects inside the source. For additional examples, see the Examples 552 page. The subtraction happens at the
boundaries of the source and a reference 1D line at the top right corner of the TFSF boundary is used to determine
the index profile of all the boundaries. For this reason it is important to make sure the Reference corner (yellow line
in the above figure), always goes through the substrate and NOT the feature for which we want to calculate
scattering. For more information on the correct usage of the source in periodic boundaries, please refer to the page
TFSF source in Periodic Boundaries 561 .
1. The 'scattering' object must be completely outside the TFSF source. The boundaries of the source cannot extend
through the scattering object.
2. The injection axis of the source must be normal to the substrate. In other words, all sides of the TFSF source
must 'see' the same refractive index profile along the direction of propagation. The following figures show one
example of a valid setup and one example of invalid setup.
Power normalization
Power normalizations with the TFSF can be non-intuitive. For example, you may find that power transmission
measurements depend on the size of the the source. It is also possible to find situations where power
measurements are greater than 100%. While this may be non-intuitive, it is simply a normalization issue and does
not indicate a simulation error. In these situations, it is usually more physically meaningful to normalize to the
source intensity, rather than the power injected by the source. See the sourceintensity 1603 script function or contact
Lumerical support for more information.
Non-uniform mesh
The TFSF supports the use of non-uniform mesh within the source. However, for best results, the mesh should be
uniform in the directions normal to the direction of propagation. For example, if the source is injecting along the Z
axis, the x,y mesh should be uniform within the TFSF source. This detail is particularly important
when the source angle is non-zero. See Particle on a surface at non-normal incidence 554 .
The magnitude of the electric field The magnitude of the electric field
The simulation setup with a TFSF with the particle enabled on a log
with the particle disabled on a log
source at a non-normal angle of scale. We now have confidence that
scale. Note that the field in the
incidence. the scattered field (on the order of
scattered field region is on the order
of 1e-7, while the field in the total 1e-3 to 1e-1) is correct and well
field region is on the order of 1. above the noise floor.
5.4.3.6.3.2 Examples
The following examples demonstrate how the TFSF can be used:
boundaries.
Absorbing materials
The TFSF source supports dispersive (absorbing) materials.
This issue is best illustrated with an example. The following screenshots shows a Mie scattering simulation, where a
small gold sphere is illuminated by a planewave using the TFSF source. The goal of the simulation is to measure the
amount of power absorbed by the particle when it is illuminated by a plane wave.
Solvers 101
FDTD
VarFDTD
Associated files
usr_TFSF_mie_absorbed_power_scri
pt.lsf
See also
Sources 510
Source movies 628
TFSF sources 546
TFSF - Correct usage 550
transmission 1596
sourcepower 1601
sourceintensity 1603
After running the 3D Mie scattering 1752 simulation, it is possible to calculate and normalize the amount of power
absorbed by the particle in several slightly different ways. The script
usr_TFSF_mie_absorbed_power_script.lsf will reproduce the following figures when applied to the 3D Mie
scattering simulation file.
Power in Watts
One option is to
calculate the
absorption in units of
Watts. In this
particular simulation,
we can see that the
particle absorbs
about 2.7e-17 W of
power at 530nm (for a
planewave with an
amplitude of 1V/m).
Power
normalized to
the source
power
This type of
normalization is quite
common. For
example, the
'transmission' script
function
automatically
normalizes the power
transmission data to
the source power.
While this
normalization is often
very convenient, it is
not well suited to
simulations using the
TFSF source. The
fundamental problem
is that an ideal plane
wave has infinite
power (since it has
infinite extent), while
a single particle must
absorb a finite
amount of power.
Obviously it is not
meaningful to
normalize a finite
quantity by an infinite
one!
To understand why
the absorption is
larger than 1 in this
simulation, we can
plot the Poynting
vector near the nano-
particle when it is
illuminated by a
plane wave (see
figure). The Poynting
vector shows the
direction of power
flow near the particle.
The nanoparticle
outline and TFSF
source are also
shown. Notice how
the nanoparticle
affects the poynting
vector, causing it to
bend in toward the
particle. Power is
flowing towards the
To reiterate, the
simulation results will
be correct when the
TFSF source is setup
as shown in the
screenshot. It is
capable of correctly
simulating the
system, even when
power is flowing in
through the sides of
the source. The only
issue is that the
source power
normalization only
accounts for the
power injected from
the primary injection
plane, not the sides.
Normalized to
source intensity
(cross section
units)
As explained above,
normalizing power
measurements to the
source power is not
recommended.
Instead, it is more
meaningful to
normalize power
measurements to the
source intensity
(Watts / m^2). This
returns the data a
cross section, in
units of Area.
To apply this
normalization, simply
divide the absorbed
power (Watts) by the
source intensity
(Watts/m^2) to get
the absorption cross
section in units of
m^2.
It is interesting to
notice that at 530nm,
the absorption cross
section is larger than
the geometrical area
of the TFSF source,
which is why the
'source power
normalization'
produced values
larger than 1. The
absorption cross
section is also much
larger than the
geometrical cross
section of the
nanoparticle.
Please note that the plane wave source is generally the best source for periodic simulations. The TFSF source
should only be used in situations where scattering in the specular (zeroeth order) direction is of interest.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
Source movies 628
TFSF sources 546
TFSF - Correct usage 550
The figures below show how a same structure can have different simulation outcomes, when simulated using
different sources, TFSF source and plane wave source. TFSF source is used for the top cases, where the plane
wave source is used for the bottom cases. The structure simulated is the same, periodic, and the FDTD simulation
object employs the periodic boundary conditions, except along the axis of injection. Note that the sources extend
through the FDTD simulation regions to avoid diffraction along edges, as can also be seen in the the pages TFSF -
Examples 552 and Plane waves - edge effects 526 .
TFSF source is used in both cases. The two examples differ in the
region of the structure that the TFSF source region and the FDTD
simulation object are over. In the top image, the reference corner is
going through the substrate, where in the second image, the reference
corner goes through the feature (assuming that the protruding part of
the structure is the feature).
Plane wave source is used in both cases. Both simulation will return
exactly the same data.
The cross section, s, is defined such the scattered (or absorbed) power in Watts, P, is given by
P = sI
where, I is the source intensity in Watts/m2 and the cross section has units of m2. In two dimensional simulations,
which represent a structure which is infinite along the z axis, we generalize P to represent the power scattered per
unit length, and the cross section has units of m.
Angles of incidence
We have to be extremely careful about the definition of the source intensity when the source is at non normal
incidence. The source intensity as returned by the script command 'sourceintensity' is calculated by integrating the
power normal to the injection plane of the source. If instead, you want to normalize to the source intensity of the
beam as calculated in the plane normal to the direction of propagation of the beam you need an additional factor of
cos(q) where q is the nominal source angle as specified in the source properties. (Please note that this angle q
should not be frequency dependent.) For example, if you download the Mie scattering example in 3D and modify the
source angle to have theta of 30 degrees, you should see something like this in the yz view:
After running the simulation, we can run the usual analysis and we expect to see good agreement with the
theoretical results since the scattering and absorption cross sections should not depend on angle of incidence for a
sphere. Instead we will see this comparison:
The discrepancy is mainly due to the fact that our calculation defines the source intensity, I(q) with respect to the y-
normal injection plane of the source even though the source angle q is 30 degrees. The theory calculates sigma
using I0, which is independent of the angle of the source. Since we know that I(q) = I0*cos(q), we can easily modify
our script by adding the lines:
theta = 30 * pi/180; # the nominal source angle is 30 degrees
Qscat = Qscat * cos(theta);
Qabs = Qabs * cos(theta);
immediately after calculating the cross section. (Please note that q is the nominal source angle and does not have
to be corrected for wavelength.) We then see the results below, which are as accurate as the normal incidence
results on this 5nm mesh, and converge nicely as the mesh size becomes smaller.
Periodic structures
In periodic structures, simulated with periodic or Bloch boundary conditions, the source power is integrated over one
unit cell. This makes it possible to discuss quantities such as reflected power and transmitted power as fractions of
the source power, as we do with finite sized beams. However, we should remember that this can be easily converted
into a cross section. For example, a periodic structure with a reflection of 25% simply means that the reflection
cross section is 25% of the unit cell area.
Note: Since BFAST assumes periodic structure, users should not use BFAST source 590 at an angle to replace
TFSF to get oblique incidence result.
Objective
This topic explains how to create a customized focused beam TFSF source for analysis of nano particle scattering.
The TFSF method uses plane wave, and has a built-in reference, which makes the simulation very effective. In some
cases, users may want to test some other forms of beam sources in order to explore possibly new properties. In this
example, we use the fundamental idea of TFSF, that is, the differential method.
Solvers 101
FDTD
VarFDTD
Associated files
usr_source_CTFSF_NA.fsp
usr_source_CTFSF_NA.lsf
See also
Sources 510
TFSF 546
Custom time signal 613
Custom spectrum 615
Changing the source bandwidth 610
setsourcesignal 1580
Mie scattering 3D 1752
The basic idea of the differential method is to first run a simulation without the scatter and record the fields as the
reference, then run another simulation with the scatter. The difference of the fields in the two simulations is the
scattering field, and at the same time, any diffraction errors caused by the possible PML cut of the complete beam
profile is minimized, if not canceled completely.
In calculation of the scattering cross section and absorption cross section, the source intensity is usually used,
please refer the nanowire example 1730 . The function sourceintensity 1603 gives correct result for a plane wave.
However, for a NA beam, the source profile is not uniform and this function does not give the correct result. To get
correct result, we use the intensity on the front monitor (in this example it is y1) as the source intensity illuminating
the particle.
Once the scattering and absorption fields are obtained after running the simulations, we use the integration of the
Poyinting vector to get the power, then use the definition of the cross sections to obtain the scattering and
absorption cross sections. The graph below shows the results (left) and comparison(right) to the plane wave TFSF.
The noticeable minor difference is mainly due to the small simulation region we used. If you use a larger simulation
region, such as 4*1.5*4 um, the results agree well with the plane wave TFSF.
It is not surprising that the two results are about the same. This is because the particle is small and the illumination
from the NA source on the particle is quite uniform. If the illumination is not uniform across the particle, the results
can be different.
The Script
In the first part of the script usr_source_CTFSF_NA.lsf, choosing doTFSF=1 is to get the regular plane wave
TFSF results, which are used to validate the custom TFSF in this example. You can choose doTFSF=0 to avoid it.
Next, the reference simulation without the sphere is run, where the illumination profile at the focus and the fields in
the monitors are recorded where the averaged intensity in y1 monitor is calculated as the source intensity to be
used later. Then the simulation with the scatter "sphere" is run. Note that to save simulation time, some objects are
enabled or disabled. Finally the scattering fields are obtained with the differential methods, the powers are calculated
though the integration of the Poynting vectors, and the cross sections are obtained by the use of the averaged
intensity of the illumination beam. Running the script you can duplicate the figure above.
Tips:
1: keep the the same mesh for the two simulations: Usually TFSF gives better results using a uniform mesh in
TFSF region. An override mesh can be used for this purpose to have a uniform mesh. Since the differential fields
need to be in the same grid, this override mesh should be kept even when there is no particle in the reference
simulation.
2: far field projection: Some times users want to get the far field properties using the custom TFSF method. If this
is the case, users must add a proper analysis group such as the "scat_ff" in Mie scattering 3D 1752 . At the same
time, the script inside the analysis group should be modified in order to output the fields instead of the intensity.
Then in the script file usr_source_CTFSF_NA.lsf users can add scripts to get the far field projection in
the reference simulation and the scatter simulation. Their difference is the scattered far fields and can be easily
plotted as intensity.
3: refer Mie scattering 3D 1752 page to get more tips on scattering simulations.
Mode sources
The mode source is used to inject a guided mode into the simulation region. The geometry of the mode source (i.e.
center location, and span) is used to compute the guided modes for the structure. In three-dimensional simulations,
the modes are computed across a plane, while in two-dimensions they are computed across a line. From a list of
possible modes, a single mode is selected for injection into the simulation region.
Solvers 101
FDTD
VarFDTD
In this section
Mode analysis 570
Plot and Analysis Options 573
Finding Modes 574
Mode source - Broadband 576
Mode source - Angled injection 578
Associated files
usr_source_mode.fsp
See also
Sources - Others and advanced
techniques 587
Source movies 628
Passive components - Getting
started 2020
Using the boundary conditions tab
459
This section describes the operation of the integrated mode solver to inject guided waves into FDTD simulations or
the Propagator in MODE Solutions. The mode solver itself uses the same discretization mesh as the FDTD/
propagator algorithm, so the profile of the guided modes as computed with the mode solver naturally interface with
the underlying FDTD/propagator mesh. Overall, this facilitates the injection of guided modes with minimal back-
reflection.
By default, this source will inject the fundamental mode (the mode with the largest effective index). You can control
the polarization of the automatically selected mode by setting the MODE SELECTION field to fundamental TE or
TM. With these settings, the mode source will automatically update the mode profile as the structure is modified.
This can be very helpful for tasks such as parameter sweeps where the waveguide geometry is changed.
Alternatively, it is possible to select an arbitrary mode by setting MODE SELECTION to "user defined". In this case,
the integrated mode solver is launched by pressing the SELECT MODE button within the mode source edit window.
The following pages describe the integrated mode solver. If you choose to select your own mode source please note
that the mode profile will not automatically update as the waveguide geometry is modified. It is necessary to
manually reselect the mode or use the script command updatesourcemode.
In MODE Solutions, note that the fundamental mode will be automatically selected for a 2.5D FDTD simulation. In
this case, the SELECT MODE button will grayed out unless "user select" is chosen from the "mode selection" list.
In addition, note that the polarization of the mode source is determined by the polarization chosen in the Effective
index tab 425 of the Propagator simulation region.
You must choose a mode with a polarization that matches the polarization you have chosen in the Effective index
tab 425 of the Propagator simulation region.
Broadband simulations
The beam sources (Gaussian, Mode, Import) can be used in broadband simulations, but it is important to
remember that they inject the same spatial field profile at all frequencies. This can lead to injection errors when
the source field profile is dispersive (i.e. it changes as a function of frequency).
For example, the Mode source calculates the spatial mode profile at the center frequency of the specified
frequency range, then injects that mode profile at all frequencies. This generally means the injection errors are
very low at the center frequency, but they can be larger at the min and max frequencies because the mode profile
being injected is not exactly correct at other wavelengths. The Gaussian and Import sources suffer from the
same problem. For more information, see Mode source - Broadband 576
Geometry tab
The geometry tab contains options to change the size and location of the sources.
Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.
At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.
If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, very short pulses contain many frequency components and therefore disperse quickly.
As a result, short pulses require more points per wavelength for accurate simulation.
Pulse offset: This parameter defines the temporal separation between the start of the simulation and
the center of the input pulse. To ensure that the input pulse is not truncated, the pulse offset should be at
least 2 times the pulse duration. This will ensure that the frequency distribution around the center frequency
of the source is close to symmetrical, and the initial fields are close to zero at the beginning of the
simulation.
Source type: In general, you can choose between standard and broadband source types. Standard
sources consist of a Gaussian pulse at a fixed optical carrier, while the broadband sources consist of a
Gaussian pulse with an optical carrier which varies across the pulse envelope. Broadband sources can be
used to perform simulations in which wideband frequency data is required for instance, from 200 to 1000
THz. This type of frequency range cannot be accurately simulated using the standard source type.
Advanced
ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative (smooth transitions from/to
zero) at the start and end of a user defined source time signal. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.
t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );
Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.
Results returned
Results
NEFF: Effective index as a function of frequency/wavelength is returned.
MODE PROFILES: Mode profiles (E, H, and index) are returned as a function of position and frequency/
wavelength.
TIME SIGNAL: Time domain signal of the source pulse.
SPECTRUM: The fourier transform of time signal.
PML 460
Perfectly matched layer (PML)1 boundaries absorb electromagnetic waves incident upon them. They
essentially model open (or reflectionless) boundaries. In FDTD and varFDTD simulation regions, the user can
directly specify all the parameters that control their absorption properties including the number of layers. To
facilitate the selection of PML parameters, a number of profiles (or predefined sets of parameters) are available
under the boundary conditions tab. In most simulation scenarios, the user only needs to choose one of the
predefined profiles and fine tune the number of layers. PML boundaries perform best when the surrounding
structures extend completely through the boundary condition region. This will be the default behavior of
structures whether or not they were drawn to end inside or outside the PML region.
1 J. P. Berenger, Perfectly Matched Layer (PML) for Computational
Electromagnetics. Morgan & Claypool Publishers, 2007.
Metal 464
Metal boundary conditions are used to specify boundaries that behave as a Perfect Electric Conductor (PCE).
The component of the electric field parallel to a metal (PCE) boundary is zero; the component of the magnetic
field H perpendicular to a metal (PEC) boundary is also zero. Metal boundaries are perfectly reflecting,
allowing no energy to escape the simulation volume along that boundary. In the FDE solver, metal BC is the
default setting 464 .
PMC
Perfect Magnetic Conductor (PMC) boundary conditions are the magnetic equivalent of the metal (PCE)
boundaries. The component of the magnetic field H parallel to a PMC boundary is zero; the component of the
electric field perpendicular to a PMC boundary is also zero.
Periodic 478
Periodic BC should be used when both the structures and EM fields are periodic. Periodic boundary conditions
can be used in one or more directions (i.e. only in the x direction) to simulate a structure which is periodic in
one direction but not necessarily other directions.
Bloch BC should be used when the structures and the EM fields are periodic, but a phase shift exists between
each period. Bloch boundary conditions are used in FDTD Solutions and propagator simulations predominantly
for the following two simulations:
Launching a plane wave at an angle to a periodic structure in this situation, accurate reflection and
transmission data can be measured at a single frequency point for a given simulation.
Calculating the bandstructure of a periodic object in this situation, a broadband pulse is injected via a
dipole source into a periodic structure.
note: if you choose BFAST plane wave source 590 , the Bloch BCs will be automatically overridden and use its
built_in boundary conditions.
Symmetric/anti-symmetric boundary conditions are used when the user is interested in a problem that exhibits
one or more planes of symmetry; both the structure and source must be symmetric. Symmetric boundaries
are mirrors for the electric field, and anti-mirrors for the magnetic field. On the other hand, antisymmetric
boundaries are anti-mirrors for the electric field, and mirrors for the magnetic field. Careful consideration must
be given to whether symmetric or anti-symmetric boundary conditions are required, given the vector symmetry
of the desired solution. For meaningful results, the sources used must have the same symmetry as the
boundary conditions. Further information about symmetric and anti-symmetric boundary conditions can be
found in Choosing between symmetric and anti-symmetric BCs 466 .
ALLOW SYMMETRY ON ALL BOUNDARIES: Allows symmetric boundary conditions with periodic structures
(this option is not available in the boundary condition tab of mode sources and mode expansion monitors).
Select Mode
Pressing this button (located on the lower right corner of the window) will initialize the mode source with the current
mode selected within the mode table in the upper left-hand portion of the window.
Advanced Options
The ADVANCED OPTIONS button (located on the left right corner of the window) brings up the "Mode Advanced
Options" window with the following parameters:
CONVERGENCE TOLERANCE: the convergence tolerance used for the calculations. The default value
corresponds to 1e-12 but can be increased by the user to speed convergence or decreased to improve accuracy.
MAXIMUM NUMBER OF MODES TO STORE: When searching for modes in a range of effective indices from n1 to
n2, it is possible to fill your available memory if too many modes are found. For this reason, the maximum number
of modes is limited and the calculation will stop when this number of modes is exceeded.
USE SINGLE PRECISION: this can be used to save some memory during the calculation of the modes but the
results are less accurate.
In the Boundary conditions tab you can override these default settings to select PML or PMC boundary
conditions.
Figure window
The plot itself where the data appears is automatically labeled and scaled to fit the simulation data. As with the
layout editor, the plot can be zoomed using the standard mouse actions. Note, however, that the mouse is
automatically in the zoom state when over the plotted data and therefore the keyboard shortcut Z is not necessary.
Objective
When using the eigensolver in MODE Solutions or the mode source in FDTD Solutions, there are many eigensolver
settings that can affect the modes found. For some types of structures, finding the correct modes can be
challenging. This page provides a checklist of common settings that should be checked or modified when you have
trouble finding the right modes or you get the message "no physical modes were found".
chosen, the right modes may not be found. The size of the
simulation region is also important. When using metal
boundaries, the boundaries should be far enough from the
structure interfaces so that the evanescent tails of the
modes do not reach the boundaries and get reflected.
If you still have trouble finding the right modes for your waveguide/fiber, please contact support@lumerical.com.
Objective
This topic describes how the Mode source operates in broadband time-domain simulations, and the injection errors
that can occur due to mode mismatch.
Solvers 101
FDTD
VarFDTD
Associated files
usr_mode_broadband.fsp
usr_mode_broadband.lsf
See also
Sources 510
Measuring reflection 860
Get field profile and effective index 617
Mode source - angled injection 578 (FDTD
only)
Introduction
The mode solver of the Mode source uses a frequency domain technique to calculate the modes of a structure. This
technique is inherently single frequency. For broadband simulations, the mode solver calculates the modes at the
center frequency of the source. For example, if the source range is 300-600 THz, the mode solver will calculate the
modes at 450 THz.
If the mode profile is relatively constant as a function of frequency, this works well. However, if the mode profile
changes over the range of the source, there will be some reflection and scattering at the source injection plane. This
can be understood in terms of the mode profile mismatch between the mode that actually exists at that frequency
and the mode profile of the center frequency that is being injected. These errors will be largest at the minimum and
maximum frequencies of your source where the mode mismatch is largest.
Example
The mode injection errors are easy to see with a simple simulation. To reproduce the following results, open the
associated simulation file and then run the script file. The simulation consists of a simple straight waveguide. Ideally
we expect 100% transmission and 0% reflection at all frequencies.
The script calculates and plots the actual mode profile of the waveguide at 300, 450 and 600 THz. It then runs a
broadband simulation (300-600THz) and measures the reflection and transmission. The 450 THz mode profile will be
used in the simulation. The error in R and T will be plotted. These steps are repeated for waveguides that are 0.4um
and 4um wide.
In the 4um wide simulation, the mode profile is fairly constant over the entire range of frequencies. Therefore, we
expect the the mode mismatch to be small and the R, T values should be quite close to their theoretical values. For
the 0.4 um waveguide, the mode profile changes significantly as a function of frequency. This leads to significant
mode mismatch, and therefore larger errors in the R and T measurements.
Mode profile as a function of frequency for 4um Error in reflection and transmission spectrum for
wide waveguide 4um wide waveguide
When the waveguide is much wider than the wavelength, The maximum error in about 0.03% in transmission. The
the mode profile is relatively constant at all frequencies. error in the reflection is very small.
Mode profile as a function of frequency for 0.4um Error in reflection and transmission spectrum for
wide waveguide 0.4um wide waveguide
When the waveguide is sub-wavelength, the mode profile The maximum error in transmission is about 5%. The
changes significantly as a function of frequency. maximum error in reflection is about 0.3%.
As the above figures show, when using the Mode source in broadband simulations, there can be injection errors due
to mode mismatch. These errors will be largest at the minimum and maximum frequencies where the mode
mismatch is largest.
Solutions
A number of solutions are available:
In many cases, the problems described above make it difficult to accurately measure power reflections. In such
cases, measuring the reflection with a monitor in front of the source (rather than behind the source), can be a good
solution. For more information, on this technique, see the Measuring reflections 860 page.
Using a smaller source bandwidth will minimize these problems. Unfortunately, if you need to collect broadband
data, this means you will have to run multiple simulations, which will increase the overall simulation time.
Due to mode mis-match errors, the source power normalization can be inaccurate. It may be possible to re-
normalize your other power measurements to an 'Input' monitor located in front of the source. For example, to
calculate the fraction of transmitted power at the output, you normally use the command
transmission("output");. Instead, you could re-normalize to the power measured by the Input monitor with
the command transmission("output")/transmission("Input");.
Objective
This topic explains how the Mode source works when injecting into waveguides at non-normal incidence.
Solvers 101
FDTD
VarFDTD
Associated files
usr_mode_angled_incidence.fsp
See also
Sources 510
Mode source - Broadband 576
Get field profile and effective index 617
The Mode source can be configured to inject at an angle, just like the plane wave and gaussian beam sources. The
additional complication with the Mode source is that there are two planes of interest:
1) Before the main FDTD simulation is run, the mode source must use it's built-in mode eigensolver to calculate the
supported modes of the waveguide. This calculation requires a cross section of the waveguide normal to the
waveguide propagation direction. This plane is drawn in the CAD with a white outline.
2) During the actual FDTD simulation, the source must inject along one of the global simulation axes (x,y, or z). This
plane is shown in the CAD as a shaded plane with a while outline.
Import source
The import source allows the user to specify a custom spatial field profile for the source injection plane. The custom
field profile can be calculated from an analytic formula, imported from another FDTD simulation, or from other
simulation tools.
Solvers 101
FDTD
EME
See also
Custom source profile from monitor data 583
Custom source profile from an equation 586
Get source field profile 617
Importing arbitrary source fields into an EME
solver port 437
importdataset 1590
Measuring reflection 860
Notes:
- Non-uniform spatial sampling is supported.
- E fields are required.
- H fields are optional
- E and H fields can be complex valued.
- EM dataset must only contain field data at one frequency point.
In some situations, it is useful to include H in the source dataset, but to set the value to the fields to zero. This
can be interpreted as a situation where the same beam is propagating in both the forward and the backward
direction at the same time, oriented such that the E fields interfere constructively at the source plane and the H
fields interfere destructively. This technique is a useful way to avoid manually calculating the H fields. Instead,
the H fields are naturally calculated as the fields propagate through the simulation volume. While this technique
can be helpful, it is important to take some additional care when analyzing results from this type of simulation.
There are two main issues:
- Fields will be injected in both the forwards and the backwards direction. This is usually not a serious problem.
If the simulation is setup properly, with no structure behind the source, these fields will simply be absorbed by the
PML boundaries behind the source without creating any errors in the rest of the simulation.
- The automatic calculation of the amount of power injected by the source (ie. sourcepower script function) will not
be correct. Therefore, power transmission data ('T' in the result view, and results from the 'transmission' script
function) which is normalized to the sourcepower, will be incorrect. A work around is to manually calculate the
sourcepower and power transmission data.
Broadband simulations
The Mode and Import sources can be used in broadband simulations, but it is important to remember that they
inject the same spatial field profile at all frequencies. This can lead to injection errors when the source field profile
is dispersive (i.e. it changes as a function of frequency).
For example, the Mode source calculates the spatial mode profile at the center frequency of the specified
frequency range, then injects that mode profile at all frequencies. This generally means the injection errors are
very low at the center frequency, but they can be larger at the min and max frequencies because the mode profile
being injected is not exactly correct at other wavelengths. Import source suffers from the same problem. For
more information, see Mode source - Broadband 576
2D simulations
To use the import source in a 2D simulation, the imported field data should be 1D. In other words, two of the three
dimensions in the dataset (x, y, z) should have a size of one.
Geometry tab
The geometry tab contains options to change the size and location of the sources. The source span will be
automatically set based on the imported field data.
Frequency/Wavelength tab
The Frequency/
Wavelength tab is
shown to the right.
This tab can be
accessed through
the individual
source properties,
or the global
source properties.
Note that the plots
on the right-hand
side of the window
update as the
parameters are
updated, so that
you can easily
observe the
wavelength (top
figure), frequency
(middle figure) and
temporal (bottom
figure) content of
the source
settings.
At the top-left of
the tab, it is
possible to chose
to either SET
FREQUENCY /
WAVELENGTH or
SET TIME-
DOMAIN. In most
simulations, the
'SET
FREQUENCY /
WAVELENGTH '
option is
recommended.
If you choose to directly modify the time domain settings, please keep the following points in mind:
Pulse durations: Choose a pulse duration that can accurately span your frequency or wavelength range
of interest. However, very short pulses contain many frequency components and therefore disperse quickly.
As a result, short pulses require more points per wavelength for accurate simulation.
Pulse offset: This parameter defines the temporal separation between the start of the simulation and
the center of the input pulse. To ensure that the input pulse is not truncated, the pulse offset should be at
least 2 times the pulse duration. This will ensure that the frequency distribution around the center frequency
of the source is close to symmetrical, and the initial fields are close to zero at the beginning of the
simulation.
Source type: In general, you can choose between standard and broadband source types. Standard
sources consist of a Gaussian pulse at a fixed optical carrier, while the broadband sources consist of a
Gaussian pulse with an optical carrier which varies across the pulse envelope. Broadband sources can be
used to perform simulations in which wideband frequency data is required for instance, from 200 to 1000
THz. This type of frequency range cannot be accurately simulated using the standard source type.
frequency or the wavelength and choose to either set the center and span or the minimum and maximum
frequencies of the source.
For single frequency simulations, simply set both the min and max wavelengths to the same value.
Advanced
ELIMINATE DISCONTINUITY: Ensures the function has a continuous derivative (smooth transitions from/to
zero) at the start and end of a user defined source time signal. Enabled by default.
OPTIMIZE FOR SHORT PULSE: Use the shortest possible source pulse.
This option is enabled by default in the FDTD solver. It should only be disabled when it is necessary to
minimize the power injected by the source that is outside of the source range (eg. convergence problems
related to broadband steep angled injection).
This option is disabled by default in the varFDTD solver, as it improves the algorithms numerical stability.
t = linspace(0,600e-15, 10000);
w_center = frequency*2*pi;
delta_t = pulselength/(2*sqrt(log(2)));
pulse = sin( -w_center*(t-offset)) * exp( -(t-offset)^2/2/delta_t^2 );
Note: There are some small difference between the pulse generated by this code and the actual time signal
generated by the 'standard' source pulse setting. If you need very precise control over or knowledge of the
source time signal, you should create create your own Custom time signal 613 .
Note: The 'broadband' option is generated with a more complex function. The precise function is not provide. To
create your own arbitrary source time signals, see the Custom time signal 613 page.
Results returned
Results
MODE PROFILES: The fields injected at the injection plane is returned as a function of position and
frequency/wavelength.
TIME SIGNAL: Time domain signal of the source pulse.
See also
Custom source profile from monitor data 583
Custom source profile from an equation 586
Mode source - Broadband 576
Objective
This section describes how to create a custom source field profile from monitor data obtained from another
simulation.
Solvers 101
FDTD
Associated files
usr_source_from_monitor1.fsp
usr_source_from_monitor2.fsp
usr_source_from_monitor.lsf
See also
Sources 510
Custom field profile 579
importdataset 1590
Example description
The top screenshot shows a waveguide input coupler. Suppose we want to use this system to excite a small gold
nano-particle located at the end of the coupler (lower figure).
In the top figure, we see the entire coupler (facet, coupler, and output waveguide). The taper and waveguide are
500nm high. The coupler input width is 8.5 microns. The waveguide tapers over 10 microns to a width of 500nm,
where it still supports many modes at wavelengths around 500nm. The dielectric waveguide is assumed to have an
index of 2. The operating wavelength is 500 nm.
In the bottom figure, we see a 40 nm radius gold sphere, 200nm past the end of the taper region.
To simulate the entire device, the simulation region must be about 20x20x10 wavelengths in size. This is a large
simulation. To accurately model the gold nano-particle, a very small mesh will be required (approx 5nm). Even with
a graded mesh, this will still make the simulation substantially slower.
The script usr_source_from_monitor1.lsf begins by running the simulation and plotting some initial results,
as shown below. Next, it gets the E&H fields from the transmission monitor and packages them in a format that can
be loaded into the Import source.
|E| in the taper |E| field profile exported to the .fld file
After running the second simulation, the script plots some initial results. First, the transmission and reflection in
the waveguide after injecting the created source are shown. The reflection is effectively zero at 500nm, but increases
slightly away from the wavelength where the field was recorded. This is because a physically correct waveguide
mode profile will change as a function of frequency. However, we are injecting the mode profile that is correct at
500nm to be injected over a range of frequencies. Therefore, we expect some source injection error to result in
reflection due to mode mismatch when running broadband simulations with this technique. If better accuracy is
required, then a series of single frequency simulations will be required. The transmission is less than 1 because we
are only measuring transmission in the waveguide region and are ignoring light that is propagating away into the air
and substrate.
The second plot uses a box of 6 monitors surrounding the gold particle to calculate the absorption spectrum in the
gold. This plot shows that there are 2 absorption resonances.
Solvers 101
FDTD
Associated files
usr_custom_source.lsf
usr_custom_source.fsp
See also
Custom source profile from monitor data 583
Get source field profile 617
Importing arbitrary source fields into an EME solver port
437
importdataset 1590
The solver will attempt to inject whatever fields are specified, but it is important to recognize that specifying
unphysical fields can lead to simulation errors. For example, there may be power normalization problems,
source back reflections, or differences between the specified and actual injected fields.
Note: Symmetric boundary conditions for custom field profiles
Symmetry boundary conditions can be used whenever the EM fields have a plane of symmetry through the
middle of the simulation region. For more information see Choosing between symmetric and anti-symmetric
BCs 466
Coherence 596
CW Normalization 618
Solvers 101
FDTD
Associated files
bfast_stack.fsp
bfast_stack.lsf
See also
Symmetric and anti-symmetric
BCs 466
Grating order transmission 1790
Blaze grating 1788
Plasmonic application 1902
Related publications
B. Liang et al, Wideband Analysis
of Periodic Structures at Oblique
Incidence by Material Independent
FDTD Algorithm, IEEE Trans.
Antennas & Propagation, Vol.62
,No.1, PP. 354 - 360.
When a broadband plane wave is injected into a structure at an angle, special treatment will be required. One
way is to use Bloch boundary condition 471 . However, the actual injection angles for broadband illumination
change with frequency, discussed in broadband injection at angles 536 . One way to solve this problem, the
wavelength or frequency can be swept, or a number of incident angles are simulated and interpolation is
required (refer this page 475 , for advanced user only). Oftentimes, sweeping can take much more simulation
time.
Another method to avoid the sweeping is to reformulate the FDTD algorithm. A simplified description of this
method can be briefly described here:
To remove the angular dependence from the field, a set of new variables is used, such as:
r
Q(r ) = e - ikx x E (r )
and then the split field method (eg., split x component to xy and xz) is used to reformulate the FDTD update
equations. Therefore, by reformulating the FDTD update equations, a new algorithm can be developed by
removing this angle dependence. More details can be found in Liang's paper. Therefore, no Bloch BCs are
required. It will have its own built-in boundaries conditions transverse to the propagation direction.
Once the "BFAST" is selected in the source, the Boundary Conditions transverse to the wave propagation are
automatically overridden based on BFAST's formulation. For example if users choose "Bloch", "periodic",
"Metal" or "PML" in the transverse directions, a warning sign will be shown. The figure below is showing a case
when BFAST is chosen for a plane wave source injected along the z direction. In this case, the BCs in x and y
directions should be overridden by the BFAST technique, shown by a warning sign to the right. However, the
symmetry BCs 466 can be reserved. Therefore, in this case, only the BCs in x direction are overridden by
If users set symmetric or anti-symmetric BCs, BFAST will keep and use them to save memory and speed up
the simulation. For example, if the source is injected at an angle in xz plane but no angle in yz plane, yz plan
can still use symmetry BCs 466 fitting the source polarizations. In this way, users gain 2x simulation speed.
Along the direction of the wave propagation, users need to set the longitudinal BCs as "PML". For example, if
the plane-wave injection plane is parallel to z axis, the transverse direction will be xz/yz planes, and the
longitudinal direction is z. Usually zmin and z max use PML BCs.
As usual, the source injection plane should extend completely outside the simulation region, as shown in the
figure below. Fortunately, the GUI can automatically do this for the users.
In some cases, users need to modify other BFAST parameters in FDTD "Advanced options". Under this tab,
"BFAST" settings have two parameters:
BAFST ALPHA: It is the smallest dielectric refractive index in the simulation region, and should generally be
1. For example, if the background index is set to 1.33 of water in FDTD "General" tab, then 1.33 should be
used here instead of the default of 1.
DT MULTIPLIER: It is used to further reduce the time step "dt" in "Mesh settings" in addition to the "dt
factor". Its largest value is 1, meaning no change for the dt factor. When it is smaller than 1, the actual time
step dt becomes smaller, in some cases it can overcome some diverging problems impossible by modifying
other settings.
Example
Below is an example of dielectric stack with angled illumination at 60 degree (polarization angle 90) of a 2D
simulation, and comparison to theoretical result. To duplicate the results, you can download and run
best_stack.fsp.
More examples can be found in the Knowledge Base, such as grating order 1790 and blaze grating 1788 , as well
as plasmonic solar example 2663 .
Angle sweep
In some cases users need to get results of broadband incidence at different incident angles. This can be done
by use of sweep as usual to sweep the incident angle. Different from Bloch BC case 475 , in BFAST, at each
specified incident angle, all the wavelengths have the same angle, so no further interpolation is required. In this
example, the incident angle is set inside "model", so when the incident angle is set in sweep, the correct
quantity must be chosen. To get sweep result, open the bfast_stack.lsf and set sweep=1 and run the
sweep, the following images of reflection and transmission are shown below:
Limitations
BFAST FDTD is fundamentally different from the standard FDTD formulation because the core update
equations are changed, in addition to the boundary conditions. As a result, there are some limitations:
The time step, dt, must be reduced compared to standard FDTD as the angle of incidence increases in order
to preserve numerical stability (see the next section). This is controlled by the "dt multiplier". As a result,
steep angle simulations will take more time to run. For this reason, it is important to consider if BFAST is the
right method for your application. If your bandwidth is small, or your angle of incidence is small, you may get
faster results by using Bloch boundaries conditions. Certainly, if you are only looking for results at a single
wavelength, you should use Bloch boundary conditions.
Nonlinear materials are not compatible with this method. As a result, nonlinear and all flexible material plugin
materials will not function using BFAST in current version.
Injection above the critical angles for total internal reflection (TIR) is not allowed. There is no possible stable
time step dt in this case. For example, injecting light at 50 degrees in glass that is incident on a glass/air
interface is not stable. However, if you are injecting light in a lower index medium onto a higher index medium,
then it is allowed. For example, if you are injecting light from glass onto a higher index substrate, such as
silicon, then you can use BFAST - however, the value of "bfast alpha" should be set equal to the smallest
refractive index used anywhere in your simulation.
The software can automatically detect if there is total reflection for the source injection. A warning message
will be shown as below:
If you see this warning message, you can use the Bloch+plane wave method with frequency sweep.
Numerical stability
BFAST is more numerically unstable than standard FDTD. There are several sources of instability and most
problems can be solved by adjusting certain settings. If you encounter any problems that cannot be easily
solved, please contact us for assistance. Most problems and their solutions are listed here:
The PML can be unstable for long duration simulations. If it becomes unstable, we recommend increasing the
number of layers and reducing the value of pml sigma. Sometimes the "steep angle PML" may work better.
Dispersive media can become unstable much more easily. These problems can typically be fixed by reducing
the "dt multiplier" until stability is achieved.
When using dispersive media, the numerical stability is greatly increased by using a uniform mesh over the
dispersive materials in the direction transverse to the source injection axis. For example, when considering the
scattering of a gold particle on a surface, as shown below for a 2D simulation, a mesh override region that
extends at least 1*dx outside of the gold region should be used. This mesh override region should force a
uniform mesh in dx but does not have to force a uniform mesh in dy. The figure below summarizes these
settings. Note that practically, we would often also force a uniform dy mesh to achieve accurate results for this
plasmonic structure. Furthermore, it is often simple to use a uniform value of dx across the entire unit cell but
this is not necessary for numerical stability.
Tips:
1. BFAST: Always check "BFAST" in the "plane wave type" at the source if you want to simulate angled-
broadband source using BFAST; this ensures that all the wavelengths will have exactly the same
incident angle.
2. dt multiplier: The default dt multiplier of 0.5 is chosen for most cases. However, to speed up the
simulation, users can increase it up to 1 (eg., for pure dielectric without dispersion) if simulation does
not diverge.
3. dt multiplier: For strongly dispersive materials, smaller dt multiplier may be required to have stable
simulation.
4. mesh: Users may use a little higher mesh accuracy than usual (2 by default);
5. mesh: Uniform mesh is recommended in the transverse directions.
6. mesh: if strong dispersive material is involved, override region should be larger than the structure as
shown above.
7. accuracy: Better accuracy can be achieved even at larger incident angles if the materials involved in the
simulation are dielectric without dispersion.
8. accuracy: The accuracy may degrade when the indent angle is large. You may need to test the results
by use of the Bloch BCs to see if you are satisfied with the accuracy.
9. speed up: Usual symmetry BCs 466 can be used if the source has zero incident angle in that plane;
10. speed up: if the smallest refractive index (constant dielectric material, including the background) in the
simulation is not 1, set "bfast alpha" to the smallest dielectric refractive index;
11. PML: If relatively large incident angle is simulated, you may choose "steep angle" PML;
12. PML: along the axis of source injection, PML BCs are used. When higher mesh accuracy is used,
users may need more number of PML layers from default setting.
13. BCs: in the transverse plane, the BCs in the plane of angled incidence are automatically overridden for
whatever the previous BCs are set. However, in the plane of no angle, the symmetry BCs are conserved.
14. critical angle: Currently it will not support the case where the incident angle is very close to and larger
than the critical angle. This can happen when the source is located at higher index material than that in
the rest of the simulation region.
5.4.3.6.6.2 Coherence
FDTD is a fundamentally coherent simulation method. Below, we discuss three types of incoherence that are
relevant for FDTD simulations, and the difficulties in direct simulation of these effects. In many physical processes,
we have a combination of all types of incoherence.
The following sections provide three examples that show how to model various incoherent effects with FDTD
Solutions and MODE Solutions' propagator.
Solvers 101
FDTD
VarFDTD
In this topic
FDTD and coherence 596
Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607
Double Slit Experiment example 609
See also
Sources 510
Circular polarization 540
Sources - Dipoles 511
Soft sources 627
r r
E (t ) = E0 cos(wt + j (t ) )
2p
T= 10-15 s
w
t c 10-11 s
It is not practical to simulate the statistics of temporal phase incoherence because tc >> T.
Spatial incoherence
A spatially incoherent source could be, for example, an ensemble of dipole emitters spread over a given volume.
Each dipole is independent of its neighbors, and emits radiation with a random phase that varies on a time scale on
the order of tc . At any given instant, the relative phases of all the dipoles are fixed, however, on a time scale of tc the
relative phases of the dipoles change in a completely random fashion. The direct simulation of spatial incoherence
requires simulations for very long periods of time or a large amount of ensemble averaging with one FDTD simulation
per ensemble. Therefore it is not practical to simulate spatial incoherence directly in most cases.
Polarization incoherence
In a similar manner to temporal phase incoherence, the polarization of a beam or the orientation of a dipole source
depends on time. In the case of an unpolarized beam we have
r r
E (t ) = u (t ) E0 cos(wt )
where the unit vector u(t) defines the beam polarization and varies on a time scale tc >> T. In the case of a dipole
source, we have
r r
p (t ) = u (t ) p0 cos(wt )
where the unit vector u(t) defines the dipole source polarization and varies on a time scale tc >> T.
In both cases, the time scale for the variation of the polarization is much larger then the optical cycle, making it
unpractical to simulate the statistics of temporal polarization incoherence with FDTD.
In general, a more efficient approach is to calculate the statistical averaging analytically rather than performing
lengthy or numerous simulations. In general, this requires a small number of simulations and some post-processing
of the data. In the following sections, we explain how to perform this post-processing in a number of examples that
can be applied to most simulations of incoherent processes.
This page goes over the problems associated with direct simulation of temporal incoherence, the recommended
simulation method, and provides an example simulation.
Solvers 101
FDTD
VarFDTD
Associated files
usr_temporal_incoherence.fsp
usr_temporal_incoherence.lsf
See also
Sources 510
Radiated power from multiple dipoles 519
In either case, the coherence length of the system is often much longer than any standard simulation time (c>>T),
so it is not efficient in general to directly model temporal incoherence. It is not possible to perform near to far field
projections of incoherent results in the near field.
There are some advanced features to directly extract incoherent results (ie. where the value of f ~ 1/c can be
specified) - see Spectral averaging 662 for more detail.
In general, the best approach is to calculate the monochromatic (or CW) response first, then calculate the
incoherent result with
r 2 r 2
E (w0 ) = W (w )E (w ) d w
Where W(w) is the spectrum of the physical source used.
This page discusses how to simulate spatial incoherence directly (or using the Ergodic principle). A more efficient
method of creating incoherent results from coherent results is also discussed.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
Radiated power from multiple dipoles 519
Ergodic principle
Spatial incoherence can be simulated using the ergodic principle of averaging results from multiple ensembles of
dipoles.
Each ensemble consists of many dipoles with randomized phase, amplitude, position, orientation and pulse time. A
large number of ensembles must be averaged in order to get reasonable results. There is a statistical error
associated that decreases with increased number of ensembles, and typically 50 to 100 simulations is a minimum
requirement for getting accurate results (more may be required). It is often erroneously assumed that one simulation
is enough.
For a discussion on this method, please see the Chan et.al. reference under related publications.
by summing the results from each simulation incoherently. This approach has no statistical error, and the total
number of simulations required to do this is typically less than what is required for ensemble averaging. Please see
Incoherent dipole 605 and Double slit experiment 609 for some examples demonstrating spatial incoherence.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
Circular polarization 540
FDTD and coherence 596
Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607
where the unit vector u(t) defines the dipole source polarization and varies on a time scale c >> T.
In both cases, the time scale for the variation of the polarization is much larger than the optical cycle, making it
unpractical to simulate the statistics of temporal polarization incoherence with FDTD.
2 r 2 r 2
E = 12 Es + 12 E p
The derivation of this equation can be found on the Unpolarized beam 602 page.
In the case of a dipole, the results of the three orthogonal polarizations can be added incoherently using the equation
1 r 2 r 2 r
E
2
=
3
{
E px + E py + E pz
2
}
Polarization incoherence examples
For an examples on simulating polarization incoherence, see Unpolarized beam 602 and Incoherent unpolarized
dipole 607 .
To simulate an unpolarized beam or plane wave source, we need to perform 2 simulations with orthogonally polarized
beams. The fields from each simulation can then be added incoherently.
Solvers 101
FDTD
VarFDTD
Associated files
usr_unpolarized_beam.fsp
usr_unpolarized_beam.lsf
See also
Sources 510
Circular polarization 540
Introduction
To simulate an unpolarized beam or plane wave source, two simulations with orthogonal polarizations will be
required. Results for an unpolarized source can then be calculated by incoherently summing results from the two
polarized simulations according to the formula below. See the Derivation section at the bottom of this page for
details.
2 r 2 r 2
E = 1 Es + 1 E p
2 2
In practice, this means that we simulate a beam with a "polarization angle" of 0 and then a beam with a "polarization
angle of 90", as shown below. The quantity <|E|2> refers to the time averaged electric field intensity of an unpolarized
beam source.
1 r 2 r 2
E
2
=
2
{
E0 + E90
Example
The files usr_unpolarized_beam.fsp and usr_unpolarized_beam.lsf can be used to reproduce the
following results.
Screenshot of the simulation
Derivation
To calculate the response of a system to an unpolarized beam, we need to average over all possible input
polarizations:
2p r
2 2
E = 1 E (q ) d q
2p
0
Due to the linearity of Maxwell's equations, we can represent the electric field of an arbitrarily polarized incoming
beam as a sum of two orthogonal polarizations:
r r r
E ( q ) = Es sin( q ) + E p cos( q )
2p r
2 2
E = 1 E (q ) d q
2p
0
2p r r 2
= 1 Es sin( q ) + E p cos( q ) d q
2p
0
2p
r 2 2 r 2 2 r r
= 1 E sin ( q ) + E cos ( q ) + 2 E s E p sin( q ) cos( q ) d q
2p s
p
0
r 2p r 2p r r
2 Es E p 2 p
2 2
ES 2 Ep 2
= sin (q )d q + cos (q )d q + sin( q ) cos( q )d q
2p 2p 2p
0 0 0
r 2 r 2
= 1 Es + 1 E p
2 2
2p
cos(j ) sin( j )d j = 0
0
The response to a spatially incoherent sources can be obtained from the results of multiple coherent simulations.
Solvers 101
FDTD
VarFDTD
Associated files
usr_incoherent_dipoles.fsp
usr_incoherent_dipoles.lsf
See also
Sources 510
Radiated power from multiple dipoles 519
For example, suppose we have a simulation with two dipoles, as shown below. The coherent interference pattern
between the dipoles is clearly visible in both the movie and frequency monitors.
Coherent
interferen
ce
If we want to obtain the incoherent result, we need to perform two individual simulations, as shown below
time domain frequency domain
log(|E1|2)
Incoheren
t
simulation
1
log(|E2|2)
Incoheren
t
simulation
2
By summing the results coherently or incoherently, we can obtain the coherent or incoherent results from the two
simulations:
To simulate an incoherent unpolarized dipole source we need to perform 3 simulations. In each simulation, there
must be one dipole that is orthogonal to the dipoles in the other simulations. The fields from each simulation can
them be added incoherently.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
OLEDs 2694
FDTD and coherence 596
In practice, this means that we simulate a dipole oriented along the x, y and z axes respectively in each simulation.
To obtain the unpolarized fields, we can simply sum the results incoherently. This means that
r 2 r
E
2
= 1 r 2
3
{
E px + E py + E pz
2
}
The quantity <|E|2> refers to the time averaged electric field intensity of an unpolarized dipole source, or a large
number of randomly oriented dipoles in a spatial volume much smaller than the wavelength. For a comparison with
analytical results and a practical application of this approach, in both the near field and the far field, please see the
LEDs application example. For a proof of the principle, please see below.
Derivation
An unpolarized dipole source is created by a large number of incoherent dipole emitters contained in a small spatial
volume that have a random orientation. It can also be created by a single dipole that is randomly re-oriented every
correlation time such that all possible orientations are equally sampled on time scales typical of photodetectors.
To calculate the field distribution of an incoherent dipole, we need to average over all possible dipole orientations.
The incoherent electric field intensity at position r is given by:
r r 2 1 r r 2
E (r ) =
4p E (r , q , j ) sin( q )d qd j
r r
where
E (r , q , j )
represents the electric field created at position r by a dipole (at position r0) with an orientation
given by the spherical angles q and j
Since Maxwell's equations are linear, we can write the electric field from a dipole with orientation q and j as
r r r r p r r p p r r
E (r , q , j ) = E (r , ,0) sin( q ) cos( j ) + E (r , , ) sin( q ) sin( j ) + E (r ,0,0) cos( q )
2 2 2
Substituting this into the equation for the field intensity of an incoherent dipole gives
r r 2 r r p r r p p r r 2
1
E (r ) = E (r , ,0) sin( q ) cos( j ) + E (r , , ) sin( q ) sin( j ) + E (r ,0,0) cos( q ) sin( q )d qd j
4p 2 2 2
It is easy (if tedious) to simply this integral with the help of the identities provided at the bottom of this page. In the
end, we get
r r 2 r r p
1
2
r r p p 2 r r 2
E (r ) = E (r , ,0) + E (r , , ) + E (r ,0,0)
3
2 2 2
Therefore, the field distribution of an incoherent, unpolarized dipole is simply the average of the field distribution of
three orthogonal dipoles. The same result can easily be shown for the H field intensity or the Poynting vector.
sin( j )d j = 0
0
cos(j )d j = 0
0
2p 2p
2 2
sin ( j )d j = p cos ( j )d j = p
0 0
p p
3 4 2 4
0 sin (q )d q = 3 cos (q )d q = 3
0
2p p
2 2
cos(j ) sin( j )d j = 0
0
sin( q ) cos (q )d q = 3
0
2p
d j = 2p
0
This example uses the well-known Young's double slit experiment to demonstrate the spatial coherence of sources
within an FDTD simulation.
Solvers 101
FDTD
VarFDTD
Associated files
usr_double_slit.fsp
usr_double_slit.lsf
See also
FDTD and coherence 596
Incoherent dipole 600
Unpolarized beam 601
Incoherent unpolarized dipole 607
Discussion
The simulation uses a TFSF plane wave source traveling in the +x direction that illuminates an opaque screen with
two apertures 12 um apart. The fields are observed using a frequency monitor which records the data along y at a
distance of 50 um away from screen.
The script file runs the simulation for the cases where the only the top slit is open, only the bottom slit is open, and
the case where both slits are open.
As the plane wave propagates through the slit, diffraction occurs, making the slit act as a point source. The resulting
field profile on the screen is a roughly Gaussian shaped intensity profile from each slit when only one is open at a
time.
When both of the slits are open at the same time, the resulting intensity profile recorded by the monitor is not the
simple the addition of the two intensity profiles shown above. Instead, it is a coherent sum, that includes the
interference terms between the two point sources.
It is important to understand that individual FDTD simulations are always coherent. Never the less, it is possible to
obtain incoherent results by running multiple simulations and adding the results incoherently. The figure below
shows the resulting profile for an incoherent system.
Note: The example script runs 3 simulations, but you can get both incoherent and coherent results by running only
the two simulations where only one slit is open and adding the results incoherently (|E1|2+|E2|2) and coherently (|E1
+E2|2).
Objective
This page discusses how to control the bandwidth of the source pulse.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
Custom time signal 613
Custom spectrum 615
By default, FDTD and MODE Solutions automatically calculate the source pulse shape and bandwith from the Start
& Stop wavelength values specified by the user.
In FDTD Solutions, the 'Optimize for short pulse' option is enabled by default, meaning that a very short pulse is
typically used. In MODE Solutions, this option is disabled by default, leading to a slightly longer pulse (although still
quite short).
For the majority of simulations, the default source pulse settings work well. However, in some special situations, you
may need to modify the source pulse settings:
In the following example, the source range is 1-601 THz. Notice the broad spectrum in the Spectrum vs frequency
plot, and the very short source pulse in the Signal vs time plot.
Objective
This topic explains how to create a custom time signal for a source. In this example, we create a signal with two
gaussian shaped pulses.
If you are looking to simply modify the source bandwidth (ie. to create a longer, more narrow band pulse), see
Changing the source bandwidth 610 .
Solvers 101
FDTD
VarFDTD
Associated files
usr_custom_time_signal.fsp
usr_custom_time_signal.lsf
See also
Sources 510
Custom time signal 613
Custom spectrum 615
Changing the source bandwidth 610
setsourcesignal 1580
To create a custom source time signal, the setsourcesignal function requires a complex valued function.
However, we typically only have a real valued signal. The script usr_custom_time_signal.lsf show how to
convert a real valued function into a complex valued function using an fft.
The first part of the script shows how to define a real valued time signal. In this example, we simply use a sine wave
with a dual-gaussian envelope. Next, the script shows how to convert a real valued signal into a complex valued
signal. After that, the custom time signal is loaded into the source. Finally, we run a simulation and compare the
specified pulse with the actual simulation results.
To reproduce the following figure, open the simulation file, then run the script.
This figure shows the Specified signal, the actual Source This is a zoomed in version of the same figure. We can
signal used in the simulation, and the resulting field see that the Specified signal and Source signal are very
profile as measured by a time monitor. similar. The Signal from the time monitor is delayed by
about 1/4 wavelength, as expected due to the spatial
offset between the source and monitor.
see auto shutoff value stays at 1 even though the amount of remaining field is actually small in the simulation. For
example, for the above custom time signal, the auto shutoff does not start to function until 600 fs (the time length
specified in the script file), although the pulse is physically done at around 400 fs. In order to have the auto shutoff
working ASAP, user should specify a minimum time length possible, say, 450 fs for this source.
Objective
This topic explains how to create a custom source spectrum. First, we must design a time signal with the desired
spectrum. Next, we set the source to use this custom time signal with the setsourcesignal function. Finally, we
confirm the spectrum with a time monitor.
Solvers 101
FDTD
VarFDTD
Associated files
usr_custom_spectrum.fsp
usr_custom_spectrum.lsf
See also
Sources 510
Custom time signal 613
Custom spectrum 615
Changing the source bandwidth 610
setsourcesignal 1580
Setup source
Use usr_custom_spectrum.lsf to create a source with a specified power spectrum.
Objective
This topic provides an example that shows how to get the spatial field profile from a Mode, planewave, or beam
source.
Solvers 101
FDTD
VarFDTD
Associated files
usr_get_source_spatial_fields.fsp
usr_get_source_spatial_fields.lsf
See also
Sources 510
getresult 1647
How close can monitors be to other objects
666
Use the getresult command to access the spatial field profile from the source. For Mode sources, you can also get
the mode's effective index.
The mode profile and effective index data can be accessed as soon as the mode has been calculated. The
updatesourcemode command can be used to force the mode profile calculation. The following command shows how
to get the effective index from a Mode source.
# get the source fields and effective index from the mode source
source_fields = getresult("source","mode profiles");
n = getresult("source","neff");
?n.neff;
5.4.3.6.6.5 CW Normalization
This section describes the CW normalization used to convert time domain data to frequency (steady-state) data. The
CW normalization option should be used whenever you collect frequency domain information.
Solvers 101
FDTD
VarFDTD
In this topic
CW Normalization 618
Pulse or CW injection 620
Free space example 622
Ring resonator example 623
See also
Sources 510
Units and normalization - Ref. guide 622
Ring resonator - Getting started example 2021
Ideally, s(t) would be a dirac delta function (in which case s(w) = 1). This would allow us to obtain the response of
the system at all frequencies from a single simulation. For a variety of reasons, it is more efficient and numerically
accurate to excite the system with a short pulse such that the spectrum, |s(w)|2, has a reasonably large value over
all frequencies of interest.
In the nonorm state, power and profile monitors in FDTD Solutions return the response of the system to the
simulated input pulse s(t):
r r
Esim ( w ) = exp (i wt )E (t )dt
The simulated electric field as a function of angular frequency, Esim (w), depends on both the source pulse used, s(t),
and the system under study.
In the default cwnorm state, power and profile monitors in FDTD Solutions return the impulse response of the
system.
r
r Esim ( w )
Eimp ( w ) =
s( w )
The impulse response of the system is a much more useful quantity because it is completely independent of the
source pulse used to excite the system.
Example
Consider a beam source injected into free space at z=z 0. The source signal is
(t - t0 ) 2
s (t ) = sin (w0 (t - t0 ) ) exp - 2
2(Dt )
The electric field at the source injection plane has the following form:
E ( x, y, z0 , t ) = E0 ( x, y, z0 ) s (t )
For more information, see the Units and Normalization chapter of the Reference Guide.
The following screenshot shows the source Frequency/Wavelength settings tab. In this screenshot, the source
wavelength is set to a single frequency of 500nm. Even thought the frequency span is zero, a pulse is still used.
The time domain signal of the pulse, and the associated power spectrum, are shown in the figures on the right side
of the window.
When the source frequency span is set to zero (i.e. single frequency), then the frequency domain monitors will
automatically measure the response of the system at that frequency only.
Your data analysis may be more complicated when using a CW source. The frequency domain normalization will
not work properly with a CW source. The CW normalization requires that the time domain fields decay to zero by
the end of the simulation.
Note: To reproduce the above screenshot, reduce the simulation time in the FDTD region from 20ps to 1ps, then
open the source properties and zoom in to the start of the source time signal.
Objective
This section describes why the sources inject a short pulse, rather than a Continuous Wave (CW) signal. A pulse is
always used, even when you set the source frequency span to zero (i.e. a single frequency).
It is very important to understand that you can obtain the CW (single frequency, steady-state) response of the
system, even though the source signal was a short, broadband pulse.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
CW Normalization 618
When configuring the source wavelength range (see above figure), you may notice that a broadband pulse is always
used. This behavior is quite intuitive for broadband sources, since the source must excite a range of frequencies.
However, when you are only interested in a single frequency (i.e. you set the frequency span to zero), it may appear
to be incorrect. Many people expect to see a CW signal (i.e. a sine wave) in the 'signal vs time' plot shown above.
For collecting broadband results, a pulse is always more efficient than a CW signal, while for single frequency
results, a pulse is at least as efficient as a CW signal. Always using the pulse technique allows for a more
consistent method of analyzing simulation results, where the CW response (single frequency, steady-state) is
obtained with a Fourier transform of E(t) to give E(w).
For additional details and examples, please see the CW Normalization 618 page.
This page describes the CW normalization as it applies to a simple plane wave propagating through free space.
Solvers 101
FDTD
VarFDTD
In this topic
CW Normalization 618
Free space example 622
Ring resonator example 623
Associated files
usr_CW_freespace.fsp
usr_CW_freespace.lsf
See also
Sources 510
Units and normalization - Ref. guide 622
Run the simulation, then the associated script. The following figure will be created.
The above figure shows the power transmission of the plane wave source as a function of frequency. In all cases, the
power is calculated by integrating the Poynting vector. The only difference is the type of normalization.
The blue line shows the result with CW norm OFF. This data is correct and does show 100% transmission, but
only after we realize that the pulse injected more energy at the center frequency than other frequencies. It is clear
that the data in this form is not very meaningful, since we expect the transmission vs frequency graph to be a flat
line. The units of this data are Watts / Hz^2. This curve is shown in the Source - Frequency/Wavelength tab.
The green line shows the result with CW norm ON. The power transmission now appears to be basically
independent of frequency, as expected. The effects of the pulse have been removed. This value is now the amount
of power that would be measured if a CW source with an electric field amplitude of 1V/m was used to excite the
system. The units of this data are Watts. The theoretical power is given by 0.5*sqrt(eps0/mu0)*(100e-9)^2, where
(100e-9)^2 is the area of the simulation cross section.
The red line shows the result with CW norm ON divided by the sourcepower function. This can be calculated
more simply with the transmission function. To a first approximation, the sourcepower function is a constant
when CW norm is ON, which is why the green and red lines are very similar. However, this is not exactly true. For
information, see the note below for advanced users.
For more information, see the Units and Normalization chapter of the Reference Guide.
This page describes the CW normalization as it applies to a ring resonator with a complicated frequency domain
transmission spectrum.
r r 2
Solvers 101
E (rdrop , w )
FDTD
2
VarFDTD S (w)
In this topic
CW Normalization 618
Free space example 622
Ring resonator example 623
Associated files
usr_ring.fsp
See also
Sources 510
Units and normalization - Ref. guide 622
Ring resonator - Getting started example 2021
1 t - t0 2
S (t ) = sin( w0t ) exp -
2 Dt
The source gives rise to the electromagnetic fields as a function of time, as shown in the movie below.
r r
E (r , t )
Point time monitors at the centers of the through and drop waveguides allow us to plot the electromagnetic fields as
a function of time
r r
E (rthrough, t )
r r
E (rdrop , t )
While the simulation is running, the frequency domain profile monitors and frequency domain power monitors perform
Discrete Fourier Transforms (DFT) to calculate the electromagnetic fields as a function of angular frequency.
r r TS IM
r r
E (r , w ) = dt exp( i wt ) E (r , t )
0
2 pc
w = 2 pf =
l
The simulation time is TSIM, and it is important that we allow the fields to decay completely in the time domain before
the end of the simulation; otherwise, the fourier transform is not correct. Point time monitors should always be used
to verify that the fields have decayed. (The exception to this rule is very high quality factor resonators.)
We can see graphically what this transformation does for the field recorded by a point time monitor at the drop
waveguide center.
r r r r 2
E (rdrop , t ) E (rdrop , w )
We can see that the electromagnetic field as a function of frequency has narrow drop channels due to the ring
resonator, and an overall gaussian envelope which is due to the source pulse. The reason is that the source pulse
injects the most energy at the central frequency of 193.1 THz, and less energy at other frequencies. The relative
amount of energy injected by the source as a function of frequency is called the source spectrum. The source
spectrum is shown in the Frequency/Wavelength tab of the Source object parameters and looks like the figure
below.
We can normalize our electromagnetic fields as a function of frequency to the source spectrum to study the pure
CW response of the system, as if the source spectrum was a constant at all frequencies. FDTD Solutions does this
normalization by default and it is called "CW Normalization". This can be set by choosing either "CW normalization"
or "No normalization" from the "Settings->Normalization state" menu of the layout editor.
With "CW Normalization" we can again consider the the correspondence between the electromagnetic fields as a
function of time and frequency at the center of the drop waveguide.
r r r r 2
E (rdrop , t ) E (rdrop , w )
2
S (w)
It is now clear that we see the response of the drop channel without the gaussian envelope due to the source
spectrum. It should be noted that switching from "CW normalization" to "No normalization" only affects the post-
processing of the simulation data. It does not affect how the data is calculated during the simulation in any way. To
avoid numerical error, we should only calculate frequency domain information at frequencies where the source
spectrum is not infinitely small.
We can also collect spatial information and calculate transmissions through monitors at different wavelengths. For
example, the spatial profiles of the ring resonator at two different wavelengths is shown below. Even if we choose to
calculate results at only one wavelength, the pulse source is still the most efficient method of calculating this CW
response.
r r 2 r r 2
E (r , w ) E (r , w )
at 1581 nm at 1553 nm
See also
Sources 510
Metamaterials methodology 1986
Creating sampled data materials 226
Simulation time
At lower frequencies, the simulation time property (found in the general tab of the simulation region) must be
increased. The default value of 1000fs corresponds to hundreds of optical cycles at visible frequencies. When
operating at lower frequencies, you must increase the simulation time accordingly.
Metals
At UV-Vis-IR wavelengths, it is often necessary to correctly model the dispersive nature of metals. At lower
frequencies, the material dispersion is less important, and metals can often be treated as ideal. Making this
approximation means that it is not necessary to find the actual refractive index values. It can also allow a much
larger simulation mesh to be used. To treat metals as ideal, use the PEC (Perfect Electrical Conductor) material
model. PEC is an ideal metal with zero absorption and 100% reflection.
All sources in FDTD Solutions/MODE Solutions' propagator, including dipole sources, are "soft" sources.
Solvers 101
FDTD
VarFDTD
See also
Sources 510
Sources - Dipoles 511
FDTD and coherence 596
The total electromagnetic fields in a simulation with multiple sources is given by the coherent sum of the field due to
each individual source. Therefore, it is equivalent to calculate the total field by:
directly simulating the entire system by including all sources in a single simulation
run one simulation per source, then coherently sum the fields from each simulation
r r r r
Etotal = Es1+ s 2 = Es1 + Es 2
To see an example that shows these two techniques are equivalent, see the FDTD and coherence - Incoherent
dipole 600 page. This examples calculates the interference pattern between two dipoles. A screenshot of the
coherent interference pattern of the two dipoles from this example is shown above. This field profile can be obtained
from a single simulation with two sources, or the coherent sum of two simulations that had one source each.
For the purposes of showing that the above techniques are equivalent, we are only interested in the coherent
interference patterns from this example. The incoherent sum of the fields is not relevant to understanding this point.
Objective
This page provides a basic introduction to the sources in FDTD Solutions (with images of the steady state (CW) field
profile and movies of the time domain pulse for each source). Sources in MODE Solutions' propagator are very
similar but may look slightly different since they do not have z-dependence.
Solvers 101
FDTD
VarFDTD
In this topic
Dipoles 629
Gaussian beam 631
Planewave 632
TFSF 634
MODE 635
Import 579
Associated files
usr_source_electric_dipole.fsp
usr_source_magnetic_dipole.fsp
usr_source_gaussian.fsp
usr_source_planewave.fsp
usr_source_TFSF.fsp
usr_source_mode.fsp
usr_custom_source.fsp
See also
Sources 510
Sources - Dipoles 511
Plane waves - Edge effects 526
Dipoles
Dipoles are used to simulate point source radiators, such as radiation from a fluorescent molecule. There are two
types of dipole source: Electric (oscillating point charge) and Magnetic (current loop). The radiation pattern of these
dipoles is similar, but not exactly the same. For more dipole source information, see the Sources - Dipoles 511 page.
Electric dipole
Steady state (CW) - Ez in xy-plane
Electric dipole
Time domain - Ez in xy-plane
Electric dipole
Steady state (CW) - |E|^2 in xz-plane
Electric dipole
Time domain - |E|^2 in xz-plane
Magnetic dipole
Steady state (CW) - Ey in xz-plane
Magnetic dipole
Time domain - Ey in xz-plane
To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field_xy","x");
y=getdata("field_xy","y");
Ex=getdata("field_xy","Ex");
Ey=getdata("field_xy","Ey");
Ez=getdata("field_xy","Ez");
E2=getelectric("field_xy");
image(x*1e6,y*1e6,real(Ex),"x (um)","y (um)","real(Ex)");
image(x*1e6,y*1e6,real(Ey),"x (um)","y (um)","real(Ey)");
image(x*1e6,y*1e6,real(Ez),"x (um)","y (um)","real(Ez)");
image(x*1e6,y*1e6,E2, "x (um)","y (um)","|E|^2");
x=getdata("field_xz","x");
z=getdata("field_xz","z");
Ex=getdata("field_xz","Ex");
Ey=getdata("field_xz","Ey");
Ez=getdata("field_xz","Ez");
E2=getelectric("field_xz");
image(x*1e6,z*1e6,real(Ex),"x (um)","z (um)","real(Ex)");
image(x*1e6,z*1e6,real(Ey),"x (um)","z (um)","real(Ey)");
image(x*1e6,z*1e6,real(Ez),"x (um)","z (um)","real(Ez)");
image(x*1e6,z*1e6,E2, "x (um)","z (um)","|E|^2");
Gaussian beam
The gaussian beam source is typically used to simulate a focused beam incident on a structure. In this example we
show a beam with a numerical aperture (NA) of 0.6 focused at a point 7um in front of the source injection plane.
Simulation screenshot
Time domain - Ey
To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field","x");
y=getdata("field","y");
Ex=getdata("field","Ex");
Ey=getdata("field","Ey");
E2=getelectric("field");
image(x*1e6,y*1e6,real(Ex),"x (um)","y (um)","real(Ex)");
image(x*1e6,y*1e6,real(Ey),"x (um)","y (um)","real(Ey)");
image(x*1e6,y*1e6,E2, "x (um)","y (um)","|E|^2");
Plane wave
The plane wave source is typically used to simulate very large (approximately infinite) beams incident on periodic
structures. Periodic or Bloch boundary conditions are normally required. In this example we show a plane wave
traveling at a 30 degree angle of incidence in a 2D simulation. For more planewave source information, see the Plane
waves - Edge effects 526 page.
Simulation screenshot
Time domain - Ez
To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field","x");
y=getdata("field","y");
Ez=getdata("field","Ez");
E2=getelectric("field");
Simulation screenshot
Time domain - Ez
To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
x=getdata("field","x");
y=getdata("field","y");
Ez=getdata("field","Ez");
E2=getelectric("field");
image(x*1e6,y*1e6,real(Ez),"x (um)","y (um)","real(Ez)");
image(x*1e6,y*1e6,E2, "x (um)","y (um)","|E|^2");
MODE
The MODE source is used to inject a guided mode into a device, such as a waveguide. In this example we use the
Mode source to inject a 2nd order mode into a step index fiber in a 3D simulation.
Simulation screenshot
Time domain - Ey
Time domain - Ez
To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
y=getdata("field","y");
z=getdata("field","z");
Ex=getdata("field","Ex");
Ey=getdata("field","Ey");
Ez=getdata("field","Ez");
E2=getelectric("field");
image(y*1e6,z*1e6,real(Ex),"x (um)","y (um)","real(Ex)");
image(y*1e6,z*1e6,real(Ey),"x (um)","y (um)","real(Ey)");
image(y*1e6,z*1e6,real(Ez),"x (um)","y (um)","real(Ez)");
image(y*1e6,z*1e6,E2, "x (um)","y (um)","|E|^2");
Simulation screenshot
To reproduce the movies, run the associated simulation file. To create the CW field profiles, use these script
commands:
E = getresult("YZ","E");
image(E.y*1e6,E.z*1e6,real(E.Ey),"x (um)","y (um)","real(Ey)");
image(E.y*1e6,E.z*1e6,E.E2, "x (um)","y (um)","|E|^2");
Index monitors records the n and k value as a function of frequency/wavelength in a simulation. Index monitors are
only available in two or three dimensions; there is no option for linear or point index monitors. In the future, the index
monitor will be able to capture the time-evolution of the physical properties profile for nonlinear media.
Effective index monitors records the effective index values as a function of frequency/wavelength in a simulation. The
geometry of effective index monitors is restricted to 2D z-normal. This monitor is only available in the varFDTD
solver.
These monitors provide time-domain information for field components over the course of the simulation. Time-domain
monitors can consist of point, line, or area monitors to capture this information over different spatial extents within
the FDTD simulation region. For the purposes of extracting line widths of resonant structures through Fourier
analysis, point time monitors with a down sample time of 1 are sufficient.
Movie monitors capture a desired field component over the region spanned by the monitor for the duration of the
simulation. Movie monitors are only available in the two dimensional variety (and only z-normal for propagator
simulations). The resultant movies are saved with the same name as the monitor in the current working directory.
Frequency-domain field monitors collect CW, steady state EM field data in the frequency domain from an FDTD or
varFDTD simulation.
Frequency-domain field monitors collect CW, steady state EM field data in the frequency domain from an EME
simulation. Very similar to the Frequency-domain field monitor.
Mode Expansion Monitors use overlap analysis to calculate the forward/backward propagating components of any
mode of a waveguide or fiber at an arbitrary location in the simulation region. The Mode Expansion monitor facilitates
the interoperability between FDTD Solutions and INTERCONNECT as it returns the S parameters, which can be
imported into INTERCONNECT directly.
The global monitor options window is where the user can specify the range and resolution with which to measure
frequency-domain information. These settings can be used by any of the frequency domain monitors by unchecking
the 'override global monitor settings' check box in the monitor's General tab.
Index monitors
Index monitors records the n and k value as a function of frequency/wavelength in a simulation. Index monitors are
only available in two or three dimensions; there is no option for linear or point index monitors. In the future, the index
monitor will be able to capture the time-evolution of the physical properties profile for nonlinear media.
In FDTD solutions, It is possible to preview the index profile while still in Layout mode (i.e. without running the
simulation). Note that the index preview returns a slightly simplified version of what the index monitor provides after
running the simulation. Some advanced settings, such as the spatial interpolation setting) will be ignored in the
preview.
Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial settings below
The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).
Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.
SPATIAL INTERPOLATION: In FDTD generally, the electromagnetic field components and material
properties are not known at the same point in space. Instead each component of the vectorial electric and
magnetic fields are recorded at different locations in the Yee cell. Therefore, the material properties are also
known at various locations within the Yee cell. This setting controls how the index monitor calculates the
refractive index data. The SPECIFIED POSITION (Default) returns the index data where the monitor is
located. This type of data is convenient for many purposes, but it is important to remember that the actual
FDTD engine calculates the fields at locations other than the Yee cell origin. The NEAREST MESH CELL
option is very similar, but the monitor location is snapped to the nearest mesh cell. The NONE option
records the index data at the locations actually used by the FDTD engine.
Note: Spatial interpolation - NONE setting
Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is enabled.
They may not give the most accurate result when used to analyze such monitor data. All analysis must be
done manually.
RECORD DATA WITHIN PML: This option is as described above for time domain monitors.
RECORD CONFORMAL MESH WHEN POSSIBLE: Enabled by default. The index monitor will record the
the effect of the conformal mesh. It is helpful to disable this option when doing absorption calculations. The
conformal mesh information can only be recorded when using the 'NEAREST MESH CELL' or 'NONE' spatial
interpolation setting, and when the spatial downsampling option is set to 1.
RECORD SURFACE CONDUCTIVITY: Disabled by default. The index monitor will record the surface
conductivity which is used in the simulation and return this as the SURFACE CONDUCTIVITY result. This
may be used if you want to record the surface conductivity components over space when using SPECIFIED
POSITION, or NONE as the spatial interpolation option.
Results returned
Results
INDEX PREVIEW: Refractive index as a function of position and frequency/wavelength before the simulation
runs. It is important to note that the preview data is not exactly the same as the data returned after the
simulation runs. Some advanced settings, such as spatial interpolation options and conformal meshing are
ignored when calculating the index preview.
INDEX: Refractive index as a function of position and frequency/wavelength.
SURFACE CONDUCTIVITY PREVIEW: Surface conductivity as a function of position and frequency/
wavelength before the simulation runs. This is useful tool to make sure the graphene object is positioned as
desired.
SURFACE CONDUCTIVITY: This will return the same result as the surface conductivity preview by default. If
the RECORD SURFACE CONDUCTIVITY option under the ADVANCED TAB is enabled, this will instead
return the surface conductivity used in the simulation which will include the effect of the selected spatial
interpolation option.
Note that time monitors in propagator simulations cannot have any dimensions that allow for a non-zero z-span.
General tab
OVERRIDE GLOBAL MONITOR SETTINGS:
A toggle to override the global monitor settings. If checked, the user can specify the frequency range and
number of points at which frequency-domain information will be recorded (using the options described below). If
unchecked the options below are set from the global monitor settings.
USE LINEAR WAVELENGTH SPACING: By default, data is recorded at linearly spaced points with respect
to frequency. Selecting this option spaces data at linearly spaced points with respect to wavelength.
USE SOURCE LIMITS: When checked these monitors use the source limits. When unchecked, the
frequencies/wavelengths at which to record data can be set using the pull down menus and boxes below
them.
FREQUENCY POINTS: Set to choose the number of frequency points at which to record data.
Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below
The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).
Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.
SPATIAL INTERPOLATION: There are three options for index monitors. The default option, SPECIFIED
POSITION returns the index that that the field sees at the location where the monitor is placed. The next
two options. NEAREST MESH CELL and NONE are as described for time-domain monitors. In simulations
with mesh refinement turned on, the default option does not show the averaging of the indices, but the other
options do.
RECORD DATA WITHIN PML: This option is as described above for time domain monitors.
RECORD CONFORMAL MESH WHEN POSSIBLE: Enabled by default. The index monitor will record the
the effect of the conformal mesh. It is helpful to disable this option when doing absorption calculations.
Time-domain monitors
These monitors provide time-domain information for field components over the course of the simulation. Time-domain
monitors can consist of point, line, or area monitors to capture this information over different spatial extents within
the FDTD simulation region. For the purposes of extracting line widths of resonant structures through Fourier
analysis, point time monitors with a down sample time of 1 are sufficient.
Simulation type: Record the type of simulation data, default setting is ALL
Stop method
End of simulation, Choose stop time, choose number of snapshots
Start time: The time to start recording
Stop time: The time to stop recording, choose stop time option
number of snapshots: the number of time step to record, related to the dt setting in mesh settings tab 414
Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below
The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).
Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.
SPATIAL INTERPOLATION: In FDTD generally, the electromagnetic field components are not recorded at
the same point in space. Instead each component of the vectorial electric and magnetic fields are recorded
at different locations in the Yee cell. In order to properly calculate the Poynting vector and electromagnetic
energy density, the fields are interpolated to the same location in the Yee cell. This setting controls how the
fields are interpolated. The options for time monitors are NEAREST MESH CELL (Default) and NONE. With
NEAREST MESH CELL, the fields are interpolated to the nearest FDTD mesh cell boundary. With NONE,
no interpolation is performed and each electromagnetic field component is recorded at a different position
within the Yee cell.
Note: Spatial interpolation - NONE setting
Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is enabled.
They may not give the most accurate result when used to analyze such monitor data. All analysis must be
done manually.
RECORD DATA WITHIN PML: Collect monitor data within the PML boundary condition region. This is a very
advanced option that should rarely be used. Contact Lumerical support before enabling this option. The
simulation region - EXTEND STRUCTURE THROUGH PML option must be disabled when using this option.
MIN SAMPLING PER CYCLE: This parameter determines the minimum amount of sampling per optical
cycle that can be used. By default, it is set at 10.
SAMPLING RATE: The actual sampling rate in Hz.
DOWN SAMPLE TIME: This is the time step downsampling.
Results returned
Results
E: Electric field data as a function of position and time.
H: Magnetic field data as a function of position and time.
P: Poynting vector as a function of position and time.
SPECTRUM: The fourier transform of the electric and magnetic fields as a function of position and
frequency/wavelength.
Manual calculation of SPECTRUM result
The following code can be used to manually calculate the spectrum data (eg. if it is necessary to adjust the
frequency range of the data).
# this code can be used to manually calculate the
# spectrum result from time monitor data
# visualize dataset
visualize(spectrum);
Rawdata
POWER: Instantaneous power as a function of time. This data is only returned when surface monitor (3D
simulation) or line monitor (2D simulation) is used, with the "output power" option checked in the Data to
record tab. For more information or an example using this data, see Parseval's theorem 125 .
STORAGE_FIELDS: Only for plugin materials. Extra data is available if the storage field is properly specified
in the .cpp file when the material is complied. The software automatically chooses the x,y,z-direction where
the fields are meaningful to show. For more information, see plugin material 243 .
Movie monitors
Movie monitors capture a desired field component over the region spanned by the monitor for the duration of the
simulation. Movie monitors are only available in the two dimensional variety (and only z-normal for propagator
simulations). The resultant movies are saved with the same name as the monitor in the current working directory.
TIP: CW Movies
It is possible to create a CW movie from profile or power monitor data. For more information, see the User Guide -
Data Analysis section 870 of the online Knowledge Base.
Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below
Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.
MIN SAMPLING PER CYCLE: This parameter determines the desired amount of sampling per optical cycle.
SAMPLING RATE: This converts the minimum points per optical cycle into an actual sampling rate in Hz.
DOWN SAMPLE TIME: This is the time step downsampling.
FRAME RATE: The speed at which frames are displayed on the screen, in units of frames per second. The
default is 30.
RECORD DATA WITHIN PML: This option is as described above for time domain monitors.
Results returned
Results
A movie file (.mpg) named after the simulation file name is generated. The file can be found in the same
directory as the simulation file. To view the movie, use a 3rd party movie player such as Windows Media
Player.
Simulation type: Record the type of simulation data, default setting is ALL
Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below
The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).
FULL apodization involves windowing the time-domain data on both the start and end side. The resulting
windowed data is then processed to produce frequency-domain information.
START apodization involves windowing the front side of the time-domain data. This can be useful to exclude
the initial source excitation from the frequency-domain data.
END apodization involves windowing the last part of the simulation. This can be useful for ramping down the
time-domain signal in devices where the radiation lives a long time, like cavities.
Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.
SPATIAL INTERPOLATION: In FDTD generally, the electromagnetic field components are not recorded at
the same point in space. Instead each component of the vectorial electric and magnetic fields are recorded
at different locations in the Yee cell. In order to properly calculate the Poynting vector and electromagnetic
energy density, the fields are interpolated to the same location in the Yee cell. This setting controls how the
fields are interpolated. With NEAREST MESH CELL option (default for 'field and power' monitors), the fields
are interpolated to the nearest FDTD mesh cell boundary. With SPECIFIED POSITION option (default for
'profile' monitors), the fields are recorded exactly where the monitor is located. With NONE, no interpolation
is performed and each electromagnetic field component is recorded at a different position within the Yee
cell.
Note: Spatial interpolation - NONE setting
Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is enabled.
They may not give the most accurate result when used to analyze such monitor data. All analysis must be
done manually.
RECORD DATA WITHIN PML: Collect monitor data within the PML boundary condition region. This is a very
advanced option that should rarely be used. Contact Lumerical support before enabling this option. The
simulation region - EXTEND STRUCTURE THROUGH PML option must be disabled when using this option.
Sampling frequency
OVERRIDE ADVANCED GLOBAL MONITOR SETTINGS: When this option is selected MIN SAMPLING PER
CYCLE can be set. The other options cannot be altered, they are there to display settings.
MIN SAMPLING PER CYCLE: This parameter determines the minimum amount of sampling per optical
cycle that can be used. By default, it is set at 2 (the Nyquist limit) for optimum efficiency.
DESIRED SAMPLING: This converts the minimum points per optical cycle into an actual sampling rate in
Hz.
NYQUIST LIMIT: The Nyquist sampling limit is calculated based on the maximum frequencies that may be
present in the simulation volume.
ACTUAL SAMPLING: The actual sampling rate is the rate that will actually be used for the discrete fourier
transforms (DFTs), taking into account the desired sampling rate, the Nyquist limit and the time step, dt.
DOWN SAMPLE TIME: This is the time step downsampling.
Results returned
Results
E: Electric field data as a function of position and frequency/wavelength.
H: Magnetic field data as a function of position and frequency/wavelength.
P: Poynting vector as a function of position and frequency/wavelength.
T: Transmission as a function of frequency/wavelength.
FARFIELD: Farfield data can be obtained. For more information, see Far field projections 126 .
Rawdata
POWER: Time averaged power as a function of frequency. This data is only returned when surface monitor
(3D simulation) or line monitor (2D simulation) is used. For more information or an example using this data,
see Parseval's theorem 125 .
Geometry tab
Monitor type: The monitor type and orientation, this option will control the available of spatial setting below
X RESOLUTION: Resolution of the monitor in x direction, 100 by default. This number can be changed in the
analysis mode, but will need eme propagate to take effect.
Results returned
Results
field profile: The Electric and Magnetic field data as a function of position.
The DOWN SAMPLE X, Y, Z option is used to set the spatial averaging performed on the data. A down
sample value of N corresponds to averaging over N grid points. Setting the down sample value to 1 gives the
most detailed spatial information (i.e. information at each grid point).
Mode Calculation
General
MODE SELECTION: Allows users to select the modes to use for the mode expansion calculation. The "user
select" option launches the eigenmode solver where the user can calculate and visualize the supported
modes (see Mode analysis 570 ); use this option to select multiple modes.
Following the "mode selection" combo box is a frame for choosing the frequencies to calculate the modes for.
Note that this does not have to correspond to the frequency points for the monitors in the "Monitors for
expansion" table. The mode expansion monitor will automatically perform the necessary interpolation between
different frequency points.
OVERRIDE GLOBAL MONITOR SETTINGS: A toggle to override the global monitor settings. If checked, the
user can specify the frequency range and number of points at which the modes will be calculated at (using
the options described below). If unchecked, the options below are set from the global monitor settings.
USE LINEAR WAVELENGTH SPACING: By default, modes are calculated at linearly spaced points with
respect to frequency. Selecting this option spaces the points with respect to wavelength.
USE SOURCE LIMITS: When checked these monitors use the source limits. When unchecked, the
frequencies/wavelengths at which to record data can be set using the pull down menus and boxes below
them.
FREQUENCY POINTS: Set to choose the number of frequency points at which to calculate the modes.
SELECT MODE: If the "user selected" option has been chosen, this will bring up the Mode analysis tab 570
for the user select from a calculated list of modes.
VISUALIZE MODE DATA: This will bring up the Visualizer, showing all the profiles for the selected modes.
CLEAR MODE DATA: Clears all the mode data.
Rotations
This frame allows user to apply an arbitrary rotation to the calculate modes.
THETA: The angle of propagation, measured in degrees, with respect to the normal axis.
PHI: The angle of propagation, in degrees, rotated about the normal axis in a right-hand context.
OFFSET: Allows users to set an offset to the plane where the modes are calculated. This is useful for
ensuring that monitors at an angle do not intersect with unwanted structures.
Note:
For best accuracy, we should place mode expansion monitors with rotations on a mesh cell. A useful
approach is to add an override mesh region at the same position of the mode expansion monitor, and this
override region can be infinitely thin (i.e., one of the spans can be 0).
Advanced
AUTO UPDATE BEFORE ANALYSIS: If checked, the monitor will automatically update the chosen modes
when "user select" in MODE SELECTION is selected. The monitor will find the best overlap between the
chosen modes and the currently calculated modes, if there are a new set of modes. This allows users to
keep track of the same chosen modes even the mode orders are switched, for example, when running a
Parameter sweep over the waveguide width. This checkbox can be unselected but it has no effect if
"fundamental mode", "fundamental TE mode" or "fundamental TM mode" is chosen in the MODE
SELECTION dropdown list.
ALIGN TO FREQUENCY MONITOR CENTER:
o By default, it is unchecked. In some cases, aligning to the center can lead to incorrect expansion when a
monitor is offset. By unchecking this option, it performs the overlap calculation without aligning the center
of the mode expansion monitor with the center of the frequency monitor. This feature is useful when a
monitor, or both expansion and frequency monitor, is offset. For the best practice, when expanding the
fields from a single frequency monitor, it is recommended to leave this unchecked and also to align the
mode expansion monitor precisely with the frequency monitor that will be expanded, and with the center of
the waveguide.
o If checked, the center of the mode expansion monitor will be laterally shifted to align with the center of the
frequency monitor when the expansion is calculated. This makes it possible to use the same mode
expansion monitor for the expansion of modes on different waveguides that are laterally offset. For
example, using one mode expansion monitor to expand the modes in multiple channels that are laterally
offset (e.g., drop and through) in a ring resonator 2021 simulation. It is recommended to place all monitors at
the centers of the waveguides accordingly to avoid incorrect expansion. This shift does not add additional
phase to the expansion.
"Add" and "Remove" buttons on the side can be used to add/remove monitors, and users can choose the
desired monitor from the monitor drop down list. See the getting Ring resonator 2033 getting started example for
an example that uses mode expansion monitor.
Results returned
Modes
NEFF: Effective index as a function of selected mode and frequency/wavelength is returned.
MODE PROFILES: Mode profiles (E, H, and index) as a function of position and frequency/wavelength.
Modal expansions
EXPANSION FOR: A set of expansion results are returned for each input monitor specified under "Monitors
for expansion". Each set of result contains Ttotal, Tforward,Tbackward, Tnet, a,b, N, and P. Please see the
Using Mode Expansion Monitors 651 page for more information.
Objective
Mode expansion monitors are very useful for analyzing the fraction of power transmitted into any mode(s) of a
waveguide or fiber. The results of mode expansion monitors contain the necessary information for interfacing
between component level simulations and circuit level simulations. They are available in FDTD Solutions 8.0+ and
MODE Solutions 6.0+.
Associated files
expansion1.fsp
expansion2.fsp
expansion2.lsf
See also
Mode Expansion 649
Ring Resonator Tutorial
2020
Silicon Photonics:
Components, Circuits
and Systems
Grating Coupler S-
Parameters 2D 2076
Grating Coupler S-
Parameters 3D 2091
Relevant script
commands
addmodeexpansion
1551
setexpansion 1587
removeexpansion
1587
am bm
and represent the complex transmission coefficient of the forward and backward propagating waves
j m j n = N m d mn
respectively. If we assume orthogonality , then the coefficients for any mode m can be
determined from the overlap integrals:
r r r
0.5 * dS Ein H m* = (am + bm )N m
r r r
0.5 * dS Em* H in = (am - bm )N m*
r
Ein
This is the basic concept behind mode expansion monitors. The user can specify an arbitrary input field
r r r
H in Em Hm
and (recorded by a frequency monitor), and modal fields and (by a mode expansion monitor).
The mode expansion monitor will return the following results:
r r r r r* r
dS Ein H m* d S Em H in
am = 0.25*
+
Nm Nm
r r r* r r* r
dS Ein H m
bm = 0.25*
-
dS Em H in
Nm Nm
r r r*
N m = 0.5* dS Em H m
r r r
Pin = 0.5* dS Ein H in*
N P
where m is the power of the mode m in the waveguide, and in is the total input power (in Watt) recorded
by the frequency monitor.
Note: These equations only apply to the ideal case. In practice, since an FDTD simulation uses a mesh,
a correction step is necessary to account for the grid dispersion from this discrete mesh. This correction
factor is taken into account in the mode expansion monitor built-in analysis. In the limit where the mesh
size gets very very small, these equations will give the same results as the mode expansion monitor with
the built-in correction.
r r r r
Ein H in Em H m
, ), and the modal fields ( , ). For a description on the individual settings in this tab, see Mode
Expansion 649 .
Modal Fields
When you edit mode expansion monitor, the Mode calculation section is for selecting the modal fields for this
expansion. The fundamental mode is sufficient for most cases, but if you would like to calculate the expansion
coefficient for multiple modes, select user select from the drop down menu, and then click on Select Mode.
This will bring up the mode solver and you can choose any mode(s) for this calculation from the mode list. You
may also want to use more than 1 frequency points if the component has a wide operation bandwidth.
Input profiles
We use a frequency monitor as the input profile (the profile to be expanded). The Monitors for expansion
section allows users to choose the monitors that contain the input profiles. In the example below, four input
profiles have been selected (corresponding to each port of the ring resonator). This means that 4 sets of
expansion coefficients will be available in the Mode Expansion 651 's results section.
A set of expansion results will be available for each input monitor specified under "Monitors for expansion".
Each set of result contains:
T_total the total transmission of the input profile. This will be the same as the result obtained with the
transmission script command. It's important to notice that the Transmission values are
normalized to the power injected by the source.
T_forwar the forward (the direction of the positive coordinate axis) transmission into the selected modal
d field(s). If more than 1 mode had been selected under "Mode calculation", the result will be an
array containing the forward transmission into each mode.
T_backw the backward (the direction of the negative coordinate axis) transmission into the selected modal
ard field(s)
T_Net the net transmission into the selected modal field(s)
a complex transmission coefficient of the forward propagating waves, of the selected model field(s)
b complex transmission coefficient of the backward propagating waves, of the selected model
field(s)
N the power of the mode m in the waveguide, based on the peak modal |E|^2 =1 in w2, this power
changes with the area of the modal field.
P the total input power recorded by the frequency monitor, in Watt.
2 N
T forward = a ~1
In this case, we have
sourcepower (ie. the forward transmission into the fundamental
2 N
Tbackward = b ~0
mode of the waveguide) and
sourcepower for the "T" monitor in front of the source. For
T forward = Tbackward = 0
the "R" monitor behind the source, we have , since there are no reflections in this
setup.
However, if you have multiple waveguide cross section geometries in the simulation (ex. Grating Coupler 2076 ),
or if you are expanding the fields using a different mode than what was injected by the source, the
interpretation is less obvious. The reason is because when the mode expansion monitor is calculating the
modal fields of the structure, the mode amplitude is arbitrary and the fields are simply scaled such that the
peak |E|^2 value is 1 with a phase of 0. One consequence of this scaling is that the amount of power in each
mode can be different. For example, a mode with a larger spatial size will tend to carry more power than a
smaller mode, simply because they have the same peak intensity but are different in size. This power, N, can
be calculated by integrating the Poynting vector of the modal fields. In some situation, N can be larger than the
input power P. The reason is that N is calculated based on the peak modal |E|^2 =1 in w2, so N increases with
the cross-sectional area of w2.
For example, in expansion2.fsp, the fundamental mode at the narrow waveguide (w1) is used as the
source, and we want to study the transmission into the wide waveguide (w2).
When the mode source injects the fundamental mode into w1 at the injection plane (with a peak amplitude of 1
V/m and a phase of 0), it will inject a fixed amount of power in Watts, which we can calculate from the
sourcepower 1601 function. An expansion monitor "Exp" and a field monitor "T" has been set up in w2 that will
be used to study the transmission into the wide waveguide. Since the expansion monitor is positioned in w2, it
will expand the fields based on the fundamental mode of w2, which is different than the mode injected by the
source. Again, the peak amplitude of the mode from the expansion monitor will be normalized to 1 V/m. The
expansion monitor then calculates a , which is the overlap integral between the fields recorded by "T" and the
mode profile from "Exp". However, the raw value a is not meaningful because the normalization applied to the
mode from the expansion monitor is completely arbitrary. What we need to do is to normalize away the fact
that the different modes contain different amounts of power.
aout
where is the arbitrary complex transmission coefficient of the selected mode in w2,
ain
is the complex transmission coefficient of the selected mode in w1,
N out
is the power contained in the selected mode in w2, and
N in
is the power contained in the selected mode in w1,
2
aout N out
is the actual forward transmitted power that the selected mode carries in w2.
N out
Ie. the coupling coefficients must be scaled by the power for each mode. is returned as a result for
N in ain
"Exp", and can be obtained from the sourcepower 1601 command (and equals 1). The equation above
becomes:
2
aout N out
Sourcepower
The script expansion2.lsf calculates this value, and as expected, this is exactly what the result "T
forward" from the expansion monitor returns.
Parameter extraction
The mode expansion monitors makes it very easy to extract the complex transfer function of an element.
These results contain the necessary amplitude and phase information, which serves as the interface between
the physics-based, component level simulations and the system/circuit level simulations that involve multiple
components in arbitrarily complex configurations. This parameter extraction process is relatively easy for
single mode waveguides, but can also be extended to multi-mode systems. For a step-by-step tutorial on how
to carry out this process, see the Ring Resonator Tutorial in FDTD Solutions and MODE Solutions 2020 .
For a good introduction on how to incorporate component level details into circuit level simulations (with
Lumerical's INTERCONNECT), please see the following video: Silicon Photonics: Components, Circuits and
Systems
DESIRED SAMPLING: This converts the minimum points per optical cycle into an actual sampling rate in
Hz.
NYQUIST LIMIT: The Nyquist sampling limit is calculated based on the maximum frequencies that may be
present in the simulation volume.
ACTUAL SAMPLING: The actual sampling rate is the rate that will actually be used for the discrete fourier
transforms (DFTs), taking into account the desired sampling rate, the Nyquist limit and the time step, dt.
DOWN SAMPLE TIME: This is the time step downsampling.
Apodization 660
5.4.3.7.8.1 Apodization
Objective
This page describes the apodization option of Frequency monitors. Apodization makes it possible to exclude effects
that occur near the start and/or end of the simulation from the monitors fourier transform.
This feature can be useful for filtering away short lived transients that occur when a system is excited with a dipole
source, and when studying high Q systems that decay very slowly. Apodization is considered to be an advanced
feature and care must be taken when using it. Do some testing with a simple test simulation first, to make sure you
understand how the monitor apodization affects your simulation results.
Solvers 101
FDTD
VarFDTD
Associated files
usr_Tang_cavity.fsp
See also
Correcting field amplitudes 1805
Introduction
Monitor apodization applies a window function to the simulation fields E(t) before the monitor performs its Fourier
transform of E(t) to obtain E(w). This makes it possible to calculate E(w) from a portion of the time signal. For
example, start apodization can be used to ignore all transients which occur near the start of the simulation.
Note:
Apodization will, in general, invalidate any source normalization performed and is therefore not suitable for accurate
power or absolute field intensity measurement. For some resonant cavities, the absolute field intensities can be
obtained with a bit of extra work. Details can be found in Correcting field amplitudes 1805
Full Apodization
This example shows how to use start apodization to get the correct mode profile for a photonic crystal cavity
contained in usr_Tang_cavity.fsp. The simulation contains dipoles which are used to excite the modes of the
cavity and a frequency monitor is set up to get the mode profile of the A11 mode.
Let's begin by looking at the electric field as a function of time. In particular, the blue line in the figure below shows |
E|2 from the m2 time monitor. The transients at the beginning are due to all the energy injected by the dipoles which
is not coupled into the A11 mode. For times greater than 600fs the time signal decays exponentially due to the fact
that the majority of the energy left in the simulation is left in the cavity modes. The beating in the time signal is due
to the fact that there are two cavity modes which are excited whose resonance frequencies do not lie far apart.
In order to plot mode profile for the A11 from a frequency monitor we need to use start apodization to get rid of the
transients. The green line in the plots above shows the apodization window function used in the A11 monitor in the
simulation. Note that the center time of the window function is set to 1000fs in order to ensure that most of the
energy in the cavity is contained in the mode. The resulting mode profile is shown to the left below.
What happens if you do not use start apodization? The simulation contains a copy of the A11 monitor in which there
is no apodization. This monitor is called A11_no_apodization. The magnitude of the electric fields are plotted in the
image below to the right. In this image, you can see a superposition of the mode profile and the fields from the
transients. The effect of the transients is most apparent at location of the sources.
Note that there are two sources in the simulation. They are placed at the origin of simulation and at x = 500nm, y =
400nm. However, since symmetry was used in the simulation the source at x = 500nm, y = 400nm is mirrored
across the x and y axes. In the image below only three of the sources are pointed out (so that it is easier to see the
mode profile).
The end apodization does not have a visible affect in this simulation. To see that this claim is true, plot the electric
field intensity from the A11_end_apodization monitor in the simulation. This monitor is the same as the A11 monitor
except that it only uses end apodization, and the resultant |E|2 plot looks like the plot from the monitor without any
apodization.
Objective
This page describes the spectral averaging feature of Power/Profile monitors. This feature provides the most efficient
method for calculating the average response over a range of frequencies.
Solvers 101
FDTD
VarFDTD
Associated files
usr_spectral_averaging.fsp
usr_spectral_averaging.lsf
See also
Monitors and analysis groups 637
Frequency domain normalization 618
Introduction
Power monitors have three spectral averaging modes.
Standard Fourier Transform (SFT), or no averaging. This is the default option, which calculates the response
of the system at a particular set of frequencies.
Partial Spectral Average (PSA). This option calculates the average response over a range of frequencies
using a Lorentzian weighting function.
Total Spectral Average (TSA). This option calculates the average response over the entire source spectrum.
The options can be selected in the Data to record tab of the monitor properties, as shown below.
In this example, we will calculate the reflection of an Air-Si-Ag-Air multi-layer stack in FDTD Solutions (a
similar set up can be created in MODE Solutions' propagator). This is a useful test case because it has a
complicated reflection spectrum. A screenshot of the structure is shown below. Please note that for this
multilayer problem we have set the mesh refinement to "conformal variant 1" to take full advantage of the
conformal meshing for both the Si and the Ag layer.
Without the spectral averaging functions (PSA and TSA), the only way to calculate an average spectral
response is to measure the response at a large number of frequencies with the Standard Fourier Transform
(SFT) option, then manually calculate the averages by post processing. The problem with this technique is
that the simulation memory requirements can become impractically large when attempting to save a large
number of frequencies.
The following figure shows the memory requirements estimate of this simulation. Notice that the SFT monitor
measuring 500 frequency points requires 66% of the memory, while the PSA monitor requires only 7% and the
TSA requires 0.1%. In large 3D FDTD simulations, the memory savings from the PSA and TSA options can be
very important.
The vast majority of simulation analysis uses the SFT mode of operation.
The following figure shows the reflectance as a function of frequency at 500 points between 350-750 THz.
For more details about how the SFT is calculated, see the Frequency domain normalization section of the
Reference Guide.
The following figure shows the average reflectance as calculated by the PSA monitor (red) and the brute force
technique (green). The two techniques give very similar results, although there are some differences at the
minimum and maximum frequencies. The differences at these frequencies occur because the SFT data does
not contain any data beyond the minimum or maximum frequencies. One other very important difference is
that the brute force technique required 10 times more simulation memory.
The reflectance vs frequency as calculated by the SFT (blue) is shown for reference. The lorentzian weighting
function (10 THz wide, centered at 530 THz) is also shown for reference.
NOTE: Discrepancies between PSA and brute force technique at the min and max
frequencies
The brute force calculation does not include reflected power beyond the source limits (<350THz and
>750THz), while the TSA monitor includes all frequencies in the integrals. If the frequency range of the
standard fourier transform (SFT) monitor was increased, the agreement would improve.
The following figure shows the average reflectance as calculated by the TSA monitor (red) and the brute force
technique (green). The two techniques give very similar results. One very important difference is that the brute
force technique required 500 times more simulation memory.
Objective
In FDTD simulations, each field components is calculated at different spatial location within the mesh cell. This can
lead to confusion about where it is valid to put monitors, when they are close to other objects. For example, can a
time monitor be right at the edge of the simulation region, or does it need to be a few mesh points away from the
boundary?
Solvers 101
FDTD
VarFDTD
See also
Monitors and analysis groups 637
Structures
Structures do not interfere with monitors. It is ok to have a monitor at the interface of two structures, or have a
monitor cross through several objects. However, there are some types of calculations (like far field projections) that
require the monitor to be in a homogeneous material. In this case, the monitor should be at least one full mesh point
away from the structures.
Simulation region
The simulation boundary conditions are applied just past the inner edge of the simulation region boundary (the thick
orange line). It is ok to have a monitor exactly at the inner edge of the simulation region boundary. Any monitors that
extend beyond the inner edge will be automatically truncated at this edge.
Sources
Sources require a certain amount of space to inject the fields (2-3 mesh cells). Within this region, the fields are not
physically meaningful. Therefore, monitors should not be placed within this region. Sources graphically depict this
region with light grey shading. The following screenshot shows the injection region of the source, and two monitors.
The time monitor is too close the the source whereas the profile monitor is in a valid location.
Monitors
Monitors do not interfere with other monitors. It is ok to have multiple monitors in the same position.
Objective
The objective of this section is to explain the importance of simulation time for frequency domain monitors. If
simulations are not run long enough for the electromagnetic fields to decay, the frequency domain monitor data may
not be accurate. The ring resonator file is provided here for FDTD Solutions, for a similar setup in MODE Solutions,
see Ring resonator 2021 .
Solvers 101
FDTD
VarFDTD
Associated files
usr_ring.fsp
See also
Ring resonator (Getting Started) 2021
Apodization 660
Group delay analysis 2067
First, we will investigate the effect of simulation time on the frequency domain monitor data for the ring resonator
taken from the getting started examples. The ring resonator geometry is seen in the picture above. A mode source is
injected on the left hand side of the top waveguide. At certain wavelengths, the light builds up in intensity over
multiple round-trips through the closed loop due to constructive interference. Radiation at wavelengths that do not
coincide with the resonant wavelengths of the loop is attenuated by destructive interference. The resonant light can
be coupled out through the bottom waveguide.
In this example, we will look at the field intensity at the output of the bottom waveguide as a function of time and
frequency.
The first plot below shows the intensity of the Ez as a function of time. You can re-produce this plot by running
usr_ring.fsp and plotting the Ez intensity from the time-drop monitor. Note that the simulation runs to 1500fs.
The second plot shows the |Ez|^2 at the same point as a function of frequency. This plot can be re-produced by
plotting the Intensity vs frequency/wavelength of Ez from the drop monitor. The drop monitor is a frequency domain
power monitor.
The plots below can be created by setting the simulation time in usr_ring.fsp to 700fs, running the simulation
and plotting the same data as above. Note the oscillations (which are circled in red) in the frequency domain plot.
The oscillations are an artifact that arises because the simulation was not run long enough, as explained next.
Since FDTD is a time domain technique, the fields are calculated as a function of time. A Fourier transform gives the
fields as a function of frequency.
E( w ) = e -i wt E(t )dt
0
The frequency monitors calculate this integral up to the time when the simulation stops. This is the same as
assuming that the fields are 0 beyond the end of the simulation. Mathematically, this is equivalent to multiplying the
E(t) with a top hat function that starts at t = 0 and ends at the simulation time (Tsim).
E sim (t ) = E (t )[H (0) - H (Tsim )]
where H(t) is the Heaviside function. It is possible to obtain the effect of a finite simulation time on frequency monitor
data from basic properties of Fourier transforms. Below, we can see that E(w) calculated by the frequency monitor is
equal to the true E(w) convolved with a sinc function.
E sim ( w ) = e -i wt E(t )[H (0) - H (Tsim )]dt
0
= E true ( w ) * e -i wt [H (0) - H (Tsim )]dt
0
The Fourier transforms of the top hat functions corresponding to the above simulations are shown below. Notice that
the sinc function for the 1500fs simulation is much narrower. A narrow sinc function is preferable to a wide sinc
function because it is closer to the ideal response of a delta function.
In the image below, the blue line E(w) from the simulation that ran for 1500fs. 1500fs is long enough to give a narrow
sinc function that is a good approximation of a delta function for this simulation. Therefore, the result is very close to
the true response of the system.
The red line shows the result of taking E(w) from the 1500fs simulation and convolving it with the Fourier Transform of
the top hat function that has a width of 700fs. This result is very similar to the frequency domain plot from the
simulation that ran for 700fs.
To conclude, the oscillations in the frequency domain data are caused by early termination of the simulation. These
oscillations are the result of the convolution between the true response response of the system and the sinc function
that comes from stopping the simulation too early. The convolution causes frequency mixing that reduces the
accuracy of the simulation.
To avoid this problem, the simulation should be run long enough for the time domain fields to decay. This will ensure
accurate frequency domain results. For simulations that decay very slowly, monitor Apodization 660 can be used to
minimize these problems.
Doping 678
Generation 679
Mesh tab
Global Mesh Constraints
The global mesh settings section contains several settings:
MINIMUM EDGE LENGTH: The minimum length of an edge of a triangle (in 2D) or tetrahedron (3D) used in
the mesh.
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) or tetrahedron (3D) used in
the mesh.
Advanced Options
Mesh Options
TRIANGLE QUALITY: The quality of mesh triangle, defined the minimum angle used in the triangular mesh
cells. The higher the angle, the higher the quality of the triangle.
Geometry Options
GEOMETRY TOLERANCE (UM): When combining multiple objects to create a structure, the solver uses
this value to determine whether two points, lines, or surfaces can be combined.
GEOMETRY ALGORITHM: This provides an alternate algorithm to create the geometries which is more
efficient in 3D simulations.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
Transient tab
Transient Simulation Controls
The transient simulation controls section contains several settings:
MIN TIME STEP: The smallest time step that will be used in the transient simulation (used as the initial
time step)
MAX TIME STEP: The largest time step that will be used in the transient simulation.
ABS LTE LIMIT: If the absolute error is less than this value then the solver increases the time step.
REL LTE LIMIT: If the relative error is less than this value then the solver increases the time step.
Downsampling
DOWN SAMPLE MODE: The type of downsampling to use, None, for no downsampling, count, for
specifying the number of point to downsample at, and interval to specify the downsample step size.
The global source shutter will apply a shutter to all the optical generation (source) objects in the simulation.
SHUTTER MODE: disabled, for no shutter, step on and step off for step functions, pulse on and pulse off for
a pulse with on and off times. The time shutter function will be plotted as the option is chosen for ease of
use. The on and off times can then be specified.
SHUTTER TON: Sets the on time of the shutter.
SHUTTER TOFF: Sets the off time of the shutter.
SHUTTER TSLEW: Sets a slew in the stepping of the shutter. This feature is useful in helping the solver to
converge where a sharp step in the shutter tend to makes the solver diverge.
SHUTTER SLEW FUNCTION: linear for a linear transition between off and on states, log for an exponential
change between the off and on states.
SHUTTER SLEW CUTOFF: The shutter uses the logarithmic function to step from this value to 1 (for turning
on) and from 1 to this value (for turning off). The stepping from zero to the slew cutoff value (and back) is
abrupt (within one time step).
ILLUMINATION POWER SCALING: This option can be used to scale the amplitude of the source. By default
the value is set to '1' which means no scaling.
Results
This tab contains a list of all the spatial results that can be recorded throughout the simulation. One can pick
to enable or disable one or more of the results to save memory as needed. The tab also contains basic
information about the available results such as their units and descriptions. The following table lists the
results that are available in the simulation region after the simulation has been run:
charge
Jn A/cm2 Electron current
density
doping
NA 1/cm3 Acceptor doping
density
ND 1/cm3 Donor doping density
Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used .
(drift-diffusion equations). The solutions to these equations must be self-consistent, i.e. the charge calculated
from the drift-diffusion equations satisfies the Poisson equation, and vice versa. Two common approaches are
used to solve this system of equations: Gummels method and Newtons method.
GUMMEL: decouples the charge problem from the electrostatic potential problem at each step. As both of
these equations are non-linear, they must in turn be solved using an iterative or direct method. First, the
electrostatic potential is solved holding the charge fixed. Next, this solution to the electrostatic potential is
used as a fixed input to the charge equations, and those are updated. This process continues until the
solution is self-consistent. Gummels method is stable and efficient for devices where the currents are small
and the variations in the charge distribution are not too extreme (meeting the criteria that the charge and
electrostatic potential are weakly coupled problems). Gummels method should not be used for transient
simulations or simulations involving high levels of charge injection.
NEWTON: the classic approach to solve a system of non-linear equations. In this method, the electrostatic
potential and charge are solved for simultaneously, and all are updated at each step. Newtons method
requires a good initial guess in order that it will converge, and can be more difficult to converge than
Gummels method. However, Newtons method can handle devices where the variations in charge density
are large. Newtons method must be used for transient simulations.
DC UPDATE MODE: self consistent to run both drift-diffusion and Poisson solvers, electrostatic to run
Poisson's solver only, and charge to run drift-diffusion solver only.
FERMI STATISTICS:
Electrons and holes are fermions, and therefore obey Fermi-Dirac statistics. At a finite temperature, the
energy distribution of the electrons is described by the Fermi-Dirac function,
where k is the Boltzmann constant, T is the temperature, and EF is the Fermi energy. When E-EF >>kT, the
Fermi-Dirac distribution can be approximated by the Boltzmann distribution,
Often in semiconductor devices, when the net doping density is sufficiently low (non-degenerate), the Fermi
energy is located within the band gap (carriers are forbidden from having energies within the range of the band
gap), far from the band edges. When the condition E-EF >>kT is satisfied (typically for |E-EF |> 3kT), the Fermi-
Dirac distribution can be replaced with the Boltzmann distribution.
The carrier density is calculated from the integrated product of the Fermi-Dirac distribution (probability of
occupancy) and the density of states (available states to occupy). For electrons, the equation is
When the Fermi-Dirac distribution is used, this integral does not have an analytic solution, and must be
approximated numerically. However, for non-degenerate conditions, the Fermi-Dirac distribution is
approximated by the Boltzmann distribution, and the preceding equation reduces to
describing the electron density at equilibrium (Nc is the effective density of states and is a constant related to
the specific properties of the semiconductor).
MULTITHREADING: If enabled, the user can choose to divide up and run the simulation over multiple threads
Convergence Controls
The following applies to both sections on Poisson Solver Controls and Drift-Diffusion Solver Controls
USE DEFAULTS: checked by default, will use an iteration limit of 40, absolute tolerance of 1e-06 volts and a
maximum update value of 5 volts.
ITERATION LIMIT: Takes a value between 1 and 10000. This limits the number of iterations of the Poisson or
drift-diffusion solver that may be run.
ABSOLUTE TOLERANCE: For a calculation to be considered converged, this determines the maximum
absolute change between iterations that can exist. For the Poisson solver, the step converges when
V k +1 - V k <d
where is the tolerance and V is the electrostatic potential. For the drift-diffusion solver, both the electron and
hole quasi-Fermi levels must converge:
k +1 k
E Fn - E Fn <d
k +1 k
E Fp - E Fp <d
MAXIMUM UPDATE: To help the calculation converge, the maximum change that will be applied to estimate
the solution at the next step can be clamped. This value is in multiples of the thermal voltage (kT/q).
Initialization
INITIALIZATION: disabled by default, but can be enabled if the start bias in a voltage sweep is far from the
solver's initial guess. More steps will help bring the initial guess closer to the start value but will cause the
simulation to take longer.
GDSII 480
This file format is commonly used to store 2-dimensional geometric data.
The mesh constraint region is used to override the default mesh element area in some part of the simulation region.
Normally the meshing parameters are set in the Simulation region. However, if some specific meshing conditions are
required in part of the simulation region, a mesh constraint region can be specified.
Note that only one simulation region per simulation is supported, but multiple mesh constraint regions may be used.
Mesh constraints
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) or tetrahedron (in 3D) used
in the mesh.
5.4.4.4 Doping
The following types of Doping objects are available to be superimposed on the structure in DEVICE:
The constant doping object allows the user to define a region with constant doping. The region geometry as well as
parameters can be entered.
The diffusion region object allows the user to define a region with a dopant concentration profile. The region geometry
as well as parameters can be entered.
The Import doping object allows the import of a user defined spatial doping profile. The location of the object is
specified via the edit window.
Dopant
DOPANT TYPE: The dopant type can be n-type (donors) or p-type (acceptors).
CONCENTRATION: The concentration of the dopant can be entered.
Diffusion parameters
DOPANT TYPE: The dopant type can be n-type (donors) or p-type (acceptors).
SURFACE CONCENTRATION: The concentration of the dopant at the surface (the peak concentration) can
be entered.
FACE: The side of the region where the surface concentration is defined (i.e. where the diffusion source
originates). For example, "upper y" refers to the face defined by "y max".
JUNCTION WIDTH: The width of the doping profile from surface (peak) concentration to reference
concentration at the edge of the diffusion region.
DIFFUSION FUNCTION: The doping concentration profile, can be gaussian or the complementary error
function (erfc).
REFERENCE CONCENTRATION: The doping concentration on the exterior of the box (excluding the
originating face).
Imported data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
data should be in units of /m3.
DOPANT TYPE: The dopant type can be n-type (donors) or p-type (acceptors).
5.4.4.5 Source
The following types of Optical generation (source) objects are available to be superimposed on the structure in
DEVICE:
The bulk generation object allows the user to define a region of bulk optical generation. The region geometry as well
as the parameters below can be specified:
The Import generation object allows the import of a user defined optical generation region. The location of the object
is specified via the edit window.
The generation (source) - delta object allows the import of a delta function optical generation.
The Temperature (CHARGE) object allows the import of a user defined temperature T(x,y,z) region.
The 'Import Heat Source' object allows the import of a user defined heat source region.
The bulk generation (source) object allows the user to define a region of bulk optical generation. The region
geometry as well as the parameters below can be specified:
A plot of the generation rate versus position will be generated on the bottom right corner of the edit window.
The Import generation (source) object allows the import of a user defined optical generation region. The location
of the object is specified via the edit window.
Imported data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
optical generation rate should be in units of m-3s -1.
The generation (source) - delta object allows the import of a delta function optical generation. The location of the
object is specified via the edit window. This can be used in measuring the impulse response of the system and the
IQE of photosensitive devices. For step by step instructions on how to use this objects for measuring IQE of a
CMOS image sensor, please visit here 2585 .
Source properties
Source type: The source type can either be specified in units of electron hole pair (ehp) generation rate ( 1/
cm3-s) or it can be specified in units of electron-hole pair (ehp) current (1/s)
The Temperature (CHARGE) object allows the import of a user defined temperature T(x,y,z) region. The location
of the object is specified via the edit window.
Imported data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
temperature should be in units of K.
NOTE: This simulation object will only get applied when performing non-isothermal simulations with the CHARGE
solver.
The 'Import Heat Source' object allows the import of a user defined heat source region. The location of the
object is specified via the edit window. The dimension of the object is specified by the user defined data.
Data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
data should be in W/m3.
NOTE: This simulation object will only get applied when performing coupled (electro-thermal) simulations with the
CHARGE solver.
Charge monitor records electron and hole densities in the monitor space. It can also integrate the total charge within
the monitor surface/volume.
Electric field monitor records the electric field within the monitor region as well as the electrostatic potential. Using
this information, it can also calculate the total charge within the monitor surface/volume.
Bandstructure monitor is a 1D monitor that calculates the equilibrium bandstructure of adjacent materials and
returns the conduction, valence, intrinsic and fermi level energies in units of ev.
The current flux monitor will calculate the total flux of the current density through a line, area or volume of the
simulation region. In 2D, the currents are in units of A/m and in 3D they are in units of A.
The temperature monitor records the temperature profile within the monitor region. The unit of the recorded data is
Kelvin.
Charge monitor records electron and hole densities in the monitor space. It can also integrate the total charge
within the monitor surface/volume.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.
Results returned
Results
CHARGE: Electron and hole densities in the monitor space is returned as a function of emitter voltage and
base voltage. Area and ID are also returned, where ID is a number between 1 and N, with N being a number
of different materials in the set up.
Electric field monitor records the electric field within the monitor region as well as the electrostatic potential.
Using this information, it can also calculate the total charge within the monitor surface/volume.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.
Results returned
Results
ELECTROSTATICS: Electric field is returned as a function of emitter voltage and base voltage. Area and the
ID are also returned, where ID is a number between 1 and N, with N being a number of different materials in
the set up.
Bandstructure monitor is a 1D monitor that calculates the equilibrium bandstructure of adjacent materials and
returns the conduction, valence, intrinsic and fermi level energies in units of ev.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.
Results returned
Results
BANDSTRUCTURE: The conduction, valence, intrinsic and fermi level energies in units of ev are returned as
a function of position, emitter voltage and base voltage.
The current flux monitor will calculate the total flux of the current density through a line, area or volume of the
simulation region. In 2D, the currents are in units of A/m and in 3D they are in units of A.
I n , p = J n , p nd s
W
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the CHARGE
solver as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.
Results returned
Results
SURFACEFLUX: Current is returned as a function of emitter voltage and base voltage. In 2D, the currents
are in units of A/m and in 3D they are in units of A.
Temperature monitor records the temperature profile in the monitor space. The unit of the recorded data is K.
SAVE DATA: It saves the data to a .mat file, users need to specify a file name and location.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the HEAT solver
as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.
Results returned
Results
TEMPERATURE: Spatial temperature profile is returned. ID is also returned, where ID is a number between
1 and N, with N being a number of different materials in the set up.
NOTE: This monitor will only record data when performing non-isothermal or coupled (electro-thermal)
simulations with the CHARGE solver.
The add/delete/edit buttons can be used to add a new contact, delete a contact or edit the properties of a contact
respectively. DEVICE offers three types of boundary conditions, however, only the 'electrical contact' is applicable to
the 'CHARGE' solver.
The name of the contact can be typed in the Name column, the geometry of the contact can be picked from the edit
properties window.
GEOMETRY: The geometry option defines where the boundary condition can be applied. There is only one
available option, 'solid'. The pull-down menu for the solid option allows the user to pick a geometry (or structure
group) from the model tree where the boundary condition will be applied.
SOLVER MODE: The mode of the solver is consistent with the mode picked in the simulation region and can be set
to steady state or transient.
In the steady state mode, the bias assigned to each contact can either be fixed at a value or swept over a range of
DC values. In the sweep case, the start and stop biases as well as interval and the number of points in the sweep
can be specified. Alternatively, the user can manually enter a range of values for the voltage to sweep over. Series
and shunt resistors can also be added to the voltage source to model more complicated circuits.
TRANSIENT MODE:
In the transient mode, the bias assigned to each contact can either be fixed at a value ( this is the same as the fixed
bias in DC mode) or transient, swept over a range of time dependant values. In the transient case, the values for
each voltage point as well as the time point can be entered in a table. Series and shunt resistors and capacitors can
also be added to the voltage source to model more complicated circuits. The resistance and capacitance for these
elements can also be specified as a function of time. If only one point is specified in the table, then a constant value
is assumed for that element. The values for the voltage Rs and Cs will be linearly interpolated in time for
consistency.
Force Ohmic: The force ohmic option is enabled by default. When enabled, it creates an ohmic contact by
matching the metals work-function with the semiconductors one. If disabled then a Schottky contact is formed
based on the difference in their work-functions.
Apply AC Small Signal: The SSAC is set to NONE by default. When enabled it creates an small signal AC to
the bias voltage.
ALL - SSAC will be applied to all bias voltage
LAST - SSAC will only be applied to the last bias voltage
Contact Temperature: The temperature of a contact can be set. This is only effective in the Coupled
Temperature Dependence.
Mesh tab
Global Mesh Constraints
The global mesh settings section contains several settings:
MINIMUM EDGE LENGTH: The minimum length of an edge of a triangle (in 2D) used in the mesh.
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) used in the mesh.
Advanced Options
Mesh Options
TRIANGLE QUALITY: The quality of mesh triangle, defined the minimum angle used in the triangular mesh
cells. The higher the angle, the higher the quality of the triangle.
Geometry Options
GEOMETRY TOLERANCE (UM): When combining multiple objects to create a structure, the solver uses
this value to determine whether two points, lines, or surfaces can be combined.
GEOMETRY ALGORITHM: This provides an alternate algorithm to create the geometries which is more
efficient in 3D simulations
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
Transient tab
Transient Simulation Controls
The transient simulation controls section contains several settings:
MIN TIME STEP: The smallest time step that will be used in the transient simulation (used as the initial
time step)
MAX TIME STEP: The largest time step that will be used in the transient simulation.
ABS LTE LIMIT: If the absolute error is less than this value then the solver increases the time step.
REL LTE LIMIT: If the relative error is less than this value then the solver increases the time step.
Downsampling
DOWN SAMPLE MODE: The type of downsampling to use, None, for no downsampling, count, for
specifying the number of point to downsample at, and interval to specify the downsample step size.
The global Source shutter will apply a shutter to all the heat source objects in the simulation.
SHUTTER MODE: disabled, for no shutter, step on and step off for step functions, pulse on and pulse off for
a pulse with on and off times. The time shutter function will be plotted as the option is chosen for ease of
use. The on and off times can then be specified.
SHUTTER TON: Sets the on time of the shutter.
SHUTTER TOFF: Sets the off time of the shutter.
SHUTTER TSLEW: Sets a slew in the stepping of the shutter. This feature is useful in helping the solver to
converge where a sharp step in the shutter tend to makes the solver diverge.
SHUTTER SLEW FUNCTION: linear for a linear transition between off and on states, log for an exponential
change between the off and on states.
SHUTTER SLEW CUTOFF: The shutter uses the logarithmic function to step from this value to 1 (for turning
on) and from 1 to this value (for turning off). The stepping from zero to the slew cutoff value (and back) is
abrupt (within one time step).
ILLUMINATION POWER SCALING: This option can be used to scale the amplitude of the source. By default
the value is set to '1' which means no scaling.
Results
This tab contains a list of all the spatial results that can be recorded throughout the simulation. One can pick
to enable or disable one or more of the results to save memory as needed. The tab also contains basic
information about the available results such as their units and descriptions. The following table lists the
results that are available in the simulation region after the simulation has been run:
Ca Na Un Description
teg me it
or
y
elec V V Electrostatic potential
tros
tati
c
C J/ Specific heat
kg-
K
Q W/ Heat
m3
ther
mal T K Temperature
kap W/ Thermal conductivity
pa m-K
rho kg/ Mass density
m3
Advanced tab
WARNING: This tab includes options which should only be changed if you are
quite familiar with the meshing algorithm and techniques used.
Iteration Controls
USE DEFAULTS: checked by default, will use an iteration limit of 40, absolute tolerance of 1e-06 volts and a
maximum update value of 5 volts.
ITERATION LIMIT: Takes a value between 1 and 10000. This limits the number of iterations of the Poisson or
drift-diffusion solver that may be run.
ABSOLUTE TOLERANCE: For a calculation to be considered converged, this determines the maximum
absolute change between iterations that can exist. For the Poisson solver, the step converges when
V k +1 - V k <d
where is the tolerance and V is the electrostatic potential. For the drift-diffusion solver, both the electron and
hole quasi-Fermi levels must converge:
k +1 k
E Fn - E Fn <d
k +1 k
E Fp - E Fp <d
MAXIMUM UPDATE: To help the calculation converge, the maximum change that will be applied to estimate
the (thermal) solution at the next step can be clamped. This value is in units of Kelvin.
MAX VOLTAGE UPDATE: To help the calculation converge, the maximum change that will be applied to
estimate the (electrostatic) solution at the next step can be clamped. This value is in multiples of the thermal
potential (kT/q).
GDSII 480
This file format is commonly used to store 2-dimensional geometric data.
The mesh constraint region is used to override the default mesh element area in some part of the simulation region.
Normally the meshing parameters are set in the Simulation region. However, if some specific meshing conditions are
required in part of the simulation region, a mesh constraint region can be specified.
Note that only one simulation region per simulation is supported, but multiple mesh constraint regions may be used.
Mesh constraints
MAXIMUM EDGE LENGTH: The maximum length of an edge of a triangle (in 2D) or tetrahedron (in 3D) used
in the mesh.
The Import Heat Source object allows the import of a user defined heat generation region. The location of the object
is specified via the edit window.
The Uniform Heat Source object allows the user to define a region of uniform heat generation. The region geometry
as well as the parameters below can be specified.
The 'Import Heat Source' object allows the import of a user defined heat source region. The location of the
object is specified via the edit window. The dimension of the object is specified by the user defined data.
Data
IMPORT NEW DATA: Opens file browser to select data file. The file must be in Matlab format (.mat) and
can contain a rectangular or unstructured (finite element) datasets. Once the file is loaded, the available
datasets can be viewed and the appropriate dataset and attribute can be selected. The unit for the imported
data should be in W/m3.
The 'Uniform Heat Source' object allows the user to define a region of uniform heat generation. The region
geometry as well as the parameters below can be specified:
Source parameter
EQUIVALENT LENGTH (um): Only applicable to 2D sources. The equivalent length defines the length of
the source in the third dimension. In 2D simulation, the input power for the source has a unit of W/m and
this is achieved by dividing the "total power" value (W) with the length in the third dimension.
USE SOLVER NORM LENGTH: Only applicable to 2D sources. Enabling this option overrides the value of
the "equivalent length" of the source with the "norm length" of the solver region.
TOTAL POWER (W): This is the total power injected by the source in Watts. In 3D, the total volume of the
source introduces this amount of heat into the simulation region. In 2D, the input power (in W) is divided by
the length of the source in the third dimension and unit for the applied input power becomes W/m.
The power flow monitor will calculate the total heat flux through a line, area or volume of the simulation region as well
as the temperature distribution. In 2D, the heat flux has the unit of W/m and in 3D the unit is W.
The temperature monitor records the temperature profile within the monitor region. The unit of the recorded data is
Kelvin.
Power flow monitor records the heat flux through a line, area or volume of the simulation region. The data has
the unit of W/m in 2D and W in 3D.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the HEAT solver
as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.
Results returned
Results
HEATFLUX: The total heat flux through a line, area or volume of the simulation region is reported. In 2D, the
heat flux has the unit of W/m and in 3D the unit is W.
TEMPERATURE: The temperature profile along the line, surface, or volume is reported in units of Kelvin.
Temperature monitor records the temperature profile in the monitor space. The unit of the recorded data is K.
SAVE DATA: It saves the data to a .mat file, users need to specify a file name and location.
Geometry tab
X, Y, Z: The center position of the simulation region
X MIN, X MAX: X min, X max position
Y MIN, Y MAX: Y min, Y max position
Z MIN, Z MAX: Z min, Z max position
X SPAN, Y SPAN, Z SPAN: X, Y, Z span of the simulation region
USE RELATIVE COORDINATES: If this is enabled then the monitor will use the center or the HEAT solver
as its origin (reference). If disabled then it will use the absolute center (0,0,0) as its origin.
Results returned
Results
TEMPERATURE: Spatial temperature profile is returned. ID is also returned, where ID is a number between
1 and N, with N being a number of different materials in the set up.
The add/delete/edit buttons can be used to add a new contact, delete a contact or edit the properties of a contact
respectively. DEVICE offers three types of boundary conditions, however, only the 'Voltage Boundary' and the
'Thermal Boundary' are applicable to the 'HEAT' solver.
The name of the contact can be typed in the Name column, the geometry of the contact can be picked from the edit
properties window.
Voltage Boundary
NAME: Name of the BC
GEOMETRY: The geometry option defines where the boundary condition can be applied. There are three
available options,
SOLID: The boundary condition is applied to the geometry (or structure group) selected within the pull-down
menu of the 'solid' option.
SOLID:SOLVER BOUNDARY: The boundary condition is applied to the intersection of the selected solver
boundary and solid.
SOLVER BOUNDARY: The boundary condition is applied to the selected solver boundary. Available options
are +/-x, +/-y, and +/-z.
Steady state
BC MODE: can be a 'Single' voltage or a voltage 'Sweep'.
Single
VOLTAGE: Single voltage value in units of Volt.
Sweep
RANGE: A range of values can be defined by the START, STOP, and INTERVAL or NUMBER OF POINTS.
VALUE: A set of voltage values can be defined by the user in a table
Transient
BC MODE: Can be a can be a 'Single' constant voltage or a time-dependent 'Transient' voltage.
Single
VOLTAGE: Constant voltage value in Volt.
Transient
BOUNDARY CONDITION PROPERTIES: Voltage as a function of time can be defined by the user in a
table.
Thermal Boundary
NAME: Name of the BC
GEOMETRY: The geometry option defines where the boundary condition can be applied. There are three
available options,
SOLID: The boundary condition is applied to the geometry (or structure group) selected within the pull-down
menu of the 'solid' option.
SOLID:SOLVER BOUNDARY: The boundary condition is applied to the intersection of the selected solver
boundary and solid.
SOLVER BOUNDARY: The boundary condition is applied to the selected solver boundary. Available options
are +/-x, +/-y, and +/-z.
Steady state
BC MODE: Can be a 'Single' value or a parameter 'Sweep'.
Single
Model Parameters
Insulating: Zero heat flow at the N/A
boundary.
Fixed temperature: Fixed temperature temperature: Temperature at the boundary in Kelvin.
at the boundary. thermal impedance (optional): Applies a thermal insulance at
the boundary with units of m2-K/W.
Power: Absolute power (heat) flow at power: A positive value indicates heating (heat going into the
the boundary in units of W. simulation volume) and a negative value indicates cooling (heat
being removed from the simulation volume).
Heat Flux: Heat flux at the boundary in heat flux: A positive value indicates heating (heat going into
units of W/m2. the simulation volume) and a negative value indicates cooling
(heat being removed from the simulation volume).
Convection: Convective boundary ambient temperature: The external temperature of the fluid.
condition. h convection: Convective heat transfer coefficient in units of W/
m2-K.
Radiation: Radiative boundary ambient temperature: Temperature of surrounding environment.
condition. emissivity: 1 for black-body and <1 for gray-body radiation.
q = A es (Tsurf - Tenv )
4
Sweep
SOURCE TYPE: User can sweep over temperature at the boundary or power flow through the boundary.
RANGE: A range of values (temperature or power) can be defined by the START, STOP, and INTERVAL or
NUMBER OF POINTS.
VALUE: A set of values (temperature or power) can be defined by the user in a table.
Transient
BC MODE: Can be a can be a 'Single' constant value or a time-dependent 'Transient' value.
Single
Same options available in the steady state.
Transient
SOURCE TYPE: Temperature or power flow at the boundary to sweep.
BOUNDARY CONDITION PROPERTIES: Temperature (or power) as a function of time can be defined by
the user in a table.
Descriptio Screenshot
n
Runs the selected sweep, optimization and yield analysis with the resources currently set in the resources
manager.
The Animate function allows you to view the structures that will be simulated in a parameter sweep or optimization in
the CAD before you run the project:
Associate files
sweep_AR_coating_example.fsp
See also
Sweep scripting commands 703
Running sweeps without the CAD 710
Editing parameters
Once the sweep object is open, add a
parameter and browse the parameter
pulldown menu. Select the "thickness"
property of the AR structure.
Recording results
Add results to record, the recorded
results will be available when the
sweep is done. Select the power
transmission 'T' from the Reflection and
Transmission monitors, as shown here.
Associate files
sweep_AR_coating_example.fsp
sweep_AR_coating_example_script.ls
f
See also
Optimization scripting commands 722
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644
To generate and run the sweep using script commands, user can open the
sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file sweep_AR_coating_example_script.lsf.
When the sweep is superficially generated, the parameters can then be defined and added to it. The following
commands define the name, type, range and the path of the parameter "thickness".
This command adds the parameter "thickness" to the sweep "thickness_sweep_script". When the parameter is
successfully added, the sweep will appear in the "Optimizations and Sweeps" tab as shown below.
[click to enlarge]
The next step is to add the results that we want to measure into the sweep. The commands listed below define
and add the results "R" and "T" to the sweep as shown in the sweep editing window below. After this step, the
sweep is well defined and ready to run.
# define results
result_1 = struct;
result_1.Name = "R";
result_1.Result = "::model::R::T";
result_2 = struct;
result_2.Name = "T";
result_2.Result = "::model::T::T";
[click to enlarge]
[click to enlarge]
The following figures are the plots of the results R and T v.s. thickness, which show same results as in the
section Parameter sweeps.
Associate files
sweep_nested_example.fsp
See also
Run a parameter sweep 699
A nested parameter sweep will be created as a result. Open the edit window for the inner sweep object,
change the name to "theta", add a parameter "source_angle" and browse the parameter pulldown menu to
select the "angle" property of the source. Set the Start/Stop values to sweep from 40 to 60 degrees, and the
Number of points 20. Finally, add a result "R" from the reflection analysis group (see Creating parameter
sweep project 699 for step-by-step details). The edit window should look like the screenshot below.
In the edit window for the outer sweep, change the name to "wavelength", add a parameter "lambda" and
browse the parameter pulldown menu to select the "wavelength" property of the source. Set the Start/Stop
values to sweep from 0.4 to 0.6 microns in 3 points. Add a result "R" and select R from the Result
pulldowndown menu, which contains all the results in the inner sweep that are already defined.
plot(reflection.source_angle, pinch(R,3,1),
pinch(R,3,2),
pinch(R,3,3),
"angle of incidence (degrees)","Reflection","Reflection
legend('lambda = ' + num2str(lambda(1)), 'lambda = ' + num2str(lambda(2)), 'lambda = '
We can see that shorter wavelengths correspond to larger incident angles where minimum reflection is
obtained.
1. Adjust model parameters and save a set of fsp files (a fsp file for each parameter value).
2. Run all the simulations
3. Load the simulation files and extract the required information
Advantages:
The individual simulations can be sent to an external cluster or other workstations
Disadvantages:
It is not quite as simple to run all the simulations
See also
Run a parameter sweep 699
Running Simulations
Step 1: Adjust model parameters and save a new fsp file for each
parameter value
After setting up a parameter sweep as described at Parameter sweeps 699 , rather than running the parameter
sweep directly, simply choose Save to files, as shown below.
This will create a directory called with the same name as the original fsp file, in this case,
usr_optimization_example. Inside this directory you will find 10 fsp file, called "test_sweep_1.fsp"
to "test_sweep_10.fsp". Each file corresponds to a particular value of the parameters and there are 10
files because we chose 10 different values for our sweep parameter.
This will reload all the results from the fsp files, as if they had been run on the local machine by pressing the
Run button. You can then proceed with the analysis of the results as shown in Parameter sweeps 699 .
Another advantage of using this technique is that the multiple simulations in a sweep can be distributed to yield
faster results for larger simulation files.
Solver 101
FDE
Associate files
sweep_frequency_dispersion.lms
sweep_frequency_dispersion.lsf
See also
Run a parameter sweep 699
FDE - Frequency Analysis 758
Open the usr_frequency.lms file and in the Optimization and Sweeps window, right click on the object named
"sweep" and click "Edit". You will see that the sweep object has been set up to sweep the same simulation over a
frequency range of 100-200 THz.
Open the usr_frequency.lsf script within the project file. Notice that script takes the same inputs as the frequency
sweep in the graphical interface. Notice that the user is supposed to make sure that the start and stop frequencies
as well as the number of frequency values in that range should match between the set up sweep, and the inputs of
the script.
If the track_selected_mode variable is set to 1, the sweep will run the simulation for the first frequency and set the
desired mode as a reference dcard. Then as the frequency is swept the overlap between the selected dcard and the
corresponding mode at the new frequency is used to track that mode. The difference here with the frequency
analysis of the user interface is that the sweep is completed initially and the figures of merit are calculated
afterwards.
If the track_selected_mode variable is set to 0, the sweep will track all the modes and plot the results on the same
graph. These modes are solved for according to the input variables like number of test modes, and effective index to
solve around, set at the top of the script.
Since the sweep automatically creates a folder with the name {filename}_sweep, when using your file, make sure the
name of the folder is set right the script where the path is respecified. Note that the working directory is changed to
access the sweep files in both cases and so you would need to switch the directory back to the original one before
you run another sweep.
5.5.2 Optimization
Objective
This page describes how to optimize a design using the graphical user interface. Optimizing the design is done
using an advanced optimization algorithm, which requires running a large number of simulations. This can be much
more efficient than running a parameter sweep, particularly if there is more than one parameter to optimize. For
details in the optimization algorithm used, please see Particle Swarm Optimization 727 . We will demonstrate how to
use the optimization feature with a simple example. We will find the optimum thickness of an anti-reflection (AR)
layer on silicon. The optimum thickness is the thickness that gives the minimum reflection at the wavelength of
operation, in this case 500 nm. For additional information, see the Optimization and sweeps video.
Associate files
sweep_AR_coating_example.fsp
See also
Optimization scripting commands 722
Computation Resources
Run a parameter sweep 699
Particle Swarm Optimization 727
Optimization properties
NAME: Parameter sweep name.
Setup tab
Optimization and configuration
ALGORITHM - PARTICLE SWARM: Use the Particle Swarm 727 optimization method.
ALGORITHM - USER DEFINED: Create your own User Defined 727 optimization method.
TYPE: Specify if the result should be minimized or maximized.
MAXIMUM GENERATIONS: The maximum number of generations to run. The total number of simulations
to run is the product of Max generations and Generation size.
GENERATION SIZE: The number of simulations per generation.
RESET RANDOM GENERATOR: Enabling this option will reset the random number generator with a fixed
seed. This ensures the same set of random numbers are used for each run of the optimization, which leads
to consistent results between runs.
TOLERANCE: Set a tolerance to stop the optimization early (ie. run less than the maximum number of
generations. The tolerance algorithm is:
- if =0: Always run the specified number of generations.
- if >0: Always run the first 10% of generations. After that, stop the optimization if
bestResult (lastGener ation) - bestResult (10% of generation s ago)
tolerance
bestResult (lastGener ation)
. Basically, this
stops the optimization when the bestResult stops changing.
Parameters
PARAMETER: Property to optimize.
TYPE: Used to specify the type of units for the selected property (eg. length, time).
MIN/MAX: The min/max value of the range of interest.
ADD: Add another line to the parameters table.
REMOVE: Remove a line from the parameters table.
Figure of merit
Multiple results can be collected, but one must be selected as the quantity to optimize. This result must
be a single scalar number. Other results can be matrices.
OPTIMIZE: Select a specific result to optimize (i.e. minimize or maximize this value). The selected result
must be a single scalar value.
NAME: A user specified name for the result. Will appear in the results dataset.
RESULT: Result to collect.
ADD: Add another line to the Figure of merit table.
REMOVE: Remove a line from the Figure of merit table.
SELECT TO OPTIMIZE: Make selected result the one to optimize.
Advanced tab
User defined algorithm tab
FIRST GENERATION SCRIPT: The First generation script can be used to define the initial parameter values
for the initial generation of simulations. This script is not required if you want random starting values.
NEXT GENERATION SCRIPT: This script is used to calculate the parameter values for the next generation,
based on results from previous generations.
TEST: Test the First and Next generation scripts without running any simulations.
SCRIPT OUTPUT: Output messages from the scripts.
Figure of merit script
This tab allows users to calculate a custom figure of merit (FOM), rather than using a value obtained
directly from a monitor or analysis object.
USE FIGURE OF MERIT SCRIPT: Select this option to enable this feature.
FIGURE OF MERIT SCRIPT: This script allows results selected in the 'Figure of merit' section of the
SETUP tab to be post-processed into a final FOM that will be optimized. The script input arguments are
the results selected in the 'Figure of merit' section of the SETUP tab. The script must calculate a variable
named 'fom', which will be used as the FOM to optimize. This variable must be a single, scalar number.
Note:
Optimizat
ions with
nested
sweeps
It may be
necessary
to use a
nested
parameter
sweep
within an
optimization
task. For
example, to
optimize a
design for
unpolarized
light, it is
necessary
to sweep
over both
polarization
s at each
point in the
optimization
task. For an
example,
see the
Nested
sweeps 707
page.
Once the
optimizer
object is
open, add a
parameter
and browse
the parameter
pulldown
menu. Select
the
"thickness"
property of
the AR
structure.
Next, choose
the Type to
be length and
set the min
and max
values to 10
nm and 150
nm
respectively.
The final
result should
look like the
screenshot
here.
Add a figure
of merit.
Select the
power
transmission
'T' from the
Reflection
monitor (R),
as shown
here.
Go to the
Setup tab and
choose the
Particle
Swarm
algorithm.
Choose to
Minimize the
figure of merit.
Set the
Maximum
generations to
20 and the
Generation
size to 10
with a
Tolerance of
0. The final
settings edit optimization window
should look
like the
screenshot
here.
Click OK to
accept all
settings, and
go back to
the main
Optimizations
and Sweeps
window. For
more
information of
the SETUP
and
ADVANCED
tab, please
see here 727 .
Optimization Status
Associate files
sweep_AR_coating_exampl
e.fsp
optimization_AR_coating
_example_script.lsf
See also
Sweep scripting commands 703
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and
optimization data 1644
To generate and run the optimization analysis using script commands, user can open the
sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file optimization_AR_coating_example_script.lsf.
After the optimization is superficially generated, the parameters can then be defined and added to it. The
following commands define the path, type, optimization window and unit of the parameter. And then add this
parameter to the optimization "thickness_optimization_script".
Then this optimization analysis will appear in the "Optimizations and Sweeps" tab as shown below.
[click to enlarge]
The next step is to add the results that we want to optimize into the optimization. The commands listed below
define and add the results "R" and "T" to the optimization object as shown in the optimization editing window
below.
result_2 = struct;
result_2.Name = "T";
result_2.Result = "::model::T::T";
result_2.Optimize = false;
Please note that, only the result R (reflection) is optimized to be minimum in this example. The optimization
"thickness_optimization_script" is now completely defined as shown below.
[click to enlarge]
# run optimization
runsweep("thickness_optimization_script");
[click to enlarge]
Close the "Optimization Status" window and user can find there are several results stored in the optimization
as indicated below.
[click to enlarge]
And the reflection optimization trend is plotted as in the figure shown below. We can see that the optimization
result and the sweep result from the previous section show great agreement with each other and the optimized
thickness to get a minimum reflection is around 60 nm.
Associate files
optimization_user_defined.fsp
optimization_steepest_descent.fsp
See also
Optimization 716
Particle Swarm Optimization 727
The first example shows how to implement a simple 'shrinking box' optimization algorithm, while the second shows
a steepest descent implementation.
In Eq. (1), t is the iteration counter; c 1 and c 2 are the cognitive and social factors, respectively; is called the inertial
weight; and 1 and 2 are random number between 0 and 1. Lumerical's PSO implementation uses default values of
c 1, c 2 and that have shown to converge well in many test optimization problems for photonic design problems. A
detailed description of the algorithm and the difference coefficients can be found in Refs. [1] or [2].
The movie below shows how the particle positions and velocities change as a function of iteration when using the
PSO algorithm to find the maximum of a sinc function in 2D space.
1. J. Robinson and Y. Rahmat-Samii, "Particle swarm optimization in Electromagnetics," IEEE Trans. Antennas
and Propagat. 52, pp.397 - 407 (2004).
2. K. E. Parsopoulo and M N. Vrahatis, Particle swarm optimization and intelligence : advances and applications,
Information Science Reference, 2010.
3. J. Pond and M. Kawano, Virtual prototyping and optimization of novel solar cell designs, Proc. SPIE 7750,
775028 (2010), DOI:10.1117/12.873114
4. M. Kawano and J. Pond, "Design Optimization of Photonic Crystal Organic Solar Cells using the FDTD method
in Combination with Particle Swarm Optimization," 7th International Conference on Optics-photonics Design &
Fabrication, Yokohama, Japan, 19S1-14, 2010.
5. J. G. Mutitu, S. Shi, C. Chen, T. Creazzo, A. Barnett, C. Honsberg and D. W. Prather, "Thin film silicon solar cell
design based on photonic crystal and diffractive grating structures", Opt. Express 16, 5238, 2008
6. M.Shokooh-Saremi and R. Magnusson, "Leaky-mode resonant reflectors with extreme bandwidths," Opt. Lett.
35, 1121, 2010.
7. R. Magnusson, M. Shokooh-Saremi,and E. G. Johnson, Guided-mode resonant wave plates, Opt. Lett. 35,
2472, 2010.
This page describes how to run a yield analysis task using an example finite impulse response filter circuit
composed of cascaded Mach-Zehnder interferometers, but the steps for setting up a yield analysis project in all
products are similar. See Optical filters 2321 for more information about this circuit.
Associate files
run_yield.icp
sweep_AR_coating_example.fsp
See also
Yield scripting commands 734
Yield properties
NAME: Yield name.
Configuration
NUMBER OF TRIALS: The number of trials to run.
Properties
NAME: A user specified name for the parameter. Will appear in results dataset.
PARAMETER: Property to sweep.
DESCRIPTION: Parameter statistical distribution settings.
DISTRIBUTION TYPE: Specify the type of statistical distribution. Options include: Uniform, Gaussian,
Lognormal, Truncated Gaussian, Truncated Lognormal, Discrete (uniform distribution where variables can only
take discrete values specified by the STEP).
DISTRIBUTION MEAN: Mean value of the distribution for Gaussian, Lognormal, Truncated Gaussian, and
Truncated Lognormal distributions.
DISTRIBUTION STD DEVIATION: Standard deviation of the distribution for Gaussian, Lognormal, Truncated
Gaussian, and Truncated Lognormal distributions.
DISTRIBUTION MIN/MAX: Minimum/Maximum value or cut-off value for Uniform, Truncated Gaussian,
Truncated Lognormal, and Discrete distributions.
DISTRIBUTION STEP: The discrete step size of allowed values for Discrete distribution.
DISTRIBUTION SEED: The seed value used to generate parameter values. The seed used can either be an
automatically generated random seed, or the user can specify a value for the seed so that the same results
can be achieved each time the yield analysis is run.
ADD: Add another line to the properties table.
REMOVE: Remove a line from the properties table.
Results
NAME: A user specified name for the result. Will appear in results dataset.
RESULT: Result to collect.
ESTIMATION: If "true" is selected in the Estimation field, the trial will be considered a pass if the result falls
within the specified min/max range. If there is more than one result with a yield estimate, the final yield
percentage will be the percent of trials where all of the results fall within the specified ranges.
MIN/MAX: Min/max range when the Estimation property is set to True.
ADD: Add another line to the results table.
REMOVE: Remove a line from the results table.
upper menu bar for a list of windows and selecting Optimizations and Sweeps from the list.
Click the Create New Yield Analysis button in the Optimizations and Sweeps window to create a new yield
analysis task. Click the Edit button to open the Edit yield analysis dialog window.
Once the yield analysis object is open, set the Number of trials to 20. Add a parameter (button on the right-
hand side of the Properties section) and change the name of the property to "ng1". Double-cick on the
Parameter field and browse the pulldown menu. Select the group index property of the SW1 waveguide.
Next, double-click on the description field of the property to open the Edit distribution dialog window. Select
Gaussian as the distribution type and set the mean value of the distribution to 8.05 and the standard deviation
to 0.085 as shown in the following screenshot.
Click OK to accept the settings. Repeat the steps above to add the "ng2" and "ng3" properties corresponding
to the group index of the SW2 and SW3 waveguides (use the same distribution properties).
Add a result to record using the button on the right-hand side of the Results section of the window and change
the name of the result to "fsr_1". Double-click on the Result field of the result to browse available results and
select the free spectral range result from input 2 of the Optical Network Analyzer. Double-click on the
estimation field of the result and set this to true. Next, select the minimum and maximum values of the yield
range by setting the value in the Min field to 1e11, and the value in the Max field to 2e11. Next, add two more
properties: the bandwidth and the gain from input 1 of the Optical Network analyzer, and set Estimation field to
false for these two properties. The final yield analysis window should look like the following
Click OK to accept all settings, and return to the main Optimizations and Sweeps window.
The log at the bottom of the window shows the calculated yield percentage which corresponds to the
percentage of trials where all of the results fall within the specified yield estimate ranges.
Selecting both a parameter and result generates a plot showing the value of the parameter versus and result
for each trial and the yield estimate range.
Yield analysis results can also be obtained in the script environment with the command getsweepdata,
which is similar to the command getdata. The name of each data member is the Name column that you
specified when adding the parameters and results, in this case the result is "input 2/mode 1/peak/free
spectral range". For example, the following 2 lines of script will plot the histogram showing the
distribution of free spectral range values.
yfsr=getsweepdata("yield ng","input 2/mode 1/peak/free spectral range");
histc(yfsr);
Associate files
run_yield.icp
yield_ng_script.lsf
See also
Sweep scripting commands 703
Optimization scripting commands 722
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644
To generate and run the yield analysis using script commands, user can open the
run_yield_example_script.icp file and follow the three steps listed below; or, open and run the script file
yield_ng_script.lsf.
Working with the graphical layout environment 735 This section describes the way in which the integrated
analysis routines are used to visualize and analyze
simulation data.
Eigensolver Analysis 749 This section describes the Finite Difference Eigenmode
Solver 109 (FDE) analysis component of MODE
Solutions.
EME propagator analysis 774 This section describes the Eigenmode Expansion
Solver 114 (EME) analysis component of MODE
Solutions.
Data export 758 This section describes how data can be exported to
other software packages for further analysis or formal
presentation
Analysis groups 798 This section describes all analysis groups in the object
library (for optical solvers only)
Other analysis tools and testing methods 859 This section describes other analysis tools and testing
methods
The Analysis mode 736 This page describes the concept of the Analysis
mode.
Results Manager 736 The Results View window shows all the results for
the simulation object that is currently selected in the
Object Tree. The Script Workspace and Script
Favorites windows work in conjunction with the
scripting environment to provide additional GUI-
based functionalities.
Visualizer and figure windows 740 The general ways in which data can be visualized
Visualizer introductory video 741 and analyzed is detailed. The plotting functions, a
Visualizer and figure settings 741 central component to the overall analysis routines
Visualizer attributes and parameters 748 are described.
Before describing how the analysis routines are used for data visualization, it is important to understand the way in
which the integrated analysis tool interacts with the simulation environment. Following the completion of a
simulation, the simulation data is written into the simulation project file; even premature termination of a simulation
results in a partial dataset being written to the file. When the simulation completes, or the simulation is prematurely
terminated by pressing the QUIT & SAVE button, the project file will be in Analysis mode, meaning that any
modification of the data will require switching back to the layout mode . For details of the Job Manager, such
as Autoshutoff level, please see Running a simulation 213 .
Job Manager
In Analysis mode, simulation object properties can be viewed ( symbol means the object has data or results,
similar to havedata and haveresult command) , but not edited. This ensures that at any given time, the
simulation data results corresponds to the configuration of the simulation project. Once in the analysis tool, the user
continues to analyze the simulation data until they either wish to close the application, or they decide to alter the
simulation objects and re-perform the simulation. By exiting the analysis routines and returning to the layout editor,
existing simulation data will be erased.
When used in conjunction with the Visualizer 740 , the Results Manager provides a very useful and intuitive way of
analyzing and visualizing variables and results through the GUI, greatly reducing the need for scripting.
Result View
Result View
This page describes the usage of Review View. The Result View window shows all the results for the
simulation object that is currently selected in the Object Tree.
Object tree
Any simulation object that have results will be displayed with a symbol on the bottom-right corner (similar
to havedata and haveresult command). The name of the available results, and the corresponding
dimensions or are displayed in the Dimensions/Value column. One can right click on any of the results to
display them in the Visualizer 740 , or to send the to the Script Workspace for further post-processing.
With the use of datasets, allowing one to package raw data into meaningful results that can be easily
parameterized and visualized. The results for all the standard monitors can be retrieved in the original raw, un-
parameterized matrix form (using getdata 1403 ), or in dataset form (using getresult 1402 ). For example, in the
Result View figure above, the results listed under rawdata can be obtained using the getdata command. The
results listed under "results" are datasets, and can be obtained using the getresult command (these
calculations will only be carried out when they are visualized). The icons associated with each result reflect
the type of result:
String
Matrix: this is a simple matrix result, with no associated parameters
Matrix dataset: this is a parameterized matrix results that contains at least an attribute (result), and an
associated parameter
Rectilinear dataset: this is a parameterized matrix result that is associated with a rectilinear grid
Unstructured data: this is a set of data that is not structured in form of a dataset or a matrix and rather
consists of several different types of results
For more detail on how to work with datasets in the scripting environment, please see Accessing simulation
data 1401 . Analysis group objects from the Object library have been updated to return datasets. For an example
of how to define dataset results in an analysis group, please see Analysis groups 479 .
The raw data results are all un-parameterized, simple matrix results. To create parameterized matrix datasets
from matrices, use the "Send to script" option to copy the variable into the Script Workspace.
The icons in the script workspace above shows that while "sigmaabs" and "sigmascat" are parameterized
matrix datasets (since they were the results returned directly by the cross section analysis groups),
"sigmaext" is a result that we defined in the script, and is therefore a simple un-parameterized matrix. For
example, simply right-clicking on sigmaext and selecting "Visualize" will generate the following plot in the
Visualizer:
Here, the extinction cross section is plotted as a function of the index value. To associate it with the
corresponding frequency array, select the "Create visualization" option, which will open the "Visualization
Creator" dialog window:
This window allows users to set the name of the parameterized variable (sigmaext_vs_f) and its parameters (f).
Once this is defined, the visualization creator will generate the commands necessary for creating the
parameterized dataset in the Script Favorites window. When this command is ran, it will send the new
parameterized variable to the Visualizer, which will plot the variable as a function of the user specified
parameter.
Generated Command
Generated Figure
In addition to the commands generated by the visualization creator, the Script Favorites window also allows
users to define their own favorite commands by selecting "New command" and "Edit".
See the Visualizer 741 video for additional information on the visualizer.
Optical Solver
Electrical Solver
The upper-left portion of the window is the plot area, which displays the current data defined by the settings in the
upper-right of the window (plot settings). The following sections describe the many options available for controlling
what data will be displayed in the plot area. These sections can be minimized if more area for plotting is required.
Data that gets added to the Visualizer is retained until it is removed (i.e., with the "Remove" button or by pressing
"X" on the top right corner of the window). This is useful for comparing results across different sets of data.
Visualizer
See also
visualize 1529 script command
Visualizer 740 reference guide
lumerical datasets 1461
Paraview - advanced data visualization 790
using Matlab for advanced analysis 1410
Plasmonic bullseye 1910 FDTD Solutions
example
Nanobeam PC Electro-optic Modulator 2250
DEVICE example
Transceiver 2308 INTERCONNECT example
1D
3D
2D
All plots support operation such as axis labels, zoom, export to JPG, etc. They all support the same zoom
functionality as in the layout editor. Pressing the left mouse button to zooms in by a factor of two, the right button
to zooms out by a factor of two, pressing and holding the left-hand mouse button results in a zoom window, and
double-clicking either mouse button scales the plot to show all of the data. Some controls are slightly different for
each type of plot (see more details in the next sections). For example, only the 3D vector plot provides controls for
3D rotation of the view; SHIFT key + mouse LEFT click allows pan view without 3D rotation. For image plots, the
color map scale can be changed from color to grey, or red2blue.
The FILE menu contains an option to export the current figure to a JPG image file.
The SETTINGS menu contains options for setting the axes, colorbar limits, color map, labels, etc.
Plot types
Line: xy plot
Use this option for plotting impedance data. For more information
see this Wikipedia article.
Surface
Vector
Tips:
It is often more meaningful to plot the Poynting vector rather
than the fields. Plots of the electric field will often contain
vectors pointing in different directions representing the
oscillation of the field direction. The more interesting quantity
to plot is the Poynting vector to visualize the direction of power
flow.
It can be helpful to create an electric field vector plot to study
circularly polarized or elliptically polarized beams. See the
circular polarization example 540 .
Toolbar
Select, Zoom, Pan view, Zoom Extent: See Layout Editor - Toolbars 199 .
MATLAB export / MATLAB export script: Only available for line-xy and surface plots. These
buttons generate a MATLAB plot using the data plotted in the Visualizer; In addition, the MATLAB export
script button creates a script that generates the plot in MATLAB. It requires MATLAB integration. To
switch between these two buttons click and hold the button until you see the two options as shown
below:
Export to JPG: It exports the figure to a JPG file. For line plots it is possible to export to PDF and
EPS files as well. Click and hold the button to see the available options as shown below:
Show/hide chart settings: Opens the Visualizer settings described in the next section.
Get help with graph control options: Available for vector plots only. Shows a description of the
control options to zoom in/out, rotate, pan, spin, switch between wireframe and solid view, and reset
camera.
Visualizer settings
Line plot
X/Y LABEL: The x and y labels for the plot xy plot Sm ith chart Polar plot
can be specified.
SET AXIS LIMITS: The x and y limits for the
axis can be set.
NUMBER OF TICKS: The number of axis
dividers on the x and y axis can be specified.
The default is 10.
One can also choose to plot the the data in Surface plot Vector plot
logarithmic scale and choose between three
different color schemes (jet, red to blue and
grey scale).
Some of the visualizer settings are common to 2D and 3D simulation data. These are:
SHOW: Can be "surface", which will contain the values at each mesh point only, or "surface and mesh", which
will superimpose in black the mesh grids on top of the plots, or "mesh only" which will only plot the mesh grid in
color.
AXIS SCALE OPTIONS: Can be "square" which will make sure the two axis are plotted to the same size, or
"equal" which will use the same scale for both such that the plot will be to scale.
LOG SCALE: Will plot the result on a log scale.
TITLE: The title of the plot can be specified.
X/Y/Z LABEL: The x, y and z labels for the plot can be specified.
COLOR BAR: The color bar limits can be specified and locked. Additionally, it is possible use a background
and border for the color bar.
Im age plot
Surface plot
2D PLANE DATA: Use this option to export the cross-section 2D data at the clip plane to the script
workspace or to show it in a new Visualizer window.
Attribute
When using line plots, each attribute will appear as a separate line. When using image and vector plots, the
selected attribute will be shown.
DATA SET: full data set name (can contain multiple attributes)
ATTRIBUTE: attribute name
VECTOR OPERATION: selects a particular component of a vector attribute e.g. (Ex, Ey, |E|^2)
SCALAR OPERATION: selects a particular component of a scalar attribute e.g. (real, imag, abs, angle)
SCALE: multiplier for the data being plotted
LEGEND: this name will be shown in the legend of the plot
NOTES: additional information added by the user about the attribute
VIEW DATA: allows users to view the data in a table format as shown below
In this table format, users can select any portion of the data and "Copy" or "Export" it into a text file.
Alternatively, users can also send any portion of the data into the Script Workspace.
Parameter
Surface plots
Two parameters must be selected to plot on the X and Y axis. All other non-singleton parameters must be set
to Slice. A specific slice can then be selected for those parameters.
Vector plots
The spatial dimensions (x,y,z) are always selected to plot on the X, Y, Z axes. All non-spatial parameters
must be set to Slice. A specific slice can then be selected for those parameters.
Click to enlarge
The Eigenmode Solver analysis window can be opened by pressing the Run Active Simulation button in the
toolbar in CAD (with the Eigenmode Solver region set as active) or by selecting Analysis in the menu which appears
when you select VIEW->WINDOWS or right click at the top of the CAD widow.
Within the Eigenmode Solver analysis window there is a mode list, a deck for storing modes, three tabs for the
analysis and a section for the plots:
Mode List and Deck 751 This page describes the Mode list and Deck at the
top of the analysis window.
Modal Analysis tab 753 In this tab, the different modes supported by the
Set calculation parameters 754 structure can be solved for, and the spatial field data
Power and impedance integration 755 can be visualized. Also, it is in this tab where the
Far field settings 757 bent waveguides can be studied. This is where the
Data export 758 analysis process begins.
Frequency Analysis tab 758 In this tab, one of more modes can be analyzed as a
Set calculation parameters 760 function of frequency. Here, the frequency
Data export 761 dependence of the effective index, dispersion and
various other properties can be determined.
Overlap analysis tab 762 In this tab, one of the modes that has been solved for
Overlap 763 and can be overlapped with another mode to
Beam 765 determine, for instance, the coupling efficiency
between two modes.
Advanced options 767 At the bottom of the window, there is an advanced
options button which provides some options for
advanced users.
For a step-by-step tutorial of an Eigenmode solver example, please see the following video:
For more information such as tips on finding a mode and lossy mode, please see Others and examples 768
For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .
MODE LIST
The mode list shows all of the modes that were calculated in the MODAL ANALYSIS tab along with their
effective index, loss (if applicable), and TE fractions.
Two definitions for TE fractions are provided by MODE Solutions. The "TE polarization fraction Ex" for
propagation along the z direction is defined by the following equation:
2
Ex dxdy
( Ex )
2 2
+ Ey dxdy
where |Ex|^2+|Ey|^2 corresponds to |E_parallel|^2 (since we are considering the polarization of the modes, we
only consider the fields parallel to the mode cross section). For propagation along the x/y direction (ie. "TE
polarization fraction Ey/Ex"), this is similarly defined:
2 2
Ey dydz Ex dxdz
( Ey ) ( Ex )
2 2 2 2
+ Ez dydz + Ez dxdz
,
This definition is typically used in integrated optics, but for fibers, this also helps to determine the polarization
of the mode. Note that this definition is arbitrary (since we allow for propagation in any direction), the user may
have to look carefully at the field components if unusual orientations of the Eigenmode Solver are used.
There are alternative definitions which are used more frequently for other applications/fields. For example, the
"waveguide TE/TM fraction" is defined by the following equations:
2 2
1-
E ^ dxdy
1-
H ^ dxdy
E
where ^ and
H ^ refers to the field component in the direction of propagation (ie. perpendicular to the mode
cross section).
OBJECT TREE
The modes in the mode list described above, as well as results from Frequency analysis 758 are also stored in
the "data" analysis group under the Eigenmode Solver simulation region. One can study these results using
the Lumerical Visualizer 740 .
DECK
The deck section of the analysis window shows all the stored D-CARD data.
D-CARDs are data repositories that store all the information necessary to perform complex operations such as
modal overlaps. D-CARDs on the deck can be modes calculated in MODE Solutions and copied from the
mode table (by right-clicking on the desired mode), or loaded from file. Also, D-CARDs can be imported from
ASAPTM output, they can be imported from FDTD Solutions, or they can be a default Gaussian beam. Each
D-CARD contains a large amount of data, such as vectorial electromagnetic fields, frequency vectors and
effective indices. By manipulating this information as a D-CARD, the user can easily view, store, manage and
analyze large amounts of data with a few mouse clicks.
NOTE: Calculated analysis data is not lost if you close the analysis window
The analysis window can be closed by pressing the close button (red cross at the top right side of the window in
the image above). When you re-open the window (for example by pressing the the Run Active Simulation button
) all the data that was calculated before the window was closed will be available. Also, it is possible to open
CAD and examine the properties of the structures and the simulation region when analyzing a particular mode.
However, to make changes to these structures MODE Solutions must first be switched back into Layout Mode.
This can be done by presssing the Switch to Layout button in CAD. When you switch to layout all local
data that has been calculated for the current structure will be lost. This ensures that if you have a file with data
stored in the analysis tab, then that data will belong to the structure which is in the CAD environment.
For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .
Settings available in the option settings section of the modal analysis tab will change depending on which
option was chosen in the pull down menu. The options pull down menu items and the associated option
settings are described in the next few pages of this section of the reference guide.
As soon as modes are calculated, the mode plot window will contain the near field data for a mode. You can
pick which mode to plot by selecting the mode you are interested in with the mouse in the mode list. When far
field calculations are carried out, the plot shows the far field data. The plotting options are discussed in the
mode plot options page following the options pull-down menu items.
BENT WAVEGUIDE: This checkbox is used to specify whether the waveguide is bent
BEND RADIUS: The radius of curvature of the bend
BEND ORIENTATION: The direction in which the waveguide is bent; refer to Bent waveguide calculation 359 in User
Guide for more details.
CALCULATE MODES: Starts the calculation
RESTORE LAST SETTINGS: Resets all the settings in this tab to those that were used to calculate the modes in
the mode list.
And I is the current calculated by integrating the H field around the outer edges of the integration region:
I = H dl
c
GRAPH CONTROL:
o DEFINE INTEGRATION REGION: In this state, the mouse is used to graphically define the region over which
For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .
The option settings section of the modal analysis tab will change depending on which option was chosen in the
pull down menu. The mode and frequency plot window shows the mode data for the current mode in the frequency
sweep and a mode which was selected from the mode list.
The plot pull down box allows the user to choose which data to visualize. The screenshot below shows the
different ways in which the simulation data can be plotted. Data which can be plotted versus wavelength or
frequency include:
EFFECTIVE INDEX: selecting this option will generate a plot of the effective index for each calculated mode,
plotted as a function of wavelength or frequency.
LOSS: selecting this option will generate a plot of the modal loss as a function of frequency. Measured in units
of dB/mm of propagation.
GAIN: selecting this option will generate a plot of the modal gain as a function of frequency. Measured in units
of dB/mm of propagation.
GROUP INDEX: Is the ratio of the speed of light to the group velocity, c/vG. Unitless.
GROUP VELOCITY: Is defined vG = dw/db, and can be interpreted as the rate at which the peak of a temporal
pulse will propagate in the absence of nonlinearities. Measured in meters per second (m/s).
GROUP DELAY: Is defined as t = 1/vG. Measured in picoseconds per kilometer.
DISPERSION: Is defined as the rate of change of the group delay with respect to wavelength (dt/dl). Measured
in picoseconds per nanometer per kilometer (ps/(nm km)).
BETA: Defined as b = 2p nEFF / lo, where nEFF is the effective index, and lo is the free-space wavelength.
Measured in units of inverse meters (1/m).
An example running frequency analysis using parameter sweep and script, please see Sweep analysis for
dispersion 712 .
NUMBER OF TEST MODES: This parameter sets the maximum number of modes to use for the sweep
calculation. To track a single mode, this parameter is best set to approximately 3 in order to keep the
computation time to a minimum (unless there are discontinuities in the sweep data, in which case this parameter
will need to be increased slightly). If track selected mode is not set, then this parameter determines the maximum
number of modes which are to be swept over the frequency/wavelength range of interest.
EFFECTIVE INDEX: This parameter is used to specify the value of effective index around which the modes are
solved for. Only valid when not tracking a selected mode.
DETAILED DISPERSION CALCULATION: Calculate the mode properties at some additional frequencies to obtain
more accurate dispersion data over the frequency/wavelength range of interest. This takes more time but gives a
more accurate result.
STORE MODE PROFILES WHILE TRACKING: This option is used for exporting to INTERCONNECT only. This
will store the mode profiles for each frequency.
BENT WAVEGUIDE: Select this option to sweep a waveguide which has a bend in it.
Bend radius - the radius of curvature of the waveguide bend
Bend orientation - the orientation of the bend; refer to Bent waveguide calculation 359 in User Guide for more
details.
Standard export:
TEXT FILE (COLUMN): exports a column table of frequency, real effective index, and imaginary effective index,
loss, real beta, imaginary beta, overlap (when tracking a mode), group velocity and dispersion.
TEXT FILE (STANDARD): exports vectors of the frequency, real and imaginary effective indices, loss, real and
imaginary beta, overlap (when tracking a mode),group velocity and dispersion.
MATLAB: exports the data to a Matlab-compatible file which contains a frequency vector, a complex-valued
effective refractive index vector, a loss vector, a complex-valued beta vector, a group velocity vector and a
dispersion vector.
LDF FILE: exports the frequency results into a Lumerical .ldf file.
Export Frequency Data: exports the frequency sweep results into the selected standard format.
INTERCONNECT export:
Export the frequency sweep results into a format that can be easily loaded into INTERCONNECT. Please see
INTERCONNECT - MODE waveguide 1107 for more detail.
For a step-by-step tutorial of an Eigenmode solver example, please see the video in Eigensolver Analysis 749 .
An overlap is calculated between one of the entries in the mode list and an entry in the deck. The plots in the image
below show the near field data for the currently selected mode in the mode list (on the left) and in the deck (on the
right). The mode plot options are the same as those discussed in the Modal analysis 753 section.
Option tabs - This allows the user to choose between overlap 763 calculations or to create/modify a Gaussian
beam 765 .
Option settings - This is where the user specifies the parameters for each option.
Modal area - A quantitative measure for the effective mode area. For a 2D z-normal Eigenmode Solver simulation
region, It is defined as:
Modal _ area =
( H 2
dxdy )
2
4
H dxdy
(The modal areas for other orientations of the Eigenmode Solver are similarly defined.)
For more information about the overlap analysis calculation, please see Overlap analysis 763 .
5.6.2.4.1 Overlap
Choosing the "Overlap" tab results in the following screen shot. Some of the parameters can be set through the
script 1605 . For more info, please visit Overlap analysis - FDE 763 .
r r r r r r
overlap = Re
( )(
E1 H 2* dS E 2 H 1* dS
) 1
r r* r r r r
E1 H 1 dS
(
Re E 2 H 2* dS )
For details, see Snyder and Love "Optical Waveguide Theory", Chapman & Hall, London, England, 1983.
POWER COUPLING: the power coupling gives the total input coupling, taking into account both the mode overlap
and the mismatch in effective indices between modes. In simple cases, this reduces to the product of the
OVERLAP and the Fresnel transmission.
SHIFT BEAM CENTER: clicking this allows you to offset the D-CARD profile by X SHIFT, Y SHIFT and Z SHIFT.
RECENTER: You can use this pulldown button to re-center the X SHIFT, Y SHIFT and Z SHIFT to (0,0,0), or such
that the center of the D-CARD profile coincides with the center of the currently selected mode. It is a good idea to
do the latter before trying to optimize the position of the X SHIFT, Y SHIFT and Z SHIFT.
X SHIFT: the actual shift amount in the x direction.
Y SHIFT: the actual shift amount in the y direction.
Z SHIFT: the actual shift amount in the z direction.
OPTIMIZE POSITION: this button will try to calculate the optimum values for X SHIFT, Y SHIFT and Z SHIFT to
maximize the overlap between the currently selected D-CARD profile and the currently selected mode.
See also
Data analysis 768
Overlap script function 1608
r r r
Ein H in Eout
The arbitrary input fields, labeled and are incident upon a surface and give rise to the output fields
r r r r
and
H out
. The input power is given by
{
Pin = 0.5 * Re dS Ein H in* }while the output power is given by
r r r*
{
Pout = 0.5 * Re dS Eout H out }. Any fields can be decomposed into a basis of orthogonal modes (see Marcuse
or Snyder and Love Waveguide book)
r r
E = ai ei
i
r r
H = bi hi
i
If we assume that the reflected field is small, we can simply decompose the input (or output) field onto the basis
state of the output waveguide:
r r r
Ein = Eout = ai ei
i
r r r
H in = H out = bi hi
i
and therefore, the power coupling coefficient propagating in the the ith mode over the total input power is
r r r*
{ *
Pi Re ai bi dS ei hi
= r r r
}
Pin {
Re dS Ein H in* }
r r r r r
dS eri H in* dS Ein hi*
Pi
= Re
r r r* r r
1
r*
Pin
d S
i i e h
Re{ d S Ein H in }
This result tells us how much power can propagate in the ith mode from a given input field. However, the above
calculation assumed that the reflected fields were negligible. In reality there is some reflected field and this leads to
different ai and bi coefficients. Indeed, when the ai and bi coefficients are different, it means that some of the field
must be reflected because the relative amplitudes of E and H cannot be decomposed into forward propagating
modes only. A better result can be found by assuming that the reflected field has the same profile as the incoming
field, and this is what is done by MODE Solutions to calculate the power coupling. The simplest case to be
considered is a plane wave incident on a dielectric interface (air to an index of n). There is obviously a perfect
"overlap" between plane waves on both sides of the interface. However, if the ai coefficient for the decomposition of
Ein is 1, then the bi coefficient will be n. (For plane waves H = n*sqrt(eps0/mu0)). For the plane wave this leads to the
well known results that r=(n-1)/(n+1)), making it possible to calculate the power coupling between an incident field
into the forward propagating ith mode. For an exact result, it is necessary to know the complete set of waveguide
modes on both the input and output sides.
Note
The overlap calculation that is described here may not be accurate for waveguides or fibers with loss.
5.6.2.4.2 Beam
The Beam tab allows you to modify the default Gaussian beam for overlap calculations, as well as create Gaussian
beams in the deck which will be accessible from the scripting environment. There are two types of Gaussian beams,
and the user can choose between the scalar approximation for the electric field or the fully vectorial beam profile
option:
For the Gaussian Beam Source, please see the Gaussian source 521
NA: This is nsin() where n is the refractive index of the medium in which the source is found and is the half
angle as shown in the figure below. Please note that the index will not be correctly defined in dispersive media and
lenses should only be used in non-dispersive media. The refractive index for the source is determined at X, Y (and
Z).
Distance from focus: The distance d from focus as shown in the figure below. A negative distance indicates a
converging beam and a positive distance indicates a diverging beam.
Fill lens: Checking this box indicates that the lens is illuminated with a plane wave which is clipped at the lens
edge. If FILL LENS is checked, then it is possible to set the diameter of the thin lens (LENS DIAMETER) and the
beam diameter prior to striking the lens (BEAM DIAMETER), as shown in the figure below. A beam diameter
much larger than the lens diameter is equivalent to a filled lens.
Number of plane waves: This is the number of plane waves used to construct the beam. The beam profile is more
accurate as this number increases but the calculation takes longer.
M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives," J. Opt. Soc. Am.
A 3,2086-2093 (1986).
M. Mansuripur, "Certain computational aspects of vector diffraction problems," J. Opt. Soc. Am. A 6, 786-805
(1989).
M. Mansuripur, "Distribution of light at and near the focus of high-numerical-aperture objectives: erratum, Certain
computational aspects of vector diffraction problems: erratum" J. Opt. Soc. Am. A 10, 382-383 (1993).
Scalar approximation
Define Gaussian beam by : This menu is used to choose to define the scalar beam by the WAIST SIZE AND
Advanced option
CONVERGENCE TOLERANCE: The convergence tolerance used for the calculations - the default value
corresponds to 1e-12 but can be increased by the user to speed convergence or decreased to improve accuracy.
FRACTIONAL OFFSET FOR DETAILED DISPERSION CALCULATIONS: this is the fractional frequency offset
used for calculating numerical derivatives with respect to frequency, when the "detailed dispersion" checkbox is
on.
MAXIMUM NUMBER OF MODES TO STORE: When searching for modes from n1 to n2, the algorithm will stop
For more information such as tips on finding a mode and lossy mode, please see Others and examples 768
Objective
When using the eigensolver in MODE Solutions or the mode source in FDTD Solutions, there are many eigensolver
settings that can affect the modes found. For some types of structures, finding the correct modes can be
challenging. This page provides a checklist of common settings that should be checked or modified when you have
trouble finding the right modes or you get the message "no physical modes were found".
chosen, the right modes may not be found. The size of the
simulation region is also important. When using metal
boundaries, the boundaries should be far enough from the
structure interfaces so that the evanescent tails of the
modes do not reach the boundaries and get reflected.
If you still have trouble finding the right modes for your waveguide/fiber, please contact support@lumerical.com.
Objective
This page provides list of steps that one needs to pay attention to when working with lossy waveguides and fibers.
Associated files
ridge.lms
ridge_1D.lms
MIM.lms
See also
Finding modes 769
Integrated MODE Source 566
The best way to verify that a mode is bound is to use a 1D Eigenmode solver, and we will demonstrate this
using the example file ridge.lms. When you first solve for the modes in this ridge waveguide, you will find
the mode with neff ~ 3.475390. If you plot the "log" profile of the mode, it may seem that this mode is not
bound at 1.55um.
To verify wether this mode is bound or not, we can use a 1D mode solver to study the slab waveguide. Open
the Edit window for the MODE simulation region, and change the solver type to "1D Y:Z prop", and change the
"x" to -8. This will change the MODE region from a 2D solver to a 1D (linear y) solver. Here, we find the 2
modes with the highest neff to be a TE mode with neff = 3.475089 and a TM mode with neff = 3.475036. This
means that any mode in the ridge waveguide that has an effective index greater than 3.475089 is bound
(others will all leak away as slab modes).
Because the mode at 3.475390 is bound, it is perfectly fine to use metal boundaries in this case. Note that we
will still need to be careful and make sure that the metal boundaries are far enough away such that they are
not influencing the modes. The best way to verify this is to increase the x-span and see if this changes the
results significantly.
The closer you set this "guess" value to the real and imaginary part of the effective index of the desired mode,
the easier it will be to find the mode. To do this, one can start with last wavelength where a mode can still be
found (ie. before the mode becomes too lossy), and then gradually move to the regime where the mode
becomes lossy. The real and imaginary part of the effective index should change continuously, allowing us to
guess what the next complex effective index should be.
For example, in the file MIM.lms, a mode with neff ~ 1.2336+0.601i can be found at 145 nm with the default
"use max index" option.
But if you use the same calculation parameters to look for the mode at 150nm, you will not be able to find the
desired mode. In this case, it is much easier to find the desired mode by entering the neff found at 145nm
(1.2336+0.601i) as the initial guess.
The following formula describes how the electric field amplitude decays due to material absorption (ie.
refractive index = n + ik )
- kx 2 p
l0
| E ( x) |= e
Combining the formulas gives
loss = -20 log 10 e ( -k 2p
l0
)
Solving for k gives
loss l0
k=
20 2 p log 10 (e)
The EME analysis window can be opened by pressing the run button which will calculate the modes at each
cell of the EME solver region, changing the simulation to Analysis mode. In Analysis mode, we can use the EME
analysis window to propagate the fields and calculate scattering parameters (s-matrix) for the structure. The
propagation distances and periodicity can be changed in analysis mode, and the fields can be propagated without
having to recalculate the modes.
After propagating, the results from any EME profile monitors and index monitors, as well as the s-matrix
results from the EME solver object can be viewed in the Result View tab or by right-clicking on the object in
the Objects Tree and visualizing the results. See the Result View 736 page for more information.
Select source
The select source section allows you to select the input source port and the mode to inject at the input port.
The source amplitude can also be set here. These settings will be used to propagate the fields for the field
profile monitor results, but they will not affect the S-matrix results.
The field data returned by EME profile monitors will be normalized as though the amplitude of the source mode
is equal to the value set in the amplitude setting in units of V/m.
The figure below shows real(neff) and imag(neff) of the modes in a cell, where the axes labels are modified:
The green line shows imaginary part of neff which corresponds to the loss, and the blue line shows the real
part of neff, which corresponds the phase velocity. One can see that for some lossy modes, the wave has a
negative phase velocity as real(neff) is smaller than 0, even though it is a forward propagating, evanescently
decaying mode.
Override periodicity
Selecting the override periodicity option allows the user to change the number of periods of any periodic
regions that have been defined in the EME setup tab. The new monitor and s-matrix results can be obtained
by by clicking on the "eme propagate" button, without having to re-calculate any modes.
When using this option, the periodic sequence that is defined in the tabular format in the override periodicity
section will be shown in the cell group sequence box. For example the sequence shown in the image below
indicates that there are three cell groups and the second cell group is repeated ten times.
This feature can be used for scanning the number of periods of a device such as a Fiber Bragg Grating 2182 .
EME field profile monitors should not be used with the Cell group periodicity feature. EME profile monitors
will not correctly reconstruct the field profile when Cell group periodicity is used.
Error diagnostics
Selecting "update monitors" will refresh the result for all monitors with the latest propagation settings. Users
can also choose to include two types of error diagnostics, see EME error diagnostics 783 for more detail.
Note that selecting these settings may increase the propagation time.
Propagation sweep
The propagation sweep tool can be used to sweep the periodicity or span of a cell group in order to scan the
length of different regions of the device. This tool allows the results for a range of spans to be calculated
without having to recalculate the modes at each cell. To set up the sweep, select the cell group whose length
will be varied, and set the start and stop lengths of the cell group, and either the length interval between each
sweep point, or the number of points to sweep over in the range.
After running the sweep using the "eme sweep" button, the "visualize eme sweep" button will open up a
visualizer showing all the elements from the user s-matrix over the cell group length.
See the Spot Size Converter 2053 getting started tutorial for an example of how this is used.
Since the size of the user s-matrix can be large depending on the number of ports and selected modes, the S-
matrix index mapping will show a table which can be used to map the user s-matrix indices to the modes and
ports of the structure. The left index of the S-parameter is the output mode, and the right index is the input
mode.
I INPUT
n 1 2
t
h OUTPUT 1 s11 s12
i 2 s21 s22
s
s 1 Port1, Mode1
c 2 Port2, Mode1
e
n
S11 is the reflection coefficient for output Port1,
a
Mode1 from input Port1, Mode1.
r
S12 is the transmission coefficient for output Port1,
i
Mode1 from input Port2, Mode1.
o
S21 is the transmission coefficient for output Port2,
,
Mode1 from input Port1, Mode1.
t
S22 is the reflection coefficient for output Port2,
h
Mode1 from input Port2, Mode1.
e
r
e
a
r
e
t
w
o
p
o
r
t
s
,
a
n
d
o
n
e
m
o
d
e
p
e
r
p
o
r
t
,
w
h
i
c
h
r
e
s
u
l
t
s
i
n
a
2
x
2
u
s
e
r
m
a
t
r
i
x
.
o
t
e
:
R
e
m
e
m
b
e
r
t
h
a
t
m
o
d
e
1
a
t
p
o
r
t
1
i
s
a
d
i
f
f
e
r
e
n
t
p
h
y
s
i
c
a
l
m
o
d
e
f
r
o
m
m
o
d
e
1
a
t
p
o
r
t
2
.
T
h
i
s
i
s
e
a
s
y
t
o
u
n
d
e
r
s
t
a
n
d
w
h
e
n
y
o
u
r
e
m
e
m
b
e
r
t
h
a
t
t
h
e
w
a
v
e
g
u
i
d
e
a
t
p
o
r
t
1
c
a
n
h
a
v
e
a
d
i
f
f
e
r
e
n
t
s
i
z
e
f
r
o
m
t
h
e
w
a
v
e
g
u
i
d
e
a
t
p
o
r
t
2
.
I INPUT
n 1 2 3 4
t
h 1 s11 s12 s13 s14
i OUTPUT 2 s21 s22 s23 s24
s
s 3 s31 s32 s33 s34
c 4 s41 s42 s43 s44
e
n 1 Port1, Mode1
a 2 Port1, Mode2
r
i 3 Port2, Mode1
o 4 Port2, Mode2
,
S11 is the reflection coefficient for output Port1,
t
Mode1 from input Port1, Mode1.
h
S12 is the reflection coefficient for output Port1,
e
Mode1 from input Port1, Mode2.
r
S21 is the reflection coefficient for output Port1,
e
Mode2 from input Port1, Mode1.
a
S22 is the reflection coefficient for output Port1,
r
Mode2 from input Port1, Mode2.
e
a
S31 is the transmission coefficient for output Port
g
2, Mode1 from input Port 1, Mode1.
a
S13 is the transmission coefficient for output Port
i
1, Mode1 from input Port 2, Mode1.
n
t
w
o
p
o
r
t
s
.
T
w
o
m
o
d
e
s
o
f
i
n
t
e
r
e
s
t
h
a
v
e
b
e
e
n
s
e
l
e
c
t
e
d
f
o
r
e
a
c
h
p
o
r
t
.
T
h
i
s
r
e
s
u
l
t
s
i
n
a
4
x
4
u
s
e
r
m
a
t
r
i
x
.
The error diagnostics are grouped into 2 categories: global and local. Global diagnostics measure the accuracy of all
contributions to the S matrix as a whole, while local diagnostics measure the accuracy for the specific source that is
selected in the EME analysis window. Some of the diagnostics are relatively fast to calculate while others take more
time. You can choose to include fast or slow diagnostics when executing eme propragate.
When describing the examples below, we will refer to the taper example at Polarization converter 2130 .
Expansion. The EME method is essentially an expansion of the modes on the left hand side of an interface onto the
basis vectors formed by the modes on the right hand side, and vice versa. In principle, if we had an infinite number of
modes, this expansion could be accomplished perfectly because each set of modes would be a complete
representation of the entire vector space. In reality, we always have a finite number of modes and therefore we see
the types of problems that are typical of, for example, expansion a function using a finite number of Fourier
coefficients. This diagnostic simply expands each mode on the left hand side of the boundary using the basis
vectors of all modes on the right hand side of the boundary (and vice versa), and measures the difference between
the original mode and the expanded mode. If the modes on the left and right hand side are simply different
representations of the same vector sub-space, this result will be 0. However, if the modes on either side represent
different sub-spaces of the total space then this result will be potentially as large as 1. Typically the sub-spaces
have some overlap and the result is between 0 and 1. If interfaces have a large expansion error, it may mean that
you need to increase the number of modes on either side of the boundary. However, we should also consider some
of the local error diagnostics because it is possible that only a small number of the modes are actually required for
the desired source excitation. The fast diagnostics option must be checked to update this result. These diagnostics
are packaged in the result called 'global diagnostics'.
Local diagnostics
Loss and Gain. Here we calculate the actual loss and gain violations that occur at each interface for the given
excitation source. These results may show much lower violations than the equivalent global results. These
diagnostics are packaged in the result called 'local diagnostics'.
Coefficients. Here we show the forward and backward propagating coefficients for each mode in each cell, for the
given source excitation. The coefficients are measured at the center of each cell. The port modes are included and
are calculated at the port input and output positions. These coefficients are complex numbers in a matrix of size (N
+2) X M where N is the number of cells and M is the maximum number of modes used in any cell (or port) of the
EME region. If cells and ports use less than M modes, then the corresponding coefficients are simply set to 0. The
data can be plotted vs cell number (with 0 corresponding to the left ports and N+1 corresponding to the right ports),
or as a function of x position. These diagnostics are packaged in the result called 'coefficients'.
Field discontinuities. The EME method is fundamentally based on the continuity of the tangential E and H field
components at each cell interface, which makes it possible to create a system of linear equations the solution of
which gives the interface S matrix. Measuring the discontinuity of the tangential field components at the interfaces is
a good way to see if enough modes are being used. These diagnostics are returned in the result called 'local
diagnostics'. There are two results returned for the E field, which are
|| 2 2
E L - ER|| dS E
||
L - ER|| dS
S S
DE1 = DE2 =
|| 2 2 2
E S dS 0.5 EL|| + EL|| dS
S S
where EL and ER refer to the left and right fields at each interface and ES is the E field of the excitation source at the
port. There are two more equivalent results for the H field. These diagnostics are packaged in the result called 'local
diagnostics' and are only calculated only when 'include slow diagnostics' is checked.
Taper example
This example is based on the taper example at Polarization converter 2130 . We have run this example with only 5
cells in the middle cell group (the taper region) and 19 cells. The results for reach of the diagnostics, in four cases of
energy conservation and CVCS settings (none, passive, energy conserving, CVCS) are shown in the table below. For
ease of comparison, the line plots on the left and right side are shown on the same scale. The images are not shown
with the same colorbar scale.
Global
Loss
Local
Gain
Local
Loss
DE1
DE2
Forwa
rd
coeffic
ients
(energ
y
conse
rvation
=none
)
Forwa
rd
coeffic
ients
(CVC
S)
Back
ward
coeffic
ients
(energ
y
conse
rvation
=none
)
Back
ward
coeffic
ients
(CVC
S)
Expan
sion
In the above results, since we have a taper region where the modes are not changing substantially from one cell to
the next, we have no serious problems with local loss and gain or even with global loss and gain. However, setting
the energy conservation to passive or energy conserving drives all global and local gains and losses to about 1e-15.
The discontinuity in the electric fields is almost identical for both normalizations and shows that the largest
discontinuity occurs near the end of the taper region. Note that the field discontinuities are exactly zero when CVCS
is turned on. The forward coefficient magnitudes show that the light essentially propagates in the fundamental mode,
but that some forward propagating higher order modes are important in the taper region. The backward propagating
coefficients are extremely small for this device.
When the CVCS method is applied, we enforce field continuity and energy conservation - however the condition for
applying the CVCS method is a continuously varying geometry where the modes do not change substantially from
one cell to the next - therefore here we should be considering the expansion error and adding more cells if it is too
large. We can see that the expansion error is substantially reduced when we go from 5 cells to 19 cells. In some
cases, it may be useful to introduce more than one cell group over a taper to have a non-uniform distribution of cell
sizes which ensures a uniform expansion error across the taper.
Unlike tapers, in structures with abrupt transitions, such as MMIs, there can be a trade off to be made between field
discontinuity and energy conservations. Typically, to better conserve energy the field must become more
discontinuous and vice versa.
Text files
The write 1440 script command can be used export data to a text file. See the scripting tutorial 1406 for details.
Excel
Direct export to Excel data files (.xlxs) is not supported. We recommend exporting your data to a text file, which
can then be imported into Excel.
MATLAB
The matlabsave 1642 command can be used to save data to .mat files. The Matlab script integration 1410 feature
is another powerful option for accessing MATLAB from the Lumerical scripting enviroment.
Export to rayset
See the Export to ray tracers 791 topic.
GDSII files
See the GDSII 480 topic.
Geometry transfer:
Copy/Paste objects:
Copy/Paste is available for structure objects between FDTD Solutions and MODE Solutions. If the object material is
not in the default material database, it will automatically be added upon pasting into the new simulation file. This
does not include analysis groups and monitors.
Copy/Paste is available for structure objects between FDTD Solutions, MODE Solutions and DEVICE; however,
materials are not transferred to the DEVICE material database, since the electrical properties of materials are
different from the optical properties. The user will have to manually specify the material in the new simulation upon
pasting. Custom primitives, analysis groups and monitors can not be coped/pasted.
Data Transfer:
Data can be transferred between the different products in several ways:
Import/Export Data:
Both .txt and .mat file formats can be used to import and export data from and to Lumerical products. Lumerical data
file (.ldf) format can also be used.
Please visit the knowledgebase pages on write 1440 , readdata 1439 , loaddata 1438 , savedata 1439 , matlabsave 1642 and
savedcard 1439 commands for more details.
S parameters can be exported from MODE Solutions to text files in a format that is compatible with
INTERCONNECT. Please visit the Plasmon section 1883 for an example.
Generation rate data can be exported from FDTD Solutions to DEVICE, using .mat files. Please visit Solar Cell
section 2594 for an example.
For simulations involving more than one product, the process can be automated using a script that calls the other
product through the command line. For more details please visit the following pages: Windows, Mac and Linux
For an example of a simulation using DEVICE and MODE, please visit the MZI example 2228 .
The MZI_automated set of files provided in the above example run MODE from the command line, called from a
script in DEVICE. Alternatively, the process can be done manually using the individual scripts provided and following
the procedure outlined in the example. For more information, please visit the charge-index conversion example 402 .
Associated files
paraview_vtksave_FDTD.fsp
paraview_vtksave_FDTD.lsf
paraview_vtksave_DEVICE.ldev
paraview_vtksave_DEVICE.lsf
See also
vtksave script command 1442
lumerical datasets 1461
Visualizer introductory video 741
using Matlab for advanced analysis 1410
http://www.paraview.org/
Lumerical's software provide a variety of built in data visualization functions, including line, image and vector plots.
While these functions are sufficient for the majority of data analysis, there may be situations that require more
sophisticated tools. ParaView is one such tool. ParaView is an open-source, multi-platform data analysis and
visualization application. ParaView users can quickly build visualizations to analyze their data using qualitative and
quantitative techniques. For additional information, please visit http://www.paraview.org/.
Introductory video
This video shows how the vtksave script command can be used to export simulation data from Lumerical's products,
and demonstrates how some of the basic ParaView features (including surface plots, clipping and slicing planes,
contours, and glyphs) can be used to create sophisticated visualizations of simulation data.
Example files
The associated files provided above are slightly modified versions of the FDTD Solutions - Plasmonic bullseye 1910
See also
Far field projections 874
Fiber ASAP Ray tracing 2192
In some applications, it is necessary to use a combination of tools to simulate your entire device. For example,
FDTD Solutions might be used to simulate scattering from a nano-particle. Additionally, it may be necessary to
calculate the fraction of scattered fields that can be collected by a macroscopic detector with a complex lens
system. The length scales involved in a macroscopic lens system are not suitable for FDTD simulation. Instead, the
near field scattering data from the FDTD simulation can be exported to a ray tracer, which is more suitable for
simulating macroscopic systems.
The process of exporting data to a ray tracer can be broken into two main steps.
The far field projection functions are always used to do the near field to ray set conversion. However, the precise
details of the analysis depend on the application. For example, the ray 'phase' may or may not be important.
Similarly, it may or may not be necessary to combine the results of several FDTD simulations to obtain an
incoherent ray set.
For more information on these functions, see the far field projection 874 pages of the User Guide, or contact
Lumerical technical support.
Once the far field projections have been calculated, it will be necessary to write the data to a text file in a format that
can be imported into your ray tracer. This will require knowledge of the file format. See your ray tracers product
documentation or contact their technical support.
An example script for exporting OLED simulation data from FDTD Solutions to ASAP TM can be found at this 2714 link.
Please see the scripting section for asapimport 1441 and asapexport 1440 commands.
Import button
The import button on the top tool bar of the CAD, allows the user to import a variety of file types including
GDSII, STL, images (JPG or PNG), nk data, etc. For detailed information on what can be imported using this
button, please visit the optical import 480 page for the optical solvers and the electrical import 677 page for the
electrical solver.
Text files
The readdata 1439 script command can be used to import data from a text file. See the scripting tutorial 1406
for details.
ldf files
The loaddata 1438 script command can be used to import data from an .ldf (lumerical data file). See the
scripting tutorial 1406 for details.
MATLAB
The matlabload 1642 command can be used to load data from .mat files. The Matlab script integration 1410
feature is another powerful option for accessing MATLAB from the Lumerical scripting enviroment.
HDF5 files
The h5info 1682 , h5read 1683 , and h5readattr 1683 commands can be used to import data from HDF5 format files.
For details on how to use these commands, see the Reading HDF5 files 792 topic.
Tecplot files
The tecplotread 1441 command can be used to import data from tecplot format files. The imported geometric
data can then be used to create structures and doping profiles using the dataset builder 375 wizard.
Associated files
processdata.h5
readh5file.lsf
See also
Download the HDF5 file processdata.h5. Open HDFView. Use the file browser to navigate to the folder where
you downloaded processdata.h5. The following view of the file will appear:
Note the tree structure of the file in the file browser panel on the left hand side. HDF5 files are composed of a
hierarchy of groups containing groups, sub-groups, datasets, and attributes.
Groups
Groups are containers that enable a hierarchical organization of the file. Each group can contain sub-groups,
attributes, and datasets. The groups appear as folder icons in the HDFView program. In this example, the HDF5 file
contains a group named "vertex." Double click on group "vertex" to expand it.
Attributes
Attributes are additional pieces of information that can be used to determine the nature of the data stored in the
group and are stored as pairs of label and value. Select the group vertex. In the information panel at the bottom of
the viewer, the group size and attributes are listed. In this group (vertex), the attributes are labeled MATLAB_class
and MATLAB_fields. The MATLAB_class attribute shows that the data is in Matlab 'struct' type format and the
MATLAB_fields attribute shows that the fields within the 'struct' data are x, y, and z.
Datasets
Datasets store the raw data in the HDF5 files. They appear as matrix icons in the HDFView tree. Select the
dataset 'doping.' Information about the dataset will be provided in the information panel. HDF5 supports the complex
organization of binary data, which is beyond the scope of this document. For more information, please consult the
HDF Group website.
In this simple example, the data (floating point numbers) is stored in arrays. In the case of the scalar 'doping,' the
array has dimension 1x18905 (1 row, 18905 columns). In the case of 'elements,' the the data is stored as a
4x87007 array (4 rows, 87007 columns).
Matrix
Scalar value
Double clicking on a dataset will bring up the TableView of the dataset. Below is a screenshot showing partial data
from the dataset 'elements.'
Lumerical's script environment offers three commands to read data from HDF5 format files: h5info 1682 , h5read 1683 ,
and h5readattr 1683 . In this part of the example, we will see how the data in the processdata.h5 file can be read
inside Lumerical's script environment. To get started, download the script file readh5file.lsf in the same folder as the
HDF5 file. In DEVICE (or FDTD or MODE Solutions), run the script file and the data from the HDF5 file will be read
and loaded in the script workspace. The different component of the script file are discussed below.
The h5info 1682 command reads the structure of the HDF5 file into 'struct' format that can be accessed in the script
workspace. In the script prompt window, execute the h5info command on the test file provided (using a "?" mark at
the beginning will display the contents of the data).
filename = "processdata.h5";
data = h5info(filename);
?data;
> Struct with fields:
> Attributes
> Datasets
> Datatypes
> FileName
> Groups
> Name
The 'data' struct contains information about the HDF5 tree structure. More details about the data can be found by
inspecting each of the elements of the struct.
?data.Groups;
> Cell array with 1 elements
?data.Datasets;
> Cell array with 2 elements
Based on the information provided by HDFView, we know that the HDF5 file has 1 group and 2 datasets in the root of
the hierarchy tree. This is confirmed by the above script commands which show that 'data' has 1 group and 2
datasets. Further information about each of the groups and datasets can be found by inspecting the corresponding
cell arrays. For example, the script below returns the name of the group (vertex), the names of its two attributes
(MATLAB_class and MATLAB_fields), and the names of its three datasets (x, y, and z). Similar commands can be
?data.Groups{1}.Name;
> /vertex
?data.Groups{1}.Attributes;
> Cell array with 2 elements
?data.Groups{1}.Attributes{1}.Name;
> MATLAB_class
?data.Groups{1}.Attributes{2}.Name;
> MATLAB_fields
?data.Groups{1}.Datasets;
> Cell array with 3 elements
?data.Groups{1}.Datasets{1}.Name;
> /vertex/x
?data.Groups{1}.Datasets{2}.Name;
> /vertex/y
?data.Groups{1}.Datasets{3}.Name;
> /vertex/z
Note that the structure information retrieved from the file using the h5info 1682 command only contains information
about the groups (including attributes) and datasets, but not the data itself.
Accessing data
To retrieve the actual data from the HDF5 file, the h5read 1683 command is used. Each group, attribute, and dataset
in an HDF5 file is located by its path, which is similar to a path in your computer's file system (e.g. C:\Users\ or /
home/). When exploring the file structure (see the preceding section), note that the 'Name' of each group, attribute,
and dataset gives the path to that object.
For example, the dataset 'x' had the path (Name) /vertex/x'. To read the data in 'x,' execute the following command
in the script prompt. The script below will read the value of x, show its dimension (18905x1) and print the value for
the 1000th element.
x = h5read("processdata.h5","/vertex/x");
?size(x);
> result:
> 18905 1
?x(1000);
> result:
> 1.35405e-006
The same action can be performed using the following command as well (assuming that the variables filename and
data are already created with the codes in the preceding section).
x = h5read(filename,data.Groups{1}.Datasets{1}.Name);
In the downloaded script file, the data from the other datasets are read using similar commands.
Reading attributes
The h5read 1683 command cannot read the attributes of a group or dataset. In order to read the attributes, we have to
use the script command h5readattr 1683 . Since a single dataset can have multiple attributes and all of them will have
the same path, the command needs three arguments. Besides taking in the name of the file and the path of the
attribute (which is the name of the group or dataset to which the attribute belongs to), it also takes the name of the
For example, recall that the group 'vertex' had the path (Name) '/vertex' and an attribute named 'MATLAB_class.' In
the script command, execute the following command. The command shows that the data in the group 'vertex' is in
'struct' format.
?h5readattr("processdata.h5","/vertex","MATLAB_class");
> struct
The same action can be performed using the following command as well (assuming that the variables filename and
data are already created with the codes in the preceding section).
?h5readattr(filename,data.Groups{1}.Name,data.Groups{1}.Attributes{1}.Name);
> struct
In the downloaded script, the units for the 'doping' dataset and the 'x' dataset are read using similar commands.
Advanced analysis 799 Bandstructure 806 Data representation 807 Far field 813
Optical power 824 Optoelectronics 842 Resonators and modal analysis 843
Displacement field
Objective
The following pages describe how to make charge distributions and current measurements within metals.
See also
Charge and Current density 802
Note
This analysis should only be applied to real metals (i.e. materials where it is reasonable to assume the material is
a cloud of free electrons). This analysis will not work for PEC materials.
Background
To calculate the charge distributions and current densities, we treat each metal as a cloud of free electrons, i.e. a
plasma. To calculate the current density in a plasma we first recognize that all material properties within the FDTD
simulation are implemented via an effective material permittivity:
r r
D = e materialE
For the purposes of this calculation, we assume there are two contributions to the material permittivity: the
background permittivity (in this case, the permittivity of free space) plus the contribution from the current density.
r r
D = ( e 0 + e plasma) E
The first term is Do, the displacement field that would exist in free space for the given electric field. The second term
is proportional to the current J. For more details, see the notes below.
r r
D = e materialE
r r
= e 0 E + e plasmaE
r
r iJ
= D0 +
w
Solving the above equation for J, we get
r r r
J = -i w ( D - D0 )
r
= -i w ( e material - e 0 ) E
Note
The total material permittivity is created from two contributions: one from the polarization of the medium due to
bound charge, and one from the current density due to free charge. Ampere's law can be written as
r r r r
- i wDbackground = H - J
r r r r
Dbackground = e 0 E + P = e 0 (1 + c )E
We can rewrite this equation as
r r r r
- i wDbackground = H - J
r iJ r r
- i w Dbackground + = H
w
r r r
- i wDmaterial = H
and, assuming that J is proportional to E, we have
r iJ
Dmaterial = e 0 E + P +
w
r
= (e 0 + e 0 c + e plasma )E
r
= e materialE
For plasma materials, such as metals, we have assumed that the susceptibility of the medium is 0 (i.e. P=0).
Objective
This page describes how to calculate the charge and current density inside metals. The associated simulation files
use the current charge density analysis object for calculating these quantities. This analysis object can be found in
the object library in the Advanced analysis section.
Associated files
usr_current_charge_density_2D.fsp
usr_current_charge_density_3D.fsp
See also
Charge and current measurements 801
Example
The associated files section provide a 2D and 3D example simulation using the current charge density analysis
groups. You can copy and paste these groups into your simulations or insert them directly from the object library.
In these particular example files, the mesh refinement option has been set to 'Conformal Variant 1' (CV1), rather
than the default setting of 'Conformal Variant 0' (CV0), meaning that the conformal meshing algorithm will be
applied at the metal-dielectric interfaces. This change should only be made to your simulation file after careful
convergence testing to confirm that the CV1 option gives better (i.e. more converged) results than CV0. Until you
do this type of convergence testing, we recommend using the default CV0 option in your simulation.
The factors that make CV1 appropriate for this simulation include:
Over the simulation bandwidth, the metal refractive index is on the same order of magnitude as the background
index. CV1 tends to work best when the refractive index does not change significantly across the interface.
The simulations use a relatively small mesh (5nm for the 3D example, 0.5nm for the 2D example).
For more information on the mesh refinement options, see Mesh refinement options 448 .
To reproduce the following figures, open and run usr_current_density_2D.fsp. After the simulation is
complete, you can reproduce the following figures by visualizing the object data. The following results show the
current and electric field data for lambda = 340nm. Also note that the image colorbar scales have been adjusted.
The X and Y
components of
the current
density J.
These figures
show the
current flowing
back and forth
in the X
direction as
the wave
propagates
along the
particle in the
Y direction.
Also notice
that the
current is zero
outside the
particle, as
expected.
The X and Y
components of
the Electric
field.
The current
density is
proportional to
the electric
field, except
for a 90 degree
phase shift.
The same analysis group also calculates the divergence of the electric field, which gives the total charge density.
This is shown in the plot below, we can see that the charges are confined to the edge of the metal, as expected.
Objective
This page describes how to calculate the total current within a metal wire. The associated simulation file uses the
induced current analysis group that can be added to your file from the Advanced Analysis section of the object
library.
Associated files
usr_current_in_wire.fsp
See also
Charge and current measurements 801
Example
The analysis group in the associated file uses Ampere's law to calculate the current induced in a metal wire by the
incoming EM fields.
I = H dl - d D dS dt
L S
Note: This analysis object treats all metals as plasma materials, with a refractive index of 1. For the purposes of this
calculation, metals are defined as materials with absorption. This generally works well when the background material
is a non-dispersive dielectric material (i.e. air or glass). However, if your background material is a dispersive (lossy)
dielectric, the analysis script will need to be modified.
To run this example, open the attached simulation file and enter the following script commands:
run;
runanalysis;
f=getdata("induced_current","f");
current=getdata("induced_current","I");
plot(f/1e9,abs(current),"f (GHz)","|current|","Induced current");
5.6.6.2 Bandstructure
This page lists all analysis groups available in Bandstructure.
Bandstructure 1844
Interpolation 808
Objective
This page shows two examples to explain the idea of creating curved or angled monitors using groups and
interpolation. This approach is required because the basic monitor objects can not be curved or rotated.
Associated files
Example 1 (using groups):
usr_curved_monitor_group.fsp
usr_curved_monitor_group.lsf
Example 2 (using interpolation):
usr_curved_monitor_interp.fsp
usr_curved_monitor_interp.lsf
To obtain the images shown below, run the usr_curved_monitor_group.fsp simulation. Then, run the
usr_curved_monitor_group.lsf script file. Please note that to save on meshing time, the mesh refinement
setting was set to staircase. The first two images shown below come from the two monitor groups located at the
input section of the waveguide. The left image is obtained from the monitor plane2 group. Since the input to the
waveguide is normal to the X-axis, the same distribution can be obtained with a conventional 2D X-normal power
monitor. On the right, you can see the electric field intensity obtained from monitors that form the circular arc
which is drawn in red in the left image. These monitors are contained in the curve2 group, and the location of the
monitors can be easily modified to lie along any arbitrary curve in 3D.
The next two images shown below come from the monitor groups located at 45 degrees into the waveguide. In
this case, the 2D plane monitor data cannot be obtained from a conventional monitor. As with the images above,
the image to the right shows the electric field intensity around the red circular arc from the left image.
The image below (left) shows the transmission vs. frequency for both the monitor group (composed of 50x50
profile point monitors) located at 0 degrees and the 2D X-normal power monitor. The transmission from the two
types of monitors will converge to the same result as the number of monitors in the monitor group increase. The
right image shows the same plot for the monitor group at 45 degrees.
Objective
This page provides an example file which uses the E-field outlined analysis object that creates a plot of |E|^2 with the
structure outline. The E-field outlined object can be inserted from the object library in the data representation
section. The files in this example were created using FDTD Solutions, but the same analysis group can be found in
If you wish to make more sophisticated structure outlines on your figures, the best option is to export the data to
another data visualization tool such as Matlab. In addition to exporting the field data, you must export the refractive
index data. The refractive index profile can be used to create the structure outline. In Matlab, you might use the
contour functions.
Associated files
usr_make_outine_FDTD.fsp
usr_make_outine_FDTD.lsf
The associated simulation file has an analysis group that returns the field profile with the structure outline super-
imposed on the data. To reproduce the above figure, open the simulation file and run the associated script. It will
create the following figures: |E|^2 with and without the structure outline.
BSDF 1742
Objective
By default, far field projections assume that the material at the monitor location extends to infinity. In the following
figure, this implies the substrate material extends to infinity. Obviously this is not always true.
This page describes how to calculate the far field distribution assuming the refractive index in the far field is different
from the index in the near field, which makes it possible to include effects such as the Substrate-Air interface shown
above.
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
In this topic
Projections from a monitor box 817
Changing the far field refractive index 814
Associated files
usr_far_field_index.fsp
usr_far_field_index.lsf
See also
Far field projection 126 toolbox
Far field projection 1657 script functions
Stackrt 1504 script function
Two methods are available: Directly setting the far field refractive index in the far field projection functions, and
applying the Fresnel equations to the far field data in an additional post processing step.
Setting the far field refractive index in the far field projection functions
The far field projection functions have an optional argument to set the far field refractive index:
out = farfield3d("mname",f, na, nb, illumination, periodsa, periodsb, index, direction);
To understand this option, it is important to remember that the far field projection calculation is basically a plane
wave expansion of the near field data. To calculate the expansion, it is necessary to know the background refractive
index, since the ratio between E and H fields in a plane wave depends on the refractive index. By default, the
refractive index at the monitor location is used for the expansion, but the index property of the projection function
allows a different index to be specified.
Expanding the fields using a different refractive index can provide useful information, but some aspects of the data
(particularly the field amplitude and power measurements) can be slightly challenging to interpret. To illustrate the
basic issue, consider a single plane wave in air, propagating in the forward direction. If this plane wave has an
electric field amplitude of 1 V/m, the magnetic field amplitude will be sqrt(eps0/mu0) = 0.0026.
Now imagine expanding this field profile, using plane waves that exist in a medium with a refractive index = 2. The
key point is that the ratio between E and H will be different in this medium by a factor of the the refractive index: If
E=1, then H=2*sqrt(eps0/mu0) in this medium. To represent the original field profile using these plane waves, it is
necessary to combine a forward propagating wave with a electric field amplitude of 0.75 propagating in the forward
direction and a backwards wave propagating with an amplitude of 0.25. Combining these two plane waves allows us
to reconstruct the original field profile. Notice that the sign of H is reversed for the backward propagating wave.
E field: 0.75 + 0.25 = 1
H field: 0.75*2 - 0.25*2 = 1
This method can be used to quickly see how refraction from a far field interface will affect the angular distribution of
radiation. It is also used in various types of advanced data analysis. However, it is generally not the best option for
calculating the effect of a far field interface, especially when the results will be compared to experimental
measurements (i.e. power or field intensity measurements). Instead, the Fresnel correction method described below
should be used.
Example
The associated simulation file has a gaussian beam propagating at a 10 degree angle of incidence in a medium with
a refractive index of 2. The analysis script will plot the far field for a refractive index of 2 and 1.
Efar = farfield3d("T",1,res,res);
Efar_air = farfield3d("T",1,res,res,1,1,1,n_air);
Notice how the angle of the beam changes. In the FDTD simulation (with a refractive index of 2), the gaussian beam
propagates at an angle of 10 degrees. The standard far field projection in the substrate shows the beam continues to
propagate at a 10 degree angle. When the far field refractive index is changed to 1, the angle of the beam shifts to
about 20 degrees. Snell's law can be used to confirm this is the expected shift:
n sin( q1 )
q 2 = a sin 1
n2
2 sin( 10)
= a sin
1
= 20.3 deg
Fresnel correction
Alternatively, it is possible to calculate the far field data using the 'near' field refractive index, then use Snell's law
and the Fresnel equations to account for the far field interface. Snells' law is used to calculate the change in
propagation direction that occurs when the fields pass from one material to the other. The Fresnel equations are
used to account for the fraction of power that is lost due to reflection from the interface. The details of this calculation
can be found in the associated example files. In particular, see the analysis script of the 'far_field_change_index'
analysis group.
This approach can be slightly more complicated that the first method, but it is recommended when it is necessary to
get correctly normalized field amplitudes and power measurements. The example script will calculate the |E|^2 in the
far field using the default projection (assuming the substrate with an index of 2 extends to infinity), using the plane
wave expansion method with a far field index of 1, and using the Fresnel correction using a far field index of 1.
Note:
It is important to understand that multiple reflections (between the interface and the device in the FDTD
simulation) effects are not taken into account by this technique. Fortunately, such reflections are often small,
making this approximation valid in many situations.
Objective
This page describes how to calculate fields outside of a closed surface using a box of monitors and the far field
projection functions.
Lumerical provides many built in analysis groups in our object library. Please press this button to open
the online library of analysis groups and select the far field category to see which analysis groups are available.
Note: The descriptions and examples of the far field projection calculation on the following pages are primarily
intended for users of FDTD Solutions. For users interested in calculating far field projections with MODE Solutions,
these descriptions are basically still correct, although some subtle differences do exist. For more information and
examples on far field projections in MODE Solutions, please contact support@lumerical.com.
In this topic
Projections from a monitor box 817
Changing the far field refractive index 814
Related publications
Allen Taflove, Computational
Electromagnetics: The Finite-Difference Time-
Using the surface equivalence theorem, it is possible to show that fields radiated outside of a closed box by sources
located inside the box can be determined exactly from the field components at the surface of the box. Since
Maxwell's equations are linear, the fields outside of the box can be computed by calculating the far field projections
for each surface of the monitor box and then summing the results.
The associated files for this section, the usr_farfield_angular.lsf script file and
usr_farfield_symmetry.fsp simulation show how to use this method to obtain the electric field and intensity
in the far field due to two point sources. For sake of simplicity this simulation only contains two dipoles surrounded
by a box of monitors. However, this method also works when there are structures located in the monitor box. See,
for example, the Mie 3D application example.
A perspective view of the simulation is shown below to the left. The yellow box in the image shows the edges of the
monitors, which are grouped together in an analysis group. When the simulation has been run, the
usr_farfield_angular.lsf script file can be used to run the analysis script and create the plot of the far field
data shown below to the right. All of the far field projection script is contained in the analysis group, and the script
file is used to run the analysis script plot the resulting data.
Note: Negative signs in front of far field projections when the normal to the
monitor box points along the negative axis.
In the case where no symmetry is used, the scat analysis group contained in the
usr_farfield_symmetry.fsp simulation computes the far field projection from the sum of the far field
projections from the six monitors which make up the monitor box. Notice the negative sign on some terms.
E2_far = farfieldexact("x2",x,y,z) + farfieldexact("y2",x,y,z) + farfieldexact("z2",x,y,z
-farfieldexact("x1",x,y,z) - farfieldexact("y1",x,y,z) - farfieldexact("z1",x,y,z);
The negative sign is required because the projection needs information about the projection surface normal. In the
image below, the projection normal points outwards from the monitor box for the left monitor (x1) and right monitor
(x2) are depicted with red arrows. However, the far field projection function does not know which monitor is on the
left; it always assumes the monitor normal is pointing along the positive axis, as depicted with the yellow arrows.
The negative sign in front of the far field projection for the x1 monitor in the equation above corrects for the fact that
the yellow and red arrows point in opposite directions.
Note: Only the farfieldexact, farfieldexact2d and farfieldexact3d commands allow projections
from multiple monitors added to create a total far field projection.
Note: Far field half space analysis vs resolution and number of frequency points
This calculation will take longer than the polar plot. In particular, the resolution and the number of frequency points
can significantly affect the time it takes to computer the half space. Reduce either or both parameters can
noticeable speed up the analysis.
Objective
This page provides an example which uses the polarization ellipse analysis object that creates a plot of the
polarization ellipse of a grating order. From the ellipse, it is easy to determine the primary polarization angle and the
degree of circular polarization. In addition, this analysis group output the polarization handedness for all grating
orders and wavelengths. In this example, the point of view of the receiver (against the propagation direction)
polarization convention is followed.
The polarization ellipse analysis object can be found in the object library in the far field projections
section.
Associated files
usr_pol_ellipse.fsp
See also
Circular polarization 540
Solver - Far field 126
Script - grating projection
1666
Simulation setup
Structures
We create a nanowire polarizer with a series of rectangles of Perfect Electrical Conductor (PEC). These wires
reflect S polarization, but allow P polarization to pass through. It is always a good idea to start an investigation
with a very simple test case. Before studying the nanowire polarizer, we will check our analysis script by
simulating a plane wave propagating through empty space. This is an ideal test case because we know the
measured polarization should match the source polarization. Note, the structures outside the simulation region
are just for visualization purpose.
Sources
The simulation uses two plane wave sources which allow us to simulate linear, circular, or elliptically polarized
light in a single simulation. For example, to create circularly polarized light, set the amplitude of each source
to 1. Set a 90 degree phase difference between the two sources. See the Circular polarization 540 page for
more information.
Simulation region
We use Bloch boundary conditions 471 because the source is at a non-normal incidence.
Monitors
The Polarization ellipse analysis object is composed of a power monitor and some associated script
commands. Lumerical provides many built-in analysis groups in our object library. Please press this button
to open the online library of analysis groups and select the far field category to add a similar object
to any simulation.
The title of the plot should indicate the grating order of interest, the grating order angles, the ellipse major axis
angle and the major/minor axis ratio.
Source
settings:
sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 0
sourc
e_y
phase
:0
Linear
polarizat
ion, 45
degree
Source
settings:
sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 1
sourc
e_y
phase
:0
Circular
polarizat
ion
Source
settings:
sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 1
sourc
e_y
phase
: 90
The above tests indicate that our simulation and analysis script are correctly setup. We can now move on to a
slightly more complicated system, with the nanowire grating structure. This structure acts like a polarizer,
allowing the P polarization to pass through, while reflecting most of the S polarization. After running the
simulation with a circularly polarized source, we get the following polarization ellipse. The ellipse clearly
indicates that most of the S polarization has been removed, as expected.
Circular
polarizat
ion
Source
settings:
sourc
e_x
amplit
ude: 1
sourc
e_x
phase
:0
sourc
e_y
amplit
ude: 1
sourc
e_y
phase
: 90
Objective
This section describes a number of techniques for calculating power absorption per unit volume (Pabs) due to
material absorption. The files in this section were created using FDTD Solutions, but a similar approach can be
applied for MODE Solution's propagator. Once Pabs is known, it is easy to calculate absorption in some volume by
integrating the loss function over that volume.
Lumerical provides many built in analysis groups in our object library. Please press this button to open
the online library of analysis groups and select optical power category to insert the analysis groups shown here.
In this topic
Simple method 827
Advanced method 831
Advanced method - multiple materials 834
The following sections provide three techniques for calculating power absorption per unit volume (Pabs).
This section describes the standard technique used to calculate power absorption per unit volume. Power absorption
is proportional to the electric field intensity and the imaginary part of the permittivity. Therefore, the calculation
requires field data from a frequency domain power monitor, and permittivity data from an index monitor.
The advanced method is an extension of the simple calculation that minimizes interpolation errors near interfaces.
This technique is appropriate for simulations with large field discontinuities at the structure interfaces. Such
discontinuities are common in simulations involving metals.
This section describes how to calculate the absorption per unit volume from the divergence of the Poynting vector.
Divergence calculations tend to be very sensitive to numerical problems, which makes this technique inferior to the
other techniques described in this section. This method is presented only because it was a recommended approach
in earlier versions of FDTD Solutions.
Objective
This page describes how to calculate the power absorption per unit volume (Pabs) due to material absorption. Once
Pabs is known, it is easy to calculate total absorption in some volume by integrating the loss function over that
volume.
Associated files
usr_absorption.fsp
usr_absorption.lsf
usr_absorption2D.fsp
usr_absorption2D.lsf
See also
Advanced method 831
Advanced method - multiple materials 834
Theory
The absorption per unit volume can be calculated from the divergence of the Poynting vector,
r r
Pabs = -0.5real ( P )
It is possible to calculate the absorption directly from this formula (see the Divergence of Poynting vector
section), but divergence calculations tend to be very sensitive to numerical problems. Fortunately, there is a
more numerically stable form. It can be shown that the above formula is equivalent to
r r
Pabs = 0.5real (i wE D * )
With a little more work, we get the desired result
2
Pabs = -0.5 w E imag ( e )
To calculate the absorption as a function of space and frequency, we only need to know the electric field
intensity and the imaginary part of the permittivity. Both quantities are easy to measure in an FDTD
simulation.
Simulation setup
The example simulation is composed of an Air - Glass - Si stack. A focused beam is incident on the stack.
Air and Glass are not lossy materials, so we only expect absorption to occur in the Si layer.
A 3D power monitor is used to measure the electric field intensity. Similarly, an index monitor is used to
measure the permittivity. Both monitors should be the same size. 3D monitors tend to require large amounts
of memory, so they should be kept as small as possible. In this example, both monitors cover the entire
simulation region, but this is only to demonstrate that the loss is zero in the Air and Glass regions.
Calculating Pabs
Run the simulation and then run the analysis script, which will create a number of figures. The first three
figures show a cross section of the electric field intensity and material properties at y=0 for the second
frequency point (approx 400nm).
From this data, the script calculates the material absorption as a function of space and frequency. A cross
section of the absorption function is shown below. Notice that loss only occurs in the Si layer.
2. Use the transmission function and a set of 2D power monitors to measure the amount of power flowing into
and out of the Si layer. The difference between these values will be the material absorption. In this example, T2
measures the power flowing into the Si, and T1 measures the power flowing out. To be strictly correct, there
should also be monitors at the sides of the Si layer, but they were not added to this simulation because most
of the power is flowing in the Z direction.
Both techniques give similar results. If a smaller mesh size was used (default mesh accuracy=2), the results
would be even closer. Also, although we don't see it in this example, the discrepancy can increase slightly at
the shorter wavelength where the absorption of the Si is higher. This is due to some numerical errors in
integrating the loss in the first dz of the Si and can be improved by using the Advanced method 831 .
The following figure shows a cross section of an integration filter for a sphere centered at (0,0,-200 nm) and a
radius of 200nm.
The final output of the script is the percentage of power absorbed within the spherical region at a wavelength of
400nm: ~1%
Objective
This page describes a more advanced spatial absorption calculation which minimizes interpolation errors that occur
because of discontinuities in the electric field near interfaces. Consider using the advanced method if a significant
fraction of the absorption occurs within the first mesh cell at interfaces.
Associated files
usr_absorption_advanced.fsp
usr_absorption_advanced.lsf
mie_au_jc_fdtd.txt
2D example:
usr_absorption_advanced_2D.fsp
usr_absorption_advanced_2D.lsf
See also
Simple method 827
Advanced method - multiple materials 834
Background
This technique is an extension of the simple method 827 described on the previous page. For reasons given on
the previous page, the advanced method calculates the absorption profile using the relation
2
L = -0.5 w E imag ( e )
The difference between the two techniques is the monitor interpolation option.
An inherent part of the FDTD method is that during the simulation, each field component (Ex, Ey, Ez) is
calculated at a different location within the Yee cell. If a monitor collects raw field data from the simulation,
post processing becomes complicated due to the fact that each field component is known at a different
location. Even simple calculations like |E|^2 = |Ex|^2+ |Ey|^2+ |Ez|^2 are not trivial since Ex, Ey, and Ez are
not known at the same location.
To simplify post-processing of simulation data, the default behavior of monitors in FDTD Solutions is to
interpolate all field components back to a common set of points (the origin of the Yee cell). This makes post-
processing simple, since all field components are known at a common point.
In most situations, the interpolation errors that occur when interpolating each field component back to the
origin of the Yee cell is negligible. Unfortunately, the absorption calculation can be quite sensitive to these
interpolation errors. The interpolation errors only become significant when:
The electric field component normal to the structure surface is large AND
a significant fraction of the total absorption occurs within the first set of mesh cells at the structure surface.
From Maxwell's equations, we know that the field component normal to the structure surface will be
discontinuous at the interface. Also, it is obvious that interpolating near a discontinuity can lead to errors. In
the absorption calculations, the interpolation error typically makes the electric field just inside the absorbing
material much larger than it really is. Since absorption is proportional to electric field intensity, this will tend to
overestimate the total absorption.
Note that these errors only occur for the mesh cells which cross the material interface. If the absorption in the
mesh cells that cross the interface is a small fraction of the total absorption, then the overall error will be
small. However, if most of the absorption is concentrated near the surface (as is the case with metals), then
the overall error can be significant.
Example
The simulation file usr_absorption_advanced.fsp can be used to calculate the power absorption per
unit volume of a gold sphere illuminated by a focused beam.
Run the simulation, then run the associated analysis script. It will create a figure showing the absorption
spectrum as calculated by the three techniques. The analytic solution (calculated from Mie theory) is also
shown.
To increase the accuracy of the example file, make the following changes:
Simulation X, Y, Z span: 2um
Mesh override region mesh size: 1.5nm
PML layers: 24
Warning: The memory requirements and file size will be very large with these changes.
Objective
This example shows how to calculate the power absorbed in a specific material when there are two (or more)
dispersive materials in a simulation and objects are of arbitrary shapes where it would be difficult to define the a
spatial filter. This example applied both 2D and 3D cases.
Associated files
usr_absorption_advanced_material.f
sp
usr_absorption_advanced_material.l
sf
See also
Simple method 827
Advanced method 831
Divergence of Poynting vector 837
The advanced absorbed power monitor group returns the power absorbed as a function of space, ie Pabs(x,y,z).
Once the project file is run, executing the usr_absorption_advanced_material.lsf file will multiply Pabs(x,y,z) by 1 if
the (x,y,z) values are inside the silver particle and 0 if they are outside.
We can use the material properties of Silicon and Silver to tell if a specific point (x,y,z) lies inside particle or not.
The script, uses the index monitor inside the Pabs box to create the filters by comparing both the real and imaginary
parts the index of every point in the simulation to those of Silver and Silicon. The figure below shows the filter
generated for Silicon:
Running the script will generate the following plots for total absorption, and absorption spectra in the two materials.
Objective
This section describes how to calculate the absorption per unit volume from the divergence of the Poynting vector.
Divergence calculations tend to be very sensitive to numerical problems, which makes this technique inferior to the
other techniques described in this section.
Associated files
usr_absorption_divergence.fsp
usr_absorption_divergence.lsf
See also
Loss per unit volume 826
The loss per unit volume can be calculated from the Poynting vector by
dL 1 r
dV
(
= - real P
2
)
Consider the example file usr_absorption_divergence.fsp. The simulation consists of a gold nanoparticle in
a background material that has an index of 1.5 + i0.05. A TFSF source is used to excite the simulation and a 3D
power monitor is used to measure the Poynting vector.
We want to measure the power absorbed in the gold nanoparticle. If the background was not absorbing, a box of 2D
power monitors around the particle could be used to measure the total absorbed power. In this case, since the
background is also absorbing, the box technique will not work. Instead, we will measure the Poynting vector as a
function of (x,y,z), and calculate the loss with the above formula. The loss per volume can be integrated over the
volume of the gold sphere, giving the total power absorbed by the gold.
Load the file usr_absorption_divergence.fsp, and run the simulation. When the simulation is complete, run
the script usr_absorption_divergence.lsf. It will calculate the total power absorbed within the box of
monitors using two techniques. First, with a box of 2D monitors measuring the transmission through each surface.
Second, by calculating the loss per unit volume, then integrating over the entire volume of the box. Both techniques
give 48% absorption.
Next, the loss within the gold particle is calculated by integrating the loss over the volume of the sphere. It is quite
small, only 0.1% of the total power. This seems reasonable after looking at a slice of the loss per unit volume in the
XY plane. There is only a small amount of absorption in the particle very close to its surface. The matching slice of
the integration filter is also shown. The power absorbed in any arbitrary volume can be calculated by modifying the
integration filter.
Note:
3D monitors can require large amounts of memory and computation time. Therefore, it is best to keep them as
small as possible. Similarly, keep the number of frequency points small, and only record the field components that
are necessary. In this example, only the Poynting vector was saved, not the E and H field components.
Objective
In some cases, it is interesting to understand if power is flowing forwards or backwards in a particular plane of a
simulation. In this example, we show how this information can be obtained for a simulation with periodic or Bloch
boundary conditions when there is a planar region of homogeneous, low-loss dielectric material.
This information cannot easily be determined from considering the Poynting vector alone. If we consider a simple
example of a plane wave incident upon a perfectly reflecting boundary, the Poynting vector and the total transmitted
power through a plane will be zero because the total normalized transmitted power is 1 (incident wave) - 1 (reflected
wave) = 0. This is not easy to distinguish this from the case of zero fields everywhere, which also gives a total
normalized transmitted power of 0.
In this example, we use the power direction analysis object which uses farfield and grating projections to decompose
the measured E and H fields onto a basis state of forward and backward propagating plane waves. The forward power
is then calculated by summing the power in all the forward propagating plane waves, and similarly for the backward
propagating power. This method has some numerical errors that are largest when we have plane waves propagating
at very steep angles to the measurement plane. For this reason, the forward transmission minus the backwards
transmission may be different from the net transmission, measured simply by integrating the Poynting vector, by a
few percent. The power direction object can be inserted from the object library in the optical power section.
Associated files
usr_power_direction.fsp
usr_power_direction_test.lsf
Example
In this example, we consider light incident at 20 degrees in a medium of dielectric index 1.4. The light propagates
towards a gold ellipsoid on a substrate of index 2. Bloch boundary conditions are used, meaning that we are
considering the light incident on a periodic array of these gold nanoparticles. The period is 1 micron in both x and y.
We place a special analysis group for this calculation between the source and the particle so that it measures both
the incident and reflected field. For the purpose of testing, we also place a reflection monitor behind the source. The
analysis group contains a planar power monitor and also a small index monitor because it is necessary to know the
refractive index where the fields were measured. It is important to note that this calculation is only valid if:
1. The imaginary part of the refractive index is very small or zero. We ignore the imaginary part in this calculation.
2. The material is completely uniform over the plane where the monitor is recording the field.
3. Periodic or Bloch boundary conditions are used. This method could be extended to cases where PML is used as
long as the fields go to zero near the edges of the simulation. Please contact Lumerical support if you would like
to explore this case.
We see that all methods agree reasonably well, but there is the largest error in T_positive-T_negative because this
method involves the plane wave decomposition that introduces some more numerical error.
Figure 1 Figure 2
Objective
This page provides a simple analysis group that calculates the net power flow out of a rectangular volume within a
simulation. The files in this section were created using FDTD Solutions, but the same analysis group can be found in
the Component library in MODE Solutions.
Lumerical provides many built in analysis groups in our object library. Please press this button to open
the online library of analysis groups and select optical power category to insert transmission boxes.
Associated files
usr_transmission_3Dbox.fsp
usr_transmission_2Dbox.fsp
See also
Loss per unit volume 826
The monitor group in the associated files calculates the net power flow out of the box of monitors. To use this group
to calculate net power flow into the box, just multiply the result by -1.
For example, in the associated files, we have a small silicon particle in a focused beam. The box of monitors can be
used to measure the power absorbed by the particle. After running the simulation, use the following commands to
plot the absorption vs wavelength. Once the visualizer is open, you may want to use the "-Real" option to make the
numbers positive, since power is flowing into the box.
runanalysis;
net_power = getresult("trans_box","T");
visualize(net_power);
Note: Symmetry
These monitor boxes work properly when symmetry boundary conditions are used. When symmetry boundary
conditions are used, the monitor group assumes there will be equal power flows on both sides of the plane of
symmetry.
Associated files
usr_transmission_3Dsphere.fsp
usr_transmission_2Dsphere.fsp
5.6.6.6 Optoelectronics
This page lists all analysis groups available in Optoelectronics.
Q analysis 1807
Objective
This page provides a simple analysis group that calculates the effective mode area.
Associated files
usr_effective_mode_area.fsp
See also
Modal volume 846
Related Publication:
L.D. Landau, E.M. Lifshitz, L.P. Pitaevskii
(1984). Electrodynamics of Continuous
Media. Vol. 8 (2nd ed.). Butterworth-
Heinemann. ISBN 978-0-750-62634-7.
The effective mode area, A, is the ratio of a mode's total energy density per unit length and its peak energy density
1
A= W (r )dA
max {W (r )}
A
1 d[we (r )] r 2 1 r 2
W (r ) = Re E ( r ) + m0 H ( r )
2 dw 2
Example
The usr_effective_mode_area.fsp simulation contains a simple silicon on insulator (SOI) waveguide shown
in the image above. To get the effective mode area for the injected mode, first run the simulation. Then edit the
effective mode area analysis group and press the RUN ANALYSIS button in the ANALYSIS->SCRIPT tab. As can be
seen in the image below, the analysis script output will contain the calculated effective mode area.
In the screen shot above, you can see that the analysis script contained in the usr_effective_mode_area.fsp
simulation uses two methods to compute the effective mode area. The two methods only differ in how the derivative
in the energy density is computed. Method 1 uses central differences on the derivative on the left hand side of the
equation below. And method 2 uses central differences on the derivative on the right hand side of the equation.
d[we (r )] d [e ( r ) ]
Re = Re w + e (r )
dw dw
Objective
This page provides simple example using the modal volume analysis object that can be used to calculate modal
volume of a confined mode. This object is available in the object library in the resonators section. A modal area
analysis object is also available from the object library for 2D simulations.
Associated files
usr_mode_volume.fsp
See also
Effective mode area 845
V=
eE dV
max( eE 2 )
3 (default)
V=
( H 2
dV )2
4
H dV
It is worth noting that more sophisticated definitions of modal volume exist. If these definitions are not sufficient for
your needs, these examples can be used as a starting point for you to create your own custom modal volume
analysis object.
This section provides information on convergence testing techniques for the following solvers:
FDTD 847
EME 857
5.6.7.1 FDTD
This page provides a thorough method for convergence testing of results from an FDTD simulation, so you can
determine the possible sources of error in a simulation, and quantify the level of convergence.
This topic uses a 2D Mie scattering example so that a highly accurate analytic result can be calculated using Mie
theory. This will allow us to determine precisely the level of error from our FDTD simulations, but we will consider
how to estimate your level of error when a more accurate solution is not available.
The analytic result from Mie theory is contained in the nanowire_au_jc_theory_from_mcm_fit.txt file. The
testing_convergence.fsp and testing_convergence_analysis.lsf simulation and script files can be
used to generate the plots shown on this page.
Associated files
testing_convergence.fsp
testing_convergence_analys
is.lsf
nanowire_au_jc_theory_from
_mcm_fit.txt
mesh is not identical to free space. The dispersion relation of FDTD can be calculated precisely for a given
mesh size (see getnumericalpermittivity 1674 ). In principle this source of error can be reduced indefinitely by
reducing the spatial and temporal mesh to 0. However, computers always use finite precision numbers
(whether floating, double or other) and there is always a limit to how far the mesh size can be reduced
without introducing new sources of numerical error. Finally, many first time users incorrectly assume that
this is the major source of error in their simulations. Given the computational costs of using a small mesh,
it is important to understand the actual contribution that this makes.
4. The staircasing effect. When dx, dy, dz and dt are finite, it is not possible to resolve geometric
features to arbitrary resolution. Lumerical's conformal mesh can make convergence much faster for many
geometries and materials, however, there will always be a geometric error for a finite sized mesh. As
discussed above, this error can be reduced by making the mesh size smaller, but eventually other
numerical considerations due to the finite precision of the numbers used will limit how small dx, dy and dz
can go.
5. The multi-coefficient model fit. In the FDTD method, it is not possible to use the dispersive
refractive index as a function of wavelength (or frequency) directly. Instead, we must fit our dispersive
material properties to models that can be solved efficiently in the time domain. Lumerical's multi-coefficient
model makes it possible to obtain good fits even for highly dispersive materials, however, there is always
error in the fit.
6. The finite sized temporal mesh. When dt is finite, the permittivity (ratio of D/E) is not exactly
equal to the theoretical model used to fit the dispersive materials. This leads to an additional discrepancy
between the dispersive material properties. Again, this discrepancy can be calculated precisely. Please
see getnumericalpermittivity 1674 for more details.
7. Non-uniform meshing. Graded meshing introduces new sources of error. The graded regions can
lead to small amounts of gain or loss, and the change in mesh size leads to a change in grid dispersion
which results in small amounts of scattering. In addition, regions with different mesh sizes can support
propagation of different frequencies of light which means that high frequency light can stay trapped in a
region with a small mesh size and eventually lead to aliasing problems for downsampled Fourier
transforms. Also, grading of the mesh can affect the PML performance and lead to more reflections.
Despite all these small sources of error, the non-uniform mesh allows us to reduce other sources of error,
namely the grid dispersion and the staircasing effects, in a highly computationally efficient way and the
benefits well outweigh the costs of using it.
8. Sources. There are a variety of small errors with sources. For example, all sources will have a small
reflection which gets worse further from the center frequency of the source. This problem is reduced as the
mesh size decreases. In addition, some sources use a mode profile or a beam profile which is calculated
only at the center frequency of the source. At other frequencies, the profile will not be exactly correct and
this will lead to increased reflection for broadband simulations. These reflections are of course small and,
when they cannot be ignored, can often be worked around to still perform broadband simulations. Please
see Mode source - Broadband 576 for an example of how to work around these issues.
9. Monitors. Monitors by default will interpolate the fields to certain desired locations, leading to additional
interpolation error. For advanced calculations, this feature can be disabled. Please see this link 831 for an
example.
Note: Spatial interpolation - NONE setting
Disabling the spatial interpolation is a very advanced feature. Only expert users that are very familiar with
the FDTD method should consider using this feature. Most standard analysis functions (such as the
transmission script function, the data visualizer, etc) assume that the spatial interpolation is
enabled. They may not give the most accurate result when used to analyze such monitor data. All
analysis must be done manually. See the advanced tab 645 of frequency monitor.
10. Limits on the size of the mesh. Single precision numbers have approximately 7 decimals of
precision. Finite-difference methods rely on taking spatial and temporal derivatives and performing integrals.
Clearly, if we oversample a wave, we may lose the ability to calculate accurate derivatives or integrals. This
will occur when dx ~ lambda/1e7 for floating precision and about lambda/1e16 for double precision
calculations. In practical terms, this will almost never occur - for example, for 1000nm light, you could
encounter difficulties when dx ~ 1e-4nm - much smaller than most realistic FDTD simulations. FDTD
Solutions uses an efficient combination of floating and double precision numbers for different parts of the
calculation, so the single precision limit should be considered.
Example simulation
We will consider the extinction
cross section, which is the sum of
the scattering and absorption cross
sections, of a gold nanowire in the
wavelength range of 300nm to
1000nm. The nanowire diameter is
140nm.
(s - s ) d l
2
i i -1
D s (i ) =
(s ) d l
2
i
where i = 1,...,N is the step for each parameter. Ideally, we want to determine the point where this quantity
becomes close to 0. In reality, we may see that s(i) becomes flat at some point which means that the error
is being dominated by another parameter but the current parameter still has an effect. For example, if our
principle error is due to reflections from the PML, then we may see that s becomes flat as we vary the
distance to the PML. This is because the reflections from the PML are the principle cause of the error (which
will introduce ripple into the spectrum) but the position of those ripples will constantly change as the distance
to the PML varies.
(s - s ) d l
2
i N
D s N (i ) =
(s ) d l
2
i
which can also give us an estimate of the error at parameter value i if we assume that the result with
parameter N is much closer to the exact solution than with parameter i. While this gives a good estimate of
the absolute error when i << N, it obviously does not give a good estimate when i ~ N where the error will be
significantly underestimated. Still, this is the quantity that will give us the best estimate of error in the absence
of the exact solution.
To quantify the error (or difference) between different tests, we can use the following definition
(s - s2 ) dl
2
1
D s 1- 2 (i ) =
0.5(s )
2
1 + s 22 d l
For our Mie scattering test case with a known solution, we will define the the exact error as
(s (i) - s ) d l
2
theory
D s theory (i ) =
(s ) d l
2
theory
which allows us to look at the convergence in absolute terms. This will also allow us to test our estimate of
the absolute error without knowing the exact result as defined above. If so, we can apply these methods to
problems where the exact solution is not known.
As another example, consider the quality of Lumerical's multi-coefficient model (MCM) for Gold. The figure
below shows the MCM fit to the refractive index of gold provided by Johnson and Christy. On the same figure,
are the refractive indices of gold provided by the CRC handbook, and by Palik's handbook. It is clear that the
MCM model is not a perfect fit for gold which is highly dispersive over this wavelength range. However, the
difference between the MCM fit and Johnson and Christy is smaller than the difference between different
experimental results for gold by different authors! The optical properties of gold have been well studied, and it
is a relatively easy metal to measure (compared to metals that oxidize much more quickly), so we can expect
the differences in experimental results for other metals to be even larger. Before spending a great deal of time
getting a better fit, it is worth considering if your fit is within the experimental error you have on your material
data.
Real part of the refractive index Imaginary part of the refractive index
We want to reduce the PML reflectivity and focus on the error that comes from having the evanescent mode
fields overlap with the PML. To do this, we set the minimum PML layers to 12 in the Advanced Options of
the FDTD simulation region. In addition, we set the mesh accuracy slider to 2 and we set the inner mesh
size over the particle to 5nm by setting the dx_max and dx_min in the mesh group object to 5nm. We use
the default conformal mesh setting, which means that conformal meshing will not be applied in this case
because we have a metal/dielectric interface. We use the parameter sweep object sweep_PML_distance to
first perform 10 steps which will vary the simulation span from 0.5 to 5 microns. In this case, the sphere
radius is only 35nm, so the distance from the structure to the PML is approximately half the simulation
span.
Spectrum for various PML distances from 0.25 to 5 Zoomed in view where we can see differences in the
microns. Note that you cannot see any difference results
between results on this scale.
The simulation span is varied from 0.5 to 5 microns in 20 steps. This corresponds to a PML distance change
of approximately 0.25 microns to 2.5 microns.
Looking at the above figures, we can estimate that our PML distance will contribute less than approximately 1e-
3 (0.1%) by about 2 microns in simulation span (a PML distance of about 1 micron). If we get to the point of
needing to reduce our error further than that, we will have to come back to this setting and increase the
simulation span further.
PML layers
We now set the simulation span at 2 microns, and leave the mesh accuracy settings the same as before.
Now we want to sweep the PML layers setting. We will sweep 5 points between 2-32 layers. The parameter
sweep object sweep_PML_layers will perform this calculation. The results are shown below.
With the current settings, increasing the number of PML layers is not important as the contribution to the error
is on the order of 3e-5 (0.03%) for all points in the sweep. However, we may need to return to this error,
especially later when we introduce significant mesh grading that can reduce the PML performance.
Mesh accuracy
After setting the PML layers to the default value of 8, we sweep the mesh accuracy slider for a 5nm mesh over
the particle.
Based on the above results, we can operate at a mesh accuracy of 4 and we estimate a contribution to the
overall error of about 1e-3 (0.1%).
Sweep the inner mesh
We set the mesh accuracy slider at 4 (this corresponds to a target mesh size of 18 points per wavelength)
and now we will sweep the inner mesh region. We will sweep this mesh from dx=5nm to dx=0.5nm in 20
steps. We use a geometric sequence for these 20 steps with
i -1
dx N -1
dx(i ) = dxmax min
dxmax
so that we include more points at smaller values of dx than a linear spacing would give us. The results are
shown in the figures below. We see that as the mesh size decreases, s becomes smaller and smaller until
about 3nm, At that point, the results continue to change on about the same scale from point to point, and the
error is likely on the order of 1%. This is an indication that another parameter is affecting our results. To test if
this is the PML, we can increase the minimum number of layers of PML as done in the following section to try
and reduce the PML reflectivity. The PML pefromance be degraded as the inner mesh size is reduced and this
error can be seen in the spectrum in the form of small interference ripples which are preventing us from
converging on an unchanging result even though the mesh size is getting smaller. We can conclude that we
should increase the minimum number of PML layers as the mesh size decreases to compensate for the effect
on PML.
Without using enough PML layers, our error is on the order of 1% at a 3 nm mesh.
Inner mesh and increase PML layers
Based on the previous steps, we can see that the PML reflectivity and the inner mesh size are currently the
largest sources of error. We will sweep the inner mesh using the same geometric series as above but in this
case we will sweep from dx=5nm to dx=0.1nm. In addition, we set the number of PML layers to 64 which
should be large enough to reduce the influence of the PML significantly. Please note that in a 3D simulation, it
would make sense to sweep the PML layers at this point to determine how many are actually required and
alternate between increasing PML layers and reducing the mesh size.
Sweep of the inner mesh size from 5nm to 0.1nm. The Zoomed in view of the figure on the left.
PML has 64 layers and the mesh accuracy slider is
set to 4.
We see that at dx=1nm, our absolute error is about 1%. For mesh sizes above 1nm, the sN number tracks
the actual error very well, as expected. Note that the absolute error by the 0.1nm mesh is reduced to about
2.5e-3 (0.25%). Finally, since s is becoming essentially flat by 0.1 nm, and is on the order of 1e-4, we see
that other sources of error with similar sizes of s such as the distance of the PML, PML reflectivity and the
mesh size outside the inner region are beginning to play an important role.
Multi-coefficient model fits
Until now, we have been comparing the FDTD results to the theoretical results calculated using the MCM fit to
the gold data. If we compare to cross section calculated from the original Johnson and Christy gold data, we
see that this is by far the most significant contribution to the error. In fact, the calculate absolute error is
approximately 4.2%. However, this is smaller than the error between the results calculated with the material
data from 3 different sources! In the figures below, the FDTD results were calculated with a mesh accuracy of
2, a 1nm mesh and all other default settings, which can be run in a few seconds. For comparison, the error
between the FDTD result and the result calculated using the MCM fit is 1.3%. If we are concerned about
accuracy compared to experimental results for this type of simulation, the error in the material data is likely to
be by far the dominant source of error. Nonetheless, it is useful to understand the convergence of FDTD
towards the exact solution of Maxwell's macroscopic equations and for this it is best to compare the FDTD
results to the results calculated using the MCM.
Comparison of FDTD results to the Comparison of cross sections Comparison of cross sections
results calculated from the raw calculated from the raw material calculated from the data of 3
material data. The FDTD results data and from the mcm fit. The sources: Johnson and Christy,
were calculated with a mesh error between these results is 3.6% CRC and Palik. The error between
accuracy of 2, a 1nm mesh, and all the Johnson and Christy result and
default settings. This can be run in the CRC and Palik results are
a few seconds. The error between 4.7% and 4.2% respectively.
these results is 4.2%.
Finite sized dt
A further complication of the MCM is that the actual numerical permittivity at a finite value of dt is not the same
as the MCM model in the limit dt->0. The numerical permittivity for a finite dt can be calculated using the script
function getnumericalpermittivity 1674 . In most cases, the difference is negligible and this is the case here. In
the figure below, we see a comparison of the scattering cross section using the MCM fit and the actual
numerical result with dt=1.17e-17s - the size of dt used when the inner mesh region is 5nm. The difference
between these curves is 0.01% which is negligible compared to other sources of error, and this difference will
become much smaller at smaller mesh sizes because dt is reduced as the spatial mesh gets smaller.
Conformal mesh
The conformal mesh is not a benefit for the wavelength range of this simulation. It introduces spurious
resonances into the spectrum at longer wavelengths for larger mesh sizes. Ultimately, it gives faster
convergence over the entire wavelength range, but in this case only at the smallest mesh sizes. These
spurious resonances can occur with the conformal mesh when considering metal/dielectric interfaces and are
the reason that the default "conformal" mesh setting does not apply the algorithm to metal/dielectric
interfaces. However, for many wavelength ranges involving metals the conformal mesh provides much faster
convergence and should be used. To turn on the conformal mesh for all interfaces, we use the "conformal
variant 1" setting. Here we see that if we consider the error over the entire spectrum, the conformal mesh only
gives a better answer at mesh sizes below 0.1nm. However, if we consider the error only over the range from
500nm to 560nm, which includes the resonant peak, then the conformal mesh gives a significantly lower error
at all mesh sizes considered. This means that if the resonant wavelength or linewidth were the main simulation
result, then conformal meshing should be used.
The figure below shows the error compare to theory In this zoomed in view of the same result, we see that
for the staircase and conformal meshes as a function the conformal mesh is likely to outperform the
of mesh size. We can see that at mesh sizes of staircase mesh only at mesh sizes below about
0.1nm to 5nm, the staircase mesh actually has lower 0.1nm, which means we should not use it for this
error, however the conformal mesh is converging particular measurement over the entire wavelength
more quickly to the correct answer. range of 300nm to 1000nm.
The figure below shows the error compare to theory In this zoomed in view of the same result, we see that
for the staircase and conformal meshes, where the the conformal mesh provides an error at a 1nm mesh
error is calculated only from 500nm to 560nm, which that is comparable to the error with the staircase
includes the main resonant peak. In this range, where mesh at 0.1nm. Clearly, if we are considering the
the spurious resonances do not appear, the extinction cross section from 500nm to 560nm, for
conformal mesh gives a consistently better answer at example to determine the resonant wavelength and
all mesh sizes from 0.1nm to 5nm. linewidth, then the conformal mesh should be used.
Non-uniform meshing
The non-uniform meshing is not currently limiting the error for this type of simulation. Experimenting with
different grading factors, uniform meshes and eliminating the downsampling of frequency domain monitors
performing fourier transforms does not substantially improve the error. Of course, as other sources of errors are
eliminated this will eventually become important.
Sources and monitors
The analysis performed here and the TFSF source used mean that source injection error and monitor
interpolation errors are not a major contributor to the error. In addition, these errors will be reduced in this
examples as the inner mesh size is decreased.
Conclusions
With care and enough computational resources, and within the limits of finite precision numbers, FDTD can
give almost arbitrarily accurate answers to the macroscopic Maxwell's equations for any geometry, assuming
the material permittivities are given by the multi-coefficient model. The figure below shows the extinction cross
section calculated from Mie theory and FDTD, and the difference between the curves is 0.15%. This could be
further improved by repeating many of the steps above.
5.6.7.2 EME
Associated files
pol_converter.lms
testing_convergence_EME.lsf
See also
EME error diagnostics 783
FDTD convergence testing 847
The following are some sources of error in an EME simulation which are also present in an FDTD simulation,
and convergence testing for these properties is discussed in more detail in the FDTD convergence testing 847
page:
3. The staircasing effect in the transverse direction. When dx, dy, dz are finite, it is not
possible to resolve geometric features to arbitrary resolution. Lumerical's conformal mesh can make
convergence much faster for many geometries and materials, however, there will always be a geometric error
for a finite sized mesh. As discussed above, this error can be reduced by making the mesh size smaller, but
eventually other numerical considerations due to the finite precision of the numbers used will limit how small
dx, dy and dz can go.
4. The proximity of PML. If we are studying a mode that has evanescent fields, the PML will introduce
errors if a non-negligible amount of the evanescent field comes in contact with the PML. This will, for example,
reduce the quality factor of a resonance or shift the frequency of a resonance.
5. The reflection from the PML. The PML always has some reflection which can be theoretically
calculated and changes with incident angle. Any reflection from the PML can re-interfere with the source,
leading to incorrect power normalization, or simply re-interfere with the true scattered fields of the structure as
they would exist in an ideal, unbounded space.
Example simulation
We will consider the pol_converter.lms simulation file which simulates the structure from the Polarization
converter 2130 application example which simulates straight silicon ridge waveguides connected by a tapered
region. The result we will consider will be the conversion efficiency from the TE1 input mode to the TM0 output
mode (ie. |S52|^2 of the user s-matrix result). Please see FDTD convergence testing 847 for the types of metric
one can use to quantify the level of convergence.
The testing_convergence_EME.lsf script file performs convergence testing of the number of cells in the
tapered region, the number of eigenmodes solved for in each cell, and the transverse mesh.
The number of cells to use in the tapered region is varied from 2 cells to 20 cells and the results are plotted
below.
The number of modes solved for in each cell is varied from 4 to 14 and the results are plotted below.
The mesh step size of the transverse mesh set by the mesh override region was varied from 10 nm to 50 nm.
Results are plotted below.
It turns out that for this particular example, the amount of error is relatively small even with the lowest settings
for the number of cells and the number of modes in each cell, with the number of cells in the tapered region
contributing about 0.5% error and the number of modes to use contributing less than 0.015% error. For the
transverse mesh, the amount of error goes up to about 4.5% for the coarser mesh step size, but the error goes
down to less than 0.1% with a mesh step size of 10 nm.
Measuring reflection 860 This page describes three different methods for
measuring reflectance from a structure.
Working with the Poynting vector 863 This page provides some basic information about the
Poynting vector.
Image stitching 867 This page shows how to stitch monitor data obtained
from a single period simulation together to form a super-
cell image.
Making a CW movie 870 This page describes how to create single frequency
(CW, steady state) movies of a simulation, as opposed
to the broadband time domain movies from created by
Movie monitors.
Why is monitor data complex 873 This page explains why monitor data is complex valued,
and the meaning of those complex values.
Far field projections 874 See the solver 126 section.
Using impulse response - response to arbitrary input 874 This page explains how to calculate the time domain
response of a system to an arbitrary source time signal.
Diverging simulations 877 This page describes how to fix diverging simulations.
Testing convergence 847 This page provides some tests and ideas to deal with
convergence.
Associated files
usr_reflection_angled.fsp
usr_reflection_angled.lsf
usr_reflection_interference.fsp
See also
Sources 510
directions. Of course, FDTD is a numerical technique and some level of numerical error must be expected. In
most simulations, these numerical source injection errors are negligible, meaning the method of placing a
monitor behind the source to measure reflections generally works well. However, in some simulations, the
source injection errors can be significant. These issues are more likely to occur when using a source that
injects at an angle, a mode source, or a broadband source.
To understand the effect this back scatter can have on the accuracy of reflection measurements, imagine that
1% of the injected field is backscattered at the injection plane and 10% is actually reflected from the structure.
In this case, the power measured by a monitor behind the source will be
P = E 2 = (0.01 + 0.1) 2 = 0.121 for
a source amplitude of 1. In other words, for this case, the error in the measured reflectivity is 2.1% even
though the backscattered field is only 1%. Interference effects have been the two fields tends to amplify the
effect of any source injection errors.
In the usr_relection_angled.fsp example file, a broadband plane wave source is injected with a center
angle of 30 degrees. One power monitor is placed in front of the source and one is placed behind the source.
By taking the reflection to be 1 minus the transmission from the monitor in front of the source, the reflection
obtained from the monitor in front of the source is closer to the theoretical value than the reflection obtained
using the transmission from the monitor behind the source. The usr_reflection_angled.lsf script plots
the reflection using the two methods and the theoretical reflection.
This technique for measuring reflection assumes that the injected power is normalized to 1. Source injection
errors can also lead to errors in the power normalization. In such cases, it may be necessary to measure the
actual power injected by running a reference simulation and then using this to re-normalize the results of your
main simulation. To do this, use the monitor in front of the source to measure the forward propagating power
in reference simulation that is setup exactly the same as the main simulation, but without the structure (which
could lead to back reflections).
axis. This technique is not generally recommended because the analysis is more complex than the other
methods, it will only work for cases where only a single mode exists, and the accuracy of the result is
dependent on the spatial sampling rate.
In reflection_interference.fsp, a plane wave in a vacuum is normally incident on a dielectric structure with index
n=3. Between the source and the material interface, the amplitude of E^2 oscillates due to interference
between the incident and reflected fields.
We can use the amplitude of E^2 in the region between the source and the interface to determine the power
reflected:
I(x) = I1(x) + I 2(x) + 2 I1(x)I 2(x) cos ( j1(x)- j 2(x))
I(x) will oscillate with amplitude:
A = 2 I1 peak I 2 peak = 2r
for incident intensity 1 and reflectivity R=r^2
2
A
R=
Then, 2
The following plots shows the calculated R using this technique from
usr_reflection_interference.fsp and the measured transmission through a monitor behind the
source. Low spatial sampling rate is a problem here because we cannot accurately measure the amplitude of
the oscillation. Using a higher mesh accuracy setting, or adding a mesh override region would improve the
accuracy of the result.
See also
Poynting vector units 116
transmission script function 1596
Integrating the Poynting vector 865
Definition
The Poynting vector is defined as follows. Poynting vector data is generally obtained from frequency domain
monitors, with the CW normalization option enabled. In such cases, the steady-state Poynting vector data will
have units of Watts/m^2.
r r r
P = E(w) H * (w)
The following code shows how you can manually calculate the z-component of the Poynting vector from the E
and H fields. It also compares to the Poynting vector data automatically recorded by the monitor.
# Get data from monitor
m = "monitor1";
x = getdata(m,"x");
y = getdata(m,"y");
Ex = getdata(m,"Ex");
Ey = getdata(m,"Ey");
Hx = getdata(m,"Hx");
Hy = getdata(m,"Hy");
Pz = getdata(m,"Pz");
Power transmission
The time-averaged power flowing across a surface is given by
1 r r
power ( w ) = real ( P) dS
2S
Note that the propagating power is proportional to the real part of the Poynting vector only, which is related to
the conservation of energy for the time-averaged quantities. The factor of 1/2 is related to the time averaging of
the CW fields. The imaginary part of the Poynting vector relates to the non-propagating reactive or stored
energy, such as one might find in the evanescent tail of light being reflected by total internal reflection (TIR).
As an example, if one simulates a y-propagating source such as a Gaussian bream striking a circular rod in a
2D TM time-domain simulation, then by placing a frequency power or profile monitor on the opposite side of
the rod, the normalized transmission, T, as a function of frequency can be calculated with:
1
( )
real PyMonitor ( w ) dx
T (w) = 2
1
2 ( )
real PySource ( w ) dx
FDTD Solutions/Propagator provide many GUI and scripting functions to make transmission calculations
easily at the press of a button or using a single command. The transmission script command will perform this
particular calculation. See below for more information on integrating the Poynting vector to get net power
measurements.
Interpretation
There can be some confusion about how to interpret complex valued Poynting vector data.
Monitor settings
Frequency monitors
By default, frequency monitors automatically calculate and save Poynting vector data. You can disable this
option (for example, to reduce the file size) in the monitor properties - Data to record tab.
Time monitors
By default, time monitor do not record the Poynting vector. You can enable the Poynting vector in the Data to
record tab.
the monitor. When 'output power' is the only enabled option, the simulation engine still collects the raw field
and Poynting vector data as the simulation runs. At the end of the simulation, it calculates the power flow
by integrating the Poynting vector. It then saves the power data, but does not save the raw field and
Poynting vector data. This can greatly reduce the size of your data files.
Objective
This example shows how to calculate power flow through a monitor by integrating the Poynting vector. It is also
useful as an example of how to do other integrals involving monitor data. In particular, the script file shows a simple
technique for integrating over an arbitrary area, such as a circle. The files in this section were created using FDTD
Solutions, but a similar approach can be applied for MODE Solution's propagator.
Associated files
usr_integrate_poynting.fsp
usr_integrate_poynting1.lsf
usr_integrate_poynting2.lsf
usr_integrate_poynting3.lsf
See also
Transmission 1596
Profile and Power monitors record the Poynting vector by default. Therefore, calculating power is simply a matter of
integrating the Poynting vector over a surface. Normalizing the transmitted power to the source emitted power is
generally more useful than having the result in SI units of Watts.
r r r
P = E conj ( H )
1 r
Power = real
2 surface
P ()
ds
Power
Power _ norm =
SourcePower
The script function transmission can be used to calculate the total power transmitted through a power or profile
monitor. However, to calculate the power transmitted through a portion of a monitor, you must integrate the Poynting
vector over that region.
The following screenshot shows the layout of usr_integrate_poynting.fsp. A plane wave source emits light
in the positive z direction. There is a thin gold layer with a hole in it that reflects much of the light. Monitors are
placed above and below the gold layer to measure transmission and reflection.
Run the simulation, then run the script usr_integrate_poynting1.lsf. The script will first calculate the total
transmission in two ways: using the built in transmission function, and manually integrating the Poynting vector.
The two results should be exactly the same.
Next, the script usr_integrate_poynting2.lsf can be used to integration the Poynting vector over a circular
portion of the monitor. The script will create these two figures, showing the integration filter and the fraction of power
passing through that region.
This example script includes two other possible shapes: a rectangular region and an arbitrary polygon region, shown
below.
Finally, the script usr_integrate_poynting3.lsf can be used to separate the contribution from the field
polarized in the Ex direction from the contribution from the Ey polarized fields. This can be roughly interpreted as
measuring the fraction of power in each polarization. It is important to note that simply integrating one component of
the Poynting vector can not always be interpreted in a simple way. This analysis should not be applied to your
simulation without some careful thought.
In the simulation, notice that the source polarization angle is 30 degrees, which means most of the beam is
polarized in the X direction, with a smaller fraction polarized in the Y direction. This is consistent with the results
shown below, where approximately 2/3 of the power is X polarized and 1/3 is polarized in Y.
Associated files
usr_stitch_image1.fsp
usr_stitch_image2.fsp
usr_stitch_image.lsf
Example 1
The first example shows a dielectric sphere illuminated from below by a plane wave source. Periodic boundary
conditions were used in the X and Y directions. The simulation span was 2um in both X and Y directions. The
monitor measures the E field intensity in the X-Y plane.
Run the simulation usr_stitch_image1.fsp, copy the following script into the script prompt and press
enter. This code is used to setup the variables needed for usr_stitch_image.lsf and to create the final
image.
u=getdata("Monitor1","x");
v=getdata("Monitor1","y");
data=getelectric("Monitor1");
# call script
usr_stitch_image;
# Image Data
image(U*1e6,V*1e6,Data,"X (microns)","Y (microns)","Electric Field Intensity");
Example 2
The second example shows a simple 2 layer dielectric stack (n=1 to n=1.5). This is essentially a 1D
simulation, so the simulation span was set to 0.05um by 0.05um by 4.00um. The stack was illuminated from
below by a plane wave at 30 degrees. Bloch boundary conditions were used in the X and Y directions. A
monitor recorded the field profile in the X-Z plane.
The following script was used to setup the variables need for usr_stitch_image.lsf and to create the
final image. Copy and paste the code into the script prompt to run. In this example, the X data was assigned
to the script variable u, while Z was assigned to v. In the plane of the monitor, the structure is only periodic in
the X direction. Therefore we will create a final image that has 80 periods stitched together in the X direction,
but only 1 period in the Z direction. This will create an image that is 4um by 4um. This script also images a
single period of the field for comparison.
u=getdata("Monitor1","x");
v=getdata("Monitor1","z");
data=getelectric("Monitor1");
data=pinch(getdata("Monitor1","Ex"));
simulation;
select("FDTD");
ku=get("kx");
kv=get("kz");
# call script
usr_stitch_image;
# Image Data
Data=real(Data);
image(U*1e6,V*1e6,Data,"X (microns)","Y (microns)","Ex Field");
This example uses MATLAB (the movie2avi function) to create the CW movie because Lumerical's software does
not provide a 'create movie' script function. If you don't have MATLAB, see the Tip at the end of page for an alternate
solution.
Associated files
usr_cw_movie.fsp
usr_cw_movie_matlab.m
See also
Ring resonator (Getting Started) 2020
Source movies (time domain) 628
monitor data, the complex nature of 873
Step 1: Copy the 'CW movie with MATLAB' analysis object into your simulation
After the simulation has been run, set the wavelength of interest in the CW movie object, then run the analysis
script. Running the analysis script will export the appropriate data to a .mat file.
setnamed("CW movie with MATLAB","wavelength",1.52e-6);
runanalysis("CW movie with MATLAB");
The real valued, instantaneous steady state field profiles are obtained by multiplying the complex field data from the
monitor by an appropriate phase, then taking the real part. By repeating this process for phase values between 0 and
2Pi, we can see how the fields oscillate over an optical cycle. Finally, we create a structure outline on the figure with
the contour function and index monitor data. See usr_cw_movie_matlab.m for more details.
Steady state movie of Ey(w) at Drop frequency Steady state movie of |E(w)|^2 at Drop frequency
Note: To see a movie of the steady state field profile at a 'Through' frequency, change the wavelength of interest in
the 'CW movie with MATLAB' object to 1.54 um.
For comparison, the movies created by the standard Movie monitors in the simulation are shown below. These
movies show how the fields evolve during the actual FDTD simulation, including the initial broadband source pulse
and all transients that occur as the field propagate through the simulation volume. These movies are inherently
broadband. You can see that some fields leave the simulation through the Through channel and some leaves through
the Drop channel.
1) apply an unconjugated transpose operation followed by a flip up-down operation to the matrix containing the field
data
2) interpolate the data from FDTD onto a uniform grid
The first step is necessary to get the orientation correct (the image() command in FDTD interprets rows and
columns differently than the imagesc() command in MATLAB). The second step is necessary because the
imagesc() command in MATLAB assumes that matrix data is uniformly sampled, even when you provide the x,y
position vectors. See the Matlab->Tips 1410 section for more information.
This is not as convenient as a proper movie file, but there are many programs available that convert jpeg files to
movies. Alternatively, placing the images in a folder and scrolling through them with an image viewing program will
give a good idea of what the movie would look like.
Associated files
usr_PlaneWavePhase.lsf
usr_PlaneWavePhase.fsp
See also
Making a CW Movie 870
real 1480
imag 1480
abs 1481
getdata 1646
getelectric 1650
It is important to understand that the complex nature of the field data is not simply an undesired numerical
consequence of the Fourier transform. The complex nature of the data provides additional information: it tells
you both the magnitude AND the phase of the frequency domain fields.
Most often, you want the magnitude of the fields (i.e. the envelope function). In such cases, the 'getelectric'
script function is useful, as it returns |E|^2. The absolute value operation removes any phase information
from the result.
It is also common to do some further analysis on the complex valued fields. In such cases, you will need to
use the 'getdata' command to get the complex valued fields. Then, the 'real', 'imag' and 'angle' commands
may be useful. The complex data also provides enough information to create a CW movie.
If you want to see what the actual field values would be at a particular instant in time, you can plot the real
The complex nature of the frequency domain data allows you to get the phase of the Electric field. The
associated files for this section of the online help show how to get the phase information for a plane wave
propagating in free space and compare the results with theory.
( - i wt -ik x )
A plane wave propagating in free space has a complex vector fields Ae , so the phase accumulated
over a distance d is equal to kd.
The plot above shows that the agreement between the analytic solution and the FDTD simulation. To create
the plot, run the associated simulation file. Then run the script file.
For the majority of time domain data analysis, it is acceptable to ignore the imaginary part of the monitor data.
To do so, use the 'real' script command.
Index monitors
Index monitors record the material properties (refractive index) of the structures in the simulation. For
absorbing or dispersive materials, the refractive index is a complex number. The complex refractive index is
often written in the form n+ik. The real part of the index monitor data gives 'n', while the imaginary part gives
'k'.
This type of post-processing analysis is often more efficient than directly running an FDTD simulation with the
arbitrary source pulse. For example, once the impulse response is known, it is possible to calculate the response to
many different inputs without needing to run any additional simulations.not necessary to run any addition the
response to several different time domain pulses
Associated files
usr_impulse_arbitrary_signal.fsp
usr_impulse_arbitrary_signal.lsf
See also
Custom source time signal 613
Methodology
The impulse response of the system is obtained by running a 'standard' simulation using the default source pulse.
Important points to consider include:
The source must be setup to excite the system over the full range of frequencies of interest (ie. it must cover the
full spectrum of the desired custom source signal).
A frequency domain monitor must be setup to measure the impulse response of the system over the same range
of frequencies. It is important to understand that the frequency monitors record the impulse response of the
system. No additional processing of the data is required to obtain the impulse response.
As with any simulation, it is important that the simulation time be sufficiently long so that the time domain fields
decay to ~0 by the end of the simulation.
Note that the monitors in this example file have been setup to always record data from 0.7-1.3um, regardless of
the source wavelength range.
Once the impulse response has been calculated by a frequency monitor, it is possible to calculate the system's
response to an arbitrary input based on some simple fourier analysis.
1. The user must specify the desired input signal as a function of time: Signal(t)
2. Calculate the input signal's frequency domain spectrum with a fourier transform: Signal(f)
3. Multiply the signal spectrum and the impulse response: Impulse(f) * Signal(f)
4. Inverse transform the spectrum*impulse data to obtain the systems response to the desired input: Response(t).
Example
To reproduce the following examples, open the associated simulation file (.fsp) and run the script file (.lsf). The goal
of this example is to determine the response of the system to a 50fs Gaussian pulse propagating through a n=3
dielectric slab using the technique described above. To verify the result, the script runs another FDTD simulation
using a 50 Gaussian pulse so the calculated response can be compared to the response from the direct FDTD
simulation.
Impulse response of
system for fields
transmitted through
the structure from
0.7-1.3um.
Oscillation is due to
constructive/
destructive
interference as fields
pass through the
dielectric slab.
Spectrum of 50fs
gaussian pulse.
Time domain
response of system
Response - from
simulation: The
response of the
system as calculated
by running a full
FDTD simulation. For
verification purposes.
Response - from
impulse analysis:
The response of the
system as calculated
from the source
spectrum and
impulse response
data. Notice that this
data is very similar to
the response as
calculated from the
verification simulation
(green line), but did
not require an
additional FDTD
simulation.
Associate files
divergence_example.fsp
See also
Running simulations
Modify material fit 272
It is easy to determine the type of instability by setting all of the simulation boundary conditions to Metal, then re-
running the simulation.
If the simulation still diverges, it is a dt stability factor type of divergence. See the dt stability factor 878 section.
If the simulation is stable, it is a PML type of divergence. See the PML and dispersive materials 879 section.
dt stability factor
The theoretical maximum time step is calculated from the simulation mesh size based on the Courant stability
criterion. By default, Lumerical software uses a time step that is 0.99 of the theoretical maximum time step.
This theoretical maximum is calculated assuming propagation of light in a homogeneous vacuum. Once
physical structures and interfaces are included in the simulation, particularly when dispersive materials are
involved, a smaller time step is sometimes required.
The steps to take in order to fix a PML divergence depend on the PML implementation that is being used.
Stretched Coordinate PML (SCPML) is recommended, but if you are using an older version of the software
prior to the 2015a release, only the Uniaxial PML (UPML) type is available.
SCPML Settings
One or more of the following changes should make the simulation stable if you are using SCPML:
2) Increase alpha
Setting the PML profile to "Custom" allows you to set the alpha parameter. Increasing the value of alpha can
make the simulation stable, but it can result in increased reflections, so increasing the number of PML layers
is also recommended.
Occasionally, the fitting routine will generate fits with gain, even though the experimental material data does
not have any gain. This will cause a simulation to diverge even if the frequency at which the fit has gain is well
outside of the simulation region.
To check if this is the case: open the material editor, select show extended spectrum and fit and plot the
index. If Im(index) is negative at some point then there will be a small region of gain. This problem can be
solved either by slightly varying the simulation bandwidth or by changing the fit tolerance and maximum
coefficients variables.
Injecting a source with incompatible simulation region settings such as injecting a plane wave source with
PML boundaries at the sides of the source can also cause a simulation to diverge. See Plane waves - Edge
effects 526 .
More help
The above modifications will fix the vast majority of diverging simulations. However, if they don't fix your
simulation, please contact technical support at support@lumerical.com
The automatic divergence checking feature properties are found in the Advanced tab of the Simulation region
properties.
Time and movie monitors can be helpful when debugging diverging simulations. Both will show the fields
growing exponentially at some point. Simulations that suddenly become very slow (for example, the time
remaining estimate increasing from 5 minutes to 1 hour) is another sign of divergence. The automatic
divergence checking normally stops the simulation before the simulation becomes very slow
Example
The file divergence_example.fsp contains a multilayer OLED structure in a 2D simulation. The dipole
source is in a multilayer stack of highly dispersive materials. Some of the materials have complex dispersion
characteristics that lead to numerical stability problems (for example, alq3_PFD changes from an index that is
almost purely real to an index that is almost purely imaginary).
Even with these challenging materials, the simulation is stable with the default SCPML settings. With the goal
of creating an example simulation that diverges, the automatic shut-off has been disabled. (The automatic
shut-off feature normally stops the simulation when the simulation fields become very small). With the Auto
shut-off disabled, the simulation continues to run past the point it would normally stop. This allows the
numerical problems to build, eventually leading to diverging fields.
As shown in the movie, the initial portion of the simulation runs properly, with the dipole source radiating, then
the fields decay. Later, we see that the there is an oscillating field at the dipole location. Analysis of the time
signal shows that this field is oscillating at a frequency corresponding to approximately 2.7 microns (which is
well outside the range of interest in this simulation). This wavelength is precisely the point where the alq3_PFD
material changes from an index that is almost purely real to an index that is almost purely imaginary. After a
long enough period of time, the interaction of these fields with the PML leads to a divergence. We can use this
simulation to test the techniques mentioned above. Please note that you may want to delete the movie
monitor to reproduce these steps as it will greatly speed up the simulation.
For this simulation, we can maintain the simulation stability for the full simulation time by using the
"stabilized" PML profile, increasing alpha, or truncating the structure before the PML. Truncating the structure
can lead to significant reflections, so either using the "stabilized" PML profile or increasing alpha would be
recommended instead.
Chapters
New features 883
Find new product features by release.
Result analysis
Learn how to access and analyze simulation data.
To check the version of the software you are currently using, and to check for updates, go to the Help menu in the
main title bar.
See Component design tools new features for the new features in FDTD Solutions, MODE Solutions and DEVICE.
Also see the Product announcements page.
coordinates.
The SPICE netlist parser now supports matrix and vectors as parameters, giving additional flexibility in passing
parameter from and to INTERCONNECT.
A default custom library path parameter was added to the element library, facilitating the navigation between
different working folders when developing compact model libraries (CML). Users can also select a custom folder
and export HTML information to facilitate the process of documenting a new CML.
The property editor was greatly enhanced by including sorting of properties and categories, allowing for fine control
on how the properties should be presented in the property view. Users can also enter the property range, enabling
validation of property values.
The Schematic editor now support vertical and horizontal flip.
New elements
Piecewise Linear Export 1309 , Piecewise Linear Import 1308
external elements new devices can be simulated, such as external cavity and multi-section lasers.
The laser model propagates the complex slowly-varying amplitudes of forward and backward traveling optical modes
through the gain medium in the time domain on 1D grid in the longitudinal direction. The transverse properties of
each mode are characterized by scalar quantities such as effective and group index, and mode confinement to the
gain region which can be accurately pre-calculated with an Eigen mode solver. Frequency and local carrier
dependent gain and stochastic spontaneous emission are included using digital filtering, and carrier concentrations
are updated based on optical gain, spontaneous emission, and non-radiative recombination rates.
For detailed properties of the TW Laser model, please see TW Laser 1177 .
Please see the Fabry-Perot Laser 2486 , DBR Laser 2490 and Ring Vernier Laser 2495 application example pages for this
TW laser model.
With the CML publisher, a designer can define and package a library of compact model elements for distribution or
inclusion in a PDK package. Critical proprietary data such as hierarchical circuit definitions of compact model
elements, performance data and process parameters can be obfuscated upon packaging and are accessible only
with an associated CML reader license
A CML reader license allows designers to open use a packaged CML published using INTERCONNECT. All required
compact model elements are extracted in the design kit folder and can be used to design, simulate and optimize
photonic integrated circuits while obfuscating underlying proprietary data used to define the models.
For more information, please see Custom Library & Design Kit 1331 .
New elements
Optical Modulator Measured: new electrode type parameter allows selection between lumped and traveling wave
electrode modulators.
Impulse and Step sources: new delay and bias parameter permits adding a time and amplitude shift to the
generated output signal.
Symbol Mapper: new bias parameter permits adding an amplitude shift to the generated output signal.
Compound Element: new parameter allows for disabling the expansion of compound elements.
Electrical Network Analyzer: new parameters to generate an output signal with user defined amplitude, bias and
delay for characterization of electrical and microwave circuits.
New elements
Electrode Transmission Line 1027 , Microwave Loss 1059 , Jitter Source 1006
Logical elements perform user defined specified logical operations on digital and electrical signals.
New elements
Vector Signal Analyzer 931 , Scripted Source 1004 , Scripted Optical Source 1024 , Modulation Symbol Mapper 984 ,
Optical Circulator 1078 , Waveguide Crossing 1132 , Modulation Symbol Demapper 1257 , Quantizer 1260 , Data Recovery 1263 ,
Optical Switch 1271 , Optical Y Switch 1274 , Digital Delay 1293 , Digital NOT 1291 , Digital Logic 1288 , Electrical NOT 1296 ,
Electrical Logic 1295 , Electrical Multiplier 1280 , Electrical Constant Multiplier 1278
Result displays
Enhanced analyzers offers automatic update of results during runtime, allowing for displaying of real time waveform
plots.
New elements
Agilent ADS Export 1302 , Agilent ADS Import 1304 , Bragg Grating 1154 , Electrical Amplifier 1170 , Electrical Network
Analyzer 936 , Mentor Graphics Eldo Export 1305 , Mentor Graphics Eldo Import 1306 , Noise Source 1000 , Optical Amplifier
1173 , Optical Channel Analyzer 953 , Optical Fiber 1116 , Optical Noise Source 1021 , Optical Ring Modulator 1047 , Read
From Stream 1317 , Sampled Bragg Grating 1159 , Step Source 1003 , TV LP RC Filter 1223 , VD LP RC Filter 1225 , Write To
Stream 1316
Also featured in INTERCONNECT 2.5 is an updated Visualizer, which significantly simplifies the process of
visualizing simulation data. When used in conjunction, Results Manager and the Visualizer provide a very useful and
intuitive way of analyzing and visualizing variables and results through the GUI, greatly reducing the need for
scripting.
Datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient object,
allowing one to package raw data into meaningful results that can be easily parameterized and visualized.
Please see the Yield analysis 696 example for more information.
Improved simulation engine provides substantial speed increase to frequency domain calculations.
Cascaded elements
S-parameters for cascaded elements are automatically calculated within INTERCONNECT, simplifying the definition
of circuits employing these elements.
Connection pins
It is now possible to insert a pin along an existing connection, allowing you to drag and modify the path of the
connection between the two components. Simply right-click on a connection and select "Insert pin".
New Elements
The following elements were added in INTERCONNECT 2.0. For more information, see the Element library section of
the Reference Guide.
1xN Fork 1314 , Optical Modulator Measured 1039 , Optical N Port S-Parameter 1090 , Ramp 998 , Star Coupler 1127
For tips on how to use the schematic layout editor, see Using the layout editor 899 .
File
The file menu includes options to create new files and save or load existing files, as well as import SPICE netlists.
See the Importing SPICE netlist page for more information.
Edit
The edit menu allows users to undo/redo their actions, copy/paste and an option to select all the objects in the
current simulation. It also contains all the options that are in the edit toolbar. Note that in the edit menu, the copy/
paste options are available, but the duplicate option is not. Conversely in the edit toolbar the duplicate option is
available, but the copy/paste option is not. The duplicate tool has the same effect as copying and then subsequently
pasting.
View
The view menu includes options to choose the mouse mode toolbar options as well as refresh annotations.
Simulation
The simulation menu includes options to run the simulation and validate all analyzers.
Help
The help menu provides links to the online knowledge base, and local PDF copies of the product documentation. It
allows the user to check which version of the software is installed, the expiry date of the license file in use, and
whether Matlab integration is active.
6.2.2 Toolbars
The shortcut key used to run the function from the keyboard is given in brackets next to the name of the tool.
Edit toolbar
The edit toolbar contains tools used to edit (E) duplicate (D), delete (Del) simulation elements.
The mouse mode toolbar changes what the mouse place holder looks like on the screen. Depending on the mode,
the user can edit objects (S), pan (P) or zoom (Z) in the view ports. The "Select ports to be monitored" button
(M) allows users to select which ports to store simulation data for.
Simulation toolbar
The simulation toolbar contains tools to run and stop the simulation, as well as switch to layout mode
in the analysis mode. The "Validate all analyzers" button will rerun the analysis of each analyzer,
allowing users to change analyzer inputs (or add new analyzers) and recalculate the results without having to rerun
the simulation.
Alignment toolbar
The alignment toolbar consists of buttons that control the way in which objects can be accurately positioned with
respect to other objects.
View toolbar
The view toolbar includes the zoom extent (X) button, which is a quick way to zoom out to show the entire circuit.
When moving the mouse pointer over the view port, it will either have the shape of an arrow, a hand, a magnifying
glass. You can toggle between these by selecting a mouse mode as described in the toolbars section.
By default, there is a single view port that shows all the elements that are contained in the Root Element (a
Compound Element 1322 ). Users can open additional view ports corresponding to any compound element by right
clicking on the compound element and selecting "Expand".
At the top of each view port is the current scope of the compound element.
Once a simulation completes, the results can be visualized using the Visualizer.
Element Tree
A simulation requires that the user define a set of elements (sources, circuit elements, analyzers...etc). As a
complete setup may contain a large number of elements, the element tree was designed to allow for organization
and easy selection. All simulation elements are within the Root Element, which represents the current simulation.
Within 'Root Element', elements are listed as they are inserted by the user. Press F2 or double-click to change the
name.
Element Library
The Element Library 904 is an extensive list of pre-defined PIC elements, including optical sources, measurement
elements, and both passive and active optoelectronic devices. The center portion of the window shows the type of
elements grouped in a tree format. When selected by the mouse, the "Model" section below shows all the available
primitive elements of the selected type (with a description). To insert an element into the simulation, simply drag the
element into the view port. Users can also add custom Compound Elements 1322 or Scripted Elements 1326 in to the
Element Library.
TYPE: Choose to display the type of simulation object (e.g. structures, analysis groups)
CATEGORY: Choose to only display components of a certain category (e.g. extruded polygon, photonic crystals)
KEYWORDS: The object window will only show objects that match your keyword (e.g. hemisphere, waveguide)
RESET: Sets the category to display 'all' and deletes any text in the keywords text box
SEARCH: Activates the search for objects that match the keywords (the same function as pressing enter while in
the text box)
By default the script editor is located on the right hand side of the view ports and shares the same frame as the
analysis window. When both windows are open, it is possible to toggle between the two through tabs located at the
right side of the frame. The script file editor contains buttons to create, open, save and run script files. When multiple
script files are open, pressing on the run script button runs the one in the forefront. Note that when entering scripting
code in the script file editor, each command must be followed with a semicolon.
When running a script file in the a different directory using the GUI, the current working directory is unchanged, but
the directory of the script file is added to the scripting path. This way, any files called by that script will be found.
However, the search order is the current directory first, then any other folders in the path, and then the directory of
the script file.
By default the script prompt is located at the bottom of the CAD window. Script commands are executed as soon as
the ENTER button is pressed on the command line. If a semicolon is missing at the end of the command line, it is
automatically inserted it for you. Multiple lines can be pasted into the script prompt, and will run as in the script
editor. In this case though, only the last semicolon can be neglected.
Output
The output prompt shows the simulation progress as well as any warning/error messages in any of the elements in
the current simulation.
Ports shapes
Triangle: input/output ports
Circle: input ports to analyzers
Square: bidirectional ports
Port/Connection colors
Red: digital signals
Blue: electrical signals
Green: optical signals
Connections lines
Dotted lines: inputs to analyzers
Bold lines: connections that have been selected
Monitoring ports
Ports are automatically "monitored" when it is connected to an analyzer. Users can also assign ports to be
monitored if it will eventually be connected to an analyzer in analysis mode. To do this, make sure the "Select
ports to monitor" button is selected and click on the port in the layout editor. Once the simulation
completes, the users can then add analyzers to this port and calculate the results without having to re-run the
simulation (see the Analyzers in analysis mode section in the Elements section below).
Insert pin
Inserting a pin in a connection allows you to drag and modify the path of the connection between the two
components. Simply right-click on a connection and select "Insert pin".
Elements
INTERCONNECT uses different colors to denote the current states of elements.
displayed as "orange", and the user needs to click on the "Validate all analyzers" button in order for the
analyzers to recalculate the values corresponding to the new input settings.
Run simulation.
Note that the Optical Network Analyzer 958 is an exception to this since the calculation involve re-running the
scattering analysis in order to get the new frequency domain results.
Disabled Elements
Users can choose to disable elements by setting the "enabled" property to false. Disabled
elements are displayed as "gray", and the signal will simply bypass these elements. For
example, the following two simulations will give identical results.
Active Elements
When the "animate simulation" property of the Root Element is set to True, while the simulation is running,
currently running elements and threads will be highlighted.
1) In the main title toolbar select VIEW->WINDOWS or VIEW->TOOLBARS. The visible windows/toolbars
have a check mark next to their name; the hidden ones do not.
2) By clicking the right button anywhere on the main title bar or the toolbar, the following pop up menu will
show up. As before, check marks indicate when windows and toolbars are visible.
Moving toolbars
To move a toolbar, hover the mouse over the top of the toolbar, where the dotted line is. When the mouse
cursor becomes a four-headed arrow, press the left mouse button and drag-and-drop the toolbar. If you reach a
region where you can place a toolbar, the CAD environment makes room for the toolbar indicated by a blue
void.
See also
Compound Elements 1322
The value of an element property can be set using an expression. The expression can be a simple numerical value,
or it can be a formula using any of the parent's properties.
The user can add new properties in the Root Element, or a Compound Element's Property Editor.
Child elements can inherit properties from from parent elements. To select a property to inherit, right-click on the
property row, click on "Inherit:" and select the property to inherit from the list.
Or the property of a parent element can be typed into the expression for the child element.
This allows for the same properties of different elements to become dependent, and changes to these properties at
higher hierarchical levels can be cascaded to lower levels. Property dependencies make it easy to create an
unrestricted number of layers of hierarchy between compound elements.
General
General properties that apply for all elements in INTERCONNECT.
Standard
Standard properties that are related to the main functionality of each element. The user needs to make sure the
standard element values are correspond to the desired functionality of the element.
Enhanced
Specialized properties for the element.
Polarization
Properties that define the polarization of the element.
Waveguide
Properties that characterize the waveguide modes.
Numerical
Properties of the numerical model that is required to define the element's functionality. This includes properties
associated with randomization and noise.
Simulation
Simulation properties for the element.
Display
Visualization and annotation properties for analyzer displays.
The Root Element also contains a list of global properties which all elements can inherit or break dependencies
from. By default, all elements will inherit from the global properties of the Root Element (when applicable). These
dependency relations can be added/modified by the user as described in Property Dependencies 905 . The Root
Element also functions as a Compound Element 1322 (the top-most element in the hierarchy of compound elements),
and has all the functionalities including creating parameterized group-objects by adding script code.
Properties
General
Name Default value Default unit Value range
name Root Element - -
Defines whether or not the element is
enabled.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines the name of the element.
type Root Element - -
Defines the element unique type (read
only).
description The top-most - -
A brief description of the elements element in the
functionality. hierarchy of
compound
elements
prefix ROOT - -
Defines the element name prefix.
source - - -
Defines whether or not the element is
flipped.
local path - - -
Defines the element rotation value.
Enhanced
Name Default value Default unit Value range
monitor data save to disk - [save to
Defines whether or not to save monitor memory, save
data to memory or to disk. to disk]
Numerical
Name Default value Default unit Value range
multithreading user defined - [automatic, user
The number of threads to be used in defined]
the calculation. If 'automatic', the
number of processor cores will be
used.
number of threads 4 -
The user defined number of threads to
be used in the calculation.
Simulation
Name Default value Default unit Value range
bitrate 2.5e+009 bits/s
The output signal bitrate.
simulation input time window - [time window,
The simulation input type. It defines the sequence
type of property used to calculate the length, sample
number of samples, sample rate and rate]
time window.
samples per bit 64 - [1, 1e+009]
The number of samples per bit.
Script
Name Default value Default unit Value range
run setup script automatic - [automatic,
Defines whether to run setup script always]
automatically or to force the setup
script to run at the beginning of the
simulation.
Validation
Name Default value Default unit Value range
check disconnected ports false - [true, false]
Defines whether or not to check for
disconnected ports and relay
connections in the circuit.
check internal monitors true - [true, false]
Defines whether or not to check for
monitors inside of compound elements.
Results
Name Description
total elapsed time The amount of time that passed between the start
and the end of a simulation.
When setting up a simulation system, the sequence length (number of bits) and samples per bit should be large
enough to guarantee the accuracy. A longer simulation sequence length may take longer time, hence to carefully
choose the two parameters is important. The default sequence length and samples per bit are 128 and 64,
respectively; these values would suit most of the simulation cases.
LB
t w = LB TB = (1)
BR
Where LB is the sequence length, TB is the bit period and BR is the bit rate. The simulation sample rate is:
NS / B
fs = = N S / B BR (2)
TB
Where NS/B is the number of samples per bit. The number of samples is:
N S = LB N S / B = t w f s
(3)
For analog signals, we can simply define the simulation time window as:
NS
t w = N S TS = (4)
fs
Where Ts is the sampling period. For instance, for a bit rate of 10 GBits/s, 16 bits and 64 samples per bit, the
number of samples is 1024, the time window is 1.6 ns, and the sample rate is 640 GHz. The time domain waveform
will have the following properties:
Depending on the simulation input property, these parameters can be calculated automatically by INTERCONNECT
Analyzers 914
Sequence generators 965
General
General properties that apply for all elements in INTERCONNECT.
Standard
Standard properties that are related to the main functionality of each element. The user needs to make sure the
standard element values are correspond to the desired functionality of the element.
Enhanced
Specialized properties for the element.
Polarization
Properties that define the polarization of the element.
Waveguide
Properties that characterize the waveguide modes.
Numerical
Properties of the numerical model that is required to define the element's functionality. This includes properties
associated with randomization and noise.
Simulation
Simulation properties for the element.
Display
Visualization and annotation properties for analyzer displays.
6.3.3.3 Analyzers
Digital
Logic Analyzer 914
Electrical
Oscilloscope 917
Spectrum Analyzer 920
Power Meter 923
Eye Diagram 926
Vector Signal Analyzer 931
Optical
Optical Spectrum Analyzer 943
Optical Power Meter 946
Optical Oscilloscope 948
Mode Profile Analyzer 950
Optical Channel Analyzer 953
Optical Network Analyzer 958
Symbol
Description
Display digital signals in time domain.
Ports
Name Type
input Digital Signal
Properties
General
Name Default value Default unit Value range
name Logic Analyzer - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
prefix LGCA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 16 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Results
Name Description
digital signal The input signal waveform.
bitrate The input signal bitrate.
Implementation Details
The logic analyzer displays digital signals in time domain according to its bitrate and sequence length. For detailed
information, please see the example file Logic_Analyzer.icp, the following figure shows the system in the
example file.
There are two results can be displayed and annotated after run the simulation, the "digital signal" and the "bitrate",
respectively. Following is a figure shows the "digital signal" waveform.
6.3.3.3.2 Oscilloscope
Symbol
Description
Allows observation of constantly varying signals in time domain.
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Oscilloscope - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Oscilloscope - -
Defines the element unique type (read
only).
description Allows - -
Standard
Name Default value Default unit Value range
limit time range false - [true, false]
Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.
Results
Name Description
waveform The input signal waveform.
Implementation Details
The Oscilloscope allows the observation of electrical signals' waveform in time domain. It is an analyzer thus it
measures rather than contributes to the performance of the system. Please see the example file OSC_RFSA.icp for
more information on this element. The following figure shows the system in the example file.
In the system, two sinusoidal waves with different amplitudes and frequencies are added together and connected to
an oscilloscope. The result output measured by the oscilloscope is the waveform of the input signal. The following
figure shows the output waveform visualized from the oscilloscope.
Symbol
Description
Measures the magnitude of an input signal versus frequency.
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Spectrum - -
Defines the name of the element. Analyzer
Standard
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Results
Name Description
spectrum The input signal spectrum.
Implementation Details
The spectrum analyzer measures the power spectrum of the input electrical signal versus its frequency. Please see
the example file OSC_RFSA.icp for more information. The following figure shows the system in the example file.
In the system, two sinusoidal waves with different amplitudes and frequencies are added together and connected to
a spectrum analyzer. The frequencies for the two sinusoidal waves are 10 GHz and 6 GHz, respectively. Hence the
output of the spectrum analyzer should have one peak at 6 GHz and another one at 10 GHz.
There are two plot formats of the spectrum analyzer, "rectangular" and "power", respectively. The "power unit" for the
"power" plot can be "W", "dBm", "W/Hz" and "dBm/Hz". The "rectangular" plot format plots the amplitude/linear
power of the signal versus its frequency in double sidebands, while the "power" plot format plots the power of the
signal in linear and/or dB scale versus its frequency in single sideband. The following figures are the output
measured by the spectrum analyzer with different plot formats.
Fig 1. Pow er plot w ith dBm pow er unit Fig 2. Rectangular plot am plitude
Fig 3. Pow er plot w ith W pow er unit Fig 4. Rectangular plot pow er
Symbol
Description
Measures the average signal power.
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Power Meter - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Power Meter - -
prefix PWM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
input kind amplitude - [amplitude,
Defines the type of signal input. voltage, current]
impedance 1 ohm
Impedance used to simulate voltage or
current input.
power unit dBm - [W, dBm]
Defines the power unit to plot the
analyzer results.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the
Results
Name Description
total power The input signal average total power (AC and DC).
ac power The input signal average AC power.
dc power The input signal average AC power.
Implementation Details
The power meter measures the average power of the input signal. Please see the example file PWM.icp for more
information on this element. The following figure shows the system in the example file.
There are two types of input signals in the system, one DC source and one AC source. The power meters measure
the average power of the two signals. The following figures show the measured results of the two electrical sources,
respectively.
Symbol
Description
Allows observation and analysis of eye diagrams.
Ports
Name Type
reference Electrical Signal
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Eye Diagram - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Eye Diagram - -
Defines the element unique type (read
only).
description Allows - -
A brief description of the elements observation and
functionality. analysis of eye
diagrams
prefix EYE - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
bit pattern input false - [true, false]
Defines whether or not to enable the bit
pattern input port. The bit pattern input
port allows for clock recovery of the
input signal.
bitrate %bitrate% bits/s
Defines the input signal bitrate.
signal reference input true - [true, false]
Defines whether or not to enable the
signal reference input port. The
reference input port allows for
automatic delay compensation of the
input signal.
eye period 1.5 bit period
The number of periods displayed in the
eye diagram.
ignore start periods 8 -
The number of consecutive bits at the
begging of the signal waveform to be
excluded from the eye diagram.
ignore end periods 8 -
The number of consecutive bits at the
end of the signal waveform to be
excluded from the eye diagram.
delay compensation automatic - [automatic, user
Defines whether or not to use the defined]
automatic delay compensation.
delay 0 s
The time delay to apply to the input
signal.
limit time range false - [true, false]
Enables setting the time range( start/
stop) of the analysis.
start time 0 s
Time instant to start the signal
analysis.
stop time 1 s
Time instant to stop the signal
analysis.
Enhanced
Name Default value Default unit Value range
color grading true - [true, false]
Defines whether or not to enable color
grading. It allows to color code the eye
to display the frequency (histogram) at
which a certain point in the eye is
reached
binning size 500 -
The number of vertical and horizontal
bins used to calculate the histogram
required to generate the color grading.
smoothness 10 -
The number of samples used to
smooth the color grading effect. It is
equivalent to a average moving filter
applied to each signal trace.
random sampling false - [true, false]
Defines whether or not to enable
random sampling effect. It is used to
create realistic displays of measured
eye diagrams.
time unit s - [s, bit period]
Defines the time unit to plot the
analyzer results.
decision point automatic - [automatic, user
Defines whether or not to automatically defined]
determine the optimum decision point
for eye measurements.
decision instant 20e-012 s
Defines the decision instant for eye
measurements.
threshold 0 a.u.
Defines the decision amplitude for eye
measurements.
BER estimation Gaussian - [Gaussian,
Defines type of algorithm used for BER measured]
estimation.
calculate measurements false - [true, false]
Defines whether or not to calculate eye
measurements. Measurements include
'BER', 'Q factor', 'jitter', etc.
calculate graphs false - [true, false]
Defines whether or not to calculate eye
graphs. Graphs include 'min BER vs.
time', 'Q factor vs. time', etc.
eye opening tolerance 0 ratio [0, 1]
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.
Results
Name Description
eye diagram The eye diagram is constructed from the input
signal waveform by overlapping the parts of the
waveform corresponding to each individual bit into a
single graph with signal amplitude on the vertical
axis and time on horizontal axis.
waveform/reference The reference signal waveform used for delay
compensation of the input signal.
waveform/correlation The correlation between the input and the reference
signal waveform.
waveform/input The input signal waveform after delay
compensation.
waveform/bit pattern The digital signal after the detection of 'ones' and
'zeros' levels.
measurement/decision instant The decision instant used to calculate the eye
measurements.If 'automatic' decision point is
selected, this is the decision instant at the
minimum BER.
measurement/threshold The threshold value used to calculate the eye
measurements.If 'automatic' decision point is
selected, this is the threshold at the minimum
BER.
measurement/level zero mean The mean value of 'zero' levels ( 0) at the measured
decision instant and threshold.
measurement/level zero sigma The standard deviation of 'zero' levels ( 0) at the
measured decision instant and threshold.
measurement/level one mean The mean value of 'one' levels ( 1) at the measured
decision instant and threshold.
measurement/level one sigma The standard deviation of 'one' levels ( 1) at the
measured decision instant and threshold.
measurement/BER The BER at the measured decision instant and
threshold.
measurement/log of BER The log of BER at the measured decision instant
and threshold.
measurement/Q factor The Q factor at the measured decision instant.
measurement/height The eye height (EH= 1- 0-3( 1- 0)) at the
measured decision instant and threshold.
measurement/amplitude The eye amplitude (EA= 1- 0)) at the measured
decision instant and threshold.
measurement/extinction ratio The extinction ratio (Er= 1/ 0) at the measured
decision instant and threshold.
measurement/opening factor The eye opening factor (EO =( 1- 0-( 1- 0))/EA) at
the measured decision instant and threshold.
measurement/width The eye width (EW = T1- T0-3( T1- T0)) at the
measured threshold.
measurement/pulse width The pulse width ( T1- T0) at the measured
threshold.
measurement/jitter RMS The RMS jitter ( T1- T0) at the measured
threshold.
measurement/peak to peak jitter The peak to peak jitter (T1max -T0min)) at the
measured threshold.
measurement/rise time The rise time ( T0[10%-90%]) at the measured
decision instant.
measurement/fall time The fall time ( T1[90%-10%]) at the measured
decision instant.
graph/threshold at min BER The threshold at the the minimum BER value vs.the
decision instant.
graph/min BER The minimum BER vs.the decision instant.
graph/min log of BER The minimum BER vs.the decision instant.
graph/opening factor The eye opening factor (EO ) vs.the decision instant.
Implementation Details
Please see Optical PAM-4 2432 in Advanced Modulation Format Transceivers 2407 for detailed information.
Symbol
Description
Allows measuring of digitally modulated IQ waveforms.
Ports
Name Type
input I Electrical Signal
input Q Electrical Signal
Properties
General
Name Default value Default unit Value range
name Vector Signal - -
Defines the name of the element. Analyzer
Standard
Name Default value Default unit Value range
signal reference input false - [true, false]
Defines whether or not to enable the
signal reference input port. The
reference input port allows for
automatic delay compensation of the
input signal.
delay compensation automatic - [automatic, user
Defines whether or not to use the defined]
automatic delay compensation.
I delay 0 s
The time delay to apply to the input
signal.
Q delay 0 s
The time delay to apply to the input
signal.
constellation diagram false - [true, false]
Defines whether or not to calculate the
constellation diagram.
bitrate %bitrate% bits/s
Defines the input signal bitrate.
ignore start symbols 8 -
The number of consecutive symbols at
the begging of the signal waveform to
be excluded from the constellation
diagram.
Enhanced
Name Default value Default unit Value range
symbol map false - [true, false]
Defines whether or not to use symbol
maps for constellation diagram
analysis.
scale factor I 1 -
The scale factor for the symbol map IQ
values.
scale factor Q 1 -
The scale factor for the symbol map IQ
values.
rotation 0 rad
The rotation angle rotates the symbol
map IQ values.
normalize IQ values automatic - [disable,
Defines whether or not to normalize automatic, from
symbol IQ values to the minimum and input]
maximum reference IQ values.The error
vector magnitude measurement
depends on how the normalization is
calculated. By default the reference IQ
values are calculated from the input IQ
values, or the vector diagram. If
automatic mode is selected and the
constellation diagram is enabled, the
reference values will be taken from the
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.
Results
Name Description
vector diagram The quadrature and in-phase components mapped
to the vertical and horizontal directions, also called
I-Q diagram or polar diagram.
constellation/constellation diagram The quadrature and in-phase components mapped
to the vertical and horizontal directions shown at
detection decision points.
constellation/symbol map The modulation signal symbol map.
constellation/scale factor I The normalization scale factor applied to the
symbol map.
constellation/scale factor Q The normalization scale factor applied to the
symbol map.
waveform/constellation I The input signal levels at decision instant after
delay compensation.
waveform/constellation Q The input signal levels at decision instant after
delay compensation.
waveform/input I The input signal waveform after delay
compensation.
waveform/input Q The input signal waveform after delay
compensation.
Implementation Details
Please see Optical PAM-4 2432 in Advanced Modulation Format Transceivers 2407 for detailed information.
Symbol
Description
Performs scattering data or impulse response analysis to calculate the overall circuit under test performance.
Ports
Name Type
output Electrical Signal
input 1 Electrical Signal
Properties
General
Name Default value Default unit Value range
name Network - -
Defines the name of the element. Analyzer
Standard
Name Default value Default unit Value range
signal source internal - [internal,
Defines whether to use an internal or external]
external signal source for stimulus.
number of input ports 1 -
Defines the number of input ports for
the element.
source kind power - [power,
Defines the kind of signal output. amplitude]
power 0 dBm*
The average output power.
*std. unit is W
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
Enhanced
Name Default value Default unit Value range
peak analysis multiple - [disable, single,
This option allows users to select the multiple, center,
type of peak analysis to perform. fixed]
number of peaks 10 -
The number of peaks for analysis,
values are truncated or inserted to
make sure the number of peaks is
constant.
peak at maximum true - [true, false]
Defines whether or not to search for
peaks located at minimum (false) or
maximum values (true)
peak threshold 10 dB
Signal power must be greater than the
power established by the peak
threshold limit. The peak threshold limit
is set by subtracting the peak
threshold value from the power of the
largest signal peak value.
peak excursion 3 dB
The peak excursion defines the rise
and fall in amplitude that must take
place in order for a peak to be
recognized.
pit excursion 7 dB
Numerical
Name Default value Default unit Value range
analysis type scattering data - [scattering data,
Defines the type of analysis to be impulse
performed by the element. response]
Results
Name Description
input #/transmission The complex transmission vs. frequency
corresponding to the input port.
Implementation Details
The electrical network analyzer (ENA) is usually used to test the overall circuit performances under testing mode. It
also could export the analysis results.
Following is an example of how to export the analysis data from an electrical network analyzer, please see also the
example file ENA.icp
Make sure that the "data export" is set to be "true" and type in the file name in the same directory of the icp file. In
this example, the data exported is the s-parameter of the low-pass filter, please see the data file
data_export.s1p, following is a glance of the exported data.
The analysis type can be selected from "scattering data" and "impulse response". With "scattering data" analysis
selected, the scattering matrix of the element is used for the calculation of the system in frequency domain; with the
"impulse response" selected, the ENA calculates the system's reaction to an impulse signal input as a function of
time. For detail information, please see INTERCONNECT Circuit Solver.
After the simulation is run, a number of measurements will be generated. To view the results, right click on the result
entry and send it to visualize.
Symbol
Description
Measures the magnitude of an input optical signal versus frequency.
Ports
Name Type
input Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Spectrum
Analyzer
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Spectrum
Standard
Name Default value Default unit Value range
limit frequency range false - [true, false]
Enables setting the frequency range of
the analysis.
start frequency 190 THz*
The lower frequency limit of the
analysis. *std. unit is Hz
bandwidth Gaussian
function]
bandwidth 10 GHz*
Defines the resolution bandwidth.
*std. unit is Hz
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.
Results
Name Description
sum/spectrum The total input signal spectrum. Calculated by the
sum of the energy of the optical power of the
individual modes.
mode #/spectrum The signal spectrum corresponding to the individual
mode.
Implementation Details
The Optical Spectrum Analyzer measures the power spectrum of the input optical signal versus its frequency.
Please see the electrical Spectrum Analyzer 920 for more implementation details.
Symbol
Description
Measures average optical power.
Ports
Name Type
input Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Power - -
Defines the name of the element. Meter
prefix OPWM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
Simulation
Name Default value Default unit Value range
input signal selection last - [last, index]
Input signal selection option.
input signal index 1 -
The signal index to analyzed.
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
Results
Name Description
sum/power The total input signal average power. Calculated by
the sum of the energy of the optical power of the
individual modes.
mode #/power The signal average power corresponding to the
individual mode.
Implementation Details
The Optical Power Meter measures the average power of the input optical signals. Please see the electrical Power
Meter 923 for more implementation details.
Symbol
Description
Allows observation of constantly varying optical signals in time domain.
Ports
Name Type
input Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Oscilloscope
Standard
Name Default value Default unit Value range
frequency at max power true - [true, false]
Defines whether or not to automatically
set the frequency of operation of the
element at the location of the peak with
maximum value.
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 1024 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
limit display memory true - [true, false]
Defines whether or not to limit the
number of values displayed in the
element display.
display memory length 2048 -
This is the number of data values used
to update the display and annotations
during the simulation.
Results
Name Description
sum/waveform The total input signal waveform. Calculated by the
sum of the energy of the optical power of the
individual modes.
mode #/waveform The signal waveform corresponding to the individual
mode.
Implementation Details
The Optical Oscilloscope allows the observation of optical signals' waveform in time domain. Please see the
electrical Oscilloscope 917 for more implementation detail information.
Symbol
Description
Allows observation of optical mode profiles.
Ports
Name Type
input Optical Signal
Properties
General
Name Default value Default unit Value range
name Mode Profile - -
Defines the name of the element. Analyzer
prefix OMPA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Results
Name Description
mode #/profile The mode profile corresponding to the individual
mode.
Implementation Details
The mode profile analyzer measures and displays the mode profile of a piece of waveguide or fiber. Please see the
example file Mode_Profile_Analyzer.icp for detailed information on this element. The following figure shows
the system in the example file.
The mode profile analyzer could display the E and H model profiles on each coordinate, The following figures show
the measured mode profile for the waveguide on E and H model on X, Y Z directions and as a whole.
Following are the plots of the E and H model of the waveguide with a "line" plot type on each coordinate and as a
whole.
Symbol
Description
Measure and monitor CWDM channels power and wavelength.
Ports
Name Type
input Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Channel - -
Defines the name of the element. Analyzer
Standard
Name Default value Default unit Value range
signal reference input false - [true, false]
Defines whether or not to enable the
signal reference input port. The
reference port allows for measurements
of gain and noise figure by comparing
input signals from both input ports.
plot kind frequency - [frequency,
This option allow users to choose to wavelength]
plot in units of frequency or wavelength.
power unit dBm - [W, dBm]
Defines the power unit to plot the
analyzer results.
peak threshold 10 dB
Signal power must be greater than the
power established by the peak
threshold limit. The peak threshold limit
is set by subtracting the peak
threshold value from the power of the
largest signal peak value.
peak excursion 6 dB
The peak excursion defines the rise
and fall in amplitude that must take
place in order for a peak to be
recognized.
pit excursion 10 dB
The pit excursion value is used to
determine whether or not a local
minimum in the signal is to be
considered a pit.
sensitivity -100 dBm*
The minimum detectable signal power
level. *std. unit is W
Display
Name Default value Default unit Value range
refresh true - [true, false]
Defines whether or not to update
display and annotations during the
simulation.
refresh length 8192 -
Defines how ofter to update the
element. This is the minimum number
of new data values available at the
element input port that will trigger the
element update.
Results
Name Description
channels The complex transmission vs. frequency
corresponding to the input optical mode. Where
frequency is the location of the detected peaks.
signal power The list of signal powers from the input signal,
measured at each channel frequency.
noise power The list of noise powers from the input signal,
measured at each channel frequency.
OSNR The list of OSNR values from the input signal,
measured at each channel frequency.
input/signal power The list of signal powers from the input signal,
measured at each channel frequency.
input/noise power The list of noise powers, from the input signal
measured at each channel frequency.
input/OSNR The list of OSNR values from the input signal,
measured at each channel frequency.
reference/signal power The list of signal powers from the reference signal,
measured at each channel frequency.
reference/noise power The list of noise powers, from the reference signal
measured at each channel frequency.
reference/OSNR The list of OSNR values from the reference signal,
measured at each channel frequency.
gain The list of gain values calculated between the input
Implementation Details
The Optical Channel Analyzer measures and monitors the channels' power and wavelength/frequency for WDM
systems. It could measure not only the signal power but also the noise power in the system and hence the optical
signal to noise ratio (OSNR). It also allows a reference input, so that the gain/loss in the channels could also been
detected. Please see the example file Optical_Channel_Analyzer.icp for detailed information on this
element, the following figure shows the system in the example file.
The plot kind of the OCN can be "frequency" or "wavelength", which is the plot unit at the location where the channel
peaks detected. The power unit can be "W" or "dBm". Signal power is measured at each channel frequency. The
following figures are the measured results for a "none"/"even" Splitter with different plot kind and power unit settings.
If enable reference input, the OCN will also detect and measure the reference signal and compare it to the input
signal to calculate the associated gain/loss. Following is an example of enabling reference input for the OCN and
taking the channel at 193.1THz as a reference. The results window is given.
Symbol
Description
Performs scattering data or impulse response analysis to calculate the overall circuit under test performance.
Ports
Name Type
output Optical Signal
input 1 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Network - -
Defines the name of the element. Analyzer
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
number of input ports 1 -
Defines the number of input ports for
the element.
power 0 dBm*
The average output power.
*std. unit is W
Waveguide
Name Default value Default unit Value range
orthogonal identifier 1 -
The identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label X - -
The label corresponding to the
orthogonal identifier.
Enhanced
Name Default value Default unit Value range
peak analysis multiple - [disable, single,
This option allows users to select the multiple, center,
type of peak analysis to perform. fixed]
number of peaks 10 -
The number of peaks for analysis,
values are truncated or inserted to
make sure the number of peaks is
constant.
peak at maximum true - [true, false]
Defines whether or not to search for
peaks located at minimum (false) or
maximum values (true)
peak threshold 10 dB
Signal power must be greater than the
power established by the peak
threshold limit. The peak threshold limit
is set by subtracting the peak
threshold value from the power of the
largest signal peak value.
peak excursion 3 dB
The peak excursion defines the rise
and fall in amplitude that must take
place in order for a peak to be
recognized.
pit excursion 7 dB
The pit excursion value is used to
determine whether or not a local
minimum in the signal is to be
considered a pit.
fwhm excursion 3 dB
The fwhm excursion defines the rise
and fall in amplitude that must take
place whdn calculating bandwidth
values.
minimum loss 200 dB
The minimum detectable transmission
loss level.
minimum angle 0.1 urad*
The minimum detectable angle value.
*std. unit is rad
Numerical
Name Default value Default unit Value range
analysis type scattering data - [scattering data,
Defines the type of analysis to be impulse
performed by the element. response]
number of threads 4 -
The user defined number of threads to
be used in the calculation.
Results
Name Description
input #/mode #/transmission The complex transmission vs. frequency
corresponding to the input optical mode.
input #/mode #/angle The angle vs. frequency corresponding to the input
optical mode.
input #/mode #/group delay The group delay vs. frequency corresponding to the
input optical mode.
input #/mode #/group velocity The normalized group velocity vs. frequency
corresponding to the input optical mode.
input #/mode #/peak/extinction ratio The extinction ratio vs. peak frequency
corresponding to the input optical mode. Where
peak frequency is the location of the detected
peaks.
input #/peak/frequency The peak frequency corresponding to the input port.
Where peak frequency is the location of the
detected peaks.
Implementation Details
The optical network analyzer (ONA) is usually used to test the overall circuit performances under testing mode. It
also could export the analysis results.
Following is an example of how to export the analysis data from an optical network analyzer, please see also the
example file ONA.icp
Note that the export data format could be s-parameter or table. In this example, the data exported is the
measurements for the optical band-pass filter. Please see the data files ona_s_parameter and ona_table for
more information, following is a glance for the two data files.
Fig. 1 ONA export data - sparameter Fig. 2 ONA export data - table
The analysis type can be selected from "scattering data" and "impulse response". With "scattering data" analysis
selected, the scattering matrix of the element is used for the calculation of the system in frequency domain; with the
"impulse response" selected, the ONA calculates the system's reaction to an impulse signal input as a function of
time. for more information, please see INTERCONNECT Circuit Solver. The limitation of the impulse response
calculation is that there are ripples introduced by the finite impulse filter (FIR) used. Following is a figure measured
for the gain of a Fabry-Perot filter with the "scattering data" and "impulse response" analysis type, respectively.
After the simulation is run, a number of measurements will be generated. To view the results, right click on the result
entry and send it to visualize.
Symbol
Description
The pseudo-random bit sequence (PRBS) generator a maximum length sequence code using a random initial state.
Ports
Name Type
output Digital Signal
Properties
General
Name Default value Default unit Value range
name PRBS - -
Defines the name of the element. Generator
functionality. sequence
(PRBS)
generator a
maximum
length
sequence code
using a random
initial state
prefix PRBS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
bitrate %bitrate% bits/s
The output signal bitrate.
output PRBS - [PRBS, zeros,
Defines the output type or the ones, alternate,
operation mode of the generator. codeword, load
from file]
order log(%sequence - [1, 30]
The polynomial order for the PRBS length%)/log(2)
signal for 'PRBS' output type
configuration.
codeword 101010101010 - -
The user defined codeword for
'codeword' output type configuration.
measurement filename pattern.dat - -
The filename containing the bit
sequence for 'load from file' output type
configuration. Input file is formatted
without any headers and it should
contain the bit values only, one value
per line.
Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.
Simulation
Name Default value Default unit Value range
time window %time window s
The duration of the generated signal. %
This is typically set by the global
properties in the root (top-most)
element.
Implementation Details
The pseudo-random bit sequence generator could generate a bit stream with the format according to the setting. The
bit rate by default is inherited from the root element setting but could be re-defined by setting the bitrate
"Expression" to none. The generated sequence length could be pre-set in the root element. The following figure
shows the system in the example file PRBS.icp.
There are six formats that can be chosen from for the sequence generated. Following is the setting for the output.
When "PRBS" is chosen, the pseudo-random bit stream is generated; "automatic seed" under the "Numerical"
setting can be set to be "true" for a random grabbing of the bit sequence seed or "false" for a desired bit sequence
seed which is pre-defined in the software. The "order" under the "Standard" setting indicates the sequence length in
the power of 2.
When "zeros" or "ones" are chosen for the output, a sequence of 0s/1s are generated. When "alternate" is chosen,
a bit stream of alternated 0s and 1s are generated starting from the bit 0.
When "codeword" is chosen, the "codeword" setting is enabled, user can directly type in the bit sequence in the
setting frame. However, when the number of bits defined in the "codeword" is less than the sequence length setting
in the root element, the bit stream will repeat itself until the number of bits reaches the setting sequence length;
when the number of bits defined in the "codeword" is larger than the sequence length setting, the bit sequence will
be truncated at the setting length.
When "load from file" is chosen, a data file can be input to the system. Please see the example data file
pattern.dat for more information. Note that the length of the bit stream in the file will be adjusted the same way
as in the "codeword" to fit the sequence length.
The following figure is plotted by the Logic Analyzer LGCA_1, when the output is set to "PRBS". For more
information of the Logic Analyzer, please see the element library page Logic Analyzer 914 .
Optical
Optical Gaussian Pulse Generator 986
Optical Hyperbolic Secant Pulse Generator 990
Symbol
Description
The NRZ Generator pulse generator creates a sequence of non-return to zero pulses coded by an input digital signal.
Ports
Name Type
modulation Digital Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
rise period 0.05 - (0, 1]
The ratio of the bit period required for
the response to rise from 10% to 90%
of its final value.
fall period 0.05 - (0, 1]
The ratio of the bit period required for
the response to fall from 90% to 10%
of its final value.
Enhanced
Name Default value Default unit Value range
pre emphasis false - [true, false]
Defines whether or not to use pre-
emphasis.
overshoot factor 0 -
The overshoot factor to be added to the
signal.
overshoot period 0 - (0, 1]
The duration of the overshoot as the
ratio of the bit period.
undershoot factor 0 -
The undershoot factor to be subtracted
from the signal.
Implementation Details
The non-return to zero (NRZ) pulse generator shapes the input digital signal to a NRZ electrical signal. Following is
the simple system in the example file NRZ_Pulse_Generator.icp.
The setting table of the NRZ pulse generator is shown below, all the parameters are defined in the property table
above.
Following is the output plotted by the oscilloscope with the parameters indicated in the figure.
Symbol
Description
The RZ Generator pulse generator creates a sequence of return to zero pulses coded by an input digital signal.
Ports
Name Type
modulation Digital Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name RZ Pulse - -
Defines the name of the element. Generator
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
Enhanced
Name Default value Default unit Value range
Implementation Details
The return to zero (RZ) pulse generator shapes the input digital signal to a RZ electrical signal. Following is the
simple system in the example file RZ_Pulse_Generator.icp.
The setting table of the RZ pulse generator is shown below, all the parameters are defined in the property table
above.
The pre-emphasis has the same definition as in the NRZ pulse generator. For more information on the effects of pre-
emphasis, please see the NRZ Pulase Generator 969 element example.
Following is the output plotted by the oscilloscope with the parameters indicated in the figure.
Symbol
Description
The impulse generator creates a sequence of impulses coded by an input digital signal.
Ports
Name Type
modulation Digital Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Impulse - -
Defines the name of the element. Generator
prefix IMPG - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
Implementation Details
The impulse generator shapes the input digital signal to an electrical impulse signal output. Following is the simple
system in the example file Impulse_Generator.icp.
The setting table of the impulse generator is shown below, the position of the impulse defines where the impulse sit
in the bit time window. All the parameters are defined in the property table above.
Following is the output plotted by the oscilloscope with the parameters indicated in the figure.
Symbol
Description
The Gaussian pulse generator creates a sequence of pulses coded by an input digital signal.
Ports
Name Type
modulation Digital Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
width 0.25 - (0, 1]
The pulse duration of the pulse full
width at half maximum, defined as ratio
of bit period.
order 1 -
Order of Gaussian function.
Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -
Implementation Details
The Gaussian pulse generator shapes the input digital signal to an electrical Gaussian signal output. Following is
the simple system in the example file Guassin_Pulse_Generator.icp.
The setting table of the Gaussian pulse generator is shown below, all the parameters are defined in the property
table above.
Following is the output plotted by the oscilloscope with the parameters indicated in the figure.
Symbol
Description
The hyperbolic secant pulse generator creates a sequence of pulses coded by an input digital signal.
Ports
Name Type
modulation Digital Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Hyperbolic - -
Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
width 0.25 - (0, 1]
The pulse duration of the pulse full
width at half maximum, defined as ratio
of bit period.
Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -
For pulse shapes with long tails, this
determines how many pulse overlaps
Implementation Details
The hyperbolic secant pulse generator shapes the input digital signal to an electrical hyperbolic secant signal
output. Following is the simple system in the example file Hyperbolic_Secant_Pulse_Generator.icp.
The setting table of the hyperbolic secant pulse generator is shown below, all the parameters are defined in the
property table above.
Following is the output plotted by the oscilloscope with the parameters indicated in the figure.
Symbol
Description
The symbol mapper takes consecutive bits and maps them to appropriate constellation points.
Ports
Name Type
modulation Digital Signal
output I Electrical Signal
output Q Electrical Signal
Properties
General
Name Default value Default unit Value range
name Modulation - -
Defines the name of the element. Symbol Mapper
Standard
Name Default value Default unit Value range
load map from file false - [true, false]
Defines whether or not to load IQ
values from an input file or to use the
currently stored values.
symbol map filename - - -
The file containing user defined IQ
values. Refer to the Implementation
Details section for the format expected.
modulation type 2PAM - [user defined,
Defines the input signal modulation 2PAM, 4PAM,
scheme. The user can choose between 8PAM, 16PAM,
different standard modulation schemes. BPSK, QPSK,
8PSK, 8QAM,
16QAM,
32QAM,
64QAM,
128QAM,
256QAM]
Implementation Details
Please see Optical PAM-4 2432 in Advanced Modulation Format Transceivers 2407 for detailed information.
Symbol
Description
The Gaussian pulse generator creates a sequence of optical pulses modulated by an input digital signal.
Ports
Name Type
modulation Digital Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Gaussian Pulse
Generator
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Gaussian Pulse
only). Generator
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
power 0 dBm*
The average output power.
*std. unit is W
Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -
For pulse shapes with long tails, this
determines how many pulse overlaps
are allowed (ie. how much to truncate
the pulses by).
Implementation Details
The optical Gaussian pulse generator is an optical Gaussian pulse shapper which takes in the digital signal and
outputs Gaussian optical pulses. Following is the simple system in the example file
Optical_Gaussian_Pulse_Generator.icp.
The setting table of the optical Gaussian pulse generator is shown below, all the parameters are defined in the
properties table above. Please see the Gaussian optical filter 1231 for more information on the effects of the "order"
and "chirp" of the Gaussian pulse shapping.
Following are the output plotted by the optical oscilloscope with different chirp settings indicated in the figures, for
the phase and waveform of the signal, respectively.
Phase Waveform
The following figure is the optical signal spectrum plotted by the OSA, for different chirp settings in the system.
Symbol
Description
The hyperbolic secant pulse generator creates a sequence of optical pulses modulated by an input digital signal.
Ports
Name Type
modulation Digital Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Hyperbolic
Secant Pulse
Generator
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Hyperbolic
only). Secant Pulse
Generator
description The hyperbolic - -
A brief description of the elements secant pulse
functionality. generator
creates a
sequence of
optical pulses
modulated by
an input digital
signal
prefix SECH - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
power 0 dBm*
The average output power.
*std. unit is W
Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Numerical
Name Default value Default unit Value range
number of pulse overlaps 1 -
For pulse shapes with long tails, this
determines how many pulse overlaps
are allowed (ie. how much to truncate
the pulses by).
Implementation Details
The optical hyperbolic secant pulse generator is an optical hyperbolic secant pulse shapper which takes in the
digital signal and outputs hyperbolic secant optical pulses. Following is the simple system in the example file
Optical_Hyperbolic_Secant_Pulse_Generator.icp.
The setting table of the optical hyperbolic secant pulse generator is shown below, all the parameters are defined in
the properties table above.
Following are the output plotted by the optical oscilloscope with different chirp settings indicated in the figures, for
the phase and waveform of the signal, respectively.
Phase Waveform
The following figure is the optical signal spectrum plotted by the OSA, for different chirp settings in the system.
6.3.3.6 Sources
Electrical
DC Source 995
Sine Wave 996
Ramp Source 998
Impulse 999
Noise Source 1000
Step Source 1003
Scripted Source 1004
Jitter Source 1006
Optical
CW Laser 1009
Multimode CW Laser 1012
DM Laser 1013
Optical Impulse 1019
Optical Noise Source 1021
Scripted Optical Source 1024
6.3.3.6.1 DC Source
Symbol
Description
DC source.
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name DC Source - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type DC Source - -
Defines the element unique type (read
only).
description DC source - -
A brief description of the elements
functionality.
prefix DC - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
amplitude 0 a.u.
The output signal amplitude.
Symbol
Description
The sine wave creates a electrical sine wave signal.
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Sine Wave - -
Defines the name of the element.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
frequency 10 GHz*
The output signal frequency.
*std. unit is Hz
phase 0 rad
The initial output signal phase.
Symbol
Description
Ramp source.
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Ramp Source - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Ramp Source - -
Defines the element unique type (read
only).
description Ramp source - -
A brief description of the elements
functionality.
prefix RAMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
slope 1 (a.u.)/s
Defines the steepness of the output
signal.
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
saturation 1000 a.u.
The limit of the maximum output signal
level.
delay 0 s
The time delay to apply to the output
signal.
6.3.3.6.4 Impulse
Symbol
Description
The model generates a single impulse.
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Impulse - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Impulse - -
Defines the element unique type (read
only).
description The model - -
A brief description of the elements generates a
functionality. single impulse
prefix IMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
amplitude 1 a.u.
The output signal peak amplitude
(before adding the bias signal).
bias 0 a.u.
The DC offset added to the amplitude
of the output signal.
delay 0 s
The time delay to apply to the output
signal.
Symbol
Description
The model generates Gaussian-distributed white noise.
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
Standard
Name Default value Default unit Value range
power spectral density 10e-018 W/Hz
The output signal power spectral
density.
Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
Implementation Details
The Noise Source generates wide bandwidth Gaussian-distributed white noise. Please see the example file
electrical_noise_source.icp for more information on this element. The following figure shows the system in
the example file:
The standard property "power spectral density" (PSD) defines the strength of the noise that distributed in the
frequency domain. The following figures show the waveform and spectrum of the noise with the PSD equals 1e-17 W/
Hz and 1e-16 W/Hz, respectively.
Symbol
Description
The model generates a single step pulse.
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Step Source - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Step Source - -
Defines the element unique type (read
only).
Standard
Symbol
Description
User defined scripted source.
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Scripted - -
Defines the name of the element. Source
Standard
Name Default value Default unit Value range
script OUTPUT=sin(2* - -
User defined script. pi*1e9*TIME);
Implementation Details
The script source is a user defined electrical source, the definition is written by script language, please see the
example file Scripted_Source.icp for more information.
In this example, two simple sinusoidal functions are used to define the optical source, following is the oscilloscope
output waveforms.
Symbol
Description
Adds random and deterministic jitter to the output signal.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Jitter Source - -
Defines the name of the element.
Standard
Name Default value Default unit Value range
period 1.0 / %bitrate% s
For a digital signal, the time value
equivalent to one bit period.
jitter frequency 0.1 * %bitrate% Hz
The jitter frequency, typically a sub-
rate of the clock frequency.
deterministic jitter 0 UI [0, 1]
The level of deterministic jitter as a
fraction of one period. The deterministic
jitter has a sinusoidal form.
random jitter 0 UI [0, 1]
The level of jitter, as a fraction of the
period, that is not bounded and
described by a Gaussian probability
distribution.
Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
Implementation Details
Jitter is the variation of the true periodicity to a presumed periodic signal. The Jitter Source element adds
deterministic and/or random jitter to the output signal. Please see the example file jitter_source.icp for the
detailed performance of this element. The following figure shows the system in the example file:
There are two types of jitter modeled in this element; the random jitter, also known as the Gaussian jitter, which is
the unpredictable time noise; the deterministic jitter, which is predictable and reproducible. The total jitter is the
combination of these two. The setting of the deterministic jitter and the random jitter is the level of the jitter as a
fraction of one jitter period, which take the value in the range [0, 1]. The effects of these two types of jitter and the
combination effect are shown in the following figures, the figures measure the eye diagram of the system in the
example.
Fig 1. Eye diagram w ith no jitter Fig 2. Eye diagram w ith 0.01 determ inistic jitter
Fig 3. Eye diagram w ith 0.01 random jitter Fig 4. Eye diagram w ith the com bination of 0.01
determ inistic jitter and 0.01 random jitter
6.3.3.6.9 CW Laser
Symbol
Description
The CW laser model generates a continuous wave (CW) optical signal.
Ports
Name Type
output Optical Signal
Properties
General
Name Default value Default unit Value range
name CW Laser - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type CW Laser - -
Defines the element unique type (read
only).
description The CW laser - -
A brief description of the elements model
functionality. generates a
continuous
wave (CW)
optical signal
prefix CWL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
power 0 dBm*
The average output power.
*std. unit is W
linewidth 0 MHz*
The output signal spectral linewidth.
*std. unit is Hz
phase 0 rad
The initial output signal phase.
Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Enhanced
Name Default value Default unit Value range
Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.
Implementation Details
The state of polarization (SOP) of the CW Laser model is defined by using the polarization ellipse as shown in Fig.
1, where is the ellipticity angle and is the azimuth angle, a and b are the major and minor axis of the ellipse,
respectively. Then the unified Stokes Parameters are defined by Equation. 1.
Symbol
Description
The CW source model generates a multimode signal, composed by a set of continuous wave (CW) orthogonal
optical signals.
Ports
Name Type
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Multimode CW - -
Defines the name of the element. Laser
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
power 0 dBm*
The average output power.
*std. unit is W
phase 0 rad
The initial output signal phase.
orthogonal identifier and power <2,2> [1, 2, - -
ratio 0.5...]
A matrix editor that allow users to input
the label (column 1) and power ratio
(column 2) corresponding to each
orthogonal identifier.
6.3.3.6.11 DM Laser
Symbol
Description
Ports
Name Type
modulation Electrical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name DM Laser - -
Defines the name of the element.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.
Waveguide
Name Default value Default unit Value range
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Waveguide/Recombination Coefficient
Name Default value Default unit Value range
carrier lifetime 1e-009 s
Defines the carrier lifetime n.
Waveguide/Gain
Name Default value Default unit Value range
gain compression factor 10e-024 m^3
Defines the gain compression factor ?.
Waveguide/Spontaneous Emission
Name Default value Default unit Value range
linewidth enhancement factor 5 -
Defines the linewidth enhancement
factor .
Numerical
Name Default value Default unit Value range
calculate noise false - [true, false]
Defines whether or not to include noise
in the rate equation model. It 'true',
laser RIN and linewidth will be enabled.
number of steps 2 -
The number of steps the ODE solver
will take for each time step.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.
Implementation Details
The Directly Modulated Laser (DML) model is based on reference [1]. The laser is directly modulated by electrical
current. Parameters listed in the following table follows equation (1) to (6) [1].
a0 gain coefficient
dp p b Gn (1)
= GG (n - n0 ) p - +
dt tp tn
dn I (t ) n (2)
= - G (n - n0 ) p -
dt qVa tn
df 1 1 (3)
= a {Gvg a0 (n - n0 ) - }
dt 2 tp
G = vg a0 /(1 + ep ) (4)
1 df (6)
Dv(t ) =
2 p dt
where n and p are the electron and photon densities in the laser active region, and G are the optical phase and
gain, and m and v defines for the optical power time variations and laser chirp, respectively.
The Relative Intensity Noise (RIN) for this model is defined based on the Langevin formulation, and please refer to
Reference [2] for the detailed implementation of the photon (Fp), electron (Fn) and phase (F?) noises.
The state of polarization (SOP) of the DM Laser model is defined by using the polarization ellipse as shown in Fig. 1,
where is the ellipticity angle and is the azimuth angle, a and b are the major and minor axis of the ellipse,
respectively. Then the unified Stokes Parameters are defined by Equation. 7.
Please see the example file DM_Laser.icp for more information on this element. The following figure shows the
system in the example file:
The following figure plots the waveforms monitored by the oscilloscope and the optical oscilloscope.
References
[1] J.C. Cartledge and G.S. Burley, "The Effect of Laser Chirping on Lightwave System Performance," JLT Vol 7,
No. 3, 568-573 (1989)
[2] G .P. Agrawal, N.K. Dutta, Semiconductor Laser, Van Nostrad Reinhold, New York, 1993.
Symbol
Description
The model generates a single impulse.
Ports
Name Type
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical impulse - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
prefix IMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
power 0 dBm*
The average output power.
*std. unit is W
phase 0 rad
The initial output signal phase.
delay 0 s
The time delay to apply to the output
signal.
Polarization
Name Default value Default unit Value range
azimuth 0 rad [-1.5708,
The azimuth angle (polarization ellipse) 1.5708]
of the signal output.
ellipticity 0 rad [-0.785398,
The ellipticity angle (polarization 0.785398]
ellipse) of the signal output.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Implementation Details
The state of polarization (SOP) of the CW Laser model is defined by using the polarization ellipse as shown in Fig.
1, where the angle is the ellipticity angle and is the azimuth, b and a are the minor and major axis of the ellipse,
respectively. Then the unified Stokes Parameters are defined by Equation. 1.
Symbol
Description
The model generates Gaussian-distributed optical white noise.
Ports
Name Type
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Noise - -
Defines the name of the element. Source
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Numerical
Name Default value Default unit Value range
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.
Implementation Details
The Optical Noise Source generates wide bandwidth Gaussian-distributed white noise. Please see the example file
optical_noise_source.icp for more information on this element. The following figure shows the system in the
example file:
The standard property "power spectral density" (PSD) defines the strength of the noise that distributed in the
frequency domain. The following figures show the waveform and spectrum of the noise with the PSD equals 1e-17 W/
Hz and 1e-16 W/Hz, respectively.
Symbol
Description
User defined optical source.
Ports
Name Type
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Scripted - -
Defines the name of the element. Optical Source
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
script OUTPUT=sin(2* - -
User defined script. pi*1e9*TIME);
Waveguide/Mode 1
Implementation Details
The script optical source is a user defined optical source, the definition is written by script language, please see the
example file Script_Optical_Source.icp for more information.
In this example, two simple sinusoidal functions are used to define the optical source, following is the optical
oscilloscope output waveforms.
6.3.3.7 Modulators
Optical
Traveling Wave Electrode 1027
Optical Amplitude Modulator 1030
Mach-Zehnder Modulator 1032
Mach-Zehnder Modulator Measured 1035
Symbol
Description
Traveling wave electrode transmission line filter.
Ports
Name Type
Properties
General
Name Default value Default unit Value range
name Traveling Wave - -
Defines the name of the element. Electrode
Standard
Name Default value Default unit Value range
length 0.01 m
The interaction length of the modulator.
microwave loss 0 dB/m
Defines the microwave electrode loss.
loss type constant - [constant,
Defines if the loss is constant or linear, square
frequency dependent. Frequency root]
dependency can be linear (~1/f) or
square root [~1/sqrt(f)]
loss reference frequency 1 Hz
Central frequency of operation.
microwave index 4 -
Defines the the microwave effective
index.
optical index 3 -
Defines the waveguide effective index.
source resistance 50 ohm
Defines the source resistance.
source reactance 0 ohm
Defines the source reactance.
characteristic resistance 50 ohm
Defines the characteristic resistance.
characteristic reactance 0 ohm
Defines the characteristic reactance.
terminating resistance 50 ohm
Defines the terminating resistance.
terminating reactance 0 ohm
Defines the terminating reactance.
junction resistance 0 ohm.m
Defines the junction resistance.
junction capacitance type constant - [constant, table]
Defines if the junction capacitance is
constant or voltage dependent.
constant junction capacitance 0 F/m
Defines the junction capacitance.
Standard/Table
Name Default value Default unit Value range
load junction capacitance from false - [true, false]
file
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
junction capacitance filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
junction capacitance table <30,2> [-3, - - -
A matrix editor for users to read the 2.896551724, -
element current data values (read 2.793103448...]
only).
Numerical
Name Default value Default unit Value range
time variant digital filter interpolate - [interpolate,
Defines the operation of the internal update]
time varying digital filter.
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/normalized average voltage The normalized average voltage vs. frequency.
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
For the implementation details of traveling wave electrode, please see the application example Traveling Wave
Modulators 2454 for more information.
Symbol
Description
modulates an optical signal depending on electrical signal.
Ports
Name Type
input Optical Signal
modulation Electrical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Amplitude
Modulator
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Amplitude
only). Modulator
description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix AM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
modulation index 1 - [0, 1]
Defines the modulation index of the
modulator.
Implementation Details
The amplitude modulator (AM) modulates the amplitude of the carrier (optical signal) in proportion to the strength of
the electrical signal. Please see the example file AM.icp for more information. The system in the example file
demonstrates the working principle of the AM. The second figure is the parameter setting window of the AM.
The key character of AM is the modulation index. The modulation index is defined by how much the modulated
M
h=
variable varies around its un-modulated level, P , where M is the modulation power and P is the carrier power.
The figure below shows modulated signals when the modulation index is 1 and 0.5.
M M - M min
h= = max
Pcarrier Pcarrier
The modulation index is calculated by the equation .
Symbol
Description
modulates an optical signal depending on electrical signal.
Ports
Name Type
input Optical Signal
modulation 1 Electrical Signal
modulation 2 Electrical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Mach-Zehnder - -
Defines the name of the element. Modulator
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
modulator type dual drive - [dual drive,
Defines whether the modulator is a balanced single
single drive or a dual drive modulator. drive,
unbalanced
single drive]
dc bias source internal - [internal,
Defines whether to use an internal or external]
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
start voltage 1 0 V
The lower voltage limit for the
calculated graph.
stop voltage 1 8 V
The upper voltage limit for the
calculated graph.
Results
Name Description
Implementation Details
For the implementation details of traveling wave electrode, please see the application example PIN Mach-Zehnder 2228
References
See for the following reference for a description of the standard properties of the MZM:
[1] J.C. Cartledge, C. Rolland, S. Lemerle, A. Solheim, "Theoretical performance of 10 Gb/s Lightwave Systems
using a III-V Semiconductor Mach-Zehnder Modulator," IEEE PTL Vol 6, No. 2, 282-284 (1994)
[2] J.C. Cartledge, "Performance of 10 Gb/s Lightwave Systems Based on Lithium Niobate Mach-Zehnder
Modulators with Asymmetric Y-Branch WAveguides," IEEE PTL Vol 7, No. 9, 1090-1092 (1995)
Symbol
Description
modulates an optical signal depending on electrical signal.
Ports
Name Type
input Optical Signal
modulation 1 Electrical Signal
modulation 2 Electrical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Mach-Zehnder - -
Defines the name of the element. Modulator
Measured
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix MZM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
length 1 m
The interaction length of the modulator.
splitting ratio 1.3 -
The Y-branch power splitting ratio P1/
P2.
Standard/Table
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
Standard/Coefficients
Name Default value Default unit Value range
absorption coefficient a -0.0617 dB/V^3/m
The polynomial coefficient for the
absorption function.
absorption coefficient b -0.2804 dB/V^2/m
The polynomial coefficient for the
absorption function.
absorption coefficient c -0.6635 dB/V/m
The polynomial coefficient for the
absorption function.
absorption coefficient d -0.0719 dB/m
The polynomial coefficient for the
absorption function.
phase coefficient a -0.0038 rad/V^3/m
The polynomial coefficient for the
phase function.
phase coefficient b 0.1132 rad/V^2/m
The polynomial coefficient for the
phase function.
phase coefficient c -0.4825 rad/V/m
The polynomial coefficient for the
phase function.
phase coefficient d -0.0107 rad/m
The polynomial coefficient for the
phase function.
Implementation Details
The working principle of Mach-Zehnder modulator (MZM) measured is the same as the MZM while it requires an
input measurement file to define the modulator's characteristic. The measurement file is usually generated by other
application tools such as DEVICE or MODE. The input file measurement type can be selected as "absorption &
phase" or "effective index". Please see example file MZM_Measured.icp.
If 'absorption & phase' is selected under measurement type, the file format is:
If 'effective index' is selected under measurement type, the file format is:
In this example, the characteristics of the MZM can be visualized by analyzers, following are the analyzers' output to
References
See for the following reference for a description of the standard properties of the MZM:
[1] J.C. Cartledge, "Combing Self-Phase Modulation and Optimum Modulation Conditions to Improve the
Performance of 10 Gb/s Transmission Systems Using MQW Mach-Zehnder Modulators," JLT Vol 18, No. 5, 647-655
(2000)
Symbol
Description
modulates an optical signal depending on electrical signal.
Ports
Name Type
port 1 Optical Signal
modulation Electrical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Modulator
Measured
annotate true - [true, false]
description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix OM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
length 1 m
The interaction length of the modulator.
input parameter table - [table,
Defines whether the input parameter is coefficients]
a table with voltage dependent values
or coefficients of a polynomial function.
Standard/Table
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement type effective index - [absorption &
Defines the type of measurement data. phase, effective
index]
Standard/Coefficients
Name Default value Default unit Value range
absorption coefficient a -0.0617 dB/V^3/m
The polynomial coefficient for the
absorption function.
absorption coefficient b -0.2804 dB/V^2/m
The polynomial coefficient for the
absorption function.
absorption coefficient c -0.6635 dB/V/m
The polynomial coefficient for the
absorption function.
absorption coefficient d -0.0719 dB/m
The polynomial coefficient for the
absorption function.
phase coefficient a -0.0038 rad/V^3/m
The polynomial coefficient for the
phase function.
phase coefficient b 0.1132 rad/V^2/m
The polynomial coefficient for the
phase function.
phase coefficient c -0.4825 rad/V/m
The polynomial coefficient for the
phase function.
phase coefficient d -0.0107 rad/m
The polynomial coefficient for the
phase function.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Enhanced
Name Default value Default unit Value range
electrode type lumped - [lumped,
Defines the electrode type. Types traveling wave]
include 'lumped' or 'traveling wave'.
microwave loss 0 dB/m
Defines the microwave electrode loss.
microwave index 3 -
Defines the the microwave effective
index.
optical index 3 -
Defines the waveguide effective index.
impedance mismatch false - [true, false]
Defines whether or not to include
impedance mismatch effect.
source impedance 50 ohm
Defines the source impedance.
characteristic impedance 50 ohm
Defines the characteristic impedance.
terminating impedance 50 ohm
Defines the terminating impedance.
Numerical
Name Default value Default unit Value range
number of steps 30 -
The number of discretization steps for
the waveguide.
Implementation Details
The working principle of the optical modulator (OM) measured is the same as the normal phase modulator, while it
requires some user input information to define the modulator's characteristic. Please see the example file
OM_Measured.icp.
When the "input parameter" under the "Standard" category is set to "coefficient", the absorption coefficients and
phase coefficients can be entered under the "Coefficients" category.
When the "input parameter" is set to be "table", input measurement file is required. The measurement type of the
table can be set to be "absorption & phase" or "effective index".
If 'absorption & phase' is selected under measurement type, the file format is:
Please see the example file abs_phase.dat. Please note that, the unit for the 'absorption' coefficient is dB/m and
the unit for the 'phase' coefficient is rad/m.
If 'effective index' is selected under measurement type, the file format is:
In this example, the characteristics of the OM can be visualized by analyzers, following are the analyzers' output to
measure the system.
Fig. 1 Optical oscilloscope output for "coefficients" Fig. 2 Optical spectrum analyzer output for
input parameter "coefficients" input parameter
Fig. 3 Optical oscilloscope output for "table" input Fig. 4 Optical spectrum analyzer output for "table"
parameter input parameter
NOTE: It is important to note that while the modulator and source give the
appearance of an electro-optic modulator, the modulator input can represent any
scalar value that affects the material index of the waveguide and therefore the
effective index of its guiding mode. Hence, the modulating signal could just as
well represent temperature as in a silicon waveguide with heater.
Symbol
Description
modulates an optical signal depending on electrical signal.
Ports
Name Type
port 1 Optical Signal
modulation Electrical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Modulator
Scripted
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical - -
Defines the element unique type (read Modulator
only). Scripted
description modulates an - -
A brief description of the elements optical signal
functionality. depending on
electrical signal
prefix OM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
length 1 m
The interaction length of the modulator.
script ANGLE = - -
User defined script. 2*pi;LOSS=0.1;
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
Implementation Details
The optical modulator (OM) script is a modulator whose characteristics are totally defined by the script. Please see
the example file OM_Script.icp for detailed information.
The script language used to characterize the modulator goes under the "Standard" category in "script". Please see
the script OM_script.lsf for details.
The script can define a number of features of the modulator, in this example, it defines the coefficient. The
characteristics of the modulator can be visualized by analyzers, following are the analyzers' output to measure the
system.
Symbol
Description
modulates an optical signal depending on electrical signal.
Ports
Name Type
port 1 Optical Signal
modulation Electrical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Ring - -
Defines the name of the element. Modulator
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement type effective index - [absorption &
Defines the type of measurement data. phase, effective
index]
measurement <11,3> [-5, - - -
A matrix editor for users to read the 4.5, -4...]
element current modulation data values
(read only).
Waveguide
Name Default value Default unit Value range
loss 0 dB/m
Defines the waveguide loss.
effective index 1 -
Defines the waveguide effective index.
group index 1 -
Defines the waveguide group index.
dispersion 0 s/m/m
Defines the waveguide dispersion.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first coupler.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler.
modes TE,TM - -
List of optical mode labels supported
by the element.
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Enhanced
Name Default value Default unit Value range
electrical fill factor 1 - [0, 1]
The waveguide length ratio affected by
the modulation.
Numerical
Name Default value Default unit Value range
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
An optical ring modulator is usually used in wavelength division multiplexing (WDM) systems to isolate a wavelength
out of the multiplexed signal. The INTERCONNECT ring modulator model contains a time-varying frequency transfer
function that represents the relationship between the input and through port. This quasi-static behavior allows for
using the ring modulator not only as a modulator but also as a filter or multiplexer device when cascading multiple
ring modulators. In this example, we characterize the time domain and frequency domain performances of the ring
modulator, please see the example file Optical_Ring_Modulator.icp. The following figure is the setting of the
optical ring modulator.
The required input file measurement type could be selected from "effective index" and "absorption & phase". Please
see the example measurement input file neff_vs_voltage_11.txt which goes under the "effective index" type.
Please note that, the two optical ports for the carrier light path are the "in"
and "through" ports of the double bus ring.
The frequency domain characterization of the optical ring modulator gives the following transmission response, it
isolates out the signal with a wavelength around 1309.8nm.
There are three numerical methods to calculate for the time variant digital filter coefficients. User can choose among
"disable", "interpolate" and "update" for the filter type, please see the whitepaper on INTERCONNECT Ring
Modulator Model for the detailed explanation of the simulation methodology. For the system shown above, the
following figure shows the output electrical signal for the three types of the time variant digital filter, respectively.
The time domain characterization of the optical ring modulator gives the following results when the time variant filter
is set to the "update" type. The blocked wavelength (1310nm) is much shorter than the transmission light wavelength
(1552nm), hence there is no signal blocked.
Fig.1 Received optical signal waveform (OOCS_1 Fig. 2 Received optical signal spectrum (OSA_1
output) output)
Fig. 3 Transmitted electrical signal (OSC_2 output) Fig. 4 Received electrical signal (OSC_1 output)
6.3.3.8 Passives
Electrical
Electrical Attenuator 1054
Optical
Optical Attenuator 1062
Optical Phase Shift 1065
Optical Delay 1069
Optical Mirror 1071
Termination Mirror 1074
Optical Splitter/Coupler 1076
Symbol
Description
Electrical attenuator.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Attenuator
Standard
Name Default value Default unit Value range
attenuation 0 dB
Defines the attenuation
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The element Electrical Attenuator attenuates the input signal by the amount of value according to user's setting.
Following is the simulation system in the example file electrical_attenuator.icp to illustrate the working
principle and effect of this element.
In the example, the attenuation is set to be 3 dB, which attenuates the signal power by half. The two figures below
are the outputs of the oscilloscopes, for the signal's amplitude and power, respectively.
Symbol
Description
Electrical delay.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Electrical Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical Delay - -
Defines the element unique type (read
only).
description Electrical delay - -
A brief description of the elements
functionality.
prefix DLY - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Standard
Name Default value Default unit Value range
delay 0 s
The time delay to apply to the input
signal.
Numerical
Name Default value Default unit Value range
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The element Electrical Delay applies a delay to the input electrical signal. The figure below shows the demonstration
system in the example file electrical_delay.icp.
The delay in this example is set to be 0.5 ns, the following figure shows the output of the oscilloscopes, the delay of
the signal is clearly shown,
Symbol
Description
Microwave loss.
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Microwave Loss - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
Standard
Name Default value Default unit Value range
length 1 m
The interaction length of the modulator.
microwave loss 0 dB/m
Defines the microwave electrode loss.
loss type constant - [constant,
Defines if the loss is constant or linear, square
frequency dependent. Frequency root]
dependency can be linear (~1/f) or
square root [~1/sqrt(f)]
loss reference frequency 1 Hz
Central frequency of operation.
Numerical
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the Microwave Loss Element works, please see the
example file: Microwave_Loss.icp
The key characteristics of this element are in the "standard" setting, the "length", "microwave loss", "loss type" and
"loss reference frequency". Following figure shows the measured losses for different loss types (constant, linear and
square root) with 1 m of interaction of modulator length, 1 dB/m microwave loss and 10 GHz central frequency of
operation.
Symbol
Description
It reduces the power level of an optical signal.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Attenuator
Standard
Name Default value Default unit Value range
attenuation 0 dB
Defines the attenuation
enable return loss false - [true, false]
Defines whether or not to include the
effect of return loss (reflections) in the
output signals.
return loss 100 dB
Defines the return loss.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The element Optical Attenuator attenuates the input signal by the amount of value according to user's setting.
Following is the demonstration system in the example file optical_attenuator.icp to illustrate the working
principle and effect of this element and the property of this element.
The attenuation of this element is set to be 3 dB in the example, and according to the figure above, the optical power
meters measure a 3 dB attenuation after this element. Another property in the standard setting of this element is the
"return loss", which defines the reflection caused by this element. The "return loss" can be enabled or disabled.
Symbol
Description
Applies a phase shift to the input signal.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Phase - -
Defines the name of the element. Shift
prefix PHS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
input parameter constant - [constant, table]
Defines whether to provide the phase or
a table with frequency dependent
values.
phase shift 0 rad
The phase shift to apply to the input
signal.
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the frequency
dependent phase values.
measurement <2> [193.1e - -
The table containing the frequency +012, 0]
dependent phase values.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Numerical
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The optical phase shift applies a shift to the phase of the input signal. Following is an example and implementation
details of how the optical phase shift element works, please see the example file: Optical_Phase_Shift.icp
Following is a measurement of the phase shift, the phases of shift are /2, and 2 . The phase shift is in the
setting of "standard", the unit of the phase shift can be chosen from "deg", "mrad", "rad" and "urad". Note that the
range of the phase shift always falls into the region [0, 2 ].
Symbol
Description
Applies a time delay to the input signal.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Delay - -
Defines the element unique type (read
only).
description Applies a time - -
A brief description of the elements delay to the
functionality. input signal
prefix DLY - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
delay 0 s
The time delay to apply to the input
signal.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Numerical
Name Default value Default unit Value range
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The element Optical Delay applies a delay to the input optical signal. The figure below shows the demonstration
system in the example file optical_delay.icp.
The delay in this example is set to be 1 ns, the following figure shows the output of the optical oscilloscopes, the
delay of the signal is clearly shown,
Symbol
Description
Reflective mirror.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
Standard
Name Default value Default unit Value range
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The optical mirror is a reflective mirror, following is a demonstration of the usage of the optical mirror and a
comparison of the optical mirror and the termination mirror. Please see the example file
Optical_Mirror_Termination_Mirror.icp.
The first figure is a system of a Fabry-Perot resonator, please note that the second optical mirror is flipped to make
the cavity symmetrical because there is a phase shift of from port 2 to port 1. The second figure replaces the
second optical mirror with a termination mirror, the two systems give the same results when the reflectivity of the two
mirrors are set to be the same.
The following figures are the measurements of the system. The first figure measures the transmission of the
systems with a termination mirror, a non-symmetrical optical mirror and a symmetrical mirror, respectively. It clearly
indicates the degree of phase shift from port 2 to port 1. The second figure shows the transmission and reflection
of the system, without considering of loss, the transmission and reflection add up to 1.
Symbol
Description
Termination mirror.
Ports
Name Type
port Optical Signal
Properties
General
Name Default value Default unit Value range
name Termination - -
Defines the name of the element. Mirror
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
reflectivity 0 - [0, 1]
Defines the reflectivity of the mirror.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Please see Optical Mirror for more information, please see the example file
Optical_Mirror_Termination_Mirror.icp.
Symbol
Description
Combine or distribute light from single/multiple ports to multiple/single ports.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Splitter/ - -
Defines the name of the element. Coupler
Standard
Name Default value Default unit Value range
number of ports 2 -
Defines the number of output ports for
the element.
split ratio even - [even, none]
Determines how the power is split
between the output ports. If 'even', the
power is split evenly between the
output ports; if 'none', all the power will
go through each one of the output ports
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The optical splitter/coupler combines/distributes light from single/multiple ports to multiple/single ports. The key
characteristics of this element is split ratio. The split ratio can be set to the format "even" or "none".
Following are examples of the optical splitter/coupler element with the split ratio set to "even" and "none",
respectively. With the split ratio set to "even", the power of the input signal evenly distributed to the output branches;
with the split ratio set to "none", the input signal duplicates itself to the output branches. Please see the example
file: Optical_Spliter-Coupler.icp
Symbol
Description
It separates optical signals that travel in opposite directions.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Circulator
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.
return loss 100 dB
Defines the return loss.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The 3 port optical circulator is an element that separates optical signals that travel in opposite directions in fiber.
Please see the example file optical_circulator.icp for more information on the implementation details of this
element. Following is a figure of the system in the example:
The light enters any port of the circulator exits from the next port; which means light goes into port 1 emits from port
2, and if some of the emitted light reflected back to the circulator, it will exit from port 3. The figure above clearly
shown the working results of this element.
Symbol
Description
It reduces the reflected power level of an optical signal.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
Standard
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.
return loss 100 dB
Defines the return loss.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
6.3.3.9 S Parameters
Electrical
Electrical N Port S-Parameter 1094
Optical
Optical 1xN S-Parameter 1083
Optical S-Parameter 1086
Optical N Port S-parameter 1090
Symbol
Description
Optical 1xN s-parameter element.
Ports
Name Type
input Optical Signal
output 1 Optical Signal
Properties
General
Name Default value Default unit Value range
prefix SPAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
s parameters <3> [0, 1, 0] - -
A matrix editor for users to read the
element current s-parameters (read
only).
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Numerical
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Please see the example file Optical_1xN_SParameter.icp for detailed information.
Symbol
Description
Optical two port s-parameter element.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical S- - -
Defines the name of the element. Parameter
prefix SPAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
s parameters <3> [0, 1, 0] - -
A matrix editor for users to read the
element current s-parameters (read
only).
load from file false - [true, false]
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Numerical
Name Default value Default unit Value range
order 1 -
The order that the element internal s-
parameters are raised to. This allows
users to automatically cascade an
arbitrary number of elements.
digital filter type FIR - [FIR, IIR]
Defines the digital filter type used to fit
the element transfer function in time
domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
Implementation Details
Please see the example file Optical_S_Parameter.icp for detailed information.
f abs ( S11) angl e( S11) abs ( S12) angl e( S12) abs ( S21) angl e( S21) abs ( 22) angl e( S22)
Symbol
Description
Optical N port s-parameter element.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical N Port - -
Defines the name of the element. S-Parameter
prefix SPAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load s-
parameters from an input file or to use
the currently stored s-parameters.
s parameters filename - - -
The file containing the s-parameters.
Refer to the Implementation Details
section for the format expected.
Numerical
Name Default value Default unit Value range
remove disconnected ports false - [true, false]
Defines whether or not to remove
disconnected ports from the internal s-
parameters.
order 1 -
The order that the element internal s-
parameters are raised to. This allows
users to automatically cascade an
arbitrary number of elements.
digital filter type FIR - [FIR, IIR]
Defines the digital filter type used to fit
the element transfer function in time
domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
passivity ignore - [ignore, test,
Defines how passivity of s-parameters enforce,
is enforced: 'ignore' ignores the optimal]
passivity of the s-parameters. 'test'
tests if the induced 2-norm of the s-
parameters is less than 1. 'enforce'
enforces the passivity by making sure
the the induced 2-norm of the s-
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/passivity The induced 2-norm or the spectral norm of the s-
parameters vs. frequency.
diagnostic/reciprocity The induced 2-norm or the spectral norm of (S-S')
vs. frequency, where S is the s-parameters matrix.
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
There are a few options for the file format. Please see the following example files:
optical_N_port_sparameter.icp.
Option 1:
( " out put por t name" , " mode l abel " , mode I D ( out ) , " i nput por t name" , mode I D
( i n) , " i nput t y pe" )
( # r ows , # c ol umns )
f abs ( S) angl e( S)
...
Option 2:
[ # por t s on t he l ef t , # por t s on t he r i ght ]
( " out put por t name" , " mode l abel " , mode I D ( out ) , " i nput por t name" , mode I D
( i n) , " i nput t y pe" )
( # r ows , # c ol umns )
f abs ( S) angl e( S)
...
Option 3:
[ " por t name" , " LEFT/ RI GHT/ TOP/ BOTTOM" ]
[ " por t name" , " LEFT/ RI GHT/ TOP/ BOTTOM" ]
...
( " out put por t name" , " mode l abel " , mode I D ( out ) , " i nput por t name" , mode I D
( i n) , " i nput t y pe" )
( # r ows , # c ol umns )
f abs ( S) angl e( S)
...
If the s-parameter is not fully defined for each of the ports combination, the default value 0 will be used for undefined
ones. e.g., if only S21 and S31 are defined for a 3-port S-Parameter element, S12 = S13 = S23 = S32 = S11 = S22
= S33 =0, the transmission through this combination of ports is blocked.
Symbol
Description
Electrical N port s-parameter element.
Ports
Name Type
port 1 Electrical Signal
port 2 Electrical Signal
Properties
General
Name Default value Default unit Value range
name Electrical N - -
Defines the name of the element. Port S-
Parameter
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical N - -
Defines the element unique type (read Port S-
only). Parameter
description Electrical N - -
A brief description of the elements port s-
functionality. parameter
element
prefix SPAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
s parameters <9> [0, 0, 0...] - -
A matrix editor for users to read the
element current s-parameters (read
only).
load from file false - [true, false]
Defines whether or not to load s-
parameters from an input file or to use
the currently stored s-parameters.
s parameters filename - - -
The file containing the s-parameters.
Refer to the Implementation Details
section for the format expected.
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The file format follows the standard Touchstone file format, the following example is for a 4-port data magnitude angle
file:
#magnitude angle
<FREQ> |S11| <S11 |S12| <S12 |S13| <S13 |S14| <S14
|S21| <S21 |S22| <S22 |S23| <S23 |S24| <S24
|S31| <S31 |S32| <S32 |S33| <S33 |S34| <S34
|S41| <S41 |S42| <S42 |S43| <S43 |S44| <S44
#Real Imaginary
<FREQ> Re{S11} Im{S11} Re{S21} Im{S21} Re{S12} Im{S12} Re{S22} Im{S22}
#dB Angle
<FREQ> 20log10|S11| <S11 20log10|S21| <S21 20log10|S12| <S12 20log10|S22| <S22
The option line is required at the beginning of the file to specify the format of the data in the file. The option line starts
with a "#" and has the format of:
where
<FREQ_UNITS> = units of frequency data (options are Hz, KHz, MHz and GHz)
<TYPE> = type of file data
<FORMAT> = S-parameter format (options are:
DB for dB-angle, MA for magnitude-angle, RI for real-imaginary)
<Rn> = reference resistance in ohms, n is a positive number
sparameter2x2.icp, sparameter2x2.s4p
6.3.3.10 Waveguides
Fibers 1116
Couplers 1121
Crossings 1132
Resonators 1135
Gratings 1154
Straight Waveguide 1097
Multimode Waveguide 1114
MODE Waveguide 1107
Bend 1162
Gaussian Beam 1105
Waveguide Offset 1112
Symbol
Description
Optical straight waveguide.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Straight - -
Defines the name of the element. Waveguide
functionality.
prefix WGD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
An optical straight waveguide is a physical structure that confines light waves (electromagnetic waves) in an optical
spectrum. Fiber is also a common type of optical straight waveguide. The two orthogonal identifiers "1" and "2" (with
the default labels "TE" and "TM", respectively) have the following definition for group index and dispersion coefficient.
Group c k n (1)
Index ng = =c = ( wneff ( w )) = neff ( w ) + w
ng w w w
Dispersion 2 pc 2 k (2)
Coefficient Dl = -
l2 w 2
Due to the refractive index change when light enters the waveguide from other media, the speed and phase of the
light will change accordingly. Hence the optical straight waveguide is always used as a phase shifter or an optical
delay line. The phase change and time delay introduced by a piece of straight waveguide of length L, effective and
group indices of neff and ng can be calculated by the equations listed below, where c is the speed of light:
2 pneff (3)
Dj = L
l
L ng (4)
Dt =
c
The optical straight waveguide can be used in numerous structures for different design and application purposes. In
the example file straight_waveguide.icp, the ONA measures the delay and phase shift introduced by the
waveguide. The following figure shows the system in the example file with the straight waveguide has the properties
shown on the right hand side:
In the system shown above, the optical signal inputs to the first Y branch is split into two identical signals. The
waveguide in the upper branch introduces a periodic phase shift to the signal with respect to wavelengths. The
measurements of the gain and phase of the two branches are shown below.
By recombining the two branches, the phase difference of signals in the two arms will construct and destruct the
signal periodically with respect to wavelength (frequency). This gives an interferometer effect. The gain (intensity
transmission frequency response) and phase of the signal outputs from the second Y branch are shown below:
Digital filter
For time domain simulations, the frequency dependent elements rely on either infinite impulse response (IIR) or finite
impulse response (FIR) digital filters. FIR filters can provide much better frequency responses provided the signal is
composed of tones that fall exactly on the frequencies corresponding to the FIR taps. Following is an example of a
Gaussian filter relies on FIR digital filters.
where bk are the filter tap coefficients, the filter transfer function in z-domain is:
M -1
H ( z ) = bk z -k
k =0
From the transfer function above we can see, FIR filters introduce extra M delays, witch adds a constant group delay
to the signal path.
To compensate for the artificial group delay, fractional delay and delay compensation options are available in related
waveguide elements.
Fractional delay
Waveguide elements including Straight Waveguide, MODE Waveguide, Multimode Waveguide and Waveguide
Bends adopt an option to enable a fractional delay filter, where time delays dont have to be an integer multiple of the
sampling period. It offers better accuracy when running transient simulations, where waveguides are typically
represented as delay lines. This option is especially useful in ring structures, since the delay adds up by the
resonance effect and become more crucial in these structures.
The default setting for "fractional delay" is "true" for all newly added waveguide elements. The "delay compensation"
number depends on the number of connections (or number of elements) in the structure. Please note that, every
time when signal passes the waveguide element, the designated number of samples of delay compensation will be
performed.
The results shown above proves that, if time delay is not an integer multiple of the sampling period and no delay
compensation is performed, the impulse response of the modulation gain curve only matches the scattering data
analysis at around the center frequency (green curve and blue curve). As the frequency deviates from the center, the
FSR goes more and more off. When including fractional delay compensation, the impulse response result matches
the scattering data analysis result very well for most of the frequency ranges (red curve and blue curve), but when
frequency is far off from the center (~ 8 THz on each side), the impulse response suffers from some distortion.
Please make sure to operate in the valid frequency range when using the fractional delay compensation option.
Symbol
Description
This model is equivalent to a single mode waveguide with a Gaussian beam.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Gaussian - -
Defines the name of the element. Beam
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
beam direction 2D Z normal - [2D X normal,
The direction of the propagation. 2D Y normal,
2D Z normal]
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
Waveguide
Name Default value Default unit Value range
orthogonal identifier 1 -
The identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label Gaussian - -
The label corresponding to the
orthogonal identifier.
Numerical
Name Default value Default unit Value range
Symbol
Description
This element can import results from MODE.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name MODE - -
Defines the name of the element. Waveguide
prefix WGD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
length 1 m
The length of the waveguide.
loss 0 dB/m
Defines the waveguide excess loss.
excess loss 0 dB
Defines the waveguide loss.
load mode profile true - [true, false]
Defines whether or not to load mode
profiles from an input file or to ignore
them.
load from file true - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
ldf filename - - -
The .ldf file containing results from
'Lumerical MODE Solutions' used to
characterize the waveguide.
Enhanced
Name Default value Default unit Value range
normalize group delay false - [true, false]
If 'true' is selected, the group delays for
all modes will be subtracted by the
reference group delay (from the mode
with the smallest group delay).
propagation loss true - [true, false]
If 'true' is selected, the propagation
loss will be ignored and only a nonzero
excess loss will be taken into account.
Numerical
Name Default value Default unit Value range
number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/mode #/transmission The complex transmission vs. frequency
corresponding to the optical mode.
diagnostic/mode #/alpha The propagation attenuation constant vs. frequency
corresponding to the optical mode.
diagnostic/mode #/beta The propagation phase constant vs. frequency
corresponding to the optical mode.
diagnostic/mode #/loss The loss vs. frequency corresponding to the optical
mode.
diagnostic/mode #/angle The angle vs. frequency corresponding to the
optical mode.
diagnostic/mode #/effective index The effective index vs. frequency corresponding to
the optical mode.
diagnostic/mode #/group velocity The group velocity vs. frequency corresponding to
the optical mode.
diagnostic/mode #/group delay The group delay vs. frequency corresponding to the
optical mode.
diagnostic/mode #/group index The group index vs. frequency corresponding to the
optical mode.
diagnostic/mode #/dispersion The dispersion vs. frequency corresponding to the
optical mode.
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
For more information on how to create a MODE Waveguide element, please visit the page Create MODE Waveguide
Element 1110 .
From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .
Objective
This page describes how to create a MODE Waveguide element, which enables users to import frequency-
dependent properties (such as the effective index, loss, group index, dispersion...etc) of a single- or multi-mode
waveguide directly from MODE Solutions. This allows for a more detailed description of the waveguide, leading to
more accurate simulation results.
See also
MODE Waveguide (reference guide) 1107
MODE Solutions
When carrying out a frequency sweep in MODE Solutions, select all modes of interest (from the mode list) and set
the frequency range. Make sure to select "track selected mode", "detailed dispersion calculation" and "store mode
profiles while tracking", this information is necessary for the MODE Waveguide in INTERCONNECT.
Once the frequency sweep is complete, check the frequency-dependent results for each mode and make sure that
the results are correct before exporting the data. To save the frequency result into a format that can be directly
imported into INTERCONNECT, select "Data Export" in the options drop down menu. Click on "Export for
INTERCONNECT", and enter the orthogonal identifiers which will be used to track these modes in INTERCONNECT.
INTERCONNECT
Add a MODE Waveguide 1107 from Element Library -> Waveguides, and specify the .ldf file from MODE Solutions as
the "ldf filename" property. The element will now function as a waveguide with the properties determined by MODE
Solutions. For example, one can look at the field profile using a Mode Profile Analyzer 950 .
Symbol
Description
This element applies a spatial offset to waveguide modes.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Waveguide - -
Defines the name of the element. Offset
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
x shift 0 m
Defines the distance in the 'x' direction
to shift the input optical modes
y shift 0 m
Defines the distance in the 'y' direction
to shift the input optical modes
z shift 0 m
Defines the distance in the 'z' direction
to shift the input optical modes
Symbol
Description
Multimode waveguide.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Multimode - -
Defines the name of the element. Waveguide
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.
orthogonal identifier and <2,5> [1, 2, - -
propagation parameters 0...]
A matrix editor that allow users to input
the label (column 1), loss (column 2),
effective index (column 3), group index
(column 4) and dispersion (column 5)
corresponding to each orthogonal
identifier.
Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The multi-mode waveguide can support more modes propagating inside its core compared with a single mode
waveguide. For the implementation details of the general properties of waveguides, please see the page Straight
Waveguide for more information.
The property "orthogonal identifier and propagation parameters" defines the propagating parameters according to
each orthogonal identifier. It has the following format of matrix editor for each mode, the numerical values in the table
are just as examples and the explanation and/or units in the bracket do not need to be input to the editor.
From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .
6.3.3.10.6 Fibers
Optical Fiber 1116
Symbol
Description
Optical fiber.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Fiber - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Fiber - -
Defines the element unique type (read
only).
description Optical fiber - -
A brief description of the elements
functionality.
prefix FIBER - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
length 1000 m
The length of the waveguide.
reference frequency 1552.524381 nm* (2.99792e-083,
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
Waveguide
Name Default value Default unit Value range
attenuation 0.0002 dB/m
Defines the attenuation
dispersion 16e-006 s/m/m
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Optical fibers is a kind of optical waveguide with fairly flexibility, they can be potentially made very long and are the
core components of fiber optics. Following are the definitions for the properties listed in the table.
Dispersion 2 pc 2 k (1)
Dl = -
l2 w 2
Dispersion dD (2)
Slope Sl =
dl
When light propagating in the optical fiber, it suffers from attenuation and dispersions. One of the most common
dispersions in fiber is the chromatic dispersion. In the example file optical_fiber_example.icp, the optical
fiber has a length of 80 km with 2 dB/km attenuation and the chromatic dispersion coefficient and slope of 16 ps/
(nm*km) and 0.08 ps/(nm2*km). The characteristic of the fiber is tested by an optical network analyzer:
With the length of the fiber enlarged, the chromatic dispersion accumulated in the system distorted the signal
gradually and the received signal is more and more degraded so that compensation is needed at some point.
The following figures show the gain, phase and dispersion measured by the ONA; with an 80 km fiber, the gain is -16
dB for a 2 dB/km attenuation.
6.3.3.10.7 Couplers
Waveguide Coupler 1121
Waveguide Y Branch 1125
Star Coupler 1127
Symbol
Description
Optical waveguide coupler.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
Properties
General
Name Default value Default unit Value range
name Waveguide - -
Defines the name of the element. Coupler
type Waveguide - -
Defines the element unique type (read Coupler
only).
description Optical - -
A brief description of the elements waveguide
functionality. coupler
prefix C - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Waveguide
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).
input parameter coupling - [coupling
Defines whether to provide the power coefficient coefficient,
coupling coefficient, measurements, or length, table]
the cross over length.
length 0 m
The length of the waveguide.
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
conjugate false - [true, false]
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first orthogonal
identifier.
cross over length 1 1 m
The cross over coupling length
corresponding to the first orthogonal
identifier.
measurement filename 1 - - -
The file containing the frequency
dependent power coupling coefficients.
coupling coefficients 1 <2> [193.1e - -
The table containing the frequency +012, 0.5]
dependent power coupling coefficients.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second
orthogonal identifier.
cross over length 2 1 m
The cross over coupling length
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Symbol
Description
Optical waveguide branch.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
Properties
General
Name Default value Default unit Value range
name Waveguide Y - -
Defines the name of the element. Branch
prefix Y - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
insertion loss 0 dB
Defines the insertion loss (attenuation).
Waveguide
Name Default value Default unit Value range
phase shift 0 rad
Lower arm additional phase shift.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second
orthogonal identifier.
cross over length 2 0 m
The cross over coupling length
corresponding to the second
orthogonal identifier.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Symbol
Description
Star coupler.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal
Properties
General
Name Default value Default unit Value range
name Star Coupler - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Star Coupler - -
Defines the element unique type (read
only).
description Star coupler - -
A brief description of the elements
functionality.
prefix STAR - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
number of ports 2 -
Defines the number of input and output
ports for the element.
radius 10e-006 m
The radius of the star coupler.
angle 0.01 rad
Separation angle between adjacent
input and output ports.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Numerical
Name Default value Default unit Value range
bidirectional false - [true, false]
Defines whether or not to disable
bidirectional propagation. If 'false', only
propagation from 'left' to 'right' is
allowed
remove disconnected ports false - [true, false]
Defines whether or not to remove
disconnected ports from the internal s-
parameters.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The above figure [1] shows the geometry structure of the radiation region of the star coupler without the input and
output waveguides. The two surfaces, each with radius R are separated by distance R. The angle between adjacent
points is . Then the distance between the random two points P and Q is calculated as:
Using the small angle approximation we can get the simplified equation for the distance as:
PQ R (1 - q1q2 ) (2)
Assume that P and Q are chosen from a set of N equally separated and symmetrically allocated points from the
surfaces, the p th and q th points, respectively. Then equation (2) can be written as equation (3):
q1 aq
q 2 ap
PQ R (1 - a 2 pq ) (3)
A
Assume a signal with amplitude p presented at the input surface point P, the output signal amplitude at point Q at
the output surface can be calculated based on the propagation equation as:
Ap (4)
Aq = exp{ - j bR (1 - a 2 pq )}
N
Reference
[1] Syms, R. R. A. "Silica-on silicon integrated optics." Advances in Integrated Optics. Springer US, 1994. 121-150.
6.3.3.10.8 Crossings
Waveguide Crossing 1132
Symbol
Description
Optical waveguide crossing.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal
Properties
General
Name Default value Default unit Value range
name Waveguide - -
Defines the name of the element. Crossing
prefix WX - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
transmission 1 1 - [0, 1]
The transmission corresponding to the
first orthogonal identifier.
reflection 1 0 - [0, 1]
The reflection corresponding to the first
orthogonal identifier.
cross talk 1 0 - [0, 1]
The cross talk corresponding to the
first orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
transmission 2 1 - [0, 1]
The transmission corresponding to the
second orthogonal identifier.
reflection 2 0 - [0, 1]
The reflection corresponding to the
second orthogonal identifier.
cross talk 2 0 - [0, 1]
The cross talk corresponding to the
second orthogonal identifier.
Diagnostic
Name Default value Default unit Value range
run diagnostic - - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 0 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
For the implementation detail of this element, please see the application example 8x8 Optical-Switch with
Waveguide-Crossing 2342 .
6.3.3.10.9 Resonators
Double Bus Ring Resonator 1135
Single Bus Ring Resonator 1139
Fabry-Perot Resonator 1145
Symbol
Description
Optical double bus ring resonator.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal
Properties
General
Name Default value Default unit Value range
name Double Bus - -
Defines the name of the element. Ring Resonator
prefix RING - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
Waveguide/Mode 1/Coupler
Name Default value Default unit Value range
coupling coefficient 1 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the fist coupler and
the first orthogonal identifier.
coupling coefficient 1 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler
and the first orthogonal identifier.
Waveguide/Mode 2/Coupler
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Please see the Ring Resonator Tutorial 2301 for the implementation details of this element.
Symbol
Description
Optical single bus ring resonator.
Ports
Name Type
Properties
General
Name Default value Default unit Value range
name Single Bus - -
Defines the name of the element. Ring Resonator
prefix RING - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
coupling coefficient 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
coupling coefficient 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second
orthogonal identifier.
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
An optical ring resonator consists of a waveguide which looped back on itself, and the resonance occurs when the
circumference of the ring is exactly a multiple number of wavelengths. Hence a ring resonator supports multiple
resonances, and the free spectral range (FSR) depends on the resonator's circumference.
commonly there is an adjacent waveguide bus beside the ring resonator to couple the light out. For a single bus ring
resonator, the transmission spectrum shows dips around the resonance wavelengths, hence it behaves like a
spectral filter. In this way, the single bus ring resonator can be used in optical communication systems for
applications, especially in wavelength division multiplexing (WDM) systems. Please see the WDM application
example 2395 for more information.
Given the propagation constant and the circumference L of the ring, the working principle of the single bus ring
resonator can be deducted by the following equations:
j = b L
E pass a - te- i j
= e j ( p +j )
Einput 1 - taei j
where t is the self-coupling coefficient and theoretically, t2 + k 2 = 1; a is the amplitude transmission for single pass,
which consists of propagation loss in the ring and coupling loss.
The figures below show the sweep results of the phase delay and gain/loss for the system in the example file
single_bus_ring_resonator.icp. The gain/loss are measured for 0.1 coupling coefficient and the phase
delays are measured for the coupling coefficients sweep through the values indicated in the plot.
References
[1] Bogaerts, Wim, et al. "Silicon microring resonators." Laser & Photonics Reviews 6.1 (2012): 47-73.
Symbol
Description
Fabry-Perot resonator.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Fabry-Perot - -
Defines the name of the element. Resonator
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 10e-006 m
The length of the waveguide.
reflectivity 0.99 - [0, 1]
Defines the reflectivity of the mirror.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Please see the Fabry-Perot Tutorial 2294 for the implementation details of this elememt.
6.3.3.10.10 Interferometers
Mach Zehnder Interferometer 1149
Symbol
Description
Mach Zehnder interferometer.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal
Properties
General
Name Default value Default unit Value range
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 1 10e-006 m
The length of the first waveguide.
length 2 10e-006 m
The length of the second waveguide.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
Waveguide/Mode 1/Coupler
Name Default value Default unit Value range
coupling coefficient 1 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the fist coupler and
the first orthogonal identifier.
coupling coefficient 1 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler
and the first orthogonal identifier.
Waveguide/Mode 2/Coupler
Name Default value Default unit Value range
coupling coefficient 2 1 0.5 - [0, 1]
The power coupling coefficient
corresponding to the fist coupler and
the second orthogonal identifier.
coupling coefficient 2 2 0.5 - [0, 1]
The power coupling coefficient
corresponding to the second coupler
and the second orthogonal identifier.
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
6.3.3.10.11 Gratings
Bragg Grating 1154
Sampled Bragg Grating 1159
Symbol
Description
Waveguide Bragg grating.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Bragg Grating - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Bragg Grating - -
Defines the element unique type (read
only).
description Waveguide - -
A brief description of the elements Bragg grating
functionality.
prefix WBG - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
length 0.005 m
The length of the waveguide.
input parameter Bragg - [grating period,
Defines whether to provide the grating frequency Bragg
period or the Bragg frequency. frequency]
period 0.53e-006 m
The grating period.
frequency 1550 nm* (2.99792e-083,
Central frequency of operation.
*std. unit is Hz
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1.447 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1.447 -
The group index coefficient
corresponding to the second
orthogonal identifier.
facet reflectivity left 2 0 - [0, 1]
Defines the facet reflectivity left.
Waveguide/Apodization
Name Default value Default unit Value range
apodization function uniform - [uniform, user
Defines the grating apodization type. defined,
Gaussian,
raised cosine,
hyperbolic
tangent, sinc]
Waveguide/Chirp
Name Default value Default unit Value range
chirp function none - [none, user
Defines the grating chirp type. defined, linear
chirp parameter,
linear chirp
coefficient]
chirp parameter 0 -
The chirp parameter for a linear chirped
grating.
chirp coefficient 0 -
The chirp coefficient (d/dz) for a linear
chirped grating.
chirp table <2,2> [0, 1, - -
Table containing normalized length 0...]
versus chirp coefficients.
load chirp from file false - [true, false]
Numerical
Name Default value Default unit Value range
number of steps 50 -
The number of discretization steps for
a chirped or apodized grating.
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Symbol
Description
Waveguide sampled Bragg grating.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Sampled Bragg - -
Defines the name of the element. Grating
description Waveguide - -
A brief description of the elements sampled Bragg
functionality. grating
prefix WBG - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
period 0.53e-006 m
The grating period.
frequency 1550 nm* (2.99792e-083,
Central frequency of operation.
*std. unit is Hz
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 1.477 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1.447 -
The group index coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 1.477 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1.447 -
The group index coefficient
corresponding to the second
orthogonal identifier.
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
6.3.3.10.12 Bends
Waveguide Arc Bend 1162
Waveguide Sine Bend 1166
Symbol
Description
The model of a constant bending radius waveguide.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Waveguide Arc - -
Defines the name of the element. Bend
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
angle 0 rad
The bending angle of the waveguide.
radius 0 m
The radius of curvature of the
waveguide.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 2
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 2
Defines the ratio between loss variation
and temperature.
Thermal
Name Default value Default unit Value range
Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .
Symbol
Description
The model of a sine bending waveguide.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Waveguide - -
Defines the name of the element. Sine Bend
only).
description The model of a - -
A brief description of the elements sine bending
functionality. waveguide
prefix WGD - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of the waveguide. A
Taylor expansion around this frequency *std. unit is Hz
is performed to estimate the
propagation transfer function of the
waveguide.
length 1e-006 m
The length of the waveguide bend.
height 2e-006 m
The height of the waveguide bend.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
loss 1 0 dB
The loss corresponding to the first
orthogonal identifier.
effective index 1 1 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 1 -
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
loss 2 0 dB
The loss corresponding to the second
orthogonal identifier.
effective index 2 1 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 1 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
Waveguide/Mode 1/Thermal
Name Default value Default unit Value range
effective index temperature 0 /k
sensitivity 1
Defines the ratio between effective
index variation and temperature.
excess loss temperature 0 dB/K
sensitivity 1
Defines the ratio between loss variation
and temperature.
Waveguide/Mode 2/Thermal
Name Default value Default unit Value range
Thermal
Name Default value Default unit Value range
thermal effects false - [true, false]
Defines whether or not to enable
thermal effects.
temperature %temperature K
Defines the temperature. %
Numerical
Name Default value Default unit Value range
digital filter false - [true, false]
Defines whether or not to use a digital
filter to represent the element transfer
function in time domain.
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
fractional delay true - [true, false]
Defines whether to use a fractional
delay filter or force the delay to be an
integer multiple of the sample period.
delay compensation 0 -
The number of delays to compensate
for latency.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
From release 2016b, this element started to include the option of fractional delay compensation. For more
information on this feature, please visit the page Fractional delay compensation 1103 .
6.3.3.11 Amplifiers
Electrical
Electrical Amplfier 1170
Optical
Optical Amplfier 1173
Symbol
Description
Electrical amplifier.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Amplifier
description Electrical - -
A brief description of the elements amplifier
functionality.
prefix AMP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
gain 20 dB
Defines the gain the amplifier.
noise spectral density 10e-018 W/Hz
The output signal noise power spectral
density.
Numerical
Name Default value Default unit Value range
enable noise true - [true, false]
Defines whether or not to add ASE
noise to the output signal.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The element Electrical Amplifier amplifies the signal inputs to it, at the same time, it will add noise to the signal.
Please see the example file amplifier_example.icp for more information on its implementation detail. The
following figure is the system in the example file:
The standard property "gain" defines the amplification gain of the input signal and "noise spectral density" defines
the noise added by the amplifier. The figures below show the amplification effect of the electrical amplifier in time and
frequency domain.
Symbol
Description
Optical amplifier.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical - -
Defines the name of the element. Amplifier
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
gain 20 dB
Defines the gain the amplifier.
noise figure 4 dB
Defines the noise figure of the amplifier.
noise bandwidth 5 THz*
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Numerical
Name Default value Default unit Value range
enable noise true - [true, false]
Defines whether or not to add ASE
noise to the output signal.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The element Optical Amplifier amplifies the signal inputs to it, at the same time, it will add noise to the signal.
Please see the example file amplifier_example.icp for more information on its implementation detail. The
following figure is the system in the example file:
The figures below show the amplification effect of the optical amplifier in time and frequency domain, the noise added
by this element could also be clearly observed.
6.3.3.12 Actives
Optical
Laser TW 1177
6.3.3.12.1 Laser TW
Symbol
Description
Traveling Wave Laser Model.
Ports
Name Type
input Electrical Signal
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Laser TW - -
Defines the name of the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
length 0.0003 m
Defines the laser active region and
cavity length L.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 TE - -
The label corresponding to the first
orthogonal identifier.
polarization 1 TE - [TE, TM]
Defines the waveguide polarization.
loss 1 4342.944819 dB/m
The loss corresponding to the first
orthogonal identifier.
effective index 1 3.5 -
The effective index corresponding to
the first orthogonal identifier.
group index 1 4 -
The group index coefficient
corresponding to the first orthogonal
identifier.
dispersion 1 0 s/m/m
The dispersion coefficient
corresponding to the first orthogonal
identifier.
mode confinement factor 1 1 - [0, 1]
Defines the mode confinement factor.
spontaneous emission factor 1 0.01 -
Defines the spontaneous emission
coupling factor.
facet reflectivity left 1 0.9 - [0, 1]
Defines the facet reflectivity left.
facet reflectivity right 1 0.9 - [0, 1]
Defines the facet reflectivity right.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 TM - -
The label corresponding to the second
orthogonal identifier.
polarization 2 TM - [TE, TM]
Defines the waveguide polarization.
loss 2 4342.944819 dB/m
The loss corresponding to the second
orthogonal identifier.
effective index 2 3.5 -
The effective index corresponding to
the second orthogonal identifier.
group index 2 4 -
The group index coefficient
corresponding to the second
orthogonal identifier.
dispersion 2 0 s/m/m
The dispersion coefficient
corresponding to the second
orthogonal identifier.
mode confinement factor 2 1 - [0, 1]
Defines the mode confinement factor.
spontaneous emission factor 2 0.01 -
Defines the spontaneous emission
coupling factor.
facet reflectivity left 2 0.3 - [0, 1]
Defines the facet reflectivity left.
facet reflectivity right 2 0.3 - [0, 1]
Defines the facet reflectivity right.
Waveguide/Recombination Coefficient
Name Default value Default unit Value range
radiative linear recombination 250e+006 1/s
coefficient
Defines the radiative linear
recombination coefficient Arad.
Waveguide/Gain
Waveguide/Spontaneous Emission
Name Default value Default unit Value range
spontaneous emission from true - [true, false]
gain
Defines whether or not to use the gain
shape as the spontaneous emission
shape.
spontaneous emission center 352.9411765 THz*
frequency
Defines the spontaneous emission *std. unit is Hz
center frequency.
spontaneous emission quality 10e-006 -
factor
Defines the spontaneous emission
quality factor.
spontaneous emission 1.5e+024 m^-3
reference carrier density
Defines the spontaneous emission
reference carrier density.
differential spontaneous 0 -
emission center frequency
Defines the differential spontaneous
emission center frequency.
differential spontaneous 0 1/m^-3
emission quality factor
Defines the differential spontaneous
emission quality factor.
linewidth enhancement factor 0 -
Defines the linewidth enhancement
factor .
Enhanced
Name Default value Default unit Value range
Numerical
Name Default value Default unit Value range
minimum number of sections 100 -
Defines the model number of sections.
user defined constants false - [true, false]
Defines whether or not to use user
defined constants.
speed of light 299.792458e m/s
Defines the speed of light constant. +006
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the gain and spontaneous
See Also
Please see the Fabry-Perot Laser 2486 page for an application example of this compact laser model.
Implementation Details
A generic geometry of the gain element is shown in the figure below. lact , dact and wact are the length, depth and
width of the active region of the gain element, respectively. The length of the active region is implicitly equal to the
length of the gain element, however, the width (and depth) are not assumed to be the same as those of the entire
gain element, although the width is shown to be in the figure below.
[click to enlarge]
Carrier Recombination
Two sets of recombination coefficients are defined in this compact model, one set each for the radiative
recombination and non-radiative recombination, respectively. The definition of the parameters and their relationships
are listed below.
dN dN rad dN nr N N N (1)
= + = = +
dt dt dt t t rad t nr
DN DN rad DN nr (2)
= +
DT DT DT
DN rad (3)
= Arad N + Brad N 2 + Crad N 3
DT
DN nr (4)
= Anr N + Bnr N 2 + Cnr N 3
DT
1 1 1 (7)
= +
t t rad t nr
N carrier density
Gain
As an optical mode traverses a section of gain element, its power grows exponentially. With the exponential rate of
growth being proportional to the mode confinement to the active portion section of the structure and to the material
gain which is, in general, frequency and carrier dependent. In the present model, the peak of the spectral gain
shapes vary linearly with carrier density about the transparency carrier density with a slope given by the gain
coefficient, and with a discount at high photon densities (referred to the volume of the gain section). The gain shapes
are Lorentzian with user specified center frequency and Q values, and the center frequency and Q can be made to
vary dynamically as a linear function of the carrier density.
The following table lists the definitions of the parameters used to define the effect of gain in the compact model
element.
N Gref gain shape reference carrier density Q0G gain shape quality factor
Within one section of the active region as shown in the figure below, the gain and quality factor following the
relationship listed below.
| E (DL) |2 (9)
2
= eGg ( f , N ) DL
| E (0) |
(10)
g ( f , N ) = g peak L( f cG , QG ; f )
1 (11)
g peak = a p ( N - N tr )
1 + eS
(12)
f cG ( N ) = f 0G + a fG ( N - N Gref )
(13)
QG ( N ) = Q0G + aQG ( N - N Gref )
The following figure shows a plot of a family of Lorentzian Gain Shapes with center frequencies ad Q's being made
to vary dynamically as a linear function of carrier density within each spatial element.
[click to enlarge]
aQG = a fG = 0
Please note that, constant gain shape can be achieved by setting .
Spontaneous Emission
Users can set the spontaneous emission spectrum shape be equal to the gain spectrum shape by setting the
"spontaneous emission from gain" to be true, or they can set this parameter to false and then enter the following
parameters to define the spontaneous emission spectrum in a manner similar to that for the defining the gain
spectrum.
E ( f , N ) = L( f cE , QE ; f ) (14)
with
f cE ( N ) = f 0 E + a fE ( N - N Eref ) (15)
The other parameter in this group is the linewidth enhancement factor. It is important in this model as it is
responsible for the change in material index with change in carrier density, and this effect gives rise to laser chirp.
n
4 p N (17)
aH = -
l0 g
N
where
g
N
is the gain coefficient in the compact laser model.
l
Please note that the reference wavelength, 0 , is taken to be the frequency
specified in the Standard section, which is the only place this Standard/
frequency affects the physical model.
(Optical) Mode
The effective index parameter is not used in this model as it is implicitly set equal to the group index which is the
relevant quantity affecting laser dynamics.
The spontaneous emission factor is the fraction of the spontaneous emission that gets coupled into the waveguide
mode.
Number of Sections
The gain element is divided into a number of sections each with a length of L. The time step T of the simulation is
the inverse of the simulation sample rate, which must be set to be larger than the bandwidth simulated, including
that of the gain element gain shape.
INTERCONNECT will find the value of the number of sections that makes the simulated group velocity,
DL
DT
v g = c ng
as close as possible to actual group velocity ( where c is the speed of light, and ng the group index of
the mode) for a given sample frequency. Note that for a single optical mode, this agreement can be made perfect by
adjusting the simulation sample rate.
However, the user can decide upon a minimum number of sections to be used based on other considerations, which
they can specify in the "minimum number of sections" parameter. A warning message will be shown if the number
of sections is less than the value thus specified
Another consideration for the sample rate is that it should be approximately 5 times greater than the input/output
bandwidth of interest to ensure adequate fidelity of the gain and spontaneous emission frequency dependencies
implemented by time-domain IIR filtering.
For an application example, please see the Fabry-Perot Laser 2486 page.
6.3.3.13 Filters
Electrical
BP Bessel Filter 1188
LP Bessel Filter 1191
BP Gaussian Filter 1193
LP Gaussian Filter 1196
BP Rectangular Filter 1199
LP Rectangular Filter 1203
BP RC Filter 1206
LP RC Filter 1208
BP Butterworth Filter 1211
LP Butterworth Filter 1214
BP Chebyshev Filter 1217
LP Chebyshev Filter 1219
TV LP RC Filter
VD LP RC Filter 1225
Optical
Bessel Optical Filter 1228
Gaussian Optical Filter 1231
Rectangular Optical Filter 1234
Butterworth Optical Filter 1237
Chebyshev Optical Filter 1240
Fabry Perot Optical Filter 1243
Symbol
Description
Electrical band pass (BP) Bessel filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name BP Bessel - -
Defines the name of the element. Filter
prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the electrical band-pass Bessel filter works, please see
the example file: BP_Bessel_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 BP Bessel filter transmission plot Fig. 2 BP Bessel filter gain plot
Symbol
Description
Electrical low pass (LP) Bessel filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name LP Bessel - -
Defines the name of the element. Filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the low-pass Bessel filter works, please see the example
file: LP_Bessel_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 LP Bessel Filter Transmission Plot Fig. 2 LP Bessel Filter Gain Plot
Symbol
Description
Electrical band pass (BP) Gaussian filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name BP Gaussian - -
Defines the name of the element. Filter
prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the electrical band-pass Gaussian filter works, please
see the example file: BP_Gaussian_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 BP Gaussian Filter Transmission Plot Fig. 2 BP Gaussian Filter Gain Plot
Symbol
Description
Electrical low pass (LP) Gaussian filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name LP Gaussian - -
Defines the name of the element. Filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
order 1 - [1, 10]
Defines the filter order.
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the low-pass Gaussian filter works, please see the
example file: LP_Gaussian_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 LP Gaussian Filter Transmission Plot Fig. 2 LP Gaussian Filter Gain Plot
Symbol
Description
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name BP Rectangular - -
Defines the name of the element. Filter
prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz
Numerical
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the electrical band-pass Rectangular filter works, please
see the example file: BP_Rectangular_Filter.icp
The following figure shows how the transmission of the band-pass rectangular filter varies with the change of the filter
bandwidth.
Symbol
Description
Electrical low pass (LP) rectangular filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the low-pass rectangular filter works, please see the
example file: LP_Rectangular_Filter.icp
The key feature for this element is the filter's bandwidth. Following figures show how the bandwidth affects the filter's
performances.
6.3.3.13.7 BP RC Filter
Symbol
Description
Electrical band pass (BP) RC filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz
Implementation Details
Following is an example and implementation details of how the electrical band-pass RC filter works, please see the
example file: BP_RC_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
6.3.3.13.8 LP RC Filter
Symbol
Description
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name LP RC Filter - -
Defines the name of the element.
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the low-pass RC filter works, please see the example
file: LP_RC_Filter.icp
The key feature for this element is the filter's bandwidth. Following figures show how the bandwidth affects the filter's
performances.
Symbol
Description
Electrical band pass (BP) Butterworth filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name BP Butterworth - -
Defines the name of the element. Filter
type BP Butterworth - -
Defines the element unique type (read Filter
only).
description Electrical band - -
A brief description of the elements pass (BP)
functionality. Butterworth
filter
prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 10 GHz*
Central frequency of operation.
*std. unit is Hz
Diagnostic
Name Default value Default unit Value range
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
Implementation Details
Following is an example and implementation details of how the electrical band-pass Butterworth filter works, please
see the example file: BP_Butterworth_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 BP Butterworth Filter Transmission Plot Fig. 2 BP Butterworth Filter Gain Plot
Symbol
Description
Electrical low pass (LP) Butterworth filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name LP Butterworth - -
Defines the name of the element. Filter
type LP Butterworth - -
Defines the element unique type (read Filter
only).
description Electrical low - -
A brief description of the elements pass (LP)
functionality. Butterworth
filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the low-pass Butterworth filter works, please see the
example file: LP_Butterworth_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how these features
affect the filter's performances.
Fig. 1 LP Butterworth Filter Transmission Plot Fig. 2 LP Butterworth Filter Gain Plot
Symbol
Description
Electrical band pass (BP) Chebyshev filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name BP Chebyshev - -
Defines the name of the element. Filter
prefix BPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Diagnostic
Name Default value Default unit Value range
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the electrical band-pass Chebyshev filter works, please
see the example file: BP_Chebyshev_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 BP Chebyshev Filter Transmission Plot Fig. 2 BP Chebyshev Filter Gain Plot
Symbol
Description
Electrical low pass (LP) Chebyshev filter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name LP Chebyshev - -
Defines the name of the element. Filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
cutoff frequency 0.75 * %bitrate Hz
The 3-dB cutoff frequency of the filter %
(full with at half maximum, FWHM).
order 4 - [1, 10]
Defines the filter order.
ripple 3 dB
Diagnostic
Name Default value Default unit Value range
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the low-pass Chebyshev filter works, please see the
example file: LP_Chebyshev_Filter.icp
The key features for this element are the filter's order, bandwidth and the filter's ripple. Following figures show how
these features affect the filter's performances.
Fig. 1 LP Chebyshev Filter Transmission Plot Fig. 2 LP Chebyshev Filter Gain Plot
6.3.3.13.13 TV LP RC Filter
Symbol
Description
Electrical time variant low pass (LP) RC filter.
Ports
Name Type
modulation Electrical Signal
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name TV LP RC Filter - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type TV LP RC Filter - -
Defines the element unique type (read
only).
description Electrical time - -
A brief description of the elements variant low pass
functionality. (LP) RC filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement <2,2> [0, 1, - -
A matrix editor for users to read the 10e+009...]
element current modulation data values
(read only).
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
To user define the measurement file, please see the following example file: time_variant_nrz.icp
6.3.3.13.14 VD LP RC Filter
Symbol
Description
Voltage dependent low pass (LP) RC filter.
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name VD LP RC - -
Defines the name of the element. Filter
type VD LP RC - -
Defines the element unique type (read Filter
only).
description Voltage - -
A brief description of the elements dependent low
functionality. pass (LP) RC
filter
prefix LPF - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
load from file false - [true, false]
Defines whether or not to load
measurements from an input file or to
use the currently stored values.
measurement filename - - -
The file containing the measurement
data. Refer to the Implementation
Details section for the format expected.
measurement <2,2> [0, 1, - -
A matrix editor for users to read the 10e+009...]
element current modulation data values
(read only).
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
To user define the measurement file, please see the following example file: time_variant_nrz.icp
Symbol
Description
Bessel optical filter.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Bessel Optical - -
Defines the name of the element. Filter
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the electrical Bessel optical filter works, please see the
example file: Bessel_Optical_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
Fig. 1 Bessel optical filter transmission plot Fig. 2 Bessel optical filter gain plot
Symbol
Description
Gaussian optical filter.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Gaussian - -
Defines the name of the element. Optical Filter
type Gaussian - -
Defines the element unique type (read Optical Filter
only).
description Gaussian - -
A brief description of the elements optical filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the Gaussian optical filter works, please see the
example file: Gaussian_Optical_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 Gaussian Optical Filter Transmission Plot Fig. 2 Gaussian Optical Filter Gain Plot
Symbol
Description
Rectangular optical filter.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Rectangular - -
Defines the name of the element. Optical Filter
type Rectangular - -
Defines the element unique type (read Optical Filter
only).
description Rectangular - -
A brief description of the elements optical filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the rectangular optical filter works, please see the
example file: Rectangular_Optical_Filter.icp
The key feature for this element is the filter's bandwidth. Following figures show how the bandwidth affects the filter's
performances.
Symbol
Description
Butterworth optical filter.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Butterworth - -
Defines the name of the element. Optical Filter
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the optical Butterworth filter works, please see the
example file: Butterworth_Optical_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 Butterworth Optical Filter Transmission Plot Fig. 2 Butterworth Optical Filter Gain Plot
Symbol
Description
Chebyshev optical filter.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Chebyshev - -
Defines the name of the element. Optical Filter
type Chebyshev - -
Defines the element unique type (read Optical Filter
only).
description Chebyshev - -
A brief description of the elements optical filter
functionality.
prefix OBP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
bandwidth 10 GHz*
The 3-dB bandwidth of the filter (full
with at half maximum, FWHM). *std. unit is Hz
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the optical Chebyshev filter works, please see the
example file: Chebyshev_Optical_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 Chebyshev Optical Filter Transmission Plot Fig. 2 Chebyshev Optical Filter Gain Plot
Symbol
Description
Fabry-Perot filter.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Fabry-Perot - -
Defines the name of the element. Filter
type Fabry-Perot - -
Defines the element unique type (read Filter
only).
description Fabry-Perot - -
A brief description of the elements filter
functionality.
prefix OFP - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Numerical
Name Default value Default unit Value range
window function rectangular - [rectangular,
Defines the window type for the digital hamming,
filter. hanning]
number of taps 64 -
Defines the number of coefficient for
digital filter.
Diagnostic
Name Default value Default unit Value range
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
Following is an example and implementation details of how the Fabry-Perot filter works, please see the example
file: Fabry-Perot_Filter.icp
The key features for this element are the filter's order and bandwidth. Following figures show how the bandwidth and
order affect the filter's performances.
Fig. 1 Fabry-Perot Filter Transmission Plot Fig. 2 Fabry-Perot Filter Gain Plot
6.3.3.14 Polarization
Polarization Beam Splitter 1246
Symbol
Description
Polarization beam splitter.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
Properties
General
Name Default value Default unit Value range
name Polarization - -
Defines the name of the element. Beam Splitter
Standard
Name Default value Default unit Value range
angle 0 rad
Defines the polarization rotation angle.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Symbol
Description
Linear polarizer.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Linear Polarizer - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Linear Polarizer - -
Defines the element unique type (read
only).
Standard
Name Default value Default unit Value range
angle 0 rad
Defines the polarization rotation angle.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Symbol
Description
Polarization rotator.
Ports
Name Type
Properties
General
Name Default value Default unit Value range
name Polarization - -
Defines the name of the element. Rotator
Standard
Name Default value Default unit Value range
angle 0 rad
Defines the polarization rotation angle.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Symbol
Description
Circular polarizer.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Circular - -
Defines the name of the element. Polarizer
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
polarizer type right - [left, right]
Defines the type of the polarizer.
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
6.3.3.14.5 Waveplate
Symbol
Description
Waveplate.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
Properties
General
Name Default value Default unit Value range
name Waveplate - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Waveplate - -
Defines the element unique type (read
only).
description Waveplate - -
A brief description of the elements
functionality.
prefix POL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Waveguide/Mode 1
Name Default value Default unit Value range
orthogonal identifier 1 1 -
The first identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 1 X - -
The label corresponding to the first
orthogonal identifier.
Waveguide/Mode 2
Name Default value Default unit Value range
orthogonal identifier 2 2 -
The second identifier used to track an
orthogonal mode of an optical
waveguide. For most waveguide, two
orthogonal identifiers '1' and '2' are
available (with the default labels 'TE'
and 'TM' respectively).
label 2 Y - -
The label corresponding to the second
orthogonal identifier.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
6.3.3.15 Receivers
Electrical
Modulation Symbol Demapper 1257
Quantizer 1260
Data Recovery 1263
Symbol
Description
The symbol demapper takes constellation points and generates appropriate consecutive bits.
Ports
Name Type
input I Electrical Signal
input Q Electrical Signal
output Digital Signal
Properties
General
Name Default value Default unit Value range
name Modulation - -
Defines the name of the element. Symbol
Demapper
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Modulation - -
Defines the element unique type (read Symbol
only). Demapper
Standard
Name Default value Default unit Value range
bitrate %bitrate% bits/s
Defines the input signal bitrate.
I delay 0 s
The time delay to apply to the input
signal.
Q delay 0 s
The time delay to apply to the input
signal.
decision point automatic - [automatic, user
Defines whether or not to automatically defined]
determine the decision point for the
constellation diagram.
decision instant 20e-012 s
Defines the time instant for the
constellation diagram detection
decision points.
scale factor I 1 -
The scale factor for the symbol map IQ
values.
scale factor Q 1 -
The scale factor for the symbol map IQ
values.
rotation 0 rad
The rotation angle rotates the symbol
map IQ values.
load map from file false - [true, false]
Defines whether or not to load IQ
values from an input file or to use the
Implementation Details
The modulation symbol demapper takes constellation points input and output appropriate consecutive bits
accordingly. Please see the example file Demapper.icp for detailed information.
In this example, the modulation symbol map is used to generate 16QAM modulated electrical signals, and then the
modulation symbol demapper demodulates the signals according to the modulation type selected.
If the demapper's modulation type matches the mapper's modulation type, the original transmitted signal should be
recovered. The first figure below has matched demapper and mapper while the second has mismatch demapper and
mapper, the results are shown.
Fig. 1 Matched demapper & mapper Fig. 1 Not matched demapper & mapper
6.3.3.15.2 Quantizer
Symbol
Description
The quantizer maps the input to one of possible levels depending on the correspondent threshold parameter.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Quantizer - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Quantizer - -
Defines the element unique type (read
only).
description The quantizer - -
A brief description of the elements maps the input
functionality. to one of
possible levels
depending on
the
correspondent
threshold
parameter
prefix QUANTZ - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
load threshold from file false - [true, false]
Defines whether or not to load a map of
input values and correspondent output
values from a file or to use the currently
stored values.
threshold filename - - -
The file containing user defined input
values and correspondent output
values. Refer to the Implementation
Details section for the format expected.
threshold table <2,2> [0, 1, - -
The table allows the user to read or 0...]
modified input values and
correspondent output values.
Implementation Details
The quantizer maps the input to one of possible levels according to the correspondent threshold parameter. Please
see example file 16PAM_Quantizer.icp for more information. The following figure shows the system in the
example.
The threshold table could be user defined by directly typing in the table or by loading from file. In this example, the
file threshold_16PAM.dat is used. The file loaded and the directly defined threshold tables are shown as
following:
According to the threshold levels, the quantizer maps the signals to different values. Following are the Eye Diagram
and Vector Signal Analyzer (VSA) plots.
Symbol
Description
The data recovery samples the electrical signal and generates appropriate consecutive bits.
Ports
Name Type
input Electrical Signal
output Digital Signal
Properties
General
Name Default value Default unit Value range
name Data Recovery - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Data Recovery - -
Defines the element unique type (read
only).
description The data - -
A brief description of the elements recovery
functionality. samples the
electrical signal
and generates
appropriate
consecutive
bits
prefix DATA - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
Standard
Name Default value Default unit Value range
Implementation Details
The data recovery component samples the electrical signal and makes the decision accordingly to generate
consecutive bits. Please see the example file data_recovery.icp for more information. Following is the system
in the example.
Make sure the threshold for decision making is in between of the highest and lowest electrical signal levels. Users
could also set a delay in the data recovery element, it will generate a time delay accordingly in the received signal.
In this example, the delay in the data recovery element matches the delay in the system, hence there would be no
delay detected for the recovered data. Following figure compares the transmitted signal and the recovered signal,
they match each other perfectly.
6.3.3.16 Photodetectors
PIN Photodetector 1265
APD Photodetector 1268
Symbol
Description
PIN photodetector.
Ports
Name Type
input Optical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name PIN - -
Defines the name of the element. Photodetector
type PIN - -
Defines the element unique type (read Photodetector
only).
description PIN - -
A brief description of the elements photodetector
functionality.
prefix PIN - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
responsivity 1 A/W
The responsivity of the photodetector.
dark current 0 A
The dark current for the photodetector.
thermal noise 100e-024 A/Hz^.5*
The thermal noise for the
photodetector. *std. unit is W/
Hz
Numerical
Name Default value Default unit Value range
enable thermal noise true - [true, false]
Defines whether or not to enable
thermal noise. If 'true', the user will
have to specify the 'thermal noise'
value.
enable shot noise true - [true, false]
Defines whether or not to enable shot
noise. If 'true', the shot noise will be
calculated and added to the signal.
automatic seed true - [true, false]
Defines whether or not to automatically
create an unique seed value for each
instance of this element. The seed will
be the same for each simulation run.
seed 1 -
The value of the seed for the random
number generator. A value zero
recreates an unique seed for each
simulation run.
Implementation Details
The PIN photodetector is a photodiode with a wide intrinsic semiconductor region in between the p-type and n-type
semiconductor regions. For the demonstration of the PIN photodetector, please see the example file PIN.icp,
following is a figure of the demonstration system.
The key factors of a PIN photodetector is the central frequency, which should be made the same as the laser
source; the responsivity of the photodetector and some noises. The main sources of the noise are the thermal noise,
the shot noise and the dark current. All the noises can be turned on and off for the simulation.
The following two figures are the eye diagrams of the system, with the noises turned off and on with the values set
according to the above table.
Symbol
Description
APD photodetector.
Ports
Name Type
input Optical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name APD - -
Defines the name of the element. Photodetector
Standard
Name Default value Default unit Value range
frequency 193.1 THz*
Central frequency of operation.
*std. unit is Hz
responsivity 1 A/W
The responsivity of the photodetector.
multiplication factor 1 -
The multiplication factor for the APD
photodetector.
ionization ratio 1 - (0, 1]
The ionization ratio for determining the
excess noise of the APD
photodetector.
dark current 0 A
The dark current for the photodetector.
thermal noise 100e-024 A/Hz^.5*
Numerical
Name Default value Default unit Value range
enable thermal noise true - [true, false]
Defines whether or not to enable
thermal noise. If 'true', the user will
have to specify the 'thermal noise'
value.
enable shot noise true - [true, false]
Defines whether or not to enable shot
noise. If 'true', the shot noise will be
calculated and added to the signal.
Implementation Details
The APD is a highly sensitive semiconductor photodetector. For the demonstration of the PIN photodetector, please
see the example file APD.icp, following is a figure of the demonstration system.
The setting table of the APD element is shown below, the major features should be taken into consideration when
doing simulation are the responsivity of the photodiode and the noises.
The following two figures are the eye diagrams of the system, with the noises turned off and on with the values set
according to the above table.
6.3.3.17 Network
Optical
Optical Switch 1271
Optical Y Switch 1274
Symbol
Description
Optical 2x2 switch.
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
port 4 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Switch - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Switch - -
Defines the element unique type (read
only).
description Optical 2x2 - -
A brief description of the elements switch
functionality.
prefix X - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
control 0 - -
Switch control value.
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.
return loss 100 dB
Defines the return loss.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The optical switch is a 2x2 switch which by controlling the control electrode ("control" property in "standard" setting),
the input signals can be switched to the outputs. Following is an example of the optical switch element, please see
example file Optical_Switch.icp.
Please see also the application example Optical Switches 2328 for more information on optical switch.
The control parameter is in the "standard" setting; when set to "0", the input signals to the two branches are directly
transferred to the corresponding outputs; when set to "1", the input signals are switched to the outputs. The setting
parameter is shown in the below figure.
Symbol
Description
Ports
Name Type
port 1 Optical Signal
port 2 Optical Signal
port 3 Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Y - -
Defines the name of the element. Switch
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
control 0 - -
Switch control value.
insertion loss 0 dB
Defines the insertion loss (attenuation).
isolation 100 dB
Defines the isolation.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The optical Y switch is a 1x2 switch which by controlling the control electrode ("control" property in "standard"
setting), the input signal can be switched between the two output branches.. Following is an example of the optical
Y switch element, please see example file Optical_Y_Switch.icp.
By default setting, the "control" value is "0" and the signal outputs to port 2; the output will be switched to port 3
when the "control" value is set to 1.
The "insertion loss" adds the loss to the activated output branch.
6.3.3.18 Math
Electrical
Electrical Adder 1282
Electrical Multiplier 1280
Electrical Constant Multiplier 1278
Optical
Optical Adder 1284
Symbol
Description
This element multiplies the input electrical signal by a constant value..
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Constant
Multiplier
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical - -
Defines the element unique type (read Constant
only). Multiplier
Standard
Name Default value Default unit Value range
gain 1 -
Defines the gain factor.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The element Electrical Constant Multiplier multiplies a constant value to the input signal's amplitude. For the
implementation detail of this element, please see the example file electrical_constant_multiplier.icp,
the following figure shows the system and simulation result of the system in the example.
Please note that, the electrical constant multiplier multiplies the constant gain on the amplitude of the input signal,
thus the powers of the signals gain have a square effect (6 dB of increment in log scale). The following figures are the
output of the oscilloscopes in the system, the scales of the amplitude can be seen.
Symbol
Description
This element multiplies two electrical signals.
Ports
Name Type
Properties
General
Name Default value Default unit Value range
name Electrical - -
Defines the name of the element. Multiplier
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Implementation Details
The Electrical Multiplier multiplies two electrical signals. Please see the example file
electrical_multiplier.icp for the implementation details of this element. The following figure shows the
system in the example file:
In the example file, the two input sinusoidal signals have different frequency and initial phase, the following figure
shows the input signals and the multiplex of them.
Symbol
Description
Electrical adder.
Ports
Name Type
Properties
General
Name Default value Default unit Value range
name Electrical Adder - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
Implementation Details
The Electrical Adder adds two electrical signals. For the implementation detail of this element. please see the
example file electrical_adder,icp. The following figure is the system in the example file.
In the example file, the two input sinusoidal signals have different frequency and initial phase, the following figure
shows the input signals and the sum of them.
Symbol
Description
Sums the values of its input ports.
Ports
Name Type
input 1 Optical Signal
input 2 Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Adder - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Optical Adder - -
Defines the element unique type (read
only).
description Sums the - -
A brief description of the elements values of its
functionality. input ports
prefix SUM - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Waveguide
Name Default value Default unit Value range
modes TE,TM - -
List of optical mode labels supported
by the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Implementation Details
The Optical Adder sums the two input signals together. Please note that the adder adds up the amplitude of the two
input signals, hence the power output will have a square effect. For the implementation details, please see the
example file optical_adder.icp for more information, the following figure is the system in the example:
The two input signals and the sum of them by the optical adder is shown below, the power of the output signal is the
square of the input signals' amplitudes summation. The short period overshoot is due to the rising and falling periods
of the square waves.
6.3.3.19 Logic
Digital
Digital Logic 1288
Digital NOT 1291
Digital Delay 1293
Electrical
Electrical Logic 1295
Electrical NOT 1296
Symbol
Description
This elements applies a logical operation to any number of input ports.
Ports
Name Type
input 1 Digital Signal
input 2 Digital Signal
output Digital Signal
Properties
General
Name Default value Default unit Value range
name Digital Logic - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Digital Logic - -
Defines the element unique type (read
only).
description This elements - -
A brief description of the elements applies a
functionality. logical
operation to
any number of
input ports
prefix LOGIC - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
logic operator AND - [AND, OR,
Defines the logic operation to be NAND, NOR,
applied to the input signal. XOR, NXOR]
Implementation Details
The Digital Logic element applies logical operations to the input digital bits. For the logical operation truth table,
please refer to the table below.
The following figure shows the system in the example file digital_logic.icp.
The table below shows the input signals and the output for different logical operations.
Symbol
Description
This elements applies a logical NOT operation to the input port.
Ports
Name Type
input Digital Signal
output Digital Signal
Properties
General
Name Default value Default unit Value range
name Digital NOT - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Digital NOT - -
Defines the element unique type (read
only).
Implementation Details
The element Digital NOT applies a logical NOT operation on the input signal. Following is the system in the example
file digital_not.icp.
The following figure shows the output of the logical analyzers in the system.
Symbol
Description
Digital delay.
Ports
Name Type
input Digital Signal
output Digital Signal
Properties
General
Name Default value Default unit Value range
name Digital Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Digital Delay - -
Defines the element unique type (read
only).
description Digital delay - -
A brief description of the elements
functionality.
prefix DLY - -
Standard
Name Default value Default unit Value range
delay 0 bits
The time delay to apply to the input
signal.
Implementation Details
The element Digital Delay applies a number of bits delay according to the setting to the digital input signal. Please
see the example file digital_delay.icp for more information on the implementation details of this element.
Following is the system in the example file and the setting for the Digital Delay element:
With a delay of 5 bits, the system input and output are shown in the plot below.
Symbol
Description
This elements applies a logical operation to any number of input ports.
Ports
Name Type
input 1 Electrical Signal
input 2 Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Electrical Logic - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Electrical Logic - -
Defines the element unique type (read
only).
description This elements - -
Standard
Name Default value Default unit Value range
logic operator AND - [AND, OR,
Defines the logic operation to be NAND, NOR,
applied to the input signal. XOR, NXOR]
Implementation Details
Please see the implementation details of the Digital Logic element for more implementation information and the
Electrical NOT 1296 element for the definition of the standard property of this element.
Symbol
Description
This elements applies a logical NOT operation to the input port.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Electrical NOT - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
threshold 0.5 a.u.
The threshold used to define if the logic
level of the input signal is high or low.
low level 0 a.u.
The output amplitude for the logic level
low.
high level 1 a.u.
The output amplitude for the logic level
high.
Implementation Details
The element Electrical NOT applies a logical NOT operation on the input electrical signal. Following is the system in
the example file electrical_not.icp, and the standard setting for this element.
The "threshold" defines the decision making level of the element; if the signal amplitude is above the threshold, it will
output a value at the "low level", on the other hand, if the signal amplitude is below the threshold, it will output a
value at the "high level". The following two figures are the electrical NOT output for the same input sinusoidal input
signal, with the threshold, low level and high level at 0.5, 0, 1 and 0, -1, 1, respectively.
Optical
Optical Rational Resampler 1298
Symbol
Description
Optical rational resampler.
Ports
Name Type
input Optical Signal
output Optical Signal
Properties
General
Name Default value Default unit Value range
name Optical Rational - -
Defines the name of the element. Resampler
Standard
Name Default value Default unit Value range
upsample rate factor 1 -
The factor to be multiplied to the input
sampling rate
downsample rate factor 1 -
The factor to divide the input sampling
rate by
Numerical
Implementation Details
The implementation details of the optical rational resampler is the same as the electrical rational resampler except
for that the input and output of this element are optical signals. Please see Electrical Rational Resampler 1300 for
more information.
Symbol
Description
Rational resampler.
Ports
Name Type
input Electrical Signal
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Rational - -
Defines the name of the element. Resampler
Standard
Name Default value Default unit Value range
upsample rate factor 1 -
The factor to be multiplied to the input
sampling rate
downsample rate factor 1 -
The factor to divide the input sampling
rate by
Numerical
Name Default value Default unit Value range
number of taps 64 -
Defines the number of coefficient for
digital filter.
Implementation Details
The electrical rational resampler resamples the input signal according to the sampling ratio setting. The following
figure shows the system in the example file Electrical_Rational_Resampler.icp.
The factors that will define the resampling ratio for this element is the "upsample rate factor" and the "downsample
1 upsample - rate - factor
Rup = =
Rdown downsample - rate - factor
rate factor". The upsample ratio is defined as .
Following are two examples for the electrical rational resampler with upsample rsatio = 2 and downsample ratio = 2,
respectively. Note the number of samples' difference between the two oscilloscopes.
6.3.3.21 Cosimulation
EDA
Agilent ADS Export 1302
Agilent ADS Import 1304
Mentor Graphics Eldo Export 1305
Symbol
Description
Exports Agilent ADS time domain waveform (TIM MDIF) signal data. Agilent ADS and the Agilent logo are
trademarks of Agilent Technologies..
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Agilent ADS - -
Defines the name of the element. Export
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
option line # T ( SEC V R - -
Defines the option line '# T ( time_unit 50 )
data_unit R xx )' for the TIM file
format.For more information refer to
Agilent ADS documentation on
supported data files and
'TimedDataRead' component.
format line % time voltage - -
Defines the format line '% time voltage'
for the TIM file format.For more
information refer to Agilent ADS
Symbol
Description
Imports Agilent ADS time domain waveform (TIM MDIF) signal data. Agilent ADS and the Agilent logo are
trademarks of Agilent Technologies..
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Agilent ADS - -
Defines the name of the element. Import
trademarks of
Agilent
Technologies.
prefix FROM_ADS - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
filename waveform.tim - -
The name of the file containing the
input data (source).The file contains
Agilent ADS time domain waveform
(TIM MDIF) signal data.
Symbol
Description
Exports Mentor Graphics Eldo time domain PWL corner points. Mentor Graphics Eldo and the Mentor Graphics logo
are trademarks of Mentor Graphics..
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Mentor - -
Defines the name of the element. Graphics Eldo
Export
annotate true - [true, false]
Standard
Name Default value Default unit Value range
filename waveform.txt - -
The name of the file for writing the
output data (destination).The file
contains Mentor Graphics Eldo time
domain PWL corner points.
Symbol
Description
Imports Mentor Graphics Eldo time domain PWL corner points. Mentor Graphics Eldo and the Mentor Graphics logo
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Mentor - -
Defines the name of the element. Graphics Eldo
Import
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Mentor - -
Defines the element unique type (read Graphics Eldo
only). Import
prefix FROM_ELDO - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
filename waveform.txt - -
Symbol
Description
Imports time domain waveform piecewise linear corner points..
Ports
Name Type
output Electrical Signal
Properties
General
Name Default value Default unit Value range
name Piecewise - -
Defines the name of the element. Linear Import
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
filename waveform.txt - -
The name of the file containing the
input data (source).The file contains
Mentor Graphics Eldo time domain
PWL corner points.
Symbol
Description
Exports time domain waveform piecewise linear corner points..
Ports
Name Type
input Electrical Signal
Properties
General
Name Default value Default unit Value range
name Piecewise - -
Defines the name of the element. Linear Export
prefix TO_PWL - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
filename waveform.txt - -
The name of the file for writing the
output data (destination).The file
contains Mentor Graphics Eldo time
domain PWL corner points.
Symbol
Description
EDA Cosimulation.
Ports
Name Type
port 1 Electrical Signal
port 2 Electrical Signal
Properties
General
Name Default value Default unit Value range
name EDA - -
Defines the name of the element. Cosimulation
Standard
Name Default value Default unit Value range
number of ports 0 -
Defines the number of ports for the
element.
6.3.3.22 Tools
Data Delay 1311
Port Converter 1313
Fork 1xN 1314
Write To Stream 1316
Read From Stream 1317
Termination 1319
Probe 1320
Symbol
Description
Data delay.
Ports
Name Type
input Variant
output Variant
Properties
General
Name Default value Default unit Value range
name Data Delay - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Data Delay - -
Defines the element unique type (read
only).
description Data delay - -
A brief description of the elements
functionality.
prefix DLY - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Standard
Name Default value Default unit Value range
delay 1 -
Defines the number of buffer data
values delayed.
Numerical
Name Default value Default unit Value range
bidirectional false - [true, false]
Defines whether or not to disable
bidirectional propagation. If 'false', only
propagation from 'left' to 'right' is
allowed
Symbol
Description
Converts a bidirectional port into input and output ports.
Ports
Name Type
port Variant
output Variant
input Variant
Properties
General
Name Default value Default unit Value range
name Port Converter - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Port Converter - -
Defines the element unique type (read
only).
description Converts a - -
A brief description of the elements bidirectional
functionality. port into input
and output
ports
prefix CONV - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
Diagnostic
Name Default value Default unit Value range
Results
Name Description
diagnostic/response #/transmission The complex transmission vs. frequency
corresponding to the ideal and designed filter.
diagnostic/response #/gain The gain vs. frequency corresponding to the ideal
and designed filter.
diagnostic/response #/error Mean square error comparing the frequency
response of the designed filter implementation with
the ideal frequency response.
Symbol
Description
Duplicates a signal from a single input to multiple output.
Ports
Name Type
input Variant
output 1 Variant
output 2 Variant
Properties
General
Name Default value Default unit Value range
Standard
Name Default value Default unit Value range
number of ports 2 -
Defines the number of output ports for
the element.
Diagnostic
Name Default value Default unit Value range
run diagnostic false - [true, false]
Enables the frequency response of the
designed filter implementation and the
ideal frequency response to be
generated as results.
diagnostic size 1024 -
The number of frequency points used
when calculating the filter frequency
response.
Results
Name Description
Symbol
Description
Write To Stream.
Ports
Name Type
input Variant
Properties
General
Name Default value Default unit Value range
name Write To - -
Defines the name of the element. Stream
Standard
Name Default value Default unit Value range
filename file.icd - -
The name of the file for writing the
output data (destination).
Implementation Details
The "write to stream" element outputs the data to an icd file, which can be read by a "read from stream" element.
Please see the example file Digital_Write_To_Stream.icp for detailed information. Please see also the read
from stream 1317 element.
The file name is defined under the "Standard" category, by default, the file name would be set to "file.icd". In this
example, the file generated is digital_out.icd. The file can only be read by the "read from stream" element in
INTERCONNECT.
Symbol
Description
Read From Stream.
Ports
Name Type
output Variant
Properties
General
Name Default value Default unit Value range
name Read From - -
Defines the name of the element. Stream
Standard
Name Default value Default unit Value range
filename file.icd - -
The name of the file containing the
input data (source).
Implementation Details
The read from stream element reads an icd file into the system. The icd file can be generated by a write to stream
1316 element. Please see the example file Digital_Read_From_File.icp.
The file name is defined under the "Standard" category, In this example, the file is digital_in.icd.
6.3.3.22.6 Termination
Symbol
Description
Termination.
Ports
Name Type
input Variant
Properties
General
Name Default value Default unit Value range
name Termination - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Termination - -
Defines the element unique type (read
only).
description Termination - -
Implementation Details
The termination is an element that terminates the system. It could be used to help to have a better design of the
system. When some output ports' data are not interested to be measured or analyzed, it could be connected to a
termination to have a neat look. It also can be used as connected to ground for electrical signals.
6.3.3.22.7 Probe
Symbol
Description
Probe.
Ports
Name Type
input Variant
Properties
General
Name Default value Default unit Value range
name Probe - -
Defines the name of the element.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines whether or not the element is
enabled.
type Probe - -
Defines the element unique type (read
only).
description Probe - -
A brief description of the elements
functionality.
prefix PROBE - -
Defines the element name prefix.
model - - -
Defines the element model name.
library - - -
Defines the element location or source
in the library (custom or design kit).
local path - - -
Defines the local path or working folder
$LOCAL for the element.
Implementation Details
The element Probe is used to store the data in which port it connected to. It will save the data to an Excel file with
the header, which is the description and property of the data, and the data values. Please see the example file
probe.icp for the implementation details of this element. Following is the figure shows the system in the example:
By running the simulation, a folder with the same name of the INTERCONNECT file will be generated and an Excel
file will be created. The Excel file is named as the element name plus the port name which is connected to the
probe, please see the file sine_1_output.csv for example.
6.3.3.23 Custom
This folder contains all the user-defined elements (or primitive elements that have been modified by the user).
To add new elements into the library, simply right-click on the element and select "Copy to Element Library".
It is also possible to add an element to the Element Library from the script using the addtolibrary 1613 command.
Objective
This page describes how to create Compound Elements, which are essential for creating increasingly complex
photonic integrated circuits based on sub-circuit elements.
Associated files
compound_element.icp
See also
Property Expressions 903
To create a compound element, right-click on the view port and select "Create compound element". Once the new
"empty" compound element is created, right-click on the element and select "Expand". This will open a new view
port corresponding to the new compound element, which users can add elements to. Alternatively, users can group
existing elements into a compound element by selecting the elements in the view port, right-clicking and selecting
"Create compound element".
With the compound element selected, click on the the Edit button to open the edit window. In the edit window there
will be 4 tabs corresponding to the 4 components of a compound element.
Property Editor
The property editor includes a list of properties for the compound element. By default, this list is inherited from the
compound element's parent element (ie. Root Element 905 if it does not belong to another compound element).
However, this default list can be modified and new custom properties can be introduced. Property values of can be
set from parent values using expressions as discussed in Property Expressions 903 , so elements inside the
compound element can inherit the properties of the compound and root elements.
Ports
This is a list of ports which allow the compound element to transfer data to and from external elements. Each port
corresponds to a "Relay" object inside the compound element (which child elements of the compound element can
connect to), as well as an external port connected to the compound element (which other elements can connect to
the compound element from). For example, consider a compound element containing a Straight Waveguide. Here,
we add two ports to the compound element corresponding to Port 1 and 2 of the waveguide:
You can use the Arrange button to arrange the locations of the ports automatically so they are evenly spaced in the
view port. It's also possible to click and drag the "Relay" objects in the view port.
Once the ports are added, we can connect Port 1 and 2 of the compound element directly to Port 1 and 2 of the
straight waveguide inside the compound element through Relay 1 and 2. As shown in the figure below, the
compound element on the right is now equivalent to the straight waveguide on the left.
Results
The results list includes all the output results for the compound element. Once the analysis script that has been run,
only the parameters that are both defined in the results section and set in the analysis script (via setresult) 1619 can
be accessed externally. Note that it is not necessary for compound elements to have results.
Scripts
The scripts define the properties and functionalities of the compound element. This includes a "Setup" script to
setup or edit the grouped primitives, as well as a "Analysis"script to execute a customized analysis routine.
SETUP
The setup script can only be used to delete, edit or get the properties of child elements. For example, the
command "selectall" selects all of the elements inside of the compound element, while ignoring those outside.
The setup script only has access to the compound element's own properties (ie. those defined in the Property
Editor). It does not have access to workspace variables (ie. those defined in the script prompt or in a script file). In
addition, any variables defined in the setup script cannot be obtained from the script prompt or from a script file.
The setup script can be debugged by pressing the TEST button. If there are no syntax errors or break commands
in the script, you will see the line <script complete> in the script output. If there is a syntax error, the location of the
error will be given in the script output. An example of an error message is: syntax error: prompt line: 38.
The setup script is run every time the OK button is pressed.
ANALYSIS
The analysis script can only be used set the variables defined in the "Results" tab. This can be done using the
setresult 1619 script command.
The analysis script does not have access to workspace variables (ie. those defined in the script prompt or in a
script file). In addition, any variables defined in the analysis script cannot be obtained from the script prompt or from
a script file.
The analysis script is run every time the "Run Analysis" button is pressed, or if runanalysis 1647 is called from the
script prompt.
Example
In compound_element.icp, a new property "length" has been defined for the compound element, which will set
the length of the Straight Waveguide inside the compound element.
The compound element examples shown here are very simple. Users can create compound elements of arbitrary
complexity following the same work flow.
Properties
General
Name Default value Default unit Value range
name Compound - -
Defines whether or not the element is Element
enabled.
annotate true - [true, false]
Defines whether or not to display
annotations on the schematic editor.
enabled true - [true, false]
Defines the name of the element.
type Compound - -
Defines the element unique type (read Element
only).
description Compound is a - -
A brief description of the elements hierarchical
functionality. element that
contains other
elements
prefix COMPOUND - -
Defines the element name prefix.
source - - -
Defines whether or not the element is
flipped.
local path - - -
Defines the element rotation value.
expandable true - [true, false]
Defines whether or not the user can
access the internal elements of the
compound.
Simulation
Name Default value Default unit Value range
bitrate %bitrate% bits/s
The output signal bitrate.
time window %time window s
The duration of the generated signal. %
This is typically set by the global
properties in the root (top-most)
element.
sample rate %sample rate% Hz
The sample rate of the generated
signal. This is typically set by the
global properties in the root (top-most)
element.
Script
Name Default value Default unit Value range
run setup script automatic - [automatic,
Defines whether to run setup script always]
automatically or to force the setup
script to run at the beginning of the
simulation.
Objective
This page describes how to create Scripted Elements, which provide users with flexibility in defining the
functionalities of circuit elements.
Associated files
scripted_elements.icp
digital_scripted_struct.icp
electrical_scripted_struct.icp
optical_mm_scripted_struct.icp
See also
Scripting Language 1383
a list of Results
a set up Scripts (Setup, Ready, Go, Wrap-up)
To create a compound element, right-click on the view port and select "Create scripted element". Once the new
"empty" scripted element is created, users can choose to change the icon of the new element by selecting "Set
icon" (this is optional). With the scripted element selected, click on the the Edit button to open the edit window. In
the edit window there will be 4 tabs corresponding to the 4 components of a scripted element.
Property Editor
The property editor includes a list of properties for the scripted element. By default, this list only contains the
standard General properties. This default list can be modified and new custom properties can be introduced.
Ports
This is a list of ports which allow the scripted element to transfer data to and from other elements. Here, we add two
ports to the scripted element:
Results
The results list includes all the output results for the scripted element. Once the simulation has been ran, only the
parameters that are both defined in the results section and set in the scripts (via setresult) 1619 can be accessed
externally. Note that it is not necessary for scripted elements to have results.
Scripts
The scripts define the properties and functionalities of the scripted element.
The scripts only have access to the scripted element's own properties (ie. those defined in the Property Editor). It
does not have access to workspace variables (ie. those defined in the script prompt or in a script file). In addition,
any variables defined in the scripts cannot be obtained from the script prompt or from a script file.
The scripts can be debugged by pressing the TEST button. If there are no syntax errors or break commands in the
script, you will see the line <script complete> in the script output. If there is a syntax error, the location of the error
will be given in the script output. An example of an error message is: syntax error: prompt line: 38.
SETUP
The setup script can be used to set the properties of the scripted element. Often, this is done through the
setsparameter 1631 script command (which sets the s-parameters between the output and input port of the scripted
element).
The setup script is ran once at the initialization stage.
READY
The ready script defines the criteria necessary to propagate the data.
It is not necessary to define the ready stage.
GO
The go script defines what data to send to the output ports.
It is not necessary to define the go stage.
WRAP-UP
The wrap-up script can be used to post-process the data at the end of the simulation.
The wrap-up script is ran once at the wrap-up stage.
It is not necessary to define the wrap-up stage.
Example
In scripted_elements.icp, there are three scripted element examples:
Optical Constant Gain
Frequency Dependent Transmission
Frequency Dependent Propagation
The script commands used in these files are based on port data push and pop, please see the following script
commands pages for the implementation details of the script commands:
popportdata 1620 , getdigitaldata 1628 , setdigitaldata 1629 , pushportdata 1620 , getdigitalwaveform 1628 , popportframe 1621 ,
pushportframe 1622 , popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 ,
getmonitorframe 1623 , getmonitorwaveform 1624 , lookupreadtable 1444 , lookupreadvalue 1444 , lookupreadnportsparameter
1444
The "Scripted Inverter" has the following script in the "Go" window under the "Simulation" tab.
signalIn = popportframe("input");
if( bitrate == 0 ) {
logmessage("bitrate : " + num2str(signalIn.header.bitrate));
logmessage("frequency_grid_spacing : " + num2str(signalIn.header.frequency_grid_spaci
bitrate = signalIn.header.bitrate;
}
logmessage(toscript(signalIn));
nCount = nCount + 1;
pushportframe("output",signalIn);
It reads in the data from the buffer at the input port, inverts the signal and pushes the data to the output port.
The "Scripted Analyzer" is scripted the same way as the "Logic Analyzer" and has the following script in the
"Wrap-up" window under the "Simulation" tab.
signalIn = getmonitorwaveform("input");
logmessage(toscript(signalIn,false));
setresult("bitrate",signalIn.bitrate,"bitrate (bits/s)");
It collects all the data at the input port, set the data to a result dataset so that it could be visualized.
Please check the links for the details of the script commands popportframe 1621 , logmessage 1449 ,
pushportframe 1622 , getmonitorwaveform 1624 and setresult 1619 .
The "Scripted Gain" has the following script in the "Go" window under the "Simulation" tab.
signalIn = popportframe("input");
if( sample_rate == 0 )
samplerate = signalIn.header.sample_rate;
logmessage(toscript(signalIn));
nCount = nCount + 1;
pushportframe("output",signalIn);
It reads in the electrical data from the buffer at the input port, enlarges the amplitude of the signals by 10 times and
pushes the data to the output port.
The "Scripted Analyzer" is scripted the same way as the "Oscilloscope" and has the following script in the "Wrap-
up" window under the "Simulation" tab.
signalIn = getmonitorwaveform("input");
logmessage(toscript(signalIn,false));
setresult("waveform",signalIn.signal.time,signalIn.signal.value,"time (s)","amplitude (a.
signalIn = getmonitorwaveform("input","frequency");
logmessage(toscript(signalIn,false));
setresult("spectrum",signalIn.signal.frequency,signalIn.signal.value,"frequency (Hz)","am
It collects all the data at the input port, and sets the data to a result dataset so that it could be visualized.
Please check the links for the details of the script commands popportframe 1621 , logmessage 1449 ,
pushportframe 1622 , getmonitorwaveform 1624 and setresult 1619 .
The "Scripted Gain" has the following script in the "Go" window under the "Simulation" tab.
signalIn = popportframe("input");
if( sample_rate == 0 ) {
sample_rate = signalIn.header.sample_rate;
logmessage(toscript(signalIn.data));
pushportframe("output",signalIn);
It reads in the optical data from the buffer at the input port, enlarges the amplitude of the signals by 10 times and
pushes the data to the output port.
The "Scripted Analyzer" is scripted the same way as the "Optical Oscilloscope" and has the following script in the
"Wrap-up" window under the "Simulation" tab.
signalIn = getmonitorwaveform("input");
logmessage(toscript(signalIn,false));
setresult("mode 1",signalIn{1}.channel{1}.signal.time,signalIn{1}.channel{1}.signal.value
setresult("mode 2",signalIn{2}.channel{1}.signal.time,signalIn{2}.channel{1}.signal.value
It collects all the optical data for different modes at the input port, and sets the data to a result dataset so that it
could be visualized.
Please check the links for the details of the script commands popportframe 1621 , logmessage 1449 ,
pushportframe 1622 , getmonitorwaveform 1624 and setresult 1619 .
INTERCONNECT 5 introduced new licensed features that enable secure generation and use of customized compact
model libraries (CMLs). These features can be used to generate calibrated CMLs, and distributed them with foundry
PDKs, or to efficiently protect and distribute internally developed custom element libraries among different design
groups or customers.
In this topic
Generate Custom Element 1332
Package/Publish Compact Model Library 1334
Generic_CML.cml
See also
Custom 1321
Objective
This section describes how to create a compact model (CM), how to package CMLs, and how to install them to the
Design Kits element library folder in INTERCONNECT.
A reference circuit
In this topic
Elements Design 1332
Create Custom Elements 1333
See also
Package/Publish Compact Model Library 1334
Elements Design
Any modified primitive elements, compound elements and script elements can be copied to the Element Library
under the Custom folder. Users can also customize the properties and icons of the elements. The following figures
shows a compound element of a grating coupler. It contains an Optical S parameter element which loads the data
from a file that contains the s parameters of a grating coupler. The grating coupler's S-parameters file can be
generated by using FDTD Solutions or experimental data.
The icon of the element can be simply set by right clicking on the element and selecting the "Set icon" option. The
icon is a scale vector graphics (SVG) image file. The figure below illustrates this process.
Option 1: select the element -> right click -> "Copy to Element Library"
addtolibrary("foldername");
Additional Notes:
It is a good habit to remove any residue of the "name" and "prefix" (for example,
the "_1" in the element name "test_GS_S_parameters_1") of the element when adding
it to the Element Library. The sequence numbers may cause confusions when using
the element later.
Once the customized elements are copied to the Custom folder, a file with extension .ice will be generated in the
folder for each custom element. To change the default location of the Custom library folder, right click on the Custom
folder and select "Redirect", then choose the appropriate path. Users can also create sub-folders in Custom library
folder by right clicking on it and selecting "New folder".
Reference Elements
Once a customized element is added to the Custom library, it can be used in two ways, as a copy or as a
reference. The default setting for creating elements from Element Library is "Create a copy". User can change the
setting in the System Option Editor (Files -> Options) as shown below. The copy of a customized element gets full
access to the element's properties and internal data; while the reference of the element (indicated by the light blue
shadow) is the "shell" of the customized element, only the "surface" properties can be edited and the element is
non-expandable, this means user cant access the internal elements of the compound element.
Please note that only the folders under Custom library can be packaged/published as a CML. To package/publish a
compact model library, user can simply right click on the folder and select "Package/Publish" or use the
"packagedesignkit" script command. Packaging of a CML requires no keys while publishing of a CML requires a
publisher key, hence an extra publisher license is required for publishing a compact model library.
NOTE: Please contact sales@lumerical.com to ask for a trial of the CML publisher
license.
A prompt window will pop out after select "Package/Publish". By clicking "OK" a CML file with extension cml will
be generated under the specified path with the specified name. The cml file can then be distributed to other users.
An example file Generic_CML.cml is available in the Associated files list at the beginning of this section.
The following table shows the comparison among the CML distribution options "Public", "Protected" and "Protected
+".
The "Export HTML" option allows the designer to export the details of the compact models in a library to separated
.html files together with the images of the symbol of the models. The .html files are named after the name of the
models. The following figure illustrates this procedure. The details of the compact models can then be used as user
guidelines and be distributed together with the CMLs.
Users can install design kits by right clicking on the Design Kits folder, selecting "Install" and choosing the right cml
file, or by using the "installdesignkit" script command. If the cml file is published with a key, an extra reader license
is required to use the installed design kit. After successfully installed the CML, the elements will appear in the
Design Kits folder and they can only be used as reference. The installation process is shown below.
NOTE: Please contact sales@lumerical.com to ask for a trial of the CML reader
license.
Option 1: select "Design Kits" folder -> right click -> specify the cml file and installation path
In the example file mzi_reference_circuit.icp, the MZI structure is constructed by the references elements
in the installed Design Kit. The following figure shows the circuit in the example file. Try to install a CML without the
appropriate key will result in an empty folder under the Design Kit Category.
If the example file is send to another end user without the design kit installed, the elements will appear in red
shadow to indicate the broken reference elements. This means the compact models are not available in the users
design kit library.
Descriptio Screenshot
n
Parameter Sweeps Paramete
699 r sweeps
Sweep are useful
scripting commands for finding
703
the
Nested
optimum
Sweeps 707
value and
Running
sensitivity
parameter
of the
sweeps
design
without the
performan
CAD 710
ce to
Sweep
certain
analysis for
parameter
dispersion
712
s.
The Animate function allows you to view the structures that will be simulated in a parameter sweep or optimization in
the CAD before you run the project:
Associate files
sweep_AR_coating_example.fsp
See also
Sweep scripting commands 703
Running sweeps without the CAD 710
Editing parameters
Once the sweep object is open, add a
parameter and browse the parameter
pulldown menu. Select the "thickness"
property of the AR structure.
Recording results
Add results to record, the recorded
results will be available when the
sweep is done. Select the power
transmission 'T' from the Reflection and
Transmission monitors, as shown here.
Associate files
sweep_AR_coating_example.fsp
sweep_AR_coating_example_script.ls
f
See also
Optimization scripting commands 722
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644
To generate and run the sweep using script commands, user can open the
sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file sweep_AR_coating_example_script.lsf.
When the sweep is superficially generated, the parameters can then be defined and added to it. The following
commands define the name, type, range and the path of the parameter "thickness".
This command adds the parameter "thickness" to the sweep "thickness_sweep_script". When the parameter is
successfully added, the sweep will appear in the "Optimizations and Sweeps" tab as shown below.
[click to enlarge]
The next step is to add the results that we want to measure into the sweep. The commands listed below define
and add the results "R" and "T" to the sweep as shown in the sweep editing window below. After this step, the
sweep is well defined and ready to run.
# define results
result_1 = struct;
result_1.Name = "R";
result_1.Result = "::model::R::T";
result_2 = struct;
result_2.Name = "T";
result_2.Result = "::model::T::T";
[click to enlarge]
[click to enlarge]
The following figures are the plots of the results R and T v.s. thickness, which show same results as in the
section Parameter sweeps.
Associate files
sweep_nested_example.fsp
See also
Run a parameter sweep 699
A nested parameter sweep will be created as a result. Open the edit window for the inner sweep object,
change the name to "theta", add a parameter "source_angle" and browse the parameter pulldown menu to
select the "angle" property of the source. Set the Start/Stop values to sweep from 40 to 60 degrees, and the
Number of points 20. Finally, add a result "R" from the reflection analysis group (see Creating parameter
sweep project 699 for step-by-step details). The edit window should look like the screenshot below.
In the edit window for the outer sweep, change the name to "wavelength", add a parameter "lambda" and
browse the parameter pulldown menu to select the "wavelength" property of the source. Set the Start/Stop
values to sweep from 0.4 to 0.6 microns in 3 points. Add a result "R" and select R from the Result
pulldowndown menu, which contains all the results in the inner sweep that are already defined.
plot(reflection.source_angle, pinch(R,3,1),
pinch(R,3,2),
pinch(R,3,3),
"angle of incidence (degrees)","Reflection","Reflection
legend('lambda = ' + num2str(lambda(1)), 'lambda = ' + num2str(lambda(2)), 'lambda = '
We can see that shorter wavelengths correspond to larger incident angles where minimum reflection is
obtained.
1. Adjust model parameters and save a set of fsp files (a fsp file for each parameter value).
2. Run all the simulations
3. Load the simulation files and extract the required information
Advantages:
The individual simulations can be sent to an external cluster or other workstations
Disadvantages:
It is not quite as simple to run all the simulations
See also
Run a parameter sweep 699
Running Simulations
Step 1: Adjust model parameters and save a new fsp file for each
parameter value
After setting up a parameter sweep as described at Parameter sweeps 699 , rather than running the parameter
sweep directly, simply choose Save to files, as shown below.
This will create a directory called with the same name as the original fsp file, in this case,
usr_optimization_example. Inside this directory you will find 10 fsp file, called "test_sweep_1.fsp"
to "test_sweep_10.fsp". Each file corresponds to a particular value of the parameters and there are 10
files because we chose 10 different values for our sweep parameter.
This will reload all the results from the fsp files, as if they had been run on the local machine by pressing the
Run button. You can then proceed with the analysis of the results as shown in Parameter sweeps 699 .
Another advantage of using this technique is that the multiple simulations in a sweep can be distributed to yield
faster results for larger simulation files.
Solver 101
FDE
Associate files
sweep_frequency_dispersion.lms
sweep_frequency_dispersion.lsf
See also
Run a parameter sweep 699
FDE - Frequency Analysis 758
Open the usr_frequency.lms file and in the Optimization and Sweeps window, right click on the object named
"sweep" and click "Edit". You will see that the sweep object has been set up to sweep the same simulation over a
frequency range of 100-200 THz.
Open the usr_frequency.lsf script within the project file. Notice that script takes the same inputs as the frequency
sweep in the graphical interface. Notice that the user is supposed to make sure that the start and stop frequencies
as well as the number of frequency values in that range should match between the set up sweep, and the inputs of
the script.
If the track_selected_mode variable is set to 1, the sweep will run the simulation for the first frequency and set the
desired mode as a reference dcard. Then as the frequency is swept the overlap between the selected dcard and the
corresponding mode at the new frequency is used to track that mode. The difference here with the frequency
analysis of the user interface is that the sweep is completed initially and the figures of merit are calculated
afterwards.
If the track_selected_mode variable is set to 0, the sweep will track all the modes and plot the results on the same
graph. These modes are solved for according to the input variables like number of test modes, and effective index to
solve around, set at the top of the script.
Since the sweep automatically creates a folder with the name {filename}_sweep, when using your file, make sure the
name of the folder is set right the script where the path is respecified. Note that the working directory is changed to
access the sweep files in both cases and so you would need to switch the directory back to the original one before
you run another sweep.
6.4.2 Optimization
Objective
This page describes how to optimize a design using the graphical user interface. Optimizing the design is done
using an advanced optimization algorithm, which requires running a large number of simulations. This can be much
more efficient than running a parameter sweep, particularly if there is more than one parameter to optimize. For
details in the optimization algorithm used, please see Particle Swarm Optimization 727 . We will demonstrate how to
use the optimization feature with a simple example. We will find the optimum thickness of an anti-reflection (AR)
layer on silicon. The optimum thickness is the thickness that gives the minimum reflection at the wavelength of
operation, in this case 500 nm. For additional information, see the Optimization and sweeps video.
Associate files
sweep_AR_coating_example.fsp
See also
Optimization scripting commands 722
Computation Resources
Run a parameter sweep 699
Particle Swarm Optimization 727
Optimization properties
NAME: Parameter sweep name.
Setup tab
Optimization and configuration
ALGORITHM - PARTICLE SWARM: Use the Particle Swarm 727 optimization method.
ALGORITHM - USER DEFINED: Create your own User Defined 727 optimization method.
TYPE: Specify if the result should be minimized or maximized.
MAXIMUM GENERATIONS: The maximum number of generations to run. The total number of simulations
to run is the product of Max generations and Generation size.
GENERATION SIZE: The number of simulations per generation.
RESET RANDOM GENERATOR: Enabling this option will reset the random number generator with a fixed
seed. This ensures the same set of random numbers are used for each run of the optimization, which leads
to consistent results between runs.
TOLERANCE: Set a tolerance to stop the optimization early (ie. run less than the maximum number of
generations. The tolerance algorithm is:
- if =0: Always run the specified number of generations.
- if >0: Always run the first 10% of generations. After that, stop the optimization if
bestResult (lastGener ation) - bestResult (10% of generation s ago)
tolerance
bestResult (lastGener ation)
. Basically, this
stops the optimization when the bestResult stops changing.
Parameters
PARAMETER: Property to optimize.
TYPE: Used to specify the type of units for the selected property (eg. length, time).
MIN/MAX: The min/max value of the range of interest.
ADD: Add another line to the parameters table.
REMOVE: Remove a line from the parameters table.
Figure of merit
Multiple results can be collected, but one must be selected as the quantity to optimize. This result must
be a single scalar number. Other results can be matrices.
OPTIMIZE: Select a specific result to optimize (i.e. minimize or maximize this value). The selected result
must be a single scalar value.
NAME: A user specified name for the result. Will appear in the results dataset.
RESULT: Result to collect.
ADD: Add another line to the Figure of merit table.
REMOVE: Remove a line from the Figure of merit table.
SELECT TO OPTIMIZE: Make selected result the one to optimize.
Advanced tab
User defined algorithm tab
FIRST GENERATION SCRIPT: The First generation script can be used to define the initial parameter values
for the initial generation of simulations. This script is not required if you want random starting values.
NEXT GENERATION SCRIPT: This script is used to calculate the parameter values for the next generation,
based on results from previous generations.
TEST: Test the First and Next generation scripts without running any simulations.
SCRIPT OUTPUT: Output messages from the scripts.
Figure of merit script
This tab allows users to calculate a custom figure of merit (FOM), rather than using a value obtained
directly from a monitor or analysis object.
USE FIGURE OF MERIT SCRIPT: Select this option to enable this feature.
FIGURE OF MERIT SCRIPT: This script allows results selected in the 'Figure of merit' section of the
SETUP tab to be post-processed into a final FOM that will be optimized. The script input arguments are
the results selected in the 'Figure of merit' section of the SETUP tab. The script must calculate a variable
named 'fom', which will be used as the FOM to optimize. This variable must be a single, scalar number.
Note:
Optimizat
ions with
nested
sweeps
It may be
necessary
to use a
nested
parameter
sweep
within an
optimization
task. For
example, to
optimize a
design for
unpolarized
light, it is
necessary
to sweep
over both
polarization
s at each
point in the
optimization
task. For an
example,
see the
Nested
sweeps 707
page.
Once the
optimizer
object is
open, add a
parameter
and browse
the parameter
pulldown
menu. Select
the
"thickness"
property of
the AR
structure.
Next, choose
the Type to
be length and
set the min
and max
values to 10
nm and 150
nm
respectively.
The final
result should
look like the
screenshot
here.
Add a figure
of merit.
Select the
power
transmission
'T' from the
Reflection
monitor (R),
as shown
here.
Go to the
Setup tab and
choose the
Particle
Swarm
algorithm.
Choose to
Minimize the
figure of merit.
Set the
Maximum
generations to
20 and the
Generation
size to 10
with a
Tolerance of
0. The final
settings edit optimization window
should look
like the
screenshot
here.
Click OK to
accept all
settings, and
go back to
the main
Optimizations
and Sweeps
window. For
more
information of
the SETUP
and
ADVANCED
tab, please
see here 727 .
Optimization Status
Associate files
sweep_AR_coating_exampl
e.fsp
optimization_AR_coating
_example_script.lsf
See also
Sweep scripting commands 703
Yield scripting commands 734
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and
optimization data 1644
To generate and run the optimization analysis using script commands, user can open the
sweep_AR_coating_example_script.fsp file and follow the three steps listed below; or, open and run the
script file optimization_AR_coating_example_script.lsf.
After the optimization is superficially generated, the parameters can then be defined and added to it. The
following commands define the path, type, optimization window and unit of the parameter. And then add this
parameter to the optimization "thickness_optimization_script".
Then this optimization analysis will appear in the "Optimizations and Sweeps" tab as shown below.
[click to enlarge]
The next step is to add the results that we want to optimize into the optimization. The commands listed below
define and add the results "R" and "T" to the optimization object as shown in the optimization editing window
below.
result_2 = struct;
result_2.Name = "T";
result_2.Result = "::model::T::T";
result_2.Optimize = false;
Please note that, only the result R (reflection) is optimized to be minimum in this example. The optimization
"thickness_optimization_script" is now completely defined as shown below.
[click to enlarge]
# run optimization
runsweep("thickness_optimization_script");
[click to enlarge]
Close the "Optimization Status" window and user can find there are several results stored in the optimization
as indicated below.
[click to enlarge]
And the reflection optimization trend is plotted as in the figure shown below. We can see that the optimization
result and the sweep result from the previous section show great agreement with each other and the optimized
thickness to get a minimum reflection is around 60 nm.
Associate files
optimization_user_defined.fsp
optimization_steepest_descent.fsp
See also
Optimization 716
Particle Swarm Optimization 727
The first example shows how to implement a simple 'shrinking box' optimization algorithm, while the second shows
a steepest descent implementation.
In Eq. (1), t is the iteration counter; c 1 and c 2 are the cognitive and social factors, respectively; is called the inertial
weight; and 1 and 2 are random number between 0 and 1. Lumerical's PSO implementation uses default values of
c 1, c 2 and that have shown to converge well in many test optimization problems for photonic design problems. A
detailed description of the algorithm and the difference coefficients can be found in Refs. [1] or [2].
The movie below shows how the particle positions and velocities change as a function of iteration when using the
PSO algorithm to find the maximum of a sinc function in 2D space.
1. J. Robinson and Y. Rahmat-Samii, "Particle swarm optimization in Electromagnetics," IEEE Trans. Antennas
and Propagat. 52, pp.397 - 407 (2004).
2. K. E. Parsopoulo and M N. Vrahatis, Particle swarm optimization and intelligence : advances and applications,
Information Science Reference, 2010.
3. J. Pond and M. Kawano, Virtual prototyping and optimization of novel solar cell designs, Proc. SPIE 7750,
775028 (2010), DOI:10.1117/12.873114
4. M. Kawano and J. Pond, "Design Optimization of Photonic Crystal Organic Solar Cells using the FDTD method
in Combination with Particle Swarm Optimization," 7th International Conference on Optics-photonics Design &
Fabrication, Yokohama, Japan, 19S1-14, 2010.
5. J. G. Mutitu, S. Shi, C. Chen, T. Creazzo, A. Barnett, C. Honsberg and D. W. Prather, "Thin film silicon solar cell
design based on photonic crystal and diffractive grating structures", Opt. Express 16, 5238, 2008
6. M.Shokooh-Saremi and R. Magnusson, "Leaky-mode resonant reflectors with extreme bandwidths," Opt. Lett.
35, 1121, 2010.
7. R. Magnusson, M. Shokooh-Saremi,and E. G. Johnson, Guided-mode resonant wave plates, Opt. Lett. 35,
2472, 2010.
This page describes how to run a yield analysis task using an example finite impulse response filter circuit
composed of cascaded Mach-Zehnder interferometers, but the steps for setting up a yield analysis project in all
products are similar. See Optical filters 2321 for more information about this circuit.
Associate files
run_yield.icp
sweep_AR_coating_example.fsp
See also
Yield scripting commands 734
Yield properties
NAME: Yield name.
Configuration
NUMBER OF TRIALS: The number of trials to run.
Properties
NAME: A user specified name for the parameter. Will appear in results dataset.
PARAMETER: Property to sweep.
DESCRIPTION: Parameter statistical distribution settings.
DISTRIBUTION TYPE: Specify the type of statistical distribution. Options include: Uniform, Gaussian,
Lognormal, Truncated Gaussian, Truncated Lognormal, Discrete (uniform distribution where variables can only
take discrete values specified by the STEP).
DISTRIBUTION MEAN: Mean value of the distribution for Gaussian, Lognormal, Truncated Gaussian, and
Truncated Lognormal distributions.
DISTRIBUTION STD DEVIATION: Standard deviation of the distribution for Gaussian, Lognormal, Truncated
Gaussian, and Truncated Lognormal distributions.
DISTRIBUTION MIN/MAX: Minimum/Maximum value or cut-off value for Uniform, Truncated Gaussian,
Truncated Lognormal, and Discrete distributions.
DISTRIBUTION STEP: The discrete step size of allowed values for Discrete distribution.
DISTRIBUTION SEED: The seed value used to generate parameter values. The seed used can either be an
automatically generated random seed, or the user can specify a value for the seed so that the same results
can be achieved each time the yield analysis is run.
ADD: Add another line to the properties table.
REMOVE: Remove a line from the properties table.
Results
NAME: A user specified name for the result. Will appear in results dataset.
RESULT: Result to collect.
ESTIMATION: If "true" is selected in the Estimation field, the trial will be considered a pass if the result falls
within the specified min/max range. If there is more than one result with a yield estimate, the final yield
percentage will be the percent of trials where all of the results fall within the specified ranges.
MIN/MAX: Min/max range when the Estimation property is set to True.
ADD: Add another line to the results table.
REMOVE: Remove a line from the results table.
upper menu bar for a list of windows and selecting Optimizations and Sweeps from the list.
Click the Create New Yield Analysis button in the Optimizations and Sweeps window to create a new yield
analysis task. Click the Edit button to open the Edit yield analysis dialog window.
Once the yield analysis object is open, set the Number of trials to 20. Add a parameter (button on the right-
hand side of the Properties section) and change the name of the property to "ng1". Double-cick on the
Parameter field and browse the pulldown menu. Select the group index property of the SW1 waveguide.
Next, double-click on the description field of the property to open the Edit distribution dialog window. Select
Gaussian as the distribution type and set the mean value of the distribution to 8.05 and the standard deviation
to 0.085 as shown in the following screenshot.
Click OK to accept the settings. Repeat the steps above to add the "ng2" and "ng3" properties corresponding
to the group index of the SW2 and SW3 waveguides (use the same distribution properties).
Add a result to record using the button on the right-hand side of the Results section of the window and change
the name of the result to "fsr_1". Double-click on the Result field of the result to browse available results and
select the free spectral range result from input 2 of the Optical Network Analyzer. Double-click on the
estimation field of the result and set this to true. Next, select the minimum and maximum values of the yield
range by setting the value in the Min field to 1e11, and the value in the Max field to 2e11. Next, add two more
properties: the bandwidth and the gain from input 1 of the Optical Network analyzer, and set Estimation field to
false for these two properties. The final yield analysis window should look like the following
Click OK to accept all settings, and return to the main Optimizations and Sweeps window.
The log at the bottom of the window shows the calculated yield percentage which corresponds to the
percentage of trials where all of the results fall within the specified yield estimate ranges.
Selecting both a parameter and result generates a plot showing the value of the parameter versus and result
for each trial and the yield estimate range.
Yield analysis results can also be obtained in the script environment with the command getsweepdata,
which is similar to the command getdata. The name of each data member is the Name column that you
specified when adding the parameters and results, in this case the result is "input 2/mode 1/peak/free
spectral range". For example, the following 2 lines of script will plot the histogram showing the
distribution of free spectral range values.
yfsr=getsweepdata("yield ng","input 2/mode 1/peak/free spectral range");
histc(yfsr);
Associate files
run_yield.icp
yield_ng_script.lsf
See also
Sweep scripting commands 703
Optimization scripting commands 722
Parameter sweeps 699
Optimization 716
Yield analysis 728
Script - Parameters sweeps 1401
Script - Measurement and optimization data 1644
To generate and run the yield analysis using script commands, user can open the
run_yield_example_script.icp file and follow the three steps listed below; or, open and run the script file
yield_ng_script.lsf.
Result View 1377 This section describes usage and symbols used in the
Result View
Visualizer and plot windows 1378 This section describes how to use the visualization
tools
Script Workspace and Script Favorites 1379 This section describes how to use script functions with
the visualization tools for results analysis
Data export 1381 This section describes how data can be exported to
other software packages for further analysis or formal
presentation
Any simulation object that have results will be displayed with a symbol on the bottom-right corner. The name of
the available results, and the corresponding dimensions or are displayed. One can right click on any of the results to
display them in the Visualizer 1378 , or to send the to the Script Workspace 1379 for further post-processing.
With the use of datasets, allowing one to package raw data into meaningful results that can be easily parameterized
and visualized. The results for all the standard monitors can be retrieved in the original raw, un-parameterized matrix
form (using getdata 1646 ), or in dataset form (using getresult 1647 ). For example, in the Result View figure above, the
results listed under rawdata can be obtained using the getdata command. The results listed under "results" are
datasets, and can be obtained using the getresult command (these calculations will only be carried out when they
are visualized). The icons associated with each result reflect the type of result:
String
For more detail on how to work with datasets in the scripting environment, please see INTERCONNECT
Measurements 1617 .
The raw data results are all un-parameterized, simple matrix results. To create parameterized matrix datasets from
matrices, use the "Send to script" option to copy the variable into the Script Workspace 1379 .
Data that gets added to the Visualizer is retained until it is removed (i.e., with the "Remove" button or by pressing
"X" on the top right corner of the window). This is useful for comparing results across different sets of data. The
upper-left portion of the window is the plot area, which displays the current data defined by the settings in the upper-
right of the window (plot settings). The following sections describe the many options available for controlling what
data will be displayed in the plot area. These sections can be minimized if more area for plotting is required.
Visualizer and figure settings 741
Visualizer attributes and parameters 748
Visualizer
The icons in the script workspace above shows that while "sigmaabs" and "sigmascat" are parameterized matrix
datasets (since they were the results returned directly by the cross section analysis groups), "sigmaext" is a result
that we defined in the script, and is therefore a simple un-parameterized matrix. For example, simply right-clicking
on sigmaext and selecting "Visualize" will generate the following plot in the Visualizer:
Here, the extinction cross section is plotted as a function of the index value. To associate it with the corresponding
frequency array, select the "Create visualization" option, which will open the "Visualization Creator" dialog window:
This window allows users to set the name of the parameterized variable (sigmaext_vs_f) and its parameters (f). Once
this is defined, the visualization creator will generate the commands necessary for creating the parameterized
dataset in the Script Favorites window. When this command is ran, it will send the new parameterized variable to the
Visualizer, which will plot the variable as a function of the user specified parameter.
Generated Command
Generated Figure
In addition to the commands generated by the visualization creator, the Script Favorites window also allows users to
define their own favorite commands by selecting "New command" and "Edit".
Text files
The write 1440 script command can be used export data to a text file. See the scripting tutorial 1406 for details.
Excel
Direct export to Excel data files (.xlxs) is not supported. We recommend exporting your data to a text file, which
can then be imported into Excel.
MATLAB
The matlabsave 1642 command can be used to save data to .mat files. The Matlab script integration 1410 feature
is another powerful option for accessing MATLAB from the Lumerical scripting enviroment.
Export to rayset
See the Export to ray tracers 791 topic.
GDSII files
See the GDSII 480 topic.
Geometry transfer:
Copy/Paste objects:
Copy/Paste is available for structure objects between FDTD Solutions and MODE Solutions. If the object material is
not in the default material database, it will automatically be added upon pasting into the new simulation file. This
does not include analysis groups and monitors.
Copy/Paste is available for structure objects between FDTD Solutions, MODE Solutions and DEVICE; however,
materials are not transferred to the DEVICE material database, since the electrical properties of materials are
different from the optical properties. The user will have to manually specify the material in the new simulation upon
pasting. Custom primitives, analysis groups and monitors can not be coped/pasted.
Data Transfer:
Data can be transferred between the different products in several ways:
Import/Export Data:
Both .txt and .mat file formats can be used to import and export data from and to Lumerical products. Lumerical data
file (.ldf) format can also be used.
Please visit the knowledgebase pages on write 1440 , readdata 1439 , loaddata 1438 , savedata 1439 , matlabsave 1642 and
savedcard 1439 commands for more details.
S parameters can be exported from MODE Solutions to text files in a format that is compatible with
INTERCONNECT. Please visit the Plasmon section 1883 for an example.
Generation rate data can be exported from FDTD Solutions to DEVICE, using .mat files. Please visit Solar Cell
section 2594 for an example.
For simulations involving more than one product, the process can be automated using a script that calls the other
product through the command line. For more details please visit the following pages: Windows, Mac and Linux
For an example of a simulation using DEVICE and MODE, please visit the MZI example 2228 .
The MZI_automated set of files provided in the above example run MODE from the command line, called from a
script in DEVICE. Alternatively, the process can be done manually using the individual scripts provided and following
the procedure outlined in the example. For more information, please visit the charge-index conversion example 402 .
7 Scripting Language
Lumerical provides a powerful scripting language to manipulate simulation objects, launch simulations and analyze
results. Script commands can be entered directly into the script prompt, be run from a saved script file (.lsf), or
entered into structure and analysis objects.
This section of the the knowledge base contains the syntax for each script command and scripting tutorials.
The script functions have been organized into the following sections. You can also view the alphabetical list of
commands, or watch a recorded video.
Section
System 1426
Operators 1467
Functions 1475
GDSII 1677
The online version of this chapter includes examples for many commands.
In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
See also
Script functions - Reference Guide 1383
In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
See also
Script functions - Reference Guide 1383
Script prompt
Go to the VIEW - WINDOWS menu and select SCRIPT PROMPT. Alternatively, right click anywhere on the menu
bar and check the Script Prompt option, as shown in the above screenshot.
In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
Associated files
usr_script_hello.lsf
See also
Script functions - Reference Guide 1383
To output the text Hello world. to the command line simply enter the following line into your new document:
?"Hello world.";
Click on the save button to save the file. Set the name to be "hello". Notice that the .lsf extension is
automatically added.
You can save this document in any directory you like, but it is easiest if you save your scripts in your working
directory where you also save your .fsp or .lms simulation files. The .lsf extension allows FDTD Solutions to
recognize the document as a script file. If you have trouble creating this script file, please see the prepared version
of usr_script_hello.lsf.
In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
Associated files
usr_script_hello.lsf
See also
Run 1593
Feval 1491
In the previous section, we created a script called hello.lsf. We will now run the script. There are two ways to
run the script file.
1. Type the command hello; into the script prompt, as shown in the above screenshot. This will run the script file
named hello.lsf.
2. Click the Run Script button in the Script File Editor. You can also click the Run Script button in the main
Simulate toolbar, or by going to the Simulation - Run Simulation menu. These last two options will open a file
browser and let you select the appropriate script file.
When the script file runs, notice that the name of the script file appears in the script prompt window. Following the
script file name is the output of the file. In this case, the script outputs the string "Hello world." to the script
prompt.
current working directory, and you do not wish to change your current working directory, consider using the script
command feval.
In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
See also
Script functions - Reference Guide 1383
Remember semicolons
Every line of code in your script must end in a semi-colon, except for ones that end with a {or }. When you enter
code into the script prompt it will automatically append a semicolon to the end of the line if you forget it, but if you
In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
See also
Script functions - Reference Guide 1383
The workspace is where all variables are stored while scripting. All variables defined in a script file or in the script
prompt are global variables. The scripting environment does not support proper functions with private variable
workspaces.
The script command workspace always returns the names of all the variables and constants that have been set.
By using the command:
?workspace;
You can see everything that the current workspace contains.
In this topic
Scripting basics 1384
Opening the script editor and prompt 1385
How to make a script file 1385
How to run a script file 1386
Scripting tips 1387
Variables and the scripting workspace 1388
Manipulating script arrays 1389
See also
Script functions - Reference Guide 1383
Numeric variables in Lumerical's script language are arrays (also called matrices) of up to 4 dimensions.
Array elements can be accessed and manipulated individually. For example, at the script prompt, we could do the
following:
> x=1:5;
> ?x;
result:
1
2
3
4
5
> ?x(3);
result:
3
Array elements can also be accessed and manipulated in sub-matrices. Consider the following:
> x=1:5;
> y=1:5;
> x(2:3)=y(4:5);
> ?x;
result:
1
4
5
4
5
Please note that array dimensions must be at least 2. A one dimensional array of length N will actually have a size
of Nx1, but can still be addressed as shown above.
In 3D simulations, the first 3 dimensions represent x, y, z. The 4th dimension represents either frequency or time.
In 2D simulations, the first 2 dimensions represent x, y. The 3rd dimension represents either frequency or time.
For details on how to get data from monitors into the script environment, please see accessing simulation data 1403 .
We'll consider how we can display results from 3D simulations by extracting a sub-matrix. In this example, we will
consider the data in a z-normal surface monitor called "reflection".
First, we get the data for |E|2, as well as the x, y, z and f (frequency) vectors.
m="reflection";
E2 = getelectric(m);
x = getdata(m,"x");
y = getdata(m,"y");
z = getdata(m,"z");
f = getdata(m,"f");
Next, if we look at the size of E2, we see that it is a 4-dimensional matrix of the following size:
> ?size(E2);
result:
41 41 1 1
This indicates that there are 41 elements for the x axis, 41 elements for the y axis, 1 element for the z axis and 1
frequency point.
We can remove the "singleton" dimensions of z and f if desired using the pinch function
> E2 = pinch(E2);
> ?size(E2);
result:
41 41
In this topic
Creating plots and images 1392
In this topic
Creating plots and images 1392
It's possible to add labels, legends, and multiple data sets, as shown below:
x=1:10;
y=x;
y2=x^2;
plot(x,y,y2,"x","y","Your first plot");
legend("x","x^2");
If you have multiple data sets that are sampled at different points, use the plotxy command.
x1=-5:1:5;
y1=abs(x1);
x2=linspace(-10,10,100);
y2=sin(x2);
plotxy(x1,y1,x2,y2,"x","y");
legend("abs(x1)","sin(x2)");
In this topic
Creating plots and images 1392
A simple image plot of x+y can be created with the following commands:
x=1:100;
y=1:100;
X=meshgridx(x,y);
Y=meshgridy(x,y);
image(x,y,X^2+Y^2);
Often, we want to plot data from monitors. You might do something like this.
m="monitor1";
x=getdata(m,"x");
y=getdata(m,"y");
E2=getelectric(m);
image(x*1e6,y*1e6,E2,"x (um)","y (um)","|E|^2");
Adding objects
Objects can be added to the simulation with commands like addcircle, adddipole, and addmovie. These
commands are equivalent to clicking on the add object buttons. For a complete list of commands, see the Add
object script commands section of the Reference Guide (see link above).
Example: add a sphere.
addsphere;
simulation. To add, delete or modify objects, you must switch back to layout mode with the switchtolayout
command, or by clicking the Switch to layout button.
Selecting objects
The select script command can be used to select objects. This is equivalent to clicking on an object. To select an
object, one sets the groupscope to the correct object container (the default is "::model"). For example, if the
simulation has the following object tree:
You can set and get any object property with script commands.
Note on units!
In the scripting language all units are SI. This means that length is measured in meters, time in seconds,
frequency in Hz. This is why the above script set a value of 500e-9 for 500nm.
For example, let's suppose we want to set the width (x span) of a rectangle structure. In the figure below, we can
see that the desired parameter has the label "x span (microns)". However, in the scripting language units are always
in SI and should be dropped. Therefore, the name we need to use in scripting is "x span".
See also
Script functions - Reference Guide 1383
In the scripting language, we use a series of for loops to create an array of objects.
The script file usr_script_array.lsf will array whatever objects are currently selected. For example, open a
new simulation and add a single sphere. Ensure the sphere is selected (red vertices markers). It should look like
this screenshot.
To create an array of spheres, run usr_script_array.lsf. You should now have an array of spheres, as shown
below.
The array properties can be set in the first lines of the script file, which are shown below
# choose the lattice constants
a1 = 1e-6;
a2 = 2e-6;
a3 = 1e-6;
theta1 = 0; # angle of a1 with x-axis
theta2 = 60; # angle of a2 with x-axis
This script could be modified to add all objects of the array into a group. Grouping objects can make them easier to
manage. See the next section for more information about grouping objects.
Structure groups
See the Structure groups 389 page for information.
Analysis groups
See the Analysis groups 479 page for information.
FDTD Solutions
Use the run script command to run your simulation. This is equivalent to clicking the "Run parallel FDTD" button in
the graphical interface. The following commands will setup and run a very simple example simulation.
newproject;
save("test_simulation");
addcircle;
adddipole;
addfdtd;
run;
MODE Solutions
Eigensolver
Use the findmodes script command to run your simulation. This is equivalent to clicking the "Calculate modes"
button in the Eigensolver analysis window. The following commands will setup and run a very simple example
simulation.
newproject;
save("test_simulation");
addcircle;
adddipole;
addmode;
findmodes;
Propagator
Use the run script command to run your simulation. This is equivalent to clicking the "Run active solver" button in
the graphical interface. The following commands will setup and run a very simple example simulation.
newproject;
save("test_simulation");
addcircle;
adddipole;
addpropagator;
run;
FDTD Solutions
See the files usr_scripting_loop.fsp and usr_scripting_loop.lsf for a simple example that demonstrates how to do a
parameter sweep with the scripting language. In this case, we calculate the response of the system as a function of
the circle's radius.
MODE Solutions
See the files usr_scripting_loop_mode.lms and usr_scripting_loop_mode.lsf for a simple example that demonstrates
how to do a parameter sweep with the scripting language. In this case, we use the eigensolver to calculate the
modal properties of the system as a function of waveguide radius.
See also
Script functions - Reference Guide 1383
It is important to know that most raw monitor data recorded by monitors is stored and returned in 4D matrices. The
first three dimensions of the matrix correspond to the spatial dimensions X, Y, Z. The 4th dimension corresponds to
the frequency or time dimension, depending on the type of monitor. For example, suppose you have a FDTD
Solutions simulation with a frequency monitor in the XY plane that records 20 frequency points. Assuming the
monitor spans 100 mesh points in the x direction and 55 mesh points in the y direction, the size of the Ex field
component data matrix will be 100x55x1x20. Notice that the 3rd dimension (corresponding to Z) has a size of 1,
since the monitor only recorded data at one Z position.
See the following sections for more information on commonly used script commands.
Getresult 1402
Getdata 1403
Other commands 1404
7.1.5.1 getresult
The getresult command allows you to get datasets from simulation objects (see Introduction to dataset variables 1461
for more information on datasets). Obtaining data in the form of datasets is often more convenient than the individual
matrices that can be obtained with the getdata command.
Note that this section only applies to data from simulation objects (primarily monitors). For instructions on how to
get results from a parameter sweep or optimization project, please see getsweepresult 1646 in the Reference Guide.
See also
Script functions - Reference Guide 1383
getresult 1647
Introduction to dataset variables 1461
To see what type of results can be calculated from a monitor, use the ?getresult command with the name of the
monitor as the input:
> ?getresult("profile");
x
y
z
delta_x
delta_y
delta_z
surface_normal
f
.... (more raw data)
E
H
P
T
farfield
This tells you the results (including raw data and calculated results) that can be returned from monitor "profile" when
the simulation is ran.
You can also get any result into the script environment with the command getresult.
For example, suppose you have a d-card from a monitor called "profile", with data E. You can get this data into the
script environment with the command:
E = getresult("profile","E");
E is now a variable in the scripting workspace that represents the dataset result E. Now, if we want to access the
different components of the electric field (Ex, Ey, Ez) from the same monitor, we can simply use the . Operator:
Once the monitor data is stored in script variables, it's possible to do further analysis. If you want to visualize any
result, simply right-click on the result in the Script Workspace and select "Visualize".
7.1.5.2 getdata
The getdata command can be used to obtain raw data from simulation objects (primarily monitors) in matrix form.
This page describes how to check what data is available, and how to get that data into standard script matrices. In
many situations, you may find the getresult 1402 command more convenient than getdata.
Note that getdata is only used to get raw data from simulation objects. To get data from a parameter sweep or
optimization task, use getsweepdata 1645 .
See also
Script functions - Reference Guide 1383
getdata 1646
getdata
After a simulation is run, the simulation data will be stored in the simulation objects.
For example, suppose we run a file with a source called source1, and several monitors: spatial, time_drop, through,
drop, time_through, movie. After running the simulation, ?getdata will output a list of objects with data:
> ?getdata;
local sources:
source1
local monitors:
spatial time_drop through drop time_through movie
After seeing the list of objects with data, you can get a list of data within each object with:
> ?getdata("through");
x y surface_normal f Ez Hx Hy Px Py
power
Finally, you can get the any available data with a command like:
?getdata("through","x");
This will print the result of x to the scripting screen. This is not very useful if x is a large matrix with a large amount
of data. A better approach would be to create a script variable called x and set it equal to the data in the d-card
called x. This can be done with:
x = getdata("through","x");
x is now a variable in the scripting workspace that shows the position of the monitor "through".
Similarly, if we want to obtain the z component of the electromagnetic field (Ez) from the monitor called "spatial", we
can use:
Ez = getdata("spatial","Ez");
Once the monitor data is stored in script variables, it's possible to do further analysis or plot the data. For a a simple
example using the image command, see Image plots 1394 .
See also
Script functions - Reference Guide 1383
transmission 1596
getelectric 1650
getmagnetic 1651
pinch 1483
size 1430
find 1489
transmission
FDTD Solutions and MODE Solutions' Propagator
Transmission results are automatically calculated by frequency domain power and profile monitors, the results are
automatically normalized by the source power. For example, to create a plot of transmission vs wavelength, use:
m="monitor1";
T=getresult(m,"T");
plot(T.lambda,T.T,"lambda (um)","Transmission");
The two methods are equivalent. For details on the transmission calculation, see the function description in the
reference guide.
getelectric
This command simply returns
2 2 2
Ex + E y + Ez
For example, if you have a monitor called "spatial" with electric field data the amplitude of the electric field squared
can be found with:
E2 = getelectric("spatial");
In FDTD Solutions, E2 can be returned as an attribute of the dataset E from monitors. So we can also get the
electric field intensity as follows:
E = getresult("spatial","E");
E2 = E.E2; # electric field intensity
getmagnetic
In FDTD Solutions, H2 can be returned as an attribute of the dataset H from monitors. So we can also get the
magnetic field intensity as follows:
H = getresult("spatial","H");
H2 = H.H2; # electric field intensity
For example, suppose you have a 3D simulation with a power monitor in the XY plane that records 20 frequency
points. The field data will be stored in a 4D matrix, where the dimensions correspond to X,Y,Z,F. If you want to
create an image plot of the fields at a particular frequency, use:
> # get raw data from monitor
> m = "monitor1";
> x = getdata(m,"x");
> y = getdata(m,"y");
> z = getdata(m,"z");
> f = getdata(m,"f");
> Ex = getdata(m,"Ex");
>
> # check size of data
> # these sizes correspond to the lengths of
> # x, y, z, f
> ?size(Ex);
result
84 122 1 20
Associated files
usr_script_loop_over_all_monitors.fsp
See also
Script functions - Reference Guide 1383
getresult 1647
for loop 1523
splitstring 1492
The following code will get the electric field data from each monitors in this simulation file, then save that data in a
series of lumerical data files. To test this example, download the associated simulation file, run the simulation, then
run the following script.
mNames = splitstring(getresult,endl);
for (i=1:length(mNames)) {
if (haveresult(mNames{i},"E")) {
E=getresult(mNames{i},"E"); # get a result from that monitor
} else {
E = mNames{i} + " did not contain the specified data.";
}
savedata(mNames{i},E); # save data to file
}
See also
Script functions - Reference Guide 1383
write 1440
num2str 1490
readdata 1439
Simple export
The example exports a single vector to a text file using the File import and export 1406 commands.
a=linspace(0,2*pi,9);
write("testfile.txt",num2str(a));
Overwrite or append?
By default, the command write will append text files if they already exist. To overwrite text files, you can simply
delete the file if it already exists. For example:
f="testfile.txt";
if (fileexists(f)) { rm(f);} # delete file if it exists
a=linspace(0,2*pi,9);
write(f,num2str(a));
The resulting text file will be named testfile.txt and have the following contents:
a (radians),b
0, 0
0.785398, 0.707107
1.5708, 1
2.35619, 0.707107
3.14159, 1.22465e-016
3.92699, -0.707107
4.71239, -1
5.49779, -0.707107
6.28319, -2.44929e-016
Exporting 2D matrices
The num2str command can convert 1D and 2D matrices directly to string. For example, it is easy to export all of the
data required to make a 2D image plot:
x=1:10;
y=1:11;
Z=randmatrix(10,11);
image(x,y,Z);
write("imageData.txt","x vector");
write("imageData.txt",num2str(x));
write("imageData.txt","y vector");
write("imageData.txt",num2str(y));
write("imageData.txt","Data");
write("imageData.txt",num2str(Z));
Then, the following script will read and display the data:
M=readdata("matrix.txt");
?M;
result:
0 1.2
2.3 4.1
savedata 1439
savedcard 1439
loaddata 1438
This will load any variables that have been saved into the current workspace. Any variables with the same name that
currently exist in the current workspace will be overwritten.
See this link for information using MATLAB and .mat files: Matlab interfaces 1410
See also
tecplotread 1441
Dataset builder 375
filename = 'example_diode_tecplot.dat';
zonename = 'Silicon';
The next few lines read in the information about the finite element grid. Here t is the connectivity matrix and x, y are
the vertex matrices. Notice the coordinate data is converted from units of micron to meter.
t = tecplotread(filename,zonename,'FETriangle');
x = 1e-6*tecplotread(filename,zonename,'X [um]'); # convert to SI from um to m
y = 1e-6*tecplotread(filename,zonename,'Y [um]'); # convert to SI, invert
After reading the data, the code creates unstructured datasets for the doping data and creates geometries and
import doping objects. The same task can be performed using the Dataset builder 375 in DEVICE once the data has
been imported.
7.1.7 MATLAB
Objective
This section describes how MATLABTM can be used together with Lumerical's software. The script integration page
shows how MATLAB commands can be typed directly into the Lumerical script prompt. Alternatively, simulation
data can be exported to .mat files for later processing. The final pages in this section provide additional information
on how to visualize simulation data with MATLAB.
In this topic
Matlab 1410
Script integration 1411
See also
File import and export 1406
matlab 1642
matlabget 1643
matlabload 1642
matlabput 1644
matlabsave 1642
matlabsavelegacy 1642
Advanced visualizations with ParaView 790
In most circumstances, it is best to do your analysis within the Lumerical scripting environment. This allows you to
take advantage of specialized functions such as far field projections, and makes automating parameter sweeps
easy. However, some specialized MATLAB functions are not available in the Lumerical scripting environment. The
best example is data visualization. Lumerical script commands allow you to make line and image plots, but these
options are limited compared to the wide range of MATLAB data visualization functions. The following pages
describe how to use MATLAB together with Lumerical's products.
Setup instructions and system requirements for the MATLAB script integration feature can be found in the online
Knowledge Base. See the Setup and Configuration section of the Installation Guide.
In this topic
Matlab 1410
Script integration 1411
Associated files
usr_matlab.fsp
usr_matlab_optionA.lsf
See also
File import and export 1406
matlab 1642
matlabget 1643
matlabload 1642
matlabput 1644
matlabsave 1642
matlabsavelegacy 1642
Advanced visualizations with ParaView 790
Setup instructions and system requirements for the MATLAB script integration
This page describes how to set up the MATLAB integration features.
Associated Files
environment.plist
See also
Matlab script functions 1411
Configuration 2:
MATLAB must be registered as an automation server on your system before the script integration
feature will work. Registration normally occurs during the MATLAB install process, but occasionally the
registration fails or is lost. In such cases, manual registration is required. Manual registration may also
be required when you have multiple versions of MATLAB installed and would like to register MATLAB for
a desired version, eg, if the MATLAB license of one version is not available. Note, users may need
administration access for these configurations. For more information, please refer to MATLAB
documentation.
To register MATLAB, open a MATLAB session and type the following command:
!matlab /regserver
Note: the ! operator in MATLAB just executes the remainder of the line at the command prompt, so this
is equivalent to running a command like the following from the Command prompt:
C:\Program Files\MATLAB\2009a\bin\win64\matlab /regserver
To test the registration, open Lumerical and use one of the Matlab script integration functions. You can
also test the registration from MATLAB (i.e. without using any Lumerical software) with the following
commands:
h = actxserver('Matlab.Application')
h.Execute('plot(1:10)')
The first command starts a second background instance of MATLAB, very similar to the way our
software starts a MATLAB session. The second command send the plot command from the original
MATLAB session to the new MATLAB session. You should see a simple plot window.
As mentioned above, the MATLAB script integration status is sometimes reported incorrectly. If the
status utility reports 'inactive' after the above configuration, it is still possible that the integration script
functions will work properly. Try a command like the following:
matlab("plot(1:10)");
Configuration 1:
The matlab command must be in the path, so if you type matlab at the command prompt the
MATLAB application will start. This is suggested by the MATLAB installer, but doesnt necessarily
happen. To do this you can either add the folder where you installed MATLAB to your path, or you can
create a symbolic link to the matlab command in another folder that is already in the path (the
MATLAB installer suggests this).
Configuration 2:
Your Lumerical Product must be able to locate the
MATLAB libraries. If they are not in the system
library path, you must manually specify their
location.
1. Open the Matlab integration status window
from the Help menu.
2. Use the select button to manually locate the
MATLAB system libraries.
Configuration 3:
Some versions of MATLAB include newer versions of system libraries than the standard version provided
by the OS. The newer libraries are saved in a private location that only MATLAB can access. This
creates problems for the Matlab script integration, since your Lumerical Product will load the standard
version of the system library, while MATLAB will load it's private version of the same library. This
creates a conflict, which stops the script integration from working.
The easiest way to avoid this is to roll back to an older version of MATLAB, such as MATLAB 2006-
2008a.
Alternatively, you can try to configure your Lumerical Product to work with your current version of
MATLAB. This requires configuring our software to use the newer system libraries provided by
MATLAB, so both products load the same version of the libraries. This can be setup by creating a
simple shell file that configures the library paths. Once this file is created, your Lumerical Product can
be started with a command. For example:
cat /opt/lumerical/fdtd/bin/fdtd-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/fdtd/bin/fdtd-solutions $@
cat /opt/lumerical/mode/bin/mode-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/mode/bin/mode-solutions $@
cat /opt/lumerical/device/bin/device-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/device/bin/device $@
cat /opt/lumerical/interconnect/bin/interconnect-matlab
#!/bin/bash
export LD_LIBRARY_PATH=/opt/MATLAB/R2010b/sys/os/glnxa64/
/opt/lumerical/interconnect/bin/interconnect $@
As mentioned above, the MATLAB script integration status is sometimes reported incorrectly. If the
status utility reports 'inactive' after the above configuration, it is still possible that the integration script
functions will work properly. Try a command like the following:
matlab("plot(1:10)");
Matlab script integration - Mac setup
Configuration 1:
Configuration 2:
It may be necessary to create the following symbolic link to the MATLAB executable.
sudo ln s /Applications/MATLAB_2009b.app/bin/matlab /usr/bin/matlab
Note: The exact command will depend on your MATLAB version and install directory. The above
example command is appropriate for MATLAB 2009B installed in the default location.
As mentioned above, the MATLAB script integration status is sometimes reported incorrectly. If the
status utility reports 'inactive' after the above configuration, it is still possible that the integration script
functions will work properly. Try a command like the following:
matlab("plot(1:10)");
CAUTION: Make sure that you do not delete any values from the existing path as this might affect the
functionality of other programs. The new path can be separated from the existing records by semicolon.
The second step involves telling Matlab where to look for the API before using any related commands.
The Matlab API is located in the Lumerical installation folder. In our example when we use FDTD on
Windows machine this would be typically under the following location:
C:\Program Files\Lumerical\FDTD\api\matlab
One option is to add this path to Matlab every time we want to run our Matlab script by including
command
path(path,'C:\Program Files\Lumerical\FDTD\api\matlab');
The other, possibly more convenient option is to add the path permanently to the startup.m file that is
loaded every time Matlab is launched.
The MATLAB interface functions (matlab, matlabput, matlabget) allow you to work primarily within the
Lumerical script environment, but still have access to the full range of MATLAB functions when they are required.
For information on supported versions of MATLAB, see the matlab script function description in the Reference Guide.
The first time one of these functions is called, it will start a MATLAB session and create a connection between the
two applications. Once the connection is established, it is possible to transfer data from Lumerical to MATLAB
(matlabput), transfer data from MATLAB to Lumerical (matlabget), and run MATLAB commands from the
Lumerical script prompt (matlab).
For example, open usr_matlab.fsp, then run usr_matlab_optionA.lsf. A MATLAB session will be opened
in the background. The MATLAB coutourf function is used to create a contour plot of the electric field intensity,
as shown below. In addition to the contour plot, more advanced text formatting is possible, such as using the Greek
letter Mu on the axis labels.
Note: The ability to load .mat files was introduced in FDTD Solutions 8.6, MODE Solutions 6.5, DEVICE 3.0,
INTERCONNECT 3.0.
In this topic
Matlab 1410
Script integration 1411
Associated files
usr_matlab.fsp
usr_matlab_optionB.lsf
See also
File import and export 1406
matlab 1642
matlabget 1643
matlabload 1642
matlabput 1644
matlabsave 1642
matlabsavelegacy 1642
A data set can be exported from a Lumerical simulation to a MATLAB data file (.mat). MATLAB can then be used
to do any desired analysis. This option is appropriate when all of the analysis can be done with MATLAB and there
is no need for any further interaction with Lumerical. This option is also useful when MATLAB is not installed on the
same computer as your Lumerical products.
For example, open usr_matlab.fsp, then run usr_matlab_optionB.lsf. The script will create a .mat file
that contains the electric field intensity data, plus the associated position vectors. After the script has run, MATLAB
can be used to open the .mat file and do any required analysis.
See also
Matlab 1410
Script integration 1411
mat files 1417
2D plotting 1418
3D plotting 1422
Advanced visualizations with ParaView 790
Plot orientation
MATLAB uses a different convention for plotting 2D matrix data than Lumerical. To get the same figure orientation in
MATLAB as in your Lumerical plots, you must apply an unconjugated transpose operation and adjust the axes, as
shown below.
x = 1:3; load('toPlot.mat');
y = 1:4;
A = [1,2,3,4;5,6,7,8;9,10,11,12]; % transpose matrix, plot data, add color bar
A2 = A.';
matlabsave("toPlot.mat",x,y,A); imagesc(x,y,A2);
image(x,y,A); colorbar;
Non-uniform mesh
The standard image command in MATLAB assumes that matrix data is uniformly sampled, even when you provide
the x,y position vectors. This is not true of the image command in the Lumerical script environment. This is an
important detail when plotting data obtained from a non-uniform mesh.
In the following example, notice that the gaussian profile is not sampled uniformly in the Y direction. To plot this data
in Matlab, you must interpolate the data on a uniform grid, as shown below.
x = linspace(-1.5,0.5,100); load('toPlot.mat');
y = [linspace(-2,0,20); linspace(0.01,1,100)];
X = meshgridx(x,y); % create linearly spaced vectors
Y = meshgridy(x,y); x2 = linspace(min(x),max(x),200);
A = exp(-(1+3*X)^2-(0.5+Y)^2); y2 = linspace(min(y),max(y),200);
% transpose matrix
A3 = A2.';
Alternatively:
load('toPlot.mat');
A2=A.';
pcolor(x,y,A2);
colorbar;
shading interp;
See also
Matlab 1410
Script integration 1411
Plot orientation
MATLAB uses a different convention for plotting matrix data than Lumerical. To get the same figure orientation in
MATLAB as in your Lumerical plots, you will need to define a uniform grid for the spatial vectors, x, y, z. This can be
done in MATLAB or in Lumerical's scripting environment; however, since MATLAB's convention for creating
meshgrids is different from Lumerical's convention, it is a lot easier to do this in Lumerical's scripting environment
before exporting the data to MATLAB. Let us assume we have the fields from a monitor named "monitor" in FDTD
Solutions:
x=getdata("monitor","x");
y=getdata("monitor","y");
z=getdata("monitor","z");
xmesh = meshgrid3dx(x2,y2,z2);
ymesh = meshgrid3dy(x2,y2,z2);
zmesh = meshgrid3dz(x2,y2,z2);
matlabsave("monitor_data",Ex,Ey,Ez,xmesh,ymesh,zmesh);
Plotting
Once the 3d uniform grids have been created, we can either plot them in Lumerical's scripting environment or load
the data file in MATLAB and plot them in MATLAB:
Lumerical script to generate vector plot: MATLAB script to generate same plot:
E = rectilineardataset("E",x2,y2,z2); load('monitor_data.mat');
E.addattribute("E",Ex,Ey,Ez);
vectorplot(E); quiver3(xmesh*1e6,ymesh*1e6,zmesh*1e6,real(Ex),r
xlabel('x');
ylabel('y');
zlabel('z');
7.1.7.5 3D plotting
Objective
This example shows how to save 3D monitor data into a text file. The text file is imported into MATLAB as a matrix
and the scatter3() function is used to visualize the E-field. The resulting plot allows for real-time manipulation
such as rotation.
In this topic
Matlab 1410
Script integration 1411
Associated files
usr_matlab_simple_beam.fsp
usr_script_3d_scatter.lsf
usr_matlab_script_3d_scatter.m
See also
File import and export 1406
matlab 1642
Advanced visualizations with ParaView 790
The MATLAB function scatter3() allows visualization of data, in this case, E-field values, at points in 3D space.
In this example, a single frequency Gaussian beam is focused in free space and the area around the focal point is
imaged. Occlusion is a major problem for such plots, thus, we threshold the number points that are displayed,
focusing only on the volume of interest. In the resulting figure, we can clearly see the focal point of the Gaussian
beam.
First, download and run the simulation usr_matlab_simple_beam.fsp. Since there are no structures, the
simulation should run fairly quickly. Next, run the script usr_script_3d_scatter.lsf. It picks out points over
the specified threshold value and writes them to e_field.txt.
m_name = "monitor2";
thresh = 1.3; # set threshold, fields above this value will be shown
zmon=getdata(m_name,"z");
n=size(xmon);
n=n(1);
Next, open up Matlab and set the working directory to where e_field.txt was saved. Running the following
code, contained within usr_matlab_script_3d_scatter.m will generate the interactive 3D plot seen above.
Note that the axis limits should be set to the same values for a correct spatial representation. The image above is
stretched out in the x and y directions whereas in reality, the beam is spatially more narrow.
% simple matlab script that plots single frequency 3D monitor data
e_field=dlmread('e_field.txt','\t'); % tab delimited
a=e_field(1,:); % x
b=e_field(2,:); % y
c=e_field(3,:); % z
e=e_field(4,:); % e-field value
size=25; % rendering size of plotted points
See also
newwizard (Reference Guide) 1684
Example widget
In this example we will make a widget that will make 4 power monitors in the shape of a square to encase a 2D
simulation. Start by making a new script file and add the following code to it:
#open the new wizard
newwizard(300,200,"Power Box Wizard");
wizardoption("fontsize",12);
wizardoption("fieldwidth",150);
wizardoption("fieldheight",20);
wizardoption("margin",20);
newwizardpage("Go");
wizardwidget("label",endl+"Choose the dimensions in for the Power Box"+endl);
wizardoption("margin",50);
wizardwidget("number","x min (um):");
wizardwidget("number","x max (um):");
wizardwidget("number","y min (um):");
wizardwidget("number","y max (um):");
# get the user set dimensions
out = runwizard;
xmin=wizardgetdata(1)*1e-6;
xmax=wizardgetdata(2)*1e-6;
ymin=wizardgetdata(3)*1e-6;
ymax=wizardgetdata(4)*1e-6;
killwizard;
### break if the user cancelled
if(out==0) {
?"User cancelled";
break;
}
#if the user pressed "Go", add the monitor box
monitors;
addpower;
set("monitor type","Linear X");
set("name","x1");
set("x",(xmax+xmin)/2);
set("y",ymin);
set("x span",xmax-xmin);
copy;
set("name","x2");
set("x",(xmax+xmin)/2);
set("y",ymax);
addpower;
set("name","y1");
set("monitor type","Linear Y");
set("y",(ymax+ymin)/2);
set("x",xmin);
set("y span",ymax-ymin);
copy;
set("name","y2");
set("y",(ymax+ymin)/2);
set("x",xmax);
The code will generate the window shown below. Once the user has entered the dimensions they can then click go
and the power box will be generated. This will work on any simulation and can be easily expanded to work with 3D
simulations as well.
7.2 System
System commands for interacting with the OS file system, running script files, etc.
System commands
Command Description
newproject 1429 Creates a new layout environment.
newmode 1430 Creates a new MODE layout environment.
new 1448 Creates a new simulation project file.
save 1430 Saves an fsp file or lms file.
load 1430 Loads an fsp file or lms file.
del 1431 Deletes a file.
rm 1431
waituntildone 1436 This function only returns after the current simulation is done.
touchstoneload 1445 Loads passive network data from a file containing Touchstone file formatted s-
parameters.
Lookup tables
lookupclose 1443 Closes a file previously created with a lookupopen command.
lookupopen 1443 Opens a file to write a lookup table.
lookupread 1442 Finds the nearest extracted value from a file containing a lookup table of
design and extracted parameters.
lookupwrite 1443 Writes to a lookup table a design and an extracted parameter pair.
lookupreadtable 1444 Returns an interpolated matrix from a file containing a lookup table of design
and extracted parameters.
lookupreadvalue 1444 Finds the value from a file containing a lookup table of design and extracted
parameters.
lookupreadnportsparameter 1444 Returns an interpolated s-parameter cell from a file containing a lookup table of
design and extracted parameters.
lookupappend 1445 Supports direct insertion of a new association into an existing table
insert 1445 Inserts an object into an existing cell
SPICE Netlist
importnetlist 1447 Imports an optical SPICE netlist.
exportnetlist 1447 Export a netlist for the current circuit.
Comma separated value (csv)
exportcsvresults 1447 Exports simulation results to comma separated value formatted files.
Tecplot files
tecplotread 1441 Imports data from tecplot format files.
STL files
readstltriangles 1451 Imports vertex data from an STL file.
Debugging
Command Description
debug 1442 Opens the debug utility window.
See Also
exportfigure 1531 , load 1430 , save 1430
7.2.1 newproject
Create a new simulation project file.
Syntax Description
newproject; Creates a new layout environment.
This function does not return any data.
newproject(option); The options are
1: use default file and material database as template
2: use current file and material database as template
See Also
System level 1426 , new 1448
7.2.2 newmode
Creates a new MODE layout environment.
Syntax Description
newmode; Creates a new layout environment.
This function does not return any data.
newmode(option); The options are
1: use default lms file and material database as template
2: use current lms file and material database as template
3: open a file browser to select and existing lms file as a template
The default option is 1.
See Also
System level 1426
7.2.3 save
Saves an simulation project file. If the simulation has been run, the file will also contain the simulation results.
Syntax Description
save; Open a file browser to save the file.
This function does not return any data.
save(filename); Save with the specified name
See Also
System level 1426 , load 1430 , loaddata 1438 , savedata 1439 , savedcard 1439
7.2.4 load
Loads an simulation project file. If the simulation has been run, the file will also contain the simulation results.
Syntax Description
load(filename); Loads the simulation file.
This function does not return any data.
See Also
System level 1426 , loaddata 1438 , save 1430 , savedata 1439 , savedcard 1439 , fileexists 1433 , dir 1431
7.2.5 del
Delete a file.
Syntax Description
del("filename"); Deletes the file "filename".
rm("filename"); This function does not return any data.
See Also
System level 1426 , delete 1563
7.2.6 rm
Delete a file.
Syntax Description
del("filename"); Deletes the file "filename".
rm("filename"); This function does not return any data.
See Also
System level 1426 , delete 1563
7.2.7 dir
List files in a directory.
Syntax Description
out = dir; The output is a string.
out = ls; Use ?dir; to write the value to the screen.
out = dir("directory"); Lists the files in the specified directory.
out = ls("directory");
See Also
System level 1426 , load 1430 , splitstring 1492
7.2.8 ls
List files in a directory.
Syntax Description
out = dir; The output is a string.
out = ls; Use ?dir; to write the value to the screen.
out = dir("directory"); Lists the files in the specified directory.
out = ls("directory");
See Also
System level 1426 , load 1430 , splitstring 1492
7.2.9 cd
Change directory.
Syntax Description
cd; Opens a window to browse to a directory.
This function does not return any data.
cd("directory"); Changes the working directory to "directory". Whenever you open an
fsp file or run a script file, it will set the working directory to the
directory of the file opened.
See Also
System level 1426
7.2.10 pwd
Returns the current working directory.
Syntax Description
out = pwd; Returns the current working directory as a string.
See Also
System level 1426 , currentfilename 1434
7.2.11 cp
Copy a file.
Syntax Description
cp("file1","file2"); Makes a copy of file1 called file2.
This function does not return any data.
cp("path1\file1","path2\file2"); Copies file1 in path1 to file2 in path2.
See Also
System level 1426 , mv 1432 , pwd 1432 , copy (objects) 1566
7.2.12 mv
Move a file.
Syntax Description
See Also
System level 1426 , cp 1432 , pwd 1432
7.2.13 exit
Exit the application.
Syntax Description
exit; Exits the application. Same as exit(1);
This function does not return any data.
exit(option); Exits the application. The option can be
1: Prompt user if a file needs saving before exiting.
2: Force the application to exit without prompting the user.
The default option is 1.
See Also
System level 1426
7.2.14 system
The system command allows you to have the operating system (OS) execute a command, rather than the Lumerical
script interpreter.
Syntax Description
system("command"); Run "command" at the OS command prompt.
See Also
System level 1426 , readdata 1439 , exit 1433 ," 1473 , currentfilename 1434
7.2.15 fileexists
Check if a file exists. The file extension must be specified. By default, the entire path will be searched.
Syntax Description
out = fileexists("filename"); Returns 1 if the file exists
Returns 0 if the file does not exist.
out = fileexists("c:\temp\file.txt"); Search for a file not in the path
See Also
System level 1426 , getpath 1436 , which 1437 , pwd 1432 , load 1430 , loaddata 1438 , write 1440 , readdata 1439 , currentfilename 1434 ,
rm 1431 ,
7.2.16 currentfilename
Get the current filename and directory.
Syntax Description
out = currentfilename; Returns the current filename as a string.
If the current filename is not defined, this function returns an empty
string "".
See Also
System level 1426 , fileexists 1433 , getpath 1436 , which 1437 , pwd 1432 , fileextension 1434 , filebasename 1434 , filedirectory 1434
7.2.17 filebasename
Get the file basename from a string.
Syntax Description
out = filebasename( "location/ Returns the file basename as a string.
filename.ext" );
See Also
System level 1426 , currentfilename 1434 , getpath 1436 , which 1437 , pwd 1432
7.2.18 fileextension
Get the file extension from a string.
Syntax Description
out = fileextension( "name.ext"); Returns the file extension as a string.
See Also
System level 1426 , currentfilename 1434 , getpath 1436 , which 1437 , pwd 1432
7.2.19 filedirectory
Get the file directory from a string.
Syntax Description
out = filedirectory( "location/ Returns the file directory as a string.
filename.ext" );
See Also
System level 1426 , currentfilename 1434 , getpath 1436 , which 1437 , pwd 1432
7.2.20 getcommands
Returns the list of available script commands in the current script workspace.
Syntax Description
?getcommands; Returns a list of available script commands
See Also
System level 1426
It's best to avoid using the names of Lumerical script functions (i.e. plot) for the names of your script files. If a
script file has the same name as a function, the script will be run (not the function). This allows you to effectively re-
define the behavior of a function, but it can cause confusion when done unintentionally.
Syntax Description
filename; Run the script file filename.lsf, if it exists in the current path.
A script does not have a return type.
See Also
System level 1426 , getpath 1436 , addpath 1436 , which 1437 , feval 1491
7.2.22 runinitialize
This script command initializes a step by step simulation.
Syntax Description
runinitialize; Initialize a step by step simulation, different from run the simulation is
only initialized. This command should be used in combination with
runstep and runfinalize, and it is typically used for co-simulations.
See Also
System level 1426 , runstep 1435 , runfinalize 1436 , waituntildone 1436
7.2.23 runstep
This script command runs a single simulation step.
Syntax Description
runstep; Runs a single simulation step. This command should be used in
See Also
System level 1426 , runinitialize 1435 , runfinalize 1436 , waituntildone 1436
7.2.24 runfinalize
This script command finalizes a step by step simulation.
Syntax Description
runfinalize; Finalizes a step by step simulation. This command should be used in
combination with runinitialize and runstep, and it is typically used for
co-simulations.
See Also
System level 1426 , runinitialize 1435 , runstep 1435 , waituntildone 1436
7.2.25 waituntildone
This function only returns after the current simulation is done.
Syntax Description
waituntildone; This function only returns after the current simulation is done. It allows
to wait for the simulation before performing any other tasks that
depends on simulation completion.
See Also
System level 1426 , runinitialize 1435 , runstep 1435 , runfinalize 1436
7.2.26 getpath
Get the current path. By default, the current working directory and the script sub-directory of the installation (eg. C:
\Program Files\Lumerical\FDTD\scripts) are in the path.
Syntax Description
out = getpath; Returns the current path as a string.
Use ?getpath; to print it to the screen.
See Also
System level 1426 , addpath 1436 , clearpath 1437 , which 1437 , pwd 1432
7.2.27 addpath
Add a directory to the path.
Syntax Description
addpath("directory"); Adds a directory to the path.
This function does not return any data.
See Also
System level 1426 , getpath 1436 , which 1437 , pwd 1432 , clearpath 1437
7.2.28 clearpath
Removes all directories from the script path, except "./".
Syntax Description
clearpath("directory"); Remove"directory" from the script path if it is there.
See Also
System level 1426 , getpath 1436 , which 1437 , pwd 1432 , addpath 1436
7.2.29 which
Returns the full file pathname for the specified file.
This function can be helpful when you have added several directories to the Lumerical path variable and you want to
check which files are being accessed.
Syntax Description
out = which("filename"); Returns the pathname of the file "filename" as a string.
Use ?which("filename"); to display the result to the screen.
See Also
System level 1426 , getpath 1436 , addpath 1436 , pwd 1432 , currentfilename 1434 , fileexists 1433
7.2.30 pause
Pause program for a time.
Hit the space bar to force the script to continue. Hit the ESCAPE key to break the script at this point.
Syntax Description
pause(time); Pauses script for time, measured in seconds.
This function does not return any data.
See Also
System level 1426 , break 1438 , ESCAPE key 1438
7.2.31 break
Stops a script from executing.
Syntax Description
break; Will stop a script file from executing at that line. A warning will be
generated.
This function does not return any data.
See Also
System level 1426 , ESCAPE key 1438 , pause 1437
Syntax Description
ESCAPE key To interrupt a script file from running or a long block of commands from
executing. A warning will be generated. Sometimes you may need to
press escape several times, or hold it down to interrupt the script.
See Also
System level 1426 , break 1438 , pause 1437
7.2.33 format
The two format commands toggle the script interpreter between 2 output precision states. The commands print (?)
and num2str() use this state to determine how many digits of precision to output.
Syntax Description
format long; Set script interpreter to 16 digits of precision.
format short; Set script interpreter to 6 digits of precision.
See Also
System level 1426 , num2str 1490 ,? 1474
7.2.34 loaddata
Loads workspace variables or d-card data from a Lumerical data file (ldf) file. If any current variables exist with the
same names as those in the file, the current values will be overwritten.
Syntax Description
loaddata("filename"); Reads data script variables or d-card data from the specified file.
This function does not return any data.
See Also
System level 1426 , savedata 1439 , savedcard 1439 , workspace 1457 , load 1430 , fileexists 1433
7.2.35 savedata
Saves workspace variables to a Lumerical data file (ldf) file. To save monitor (D-card) data to an ldf file, see the
savedcard function.
Syntax Description
savedata("filename"); Saves all current variables to the specified file.
This function does not return any data.
savedata("filename", var1, Saves only variables with the specified names to file.
var2,...);
See Also
System level 1426 , savedcard 1439 , loaddata 1438 , workspace 1457 , matlabsave 1642
7.2.36 savedcard
Saves d-card data to a Lumerical data file (ldf) file. D-cards are generally used to store monitor data.
Data is saved in the nonorm state. See the units and normalization 116 section of the reference guide for more
information.
Syntax Description
savedcard("filename"); Saves all current d-cards (local and global) to the specified ldf file.
This function does not return any data.
savedcard("filename", "name1", Saves only the d-cards with the specified names, "name1", "name2",
"name2",...); etc.
See Also
System level 1426 , copydcard 1649 , savedata 1439 , loaddata 1438 , matlabsave 1642
7.2.37 readdata
You can import numerical values stored in text files with the readdata command. This command will read a file with
data in a row/column format. The data must be correctly formatted so each row has the same number of columns.
Readdata will ignore any line that begins with a letter.
Syntax Description
M=readdata("filename.txt"); Will load the text file filename into matrix variable M. Any lines starting
with a letter are ignored.
See Also
System level 1426 , rm 1431 , write 1440 , str2num 1490 , findstring 1491 , replace 1492 , replacestring 1492 , substring 1491 , fileexists
1433
7.2.38 write
Writes string variables to text files or to standard output.
Typically the write command is used to output data to a text file. If the specified file does not exist, it will be
created. If it does exist, then the output string will be appended to the end of the file. The write command will
automatically add a new line character at the end of the string.
On Linux systems only, the write command will output to the standard output (stdout) if a filename is not specified.
Syntax Description
write(my_string); Write my_string to the standard output (linux only).
write("testfile.txt", my_string); Will write the contents of the string variable my_string to testfile.txt.
This function does not return any data.
See Also
System level 1426 , savedata 1439 , readdata 1439 , rm 1431 , num2str 1490 ,? 1474 , endl 1474 , format 1438 , fileexists 1433 , matlabsave
1642
7.2.39 asapexport
Exports the desired monitor to a file for interfacing with BRO's ASAP. These files are called fld files. The monitor
must be a frequency power or a frequency profile monitor.
Syntax Description
asapexport( "monitorname"); Export data from monitorname. By default, the first frequency point is
exported.
This function does not return any data.
asapexport( "monitorname", f); Exports the frequency point specified by the index f.
asapexport( "monitorname", f, Exports to the specified "filename" without opening a file browser
"filename"); window.
See Also
System level 1426 , asapload 1440 , asapimport 1441 , addimportedsource 1546
7.2.40 asapload
Load data from an fld file from BRO's ASAP. asapload creates a d-card structure called "fld_data" which contains all
the data in the file. If "fld_data" exists, it will be called "fld_data_2". After loading an asapfile with asapload, you can
extract any desired data., which can be
Ex, Ey, Ez, Hx, Hy, Hz, x, y, z
power, frequency, wavelength, index
Syntax Description
asapload; Select the file to load with the file browser.
This function does not return any data.
asapload( "filename"); Loads data from an fld file called "filename" without a file browser.
See Also
System level 1426 , asapexport 1440 , asapimport 1441 , addimportedsource 1546 , fileexists 1433
7.2.41 asapimport
Import an ASAP fld file into an ASAP source. This is equivalent to editing the properties of the Import source, and
clicking on the Import Source button.
Syntax Description
asapimport( "sourcename"); Imports the fld file into the sourcename source. A file browser will
open to select the file.
This function does not return any data.
asapimport( "sourcename", Specify the file to open.
"filename");
See Also
System level 1426 , asapexport 1440 , asapload 1440 , addimportedsource 1546 , fileexists 1433
7.2.42 tecplotread
Import data from Tecplot formatted file (text).
Syntax Description
? tecplotread('filename.dat'); List all zones ( domains) in the data file.
? List all of the data fields associated with the zone.
tecplotread('filename.dat','zonen
ame');
out = Retrieve the data as an array
tecplotread('filename.dat','zonen
ame','dataname');
See Also
system 1433 , matlabload 1642 , h5read 1683
7.2.43 copytoclipboard
Copies the selected objects into the system clipboard. Equivalent to 'Ctrl-C'.
Syntax Description
copytoclipboard Copies selected objects to the system clipboard
See Also
System level 1426 , pastefromclipboard 1442 , copy 1566
7.2.44 pastefromclipboard
Paste the contents of the system clipboard into the layout environment. Equivalent to 'Ctrl-V'.
Syntax Description
pastefromclipboard Paste contents of system clipboard
See Also
System level 1426 , copytoclipboard 1441 , copy 1566
7.2.45 debug
Opens the debug utility window.
Syntax Description
debug; Opens the debug utility window.
See Also
System level 1426
7.2.46 vtksave
The script command vtksave saves a Lumerical dataset into the VTK format. The command only saves rectilinear
and unstructured datasets. The filename will have .vtr appended for rectilinear dataset, .vtu appended for
unstructured dataset. The freely available data visualization program Paraview can then be used to create
sophisticated plots of your data.
Syntax Description
vtksave(filename, dataset); Save the dataset in vtk file of the name specified.
See Also
System level 1426 , datasets 1461 , rectilineardataset 1459 , matlabsave 1642 , data visualization with ParaView 790
7.2.47 lookupread
Finds the nearest extracted value from a file containing a lookup table of design and extracted parameters.
Syntax Description
out = lookupread Finds the nearest extracted value from a file containing a lookup table
(filename,table,design,extracted); of design and extracted parameters. Parameter table is the name of
the lookup table located inside the file, design is a cell containing
multiple structures that define the design parameters to search, and
extracted is the name of the parameter to be extracted. It will return
the value located at the nearest design parameters.
out = lookupread (filename); Returns a script object, in this case a cell array containing all the
7.2.48 lookupopen
Opens a file to write a lookup table.
Syntax Description
lookupopen (filename,table); Opens a file to write a lookup table. This command is required before
any calls to lookupwrite can be made.
See Also
System level 1426 , lookupclose 1443 , lookupread 1442 , lookupwrite 1443 , lookupreadtable 1444 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445
7.2.49 lookupclose
Closes a file previously created with a lookupopen command.
Syntax Description
lookupclose (filename); Closes a file previously created with a lookupopen command. This
command is required in order to close any file open by lookupopen.
See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupreadtable 1444 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445
7.2.50 lookupwrite
Writes to a lookup table a design and an extracted parameter pair.
Syntax Description
out = lookupwrite Writes to a lookup table a design and an extracted parameter pair. The
(filename,table,design, extracted); design and extracted parameters are cells that contain multiple
structures, allowing for mapping between multiple design and extracted
parameters. This function can be called multiple times, for each call
the design and extracted parameters will be appended to the current
file. This function must be called after lookupopen and before
lookupclose.
out = lookupwrite (filename); Takes a script object, in this case a cell array containing all the
contents of the xml file, and save it to a file.
See Also
System level 1426 , lookupclose 1443 , lookupopen 1443 , lookupread 1442 , lookupreadtable 1444 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445
7.2.51 lookupreadtable
Returns an interpolated matrix from a file containing a lookup table of design and extracted parameters.
Syntax Description
out = lookupreadtable Returns an interpolated matrix from a file containing a lookup table of
(filename,table,design,extracted); design and extracted parameters. Parameter table is the name of the
lookup table located inside the file, design is a cell containing multiple
structures that define the design parameters to search, and extracted
is the name of the parameter to be extracted. It will return a matrix that
contains multiple columns. The first column is the independent
variable. e.g. frequency dependent transmission values.
See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadvalue 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445
7.2.52 lookupreadvalue
Finds the value from a file containing a lookup table of design and extracted parameters.
Syntax Description
out = lookupreadvalue Find the value from a file containing a lookup table of design and
(filename,table,design,extracted); extracted parameters. Parameter table is the name of the lookup table
located inside the file, design is a cell containing multiple structures
that define the design parameters to search, and extracted is the name
of the parameter to be extracted. It will return the value is interpolated
at the design parameters.
See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadnportsparameter 1444 , lookupappend 1445 , insert 1445
7.2.53 lookupreadnportsparameter
Returns an interpolated s-parameter cell from a file containing a lookup table of design and extracted parameters.
Syntax Description
out = lookupreadnportsparameter Returns an interpolated s-parameter cell from a file containing a lookup
(filename,table,design,extracted); table of design and extracted parameters. Parameter table is the name
of the lookup table located inside the file, design is a cell containing
multiple structures that define the design parameters to search, and
extracted is the name of the parameter to be extracted. S-parameter
file format must be compatible with the Optical N Port S-Parameter.
See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadvalue 1444 , lookupappend 1445 , insert 1445
7.2.54 lookupappend
This script function supports direct insertion of a new association into an existing table.
Syntax Description
lookupappend( filename, table, Inserts a new association into an existing lookup table.
design, extracted );
See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadvalue 1444 , lookupreadnportsparameter 1444 , insert 1445
7.2.55 insert
This scriptcommand inserts an object into an existing cell.
Syntax Description
out{1}.association = Inserts an object into an existing cell.
insert( out{1}.association,
association, cell number );
See Also
System level 1426 , lookupopen 1443 , lookupread 1442 , lookupwrite 1443 , lookupclose 1443 , lookupreadtable 1444 ,
lookupreadvalue 1444 , lookupreadnportsparameter 1444 , lookupappend 1445
7.2.56 touchstoneload
Loads passive network data from a file containing Touchstone file formatted s-parameters. For more information
about the Touchstone specification refer to http://www.vhdl.org/pub/ibis/connector/touchstone_spec11.pdf.
Syntax Description
out = touchstoneload (filename); It returns a matrix where the first column contains the frequency
values in Hz. S-parameters are returned using MA format, where M
is the magnitude and A is the angle in radians.
See Also
System level 1426
7.2.57 hide
Hides the graphical user interface, can be used with the show 1445 command.
Syntax Description
hide; hides the GUI.
See Also
System level 1426 , show 1445
7.2.58 show
Shows the graphical user interface, can be used with the hide 1445 command.
Syntax Description
show; shows the GUI.
See Also
System level 1426 , hide 1445
7.2.59 clearlogwindow
Clears the log output log window.
Syntax Description
clearlogwindow; clears output log window.
See Also
System level 1426
7.2.60 version
Returns the current version of the application.
Syntax Description
out = version; Returns the version of the application.
See Also
System level 1426 , versionfile 1446
7.2.61 versionfile
Returns the current version of the file loaded by the application.
Syntax Description
out = versionfile; Returns the version of the file loaded by the application.
See Also
System level 1426 , version 1446
7.2.62 importnetlist
This script command can import an optical SPICE netlist.
Syntax Description
importnetlist("filename"); imports an optical SPICE netlist.
See Also
System level 1426 , exportnetlist 1447
7.2.63 exportnetlist
Export a netlist for the current circuit.
Syntax Description
exportnetlist; Export a netlist for the current circuit. filename is the output
exportnetlist (filename); netlist name, element is the compound element to be exported. If
exportnetlist overwrite is true, any existing netlist file with the same name as
(element,filename,overwrite=true); filename will be overwritten. If element is not provided, the
currently selected compound element will be exported, otherwise
the root element will be exported.
See Also
System level 1426 , importnetlist 1447
7.2.64 exportcsvresults
This script command can export the results of a simulation to comma separated value formatted files, which can be
opened by Microsoft Excel.
Syntax Description
exportcsvresults("filename") exports the results of the entire simulation to multiple .cvs files,
named filename_elementname.csv
exportcsvresults("filename", exports the results of the specified element to a .cvs file, named
"elementname") filename_elementname.csv
See Also
System level 1426
7.2.65 new
Create a new simulation project file.
Syntax Description
new; Creates a new layout environment.
See Also
System level 1426 , newproject 1429
7.2.66 exist
Returns a number based on type of the string used in the command.
Syntax Description
exist("x") Returns
0 if there is no variable, operator, built-in function or script file (x.lsf) in
the current script path
1 if x is a variable, example: x=5; ?exist(x);
2 if x is an operator or built in keyword, example: ?exist(*) or ?
exist(for);
3 if x is a script file in the current script path, called x.lsf
See Also
System level 1426 , newproject 1429
7.2.67 exporthtml
Generates an html file describing an element.
Syntax Description
exporthtml (element_name) Generates an html file describing an element. The file lists the element
type, symbol, and the list of properties.
See Also
System level 1426 , newproject 1429
7.2.68 help
Opens the Lumerical knowledge base using the default web browser.
Syntax Description
help(argument=); Opens the Lumerical knowledge base using the default web
browser. If no arguments are provided the web browser will open
the page with the alphabetical list of all script commands,
otherwise it will run a search using the argument parameter and
open the page with the search results for the argument
parameter.
See Also
System level 1426
7.2.69 logmessage
This function sends messages from scripted elements to the INTERCONNECT output window.
Syntax Description
logmessage; This function sendS messages from scripted elements to the
INTERCONNECT output window. It is specially useful to debug
scripted elements.
See Also
System level 1426
7.2.70 refresh
This command reloads the current project.
Syntax Description
refresh; Reloads the current project. This is particularly useful when
changing the library property of a reference element. Reference
elements must be manually refreshed or reloaded if the library
property is modified otherwise the use will have to save and
reload the current project.
See Also
System level 1426
7.2.71 operatingsystem
Returns the current operating system.
Syntax Description
operatingsystem; Returns the current operating system. Valid return values are
windows, apple or linux.
See Also
System level 1426
7.2.72 fileexpand
Expands a file name by replacing any environmental variables.
Syntax Description
fileexpand(filename); Expands a file name by replacing any environmental variables (defined
by setsetting).
See Also
System level 1426 , setsetting 1633
7.2.73 autosaveon
This command turns on the feature to automatically save the current project before running a simulation.
Syntax Description
autosaveon; Automatically saves current project before running a simulation.
See Also
System level 1426 , autosaveoff 1450
7.2.74 read
This command reads data from s text file as a string.
Syntax Description
read(filename, size); Read a text file as a string for the user defined size 'size'. The default
value for size is 1e+6, if not specified.
See Also
System level 1426
7.2.75 autosaveoff
This command turns off the feature to automatically save the current project before running a simulation.
Syntax Description
autosaveoff; The project will not be saved automatically before running a simulation
(default).
See Also
System level 1426 , autosaveon 1450
7.2.76 encryptscript
Save a copy of the specified script file in an encrypted format. The new file will have a .lsfx file extension. Encrypting
a script allows a script to be shared with others, without allowing them to see the contents of the script.
Syntax Description
encryptscript("filename.lsf"); Encrypt a copy of the script. The new file will be named "filename.lsfx".
encryptscript("filename.lsf", Specify an alternate file name.
"new_filename");
See Also
System level 1426
7.2.77 readstltriangles
Import a matrix of vertex positions from an STL file.
Syntax Description
out=stlimport("filename",scaling_fa Returns a Mx3 matrix with vertices from all STL triangles from the
ctor); specified STL file.
Scaling_factor - A STL file does not contain unit data. To import data in
units of microns, set this value to 1e-6. For nanometers, set this value
to 1e-9.
See Also
System level 1426 , stlimport 1554
7.2.78 setconnectionrouting
This command sets the connection routing for a given connection.
Syntax Description
setconnectionrouting (element, This command sets the connection routing for a given connection.
port, type);
setconnectionrouting (element, If only the element and the type are provided, all connections to the
type); element port will have the same type.
If element name, port and type are provided, only the specific element
port connection will be affected.
See Also
7.2.79 findproperty
This command returns a cell containing all elements in the circuit that have a certain property.
Syntax Description
findproperty (property, recursive); Returns a cell containing all elements in the circuit that have property
property. If recursive is true, it will return a flat list (hierarchical) with
all the elements in the current scope. The default value for recursive is
false.
See Also
System level 1426 , findpropertyvalue 1452
7.2.80 findpropertyvalue
This command returns a cell containing all elements in the circuit that have a certain property with a certain value.
Syntax Description
findpropertyvalue (property, value, Returns a cell containing all elements in the circuit that have property
recursive); property with value value, if recursive is true, it will return a flat list
(hierarchical) with all the elements in the current scope. The default
value for recursive is false.
See Also
System level 1426 , findproperty 1452
Command Description
= 1453 Assignment operator.
: 1454 Array operator.
[] 1454 Create matrix.
% 1454 Create variable with space in the name
linspace 1454 Creates a linear spaced array.
matrix 1455 Creates a matrix filled with zeros.
randmatrix 1455 Creates a matrix with all elements randomly set between 0 and 1
randnmatrix 1455 Creates a matrix with all elements randomly distributed with mean 0 and
standard distribution 1.
histogram 1455 Create a matrix containing the histogram count of a yield analysis result.
meshgridx 1456 Create a 2D meshgrid in x direction.
meshgridy 1456 Create a 2D meshgrid in y direction.
meshgrid3dx 1456 Create a 3D meshgrid in x direction.
The following commands are used to create, access and manipulate datasets. For an introduction to datasets, see
the dataset introduction 1461 page.
Command Description
rectilineardataset 1459 Creates an empty rectilinear dataset associated with the coordinates x/y/z.
matrixdataset 1459 Creates an empty matrix dataset.
unstructureddataset 1466 Creates an empty unstructured dataset associated with the coordinates x/y/z
and the connectivity matrix
addparameter 1460 Adds a parameter to an existing dataset.
addattribute 1460 Adds an attribute to an existing dataset.
getresult 1647 Gets the dataset results from a monitor or analyzer.
getparameter 1460 Get a parameter from an existing dataset.
getattribute 1461 Get an attribute from an existing dataset.
7.3.1 =
Assignment operators.
Syntax Description
x = 5+2i; Assign a value to a variable.
See Also
Manipulating variables 1452 , == 1469
7.3.2 :
Array operator.
Syntax Description
x = 2 : 10; x will be an array of numbers that start at 2 and increase by 1 for each
consecutive number. The last entry will be <= 10. x will equal
2,3,...,9,10.
x = 6 : -1.5 : 2; x will be the array were the first element is 6, and consecutive
elements decrease by 1.5. All elements will be >=2. In this example,
the array will be [6, 4.5, 3].
See Also
Manipulating variables 1452 , linspace 1454
7.3.3 []
Specify matrix element by element.
Command Description
x = [u11,...,u1N; u21,...,u2N; Create an N by M matrix. Columns are separated with semicolons. Elements
uM1,...,uMN] in a row are separated with commas. The entries can either be scalars or
matrices of compatible dimension.
See Also
Manipulating variables 1452 , linspace 1454 , matrix 1455 , Accessing and assigning matrix elements 1458
7.3.4 %
Used to create variables with spaced in the names.
Command Description
%variable with space% To create a variable name that contains spaces, such as "variable with
space", put a percentage sign before and after the variable name.
See Also
Manipulating variables 1452
7.3.5 linspace
Creates a linearly spaced array.
Syntax Description
x = linspace(min,max,num); x will be an array with num elements, linearly spaced between min and
max. If num is set to 1, then x will be the average of min and max.
See Also
Manipulating variables 1452 ,: 1454 , [] 1454
7.3.6 matrix
Initialize a matrix. All elements are set to zero.
Syntax Description
x = matrix(i,j,k,....); Initializes an i x j x k x .... matrix.
See Also
Manipulating variables 1452 , linspace 1454 , [] 1454
7.3.7 randmatrix
Initialize a matrix. All elements are random numbers between 0 and 1.
Syntax Description
x = randmatrix(i,j,k,....); Initializes an i x j x k x .... matrix. The elements are all random
numbers between 0 and 1.
See Also
Manipulating variables 1452 , matrix 1455 , rand 1502 , randreset 1503
7.3.8 randnmatrix
Initialize a matrix. All elements are normally distributed random numbers with mean 0 and standard distribution 1.
Syntax Description
x = randnmatrix(i,j,k,....); Initializes an i x j x k x .... matrix. The elements are all random
normally distributed numbers with mean 0 and standard deviation 1.
See Also
Manipulating variables 1452 , matrix 1455 , randn 1503 , randreset 1503
7.3.9 histogram
Create a matrix containing the histogram count of a yield analysis result.
Syntax Description
out = histogram(y); Returns a matrix containing the histogram count of y.
out = histogram(y,n); Returns a matrix containing the histogram count of y, using n bins.
out = histogram(y,n,barplot); Returns a matrix containing the histogram count of y, using n bins. If
barplot is true (1), the histogram count is formatted for a bar plot.
See Also
Manipulating variables 1452 , histc 1528
7.3.10 meshgridx
Create a 2D meshgrid in the x direction
Syntax Description
out = meshgridx(x,y); If x and y are single column (or single row vectors), of dimension nX1
and mX1 respectively, the command
X = meshgridx(x,y);
Will create a 2D matrix of dimension nXm where X(i,j)=x(i).
See Also
Manipulating variables 1452 , image 1529 , meshgridy 1456 , meshgrid3dx 1456
7.3.11 meshgridy
Create a 2D meshgrid in the y direction
Syntax Description
out = meshgridy(x,y); If x and y are single column (or single row vectors), of dimension nX1
and mX1 respectively, the command
Y = meshgridy(x,y);
Will create a 2D matrix of dimension nXm where Y(i,j)=y(j).
See Also
Manipulating variables 1452 , image 1529 , meshgridx 1456 , meshgrid3dx 1456
7.3.12 meshgrid3dx
Create a 3D meshgrid in the x direction
Syntax Description
out = meshgrid3dx(x,y,z); The 3D version of meshgridx and meshgridy.
See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dy 1456 , meshgrid3dz 1457
7.3.13 meshgrid3dy
Create a 3D meshgrid in the y direction
Syntax Description
out = meshgrid3dy(x,y,z); The 3D version of meshgridx and meshgridy.
See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dx 1456 , meshgrid3dz 1457
7.3.14 meshgrid3dz
Create a 3D meshgrid in the z direction
Syntax Description
out = meshgrid3dz(x,y,z); The 3D version of meshgridx and meshgridy.
See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dx 1456 , meshgrid3dy 1456
7.3.15 meshgrid4d
Create a 4D meshgrid in any direction.
Syntax Description
out = meshgrid4d(dim, x1, x2, x3, The 4D meshgrid function.
x4); dim specifies the dimension along which to create the grid
x1,x2,x3,x4 are the position vectors in each direction
See Also
Manipulating variables 1452 , meshgridx 1456 , meshgridy 1456 , meshgrid3dy 1456 , meshgrid3dz 1457
7.3.16 clear
Clears all stored workspace variables. This will not clear any simulation data stored in d-cards. The variables c, pi,
eps0, mu0 will be reset to their default values.
Syntax Description
clear; Clears all workspace variables.
This function does not return any data.
See Also
Manipulating variables 1452 , cleardcard 1650
7.3.17 workspace
Returns a list of all the currently defined variables in the scripting workspace.
Syntax Description
out = workspace; Returns a string that lists all currently defined variables in the
workspace.
Use ?workspace; to print this to the screen.
See Also
Manipulating variables 1452
Command Description
x = [u; v; w] Create a column vector. u,v,w can either be scalars or matrices of compatible
dimension.
x = [u, v, w] Create a row vector. u,v,w can either be scalars or matrices of compatible
dimension.
x(7) = 5; Set the 7th element of x to 5.
x(7) = y(2); Set the 7th element of x to the 2nd element of y.
x(3,1,8) = 3; Set an element of a multidimensional matrix to 3.
x(2:5,1) = 1:4; Set a sub-matrix of x to values 1:4. In the assignment A(I,...) = B, if B is not a
scalar, the sub-matrix A(I,...) must be the same same size as B. If B is a
scalar, then all the values of the sub-matrix are set to B.
x(2:5,1) = 1; Set all the values in a sub-matrix of x to 1.
x = y(1:10,2,1:20); x is equal to a sub-matrix of y.
x = matrix(2,3); Multi-dimension matrices can be accessed with a single index.
x(4)=7;
x=y(z); Indices stored in matrix (z) used to select elements of matrix y. length(x) will
equal length(z).
See Also
Manipulating variables 1452
See Also
Manipulating variables 1452
Name Description
pi The number p.
c The speed of light in a vacuum in m/s.
eps0 The permittivity of free space in SI units.
mu0 The permeability of free space in SI units.
h The Planck constant.
hbar The reduced Planck constant.
true Logical TRUE (1).
false Logical FALSE (0);
e The electron volt.
See Also
Manipulating variables 1452
7.3.21 matrixdataset
Creates an empty matrix dataset. Matrix datasets are used for data (attributes and parameters) that don't have any
spatial dependence (i.e. Reflection vs frequency). For datasets that do have x/y/z spatial coordinates (i.e. electric
fields), use rectilineardataset 1459 .
Matrix datasets can be parameterized, and can contain an arbitrary number of attributes (see addattribute) 1460 and
parameters (see addparameter) 1460 .
Syntax Description
matrixdataset; Creates an empty dataset.
matrixdataset("name"); Creates an empty dataset with the name "name".
See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465
7.3.22 rectilineardataset
Creates an empty rectilinear dataset that is associate with the x/y/z coordinates (ex. E and H fields). Like matrix
datasets, rectilinear datasets can be parameterized, and can contain an arbitrary number of attributes (see
addattribute) 1460 and parameters (see addparameter) 1460 .
Syntax Description
rectilineardataset(x,y,z); Creates a empty rectilinear dataset associated with the coordinates x/
y/z.
rectilineardataset("dataset_name", Creates a empty rectilinear dataset named "dataset_name" associated
x,y,z); with the coordinates x/y/z.
See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465
7.3.23 addparameter
Adds a parameter to an existing dataset.
Syntax Description
R.addparameter("p_name", p); Adds the parameter p to the existing dataset R.
R.addparameter("p1_name", p1, Adds the interdependent parameter p1_name, p2_name to the R
"p2_name", p2); dataset.
The most common interdependent parameter is frequency and
wavelength. Parameters that are not interdependent must be added
separately.
See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459
7.3.24 addattribute
Adds an attribute to an existing dataset.
Syntax Description
R.addattribute("a_name", a); Adds the scalar attribute a to the dataset R.
R.addattribute("a_vector", a_1, Adds the vector attribute a_vector to the existing dataset R. The
a_2, a_3); components of the vector are a_1, a_2 and a_3
See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459
7.3.25 getparameter
Get a parameter from an existing dataset.
Syntax Description
?getparameter(R); Returns the names of all the parameters in the dataset R.
Parameter = R.getparameter("p"); Retrieves the parameter p from the existing dataset R. The result
"Parameter" is a scalar matrix.
Parameter = getparameter(R,"p"); Retrieves the parameter p from the existing dataset R. The result
"Parameter" is a scalar matrix.
See Also
matrixdataset 1459 , rectilineardataset 1459 , "." operator 1484 , getresult 1647 , getattribute 1461 , visualize 1529 , datasets 1461
7.3.26 getattribute
Get an attribute from an existing dataset.
Syntax Description
?getattribute(R); Returns the names of all the attributes in the dataset R.
Attribute = R.getattribute("a"); Retrieves the attribute a from the existing dataset R. The result
"Attribute" is a scalar matrix.
Attribute = getparameter(R,"a"); Retrieves the attribute a from the existing dataset R. The result
"Attribute" is a scalar matrix.
See Also
Dataset introduction 1461 , matrixdataset 1459 , rectilineardataset 1459 , "." operator 1484 , getresult 1647 , getparameter 1460 ,
visualize 1529 , datasets 1461
7.3.27 eye
The script command eye creates a 2D identity matrix.
Syntax Description
I = eye; Returns a 1x1 matrix, value 1.0.
I = eye(n); Returns nxn identity matrix.
I = eye(n,m); Returns nxm matrix with ones on main diagonal
See Also
Datasets 1461 , matrixdataset 1459 , rectilineardataset 1459 , matlab 1642 , matrix 1455
7.3.28 Datasets
Introduction to Lumerical datasets
Lumerical datasets are structured data objects that collect a set of related matrices into a single convenient object.
To introduce this concept, we'll start by providing two examples. Additional information follows.
Page contents
Example 1) Reflection vs radius and height 1462
Example 2) Electric field data from a monitor 1462
Attributes and parameters 1464
What is in a dataset? Icons and the '?' operator 1464
The following script code generates some example data, creates a R(radius,height) dataset, and finally creates
several plots of the data.
# plot data
image(radius,height,reflection); # use original matrices
image(R.radius,R.height,R.R); # use dataset
# monitor name
m="monitor";
# manually create the electric field dataset from the raw data
# initialize dataset and provide spatial position vectors
E_manual = rectilineardataset("E_manual",x,y,z);
# all of the above commands can be avoided with a single getresult command
E_fromMonitor = getresult(m,"E");
When creating datasets, the size of the attribute matrices must be consistent with the lengths of the associated
parameters matrices.
The '?' operator can be used to output the same information to the script prompt.
?E_field = getresult("monitor","E");
> E vs x, y, z, lambda/f
Operations on datasets
Datasets are primarily intended to be a convenient way to manage and store a collection of related data. It is not
possible to apply mathematical operations, such as addition, directly to dataset objects. Instead, the dot operator
must be used to get the desired data into a matrix. The operation can then be applied to the matrix. You may
choose to create a new dataset to store the result, or you may simply keep the result as a standard matrix.
Scalar
The command
R.addattribute("R",reflection); # add reflection attribute
adds a scalar quantity 'R' to a dataset with the same name. To access the 'R' raw data, use:
R.R;
Vector
The command
E.addattribute("E",Ex_raw,Ey_raw,Ez_raw); # add vector E field attribute
adds a vector quantity 'E' to a dataset with the same name. In this case, we can access the raw 'E' data in the
following ways:
E.Ex; # get Ex component
E.Ey; # get Ey component
E.Ez; # get Ez component
E.E2; # get |E|^2
E.E; # get all components in a single matrix. An extra dimension of length 3 will be a
See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465
7.3.29 struct
The script command struct adds an unstructured dataset. Any data type (such as matrix, string, dataset) can be
added to struct objects.
Syntax Description
a = struct; Creates an unstructured dataset.
a.a = "string"; Adds a string field to the structure.
a.b = matrix(5,5); Adds a field of matrix of 5x5 to the structure.
See Also
Datasets 1461 , matrixdataset 1459 , rectilineardataset 1459 , cell 1465
7.3.30 cell
The script command cell creates a cell array variable with specified number of elements. The cell array element can
be any data type, such as matrix, string, and dataset.
Syntax Description
See Also
Datasets 1461 , matrixdataset 1459 , rectilineardataset 1459 , struct 1465 , splitstring 1492
7.3.31 unstructureddataset
unstructureddataset script command creates an empty dataset that is associated with arbitrary x/y/z coordinate in
space, and with additional matrix, a connectivity matrix to connect them. The connectivity matrix comes after x, y,
and z. Like rectilinear datasets, unstructured datasets can be parameterized, and can contain an arbitrary number
of attributes (see addattribute) 1460 and parameters (see addparameter) 1460 .
See Dataset introduction 1461 for more information. For datasets that are not associated with the x/y/z coordinates
(ex. transmission as a function of frequency), see matrixdataset 1459 .
Syntax Description
unstructureddataset(x,y,z,C); Creates an empty unstructured dataset associated with the
coordinates x/y/z and a connectivity matrix to connect them.
See Also
rectilineardataset 1459 , addattribute 1460 , addparameter 1460 , visualize 1529 , datasets 1461 , getparameter 1460 , getattribute
1461 , matrixdataset 1459 , struct 1465
7.3.32 global
The script command returns the value of a global variable specified. Global variables are root element properties.
Syntax Description
out = global (name); Returns the value of a global variable.
See Also
Manipulating variables 1452
7.3.33 simulation
The script command simulation returns bandwidth related simulation properties. The time domain simulator will try to
accommodate the current channels into non-overlapping simulation bandwidths. Simulation properties include the
center frequency, sample rate, number of samples, frequency grid spacing, lower and upper frequency limits. If a
single bandwidth is listed, this means all channels fit in the same bandwidth, otherwise multiple bandwidths are
required to accommodate all channels with the current sample rate.
The command also returns the list of source channels in the current simulation before the simulation estimate the
simulation bandwidths. This list includes the overlapped bandwidths. Simulation properties include the center
frequency, sample rate, number of samples, frequency grid spacing, lower and upper frequency limits. If a single
bandwidth is listed, this means all channels fit in the same bandwidth, otherwise multiple bandwidths are required to
accommodate all channels with the current sample rate.
Syntax Description
out = simulation(bandwidth); Returns bandwidth related simulation properties.
out = simulation(channels); Returns the list of source channels in the current simulation before
the simulation estimate the simulation bandwidths.
out = simulation(single); Returns the recommended setting for simulation using a single
band (total field) that will make sure all channels are merged into
one simulation bandwidth.
See Also
Manipulating variables 1452
7.4 Operators
Standard mathematical and string operators.
Algebraic operators
Command Description
* 1468 Multiplication. Ex: y = x * z;
/ 1468 Division. Ex: y = x / z;
+ 1469 Addition. Ex: y = x + z;
- 1469 Subtraction. Ex: y = x z;
- 1469 Negative. Ex: y = -x;
^ 1469 Power. Ex: y = x^3;
In expression A^B, if B is complex, the phase of A is evaluated from -p to p.
Dataset operators
Command Description
. 1468 Retrieve the parameters and attributes of datasets.
String operators
Command Description
" 1473 Create a string variable.
' 1474 Create a string variable.
+ 1469 Add strings
endl 1474 end of line character.
Output to screen
Command Description
? 1474 Display output on screen.
# script file comments 1474 Comment script files with #
7.4.1 .
The dot operator can be used to retrieve the parameters and attributes of datasets.
Syntax Description
result = A.result; Retrieves the parameter or attribute "result" from the existing dataset
A. The result is a scalar matrix.
See Also
matrixdataset 1459 , rectilineardataset 1459 , getparameter 1460 , getattribute 1461 , visualize 1529
7.4.2 *
Multiplication. When applied to matrices, this operator does simple element by element multiplication, not matrix
multiplication.
Syntax Description
y = x * z; Multiply x and z.
See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469 , mult 1485
7.4.3 /
Division.
Syntax Description
y = x / z; Divide x by z.
See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469
7.4.4 +
Addition.
Syntax Description
y = x + z; Add x and z.
y = string1 + string2; Concatenate strings together.
See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469
7.4.5 -
Subtraction, or negative.
Syntax Description
y = x - z; Subtract z from x.
y = -x; Negative
See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469
7.4.6 ^
Power. In expression A^B, if B is complex, the phase of A is evaluated from -p to p.
Syntax Description
y = x^3; x cubed.
See Also
Operators 1467 ,* 1468 ,/ 1468 ,+ 1469 ,- 1469 ,^ 1469
7.4.7 ==
Logical comparison. This operators can be used with complex numbers and strings.
Syntax Description
out = y == x; Returns 1 if x and y are equal. Returns 0 otherwise.
See Also
Operators 1467 ,= 1453 , almostequal 1470 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.8 almostequal
Almost equal comparison operator. When using floating point numbers (rather than integers), two values that are
meant to be equal may not be exactly equal due to rounding errors that are always present in floating point
calculations. In such cases, the almost equal function can be useful.
Syntax Description
out = almostequal(A, B); Returns 1 if A - B is less than or equal to A + B/2*1e-15. Returns
0 otherwise.
out = almostequal(A, B, relative Returns 1 if A - B is less than or equal to A + B/2 times relative
diff); diff. Returns 0 otherwise.
out = almostequal(A, B, relative Returns 1 if A - B is less than or equal to A + B/2 times relative
diff, absolute diff); diff or if A - B is less than or equal to absolute diff. Returns 0
otherwise.
See Also
Operators 1467 ,= 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.9 !=
Not equal to comparison operator. Returns 1 if values are not equal. Returns 0 if values are equal. This operator
can be used in matrix operations. This operators can be used with complex numbers.
Syntax Description
out = a!=b; If a is not equal to b, then out equals 1. Otherwise out equals 0.
See Also
Operators 1467 , == 1469 , almostequal 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.10 <=
Logical less than or equal to. Imaginary components of x and y are ignored.
Syntax Description
out = y <= x; Less than or equal to.
See Also
Operators 1467 , == 1469 , != 1470 , almostequal 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.11 >=
Logical greater than or equal to. Imaginary components of x and y are ignored.
Syntax Description
out = y >= x; Greater than or equal to.
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , almostequal 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.12 <
Logical less than. Imaginary components of x and y are ignored.
Syntax Description
out = y < x; Less than.
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 , almostequal 1470 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.13 >
Logical greater than. Imaginary components of x and y are ignored.
Syntax Description
out = y > x; Greater than.
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 , almostequal 1470 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.14 &
Logical AND. Imaginary components of x and y are ignored.
Syntax Description
out = y & x; If the real part of either or both of x,y are zero, then return 0.
Otherwise return 1.
y and x; Same as &.
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.15 and
Logical AND. Imaginary components of x and y are ignored.
Syntax Description
out = y & x; If the real part of either or both of x,y are zero, then return 0.
Otherwise return 1.
y and x; Same as &.
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.16 |
Logical OR. Imaginary components of x and y are ignored.
Syntax Description
out = y | x; If the real part of either or both of x,y is non-zero, then return 1.
Otherwise return 0.
y or x; Same as |.
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.17 or
Logical OR. Imaginary components of x and y are ignored.
Syntax Description
out = y | x; If the real part of either or both of x,y is non-zero, then return 1.
Otherwise return 0.
y or x; Same as |.
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.18 !
Logical NOT operator. If a value is 0, then NOT returns 1. For all other values, NOT returns 0. NOT(A) is equivalent
to A==0, where == is the comparison operator.
Syntax Description
out = !a; applies logical not operator to a
out = ~a; applies logical not operator to a
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.19 ~
Logical NOT operator. If a value is 0, then NOT returns 1. For all other values, NOT returns 0. NOT(A) is equivalent
to A==0, where == is the comparison operator.
Syntax Description
out = !a; applies logical not operator to a
out = ~a; applies logical not operator to a
See Also
Operators 1467 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473
7.4.20 "
String operator. Strings can be created with single or double quotes.
The following escape sequences are recognized when creating strings with double quotes:
\" double quotes in string
\n newline (linefeed) character in string
\\ backslash in string
Syntax Description
out="my string"; use double quotes to create strings
Suppose we want to create the string C:\Program Files\Lumerical. The following three commands are
valid and equivalent:
mystring = 'C:\Program Files\Lumerical'; # use single quotes
mystring = "C:\Program Files\Lumerical"; # use double quotes
mystring = "C:\\Program Files\\Lumerical"; # use double quotes and \\ escape character
However, suppose we want to create the string C:\Program Files\Lumerical\. The only difference is the
additional backslash at the end of the string. The following two commands are valid and equivalent:
mystring = 'C:\Program Files\Lumerical\'; # use single quotes
mystring = "C:\\Program Files\\Lumerical\\"; # use double quotes and \\ escape characte
The other potential command, where we use a single backslash, is not valid syntax and will result in an error.
mystring = "C:\Program Files\Lumerical\"; # use double quotes
The problem is that the script interpreter will interpret the final \" as an escape character for a literal double quote,
rather than as a single backslash and a closing double quote. When interpreted this way, the command results in
a syntax error because there is no double quote character closing the string.
See Also
Operators 1467 ,' 1474 , num2str 1490 ,+ 1469 , endl 1474 , write 1440 , eval 1491 , system 1433
7.4.21 '
String operator. Strings can be created with single or double quotes.
The following escape sequences are recognized when creating strings with single quotes:
'' single quote in string (two single quote characters)
Syntax Description
out='my string'; use single quotes to create strings
See Also
Operators 1467 ," 1473 , num2str 1490 ,+ 1469 , endl 1474 , write 1440 , eval 1491 , system 1433
7.4.22 endl
Add an end of line character to a string
Syntax Description
out = "line1"+endl+"line2"; Add an end of line character to the string.
See Also
Operators 1467 , num2str 1490 ,+ 1469 ," 1473 , write 1440
7.4.23 ?
Print output to the screen. Use the format script command to change the precision of the output.
Syntax Description
?command; Displays the output of the command on the screen
This function does not return any data.
See Also
System level 1426 , write 1440 , format 1438 ,# 1474
7.4.24 comments
Use the # character to comment script files. Anything after the # character is ignored. The comments are not
displayed when the script file is run. Comments can not be used when typing commands directly into the script
prompt.
Syntax Description
x=1; # set x to 1 Anything after the # character is ignored.
See Also
System level 1426
7.5 Functions
Standard mathematical and matrix functions.
Matrix functions
Command Description
size 1482 Returns the dimensions of a matrix.
length 1483 Returns the total number of elements in a matrix.
pinch 1483 Remove singleton dimensions from a matrix.
sum 1483 The sum of a matrix.
max 1484 The max value in a matrix.
min 1484 The min value in a matrix.
dot 1484 The dot product of two vectors.
cross 1484 The cross product of two vectors.
flip 1485 Flip a matrix in one dimension.
interp 1487 Linear interpolation function.
spline 1487 Cubic spline interpolation.
polyfit 1488 Polynomial fit.
See also
Manipulating variables 1452
String functions
Command Description
num2str 1490 Convert number to a string.
str2num 1490 Convert a string into a floating point number.
eval 1491 Execute string containing Lumerical scripting language.
feval 1491 Run a Lumerical script file.
length 1483 Returns the total length of the string.
substring 1491 Returns a substring of a string, as a specified position and length.
findstring 1491 Returns the position of a substring in a string.
replace 1492 Replaces a part of a string with another, at a specified position.
replacestring 1492 Replaces all instances of a substring with another string.
splitstring 1492 Split a single long string into a cell (string) array based on a delimiting
character.
upper 1493 Convert a string to upper case.
Colorimetry
Command Description
colormatchfunction 1511 Returns a set of color matching functions.
colormatch 1512 Calculates the X, Y, Z tristimulus values for a set of color matching functions.
colormatchxy 1513 Calculates the x, y chromaticity values for a set of color matching functions.
colormatchuv 1515 Calculates the u, v chromaticity values for a set of color matching functions.
Miscellaneous
Command Description
ceil 1501 Round up.
floor 1501 Round down.
mod 1502 Modulus after division.
round 1502 Rounds to the nearest integer.
7.5.1 sin
Trigonometric sine function. Angle units are in radians. Function is defined for complex angles. Phase of a
complex number is evaluated between -p and p.
Syntax Description
out = sin(x); Returns the complex sine of x.
See Also
Functions 1475 , asin 1479
7.5.2 cos
Trigonometric cosine function. Angle units are in radians. Function is defined for complex angles. Phase of a
complex number is evaluated between -p and p.
Syntax Description
out = cos(x); Returns the complex cosine of x.
See Also
Functions 1475 , acos 1479
7.5.3 tan
Trigonometric tangent function. Angle units are in radians. Function is defined for complex angles. Phase of a
complex number is evaluated between -p and p.
Syntax Description
out = tan(x); Returns the complex tangent of x.
See Also
Functions 1475 , atan 1480 , atan2 1480
7.5.4 asin
Inverse trigonometric sine function. Angle units are in radians. Function is defined for complex values. Phase of a
complex number is evaluated between -p and p. If x is complex, or abs(x) > 1, the following equation is used:
asin(x) = -i ln( ix + sqrt(1-x^2))
Syntax Description
out = asin(x); Returns the complex arcsine of x.
See Also
Functions 1475 , sin 1478
7.5.5 acos
Inverse trigonometric cosine function. Angle units are in radians. Function is defined for complex values. Phase of
a complex number is evaluated between -p and p. If x is complex, or abs(x) > 1, the following equation is used:
acos(x) = -i ln( x + i sqrt( 1-x^2))
Syntax Description
out = acos(x); Returns the complex arccosine of x.
See Also
Functions 1475 , cos 1479
7.5.6 atan
Inverse trigonometric tangent function. Angle units are in radians. Function is defined for complex values. Phase of
a complex number is evaluated between -p and p. If x is complex, or abs(x) > 1, the following equation is used:
atan(x) = 0.5 i ln( (i+x)/(i-x) )
Syntax Description
out = atan(x); Returns the complex arctangent of x.
See Also
Functions 1475 , atan2 1480 , tan 1479
7.5.7 atan2
Inverse trigonometric tangent function, calculates the arctangent of y/x, but returns the angle in the correct quadrant.
Angle units are in radians. Function is defined for real values only.
Syntax Description
out = atan2(y,x); x,y must be real.
See Also
Functions 1475 , atan 1480 , tan 1479
7.5.8 real
Returns the real part of a number or matrix.
Syntax Description
out = real(x); Returns the real part of x.
See Also
Functions 1475 , imag 1480
7.5.9 imag
Returns the imaginary part of a number or matrix.
Syntax Description
out = imag(x); Returns the imaginary part of x.
See Also
Functions 1475 , real 1480 , conj 1481
7.5.10 conj
Returns the complex conjugate of a number or matrix.
Syntax Description
out = conj(x); Returns the complex conjugate of x.
See Also
Functions 1475 , real 1480 , imag 1480
7.5.11 abs
Returns the absolute value of a number or matrix.
Syntax Description
out = abs(x); Returns the absolute value of x.
See Also
Functions 1475 , real 1480 , imag 1480
7.5.12 angle
Returns the angle or phase of a complex number or matrix in radians.
Syntax Description
out = angle(x); Returns the phase of x.
See Also
Functions 1475 , real 1480 , imag 1480 , unwrap 1481
7.5.13 unwrap
Removes changes of more than 2p from a 1D array. It can be useful after angle(x) to see phase without
discontinuities.
The unwrap function is primarily intended for 1D arrays. Care must be taken when applying it to matrices with more
than one dimension.
Syntax Description
out = unwrap(x); Return the values of x without discontinuities.
See Also
Functions 1475 , real 1480 , imag 1480 , angle 1481
7.5.14 log
The natural logarithm. Input can be complex or negative.
Syntax Description
out = log(x); The natural logarithm. Input can be complex or negative.
See Also
Functions 1475 , log10 1482
7.5.15 log10
The log, base 10. Input can be complex or negative.
Syntax Description
out = log10(x); The log, base 10. Input can be complex or negative.
See Also
Functions 1475 , log 1482
7.5.16 sqrt
The square root.
Syntax Description
out = sqrt(x); The square root.
See Also
Functions 1475 ,^ 1469
7.5.17 exp
The exponential.
Syntax Description
out = exp(x); The exponential.
See Also
Functions 1475 , log 1482 ,^ 1469
7.5.18 size
Returns the size of a matrix.
Syntax Description
See Also
Functions 1475 , length 1483 , flip 1485 , transpose 1490
7.5.19 length
Returns the number of elements in a matrix. If the argument is a string, it will return the length of the string.
Syntax Description
y = length(x); y the number of elements in a matrix. For example, if x is an n by m
matrix, y = length( x ) = n * m.
See Also
Functions 1475 , size 1482 , transpose 1490 , flip 1485 , substring 1491 , findstring 1491 , replace 1492 , replacestring 1492
7.5.20 pinch
Removes all singleton dimensions from a matrix.
Syntax Description
out = pinch(x); Removes all singleton dimensions. For example, if x is a matrix of
dimension 1x1x1xM, then
y=pinch(x);
will return a Mx1 matrix where
y(i) = x(1,1,1,i);
pinch(x,i); Removes a specified dimension. If x is an NxMxKxP matrix then
y=pinch(x,2);
will return an NxKxP matrix where
y(i,j,k) = x(i,1,j,k)
pinch(x,I,j); Removes a specified dimension but keeps a specific index for the
dimension being removed. If x is an NxMxKxP matrix then
y=pinch(x,2,4);
will return an NxKxP matrix where
y(i,j,k) = x(i,4,j,k)
See Also
Functions 1475 , find 1489 , size 1482 , flip 1485
7.5.21 sum
Sum of elements in a matrix.
Syntax Description
out = sum(x); Sum of all the elements in a matrix, over all dimensions.
out = sum(x,2); Sum x over the specified dimension.
See Also
Functions 1475 , integrate 1488 , mean 1505
7.5.22 max
The maximum value in a matrix. For complex numbers, only the real part is considered.
Syntax Description
out = max(x); The maximum value in a matrix.
See Also
Functions 1475 , min 1484 , abs 1481 , mean 1505
7.5.23 min
The minimum value in a matrix. For complex numbers, only the real part is considered.
Syntax Description
out = min(x); The minimum value in a matrix.
See Also
Functions 1475 , max 1484 , abs 1481 , mean 1505
7.5.24 dot
Dot product.
Matrix A, B must have the same number of elements. The dot product will be calculated with the following formula.
C = A(i ) B (i )
i
Syntax Description
C = dot(A, B); Returns the dot product of A and B
See Also
Functions 1475 , cross 1484 ,* 1468 , length 1483 , size 1482
7.5.25 cross
Vector cross product.
Matrix A, B must be the same size. The cross product will be computed on the first dimension that has a size of 3.
There must be at least one dimension with a size of 3.
Assume that A,B are 2D matrices, where the second dimension contains the vector components. The size of the
second dimension must be 3. Then the elements of C will be calculated with the standard cross product formulas.
r r r r r
C (i,1) = + A(i,2) B(i,3) - A(i,3) B(i,2)
r r r r r
C (i,2) = - A(i,1) B(i,3) + A(i,3) B(i,1)
r r r r r
C (i,3) = + A(i,1) B(i,2) - A(i,2) B(i,1)
Syntax Description
C = cross(A, B); Returns the cross product of A and B
See Also
Functions 1475 , dot 1484 ,* 1468 , length 1483 , size 1482
7.5.26 eig
Find the eigen value and/or eigen vector of a matrix. The matrix has to be square.
Syntax Description
out = eig(A); Returns the eigenvalues of matrix A.
out = eig(A, 1);
out = eig(A, 2); Returns the eigenvectors of matrix A.
out = eig(A, 3); Returns both the eigenvalues and eigenvectors of matrix A.
See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , mult 1485 ,
permute 1486 , reshape 1486 , inv 1486
7.5.27 mult
Perform matrix multiplication of two or more matrices. The dimensions of the matrices have to match
Syntax Description
out = mult(A,B,...) Returns the matrix multiplication of matrices, A x B x C ...
See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 ,
permute 1486 , reshape 1486 , inv 1486
7.5.28 flip
Flip a matrix along one dimension.
Syntax Description
See Also
Functions 1475 , size 1482 , length 1483 , pinch 1483 , transpose 1490 , reshape 1486 , permute 1486
7.5.29 permute
This function is a more general version of the transpose function. It allows matrix dimensions to be rearranged as
needed.
Syntax Description
out = permute(A, [i,j,k, ...]) Returns a matrix with the same elements as A but with rearranged
dimensions i,j,k, etc.
See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 , < 1471 , > 1471 , & 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 ,
reshape 1486 , mult 1485 , inv 1486 , flip 1485 , transpose 1490 , size 1482
7.5.30 reshape
Reshapes the matrix A to have the size i,j,k.The product of the specified dimensions, i*j*k*..., must be the same as
that of the original matrix A.
Syntax Description
out = reshape(A, [i,j,k, ...]) Returns an array with the same elements as A but reshaped to have
the size i by j by k by ...
See Also
Operators 1467 , = 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 , < 1471 , > 1471 , & 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 ,
permute 1486 , mult 1485 , inv 1486 , flip 1485 , transpose 1490 , size 1482
7.5.31 inv
Calculate the inverse of a matrix. The matrix has to be invertible.
Syntax Description
out = Inv(A) Returns the inverse of matrix A
See Also
Operators 1467 ,= 1453 , == 1469 , != 1470 , <= 1470 , >= 1470 ,< 1471 ,> 1471 ,& 1471 , and 1471 ,| 1472 , or 1472 ,! 1472 ,~ 1473 , eig 1485 , mult
1485
7.5.32 interp
Linear interpolation of a data set. The data can be complex.
Syntax Description
out = interp(Ex, xold, xnew); Does a linear interpolation of a 1D function.
Ex is existing data
xold specifies the points where Ex is sampled
xnew specifies new point to interpolate the data.
The xnew does not have to be within the bounds of xold.
interp(Ex, xold, yold, xnew, The 2D version of interp.
ynew);
interp(Ex, xold, yold, zold, xnew, The 3D version of interp.
ynew, znew);
interp(Ex, xold, yold, zold, told, The 4D version of interp.
xnew, ynew, znew, tnew);
See Also
Functions 1475 , spline 1487 , plotxy 1525
7.5.33 interptri
The script command interpolates a data set from triangular to linear grid. The data can be complex.
Syntax Description
out = interptri(tri, vtx,u, xi, Does a triangular to linear interpolation of a function and outputs a PxQ
yi,extrap_val); array of interpolated values, z(xi,yi).
u is existing data of the finite element mesh (Nx1).
xi (length P) / yi (length Q) specifies the points where u is to be
sampled on the rectilinear mesh, in the x-direction and the y-
direction
tri is the elements of the triangular mesh taken from the simulation
region, the connectivity array, Mx3, containing row entries that index
the three vertices of M triangles
vtx are the vertices of the triangular mesh, Nx2, containing row
entries of (x,y) pairs, taken from the simulation region
extrap_val(optional): if an interpolation point is outside of the finite
element mesh, the point will be assigned this value (default is Inf)
See Also
quadtri, interptet 1508 , quadtet 1507
7.5.34 spline
Does a cubic spline interpolation of a data set.
Syntax Description
See Also
Functions 1475 , interp 1487
7.5.35 polyfit
Polynomial fit based on linear regression. The data can be complex.
Syntax Description
p = polyfit(x, y, N); Returns the coefficients for a polynomial p(x) of degree N that is the
best fit for the data in y.
p ( x) = p1 + p2 x1 + p3 x 2 + ... + p N x N -1 + p N +1 x N
The length of the coefficients is N+1.
7.5.36 integrate
Returns the integral over the specified dimension of a matrix.
Integrals over singleton dimensions will return zero (i.e. the area under a single point is zero). See integrate2 for an
alternate behavior.
Syntax Description
out = integrate(A, n, x1); Integrates A over the nth dimension in the matrix.
x1 is the corresponding position vector for that dimension.
out = integrate(A, d, x1, x2, ...); Calculates the integral of A over the specified list of dimension(s) d.
d is a vector containing the dimensions over which to integrate.
xi are the position vectors corresponding to the dimensions of A over
which the integration is occurring.
For example
power = integrate(A,1:2,x,y) will integrate A over an x-y surface.
See Also
Functions 1475 , integrate2 1488 , max 1484 , min 1484 , interp 1487 , find 1489 , pinch 1483 , round 1502 , getdata 1646 , sum 1483 , length
1483
7.5.37 integrate2
Very similar to the standard integrate function, except that singleton dimensions are ignored.
As described in the integrate function description, integrating over dimensions with a single value (singleton
dimensions) returns zero because the area under a single point is zero. In some cases, particularly when you are
not sure which dimensions are singleton, this behavior can cause difficulties. The integrate2 function automatically
ignores all dimensions with a size of one, which avoids the problem of a zero valued integrals due to singleton
dimensions.
Syntax Description
out = integrate2(A, 1, x1); Integrates A over the first dimension in the matrix.
x1 is the corresponding position vector.
out = integrate2(A, d, x1, x2, ...); Calculates the integral of A over the specified dimension(s) d.
d is a vector containing the dimensions over which to integrate.
xi is the position vector corresponding to the dimensions of A over
which the integration is occurring. If any of the xi vectors only have 1
element, integrate returns 0.
For example
power = integrate2(A,1:2,x,y) will integrate A over an x-y surface.
See Also
Functions 1475 , integrate 1488 , max 1484 , min 1484 , interp 1487 , find 1489 , pinch 1483 , round 1502 , getdata 1646 , sum 1483 , length 1483
7.5.38 find
This function will search for entries in a matrix that meet some condition. The indices of those values are returned.
For multi-dimensional matrixes, the find function will still return a single index. This is useful when using the output
from find in a loop.
Syntax Description
out = find(x,5e-6); Will return the index of x that corresponds to the closest
value to 5e-6.
out = find(x>5); Will return indices of all values of x that are greater than
5.
out = find((x<7) & (x>=2)); Will return indices of all values of x that are greater than
or equal to 2, AND x less than 7.
See Also
Functions 1475 , pinch 1483 , findpeaks 1489 , integrate 1488 , length 1483 , size 1482 , mod 1502 , meshgrid3dx 1456 , meshgrid3dy 1456
, meshgrid3dz 1457
7.5.39 findpeaks
Returns the position of peaks in a matrix. A peak is defined as a data point that is larger than its nearest neighbors.
Syntax Description
out = findpeaks(y); Returns the position of the peak with the largest value in y. The length
of y must be at least 2. If no peak is found in the data, a value of 1 is
returned.
findpeaks(y,n); Returns a matrix containing the positions of the largest n peaks found
in the data. The returned values are ordered from largest to smallest.
The returned matrix is always of dimension nX1. If less than n peaks
are found, the remaining values of the returned matrix are 1.
See Also
7.5.40 transpose
Transpose a 1D or 2D matrix.
Syntax Description
y = transpose(x); If x is an N x M matrix, then y will be M x N, where the entries are y(j,i)
=x(i,j).
See Also
Functions 1475 , ctranspose 1490 , reshape 1486 , flip 1485 , permute 1486 , size 1482
7.5.41 ctranspose
Transpose a 1D or 2D matrix and take the complex conjugate of each element.
Syntax Description
y = ctranspose(x); If x is an N x M matrix, then y will be M x N, where the entries are y(j,i)
=x(i,j)* .
See Also
Functions 1475 , transpose 1490
7.5.42 num2str
Convert an integer, floating point number, or matrix into a string. Use the format script command to change the
precision of the output.
Syntax Description
out = num2str(x); Converts the number x into a string. x can also be a 1D or 2D matrix.
The tab character (rather than space) will be used as delimiter between
columns.
See Also
Operators 1467 , " 1473 , + 1469 , ? 1474 , endl 1474 , write 1440 , format 1438 ,str2num 1490 , findstring 1491 , replace 1492 , replacestring
1492 , substring 1491 , eval 1491 , lower 1493 , upper 1493 , toscript 1493
7.5.43 str2num
Convert a string into a floating point number. Use the format script command to change the precision of the output.
Syntax Description
out = str2num(string); Converts string into a number.
See Also
Operators 1467 , " 1473 , + 1469 , ? 1474 , endl 1474 , write 1440 , format 1438 , findstring 1491 , replace 1492 , replacestring 1492 , substring
1491 , lower 1493 , upper 1493 , toscript 1493
7.5.44 eval
Execute string containing Lumerical scripting language.
Syntax Description
eval(string); Execute string containing Lumerical scripting language at the
Lumerical script prompt.
This function does not return any data.
See Also
Operators 1467 , feval 1491 , str2num 1490 , num2str 1490 , lower 1493 , upper 1493 , toscript 1493
7.5.45 feval
Evaluates a string as script file. This function is useful for running script files that are not in your path and files with
spaces in the name.
Syntax Description
feval(filename); Execute string containing the name of a script file at the Lumerical
script prompt.
This function does not return any data.
See Also
Operators 1467 , eval 1491 , str2num 1490 , num2str 1490 , lower 1493 , upper 1493 , toscript 1493
7.5.46 substring
Can be used to extract a substring from a string.
Syntax Description
s1 = substring(s,pos); Returns a substring of s, starting at position pos to the end of s. The
position pos can be 1 to length(s).
s1 = substring(s,pos,len); Returns a substring of s, starting at position pos, with len characters. If
len is -1 (or any value less than 0) it returns the substring at position
pos to the end of s. The default value of len is -1.
See Also
Functions 1475 , length 1483 , findstring 1491 , replace 1492 , replacestring 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower
1493 , upper 1493 , toscript 1493
7.5.47 findstring
Returns the position of a given substring in a string.
Syntax Description
pos = findstring(s,s1); Returns the position of the first instance substring s1 in s. If s1 is not
found in s, it returns -1.
pos = findstring(s,s1,p0); Returns the position of the first instance substring s1 in s, starting at
position p0. If s1 is not found in s, starting from p0, it returns -1.
See Also
Functions 1475 , length 1483 , substring 1491 , replace 1492 , replacestring 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower
1493 , upper 1493 , toscript 1493
7.5.48 replace
Replaces a substring of a string with a new string.
Syntax Description
snew = replace(s,pos,len,s1); Replaces len characters of s, starting at position pos, with the string in
s1. If len is 0, it will insert the string s1 between pos-1 and pos. If len is
-1 (or any values less than 0) it will replace all remaining characters in
s with s1, starting at pos. The position pos can be 1 to length(s).
See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replacestring 1492 , str2num 1490 , num2str 1490 , splitstring 1492 ,
lower 1493 , upper 1493 , toscript 1493
7.5.49 replacestring
Replaces a substring of a string with a new string.
Syntax Description
snew = replacestring(s,s1,s2); Replaces all instances of s1 in s with s2.
See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
upper 1493 , toscript 1493
7.5.50 splitstring
Split a long string into a series of substrings, where the substrings are stored in a cell (ie. string) array.
Syntax Description
S2 = splitstring(S1,endl); Split the string S1 into a series of strings, using the end of line
character as the delimiter between strings. S2 is a cell array.
See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , cell 1465 , dir 1431 , getresult
1647 , lower 1493 , upper 1493 , toscript 1493
7.5.51 upper
Convert a string to upper case.
Syntax Description
upper(string); Convert a string to upper case.
See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
toscript 1493
7.5.52 lower
Convert a string to lower case.
Syntax Description
lower(string); Convert a string to lower case.
See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , upper 1493 ,
toscript 1493
7.5.53 toscript
Returns a string containing the equivalent script of a generate variable.
Syntax Description
out=toscript(variable, Returns a string containing the equivalent script of to generate
expand=true); variable. If expand is true, matrix values will also be converted to
script, regardless of their size this can lead to large strings. To
prevent the matrix values conversion set expand to false. This script
function is particularly useful on debugging cells and structure
variables.
See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
upper 1493
7.5.54 fft
Compute the 1D, 2D or 3D Fast Fourier Transform (fft) of a matrix. In the 1D case the transform is given by
N 2 pi
( )( n -1)( m -1)
E w [m] = fft( E x ) = E x [n] e N
n =1
The fft, inverse fft and all associated functions have an option (option 1 below) that controls the format used to store
the frequency domain data. When working with spectral data it is not possible to switch between formats; there are
no functions to convert between formats. This implies that if you use option 1=n to produce a spectrum with fft, then
you must also use option 1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=n
for fft, then you also need to use option 1=n with fftw to get the proper frequency vector corresponding to your
spectrum. invfft and fftk work in the same way.
Syntax Description
out = fft(Ex); Returns the fast Fourier transform of Ex. Ex can be 1D, 2D or 3D.
out = fft(Ex,option1,option2); option1
This option controls the format used to store the frequency domain
data. The options are:
1 : the standard fft (zero frequency is at the first element of the
matrix).
2 : zero frequency is the first element, but only data up to and
including the Nyquist frequency is stored. This option is only useful
for real valued, 1D time/spatial signals.
3 : the fft is shifted so zero frequency is the central element of the
spectrum (precisely, this means the zero frequency point is at
element floor(N/2 + 1), where N is the number of samples).
option2
This option is either a 1, 2 or 3 element vector depending on whether
Ex is 1D, 2D or 3D. For each dimension, specify a value of either 0, 1
or N to obtain the desired 0 padding options.
0: no zero padding
1: zero padding up to the next power of 2 longer than the length of
Ex (default)
N: zero pad up to length N if N > length(Ex), where length of Ex is
the length in a specific dimension. If N <= length(Ex), it will zero pad
up to the next power of 2 longer than the length of Ex. For the
fastest results, N should be a power of 2 and can be entered, for
example, as 2^12.
See Also
Functions 1475 , invfft 1496 , fftw 1494 , fftk 1495 , czt 1497
7.5.55 fftw
Returns the angular frequency vector corresponding to time vector t.
2p
w = fftw(t ) = [0,L, ( M - 1)]
dt M ,
where M=length(t).
fftw and all related functions have an option (option 1 below) that controls the format used to store the frequency
domain data. When working with spectral data it is not possible to switch between formats; there are no functions to
convert between formats. This implies that if you use option 1=n to produce a spectrum with fft, then you must also
use option 1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=n for fft, then you
also need to use option 1=n with fftw to get the proper frequency vector corresponding to your spectrum. Invfft and
fftk work in the same way.
Syntax Description
out = fftw(t); Returns the angular frequency vector corresponding to time vector t.
fftw(t,option1,option2); Option1
1 : the standard fft (default)
2 : frequencies above the Nyquist frequency are removed
3 : the fft is shifted so both positive and negative frequencies are
seen
Option2
0: no zero padding
1: zero padding up to the next power of 2 longer than the length of
Ex (default)
N: zero pad up to length N if N > length(t). If N <= length(t), it will
zero pad up to the next power of 2 longer than the length of t. For the
fastest results, N should be a power of 2 and can be entered, for
example, as 2^12.
See Also
Functions 1475 , fft 1493 , fftk 1495 , invfft 1496
7.5.56 fftk
Returns the spatial wavevector kx associated with a fourier transform of a function of x.
2p
k = fftk( x) = [0,L, ( M - 1)]
dx M ,
where M=length(x).
fftk and all related functions have an option (option 1 below) that controls the format used to store the frequency
domain data. When working with spectral data it is not possible to switch between formats; there are no functions to
convert between formats. This implies that if you use option 1=n to produce a spectrum with fft, then you must also
use option 1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=n for fft, then you
also need to use option 1=n with fftw to get the proper frequency vector corresponding to your spectrum. Invfft and
fftk work in the same way.
Syntax Description
out = fftk(x); Returns the spatial wavevector kx associated with a fourier transform of
a function of x..
fftk(x,option1,option2); Option1
1 : the standard fft (default)
2 : frequencies above the Nyquist frequency are removed
3 : the fft is shifted so both positive and negative frequencies are
seen
Option2
0: no zero padding
See Also
Functions 1475 , fft 1493 , fftw 1494 , invfft 1496
7.5.57 invfft
Compute the 1D,2D or 3D inverse Fast Fourier Transform (fft) of a matrix. In the 1D case the transform is given by
N 2 pi
1 -( )( n -1)( m -1)
E x [m] = invfft( E w ) =
N
E
n =1
w [ n] e N
The inverse fft, fft and all related functions have an option (option 1 below) that controls the format used to store the
frequency domain data. When working with spectral data it is not possible to switch between formats; there are no
functions to convert between formats. This implies that if you use option 1=n to produce a spectrum with fft, then you
must also use option 1=n if you want to pass that same spectral data to invfft. Similarly, if you use option 1=n for fft,
then you also need to use option 1=n with fftw to get the proper frequency vector corresponding to your spectrum.
Invfft and fftk work in the same way.
Syntax Description
out = invfft(x); Returns the inverse fast Fourier transform of x. x can 1D,2D or 3D.
invfft(x,option1,option2); option1
This option controls the format used to store the frequency domain
data. The options are:
1 : the standard fft (zero frequency is at the first element of the
matrix).
2 : zero frequency is the first element, but only data up to and
including the Nyquist frequency is stored. This option is only useful
for real valued, 1D time/spatial signals.
3 : the fft is shifted so zero frequency is the central element of the
spectrum (precisely, this means the zero frequency point is at
element floor(N/2 + 1), where N is the number of samples).
option2
This option is either a 1, 2 or 3 element vector depending on whether
Ex is 1D, 2D or 3D. For each dimension, specify a value of either 0, 1
or N to obtain the desired 0 padding options.
0: no zero padding
1: zero padding up to the next power of 2 longer than the length of
Ex (default)
N: zero pad up to length N if N > length(Ex), where length of Ex is
the length in a specific dimension. If N <= length(Ex), it will zero pad
up to the next power of 2 longer than the length of Ex. For the
fastest results, N should be a power of 2 and can be entered, for
example, as 2^12.
See Also
Functions 1475 , fft 1493 , fftw 1494 , fftk 1495
7.5.58 czt
Returns the chirped z-transform of a set of data. The czt function is often more convenient than the standard fft
functions because you can specify an arbitrary range of k.
E k [m] = czt ( E x , x, k ) = E x [n] e ix[ n ]k [ m ]
n
ix[ n1] k [ m1]+ ix[ n 2 ] k [ m 2 ]
E k [m1, m2] = czt ( E x , x1, x 2, k1, k 2) = E [n1, n2] e
n1, n 2
x
Syntax Description
out = czt(Ex,t,w) Returns the chirped z-transform of Ex, function of t, at each desired
angular frequency w. Note that w must be a linearly spaced set of
angular frequencies but can cover any range.
czt(Ex,x,y,kx,ky); The two dimensional chirped z-transform. kx and ky must be linearly
spaced sets of wavenumbers but can cover any range.
See Also
Functions 1475 , fft 1493
7.5.59 sroughness
Returns a matrix containing a rough surface characterized by an RMS amplitude.
Syntax Description
out= sroughness(x_span, y_span, Returns a matrix containing a rough surface characterized by an RMS
sigma_rms, corr_x = 0, corr_y = amplitude sigma_rms and correlation lengths corr_x and corr_y.
0, seed = 0); The roughness is generated by creating a random matrix of values in K
space defined by x_span and y_span. A Gaussian filter is applied to
this matrix, then a Fourier transform is used to transform the matrix
back to real space. Due to the way the Fourier transform is setup, the
roughness will be periodic with period x, y span. This is convenient for
some application, particularly when using periodic boundary
conditions. Parameter seed defined the random seed value used to
generate the surface.
See Also
Functions 1475 , length 1483 , substring 1491 , findstring 1491 , replace 1492 , str2num 1490 , num2str 1490 , splitstring 1492 , lower 1493 ,
upper 1493
7.5.60 polyarea
Returns the area of a polygon. The area is positive if the vertices are defined in a counter-clockwise direction, and
negative if the vertices are defined in a clockwise direction.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
out = polyarea(V); Returns the area of V. The sign of the area indicates if V is defined in a
counter-clockwise (positive) or clockwise (negative) direction.
See Also
Functions 1475 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500
7.5.61 centroid
Returns the center of mass of a polygon.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
out = centroid(V); Returns the center of mass of V, assuming uniform density. The output
is a 2x1 matrix representing the x and y positions.
See Also
Functions 1475 , polyarea 1497 , polyintersect 1498 , inpoly 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500
7.5.62 polyintersect
Determines if two polygons intersect.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
out = polyintersect(V1,V2); Returns
0 if the polygons do not overlap
0.5 if the polygons touch
1 if they overlap
2 if one polygon completely encloses the other
See Also
Functions 1475 , polyarea 1497 , centroid 1498 , inpoly 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500
7.5.63 inpoly
Determines if a point is inside our outside a polygon. The function is vectorized so it can be used to create a mesh
of a polygon.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
out = inpoly(V,x,y); Returns a matrix of the same dimension of x with 1 if the
corresponding point is inside the polygon and 0 otherwise. The
matrices x and y must have the same length, or one of them can be a
singleton.
See Also
Functions 1475 , polyarea 1497 , centroid 1498 , polyintersect 1498 , polygrow 1499 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor
1500
7.5.64 polygrow
Returns a polygon that has grown or shrunk by the specified amount. The polygon is grown in a direction normal to
every line segment.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
out = plygrow(V,dx); Returns a new polygon that has grown by dx. To shrink a polygon, use
dx < 0.
See Also
Functions 1475 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polyand 1499 , polyor 1499 , polydiff 1500 , polyxor 1500
7.5.65 polyand
Combines two polygons into one using a boolean and operation.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
V3 = polyand(V1,V2); Returns a new polygon, V3, that is the and of V1 and V2.
Note: Other 2D or 3D objects
This command only works for 2D polygons. For other 2D or 3D objects, user may use the mesh order 271 to
combine multiple overlapped objects
See Also
Functions 1475 , polyor 1499 , polydiff 1500 , polyxor 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow 1499
7.5.66 polyor
Combines two polygons into one using a boolean or operation.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
V3 = polyor(V1,V2); Returns a new polygon, V3, that is the or of V1 and V2.
See Also
Functions 1475 , polyand 1499 , polydiff 1500 , polyxor 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow
1499
7.5.67 polydiff
Combines two polygons into one by taking the difference.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
V3 = polydiff(V1,V2); Returns a new polygon, V3, that is V1-V2.
See Also
Functions 1475 , polyand 1499 , polyor 1499 , polyxor 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow
1499
7.5.68 polyxor
Combines two polygons into one using a boolean xor operation.
The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN) where N >= 3. The second
dimension represents the x,y positions. For example, a valid polygon is V = [ 0,0; 1,0; 1,1; 0,1];
Syntax Description
V3 = polyxor(V1,V2); Returns a new polygon, V3, that is the xor of V1 and V2.
See Also
Functions 1475 , polyand 1499 , polyor 1499 , polydiff 1500 , polyarea 1497 , centroid 1498 , polyintersect 1498 , inpoly 1498 , polygrow
1499
7.5.69 lineintersect
Returns the intersection points of lines in the x-y plane. Note that the intersection point does not have to lie on the
line segments themselves that define the lines. To see if the line segments actually cross the command linecross
should be used.
Line segments are contained in a single matrix of dimension 2*Nx2, where there are N line segments. For example,
the matrix L = [ 0,0; 1,1; 0,0, 0,1]; represents 2 lines segments, one from (0,0) to (1,1) and another from (0,0) to
(0,1).
Syntax Description
out = lineintersect(L1,L2); Returns the intersection of the lines represented by the segments in L1
and L2. L1 and L2 must have the same size (2*N,2 for N line
segments). The result is a sequence of x,y points in the form Nx2
representing the intersections of the N lines. There are special cases
when
The lines are parallel. In this case, the position returned is
(1.#INF,b). The value of 1.#INF can be tested for using the script
commands finite. The value of b is 0 if the lines are not coincident
and 1 if they are coincident.
The points in a segment are degenerate, ie the same. In this case,
the position returned is (1.#INF,b), where b is 0, 1, 2 if the both line
segments are degenerate, the first is degenerate, or the second is
degenerate respectively.
See Also
Functions 1475 , linecross 1501 , finite 1504
7.5.70 linecross
Determines if line segments cross each other.
Line segments are contained in a single matrix of dimension 2*Nx2, where there are N line segments. For example,
the matrix L = [ 0,0; 1,1; 0,0, 0,1]; represents 2 lines segments, one from (0,0) to (1,1) and another from (0,0) to
(0,1).
Syntax Description
out = linecross(L1,L2); Returns a matrix of dimension N which determines if the N line
segments in L1 and the N line segments in L2 cross. L1 and L2 must
have the same size (2*Nx2 for N line segments). The result is a matrix
of length N that is 0 if the segments do not cross, 1 if they cross and
0.5 if the endpoint of one line touches another. Line segments that are
coincident and touch also return a value of 0.5
See Also
Functions 1475 , lineintersect 1500 , finite 1504
7.5.71 ceil
The ceil command rounds the input to the nearest integer greater than or equal to itself.
Syntax Description
out = ceil(X); Returns the nearest integer greater than or equal to X.
See Also
Functions 1475 , floor 1501 , mod 1502
7.5.72 floor
The floor command rounds the input to the nearest integer less than or equal to itself.
Syntax Description
out = floor(X); Returns the nearest integer less than or equal to X.
See Also
7.5.73 mod
Modulus after division.
Syntax Description
out = mod(X,Y); Returns X - n.*Y where n = floor(X./Y) if Y is not equal to 0. The input X
must be a real array or a real scalar. Y must be a real scalar.
The following are true by convention:
mod(X,0) = X
mod(X,X) = 0
See Also
Functions 1475 , floor 1501 , ceil 1501
7.5.74 sign
Get the sign of a number.
Syntax Description
out = sign(data); Real values
sign = 0 for data=0
sign = 1 for data>0
sign =-1 for data<0
Complex values
sign = 0 for data=0+0i
sign = data/abs(data) for data!=0
See Also
Functions 1475 , floor 1501 , ceil 1501
7.5.75 round
Rounds a number to the nearest integer.
Syntax Description
out = round(x); Rounds x to the nearest integer.
See Also
Functions 1475
7.5.76 rand
Generate a uniform random number between 0 and 1.
Syntax Description
out = rand; Generates a uniform random number between 0 and 1.
out = rand(min,max); Generates a random number between min and max. By default, min
and max are 0 and 1 respectively.
out = rand(min,max,option); option = 1: output is a double precision number between min and max
(default)
option = 2: output is an integer between min and max.
See Also
Functions 1475 , randreset 1503 , randmatrix 1455 , randn 1503
7.5.77 lognrnd
Generate a lognormal distributed random number.
Syntax Description
out = lognrnd (mean,stddev); Generates a lognormal distributed random number with user defined
mean value and standard deviation.
See Also
Functions 1475 , randreset 1503 , randn 1503
7.5.78 randn
Generate a normally distributed random number.
Syntax Description
out = randn; Generates a normally distributed random number with mean 0 and
standard deviation 1.
out = randn(mean,stddev); Generates a normally distributed random number with user defined
mean value and standard deviation.
See Also
Functions 1475 , randreset 1503 , lognrnd 1503 , randnmatrix 1455
7.5.79 randreset
Resets the random number generator seed.
Syntax Description
out = randreset; Resets the random number seed based on the clock time.
This function returns the random number seed that was used.
out = randreset(seed); Set the seed to a specific value
See Also
Functions 1475 , rand 1502 , randmatrix 1455
7.5.80 finite
The finite command returns 1 (true) if a value is finite. Numbers such as NaN or #1.INF return 0 (false).
Syntax Description
out = finite(x); Returns a matrix of the same size as x. The values are 1 for values of x
that are finite and 0 for values that are NaN. For example, finite(1/0)
returns 0.
See Also
Functions 1475
7.5.81 solar
Returns the solar power spectrum, in Watts/meter^2/meter.
The values are based on the global tilt values from the following link:
http://rredc.nrel.gov/solar/spectra/am1.5/ASTMG173/ASTMG173.html
Supported Product: FDTD, DEVICE
Syntax Description
out = solar(1); Returns the power of the solar spectrum as a function of wavelength, in
W/m^2/m
out = solar(0); Returns the corresponding wavelength vector, in m
See Also
plot 1525 , integrate 1488
7.5.82 stackrt
Analytically calculates the reflection and transmission of a plane wave through a multi-layer stack using the analytic
transfer matrix method. This function returns the fraction of transmitted and reflected power (Ts, Tp, Rs, Rp), and
the complex reflection and transmission coefficients (ts, tp, rs, rp), for both S and P polarizations. All results are
returned in a single dataset as a function of frequency and incidence angle (optional).
Syntax Description
RT = stackrt(n,d,f); Arguments for a stack with Nlayers:
n: Refractive index of each layer. Size is either Nlayers, or Nlayers x
length(f) if dispersive materials are involved.
d: Thickness of each layer. Size is Nlayers.
f: Frequency vector.
RT = stackrt(n,d,f,theta); theta: Angle vector, in degrees. Optional.
See Also
7.5.83 mean
The mean value in a matrix is returned.
Syntax Description
out = mean(a); The mean value of the matrix a is returned.
See Also
max 1484 , min 1484 , abs 1481 , sum 1483
7.5.84 all
The script command returns 1 if all of the specified matrix entries are nonzero and returns 0 otherwise.
Syntax Description
out = all(A); Will return 1 if all of the A matrix entries are nonzero and will return 0
otherwise.
See Also
any 1505 , almostequal 1470
7.5.85 any
The script command returns 1 if any of the specified matrix entries are nonzero and returns 0 otherwise.
Syntax Description
out = any(A); Will return 1 if any of the A matrix entries are nonzero and will return 0
otherwise.
See Also
all 1505 , almostequal 1470
7.5.86 var
The script command returns the variance of all entries of the matrix specified, where variance is defined as,
N
1 2
var =
N
( xi - m )
i =1
Syntax Description
out = var(A); Will return variance of all of matrix A, over all dimensions.
See Also
std 1506 , mean 1505
7.5.87 std
The script command returns the standard deviation of the all entries of the matrix specified, where standard deviation
is defined as,
N
1 2
s=
N
( xi - m )
i =1
Syntax Description
out = std(A); Will return standard deviation of matrix A, over all dimensions.
See Also
var 1505 , mean 1505
7.5.88 precision
The script command truncates a value to a user specified precision.
Syntax Description
out = precision (y,p); Truncates y to a user defined precision p. Where p is the number of
decimal places.
See Also
Functions 1475
7.5.89 mapfind
The script command returns the nearest value from a file containing a map of values to a string. It returns the string
value located at the specified nearest point.
Syntax Description
out = mapfind (filename,x,y); Find the nearest value from a file containing a map of values to a string.
It l returns the string value located at the nearest point (x,y).
out = mapfind (filename,x,y,z); Find the nearest value from a file containing a map of values to a string.
It returns the string value located at the nearest point (x,y,z).
out = mapfind (filename,x,y,z,w); Find the nearest value from a file containing a map of values to a string.
It returns the string value located at the nearest point (x,y,z,w).
See Also
readdata 1439 , readdata 1439
7.5.90 quadtri
The script command approximates integration (first order quadrature) of data on a 2D finite element mesh.
Syntax Description
out = quadtri(tri,vtx,u); outputs a scalar, the integral of u on the finite element mesh, where
tri: the connectivity array, Mx3, containing row entries that index the
three vertices of M triangles
vtx: the vertex array, Nx2, containing row entries of (x,y) pairs
u: the data on the finite element mesh (Nx1)
See Also
Functions 1475 , interptri 1487 , quadtet 1507 , interptet 1508
7.5.91 quadtet
The script command approximates integration of data on a 3D finite element mesh.
Syntax Description
out = quadtet(tet,vtx,u); outputs a scalar, the integral of u on the finite element mesh, where
tet: the connectivity array, Mx4, containing row entries that index the
four vertices of M tetrahedral
vtx: the vertex array, Nx3, containing row entries of (x,y,z) pairs
u: the data on the finite element mesh (Nx1)
See Also
Functions 1475 , interptri 1487 , quadtri 1507
7.5.92 expand
The script command returns the expansion coefficients between two arbitrary DFT monitors. Typically, the reference
monitor contains the modal fields for the expansion. In this case, the mode recorded by "monitor1" is expanded by
the modal fields recorded by "monitor_ref".
r r r r r r
dS E1 H 2* dS E2* H1
a = 0.25 * +
N conj ( N )
r r r* r r* r
dS E1 H 2 dS E2 H1
b = 0.25 * -
N conj ( N )
r r r*
N = 0.5 * dS E2 H 2
r r r
P = 0.5 * dS E1 H1*
For more detail on how to use this command, definitions on the parameters and how to interpret the results, please
see Using Mode Expansion Monitors 651 .
Note: N is the power of the waveguide mode. conj(N) is equal to N if this is a real number. For the unconjugated
Syntax Description
expand('monitor1','monitor_ref',x,y, outputs the expansion coefficients between the fields of two monitors
z); 'monitor1': the monitor name, of which expansion is performed,
contains E1 and H1
'monitor_ref': the reference monitor, contains E2 and H2
x/y/z: the displacement from the monitor a from the reference
monitor a_ref
See Also
Adding Objects 1532 , Using Mode Expansion Monitors 651 , setexpansion 1587 , removeexpansion 1587 , expand2 1508
7.5.93 expand2
The same as expand 1507 , but the expansion coefficients are returned in the unconjugated form:
r r r r r r
dS E1 H 2 d S E H
a = 0.25 * +
2 1
N N
r r r r r r
dS E1 H 2 dS E2 H1
b = 0.25 * -
N N
r r r
N = 0.5 * dS E2 H 2
r r r
P = 0.5 * dS E1 H1
For more detail on how to use this command, definitions on the parameters and how to interpret the results, please
see Using Mode Expansion Monitors 651 .
Syntax Description
expand2('monitor1','monitor_ref',x, outputs the expansion coefficients between the fields of two monitors
y,z); 'monitor1': the monitor name, of which expansion is performed,
contains E1 and H1
'monitor_ref': the reference monitor, contains E2 and H2
x/y/z: the displacement from the monitor a from the reference
monitor a_ref
See Also
Adding Objects 1532 , Using Mode Expansion Monitors 651 , setexpansion 1587 , removeexpansion 1587 , expand 1507
7.5.94 interptet
The script command interpolates a data set in 3D from tetrahedral to rectangular grid. The data can be complex.
Syntax Description
out = interptet(tet, vtx,u, xi, Does a tetrahedral to rectilinear interpolation of a function and outputs
yi,zi,extrap_val); a PxQxR array of interpolated values, f(xi,yi,zi).
u is existing data of the finite element mesh (Nx1).
xi (length P) / yi (length Q)/zi (length R) specifies the points where u
is to be sampled on the rectilinear mesh, in the x-direction y-
direction and the z-direction
tet is the elements of the tetrahedral mesh taken from the simulation
region, the connectivity array, Mx4, containing row entries that index
the 4 vertices of M triangles
vtx are the vertices of the tetrahedral mesh, Nx3, containing row
entries of (x,y,z) pairs, taken from the simulation region
extrap_val(optional): if an interpolation point is outside of the finite
element mesh, the point will be assigned this value (default is Inf)
See Also
quadtet 1507 , quadtri, interptri 1487
7.5.95 quadtet
The script command approximates integration of data on a 3D finite element mesh.
Syntax Description
out = quadtet(tet,vtx,u); outputs a scalar, the integral of u on the finite element mesh, where
tet: the connectivity array, Mx4, containing row entries that index the
four vertices of M tetrahedral
vtx: the vertex array, Nx3, containing row entries of (x,y,z) pairs
u: the data on the finite element mesh (Nx1)
See Also
Functions 1475 , interptri 1487 , quadtri 1507
7.5.96 norm
The script command returns the natural norm induced by the L2-norm (Spectral Norm).
Syntax Description
out = norm(y); Returns y to the L2-norm, y is a matrix.
See Also
Functions 1475
7.5.97 chol
Returns the lower triangular matrix L where A = LL* (Cholesky lower triangular factorization of a matrix). The matrix
A must be Hermitian positive definite and can be real or complex.
Syntax Description
L = chol(A); Returns an lower triangular matrix L from the diagonal and upper
triangle of matrix A, satisfying the equation A = LL*
See Also
Functions 1475
7.5.98 svd
Returns a 3-cell array for the singular value decomposition. The command supports real and complex A.
Syntax Description
[U,S,V*] = svd(A); Returns a 3-cell array for the decomposition. A diagonal matrix S of
the same dimension as A, with non-negative diagonal elements in
decreasing order, and unitary matrices U and V*. V* is a conjugate
transpose of a matrix V. If M = svd(A), then A = mult( M{1}, M{2},
M{3} ).
Example
Returns U, S and V
?U = M{1};
?S = M{2};
?V_ctranspose = M{3};
?max(abs( mult(U,S,V_ctranspose)-A)); # zerp
result:
-0.6 0.8 0
0.8 0.6 0
-0 -0 1
result:
2.5 0 0
0 2.5 0
0 0 1.2
result:
-1 -0 -0
0 1 -0
0 0 1
result:
2.22045e-016
See Also
Functions 1475 , eig 1485
7.5.99 colormatchfunction
Returns the set of color matching functions
x , y , z selected by the user. These functions are dimensionless. The
available sets are the CIE 1936 and CIE 1964.
References:
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.
Syntax Description
?colormatchfunction; Show the list of available color matching functions.
M= Get the desired set of color matching functions from the list of available
colormatchfunction("functions"); ones.
Examples
This example shows how to get the list of available color matching functions and plot them.
M1 = colormatchfunction("CIE 1936");
M2 = colormatchfunction("CIE 1964");
lambda1 = pinch(M1,2,1)*1e9; #Get the wavelength values where the function M1 is evaluate
xbar1 = pinch(M1,2,2);
ybar1 = pinch(M1,2,3);
zbar1 = pinch(M1,2,4);
lambda2 = pinch(M2,2,1)*1e9; #Get the wavelength values where the function M2 is evaluate
xbar2 = pinch(M2,2,2);
ybar2 = pinch(M2,2,3);
zbar2 = pinch(M2,2,4);
plotxy(lambda1,xbar1,lambda1,ybar1,lambda1,zbar1,lambda2,xbar2,lambda2,ybar2,lambda2,zbar
legend("xbar (CIE 1936)","ybar (CIE 1936)","zbar (CIE 1936)","xbar (CIE 1964)","ybar (CIE
color scale
See Also
Plotting commands 1524 , plotxy 1525 , pinch 1483 , colormatch 1512 , colormatchxy 1513 , colormatchuv 1515
7.5.100 colormatch
Returns the X, Y and Z tristimulus values calculated for a given spectral power distribution (power per unit area per
unit wavelength) and a selected set of color matching functions. The colormatch function assumes that the units of
wavelength for the spectral power distribution are nanometers, for example, W/(m2 nm). The available color functions
are the CIE 1936 and CIE 1964.
The X, Y, Z values have dimensions of power per unit area, in the units used for the spectral power distribution. The
expressions for calculating the X, Y and Z values are:
X = I ( l ) x ( l )d l
Y = I ( l ) y ( l )d l
Z = I ( l ) z ( l )d l
where
I ( l ) is the spectral power distribution and x , y , z are the color matching functions.
References:
https://en.wikipedia.org/wiki/CIE_1931_color_space
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.
Syntax Description
cm = colormatch(spec, lam, Returns X, Y, Z for the spectrum spec evaluated at the wavelength
"functions"); values in lam (units of meters), using the selected color functions. If no
functions are specified, the "CIE 1936" set is used.
Examples
This example shows how to calculate the X, Y, Z values for a given spectral power distribution.
plot(lambda*1e9,spectrum,"wavelength(nm)","test spectrum");
The following figure shows the plot of the test spectrum created by the example code.
color scale
See Also
Plotting commands 1524 , plot 1525 , colormatchfunction 1511 , colormatchxy 1513 , colormatchuv 1515
7.5.101 colormatchxy
Returns the x and y chromaticity values calculated for a given spectral power distribution (power per unit area per
unit wavelength) and a selected set of color matching functions. The colormatchxy function assumes that the units
of wavelength for the spectral power distribution are nanometers, for example, W/(m2 nm). The available color
functions are the CIE 1936 and CIE 1964.
The x and y values are dimensionless and they are related to the X, Y and Z values by:
X Y
x= ,y=
X +Y + Z X +Y + Z
References:
https://en.wikipedia.org/wiki/CIE_1931_color_space
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.
Syntax Description
cmxy = Returns x, y for the spectrum spec evaluated at the wavelength values
colormatchxy(colormatch(spec, in lam (units of meters), using the selected color functions. If no
lam, "functions")); functions are specified, the "CIE 1936" set is used.
Examples
This example shows how to calculate the x, y values for a given spectral power distribution.
plot(lambda*1e9,spectrum,"wavelength(nm)","test spectrum");
The following figure shows the plot of the test spectrum created by the example code.
color scale
See Also
Plotting commands 1524 , plot 1525 , colormatchfunction 1511 , colormatch 1512 , colormatchuv 1515
7.5.102 colormatchuv
Returns the u' and v' chromaticity values calculated for a given spectral power distribution (power per unit area per
unit wavelength) and a selected set of color matching functions. The colormatchuv function assumes that the units of
wavelength for the spectral power distribution are nanometers, for example, W/(m2 nm). The available color functions
are the CIE 1936 and CIE 1964.
The u' and v' values are dimensionless and they are related to the X, Y and Z values by:
4X 9Y
u' = , v' =
X + 15Y + 3Z X + 15Y + 3Z
References:
https://en.wikipedia.org/wiki/CIE_1931_color_space
http://en.wikipedia.org/wiki/CIELUV
CIE Proceedings (1932), 1931. Cambridge: Cambridge University Press.
CIE Proceedings (1964) Vienna Session, 1963, Vol. B, pp. 209-220 (Committee Report E-1.4.1), Bureau Central de
la CIE, Paris.
Syntax Description
cmuv = Returns u', v' for the spectrum spec evaluated at the wavelength values
colormatchuv(colormatch(spec, in lam (units of meters), using the selected color functions. If no
lam, "functions")); functions are specified, the "CIE 1936" set is used.
Examples
This example shows how to calculate the u', v' values for a given spectral power distribution.
plot(lambda*1e9,spectrum,"wavelength(nm)","test spectrum");
The following figure shows the plot of the test spectrum created by the example code.
color scale
See Also
Plotting commands 1524 , plot 1525 , colormatchfunction 1511 , colormatch 1512 , colormatchxy 1513
7.5.103 erf
Error function as defined by the following equation:
2 z
erf ( z ) = ( )
exp - t 2 dt
p 0
Syntax Description
out=erf(z); Returns error function of z where z is a scalar number or matrix of
scalar numbers.
Examples
Plot the error function from z=-5 to 5.
The following figure shows the plot created by the example code.
See Also
Functions 1475 , erfc 1517
7.5.104 erfc
Complementary error function as defined by the following equation:
2 z
erfc( z ) = 1 - ( )
exp - t 2 dt
p 0
Syntax Description
out=erfc(z); Returns the complementary error function of z where z is a scalar
number or matrix of scalar numbers.
Examples
Plot the complementary error function from z=-5 to 5.
The following figure shows the plot created by the example code.
See Also
Functions 1475 , erf 1516
7.5.105 unique
Returns an array containing all unique values in a matrix
Syntax Description
out=unique(a); Returns an array containing containing all unique values in the matrix
a.
Examples
Define a matrix containing elements which are not unique and print out the unique values to the script prompt.
# define a matrix a
a = [0,0,0;
1+1i,0,0;
1,1,0;
0.25,.25,0;
0.8,.25,0;
0.25,.8,0;
0.25,.25,1];
result:
0+0i
0.25+0i
0.8+0i
1+0i
1+1i
See Also
Functions 1475
7.5.106 uniquevertices
Given a matrix of vertices, returns a matrix of unique vertices with differences in values larger than a specified
tolerance.
Syntax Description
out=uniquevertices(vertexTable, Returns unique elements of a matrix with differences in values larger
absTolerance); than a specified tolerance.
See Also
Functions 1475
7.5.107 chpts
Samples function on Chebyshev grid. Chebyshev interpolation is useful for accurately interpolating a smooth function
using a very small number of samples. The key requirement for this type of interpolation to work is that the function
is sampled on the Chebyshev roots grid, which can be done by using this command.
Syntax Description
x=chpts(xmin,xmax,NumPts,option); Returns Chebyshev roots grid on interval between xmin and xmax
that can be used to sample a smooth function.
NumPts defines the number of point on given interval.
Option:
If option=1 is selected, the vector x will not include the endpoints
If option=2 is selected, the vector x will include the endpoints
See Also
dcht 1521 ,chebin 1519 ,icht 1519 ,interp 1487
7.5.108 chebin
Returns Chebyshev interpolation of a sampled function. Chebyshev interpolation is useful for accurately interpolating
a smooth function using a very small number of samples. The key requirement for this type of interpolation to work is
that the function be sampled on the Chebyshev roots grid.
Syntax Description
chebin(x,f,xi,xmin,xmax) This command interpolates the function f onto the xi points. It assumes
that f contains the samples of the function taken on the Chebyshev
roots grid specified in x; x must be constructed by the call
See Also
dcht 1521 ,chpts 1519 ,icht 1519
7.5.109 cov
This command calculates the covariance matrix.
Syntax Description
cov(A); Calculate the covariance matrix.
cov(A, B);
C = cov(A) returns the covariance. A is a matrix whose columns
represent random variables and whose rows represent observations;
C is the covariance matrix with the corresponding column variances
along the diagonal.
See Also
Functions 1475 , corrcoef 1520 , corrtransf 1520
7.5.110 corrcoef
This command calculates the correlation matrix.
Syntax Description
corrcoef(A); Calculate the correlation matrix.
corrcoef(A, B);
R = corrcoef(A) returns the matrix of correlation coefficients for A,
where the columns of A represent random variables and the rows
represent observations.
See Also
Functions 1475 , cov 1520 , corrtransf 1520
7.5.111 corrtransf
This command calculates the transformation matrix.
Syntax Description
See Also
Functions 1475 , cov 1520 , corrcoef 1520
7.5.112 dcht
Returns the Chebyshev interpolation coefficients. The amplitude of the coefficients decreases exponentially and the
last coefficient offers an estimate of the relative accuracy of the interpolation.
Syntax Description
coeff=dcht(f,option); Returns the Chebyshev interpolation coefficients of a sampled function
f. The function f must be sampled on a Chebyshev roots grid.
Option:
If option=1 is selected, the vector x will not include the endpoints
If option=2 is selected, the vector x will include the endpoints
Examples
This example shows how to obtain interpolation coefficients from a sampled function:
See Also
chpts 1519 ,chebin 1519 ,icht 1521
7.5.113 icht
This command takes the Chebyshev interpolation coefficients and returns the corresponding function samples.
Syntax Description
out=icht(coeff,option); Returns function samples from Chebyshev interpolation coefficients
coeff.
Option:
If option=1 is selected, the vector x will not include the endpoints
If option=2 is selected, the vector x will include the endpoints
Examples
This example shows how to obtain interpolation coefficients from a sampled function and the calculates back the
function samples from the coefficients:
xmin = 0;
xmax = 1;
x = chpts(xmin,xmax,Nc,1); # Returns Chebyshev roots grid on interval between xmin and x
f = exp(1i*2*pi*x); # Function sampling using Chebyshev grid
coeff = dcht(f,1); # Get interpolation coefficients
# Calculate the function samples from the coefficients and compare them to the original f
?icht(coeff,1);
?f;
See Also
dcht 1521 ,chpts 1519 ,chebin 1519
7.5.114 besselj
This command computes the Bessel function of the first kind.
Syntax Description
out=besselj(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.
See Also
bessely 1522 , besseli 1522 , besselk 1523
7.5.115 bessely
This command computes the Bessel function of the second kind.
Syntax Description
out=bessely(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.
See Also
besselj 1522 , besseli 1522 , besselk 1523
7.5.116 besseli
This command computes the modified Bessel function of the first kind.
Syntax Description
out=besseli(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.
See Also
bessely 1522 , besselj 1522 , besselk 1523
7.5.117 besselk
This command computes the modified Bessel function of the second kind.
Syntax Description
out=besselk(nu, z); "nu" is the order and "z" could be an array. Both nu and z need to be
real.
See Also
bessely 1522 , besseli 1522 , besselj 1522
Command Description
for 1523 For loop.
if 1523 If statement.
while 1523 A for loop must be used. See the for loop section.
7.6.1 for
for loops allow some operations to be repeated a number of times. A while loop can be implemented when using the
three argument version of for.
Syntax Description
for(x=1:100) { ?x; } Single argument for loop.
The loop will be sequentially executed for each value of x.
for(x=1; x<= 100; x=x+1) { Three argument for loop.
?x; x=1 at the start of the loop. The loop continues while x <=100 and sets x=x
} +1 at each pass.
x=1; This is equivalent to a while loop that will execute while x<10.
for(0; x<10; 0) {
?x;
x=x+1;
}
See Also
Loops 1523 , if 1523
7.6.2 if
The scripting language supports if statements in the following forms:
Syntax Description
Examples
This example shows a simple if, OR, AND logical statement
clear;
a=1;
b=2;
d=3;
if((a==1)|(b==2)&(d==3)){
?"correct";}
else{
?"not correct";}
See Also
Loops 1523 , for 1523 , Operators 1467 , == 1469 , almostequal 1470 ,? 1474
Plotting functions
Command Description
plot 1525 Makes line plots.
plotxy 1525 Makes line plots, when data sets are sampled at different position vectors.
polar 1526 Makes polar plots.
polar2 1527 Makes polar plots, when data sets are sampled at different position vectors.
polarimage 1528 Makes a 2D polar image plot.
smithchart 1528 Makes an impedance Smith chart.
histc 1528 Makes a histogram plot.
legend 1529 Makes a legend on a figure with line plots.
image 1529 Makes 2D image plots.
setplot 1530 Sets figure properties.
visualize 1529 Pass in simulation data to the visualizer.
add2visualizer 1530 Adds data to an existing visualizer
vectorplot 1531 Makes vector plots.
holdon 1526 Switches on the mode to hold multiple mathematical functions on the same
figure.
holdoff 1526 Switches off the mode to hold multiple mathematical functions on the same
figure.
7.7.1 plot
Create line plots. All data sets must be sampled on the same position vector.
See plotxy for data sets that are sampled on different position vectors.
Syntax Description
out = plot(x,y); Creates a plot of y vs x, y and x are both 1D vectors with the same
length.
The figure number is returned.
plot(x,y); x is a nx1 matrix.
y is a nxm matrix.
This will generate a graph with m lines. (y(1:n,1) vs x, y(1:n,2) vs x,
etc)
plot(x,y1,y2,y3); Creates a plot with 3 curves, x,y1, y2, y3 must be the same length,
returns the figure number.
plot(x,y, "x label", "y label", Creates a plot of y vs x with axis labels and a title, returns the figure
"title"); number.
plot(x,y, "x label", "y label", "title", Creates a plot with desired options. Options can be be
"options"); log10x, log10y, loglog
plot points
greyscale
polar (same as the polar script command)
any comma separated list of the above, for example
"log10x,greyscale"
Returns the figure number.
See Also
Plotting commands 1524 , plotxy 1525 , holdon 1526 legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 ,
visualize 1529 , vectorplot 1531 , polar 1526
7.7.2 plotxy
Create line plots. In particular, this function is used when the data sets are sampled on different position vectors.
Syntax Description
out = plotxy(x,y); Creates a plot of y vs x, y and x are both 1D vectors with the same
length.
The figure number is returned.
plotxy(x1,y1,x2,y2,xn,yn); Creates a plot with multiple curves. The xn-yn pairs must have the
same length, but x1, x2, and xn can have different start-end values and
resolutions. It returns the figure number.
plotxy(x1,y1,x2,y2, "x label", "y Creates line plots with axis labels and a title, returns the figure
label", "title"); number.
See Also
Plotting commands 1524 , plot 1525 , legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , visualize 1529 ,
vectorplot 1531 , holdon 1526
7.7.3 holdon
This script command that can hold multiple function on a single plot. Note that, the labeling and plot options would
follow the first plot and ignore options in the second plot followed by a warning. The command setplot can be
used instead.
Syntax Description
holdon; Switches on the mode to hold multiple mathematical functions on the
same figure.
See Also
Plotting commands 1524 , plot 1525 , plotxy 1525 , legend 1529 , setplot 1530 , log 1482 , log10 1482 , holdoff 1526
7.7.4 holdoff
This script command that can switch off the holdon mode.
Syntax Description
holdoff; Switches off the mode to hold multiple mathematical functions on the
same figure.
See Also
Plotting commands 1524 , plot 1525 , holdon 1526
7.7.5 polar
Create polar plots. All data sets must be sampled on the same position vector.
See polar2 for data sets that are sampled on different position vectors.
Syntax Description
out = polar(theta,rho) Creates a polar coordinate plot of the angle theta versus the radius rho.
theta is the angle from the x-axis to the radius vector specified in
Theta and rho can be vectors of the same length, or if the length of
theta is n, then y can be a nxm matrix.
7.7.6 polar2
Create polar plots. In particular, this function is used when the data sets are sampled on different position vectors.
Syntax Description
out = polar2(theta,rho) Creates a polar coordinate plot of the angle theta versus the radius rho.
theta is the angle from the x-axis to the radius vector specified in
radians; rho is the length of the radius vector.
Theta and rho can be vectors of the same length, or if the length of
theta is n, then y can be a nxm matrix.
7.7.7 polarimage
Create 2D polar image plots. This is typically used to plot far field data.
Syntax Description
polarimage(ux,uy,data); Creates a 2D image plot. If
ux is of dimension N x 1, where ux goes from -1 to 1
uy is of dimension M x 1, where uy goes from -1 to 1
data must be of dimension N x M
out = image(ux,uy,data, "x label", Creates a 2D image plot with axis labels
"y label", "title"); Optionally returns the figure number.
image(ux,uy,data, "x label", "y Creates a 2D image plot with axis labels and options, options can be
label", "title", "options"); logplot
See Also
Plotting commands 1524 , plot 1525 , polar 1526 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , visualize 1529 , Near to
far field projections 1657
7.7.8 smithchart
Plot impedance values in a Smith chart. The default impedance used for normalization is 50 Ohms; this can be
modified in the plot settings once the plot has been created (see Visualizer for rectilinear data 741 ).
Syntax Description
out = smithchart(Z); Creates a curve in a Smith chart with the impedance values in the
array Z. The array Z must be of the form NX1 or 1XN.
out = smithchart(Z1,Z2,Z3); Creates three curves in a Smith chart with the impedance values in the
arrays Z1, Z2 and Z3. Each array must be of the form NX1 or 1XN, but
they do not have to be of the same dimension.
See Also
Plotting commands 1524 , Visualizer for rectilinear data 741
7.7.9 histc
The script command create a histogram plot.
Syntax Description
out = histc(y); Creates a histogram plot of y.
Returns the figure number.
histc(y,n); Creates a histogram plot of y, using n bins.
Returns the figure number.
histc (y,n, "x label", "y label", Creates a histogram plot of y, using n bins, with axis labels and a title.
"title"); Returns the figure number.
See Also
Plotting commands 1524 , histogram 1455 , legend 1529 , plot 1525 , closeall 1531 , visualize 1529
7.7.10 legend
Add a legend to a line plot.
Syntax Description
legend("legend1","legend2",..., Adds a legend to the selected figure.
"legendn"); Parameters can be strings, or an array of strings
This function does not return any data.
See Also
Plotting commands 1524 , legend 1529 , plot 1525 , closeall 1531 , visualize 1529
7.7.11 image
Create 2D image plots.
Syntax Description
out = image(x,y,z); Creates a 2D image plot. If
x is of dimension N x 1
y is of dimension M x 1
z must be of dimension N x M
Returns the figure number.
image(x,y,z, "x label", "y label", Creates a 2D image plot with axis labels, returns the figure number.
"title");
image(x,y,z, "x label", "y label", Creates a 2D image plot with axis labels and options, options can be
"title", "options"); logplot
polar
red2blue
any comma separated list of the above
See Also
Plotting commands 1524 , plot 1525 , closeall 1531 , setplot 1530 , exportfigure 1531 , visualize 1529 , polarimage 1528 , vectorplot 1531
7.7.12 visualize
Send data to the visualizer.
For FDTD,
Syntax Description
visualize(R); Plots the dataset R in the Visualizer.
visualize(R,T); Send two datasets to the Visualizer.
See Also
Plotting commands 1524 , Datasets 1461 , exportfigure 1531 , image 1529 , plot 1525 , setplot 1530 , closeall 1531
7.7.13 add2visualizer
Adds data to an existing visualizer
Syntax Description
add2visualizer( dataset, visualizer This command adds data to an existing visualizer. If there is no
number ) visualizer corresponding to the visualizer number, then the command is
ignored.
See Also
Plotting commands 1524 , Datasets 1461 , exportfigure 1531 , image 1529 , plot 1525 , setplot 1530 , closeall 1531
7.7.14 selectfigure
Selecting a figure will show the figure on screen (give it focus). A warning will be generated if the figure does not
exist.
Syntax Description
selectfigure; Selects the last figure that was created.
This function does not return any data.
selectfigure(1); Selects figure 1.
See Also
Plotting commands 1524 , exportfigure 1531 , image 1529 , plot 1525 , setplot 1530 , closeall 1531
7.7.15 setplot
Set figure properties.
Syntax Description
?setplot; Creates a string which lists all figure properties for the figure that is
currently selected. Unless the selectfigure() command was called, the
most recently created plot will be selected.
setplot("property", "property Set the desired property of the currently selected figure to property
value"); value.
See Also
Plotting commands 1524 , image 1529 , plot 1525 , visualize 1529
7.7.16 exportfigure
Exports the current figure to a JPG image. If the file extension is not specified, ".jpg" will be used. The image size
will be the same as the figure window size.
If a file is overwritten, a warning will be generated. If an export fails, a warning will be generated.
Syntax Description
exportfigure("filename"); Exports the current figure to a JPG image with the name "filename".
The exported image will have the same size as the current figure.
exportfigure("filename",xres,yres); The exported image will have the specified resolution, xres,yres, in the
x,y directions respectively.
See Also
Plotting commands 1524 , selectfigure 1530 , image 1529 , plot 1525 , setplot 1530 , closeall 1531 , visualize 1529 , closeall 1531
7.7.17 closeall
Close all open figure windows.
Syntax Description
closeall; Close all open figure windows.
This function does not return any data.
See Also
Plotting commands 1524 , plot 1525 , image 1529
7.7.18 vectorplot
The script command vectorplot creates a vector plot from a rectilinear dataset. The rectilinear dataset must be a
vector, like the E field, and it must have no additional parameters (i.e. if you have E vs. x,y.z.f and f has 2 or more
values, then the command fails). Generally, it is easier to use visualize(E) and then select the vector plot option.
Syntax Description
vectorplot(E); Creates a vector plot of the dataset
See Also
Plotting commands 1524 , plotxy 1525 , legend 1529 , image 1529 , closeall 1531 , setplot 1530 , exportfigure 1531 , plot 1525
Simulation environment
Command Description
switchtolayout 1534 Closes the analysis window, deletes current simulation data and allows you to
manipulate simulation objects for a new simulation.
layoutmode 1535 Used to determine if the simulation file is open in layout or in analysis mode.
groupscope 1563 Changes the group scope.
addgroup 1535 Adds a container group to the simulation environment.
addanalysisgroup 1536 Add an analysis group.
addobject 1536 Add an object from the object library.
addgridattribute 1550 Add a grid attribute object.
importcsvlc 1555 Add LC grid attribute and optionally LC structure from CSV file.
Structures
Command Description
addcircle 1537 Add a circle primitive.
addcustom 1537 Add a custom primitive.
addimport 1537 Add an import primitive.
addpyramid 1538 Add a pyramid primitive.
addpoly 1538 Add a polygon primitive
addrect 1538 Add a rectangle primitive.
addring 1539 Add a ring primitive.
addsphere 1539 Add a sphere primitive.
addsurface 1539 Add a surface primitive.
addstructuregroup 1536 Add a structure group.
addlayer 1552 Adds a layer to the layer builder object.
addlayerbuilder 1553 Adds a layer builder object.
addplanarsolid 1536 Adds a planar solid object.
stlimport 1554 Adds an STL import object.
add2drect 1555 Adds a 2D rectangle in the simulation space.
add2dpoly 1555 Adds a 2D polygon in the simulation space.
addwaveguide 1555 Adds a waveguide in the simulation space.
Simulation region
Command Description
Sources
Command Description
adddipole 1545 Add a dipole source.
addgaussian 1545 Add a Gaussian source.
addplane 1545 Add a plane source.
(FDTD Solutions) addmode 1544 ; Add a mode source.
(Propagator) addmodesource 1544
addtfsf 1545 Add a TFSF source.
addimportedsource 1546 Add an imported source.
Monitors
Command Description
addindex 1546 Adds an index monitor.
addeffectiveindex 1551 Adds an effective index monitor.
addtime 1546 Adds a time monitor.
addmovie 1546 Adds a movie monitor.
addprofile 1547 Adds a profile monitor.
addpower 1547 Adds a power monitor.
addmodeexpansion 1551 Adds a mode expansion monitor.
addbandstructuremonitor 1552 Adds a band structure monitor.
addjfluxmonitor 1552 Adds a current flux monitor.
addchargemonitor 1552 Adds a charge monitor
addefieldmonitor 1552 Adds an electric field monitor
addemeindex 1541 Adds an index monitor for an EME solver region.
addemeprofile 1541 Adds a profile monitor for an EME solver region.
addheatfluxmonitor 1544 Adds a heat flux monitor
addtemperaturemonitor 1543 Adds a temperature monitor
Simulation environment
Command Description
switchtolayout 1534 Closes the analysis window, deletes current simulation data and allows you to
manipulate simulation objects for a new simulation.
switchtodesign 1535 Switches INTERCONNECT to design mode.
layoutmode 1535 Used to determine if the simulation file is open in design (layout) or in analysis
mode.
designmode 1535 Returns true if the simulation is currently in design mode.
groupscope 1563 Changes the group scope.
Adding Elements
Command Description
addelement 1551 Adds an element from the INTERCONNECT element library.
Boundary Conditions
Command Description
addbc 1540 Adds a boundary condition in DEVICE.
7.8.1 switchtolayout
Closes the analysis window and allows you to manipulate simulation objects for a new simulation. If a simulation file
is open in ANALYSIS mode, any commands to modify objects will return errors. You must switch to LAYOUT mode
before modifying any objects.
Syntax Description
switchtolayout; Switches to LAYOUT mode.
This function does not return any data.
See Also
Adding Objects 1532 , layoutmode 1535
7.8.2 switchtodesign
Switches INTERCONNECT from simulation to design mode.
Syntax Description
switchtodesign; Switches INTERCONNECT from simulation to design mode.
See Also
Adding Objects 1532 , switchtolayout 1534 , layoutmode 1535 , designmode 1535
7.8.3 layoutmode
Used to determine if the simulation file is open in layout or in analysis mode.
Syntax Description
?layoutmode; Returns 1 if in layout mode, and 0 if in analysis mode.
See Also
Adding Objects 1532 , switchtolayout 1534 , designmode 1535
7.8.4 designmode
Used to determine if the simulation file is in design mode.
Syntax Description
out = designmode; Returns 1 if in design mode, and 0 if not.
See Also
Adding Objects 1532 , switchtolayout 1534 , layoutmode 1535 , switchtodesign 1535
7.8.5 addgroup
Adds a container group to the simulation environment.
Syntax Description
See Also
Adding Objects 1532 , addtogroup 1567 , addstructuregroup 1536 , addanalysisgroup 1536
7.8.6 addstructuregroup
Adds a structure group to the simulation environment.
Syntax Description
addstructuregroup; Adds a structure group to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 , addtogroup 1567 , adduserprop 1567 , addgroup 1535 , addanalysisgroup 1536
7.8.7 addanalysisgroup
Adds an analysis group to the simulation environment.
Syntax Description
addanalysisgroup; Adds an analysis group to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 , addtogroup 1567 , adduserprop 1567 , addgroup 1535 , addstructuregroup 1536
7.8.8 addobject
Adds a object from the object library.
Syntax Description
addobject("script_ID"); Adds an object from the object library.
This function does not return any data.
?addobject; Returns names of objects in the library.
See Also
Adding Objects 1532 , addtogroup 1567 , adduserprop 1567
7.8.9 addplanarsolid
Adds a planar solid primitive with the specified vertices.
Syntax Description
See Also
Adding Objects 1532 , Primitives - adding planar solid objects 345
7.8.10 addcontact
Adds a new contact to the electrical contact table.
Syntax Description
addcontact; Adds a new contact to the electrical contact table.
This function does not return any data.
See Also
Adding Objects 1532
7.8.11 addcircle
Adds a circle primitive to the simulation environment.
Syntax Description
addcircle; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.12 addcustom
Adds a custom primitive to the simulation environment.
Syntax Description
addcustom; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.13 addimport
Adds an import primitive to the simulation environment.
Syntax Description
addimport; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.14 addpyramid
Adds a pyramid primitive to the simulation environment.
Syntax Description
addpyramid; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.15 addpoly
Adds a polygon primitive to the simulation environment.
Syntax Description
addpoly; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.16 addrect
Adds a rectangle primitive to the simulation environment.
Syntax Description
addrect; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.17 addtriangle
Adds a 3 vertex, triangle shaped polygon primitive to the simulation environment.
Syntax Description
See Also
Adding Objects 1532 , addpoly 1538
7.8.18 addring
Adds a ring primitive to the simulation environment.
Syntax Description
addring; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.19 addsphere
Adds a sphere primitive to the simulation environment.
Syntax Description
addsphere; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.20 addsurface
Adds a surface primitive to the simulation environment.
Syntax Description
addsurface; Adds primitive to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.21 addfdtd
Adds a FDTD simulation area to the simulation environment.
Syntax Description
addfdtd; Adds a simulation area to the simulation environment.
See Also
Adding Objects 1532
7.8.22 addfde
Adds an Finite Difference Eigenmode (FDE) solver region object to the MODE Solutions simulation environment.
Syntax Description
addfde; Add an FDE simulation region.
See Also
Adding Objects 1532
7.8.23 addvarfdtd
Adds a 2.5D varFDTD solver object to the MODE Solutions simulation environment.
Syntax Description
addvarfdtd; Add a 2.5D varFDTD simulation region.
See Also
Adding Objects 1532
7.8.24 addbc
Adds a new boundary condition in DEVICE.
Syntax Description
addbc('bc_type'); Adds a new boundary condition. The type of the boundary
condition is an input argument. There are three options; 'thermal
boundary', 'voltage boundary', and 'electrical contact'.
See Also
Adding Objects 1532
7.8.25 addeme
Adds a Eigenmode Expansion (EME) solver object to the MODE Solutions simulation environment.
Syntax Description
addeme; Add an EME simulation region.
See Also
Adding Objects 1532
7.8.26 addemeport
Adds a port to an EME solver object if there is an active EME solver region.
Syntax Description
addemeport; Add a port to the active EME solver region.
See Also
Adding Objects 1532
7.8.27 addemeindex
Adds an index monitor that can be used to return the spatial refractive index when using an EME solver region.
Syntax Description
addemeindex; Add an index monitor when using an EME solver region.
See Also
Adding Objects 1532
7.8.28 addemeprofile
Adds a profile monitor that can be used to return the spatial electric and magnetic field profiles when using an EME
solver region.
Syntax Description
addemeprofile; Add a profile monitor when using an EME solver region.
See Also
Adding Objects 1532
7.8.29 addmesh
Adds a mesh override region to the simulation environment.
Syntax Description
addmesh; Adds a mesh override region to the simulation environment.
This function does not return any data. In DEVICE, this command
adds an electrical mesh which applies to the 'CHARGE' solver.
See Also
Adding Objects 1532
7.8.30 addchargemesh
Adds a mesh override region to the 'CHARGE' simulation environment in DEVICE.
Syntax Description
addchargemesh; Adds a mesh override region to the 'CHARGE' simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.31 addheatmesh
Adds a mesh override region to the 'HEAT' simulation environment in DEVICE.
Syntax Description
addheatmesh; Adds a mesh override region to the 'HEAT' simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.32 addmeshconstraint
Adds a mesh override region to the simulation environment.
Syntax Description
addmeshconstraint("solver_name"); Adds a mesh override region to the simulation environment.The
input argument is the name of the solver, 'CHARGE' or 'HEAT'.
See Also
Adding Objects 1532
7.8.33 addimporttemperature
Adds an import temperature source to the CHARGE solver (only applicable to non-isothermal transport).
Syntax Description
addimporttemperature; Adds an import temperature source to the CHARGE solver. The
source only gets applied if the "temperature dependence" is set to
"non-isothermal."
Once the import temperature source is created, the data can be imported from a matlab (.mat) file using the GUI or
by assigning a dataset to the object using the importdataset 1590 script command. The dataset can be in rectilinear
or unstructured (finite-element) format.
See Also
Adding Objects 1532 , adduniformheat 1543 , addimportheat 1543
7.8.34 addimportheat
Adds a heat source to the simulation environment where the profile of the heat source is imported into DEVICE.
Syntax Description
addimportheat; Adds an import primitive to define a heat source. This format of the
command is only application when only one solver is present in the
model tree. If multiple solvers are present then use the second
format.
addimportheat("solver_name"); This format of the command will add an import heat source to the
solver defined by the argument. The "solver name" will be either
CHARGE or HEAT. For the CHARGE solver, the import heat
source only gets applied if the "temperature dependence" is set to
"coupled."
Once the import heat source is created, the data can be imported from a matlab (.mat) file using the GUI or by
assigning a dataset to the object using the importdataset 1590 script command. The dataset can be in rectilinear or
unstructured (finite-element) format.
See Also
Adding Objects 1532 , adduniformheat 1543
7.8.35 adduniformheat
Adds a constant heat source to the simulation environment.
Syntax Description
adduniformheat; Adds a constant heat source.
See Also
Adding Objects 1532 , addimportheat 1543
7.8.36 addtemperaturemonitor
Adds a temperature monitor to the DEVICE simulation environment. The monitor can only be added if the simulation
environment already has a 'HEAT' or 'CHARGE' (or both) solver present.
Syntax Description
addtemperaturemonitor; Adds a temperature monitor to the simulation environment. This format
of the command is only application when only one solver is present in
the model tree. If multiple solvers are present then use the second
format
addtemperaturemonitor("solver_na This format of the command will add a temperature monitor to the
me"); solver defined by the argument. The "solver name" will be either
CHARGE or HEAT. For the CHARGE solver, the temperature
monitor only works if the "temperature dependence" is set to "non-
isothermal" or "coupled."
See Also
Adding Objects 1532 , addheatfluxmonitor 1544
7.8.37 addheatfluxmonitor
Adds a heat flux monitor to the DEVICE simulation environment. The monitor can only be added if the simulation
environment already has a 'HEAT' solver present.
Syntax Description
addheatfluxmonitor; Adds a heat flux monitor to the simulation environment.
See Also
Adding Objects 1532 , addtemperaturemonitor 1543
7.8.38 addmode
Adds a mode source to the simulation environment for FDTD. For MODE, adds an eigenmode solver to the
simulation environment.
For FDTD,
Syntax Description
addmode; Adds source to the simulation environment.
This function does not return any data.
For MODE,
Syntax Description
addmode; Add an eigenmode solver to the simulation environment.
See Also
Adding Objects 1532 , updatesourcemode 1579
7.8.39 addmodesource
Adds a mode source to the simulation environment.
Syntax Description
addmodesource; Adds source to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 , addmode 1544 , updatesourcemode 1579
7.8.40 adddipole
Adds a dipole source to the simulation environment.
Syntax Description
adddipole; Adds source to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.41 addgaussian
Adds a gaussian source to the simulation environment.
Syntax Description
addgaussian; Adds source to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.42 addplane
Adds a plane wave source to the simulation environment.
Syntax Description
addplane; Adds source to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.43 addtfsf
Adds a Total Field Scattered Field (tfsf) source to the simulation environment.
Syntax Description
addtfsf; Adds source to the simulation environment.
This function does not return any data.
See Also
7.8.44 addimportedsource
Adds an imported source to the simulation environment.
Syntax Description
addimportedsource; Adds source to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 , asapimport 1441 , asapload 1440 , asapexport 1440
7.8.45 addindex
Adds an index monitor to the simulation environment.
Syntax Description
addindex; Adds monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.46 addtime
Adds a time monitor to the simulation environment.
Syntax Description
addtime; Adds monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.47 addmovie
Adds a movie monitor to the simulation environment.
Syntax Description
addmovie; Adds monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.48 addprofile
Adds a profile monitor to the simulation environment.
Syntax Description
addprofile; Adds monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.49 addpower
Adds a power monitor to the simulation environment.
Syntax Description
addpower; Adds monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 ,
7.8.50 createbeam
Creates a new Gaussian beam that is accessible from the deck.
Syntax Description
createbeam; Creates a Gaussian beam in the deck/global workspace. The
Gaussian beam has the properties specified in the Overlap analysis-
>Beam tab of the analysis window
Returns the name of the Gaussian beam created, which is by default
"gaussian#" (# being the total number of Gaussian beams existing in
the current deck).
See Also
Adding Objects 1532
7.8.51 adddevice
Adds a Device simulation region to the simulation environment.
Syntax Description
adddevice; Add a device simulation region.
See Also
7.8.52 addchargesolver
Adds an electrical (charge transport) simulation region to the simulation environment.
Syntax Description
addchargesolver; Adds an electrical (charge transport) simulation region.
See Also
Adding Objects 1532
7.8.53 addheatsolver
Adds a thermal (heat transport) simulation region to the simulation environment.
Syntax Description
addheatsolver; Adds a thermal (heat transport) simulation region.
See Also
Adding Objects 1532
7.8.54 adddope
Adds a region with constant doping to the simulation environment.
Syntax Description
adddope; Add a constant doping region.
See Also
Adding Objects 1532
7.8.55 adddiffusion
Adds a diffusion region to the simulation environment.
Syntax Description
adddiffusion; Add a diffusion region.
See Also
Adding Objects 1532
7.8.56 addimportdope
Adds a doping region to the simulation environment where the doping profile has been or will be imported into
DEVICE.
Syntax Description
addimportdope; Add an import primitive to define a doping region.
Once the import doping object is created, the doping data can be imported from a matlab (.mat) file using the GUI or
by assigning a dataset to the object using the importdataset 1590 script command. The dataset can be a rectilinear
or an unstructured dataset. Doping data can be imported into the solver workspace from other tools (e.g. process
simulation) using the Dataset builder 375 .
See Also
Adding Objects 1532 , importdataset 1590 , Dataset builder 375
7.8.57 addbulkgen
Adds a bulk generation region to the simulation environment.
Syntax Description
addbulkgen; Add a bulk generation region.
See Also
Adding Objects 1532
7.8.58 addimportgen
Adds a generation region to the simulation environment where the generation profile has been imported into DEVICE.
Syntax Description
addimportgen; Add an import primitive to define a generation region.
See Also
Adding Objects 1532 , adddeltachargesource 1549
7.8.59 adddeltachargesource
Adds a point generation source to the simulation environment.
Syntax Description
adddeltachargesource; Add a point generation source to the simulation environment.
See Also
Adding Objects 1532 , addimportgen 1549
7.8.60 addgridattribute
Adds a grid attribute object to the simulation environment. See the Reference Guide Attributes 399 page for more
information.
Syntax Description
addgridattribute("type"); Adds a grid attribute object to the simulation.
type: Type of attribute to add. Options are "lc orientation",
"permittivity rotation", "matrix transform", "np density", or
"temperature".
addgridattribute("type",dataset); Adds a grid attribute with spatially varying data.
type: Type of attribute to add. Options are "lc orientation",
"permittivity rotation", "matrix transform", "np density", or
"temperature".
dataset: A dataset containing the grid attribute data - see the below
table for details.
Data Simulation Dataset type Name for variables Name for variables
object defining coordinate data defining actual data
Liquid crystal 'lc orientation' grid Rectilinear x, y, z u
orientation (3 attribute
element unit
vector)
Rotation angles 'permittivity Rectilinear x, y, z theta, phi, psi
in radians rotation' grid
attribute
Unitary 'matrix transform' Rectilinear x, y, z U
transform matrix grid attribute
(3x3 tensor)
Charge density 'np density' grid Unstructured x, y, z, elements (see n, p
attribute Dataset builder 375 for more
information)
Temperature in 'temperature' grid Unstructured x, y, z, elements (see N
Kelvin attribute Dataset builder 375 for more
information)
Example
The following script is an excerpt from LCD_twist.lsf in the Twisted Nematic LCD 1955 application example which
defines a spatially varying liquid crystal.
# define x/y/z
x = 0;
y = 0;
z = linspace(0e-6,5e-6,100);
X = meshgrid3dx(x,y,z);
Y = meshgrid3dy(x,y,z);
Z = meshgrid3dz(x,y,z);
n = matrix(length(x),length(y),length(z),3);
n(1:length(x),1:length(y),1:length(z),2) = sin(Z*pi*1e5);
n(1:length(x),1:length(y),1:length(z),3) = Z;
See Also
Adding Objects 1532 , Datasets 1461 , importdataset 1590 , cleardataset 1591 , unstructureddataset 1466 , Dataset builder 375
7.8.61 addelement
Adds an element from the INTERCONNECT element library to the simulation environment.
Syntax Description
addelement("element"); Adds an element from the element library.
If no element name is given, this command will add a compound
element by default.
7.8.62 addmodeexpansion
Adds a mode expansion monitor to the simulation environment.
Syntax Description
addmodeexpansion; Adds a mode expansion monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532 , Using Mode Expansion Monitors 651 , setexpansion 1587 , removeexpansion 1587 , updatemodes 1580 ,
seteigensolver 1582 , geteigensolver 1582
7.8.63 addeffectiveindex
Adds an effective index monitor to the simulation environment.
Syntax Description
addindex; Adds an effective index monitor to the simulation environment.
This function does not return any data.
See Also
Adding Objects 1532
7.8.64 addchargemonitor
Adds a charge monitor to the simulation environment.
Syntax Description
addchargemonitor; Adds a charge monitor to the simulation environment.
See Also
Adding Objects 1532 , addbandstructuremonitor 1552 , addefieldmonitor 1552 , addjfluxmonitor 1552
7.8.65 addefieldmonitor
Adds an electric field monitor to the simulation environment.
Syntax Description
addefieldmonitor; Adds an electric field monitor to the simulation environment.
See Also
Adding Objects 1532 , addbandstructuremonitor 1552 , addchargemonitor 1552 , addjfluxmonitor 1552
7.8.66 addbandstructuremonitor
Adds a band structure monitor to the simulation environment.
Syntax Description
addbandstructuremonitor; Adds a band structure monitor to the simulation environment.
See Also
Adding Objects 1532 , addefieldmonitor 1552 , addchargemonitor 1552 , addjfluxmonitor 1552
7.8.67 addjfluxmonitor
Adds a current flux monitor to the simulation environment.
Syntax Description
addjfluxmonitor; Adds a current flux monitor to the simulation environment.
See Also
Adding Objects 1532 , addefieldmonitor 1552 , addchargemonitor 1552 , addbandstructuremontor 1552
7.8.68 addlayer
Adds a layer to the layer builder object. The command only works if there is a layer builder object and is selected.
Syntax Description
addlayer; Adds a layer to the selected layer builder object
addlayer("name"); Adds a layer named "name"
See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , getcelllist 1591 , getlayerlist 1591 , setlayer 1591
7.8.69 addlayerbuilder
Adds a layer builder object.
Syntax Description
addlayerbuilder; Adds a layer builder object
See Also
addlayer 1552 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , getcelllist 1591 , getlayerlist 1591 , setlayer 1591
7.8.70 extractstructure
Creates an a polygon (in 2D) or a planar solid (in 3D) using the finite-element geometric data stored in an
unstructured dataset.
Syntax Description
extractstructure(D); Creates a polygon for 2D data and a planar solid for 3D data.
The parameter D is the input unstructured dataset.
extractstructure(D, Rel_Coplanar_Tol); Same as the above command, but the relative tolerance to
merge coplanar elements will be set to the value specified.
extractstructure(D, Rel_Coplanar_Tol, Same as the above command, but uses Laplacian smoothing
Smoothing_Pass_Count); on the surface mesh. The number of iteration is defined by
the value specified.
extractstructure(D, Rel_Coplanar_Tol, Same as the above command, but the allowed angular
Smoothing_Pass_Count, difference between triangles around a vertex where the vertex
Smoothing_Angle_Coplanar_Tol); can be moved is set to the value specified.
extractstructure(D, Rel_Coplanar_Tol, Same as the above command, but allows re-triangulation of
Smoothing_Pass_Count, the facets.
Smoothing_Angle_Coplanar_Tol,
Allow_Tessalation);
Run the script file (extract_2d.lsf) with the DEVICE project file (geom2d.ldev) provided below for a 2D example of this
command. Here, we use the ID of the "Device region" objects to single out any part of the structure with ID = 3,
which would correspond to the semiconductor material in this example and then construct an object in that shape.
Associated files
extract_2d.lsf
geom2d.ldev
See Also
Dataset builder 375 , Datasets 1461
7.8.71 stlimport
Adds a structure to the simulation environment with structure geometry loaded from specified STL file.
Syntax Description
stlimport(filename,scalingFactor, Add a new structure from specified STL type CAD file.
vertexRadius,debugFlag);
object again.
See Also
Adding Objects 1532 , readstltriangles 1451
7.8.72 addwaveguide
Adds a waveguide in the simulation space.
Syntax Description
addwaveguide; Adds a waveguide in the simulation space.
See Also
Adding Objects 1532
7.8.73 add2drect
Adds a 2D rectangle in the simulation space.
Syntax Description
add2drect; Adds a 2D rectangle in simulation space.
See Also
Adding Objects 1532
7.8.74 add2dpoly
Adds a 2D polygon in the simulation space.
Syntax Description
add2drect; Adds a 2D polygon in simulation space.
See Also
Adding Objects 1532 , Structure - 2D polygon 351 , Structure - 2D rectangle 349
7.8.75 importcsvlc
This command adds a LC grid attribute or analysis group containing a liquid crystal structure and LC grid attribute
with data imported from a specified csv (comma separated value) file without using the GUI import wizard. The
arguments allow you to make the same choices that are available in the GUI. For more information about the GUI
import wizard, see Import object - Liquid crystal from CSV 502 .
Syntax Description
importcsvlc(filename); Import the csv file from the specified filename. All arguments after the filename are
optional.
out = Import the csv file but specify if it should be imported as a single grid attribute or added
importcsvlc(filename,optio to an analysis group LC structure.
n);
out = Import the csv file and specify if it was originally exported from the x-z plane. This
importcsvlc(filename,optio option only applies to 2D datasets but is critical to get the orientation of the LC
n,exported_from_xz_plane structure correct when it is imported into FDTD Solutions in the x-y plane.
);
out = Import the csv file with additional axis rotations.
importcsvlc(filename,optio
n,exported_from_xz_plane
,rotations);
Example
# import the grid attribute into an LC analyis group and rotate 90 degrees about the x ax
importcsvlc("myfile.csv",true,true,[90,0,0]);
See Also
addgridattribute 1550 , cleardataset 1591 , importdataset 1590
Object properties
Command Description
adduserprop 1567 Add a user property to a structure group.
addanalysisprop 1567 Adds a analysis property to a selected object group.
addanalysisresult 1568 Adds a new result to an analysis group.
set 1568 Set a property of selected objects.
setbc 1560 Set the property of a boundary condition in DEVICE.
setnamed 1568 Set a property of any objects with a given name.
setcontact 1559 Set a property of an electrical contact.
setglobalmonitor 1569 Set global monitor properties.
setglobalsource 1569 Set global source properties.
setmodes 1570 Set mode labels.
setposition 1570 Set an element's vertical and horizontal positions.
setrectangle 1570 Set width and height of an element rectangle.
setactivesolver 1588 Set the specified solver as the active solver.
getactivesolver 1588 Get the active solver.
runsetup 1571 Force group setup scripts to run.
get 1571 Get a property of selected objects.
getbc 1562 Get a property of the named boundary condition in DEVICE
getcontact Get a property of an electrical contact.
getnumber 1572 Get the number of selected objects.
getnamed 1572 Get a property of any objects with a given name.
getnamednumber 1572 Get the number of objects with a given name.
getglobalmonitor 1573 Get global monitor properties.
Element/connection properties
Command Description
7.9.1 setcontact
Sets the properties of the electrical contacts. This command will return an error in analysis mode.
Syntax Description
setcontact("contact name","contact type", Sets the property of the specified contact with the contact
"property name", property value); type to the specified property value. Contact type can be dc
or transient.
setcontact("contact name", Sets the global property of the specified contact. Global
"global_property", property value) property can be "name","force ohmic", or "geometry".
Add a new contact. Don't change the name or anything. Then the following command will return all the available
properties to set. you will notice that not all of these are labeled the same in the GUI. For example the range start
and stop are just labeled start and stop in the GUI.
?setcontact('new_contact','dc');
dc mode
enable rse
enable rsh
enabled
fixed contact
force ohmic
name
range interval
?setcontact('new_contact','transient');
cse enable transient
cse table
cse time steps
csh enable transient
csh table
csh time steps
enable rse
enable rsh
enabled
fixed contact
force ohmic
name
rse
rse enable transient
rse table
rse time steps
rsh
rsh enable transient
rsh table
rsh time steps
voltage
voltage enable transient
voltage table
voltage time steps
See Also
getcontact
Available in
FDTD Solutions No
MODE Solutions No
INTERCONNECT No
DEVICE Yes
7.9.2 setbc
Sets the properties of the boundary conditions. This command will return an error in analysis mode.
Syntax Description
setbc("bc_name", "global_property", property Sets the global property of the specified boundary condition.
value); Global property can be "name", or "geometry".
setbc("bc_name", "bc_type", "property_name", Sets the property of the specified boundary condition with the
There are two groups of properties that belong to each boundary condition. Global properties that are required for all
boundary conditions and local properties that is specific to the type of the boundary condition.
Global property
Global properties include "name" and "geometry" of the boundary condition. The "geometry" property defines where
the boundary condition will be applied. It can be one edge of the simulation region or the intersection of a geometry
with an edge of the simulation region. The convention for defining the geometry follows the format
solid:solver_boundary.
# The following three lines create a boundary condition, set the name of to 'left' and as
addbc;
setbc("new_boundary","left");
setbc("left","geometry",":-x");
# The following line assigns the 'left' boundary condition to the intersection between th
setbc("left","geometry","substrate:-x");
Local property
Local properties include the type (model) of the boundary condition (fixed temperature, convection, ...) and the
different parameters used in the different models. The different models and parameters can be defined for both
'steady state' or 'transient' conditions. To learn about the different boundary condition models and the parameters
used, check the boundary condition pages for the CHARGE 686 and the HEAT 694 solvers.
# The following commands define the 'left' boundary condition to enforce a fixed temperat
See Also
addbc 1540
7.9.3 deletebc
Deletes named boundary condition in DEVICE.
Syntax Description
deletebc("bc_name"); Deletes the boundary condition named "bc_name".
See Also
Manipulating objects 1556 , deleteallbc 1563
7.9.4 getbc
Get the properties of a specific boundary condition in DEVICE.
Syntax Description
?getbc; Returns a list of names of the existing boundary conditions.
?getbc("bc_type"); Returns a list of names of the boundary conditions that fall under
the category defined by the input argument. The options for
"bc_type" are 'thermal boundary', 'voltage boundary', and 'electrical
contact'.
out = get("bc_name", "global Gets the global property (e.g. geometry) of the desired boundary
property_name"); condition.
out = get("bc_name", "bc_mode", Gets the local property of the desired boundary condition for the
"local property_name"); defined mode ("steady state" or "transient").
For example, Lets assume that we have 6 boundary conditions in a DEVICE project. Using the ?getbc command
will return the name of all the boundary conditions,
?getbc;
anode, cathode, top_conv, fixed_temp, cont_1, cont_2
If we want to see a list of a particular type of boundary condition (say, electrical contact),
?getbc("electrical contact");
anode, cathode
To see a global property such as the geometry to which a boundary condition is applied to,
?getbc('anode','geometry');
anode:
?getbc('fixed_temp','geometry');
:-z
?getbc('top_conv','geometry');
waveguide:+z
The notation for the geometry follows the format solid:solver_boundary. Therefore, we can see that the anode BC
applies to the anode geometry, the fixed_temp BC applies to the -z solver boundary, and the top_conv BC applies to
the interface between waveguide geometry and +z solver boundary.
To see a local property such as the voltage applied at the anode BC,
?getbc("anode","steady state","voltage");
result:
2
See Also
Manipulating objects 1556 , getnamed 1572 , addbc 1540 , setbc 1560
7.9.5 deleteallbc
Deletes all existing boundary conditions in DEVICE.
Syntax Description
deleteallbc; Deletes all the existing boundary conditions.
See Also
Manipulating objects 1556 , deletebc 1561
7.9.6 groupscope
Changes the group scope. Script commands that add or modify simulation object use the groupscope property to
know where to act within the object tree. For example, if you want to delete everything within a particular group, set
the groupscope to that group (i.e. ::model::my_group). If you want to delete all objects in the simulation, set the
group scope the root level (i.e. ::model).
Syntax Description
?groupscope; returns the current group scope
groupscope("group_name"); changes the group scope
See Also
Manipulating objects 1556 , delete 1563 , selectall 1564 , select 1564
7.9.7 deleteall
Deletes all objects in the current group scope.
Syntax Description
deleteall; Deletes all objects in the current group scope.
This function does not return any data.
See Also
Manipulating objects 1556 , groupscope 1563
7.9.8 delete
Deletes selected objects.
Syntax Description
delete; Deletes selected objects.
This function does not return any data.
See Also
Manipulating objects 1556 , groupscope 1563
7.9.9 selectall
Selects all objects in the current group scope.
Syntax Description
selectall; Selects all objects in the current group scope.
This function does not return any data.
See Also
Manipulating objects 1556 , groupscope 1563
7.9.10 unselectall
Unselect all objects and groups.
Syntax Description
unselectall; Unselects all objects and groups.
This function does not return any data.
See Also
Manipulating objects 1556
7.9.11 select
Selects objects with a given name in the current group scope. A failed select command will have the same result as
the unselectall command.
Syntax Description
select("name"); Selects objects with the name "name" in the current group scope.
This function does not return any data.
select("group name::name"); Selects all objects with the name "name" located in the group named
"group name". The group named "group name" must be in the current
group scope.
See Also
Manipulating objects 1556 , groupscope 1563 , unselectall 1564
7.9.12 selectpartial
Selects any objects with a given partial name.
Syntax Description
selectpartial("partialname"); Selects any objects where "partialname" can be found in the object
name provided the object is not in a group. To select objects located in
groups see the command below.
This function does not return any data.
selectpartial("partialgroupname::pa Selects any objects where "partialgroupname" can be found in the
rtialname"); group name and "partialname" can be found in the object name.
See Also
Manipulating objects 1556 , groupscope 1563
7.9.13 shiftselect
Same as select, but does not unselect other currently selected objects. Note that only objects from the same
"group" can be selected simultaneously.
Syntax Description
shiftselect("name"); The same as select("name"), but does not unselect currently selected
objects. Can be used to select multiple objects.
This function does not return any data.
shiftselect("group name::name"); The same as select("groupname::name"), but does not unselect
currently selected objects.
See Also
Manipulating objects 1556 , groupscope 1563
7.9.14 shiftselectpartial
Same as selectpartial, but does not unselect other currently selected objects.
Syntax Description
shiftselectpartial("partialname"); The same as selectpartial("partialname"), but does not unselect
currently selected objects. Can be used to select multiple objects.
This function does not return any data.
shiftselectpartial("partialgroupnam The same as selectpartial("partialgroupname::partialname"), but does
e::partialname"); not unselect currently selected objects. Can be used to select multiple
objects.
See Also
Manipulating objects 1556 , groupscope 1563
7.9.15 flipelement
Flip element in the schematic editor.
Syntax Description
flipelement("element"); Flips element in the schematic editor.
See Also
Manipulating objects 1556 , rotateelement 1566
7.9.16 rotateelement
Rotates element in the schematic editor.
Syntax Description
rotateelement("element"); Rotates element in the schematic editor.
See Also
Manipulating objects 1556 , flipelement 1566
7.9.17 move
Move selected objects.
Syntax Description
move(dx); In 2D or 3D, move by dx
move(dx,dy); In 2D or 3D, move by dx and dy.
This function does not return any data.
move(dx,dy,dz); In 3D, move by dx, dy, and dz.
In 2D, dz will be ignored.
See Also
Manipulating objects 1556 , copy 1566 , select 1564
7.9.18 copy
Create a copy of the selected objects. The copied objects will typically be identical (same name, position, etc). For
some objects that must have a unique name, '_1' will be appended to the name.
Syntax Description
copy; Copy the selected objects.
copy(dx); Same as copy; but with a specified move of dx.
copy(dx,dy); Same as copy; but with a specified move of dx, dy.
copy(dx,dy,dz); Same as copy; but with a specified move of dx, dy, dz.
See Also
Manipulating objects 1556 , move 1566 , select 1564 , cp (copy files) 1432 , copytoclipboard 1441
7.9.19 addtogroup
Add selected objects to a group.
Syntax Description
addtogroup("group name"); Adds selected object(s) to a group. If a group with name "group name"
already exists, then the objects are added to the existing group.
Otherwise, a group named "group name" is created.
This function does not return any data.
See Also
Manipulating objects 1556 , addgroup 1535 , addstructuregroup 1536 , addanalysisgroup 1536 , adduserprop 1567 , runsetup 1571
7.9.20 adduserprop
Adds a user defined custom property to the setup user defined structure and analysis groups.
Syntax Description
adduserprop("property name", Adds a user property to a selected structure group. The name is set to
type, value); "property name". The type is an integer from 0 to 5. The corresponding
variable types are
0 number
1 text
2 length
3 time
4 frequency
5 material
The value of the user property is set to value.
See Also
Manipulating objects 1556 , addstructuregroup 1536 , runsetup 1571
7.9.21 addanalysisprop
Adds a user defined custom analysis property to the setup user defined in structure and analysis groups.
Syntax Description
addanalysisprop("property name", Adds a analysis property to a selected object group. The name is set
type, value); to "property name". The type is an integer from 0 to 5. The
corresponding variable types are
0 number
1 text
2 length
3 time
4 frequency
5 material
The value of the user property is set to value.
See Also
Manipulating objects 1556 , addstructuregroup 1536 , runsetup 1571
7.9.22 addanalysisresult
Adds a new result to an analysis group object.
Syntax Description
addanalysisresult("A"); Adds a new result called "A" to an analysis group.
See Also
Manipulating objects 1556 , addstructuregroup 1536 , runsetup 1571
7.9.23 set
Set a property of currently selected objects. This command will return an error in analysis mode.
Syntax Description
?set; Returns a list of the properties of the selected object(s).
set("property",value); This will set the properties of a currently selected object, including pull-
downs and check boxes. It cannot be used to set the value of a
selected object in a group.
Value can be a number or string. This function does not return any
data.
set("property",value,i); This form can be used to set the property of the ith selected object
when multiple objects are selected. It cannot be used to set the value
of a selected object in a group.
The objects are ordered by their location in the object tree. The
uppermost selected object is given the index 1, and the index numbers
increase as you go down the tree.
See Also
Manipulating objects 1556 , get 1571 , setnamed 1568 , setmaterial 1672 , addmaterial 1672 , haveproperty 1573 , runsetup 1571 ,
runanalysis 1647
7.9.24 setnamed
Like the set command, except that the object name must be specified. This command will return an error in
analysis mode.
Syntax Description
See Also
Manipulating objects 1556 , set 1568 , get 1571 , getnamed 1572 , getnamednumber 1572
7.9.25 setglobalmonitor
Set global monitor properties. This command will return an error in analysis mode.
Syntax Description
?setglobalmonitor; Returns a list of the global monitor properties
setglobalmonitor("property",value); Set the global monitor property named "property" to a value.
This function does not return any data.
See Also
Manipulating objects 1556 , set 1568 , getglobalmonitor 1573 , setglobalsource 1569 , getglobalsource 1573
7.9.26 setglobalsource
Set global source properties. This command will return an error in analysis mode.
Syntax Description
?setglobalsource; Returns a list of the global source properties
setglobalsource("property",value); Set the global source property named "property" to a value.
This function does not return any data.
See Also
Manipulating objects 1556 , set 1568 , setglobalmonitor 1569 , getglobalmonitor 1573 , getglobalsource 1573
7.9.27 setmodes
Set mode labels.
Syntax Description
setmodes (TE,TM); Set a list of comma separated mode labels that will share the same s-
parameters. Orthogonal identifies are associated to each mode from 1
to number of modes.
See Also
Manipulating objects 1556
7.9.28 setposition
Set horizontal and vertical positions of an element.
Syntax Description
setposition("element",x,y); Set an element vertical and horizontal positions.
See Also
Manipulating objects 1556 , getposition 1570 , setrectangle 1570
7.9.29 setrectangle
Set the width or height of an element rectangle.
Syntax Description
setrectangle ("element",w,h); Sets the width (w) and height (h) of an element rectangle.
See Also
Manipulating objects 1556 , getrectangle 1571 , setposition 1570
7.9.30 getposition
Get the current horizontal or vertical position of an element.
Syntax Description
out=getposition("element",x); Returns the current horizontal position of an element.
out=getposition("element",y); Returns the current vertical position of an element.
See Also
Manipulating objects 1556 , setposition 1570 , getrectangle 1571
7.9.31 getrectangle
Get the width or height of an element rectangle.
Syntax Description
out=getrectangle ("element",w); Returns the width of an element rectangle.
out=getrectangle ("element",h); Returns the height of an element rectangle.
See Also
Manipulating objects 1556 , setrectangle 1570 , getposition 1570
7.9.32 get
Get a property from selected objects. The property names for the get command are the same as the property names
in the Edit dialogue box. For example, if you see a property called "mesh accuracy", then you can use the
command get("mesh accuracy"); to get that property. It is possible to get numeric, string, drop down and checkbox
properties.
Syntax Description
?get; Returns a list of the properties of the selected object(s).
out = get("property"); Gets the requested property value from the currently selected object. It
cannot be used to get the property value of a selected object in a
group.
If multiple objects are selected get("property") is the same as
get("property",i), where i is the number of the first selected objects with
the requested property.
Out can be a matrix or a string, depending on the property requested.
get("property",i); Gets the property of the ith selected object. Use this to act on a series
of objects. It cannot be used to get the value of a selected object in a
group.
The objects are ordered by their location in the object tree. The
uppermost selected object is given the index 1, and the index numbers
increase as you go down the tree.
See Also
Manipulating objects 1556 , getnumber 1572 , getnamed 1572 , getnamednumber 1572 , set 1568 , haveproperty 1573 , runsetup 1571
7.9.33 runsetup
Runsetup forces the setup scripts of structure and analysis groups to run.
In most cases, it is not necessary to use this function, as group setup scripts automatically re-run at the end of
script, if the object has been modified. It is only necessary to use this function when you need to force the setup
script to run before the end of your script file.
Syntax Description
runsetup; Forces setup scripts of groups to run.
See Also
Manipulating objects 1556 , get 1571 , set 1568 , runanalysis 1647
7.9.34 getnumber
Get the number of objects that are selected.
Syntax Description
out = getnumber; Returns the number of objects that are selected;
See Also
Manipulating objects 1556 , get 1571 , getnamed 1572 , getnamednumber 1572 , set 1568
7.9.35 getnamed
Get a property from objects with a given name.
If multiple objects are selected, and the values are different, the smallest value is returned. To be certain of the
results, be sure that only one object is selected, or use the form of getnamed that allows a specific object to be
selected.
Syntax Description
?getnamed("name"); Returns a list of the properties of the objects called name.
out = getnamed("name", The same as get, but acts on objects with a specific name, instead of
"property"); selected objects.
out=getnamed("name", "property", Gets the property of the ith named object. Use this to act on a series
i); of objects.
The objects are ordered by their location in the object tree. The
uppermost selected object is given the index 1, and the index numbers
increase as you go down the tree.
out = The same as get, but acts on objects named "name" located in the
getnamed("groupname::name", group "groupname", instead of selected objects.
"property");
out = Gets the property of the ith object named "name" located in the group
getnamed("groupname::name", "groupname". Use this to act on a series of objects.
"property"); The objects are ordered by their location in the object tree. The
uppermost selected object is given the index 1, and the index numbers
increase as you go down the tree.
See Also
Manipulating objects 1556 , get 1571 , getnumber 1572 , getnamednumber 1572 , set 1568 , setnamed 1568
7.9.36 getnamednumber
Get the number of objects with a given name.
Syntax Description
out = getnamednumber( "name"); The same as getnumber, but acts on objects with a specific name,
instead of selected objects.
out = The same as getnumber, but acts on all objects named "name" in the
getnamednumber( "groupname::na group "groupname", instead of selected objects.
me");
See Also
Manipulating objects 1556 , get 1571 , getnamed 1572 , getnumber 1572 , set 1568 , setnamed 1568
7.9.37 getglobalmonitor
Set global monitor properties. This command will return an error in analysis mode.
Syntax Description
?getglobalmonitor; Returns a list of the global monitor properties
?getglobalmonitor("property"); Returns the value of the requested property.
See Also
Manipulating objects 1556 , get 1571 , setglobalmonitor 1569 , setglobalsource 1569 , getglobalsource 1573
7.9.38 getglobalsource
Set global monitor properties. This command will return an error in analysis mode.
Syntax Description
?getglobalsource; Returns a list of the global source properties
?getglobalsource("property"); Returns the value of the requested property.
See Also
Manipulating objects 1556 , get 1571 , setglobalmonitor 1569 , getglobalmonitor 1573 , setglobalsource 1569
7.9.39 getsolver
Returns the solver that is currently active.
Syntax Description
?getsolver; Returns the solver that is currently active.
7.9.40 haveproperty
Returns the number of selected objects with a particular property.
Syntax Description
out = haveproperty("property"); Returns the number of selected objects with the specified property.
See Also
Manipulating objects 1556 , get 1571 , set 1568
7.9.41 importsurface
Import surface data. This command only applies to import primitives. The function returns 1 if the data is
successfully imported. Example script files showing how to use these functions can be found in the Online Help.
See the User Guide, Structures section.
Syntax Description
out = Import a surface from the file in the string filename in a three dimensional
importsurface(filename,upper_surf simulation. All arguments after filename are optional.
ace,file_units,x0,y0,z0,invertXY);
out = Import a surface from the file in the string filename in a two dimensional
importsurface(filename,upper_surf simulation. All arguments after filename are optional.
ace,file_units,x0,y0,invertXY);
See Also
Manipulating objects 1556 , importsurface2 1574
7.9.42 importsurface2
Import surface data from script variables. This command only applies to import primitives. The function returns 1 if
the data is successfully imported. Example script files showing how to use these functions can be found in the
Online Help. See the User Guide, Structures section.
Syntax Description
See Also
Manipulating objects 1556 , importsurface 1574
7.9.43 importnk
Import the refractive index (n and k) over an entire volume or surface from a file. This command only applies to import
primitives. The function returns 1 if the data is successfully imported. It is possible to import anisotropic nk data.
Syntax Description
out = importnk(filename,file_units Import n (and k) data from filename in three dimensional simulations. All
,x0,y0,z0,reverse_index_order); arguments after the filename are optional.
out = importnk(filename,file_units Import n and k data from filename in two dimensional simulations. All
,x0,y0,reverse_index_order); arguments after the filename are optional.
Examples
Import object - Spatial (n,k) data 492
See Also
Manipulating objects 1556 , importnk2 1576
7.9.44 importnk2
Import the refractive index (n and k) over an entire volume or surface from script variables. This command only
applies to import primitives. The function returns 1 if the data is successfully imported. It is possible to import
anisotropic nk data.
Syntax Description
out = importnk2(n,x,y,z); Import n (and k) data from script variables in three dimensional simulations. All
arguments are required.
out = importnk2(n,x,y); Import n (and k) data from script variables in two dimensional simulations. All
arguments are required.
Examples
Import object - Spatial (n,k) data 492
See Also
Manipulating objects 1556 , importnk 1575
7.9.45 importnkobfuscated
This command is identical to importnk but makes it possible to import data from a file that has been obfuscated. For
details on how to obfuscate the data files, please see the Online Help in the User Guide, Structures section.
Supported Product: available in FDTD Solutions only, for versions 8.6.3 and higher
Syntax Description
out = Import n (and k) data from filename in three dimensional simulations. All arguments
See Also
Manipulating objects 1556 , importnk 1575
7.9.46 importbinary
Import binary data (1s and 0s) over an entire volume from a file. The object will be present wherever the binary data is
1 and not when it is 0. This command only applies to import primitives. The function returns 1 if the data is
successfully imported. Example script files showing how to use these functions can be found in the Online Help.
See the User Guide, Structures section.
Syntax Description
out = Import binary data from filename in three dimensional simulations. All
importbinary(filename,file_units,x0, arguments after the filename are optional.
y0,z0,reverse_index_order);
See Also
Manipulating objects 1556 , importbinary2 1578
7.9.47 importbinary2
Import binary data (1s and 0s) over an entire volume from script variables. The object will be present wherever the
binary data is 1 and not when it is 0. This command only applies to import primitives. The function returns 1 if the
data is successfully imported. Example script files showing how to use these functions can be found in the Online
Help. See the User Guide, Structures section.
Syntax Description
out = importbinary2(binary,x,y,z); Import binary data from script variables in three dimensional simulations. All
arguments are required.
See Also
Manipulating objects 1556 , importbinary 1577
7.9.48 importbinaryobfuscated
This command is identical to importbinary but makes it possible to import data from a file that has been obfuscated.
For details on how to obfuscate the data files, please see the Online Help in the User Guide, Structures section.
Supported Product: available in FDTD Solutions only, for versions 8.6.3 and higher
Syntax Description
out = Import binary data from filename in three dimensional simulations. All arguments after
importbinaryobfuscated(k the filename are optional.
ey,filename,file_units,x0,
y0,z0,reverse_index_orde
r);
See Also
Manipulating objects 1556 , importbinary 1577
7.9.49 updatesourcemode
Updates the mode profile of selected mode source. If there is no mode profile stored in the source, then the mode
with the highest effective index will be selected. If a mode is already stored in the source, then the mode with the
best overlap with the old mode will be selected. Note that the mode source must be selected before running this
command.
Syntax Description
?updatesourcemode; Updates mode profile of the selected Mode source.
Returns the fraction of electromagnetic fields that overlap
between the old and the new mode
?updatesourcemode(mode_number); Updates the mode source and selects the desired mode number.
For example, updatesourcemode(1); will calculate the
fundamental mode. Please note that making this call will force a
recalculation of a mode, even if the same mode has previously
been calculated. In addition, making this call will force the mode
selection method to become "user select". This optional
argument was introduced in FDTD Solutions 8.6.3 and MODE
Solutions 6.5.3.
If you have a script file which updates the simulation mesh, then you should use the save script command 1430
before updating the source mode. This will ensure that the mesh has been updated before the new mode is
calculated.
NOTE: overlap
The fraction of electromagnetic fields that overlap between the two modes is given by the expression below. It is
also the fraction of power from mode2 that can propagate in mode1. For more information, please see overlap
script command 1608 .
r r r r r r
overlap = Re
( )(
E1 H 2* dS E 2 H 1* dS ) 1
r r* r r r r
E1 H 1 dS
(
Re E 2 H 2* dS )
See Also
Manipulating objects 1556 , addmode 1544 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647 , overlap 1608 , expand 1507
7.9.50 setsourcesignal
Loads a custom source time signal into a source. This advanced source property allows users to create a custom
source source time signal and spectrum. Custom source time signals are required for some types of nonlinear
simulations. This feature is not recommended for most types of linear simulations.
The custom time signal must be defined in terms of the signal Amplitude and Phase. This is a convenient definition
because the Amplitude and Phase are generally slowly varying as a function of time (compared with the actual time
signal), meaning a lower sampling rate can be used to define the custom signal. The actual time domain signal
injected by the source is given by:
Real valued time domain fields (ie. most simulations): Complex valued time domain fields (eg. Bloch
Signal (t ) = Amplitude(t ) sin( phase(t )) boundary conditions)
ip
i* phase( t ) -
2
Signal (t ) = Amplitude(t )e
Syntax Description
setsourcesignal("name", t, Sets the time domain signal of source named "name".
amplitude, phase); t, amplitude, and phase are 1D vectors with the same length.
setsourcesignal("name", t, Allows you to specify the precise center frequency and bandwidth that
amplitude, phase, fcentre, will be used for all simulations. These values are used for materials fits,
bandwidth); calculating the mesh, and source limits.
If fcentre and bandwidth are not specified, they will be automatically
estimated from the time signal.
See Also
sourcepower 1601
7.9.51 updatemodes
Updates the mode profile(s) of selected mode expansion monitor If there are no mode profiles stored in the mode
expansion monitor, then the mode with the highest effective index will be selected. If mode profiles are already
stored in the mode expansion monitor, then the modes with the best overlap with the old modes will be selected.
Note that the mode expansion monitor must be selected before running this command.
Syntax Description
NOTE: overlap
The fraction of electromagnetic fields that overlap between the two modes is given by the expression below. It is
also the fraction of power from mode2 that can propagate in mode1. For more information, please see overlap
script command 1608 .
r r r r r r
overlap = Re
( )(
E1 H 2* dS E 2 H 1* dS ) 1
r r* r r r r
E1 H 1 dS
(
Re E 2 H 2* dS )
See Also
Manipulating objects 1556 , addmode 1544 , addmodeexpansion 1551 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647
7.9.52 clearsourcedata
Clears source data for an imported source, or the selected mode for a mode source.
Syntax Description
clearsourcedata; Clears source data for the selected source.
Example
Clear source data from an imported source. This will make the file much smaller, which can be convenient when
emailing simulation files.
select("source3");
clearsourcedata;
See Also
updatesourcemode 1579 , asapimport 1441 , asapload 1440 , asapexport 1440 , clearmodedata 1582 , getresult 1647 , overlap 1608 ,
expand 1507 , seteigensolver 1582 , geteigensolver 1582
7.9.53 clearmodedata
Clears mode data for a mode expansion monitor. This is mainly useful to reduce file sizes when saving.
Supported Product: available in FDTD and MODE, as of versions 8.6.3 and 6.5.3 respectively
Syntax Description
clearmodedata; Clears mode data for the selected mode expansion mnoitor.
See Also
updatesourcemode 1579 , asapimport 1441 , asapload 1440 , asapexport 1440 , clearsourcedata 1581 , getresult 1647 , overlap 1608 ,
expand 1507 , seteigensolver 1582 , geteigensolver 1582
7.9.54 seteigensolver
Mode sources and mode expansion monitors in FDTD and MODE have embedded eigensolvers. This script
command makes it possible to set the properties of that eigensolver without using the GUI.
Changing any values of the embedded eigensolver with this command will automatically invalidate any existing mode
data. This means that new updates based on overlap calculations with previous modes will fail after using this
command. Therefore please call this command before making any calls to updatesourcemode or updatemodes.
Syntax Description
?seteigensolver; Returns a list of the properties of the embedded eigensolver
seteigensolver("property",value); This will set the eigensolver properties of the currently selected
objects.
Value can be a number or string. This function does not return any
data.
See Also
Manipulating objects 1556 , addmode 1544 , addmodeexpansion 1551 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647
, overlap 1608 , expand 1507 , seteigensolver 1582 , geteigensolver 1582 , updatemodes 1580 , updatesourcemode 1579
7.9.55 geteigensolver
Mode sources and mode expansion monitors in FDTD and MODE have embedded eigensolvers. This script
command makes it possible to get the properties of that eigensolver without using the GUI.
Syntax Description
?geteigensolver; Returns a list of the properties of the embedded eigensolver
geteigensolver("property"); This will get the eigensolver properties of the currently selected
objects. The returned value may be a number or a string, depending on
the property.
See Also
Manipulating objects 1556 , addmode 1544 , addmodeexpansion 1551 , clearsourcedata 1581 , clearmodedata 1582 , getresult 1647
, overlap 1608 , expand 1507 , seteigensolver 1582 , geteigensolver 1582 , updatemodes 1580 , updatesourcemode 1579
7.9.56 redraw
Force the graphical viewports of the CAD or the schematic layout drawing to update. The viewports update
automatically by default, so this command is only required after using the redrawoff command.
Syntax Description
redraw; Redraws graphics.
This function does not return any data.
See Also
Manipulating objects 1556 , redrawon 1583 , redrawoff 1583 , redrawmode 1583
7.9.57 redrawoff
Disable automatic updating of the graphical viewports in the CAD or the schematic layout drawing. This can greatly
increase the speed of scripts that add large numbers of objects.
Syntax Description
redrawoff; Prevents redrawing of graphics.
This function does not return any data.
Cannot use this command in group setup scripts since redrawing is
automatically turned off.
See Also
Manipulating objects 1556 , redrawon 1583 , redraw 1583 , redrawmode 1583
7.9.58 redrawon
Enable automatic updating of the graphical viewports in the CAD or the schematic layout drawing. Automatic
updating is the default behavior, so this command is only required after using the redrawoff command.
Syntax Description
redrawon; Turns redrawing back on.
This function does not return any data.
See Also
Manipulating objects 1556 , redraw 1583 , redrawoff 1583 , redrawmode 1583
7.9.59 redrawmode
This command can be used to determine the current status of automatic redrawing. It can also be used to set the
current status of automatic redrawing. The graphics will be redrawn after any script command that may change the
properties of a graphical object.
Syntax Description
out = redrawmode; The value of out indicates if automatic redrawing is off or on
out=1: automatic redrawing is on
out=0: automatic redrawing is off
out = redrawmode(in); Set the automatic redrawing off or on. To turn it on, use in=1. To turn it
off, use in=0. The value of out is set after executing the command so
that out=in once this command has been executed.
See Also
Manipulating objects 1556 , redraw 1583 , redrawoff 1583
7.9.60 setview
This command allows the viewing properties of the Layout Editor to be modified.
Syntax Description
outstring = setview; Returns a list of the view properties that can be set. The command
?setview;
will return
extent, zoom, theta, phi
setview("property"); Sets the default value for any of the view properties. For example,
setview("extent");
is the same as pressing the graphical extent button.
setview("property",value); Sets the values to of any property for viewing.
See Also
Manipulating objects 1556 , getview 1584 , orbit 1585 , redraw 1583
7.9.61 getview
This command allows the viewing properties of the Layout Editor to be retrieved.
Syntax Description
outstring = getview; Returns a list of the view properties that can be set. The command
?getview;
will return
extent, zoom, theta, phi
out = getview("property"); Returns the current value of any of the view properties. For example,
zoom_level = getview("zoom");
will return the current zoom setting of the perspective view relative to
the default level.
The properties that can be obtained with getview are described in setview 1584 .
See Also
Manipulating objects 1556 , setview 1584 , orbit 1585 , redraw 1583
7.9.62 orbit
This command performs an elliptical viewing orbit of the structure in the perspective view. Note that the commands
setview 1584 , getview 1584 and redraw 1583 make it possible to create any type of orbit you would like in your own script
file.
Syntax Description
orbit; Performs an orbit of the current perspective view.
orbit(zoom_factor); Performs an orbit with the specified minimum zoom factor. By default
the zoom factor is 1.5.
orbit(zoom_factor, frame_rate); Performs an orbit with the specified frame rate specified in frames per
second. The default frame rate is 15.
orbit(zoom_factor, frame_rate, "filename"); The orbit will be streamed to the mpeg file filename for later viewing.
See Also
Manipulating objects 1556 , setview 1584 , getview 1584 , framerate 1585
7.9.63 framerate
Orbits the perspective view and returns the framerate. This can be useful for estimating your graphics performance.
If comparing the performance of two computers, be sure to use exactly the same simulation file.
Syntax Description
fr = framerate(num_frames, zoom); num_frames - Number of frames to draw
zoom - Zoom factor used in perspective view
fr - number of frames / wall time required to complete orbit.
See Also
Manipulating objects 1556 , setview 1584 , getview 1584 , orbit 1585
7.9.64 undo
Undo the last command that modified any objects, you can undo the last 5 commands.
Syntax Description
See Also
Manipulating objects 1556 , redo 1586
7.9.65 redo
Redo a command after a previous undo.
Syntax Description
redo; Redo command after previous undo.
This function does not return any data.
See Also
Manipulating objects 1556 , undo 1585
7.9.66 addport
Add a port to a compound/script element (Note that this command does not apply for primitive elements).
Syntax Description
addport("element", "port", "type", Adds a new port to the element with the specified properties.
"data"); Returns the name of the port that is created.
7.9.67 removeport
Remove a port from a compound/script element (Note that this command does not apply for primitive elements).
Syntax Description
removeport("element", "port"); Removes "port" from "element".
Returns 1 if the port is successfully removed, 0 otherwise.
7.9.68 connect
Connects one element to another via the specified ports.
Syntax Description
connect("element1", "port1", Connects "port1" of "element1" to "element2" or "port2".
"element2", "port2");
7.9.69 disconnect
Disconnect one element to another via the specified ports.
Syntax Description
connect("element1", "port1", Deletes the connection between "port1" of "element1" and "port2" of
"element2", "port2"); "element2".
7.9.70 setexpansion
Associates a DFT monitor with a mode expansion monitor.
Syntax Description
?setexpansion; List all monitors under the "Monitors for expansion" list for the selected
mode expansion monitor.
setexpansion("name", Adds the "dft_monitor" to the "Monitors for expansion" list of the
"dft_monitor"); selected mode expansion monitor, with the specified name.
7.9.71 removeexpansion
Removes a DFT monitor from a mode expansion monitor.
Syntax Description
removeexpansion("name"); Removes the DFT monitor with the specified name from the "Monitors
for expansion" list of the selected mode expansion monitor.
7.9.72 getactivesolver
Get the active solver. This could be the FDE, varFDTD, or EME solvers in MODE Solutions.
Syntax Description
?getactivesolver; List the active solver.
See Also
setactivesolver 1588
7.9.73 setactivesolver
Set the specified solver as the active solver. For example, this can be used to toggle between the FDE, varFDTD,
and EME simulations in MODE Solutions.
Syntax Description
?setactivesolver; Lists all the possible solver choices
setactivesolver('solver_name'); Set the solver with the specified name as the active solver.
See Also
getactivesolver 1588
7.9.74 getname
The script command getname is used to get the name of a datset.
Syntax Description
?getname(a); Returns the name of the dataset of the variable a.
?a.getname; Returns the name of the dataset of the variable a.
See Also
setname 1588
7.9.75 setname
The script command setname is used to set the name of a datset.
Syntax Description
a.setname("test"); Returns the name of the dataset of the variable a.
See Also
getname 1588
7.9.76 autoarrange
The script command arranges port positions and dimensions of compound or scripted elements automatically.
Equivalently it can also be done by pressing Arrange on the element port editor tab.
Syntax Description
autoarrange (name); Arrange port positions and dimensions of compound or scripted
elements automatically.
See Also
createcompound 1589
7.9.77 createcompound
The script command creates a compound element with the currently selected elements.
Syntax Description
createcompound; Creates a compound element with the currently selected
elements.
See Also
autoarrange 1589 , addproperty 1589 , setexpression 1589
7.9.78 addproperty
The script command adds a property to a compound or to a scripted element.
Syntax Description
addproperty(name,property=new_pr Adds a new property named property to a compound element or
operty,category=,type=Number,fr to a scripted element named name. Category defines the folder
om=0,to=0,kind=FixedUnit,unit=) when the property will be stored in the properties view window.
string, logical and number are valid values for the parameter
type. The parameter range is defined by parameters from and
to. Parameter kind is typically set to FixedUnit, other valid
values are Power, Frequency, etc. Parameter unit is the unit of
the new property.
See Also
Manipulating objects 1556 , autoarrange 1589 , setexpression 1589 , createcompound 1589
7.9.79 setexpression
The script command sets the selected element's specified property to the mentioned expression.
Syntax Description
See Also
autoarrange 1589 , addproperty 1589 , setexpression 1589 , createcompound 1589
7.9.80 importdataset
This command can be used to import a rectilinear or unstructured dataset into a simulation object.
Syntax Description
importdataset("filename") Imports the dataset the specified Matlab file from the current working
directory. The object to load data into must be selected.
importdataset(charge) Imports the data from the specified dataset in the script workspace.
Dataset can be loaded from a Matlab file to the script workspace using
the matlabload 1642 command. The object to load data into must be
selected.
1. Import data into a grid attribute (data could be from charge monitor or temperature monitor in DEVICE).
2. Import doping data into a selected 'import doping' object.
3. Import optical generation data into a selected 'import generation' object.
The command can be used in two ways. The dataset can be saved inside a matlab (.mat) file which can be called to
load the data or, the command can directly call the dataset from the script workspace to load it into the simulation
object. In both cases, the dataset need to have the following properties:
Data Simulation Dataset type Name for variables Name for variables
object defining coordinate data defining actual data
Liquid crystal 'lc orientation' grid Rectilinear x, y, z u
orientation (3 attribute
element unit
vector)
Rotation angles 'permittivity Rectilinear x, y, z theta, phi, psi
in radians rotation' grid
attribute
Unitary 'matrix transform' Rectilinear x, y, z U
transform matrix grid attribute
(3x3 tensor)
Charge density 'np density' grid Unstructured x, y, z, C n, p
attribute
Doping profile 'Import doping' Unstructured or x, y, z, C (unstructured); x, N
object rectangular y, z (rectangular)
Optical Import generation' Rectangular x, y, z G
generation rate object
Temperature in 'temperature' grid Unstructured x, y, z, elements (see N
Kelvin attribute Dataset builder 375 for more
information)
See Also
Manipulating objects 1556 , cleardataset 1591 , matlabload 1642 , Mach Zehnder 2206 , Import/export np Density 402 ,
addgridattribute 1550 , unstructureddataset 1466
7.9.81 cleardataset
This command clears the dataset from any current 'np Density' grid attribute. This is only useful for keeping file size
small.
Syntax Description
cleardataset; Clears the dataset from the selected grid attribute.
See Also
Manipulating objects 1556 , importdataset 1590 , addgridattribute 1550
7.9.82 getcelllist
Returns the list of cells associated with the gds file that has been loaded into a layer builder object. There needs to
be a layer builder object selected, with a gds file loaded.
Syntax Description
getcelllist; Returns the list of cells associated with the loaded gds file.
See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , addlayer 1552 , getlayerlist 1591 , setlayer 1591
7.9.83 getlayerlist
Returns the list of layers associated with the loaded gds file. There needs to be a layer builder object selected, with
a gds file loaded.
Syntax Description
getlayerlist; Returns the list of layers associated with the loaded gds file.
See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , addlayer 1552 , getcelllist 1591 , setlayer 1591
7.9.84 setlayer
Sets the properties of the specified layer of the selected layer builder object. There needs to be a layer builder object
selected.
Syntax Description
setlayer("layer name", "property Sets the properties of a specified layer of the selected layer builder
name", "property value"); object.
Example
setlayer("abc","name","abc123");
setlayer("abc","thickness",0.5e-6);
setlayer("abc","material","Ag");
setlayer("abc","layer number","layer_0");
setlayer("abc","pattern material","Ag");
See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , loadgdsfile 1592 , addlayer 1552 , getcelllist 1591 , getlayerlist 1591
7.9.85 loadgdsfile
Loads a gds file to a layer builder object. The command only functions properly when a layer builder object is
included in the simulation and is selected.
Syntax Description
loadgdsfile("gds_example.gds"); Loads the gds file named "gds_example" to the layer builder object.
See Also
addlayerbuilder 1553 , getlayerlist 1591 , setlayer 1591 , addlayer 1552 , getcelllist 1591 , getlayerlist 1591 , setlayer 1591
7.9.86 setcompositionfraction
This command is used to set the composition fraction of two materials in an alloy.
Syntax Description
setcompositionfraction(name, Set the composition fraction of two materials in an alloy.
property, value);
This command only works if the material of the specified structure is
an alloy.
Property Value
name Name of the structure
property Can be set to fixed, linear x, linear y, linear z, or custom
value fixed: scalar number
linear: [value at min, value at max]
custom: string with function, e.g (w-0.2)^2 using variables u,v,w
See Also
Manipulating objects 1556 , getcompositionfraction 1592
7.9.87 getcompositionfraction
This command is used to set the composition fraction of two materials in an alloy.
Syntax Description
getcompositionfraction(name, Get the composition fraction of two materials in an alloy. Property can
property); be fixed, linear x, linear y, linear z, or custom.
See Also
Manipulating objects 1556 , setcompositionfraction 1592
7.9.88 seticon
Set a user defined icon for an element.
Syntax Description
seticon (name,icon)); Set a user defined icon for element name. Parameter icon should be
a vector image format SVG (Scalable Vector Graphics) file.
See Also
Manipulating objects 1556
Running Simulations
Command Description
run 1593 Launch the simulation. (Options available)
runparallel 1594 Launch the simulation in parallel mode.
addjob 1594 Add a simulation to the job queue.
runjobs 1594 Run all simulations in the job queue.
clearjobs 1595 Remove all simulations from the job queue.
runsweep 1595 Runs a parameter sweep or optimization task
Command Description
run 1593 Launch the simulation. (Options available)
runsweep 1595 Runs a parameter sweep or optimization task
7.10.1 run
Run the current simulation. When the simulation finishes, all simulation data will be saved to the current file, then
the file is re-loaded.
For FDTD,
Syntax Description
run; Launch the simulation in parallel mode as defined in the resource
manager. This function does not return any data.
run(option1); Option1 (default: 3) can be:
1: run FDTD in single processor mode avoiding any use of MPI.
2: run FDTD in single processor mode (legacy issues). Pop-up
dialogs no longer take focus.
3: run FDTD in parallel mode as defined in the resource manager.
For MODE, DEVICE, and INTERCONNECT,
Syntax Description
run; Launch the simulation. The simulation will be run using the settings
from the first active resource in the resource manager. This function
does not return any data.
See Also
runparallel 1594 , runanalysis 1647 , addjob 1594 , runjobs 1594
7.10.2 runparallel
Launch the simulation in parallel mode. Equivalent to run and run(3). When the simulation finishes, all simulation
data will be saved to the current file. This command has been deprecated. Use run.
Syntax Description
runparallel; Launch the simulation in parallel mode as defined in the resource
manager. This function does not return any data.
See Also
run 1593 , runanalysis 1647
7.10.3 addjob
Adds a simulation file to the job manager queue.
Syntax Description
addjob(filename); Add the simulation file "filename" to the job manager queue.
See Also
run 1593 , runsweep 1595 , runjobs 1594 , clearjobs 1595 , currentfilename 1434
7.10.4 runjobs
Run all simulations in the job manager queue. The script execution will be paused while the jobs run, then resume
when all of the simulations have complete successfully. If errors occur, the script will not proceed.
Syntax Description
runjobs; Run jobs in the Job queue. Use the computer resources and parallel
settings that are specified in the Resource Manager.
runjobs(option); option=0: run jobs in single process mode using only the local
computer.
option=1: run jobs using the computer resources and parallel settings
that are specified in the Resource Manager. (default)
See Also
run 1593 , runsweep 1595 , addjob 1594 , clearjobs 1595 , save 1430 , load 1430
7.10.5 clearjobs
Remove all jobs from the job manager queue.
Syntax Description
clearjobs; Remove all jobs from the Job queue.
See Also
run 1593 , addjob 1594 , runjobs 1594
7.10.6 runsweep
Runs a parameter sweep or optimization task.
Syntax Description
runsweep; Runs all sweeps and optimization tasks.
runsweep("taskname"); Runs only the sweep or optimization named taskname.
See Also
run 1593 , getsweepdata 1645 , addjob 1594 , runjobs 1594
These commands are used for normalization of frequency domain data obtained from a time domain FDTD
simulation.
Command Description
nonorm 1598 Use no normalization.
cwnorm 1598 Use CW normalization.
7.11.1 transmission
The transmission function returns the amount of power transmitted through power monitors and profile monitors,
normalized to the source power. A value of 0.5 means that half of the optical power injected by the source passed
through the monitor. Negative values mean the power is flowing in the negative direction.
1 r r
real P ( f() Monitor
d S )
T( f ) = 2
sourcepower
The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization.
Syntax Description
out = transmission( "mname"); Transmission through monitor mname. It must be obvious from the
shape of the monitor which axis is normal to the monitor surface.
out = transmission( "mname", The additional argument, option, can have a value of 1 or 2. If it is 2,
option); the data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
See Also
sourcepower 1601 , dipolepower 1600 , transmission_avg 1597 , transmission_pavg 1597 , integrating Poynting vector 865
7.11.2 transmission_avg
Returns the total spectral average power through a monitor surface, normalized to the total spectral average of the
source. See the Units and normalization - Spectral averaging 120 section for more information.
1
2
(
real P
Monitor
total
dS)
Tavg =
sourcepower _ avg
The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization.
Syntax Description
out = Returns the total spectral average transmission through monitorname.
transmission_avg( "monitorname") It must be obvious from the shape of the monitor which axis is normal
; to the monitor surface.
out = The additional argument, option, can have a value of 1 or 2. If it is 2,
transmission_avg( "monitorname", the data is unfolded where possible according to the symmetry or anti-
option); symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
See Also
sourcepower_avg 1602 , transmission 1596 , transmission_pavg 1597 , Units and Normalization 116 , Spectral averaging 120
7.11.3 transmission_pavg
Returns the partial spectral average power through a monitor surface, normalized to the partial spectral average of
the source. See the Units and normalization - Spectral averaging 120 section for more information.
1
2 (
real P( f ) Monitor
partial
dS )
T pavg ( f ) =
sourcepower _ pavg( f )
The normalization state (cwnorm or nonorm) does not affect the result because of the source power normalization.
Syntax Description
out = Returns the partial spectral average transmission through
transmission_pavg( "monitorname" monitorname. It must be obvious from the shape of the monitor which
); axis is normal to the monitor surface.
out = The additional argument, option, can have a value of 1 or 2. If it is 2,
transmission_pavg( "monitorname" the data is unfolded where possible according to the symmetry or anti-
See Also
sourcepower_pavg 1603 , transmission 1596 , transmission_avg 1597 , Units and Normalization 116 , Spectral averaging 120
7.11.4 getsourceangle
Broadband sources inject fields that have a constant in-plane wavevector at all frequencies. This implies injection
angle must change as a function of frequency. The in-plane wavevector is chosen such that the incidence angle at
the center frequency of the simulation (fSIM) will match the source angle theta (thetaSIM) specified in the source
properties. Higher frequencies will be injected at smaller angles, while lower frequencies will be injected at larger
angles. This 'theta vs wavelength' plot in the beam source edit window shows the same function.
Syntax Description
theta = Returns the source angle theta (degrees) as a function of frequency. f is
getsourceangle( "sourcename", a vector of frequencies (Hz).
f);
See Also
sourcepower 1601 , Broadband injection angles 536
7.11.5 nonorm
Do not normalize the data to the source power. The actual field intensities will be used in all calculations. This
function controls the checkbox located in Settings - Normalization state.
Syntax Description
nonorm; Use no normalization.
This function does not return any data.
See Also
cwnorm 1598 , Units and Normalization 116
7.11.6 cwnorm
Use CW normalization. All simulation data will be normalized to the injected source power. Most users prefer to do
their analysis in the CW normalization state, since it removes any effect caused by the finite pulse length of the
source. It also converts the units of all electromagnetic fields to be the same as in the time domain.
Syntax Description
cwnorm; Use CW normalization.
See Also
nonorm 1598 , Units and Normalization 116
7.11.7 sourcenorm
Returns the source normalization spectrum used to normalize data in the cwnorm state for standard fourier transform
quantities. See the Units and normalization chapter for more information. If the source time signal of the jth source in
the simulation is s j(t), and N is the number of active sources then
1
s ( w ) = sourcenorm ( w ) =
N
exp (i wt )s (t )dt
sources
j
Syntax Description
out = sourcenorm(f); Returns the source normalization used to normalize data in the
cwnorm state at the vector of frequency points f. (f is the frequency in
Hz)
out = sourcenorm(f, name); This function makes it possible to perform the normalization using the
spectrum of one source, rather than the sum of all the sources.
See Also
sourcenorm2_avg 1599 , sourcenorm2_pavg 1600 , sourcepower 1601 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116
7.11.8 sourcenorm2_avg
Returns the source normalization spectrum used to normalize data in the cwnorm state for the total spectral
averaged quantities. See the Units and normalization - Spectral averaging 120 section for more information.
1
s ( w ) = sourcenorm ( w ) = exp (i wt )s j (t )d w
N sources
+
2
sourcenorm 2 _ avg = s( w ' ) d w'
-
Syntax Description
out = sourcenorm2_avg; This function returns the source normalization for total spectral
averaged quantities.
out = This function makes it possible to perform the normalization using the
sourcenorm2_avg( "sourcename"); spectrum of one source, rather than the sum of all the sources.
See Also
sourcenorm 1599 , sourcenorm2_pavg 1600 , sourcepower_avg 1602 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116 ,
Spectral averaging 120
7.11.9 sourcenorm2_pavg
Returns the source normalization spectrum used to normalize data in the cwnorm state for the partial spectral
averaged quantities. See the Units and normalization - Spectral averaging 120 section for more information.
If the source time signal of the jth source in the simulation is s j(t), and N is the number of active sources then
1
s ( w ) = sourcenorm ( w ) = exp (i wt )s j (t )d w
N sources
Partial spectral averaging uses a Lorentzian weighting of the following form. Delta is the FWHM of |h|2.
2 d 1
hi ( w , w ' ) =
2 p ( w - w ' ) 2 + ( d / 2) 2
2
h( w , w ' ) d w' = 1
+
2 2
sourcenorm 2 _ pavg = h( w , w ' ) s( w ' ) d w '
-
Syntax Description
out = sourcenorm2_pavg( f, This function returns the source normalization for partial spectral
delta); averaged quantities.
out = sourcenorm2_pavg( f, delta, This function makes it possible to perform the normalization using the
"sourcename"); spectrum of one source, rather than the sum of all the sources.
See Also
sourcenorm 1599 , sourcenorm2_avg 1599 , sourcepower_pavg 1603 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116 ,
Spectral averaging 120
7.11.10 dipolepower
Returns the power injected into the simulation region by a dipole source. In 3D simulations, the units will be in Watts
if cw norm is used, and Watts/Hertz 2 if no norm is used.
The dipolepower script command returns the power that was injected into the simulation region, and is equivalent to
measuring the power transmitted out of a small box surrounding the dipole. In contrast, sourcepower 1601 will return
the power that the dipole would radiate in a homogeneous material. dipolepower and sourcepower are equivalent for
dipoles in a homogeneous medium.
Advanced notes:
If the dipole is located within a dispersive medium (with a non-zero imaginary part of the refractive index), then the
results of this function are not reliable. In such situations, using a box of monitors around the dipole is
recommended.
Numerical errors in this calculation may become noticeable when very small simulation mesh sizes are used. If
the mesh step is the order of, or smaller than, l/1000, verifying the dipolepower results by measuring the radiated
Please contact support@lumerical.com for more assistance if you are using a dipole in dispersive medium.
Syntax Description
out = dipolepower(f); Returns the amount of power radiated by the dipole source, at
frequency points f. (f in Hz)
out = dipolepower(f, name); This option allows you to obtain the power radiated by a single dipole,
rather than the sum of all dipoles. This option is only needed for
simulations with multiple dipoles.
See Also
sourcenorm 1599 , sourcepower 1601 , sourcepower_avg 1602 , sourcepower_pavg 1603 , transmission 1596 , cwnorm 1598 ,
nonorm 1598
7.11.11 sourcepower
Returns the power injected into the simulation by the source.
Dipole sources
The sourcepower script function returns the power the dipole source would radiate in a homogeneous medium. This
quantity can be calculated analytically (see Dipoles - Radiated Power 511 ). The actual radiated power is not given by
the sourcepower function. The actual radiated power is highly dependant on the surrounding materials, since the
reflections from the structures will interfere with the fields from the dipole, changing the actual radiated power. To
get the actual radiated power, see the dipolepower 1600 script function. For additional information, please see the
Dipoles - Radiated Power 511 page.
sourcepowernonorm ( f ) =
1
2 (
real P ( f ) Source dS )
1
(
real P ( f ) Source dS )
sourcepowercwnorm ( f ) = 2
2
sourcenorm
As stated above, sourcepower gives the amount of power injected into the simulation. The only exception is if the
simulation is setup such that there is radiation which travels through the injection plane of the source in the source
injection direction (pink arrow). In such cases, the actual amount of power injected by the source will not be given by
sourcepower. In this situation, the incident radiation interferes with the source, changing the amount of injected
power (similar to what happens for the dipole source). In almost all cases, this means your simulation is not setup
properly.
Additional notes
In the case of multiple sources, the sourcepower(f) command will return the sum of all sourcepowers from all
sources.
In 3D simulations, the units will be in Watts if CW norm is used, and Watts/Hertz 2 if no norm is used.
Syntax Description
out = sourcepower(f); Returns the source power used to normalize transmission calculations
at the vector of frequency points f. (f is the frequency in Hz)
out = sourcepower(f, option); The additional argument, option, can have a value of 1 or 2. If it is 2,
the data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
out = sourcepower(f, option, This option allows you to obtain the spectrum of one source, rather
name); than the sum of all sources. This option is only needed for simulations
with multiple sources.
See Also
sourcenorm 1599 , sourcepower_avg 1602 , sourcepower_pavg 1603 , dipolepower 1600 , transmission 1596 , sourceintensity 1603 ,
cwnorm 1598 , nonorm 1598
7.11.12 sourcepower_avg
Returns the total spectral average power injected into the simulation by the source. See the Units and normalization
- Spectral averaging 120 section for more information.
This script function calculates the following quantities, depending on whether the normalization state is cwnorm or
nonorm:
+
sourcepower _ avgnonorm = sourcepower nonorm ( w )d w
0
+
2
s( w )
0
sourcepowercwnorm ( w )d w
sourcepower _ avgcwnorm ( f ) = +
2
s( w )
0
dw
where sourcepower is the quantity returned by the sourcepower script function, s(w) is returned by sourcenorm, and
w=2pf. Typically, this function should be used in the cwnorm state. Also see the sourcenorm2_pavg script function.
Syntax Description
out = sourcepower_avg; Returns the spectrally averaged source power as defined above.
out = sourcepower_avg(option); The additional argument, option, can have a value of 1 or 2. If it is 2,
the data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
out = sourcepower_avg(option, This option allows you to obtain the spectrum of one source, rather
"sourcename"); than the sum of all sources. This option is only needed for simulations
with multiple sources.
See Also
sourcenorm2_avg 1599 , sourcepower 1601 , sourcepower_pavg 1603 , transmission_avg 1597 , sourceintensity_avg 1604 ,
cwnorm 1598 , nonorm 1598 , Units and Normalization 116 , Spectral averaging 120
7.11.13 sourcepower_pavg
Returns the partial spectral average power injected into the simulation by the source. See the Units and
normalization - Spectral averaging 120 section for more information.
2 d 1
hi ( w , w ' ) =
2 p ( w - w ' ) + ( d / 2) 2
2
2
h( w , w ' ) d w' = 1
This script function calculates the following quantities, depending on whether the normalization state is cwnorm or
nonorm:
+
2
sourcepower _ pavgnonorm ( f ) = h( w , w ' ) sourcepowernonorm ( w )d w
-
+
2 2
h( w , w ' ) s ( w ) sourcepowercwnorm ( w ' )d w '
sourcepower _ pavgcwnorm ( f ) = 0
+
2 2
h( w , w ' ) s( w ' ) d w '
0
where sourcepower is the quantity returned by the sourcepower script function, s(w) is returned by sourcenorm, and
w=2pf. Typically, this function should be used in the cwnorm state. Also see the sourcenorm2_pavg script function.
Syntax Description
out = sourcepower_pavg(f,df); Returns the spectrally averaged source power as defined above. The
quantity f is the frequency and the quantity df is the frequency range
around which the averaging is performed, both in Hz.
out = sourcepower_pavg(f, The additional argument, option, can have a value of 1 or 2. If it is 2,
df,option); the data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
out = sourcepower_pavg(f,df, This option allows you to obtain the spectrum of one source, rather
option, "sourcename"); than the sum of all sources. This option is only needed for simulations
with multiple sources.
See Also
sourcenorm2_pavg 1600 , sourcepower 1601 , sourcepower_avg 1602 , transmission_pavg 1597 , sourceintensity_pavg 1604 ,
cwnorm 1598 , nonorm 1598 , Units and Normalization 116 , Spectral averaging 120
7.11.14 sourceintensity
Sourceintensity returns the source power divided by the area of the source. In 3D simulations, the units will be in
Watts/m2 if CW norm is used, and Watts/m2/Hertz 2 if No norm is used. This function is often used when
normalizing power measurements from simulations with a TFSF source.
In the case of multiple sources, the sourceintensity(f) command will return the sum of all sourceintensity from all
sources.
Syntax Description
out = sourceintensity(f); Returns the source intensity at the vector of frequency points f (f is the
frequency in Hz).
out = sourceintensity(f, option); The additional argument, option, can have a value of 1 or 2. If it is 2,
the data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
out = sourceintensity(f, option, This function makes it possible to perform the normalization using the
name); spectrum of one source, rather than the sum of all the sources.
See Also
sourcenorm 1599 , sourcepower 1601 , sourceintensity_avg 1604 , sourceintensity_pavg 1604 , dipolepower 1600 , transmission
1596 , cwnorm 1598 , nonorm 1598 , Units and Normalization 116
7.11.15 sourceintensity_avg
Returns the total spectral average intensity injected into the simulation by the source. The average intensity is equal
to the average power divided by the source area. See the sourcepower_pavg 1603 command and the Units and
normalization - Spectral averaging 120 section for more information.
Syntax Description
out = sourceintensity_avg; Returns the spectrally averaged source intensity as defined above.
out = sourceintensity_avg(option); The additional argument, option, can have a value of 1 or 2. If it is 2,
the data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
out = sourceintensity_avg(option, This function makes it possible to perform the normalization using the
"sourcename"); spectrum of one source, rather than the sum of all the sources.
See Also
sourcenorm2_avg 1599 , sourceintensity 1603 , sourcepower 1601 , transmission_avg 1597 , cwnorm 1598 , nonorm 1598 , Units
and Normalization 116 , Spectral averaging 120
7.11.16 sourceintensity_pavg
Returns the partial spectral average intensity injected into the simulation by the source. The partial average intensity
is equal to the partial average power divided by the source area. See the sourcepower_pavg 1603 command and the
Units and normalization - Spectral averaging 120 section for more information.
Syntax Description
out = sourceintensity_pavg (f,df); Returns the spectrally averaged source power as defined above. The
quantity f is the frequency and the quantity df is the frequency range
around which the averaging is performed, both in Hz.
See Also
sourcenorm2_pavg 1600 , sourcepower 1601 , sourcepower_avg 1602 , transmission_pavg 1597 , cwnorm 1598 , nonorm 1598 ,
Units and Normalization 116 , Spectral averaging 120
7.12.1 setanalysis
Set calculation parameters in MODE Solutions' FDE and DEVICE analysis window.
Syntax Description
?setanalysis; Lists all the parameters in the analysis window.
setanalysis("property", value); Sets"property" to value.
See Also
Measurements 1644 , mesh 1606 , findmodes 1606 , frequencysweep 1607 , analysis 1606 , getanalysis 1605
7.12.2 getanalysis
Set calculation parameters in MODE Solutions' FDE and DEVICE analysis window.
Syntax Description
See Also
Measurements 1644 , mesh 1606 , findmodes 1606 , frequencysweep 1607 , analysis 1606 , setanalysis 1605
7.12.3 analysis
Opens the MODE Solutions analysis window corresponding to the active solver.
Syntax Description
analysis; opens the analysis window corresponding to the active solver.
See Also
Measurements 1644 , setanalysis 1605 , runanalysis 1647 , getanalysis 1605
7.12.4 mesh
Produces a mesh of the current structure that is required to perform a subsequent calculation (either to calculate the
modes, or to perform a frequency sweep). Produces a d-card called "material" which contains the material properties
of the meshed object.
Syntax Description
mesh; Mesh the current simulation.
See Also
setanalysis 1605 , mesh 1606 , findmodes 1606
7.12.5 findmodes
Calculates the modes supported by the structure using the current calculation settings. This function is the script
equivalent to the calculate modes button. Each mode will be saved as a D-CARD named "modeX", where X is the
xth mode found. The D-CARD saves data such as effective index and mode profile.
Syntax Description
n=findmodes; n will be equal to the number of modes found.
See Also
setanalysis 1605 , mesh 1606 , selectmode 1606 , frequencysweep 1607 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate
1609
7.12.6 selectmode
All modes found in a simulation are numbered based on their effective index. They are displayed in the mode table
of the Analysis tab. The selectmode command will select the Nth mode in the mode table.
Syntax Description
selectmode(N); where N is the number of the desired mode.
selectmode(name); where name is a string containing the name of a mode. Modes are
named mode1, mode2, ..modeN. This form of the command is
compatible with the bestoverlap 1609 function
See Also
setanalysis 1605 , mesh 1606 , findmodes 1606 , frequencysweep 1607
7.12.7 frequencysweep
Performs a frequency sweep using the current settings within the frequency analysis tab. Produces a D-CARD
called "frequencysweep" that contains dispersion, effective index, and other data for as a function of frequency.
Syntax Description
frequencysweep; Perform a frequency sweep with the current settings.
This function does not return any data.
See Also
setanalysis 1605 , mesh 1606 , findmodes 1606 , selectmode 1606
7.12.8 coupling
The coupling command returns the complex coupling coefficient between two modes. The power coupling can be
calculated with the overlap function, or by the following formula.
2
Power _ Coupling = coupling
Reference: Allan W. Snyder and John D. Love, Optical Waveguide Theory. Chapman & Hall, London, England, 1983.
See the overlap function for more details about overlap and coupling calculations.
Syntax Description
out = coupling(mode2, mode1); mode2, mode1: the mode names
out: the coupling coefficient
out = coupling(mode2, mode1, x, Mode alignment can be adjusted before coupling is calculated.
y); x offset
y offset
Examples
This example shows how to use the overlap command to calculate the overlap and power coupling between two
modes.
copydcard("mode1","test_mode1");
copydcard("mode2","test_mode2");
out = overlap("test_mode1","test_mode2");
?out(1); # overlap
?out(2); # power coupling
See Also
copydcard 1649 , findmodes 1606 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate 1609 , expand 1507
7.12.9 overlap
In MODE, the command returns the overlap and power coupling between two modes calculated by the Eigensolver or
recorded by frequency monitors from the Propagator. In FDTD, it calculates the overlap and power coupling between
the field profiles (modes) recorded by two frequency monitors.
Overlap
Overlap measures the fraction of electromagnetic fields that overlap between the two field profiles (modes). This is
also the fraction of power from mode2 that can propagate in mode1 (for both forward and backward propagating
fields). The absolute value of the entire formula is to ensure it is positive.
r r r r r r
overlap = Re
(
E1 H 2* dS E2 H1* dS
r r* r
)( ) r
1
r r
1 H1 dS
E (
Re E2 H 2* dS )
Note: Comparison with Mode expansion monitor
This overlap calculation is similar to the calculations provided by the Expansion monitor, but it is designed for use
in a slightly different situation.
- The expansion monitor is intended for situations where the input file profile (mode2) is known within the same
waveguide structure where mode1 exists.
- The overlap calculation is intended for situations where the input field profile (mode2) is known in a different
waveguide structure than the one where mode1 exists. For example, mode1 and mode2 are the fundamental
modes of two different waveguide structures, and the overlap function is being used to estimate the efficiency of
an end-fire coupling arrangement between the two waveguides.
The overlap calculation can provide accurate results in many situations, but it is worth noting that it is an
approximate technique. One key assumption is that both mode1 and mode2 only contain fields that are
propagating in a single direction.
The overlap calculation defined above can be written in terms of the quantities provided by the expansion monitor,
as shown below. This represents the total power carried by the ith mode, including both the forward and backward
propagating fields, normalized to the input power. See the online help for more information on Using Mode
Expansion Monitors 651 .
(a - b)* (a + b) N i2 1
overlap = Re
Ni Re (Pin )
In the event that real(N) or real(P) is 0, the "real" can be replaced with "abs".
Power Coupling
Power Coupling measures the amount of power that can couple from mode2 into a forward propagating wave with the
mode profile of mode1. The remaining power that can propagate in this mode will couple into the backwards
propagating mode. Therefore, the power coupling is always less than or equal to the overlap. If the two modes have
the same effective index, then the power coupling will be equal to the overlap.
A dielectric interface is a simple example. The modes (i.e. a plane wave) on each side of the interface have an
overlap of 1, but the power coupling will be less than one. This is due to reflections caused by the index change at
the interface.
These calculations are based on the methods described in Snyder and Love "Optical Waveguide Theory", Chapman
& Hall, London, England, 1983.
Note:
For an exact power coupling result at an interface, it is necessary to know the complete set of waveguide modes
on both the input and output sides, and the MODE Solutions' EME solver can be used. See Overlap analysis 763
for more information.
Syntax Description
out = overlap(mode2, mode1); mode2, mode1: the mode names (in FDTD, use the names of the
frequency monitors, "m1" and "m2" instead)
out(1): the mode overlap
out(2): the mode power coupling
out = overlap(mode2, mode1, x, Mode alignment can be adjusted before overlap is calculated.
y,z); x offset
y offset
z offset
The offset is applied to the second mode listed.
See Also
copydcard 1649 , findmodes 1606 , coupling 1607 , bestoverlap 1609 , propagate 1609 , expand 1507 , expand2 1508 , optimizeposition
1610
7.12.10 bestoverlap
Finds the best overlap between the D-CARD called "test_mode" and the currently calculated modes. It returns the
name of the mode with the best overlap. This function is mainly used for tracking the desired mode during parameter
sweeps.
See the overlap function for more details about overlap and coupling calculations.
Syntax Description
out = bestoverlap("test_mode"); Calculates the best overlap.
out: a string containing the name of the mode with the best overlap
test_mode: a string containing the name of a D-CARD mode
See Also
findmodes 1606 , coupling 1607 , overlap 1608 , propagate 1609
7.12.11 propagate
The propagate command calculates the resulting mode profile of an arbitrary mode after it has propagated through a
waveguide for some distance. This is done by decomposing the mode into modes supported by the waveguide.
Each supported mode is then propagated through the waveguide. The resulting modes are then added coherently to
give the final mode profile. The modes used in this calculation are obtained from one or more Eigensolver
simulations.
See the overlap function for more details about overlap and coupling calculations.
Syntax Description
out = propagate(mode, d, n1, n2); mode: the name of the monitor containing the mode to propagate
d: distance to propagate
n1: minimum index
n2: maximum index
out: the name of the resulting dataset created by the propagate
command
out = propagate(mode, d, n1, n2, Mode alignment can be adjusted before propagate is calculated.
x, y); x offset
y offset
7.12.12 nummodes
Returns the number of modes in the Eigenmode solver mode list.
Syntax Description
n=nummodes; n will be equal to the number of modes found.
See Also
setanalysis 1605 , mesh 1606 , selectmode 1606 , frequencysweep 1607 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate
1609
7.12.13 optimizeposition
The optimizeposition command calculates the x shift, y shift, and z shift resulting in maximum overlap between the
specified mode and d-card when using the FDE solver.
The x shift, y shift, and z shift correspond to the offset in the d-card profile in x, y, and z.
This function also populates the overlap and power coupling as well as the x shift, y shift, and z shift positions in the
Overlap analysis tab of the Eigensolver Analysis window, similarly to when you click on the "Optimize position"
button in the GUI.
See the overlap 1608 function for more details about overlap and coupling calculations.
Syntax Description
out = optimizeposition(mode mode number: the mode number in the mode list
number, d-card number); d-card number: the number of the d-card in the deck
Note that the "shift d-card center" option must be selected in order to
use this function.
Examples
This example shows how to use the optimizeposition command to calculate the x shift, y shift, and z shift between a
specified mode and d-card resulting in maximum overlap, print out the shift values and the optimal overlap and power
coupling with the applied shift.
out = overlap("mode4","global_mode1",shift(1),shift(2),shift(3));
?"maximum overlap:"+num2str(out(1));
?"maximum power coupling:"+num2str(out(2));
See Also
copydcard 1649 , findmodes 1606 , coupling 1607 , overlap 1608 , bestoverlap 1609 , propagate 1609 , expand 1507 , setanalysis 1605
7.13.1 setemeanalysis
Set calculation parameters in MODE Solutions' EME analysis window.
Syntax Description
?setemeanalysis; Lists all the parameters in the analysis window.
setemeanalysis("property", value); Sets"property" to value.
See Also
EME solver analysis 1611 , Spot size converter 2053
7.13.2 getemeanalysis
Get calculation parameters in MODE Solutions' EME analysis window.
Syntax Description
?getemeanalysis; Lists all the parameters in the analysis window.
getemeanalysis("property"); Gets"property" to value in EME solver analysis window.
See Also
EME solver analysis 1611 , Spot size converter 2053
7.13.3 emepropagate
Propagate fields and s-matrix results when in Analysis mode using EME solver.
Syntax Description
emepropagate; Propagate fields and s-matrix results. This is equivalent to the eme
propagate button in the graphical user interface.
See Also
EME solver analysis 1611 , Spot size converter 2053
7.13.4 emesweep
Run propagation sweep tool when in Analysis mode using EME solver.
Syntax Description
emesweep; Run propagation sweep.
See Also
EME solver analysis 1611 , Spot size converter 2053
7.13.5 getemesweep
Get the user S matrix result from emesweep 1612 .
Syntax Description
getemesweep("S"); Gets the user S matrix result from an EME propagation sweep
See Also
EME solver analysis 1611 , Spot size converter 2053
Command Description
exportschematic 1615 Export the schematic contents of a design kit element to a file.
importschematic 1615 Import the schematic contents from a file into an existing design kit element.
loaddesignkit 1615 Loads a design kit and directs its contents to a user defined path.
removedesignkit 1616 Removes a design kit from the element library Design kits folder.
reloaddesignkit 1616 Reloads the contents of a design kit from the element library Design kits
folder.
packagedesignkit 1616 Create a design kit file from a Custom folder.
installdesignkit 1617 Install a design kit file to the Design Kits folder.
7.14.1 library
The script command returns a list of elements available in the currently installed element libraries, including custom
elements.
Syntax Description
out = library; Returns a list of elements available in the currently installed element
libraries, including custom elements.
See Also
Element library 1612 , addtolibrary 1613 , customlibrary 1613
7.14.2 addtolibrary
The script command adds an element to the currently selected custom library.
Syntax Description
addtolibrary ("name"); Adds an element, to the currently selected custom library.
See Also
Element library 1612 , library 1613 , customlibrary 1613
7.14.3 customlibrary
This command returns the location (path) of custom library.
Syntax Description
out = customlibrary; Returns the directory of the custom library.
See Also
Element library 1612 , library 1613 , addtolibrary 1613
7.14.4 autoplace
This command automatically arranges element positions inside of a compound element.
Syntax Description
autoplace (name); Arrange element positions inside of a
compound element automatically.
See Also
Element library 1612 , library 1613 , addtolibrary 1613 , saveelement 1614 , probe 1614
7.14.5 saveelement
This command saves an element to file.
Syntax Description
saveelement (name); Save an element to file. The element will be
saved with the current element name in the
current working directory with extension ICE.
See Also
Element library 1612 , library 1613 , addtolibrary 1613 , autoplace 1614 , probe 1614 , loadelement 1614
7.14.6 loadelement
This command loads an element from a file created using the saveelement command.
Syntax Description
loadelement (name); Load an element from file in the current
working directory with extension ICE.
See Also
Element library 1612 , library 1613 , addtolibrary 1613 , autoplace 1614 , probe 1614 , saveelement 1614
7.14.7 probe
This command places a probe analyzer at a specified port.
Syntax Description
probe (name,port); Places a probe analyzer at a given element
name and port.
See Also
Element library 1612 , library 1613 , addtolibrary 1613 , saveelement 1614 , autoplace 1614
7.14.8 setvalue
Sets an internal value for an element internal parameter.
Syntax Description
setvalue(element, parameter Set an internal value for an element internal parameter. Different
,value); from set or setnamed, setvalue can have direct access to internal
element parameters. Currently only the Optical N Port S-Parameter
support this function for the internal s parameters value. The s
parameters parameter is a cell that contains a complete description
of the element s-parameters.
See Also
Element library 1612 , addtolibrary 1613 , customlibrary 1613
7.14.9 exportschematic
This command exports the schematic contents of a design kit element to a file.
Syntax Description
exportschematic (name, filename); Export the schematic contents of a design kit element to a file.
See Also
Element library 1612 , importschematic 1615
7.14.10 importschematic
This command imports the schematic contents from a file into an existing design kit element.
Syntax Description
importschematic (name, filename); Import the schematic contents from a file into an existing design
kit element.
See Also
Element library 1612 , exportschematic 1615
7.14.11 loaddesignkit
This command loads a design kit and directs its contents to a user defined path.
Syntax Description
loaddesignkit (name, path); Loads a design kit named name and directs its contents to a
user defined path. The design kit will be available in the element
library Design kits folder.
See Also
Element library 1612 , removedesignkit 1616 , reloaddesignkit 1616
7.14.12 removedesignkit
This command removes a design kit from the element library Design kits folder.
Syntax Description
removedesignkit(name); Removes a design kit named name from the element library
Design kits folder.
See Also
Element library 1612 , loaddesignkit 1615 , reloaddesignkit 1616
7.14.13 reloaddesignkit
This command reloads the contents of a design kit from the element library Design kits folder.
Syntax Description
reloaddesignkit (name); Reloads the contents of a design kit named name from the
element library Design kits folder.
See Also
Element library 1612 , loaddesignkit 1615 , removedesignkit 1616
7.14.14 loadcustom
This command redirects the location of the element library Custom folder and reloads the contents of the folder.
Syntax Description
loadcustom (path); Redirect the location of the element library Custom folder to a
user defined path. It also reloads the contents of the Custom
folder in the element library.
See Also
Element library 1612
7.14.15 packagedesignkit
This command creates a design kit file from a Custom folder.
Syntax Description
packagedesignkit(name, filename, key, Creates a design kit file named filename.ldk from the custom
overwrite); folder named name using an optional obfuscation key key. If
'key' = "none", it will packaged without encryption. The default
value for 'key' is the first key available. If overwrite is true, it will
overwrite an existing design kit file with the same name, if
overwrite is false, it will ask the user for confirmation before
overwriting. The default setting for 'overwrite' is false.
See Also
Element library 1612 , installdesignkit 1617 , Custom Library & Design Kit 1331
7.14.16 installdesignkit
This command installs a design kit file to the Design Kits folder.
Syntax Description
installdesignkit(filename, path, Installs a design kit file named filename.ldk and directs its
overwrite); contents to a user defined path. The design kit will be available in
the element library Design kits folder. If overwrite is true, it will
overwrite an existing design kit with the same name, if overwrite
is false, it will ask the user for confirmation before overwriting.
See Also
Element library 1612 , packagedesignkit 1616 , Custom Library & Design Kit 1331
7.14.17 replacelibrary
This command replaces all instances of the current library in the Element Library.
Syntax Description
replacelibrary(previous,new); Replace all instances of the current library previous by the new
library new.
See Also
Element library 1612
These commands allow users to set the result for scripted elements and compound elements.
Command Description
setresult 1619 Sets the result of a scripted/compound element.
These commands allow users to get internal value for edacosimulation elements and N Port S-Parameter element.
Command Description
getvalue 1620 Get an internal value for an element internal parameter.
These commands allow users to run optimization under user defined settings.
Command Description
runoptimization 1634 Runs optimization of a property from a chosen element under specified
condition.
These commands allow users to export the image of the current circuit schematic.
Command Description
exportimage 1635 Exports an image of the current circuit schematic.
7.15.1 validate
Updates the results for the specified analyzer.
Syntax Description
validate("analyzer"); Updates the results for "analyzer". If the name is not provided, the
selected analyzer will be updated.
See Also
validateall 1619
7.15.2 validateall
Updates the results for all the analyzers in the current simulation.
Syntax Description
validateall; Updates the results for all the analyzers in the current simulation.
See Also
validate 1619
7.15.3 setresult
Sets the result of a scripted/compound element. Note that this command is not available from the script prompt or
script file editor.
Syntax Description
setresult("result",value); Sets the "result" for the scripted/compound element to the specified
value.
setresult("result",value,"kind Sets the "result" for the scripted/compound element to the specified
(unit)"); value with the given description. Note that units should be placed in
parenthesis.
setresult("result",x,y,"x title",'y Sets the x, y parameters of the "result" for the scripted/compound
title'); element. This is useful for visualization.
See Also
getresult 1647
7.15.4 getresultdata
Gets results from an analyzer. This differs from the "getresult" function in that the results are returned as matrices,
not Datasets 1461 .
Syntax Description
?getresultdata; Returns the names of all elements in the current simulation that
contain results.
?getresultdata("analyzer"); Returns all available results for "analyzer".
out = getresultdata("analyzer", Returns the result "result" for "analyzer".
"result");
See Also
setresult 1619 , getresult 1647
7.15.5 getvalue
Get an internal value for an element internal parameter.
Syntax Description
value=getvalue(element, Get an internal value for an element internal parameter. Different from
parameter) set or getnamed, getvalue can have direct access to internal
value=getvalue(element, parameter element parameters. type allows for variations for a given parameter.
,type)
7.15.6 popportdata
Extract the first available data value from the input port.
Syntax Description
data_out = Returns the first available data value from "input_port".
popportdata('input_port");
See Also
pushportdata 1620 , cloneportdata 1621 , portdatasize 1625
7.15.7 pushportdata
Sends the data value to the specified output port.
Syntax Description
pushportdata("output_port",data); Sends the data value to "output_port".
See Also
popportdata 1620 , cloneportdata 1621 , portdatasize 1625
7.15.8 cloneportdata
Clones an existing data value.
Syntax Description
data_destination = Clones "data_source", returns the data destination.
cloneportdata(data_source);
See Also
popportdata 1620 , pushportdata 1620 , portdatasize 1625
7.15.9 popportframe
Extract the first available data value from the input port.
Syntax Description
signalIn = popportframe(port); For a scripted element, this command returns a frame structure
containing the input signal for a given input port (data) and its
properties (header).
Implementation Details
Digital signal frame:
The data contains the current time instant and the value of the signal, where the header contains the signal bitrate,
the frequency grid spacing and the type. The type for a digital signal is 3.
data.time
data.signal{1}.orthogonal_identifier
data.signal{1}.value
data.signal{2}.orthogonal_identifier
data.signal{2}.value
. . .
signalIn.header.type
header.frequency_grid_spacing
header.sample_rate
header.signal{1}.frequency
header.signal{1}.label
signalIn.header.signal{1}.orthogonal_identifier;
signalIn.header.signal{1}.uid
signalIn.header.signal{2}.frequency
signalIn.header.signal{2}.label
signalIn.header.signal{2}.orthogonal_identifier
signalIn.header.signal{2}.uid
. . .
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , pushportframe 1622 , popportframedata 1622 ,
pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624
7.15.10 pushportframe
Writes a frame structure containing the output signal for a given output port.
Syntax Description
pushportframe(port); For a scripted element, this command writes a frame structure
containing the output signal for a given output port (data) and its
properties (header). Refer to popportframe for the list of supported
frame types and examples.
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , popportframedata 1622 ,
pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624
7.15.11 popportframedata
Returns a data structure containing the input signal for a given input port.
Syntax Description
signalIn = popportframedata (port); For a scripted element, this command returns a data structure
containing the input signal for a given input port (data).
Refer to popportframe for the list of supported data types and
examples.
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624
7.15.12 pushportframedata
Writes a data structure containing the output signal for a given output port.
Syntax Description
pushportframedata (port); For a scripted element, this command writes a data structure
containing the output signal for a given output port (data). Refer to
popportframe for the list of supported data types and examples.
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624
7.15.13 getportframeheader
Returns a header structure containing the input signal properties for a given input port.
Syntax Description
getportframeheader(port); For a scripted element, this command returns a header structure
containing the input signal properties for a given input port (header).
Refer to popportframe for the list of supported header types and
examples.
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , setportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624
7.15.14 setportframeheader
Writes a header structure containing the output signal properties for a given output port.
Syntax Description
setportframeheader(port); For a scripted element, this command writes a header structure
containing the output signal properties for a given output port (header).
Refer to popportframe for the list of supported header types and
examples.
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , getmonitorframe 1623 , getmonitorwaveform 1624
7.15.15 getmonitorframe
Reads the available frames from an analyzer input port.
Syntax Description
signalIn = For a scripted element, this command reads the available frames from
getmonitorframe(port,start,count); an analyzer input port. Analyzer input ports store the signal frames in
an internal buffer. This function allows for accessing these frames from
a starting point start with length defined by count. Different from
popportrame where header and data contains one structure each, the
data member returned from this function is cell containing multiple data
values.
Refer to popportframe for the list of supported frame types and
examples.
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorwaveform
1624
7.15.16 getmonitorwaveform
Returns a structure containing a waveform from an analyzer input port.
Syntax Description
signalIn = For a scripted element, this command returns a structure containing a
getmonitorwaveform(port,domain= waveform from an analyzer input port. Results can be provided in time
time); or frequency domains. This command is specific for building
analyzers.
Implementation Details
Digital signal waveform:
The waveform contains the signal bitrate and two vectors: the time and amplitude values.
data.signal{2}.orthogonal_identifier
data.signal{2}.value
. . .
signalIn.header.type
header.frequency_grid_spacing
header.sample_rate
header.signal{1}.frequency
header.signal{1}.label
signalIn.header.signal{1}.orthogonal_identifier;
signalIn.header.signal{1}.uid
signalIn.header.signal{2}.frequency
signalIn.header.signal{2}.label
signalIn.header.signal{2}.orthogonal_identifier
signalIn.header.signal{2}.uid
. . .
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621 , portdatasize 1625 , popportframe 1621 , pushportframe 1622 ,
popportframedata 1622 , pushportframedata 1623 , getportframeheader 1623 , setportframeheader 1623 , getmonitorframe 1623
7.15.17 portdatasize
Returns the number of data values available at the input port.
Syntax Description
size = portdatasize("input_port"); Returns the number of data values available at the input port.
See Also
popportdata 1620 , pushportdata 1620 , cloneportdata 1621
7.15.18 getopticaldata
For a scripted element optical input port, this command returns properties of signalIn or a specified mode of signalIn
depending on the specified options.
This command is typically used in scripted element go functions.
Syntax Description
out=getopticaldata(signalIn,n, m, Returns properties of signalIn or specified modes of signalIn depending
"option1", b, "option2", p); on specified input parameters.
See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticalwaveform 1626 , setopticaldata 1627 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631
7.15.19 getopticalwaveform
For a scripted element optical input port, this command returns number of modes of signalIn or properties of a
specified mode of signalIn depending on the specified options.
This command is typically used in scripted element wrapup functions.
Syntax Description
out=getopticalwaveform(signalIn, Returns properties of signalIn or specified modes of signalIn depending
m, "option1", b, "option2", p); on specified input parameters.
See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , setopticaldata 1627 , getelectricaldata
1629 , getelectricalwaveform 1630 , setelectricaldata 1631
7.15.20 setopticaldata
For a scripted element optical input port, this command sets properties of signalIn or a specified mode of signalIn
depending on the specified options.
This command is typically used in scripted element go functions.
Syntax Description
setopticaldata(signalIn,n, m, Sets properties of signalIn or specified modes of signalIn depending on
"option1", b, "option2"); specified input parameters.
See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631
7.15.21 getdigitaldata
For a scripted element digital input port, this command returns a single bitrate, time, or amplitude value for signalIn
at index n. Parameter n is typically zero.
This command is typically used in scripted element go functions.
Syntax Description
out=getdigitaldata(signalIn,n,"optio Returns a single bitrate, time, or amplitude value for a digital signal
n"); signalIn at index n depending on specified option. If no option is
specified, amplitude will be returned.
See Also
getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata 1627 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631
7.15.22 getdigitalwaveform
For a scripted element digital input port, this command returns the bitrate value, time values, or amplitude values for
signalIn waveform.
This command is typically used in scripted element wrapup functions.
Syntax Description
out=getdigitalwaveform(signalIn,"o Returns a the bitrate value, time values, or amplitude values for signalIn
ption"); waveform depending on specified option. If no option is specified,
amplitude values will be returned.
See Also
getdigitaldata 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata 1627 , getelectricaldata
1629 , getelectricalwaveform 1630 , setelectricaldata 1631
7.15.23 setdigitaldata
For a scripted element digital output port, this command sets a single bitrate value for signalOut at index n.
Parameter n is typically zero.
This command is typically used in scripted element go functions.
Syntax Description
setdigitaldata(signalOut,n,"option", Sets a single bitrate, time, or amplitude value for signalOut at index n
data); depending on specified option. Parameter n is typically zero.
This command is typically used in scripted element go functions.
See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata 1627 ,
getelectricaldata 1629 , getelectricalwaveform 1630 , setelectricaldata 1631
7.15.24 getelectricaldata
For a scripted element electrical input port, this command returns the size, single frequency range, single time
value, or single amplitude value for signalIn.
This command is typically used in scripted element go functions.
Syntax Description
out=getelectricaldata(signalIn,n,"o For a scripted element electrical input port, this command returns the
ption1","option2"); size, single frequency range, single time value, or single amplitude
value for signalIn depending on option1.
"amplitude"
For electrical signals the center frequency value is zero, the bandwidth
is the signal sample rate, the spacing is the frequency grid spacing or
the inverse of the simulation time window, lower is the lower frequency
limit or bandwidth/2 and upper is the upper frequency limit or
+bandwidth/2.
See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata
1627 , getelectricalwaveform 1630 , setelectricaldata 1631
7.15.25 getelectricalwaveform
For a scripted element electrical input port, this command returns the frequency range parameter value, time values,
frequency values, or amplitude values for signalIn.
This command is typically used in scripted element wrapup functions.
Syntax Description
out=getelectricalwaveform(signalIn Returns the frequency range parameter value, time values, frequency
,"option1","option2"); values, or amplitude values for signalIn depending on option1.
For electrical signals the center frequency value is zero, the bandwidth
is the signal sample rate, the spacing is the frequency grid spacing or
the inverse of the simulation time window, lower is the lower frequency
limit or bandwidth/2 and upper is the upper frequency limit or
+bandwidth/2.
See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata
1627 , getelectricaldata 1629 , setelectricaldata 1631
7.15.26 setelectricaldata
For a scripted element electrical output port, this command sets a single time or amplitude value for signalOut at
index n.
Parameter n is typically zero.
This command is typically used in scripted element go functions.
Syntax Description
setelectricaldata(signalOut,n,"opti Sets a single time, or amplitude value for signalOut at index n
on",data); depending on specified option. Parameter n is typically zero.
This command is typically used in scripted element go functions.
See Also
getdigitaldata 1628 , getdigitalwaveform 1628 , setdigitaldata 1629 , getopticaldata 1625 , getopticalwaveform 1626 , setopticaldata
1627 , getelectricaldata 1629 , getelectricalwaveform 1630
7.15.27 setsparameter
Sets the s-parameters between output port and input port.
IMPORTANT: the filter transfer function depends on the sample rate when providing filter coefficients.
Syntax Description
setsparameter("output_port", Sets the s-parameter between "output_port" and "input_port" as a
"input_port", "constant", value); single complex constant value (frequency independent).
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port" as a
e_label", output_mode_ID, single complex constant value (frequency independent).
"input_port", input_mode_ID, "output_mode_ID" and "input_mode_ID" are numbers (i.e., 1, 2, 3...).
"constant", value);
setsparameter("output_port", Sets the s-parameter between "output_port" and "input_port", where
"input_port", "transmission", the transmission is a matrix with 3 columns: frequency (Hz), amplitude
transmission); and angle (rad). The number of rows of the matrix is the number of
frequency points. If only two columns are provided, it is assume that
the angle values are zero.
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port", where
e_label", output_mode_ID, the transmission is a matrix with 3 columns: frequency (Hz), amplitude
"input_port", input_mode_ID, and angle (rad). The number of rows of the matrix is the number of
"transmission", transmission); frequency points. If only two columns are provided, it is assume that
the angle values are zero. "output_mode_ID" and "input_mode_ID" are
numbers (i.e., 1, 2, 3...).
setsparameter("output_port", Sets the frequency dependent propagation parameters between
"input_port", "propagation", "output_port" and "input_port", where the propagation is a matrix with
propagation, length, digital); up to 6 columns: frequency (Hz), absorption (dB/m), effective index,
group velocity (m/s), disperstion (m/s/s) and digital filter. The number of
rows of the matrix is the number of frequency points. Group velocity,
dispersion and digital filter are optional. The length (m) is the
propagation length. Digital is a boolean value which defines whether the
model will use a FIR filter or not (default is true).
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port", where
e_label", output_mode_ID, the propagation is a matrix with up to 6 columns columns: frequency
"input_port", input_mode_ID, (Hz), absorption (dB/m), effective index, group velocity (m/s),
"propagation", propagation, length, disperstion (m/s/s) and digital filter. The number of rows of the matrix is
digital); the number of frequency points. Group velocity, dispersion and digital
filter are optional. The length (m) is the propagation length. Digital is a
boolean value which defines whether the model will use a FIR filter or
not (default is true). "output_mode_ID" and "input_mode_ID" are
numbers (i.e., 1, 2, 3...).
setsparameter("output_port","mod Sets the s-parameter between "output_port" and "input_port", where
e_label", output_mode_ID, the coefficients is a matrix with 2 columns: complex numerators and
"input_port", input_mode_ID, complex denominators. The number of rows of the matrix is the
"coefficient", coeff, frequency); number of coefficients points. If the number of numerators are different
from the number of denominators, set the missing values to zero.
frequency is the center frequency of the transmission described by the
coefficients. Coefficients decrease in powers of z (increase in powers
of 1/z). "output_mode_ID" and "input_mode_ID" are numbers (i.e., 1, 2,
3...).
Example
#Filter coefficients for a Bessel filter of order 4, centered at 193.1 THz:
Frequency=193.1e12;
trans = matrix(5,2);
trans(5,2) = -0.22569071678370439;
Below is a simple example of the usage of the 'coeffieicnt' option, where the user can enter z-transform numerator
and denominator complex coefficients directly. User should provide the complex coefficients and the center
frequency. If the number of numerators and denominators are different, simply provide zero values for the missing
coefficients.
trans = matrix(5,2);
#numerator coefficients (real or complex) - with the constant terms of the polynomial and
trans(1,1) = 0.0016146343489959229;
trans(2,1) = 0.0064585373959836915;
trans(3,1) = 0.0096878060939755359;
trans(4,1) = 0.0064585373959836915;
trans(5,1) = 0.0016146343489959229;
#denominator coefficients (real or complex) - with the constant terms of the polynomial a
trans(1,2) = 1.0000000000000000;
trans(2,2) = 2.6335032369252369;
trans(3,2) = -2.6909323201054560;
trans(4,2) = 1.2572856503799887;
trans(5,2) = -0.22569071678370439;
7.15.28 setfir
Initialize a FIR filter using the current s-parameters.
Syntax Description
setfir("window",taps); Initialize a FIR filter (with the specified number of taps) using the
current s-parameters. "window" is the window function used by the
FIR. The options are: "rectangular", "hamming", "hanning".
See Also
setsparameter 1631
7.15.29 setsetting
Set the value of a user defined setting. User settings are saved permanently and available even closing the
application.
Syntax Description
setsetting("name","string_value") Set the value of a user defined setting.
See Also
Measurements 1617 , getsetting 1634
7.15.30 getsetting
Returns the value of a user defined setting. This command can be used with setsetting 1633 .
Syntax Description
getsetting("name") get the value of a user defined setting.
See Also
Measurements 1617 , setsetting 1633
7.15.31 getports
Returns a list of ports available in an element.
Syntax Description
out = getports("name") get a list of available ports.
See Also
Measurements 1617
7.15.32 runoptimization
This command optimizes a property from a chosen element under specified condition.
Syntax Description
x=runoptimization(element,property,min,max,analyzer,result, Optimize property from element until a target
target,target,tolerance=1e-9,iterations=2000) for an analyzer result is reached. Function
returns an array with two columns, the firs
column contains the property values and the
second column contains the result values.
x=runoptimization(element,property,min,max,analyzer,result, Optimize property from element until a
minimize,tolerance=1e-9,iterations=2000) minimum value for an analyzer result is
reached. Function returns an array with two
Example
Optimize for target
x=runoptimization("PIN Photodetector","thermal noise",1e-20,1e-17,"Eye Diagram","measurem
7.15.33 exportimage
This command export an image of the current circuit schematic.
Syntax Description
exportimage(filename); Exports an image of the current circuit schematic. If the file has png
or no extension, a PNG (Portable Network Graphics) will be created. If
the file has svg extension, a SVG (Scalable Vector Graphics) file will
be created.
See Also
Measurements 1617
7.16 Interoperability
This topic lists all commands related to Lumerical interoperability with other Lumerical products and 3rd party tools
such as MATLAB.
See the following example for more information about the Lumerical automation API: MZI API automation example
2221
See the following example for more information about the Matlab automation API: Matlab Optimization Example 2085
7.16.1 opensession
A command that opens a server session of selected Lumerical product via automation API. Once the session is
opened, client product can call the server to execute arbitrary Lumerical script command(s) and execute them.
Opened Lumerical session also allows to send and get variables from/to workspace.
Syntax Description
s2=opensession('device'); When executed, this command will open a session of Device via the
automation API.
Accepted parameters:
fdtd
mode
device
interconnect
Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:
See Also
closesession 1637 , putremotedata 1637 , getremotedata 1638 , evalremote 1639
7.16.2 closesession
A command that will close an active server session of a specified Lumerical product previously opened via
automation API.
Syntax Description
closesession(s); Closes an active session s
Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:
See Also
opensession 1637 , putremotedata 1637 , getremotedata 1638 , evalremote 1639
7.16.3 putremotedata
A command that will send a variable from the client workspace into the server workspace via an active session
Syntax Description
putremotedata(s,'y',x); Creates variable y in the server workspace that has value of x in the
Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:
See Also
opensession 1637 , closesession 1637 , getremotedata 1638 , evalremote 1639
7.16.4 getremotedata
A command that will get a variable from the server workspace into the client workspace via an active session
Syntax Description
y=getremotedata(s,'x'); Creates variable y in the local client workspace that has value of x in
the server workspace via an active session s
Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:
See Also
opensession 1638 , closesession 1637 , putremotedata 1637 , evalremote 1639
7.16.5 evalremote
A command that will send a script commnad(s) to the server product and executes it there
Syntax Description
evalremote(s,"y=x^2;"); Sends command y=x^2; to the server via an open session s and
executes it
Example
The following code example opens Device as a server, sends local variable 'x' to Device workspace followed by a
command to manipulate the variable and the retrieves the result before closing the session:
See Also
opensession 1639 , closesession 1637 , putremotedata 1637 , getremotedata 1638
7.16.6 appopen
A Matlab command that opens a session of selected Lumerical tool via the Matlab interoperability API. Once the
session is opened, Lumerical can be called from Matlab to execute Lumerical script command(s) and execute them.
Opened Lumerical session also allows Matlab to get variables from Lumerical workspace.
Syntax Description
h=appopen('fdtd'); When executed in Matlab, this command will open a session of FDTD
via the interoperability API.
Accepted parameters:
fdtd
mode
device
interconnect
Example
The following Matlab code example opens FDTD session, loads an existing simulation file "MySimulation.fsp", runs
the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.
h=appopen('fdtd');
appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');
x=appgetvar(h,'T');
appclose(h);
See Also
appclose 1641 , appevalscript 1641 , appgetvar 1640
7.16.7 appgetvar
A Matlab command that will retrieve a variable from Lumerical workspace into Matlab workspace via Matlab
interoperability API.
Syntax Description
x=appgetvar(h,'T'); Retrieves variable T from Lumerical workspace via an active session h
and adds it into Matlab workspace as variable x
Example
The following Matlab code example opens FDTD as a client, loads an existing simulation file "MySimulation.fsp",
runs the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.
h=appopen('fdtd');
appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');
x=appgetvar(h,'T');
appclose(h);
See Also
appopen 1640 , appclose 1641 , appevalscript 1641 ,
7.16.8 appevalscript
A Matlab command that will execute Lumerical script command(s) in an active Lumerical session opened via Matlab
interoperability API.
Syntax Description
appevalscript(h,'scriptcommand'); Executes an arbitrary Lumerical script command in an active session h
Example
The following Matlab code example opens FDTD as a client, loads an existing simulation file "MySimulation.fsp",
runs the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.
h=appopen('fdtd');
appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');
x=appgetvar(h,'T');
appclose(h);
See Also
appopen 1641 , appclose 1641 , appgetvar 1640
7.16.9 appclose
A Matlab command that will close an active Lumerical session opened via Matlab interoperability API.
Syntax Description
appclose(h); Closes an active session h
Example
The following Matlab code example opens FDTD as a client, loads an existing simulation file "MySimulation.fsp",
runs the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.
h=appopen('fdtd');
appevalscript(h,'load("MySimulation.fsp");');
appevalscript(h,'run;');
appevalscript(h,'T=transmission("monitor");');
appevalscript(h,'T=T.T;');
x=appgetvar(h,'T');
appclose(h);
See Also
appopen 1641 , appevalscript 1641 , appgetvar 1640
7.16.10 matlabsave
Save workspace data to Matlab .mat data files.
See Also
System level 1426 , matlabput 1644 , matlabsavelegacy 1642 , matlabload 1642 , vtksave 1442
7.16.11 matlabsavelegacy
Save workspace data to Matlab .mat data using a legacy Matlab file format required for Matlab version 7.2 and
earlier. This file format does not support matrices larger than 2GB.
The command syntax is the same as the standard matlabsave command. See matlabsave 1642 for details.
See Also
System level 1426 , matlabsave 1642
7.16.12 matlabload
Load Matlab .mat data into workspace
Syntax Description
matlabload("filename"); Load to the workspace the data of the specified .mat file.
See Also
System level 1426 , matlabput 1644 , matlabsavelegacy 1642 , matlabsave 1642 ,
7.16.13 matlab
Runs a MATLAB command from the Lumerical script prompt. This gives access to extended mathematical and
visualization functionality from the Lumerical script environment. If the MATLAB script integration is not enabled,
this function will return an error.
The first time a MATLAB function (matlab, matlabget or matlabput) is called, a MATLAB session will be started and
a connection will be established with the Lumerical scripting environment. Once this connection is established,
MATLAB commands can be run using the matlab function. It is important to understand that the MATLAB and the
Lumerical script variable workspaces are completely separate and independent. A MATLAB command cannot act
on a variable defined in the Lumerical workspace, and vice-versa. Variables must be passed between the
workspaces using the matlabget and matlabput functions. At any time you may examine the MATLAB workspace or
interact with the MATLAB environment by typing commands at the MATLAB script prompt. The working directory of
the MATLAB instance is always set to match the working directory of the Lumerical application.
The output from the MATLAB commands will be printed at the Lumerical script prompt. One limitation of the matlab
function is that no error reporting is provided to either the Lumerical script prompt or the MATLAB prompt. MATLAB
commands should be tested by typing them directly into the MATLAB prompt before they are called from a
Lumerical script. The output buffer length is roughly 1e5 characters. Additional output will be truncated.
When you have a long sequence of MATLAB commands, you may find it more convenient to save them in a
MATLAB m-file. Then, you can simply call the m-file by running a single command.
Setup instructions and system requirements for the MATLAB script integration feature can be found in the online
Knowledge Base. See the Setup and Configuration section of the Installation Guide. Additional tips (particularly
for plotting data in Matlab) can be found in the MATLAB 1410 section of the online help.
Syntax Description
matlab("command"); command: a string containing one or more valid MATLAB commands.
matlab(" Multi-line strings can be used in script files to contain a block of
command_1 MATLAB commands. Multi-line strings are not supported at the script
command_2 command prompt.
");
See Also
System level 1426 , matlabget 1643 , matlabput 1644
7.16.14 matlabget
Copies a variable from the MATLAB workspace to the script variable workspace. The resulting variable will have the
same name as the MATLAB variable, and will overwrite any existing variable with the same name. If the variable
does not exist in MATLAB, the command will return an error. For more information, please see the matlab command
description.
Note: Matlab script integration must be enabled in order to use this command. For more information on how to set
this up see the Matlab script integration 1411 page.
Syntax Description
matlabget(var1, var2,...varN); The arguments to this command are one or more variable names that
refer to variables in the MATLAB workspace.
This function does not return any data.
See Also
System level 1426 , matlab 1642 , matlabput 1644
7.16.15 matlabput
Copies a variable from Lumerical's Script Workspace to the MATLAB workspace. The resulting variable in the
MATLAB workspace will have the same name as in Lumerical, and will overwrite any existing variable with the same
name. If the variable does not exist in the Lumerical workspace, the command will return an error.
Syntax Description
matlabput(var1, var2,...varN); The arguments to this command are one or more variable names that
exist in the Lumerical variable workspace.
This function does not return any data.
See Also
System level 1426 , matlab 1642 , matlabget 1643
Most raw data is recorded in multi-dimensional form. For example, monitors in FDTD and MODE Solutions typically
return data in 4D matrices. The first three dimensions of the matrix correspond to the spatial dimensions X, Y, Z. The
4th dimension corresponds to the frequency or time dimension, depending on the type of monitor. For example,
suppose you have a FDTD Solutions simulation with a frequency monitor in the XY plane that records 20 frequency
points. Assuming the monitor spans 100 mesh points in the x direction and 55 mesh points in the y direction, the
size of the Ex field component data matrix will be 100x55x1x20. Notice that the 3rd dimension (corresponding to Z)
has a size of 1, since the monitor only recorded data at one Z position.
Command Description
getresult 1647 Get results from simulation objects.
getdata 1646 Get raw data from simulation objects.
getelectric 1650 Get raw |E|2 data matrix from monitor
getmagnetic 1651 Get raw |H|2 data matrix from monitor
runanalysis 1647 Runs the analysis script in analysis objects
clearanalysis 1650 Clears d-card data obtained by running analysis scripts.
havedata 1648 Used to see if there is any available data stored within an object.
haveresult 1648 Used to see if there are any available results within an object.
read and write data to file 1651 Read and write data to a file.
copydcard 1649 Creates a copy of a d-card.
cleardcard 1650 Clears a d-card.
mcfit 1652 Runs the multi-coefficient fitting for a file containing multiple frequency
dependent transmission values.
simulationdiverged 1656 In layout mode, check whether the simulation reached the divergence
checking auto shutoff threshold.
Parameter sweep,optimization, and yield analysis data is saved with the simulation file and is not cleared when
switching the current simulation to layout mode. These results can be accessed with the following commands:
Command Description
getsweepdata 1645 Gets raw data from parameter sweeps, optimizations, and yield analysis.
getsweepresult 1646 Gets results from parameter sweeps and optimizations.
havesweepdata 1648 Used to check if parameter sweep and optimizations have data.
havesweepresult 1649 Used to check if parameter sweep and optimizations have results.
loadsweep 1651 Loads previously generated sweep result
savesweep 1651 Saves the generated sweep result
issweep 1652 Checks if the simulation is in sweep mode.
copysweep 1652 Copies a sweep/yield/optimization analysis item to clipboard.
pastesweep 1652 Pastes a sweep/yield/optimization analysis item from clipboard.
addsweep 1653 Adds a sweep/yield/optimization item as the top-most item.
insertsweep 1653 Inserts a sweep/yield/optimization item as a child to a parent item.
getsweep 1653 Gets a property from a sweep/yield/optimization item.
setsweep 1654 Sets a property in a sweep/yield/optimization item.
deletesweep 1645 Deletes a specified parameter sweep, optimization, or yield task.
addsweepparameter 1655 Adds a parameter to a sweep/yield/optimization item.
addsweepresult 1655 Adds a result to a sweep/yield/optimization item.
removesweepparameter 1656 Removes a parameter from a sweep/yield/optimization item.
removesweepresult 1656 Removes a result from a sweep/yield/optimization item.
7.17.1 deletesweep
Deletes a specified parameter sweep, optimization, or yield task.
Syntax Description
deletesweep("name"); Deletes the sweep, optimization, or yield task with the specified name.
See Also
Measurements 1644 , addsweep 1653 , copysweep 1652 , pastesweep 1652 , insertsweep 1653 , getsweep 1653 , setsweep 1654
7.17.2 getsweepdata
Gets raw data from a parameter sweep, optimization, or yield analysis. In most cases, it is more convenient to a
complete dataset with getsweepresult, rather than getting individual data elements with getsweepdata.
Syntax Description
?getsweepdata; Returns names of all sweep, optimization, and yield analysis objects.
?getsweepdata("sweep_name"); Returns all the names of the available data which is stored in the
sweep, optimization, or yield analysis object.
out = Returns parameter sweep, optimization, or yield analysis data.
getsweepdata("sweep_name",
"data"); The following data can be obtained from an optimization:
fomTrend - Figure of merit as a function of generation
fomHistory - Figure of merit history (for each generation there will be
generation size number)
bestFom - Best figure of merit obtained during sweep
bestParameter - Parameter which corresponds to bestFom
paramHistory - Parameter history
For a parameter sweep and yield analysis, this command returns both
parameters and results.
See Also
getdata 1646 , runsweep 1595 , havesweepdata 1648 , savedata 1439 , getsweepresult 1646 , savesweep 1651 , loadsweep 1651
7.17.3 getsweepresult
Get parameter sweep or optimization results in the form of a dataset.
Syntax Description
?getsweepresult; Returns names of all sweep or optimization objects with available
results.
?getsweepresult("sweep_name"); Returns names of the available results from the sweep or optimization
task.
out = Returns parameter sweep or optimization dataset.
getsweepresult("sweep_name",
"result");
See Also
Dataset introduction 1461 , runsweep 1595 , havesweepresult 1649 , getresult 1647 , savedata 1439 , getsweepdata 1645 ,
savesweep 1651 , loadsweep 1651
7.17.4 getdata
Get raw data from a simulation object. In most cases, it is more convenient to get a complete dataset with
getresult, rather than getting individual data elements with getdata.
The getdata command is available in INTERCONNECT for compatibility with other Lumerical products, but it's best to
use the getresult script function to access INTERCONNECT simulation data.
See Also
Measurements 1644 , getresult 1647 , havedata 1648 , getelectric 1650 , getmagnetic 1651 , nonorm 1598 , cwnorm 1598 ,
getsweepdata 1645 , getsweepresult 1646
7.17.5 getresult
Get results from simulation objects. Results will be returned as datasets.
Syntax Description
?getresult("monitor_name"); Returns the names of all the results for the monitor. All the dataset and
scalar matrix results will be returned in this case.
R = getresult("monitor_name","T"); Returns the result T from the monitor. T is a dataset.
See Also
Measurements 1644 , haveresult 1648 , Dataset introduction 1461 , "." operator 1484 , visualize 1529 , getdata 1646 ,
rectilineardataset 1459 , matrixdataset 1459 , getattribute 1461 , addattribute 1460 , splitstring 1492
7.17.6 runanalysis
Runs the analysis script in analysis objects.
Note: Scripts that already have data are not re-run; to re-run a script, first clear data using clearanalysis.
Syntax Description
runanalysis; Runs the analysis scripts in all analysis objects in the simulation file.
This function does not return any data.
runanalysis("group name"); Runs the analysis script in the analysis object named "group name".
This function does not return any data.
See Also
run 1593 , getdata 1646 , getresult 1647 , havedata 1648 , clearanalysis 1650 , runsetup 1571
7.17.7 havedata
Used to see a simulation object (such as a monitor) has any data. This command is very similar to haveresult, but is
intended to be used with the getdata command, rather than getresult.
Syntax Description
havedata; Returns 1 if any simulation objects have raw data, and 0 if none have
any raw data.
havedata("name"); Returns 1 if "name" has raw data, and 0 if it does not have any raw
data.
havedata("name","data"); Returns 1 if "name" has the raw data named "data", and 0 if it does not
have that data.
See Also
Measurements 1644 , getdata 1646 , haveresult 1648 , getresult 1647 , copydcard 1649 , cleardcard 1650 , workspace 1457 ,
havesweepdata 1648
7.17.8 haveresult
Used to see a simulation object (such as a monitor) has any results.
Note: This command is very similar to havedata, but is intended to be used with the getresult command, rather than
getdata.
Syntax Description
haveresult; Returns 1 if any simulation objects currently have any results.
haveresult("name"); Returns 1 if "name" has any results, and 0 if it does not.
haveresult("name","data"); Returns 1 if the "name" has a result named "data", and 0 if it does not.
See Also
Measurements 1644 , getresult 1647 , havedata 1648 , getdata 1646 , copydcard 1649 , cleardcard 1650 , workspace 1457 ,
havesweepdata 1648
7.17.9 havesweepdata
Used to check if parameter sweep and optimizations have data. Similar to havedata, but for sweeps and optimization
tasks.
Syntax Description
havesweepdata; Returns 1 if any sweeps or optimizations have data. Returns 0 if data
is not available.
havesweepdata("name"); Returns 1 if the specified sweep or optimization has data.
havesweepdata("name","data"); Returns 1 if the sweep or optimization "name" has the specified data.
See Also
Measurements 1644 , runsweep 1595 , getsweepdata 1645 , getdata 1646 , havedata 1648
7.17.10 havesweepresult
Used to check if parameter sweep and optimizations have results. Similar to haveresult, but used for checking if
sweeps and optimization tasks have available results.
Syntax Description
havesweepresult; Returns 1 if any sweeps or optimizations have results. Returns 0 if
data is not available.
havesweepresult("name"); Returns 1 if the specified sweep or optimization has results.
havesweepresult("name","data"); Returns 1 if the sweep or optimization "name" has the specified result.
See Also
Measurements 1644 , runsweep 1595 , getsweepresult 1646 , getresult 1647 , haveresult 1648
7.17.11 copydcard
Will create a global copy of any d-card currently in memory.
Syntax Description
copydcard( "name"); Will create a global copy of any d-card currently in memory called
"name". By default, the new name will be "::global_name". For
example, copydcard("mode1"); sends mode1 to the deck, named
global_mode1.
This function does not return any data.
copydcard( "name", "newname"); Will create a global copy of any d-card currently in memory called
"name". The new name will be "::newname".
Examples
Sending modes to the d-card and run overlap analysis, eg, in the FDE solver
copydcard("mode1","test_mode1");
copydcard("mode2","test_mode2");
?overlap("test_mode1","test_mode2");
Sending field profiles to the d-card and run overlap analysis, eg, in the FDTD solver
See Also
Measurements 1644 , havedata 1648 , cleardcard 1650 , overlap 1608 , savedcard 1439
7.17.12 clearanalysis
Clears analysis object results. This data is also cleared by switching from Analysis Mode to Layout Mode.
Note: The analysis object results are calculated with the runanalysis command.
Syntax Description
clearanalysis; Clears analysis object results.
This function does not return any data.
clearanalysis( "name1", Clears data from specific analysis objects.
"name2", ...);
See Also
Measurements 1644 , switchtolayout 1534 , getdata 1646 , runanalysis 1647 , havedata 1648
7.17.13 cleardcard
Clears global d-cards. Only global d-cards are cleared. Local d-cards are associated with the current simulation and
can only be cleared by switching from Analysis Mode to Layout Mode.
Syntax Description
cleardcard; Clears all the global d-cards.
This function does not return any data.
cleardcard( "name1", Clears any number of specified d-cards.
"name2", ...);
See Also
Measurements 1644 , havedata 1648 , copydcard 1649
7.17.14 getelectric
Returns the sum of the amplitude squares for all electric field components, i.e. it returns |Ex|2+|Ey|2+|Ez|2.
Syntax Description
out = getelectric( "monitorname"); Returns |Ex|2+|Ey|2+|Ez|2 from the monitor.
getelectric( "monitorname", The optional argument, option, can have a value of 1 or 2. If it is 2, the
option); data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
See Also
Measurements 1644 , getdata 1646 , getmagnetic 1651 , cwnorm 1598 , nonorm 1598
7.17.15 getmagnetic
Returns the sum of the amplitude squares for all magnetic field components, i.e. it returns |Hx|2+|Hy|2+|Hz|2.
Syntax Description
out = Returns |Hx|2+|Hy|2+|Hz|2 from the monitor.
getmagnetic( "monitorname");
getmagnetic( "monitorname", The optional argument, option, can have a value of 1 or 2. If it is 2, the
option); data is unfolded where possible according to the symmetry or anti-
symmetric boundaries if it comes from a monitor that intersect such a
boundary at x min, y min or z min. The default value of option is 2.
See Also
Measurements 1644 , getdata 1646 , getelectric 1650 , cwnorm 1598 , nonorm 1598
7.17.17 loadsweep
The script command loads the sweep object with the previously generated sweep result.
Syntax Description
loadsweep; Loads previously generated sweep result to all the sweep objects in
simulation.
loadsweep("name"); Loads previously generated sweep result to the specified sweep
objects in simulation.
See Also
Measurements 1644 , getdata 1646 , runsweep 1595 , havesweepdata 1648 , savedata 1439 , getsweepresult 1646 , savesweep 1651
7.17.18 savesweep
The script command saves the sweep object results.
Syntax Description
savesweep; Saves the sweep result of all sweep objects in simulation.
savesweep("name"); Saves the sweep result of the specified sweep object.
See Also
Measurements 1644 , getdata 1646 , runsweep 1595 , havesweepdata 1648 , savedata 1439 , getsweepresult 1646 , loadsweep 1651
7.17.19 issweep
The script command checks if the simulation is in sweep mode.
Syntax Description
out = issweep; Returns true (1 or 0) if the simulation is currently in sweep mode.
See Also
Measurements 1644 , runsweep 1595 , havesweepdata 1648 , getsweepresult 1646 , loadsweep 1651 , savesweep 1651
7.17.20 mcfit
The script command runs the multi-coefficient fitting for a file containing multiple frequency dependent transmission
values.
Syntax Description
mcfit(filenamein,filenameout,npole Runs the multi-coefficient fitting for a file containing multiple frequency
s,tolerance,automatic) ; dependent transmission values (filenamein), where each transmission
depends on an operating point, and generates a file containing the
fitting data (filenameout). The number of poles and the fitting tolerance
are defined by parameters npoles and tolerance respectively. The
parameter automatic define if the fitting will use the user defined
npoles or estimate the number of poles automatically.
See Also
Measurements 1644
7.17.21 copysweep
The script command copies a sweep/yield/optimization analysis item to clipboard.
Syntax Description
copysweep("name"); Copies a sweep/yield/optimization analysis item to clipboard.
See Also
Measurements 1644 , deletesweep 1645 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656
7.17.22 pastesweep
The script command pastes a sweep/yield/optimization analysis item from clipboard.
Syntax Description
"name" is the absolute name of the parent item where the new
analysis item will be pasted as a child. If the name is empty, paste the
new analysis item as a top-most item.
Returns the absolute name of the new item. Returns empty string if
paste got failed.
See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656
7.17.23 addsweep
The script command adds a sweep/yield/optimization item as the top-most analysis item.
Syntax Description
addsweep(type); adds a sweep/yield/optimization item as the top-most analysis item.
7.17.24 insertsweep
The script command inserts a sweep/yield/optimization item as a child to a parent analysis item.
Syntax Description
insertsweep("name"); Inserts a sweep/yield/optimization item as a child to a parent analysis
item.
See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656
7.17.25 getsweep
The script command gets a property from a sweep/yield/optimization item.
Syntax Description
getsweep("name", Gets a property from a sweep/yield/optimization item.
"property_name");
"name" is the absolute name of an analysis item.
See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656
7.17.26 setsweep
The script command sets a property in a sweep/yield/optimization item.
Syntax Description
setsweep("name", Sets a property in a sweep/yield/optimization item.
"property_name", property_value);
"name" is the absolute name of an analysis item.
Additional Notes:
Except for the listed default properties of the sweep/optimization/yield, any
added sweep parameters can be edited by the setsweep command by setting the
"property_name" to the parameter name.
See Also
Measurements 1644 , deletesweep 1645 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , removesweepresult 1656 , Sweep scripting
commands 703 , Optimization scripting commands 722 , yield scripting commands 734
7.17.27 addsweepparameter
The script command adds a parameter to a sweep/yield/optimization item.
Syntax Description
addsweepparameter("name", Adds a parameter to a sweep/yield/optimization item.
"parameter");
"name" is the absolute name of an analysis item.
7.17.28 addsweepresult
The script command adds a result to a sweep/yield/optimization item.
Syntax Description
addsweepresult("name", "result"); Adds a result to a sweep/yield/optimization item.
See Also
Measurements 1644 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , removesweepparameter 1656 , removesweepresult 1656 , Sweep scripting commands 703 ,
Optimization scripting commands 722 , yield scripting commands 734
7.17.29 removesweepparameter
The script command removes a parameter from a sweep/yield/optimization item.
Syntax Description
removesweepparameter("name", Removes a parameter from a sweep/yield/optimization item.
"parameter_name");
"name" is the absolute name of an analysis item.
See Also
Measurements 1644 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepresult 1656 , Sweep scripting commands 703 , Optimization
scripting commands 722 , yield scripting commands 734
7.17.30 removesweepresult
The script command removes a result from a sweep/yield/optimization item.
Syntax Description
removesweepresult("name", Removes a result from a sweep/yield/optimization item.
"result_name");
"name" is the absolute name of an analysis item.
See Also
Measurements 1644 , copysweep 1652 , pastesweep 1652 , addsweep 1539 , insertsweep 1653 , getsweep 1653 , setsweep 1633 ,
addsweepparameter 1655 , addsweepresult 1655 , removesweepparameter 1656 , Sweep scripting commands 703 ,
Optimization scripting commands 722 , yield scripting commands 734
7.17.31 simulationdiverged
In layout mode, check whether the simulation reached the divergence checking auto shutoff threshold.
Syntax Description
out=simulationdiverged; Returns 1 if the simulation reached the auto shutoff max threshold, 0
otherwise.
See Also
Measurements 1644
See Also
Far field projection toolbox 126 , Far field change index analysis object 814 , Grating projection script functions 1666
7.18.1 farfieldfilter
The far field filter is used to remove ripples in the far field projection due to clipping of the near fields. It should be
used when the near fields at the edge of the monitor are small but not precisely zero.
The bumpy blue line of the figure shows the near field electric field that
will be used for a far field projection. In this case, the field does not go
to zero at the edge of the monitor, which will lead to ripples in the far
field projection. The green line shows the spatial filter that will be
applied to the fields, ensuring they go to zero. The filter parameter
defines the width of the filter by the following formula: a=(a)/(a+b).
Syntax Description
out = farfieldfilter; Get the current far field filter setting.
farfieldfilter(a); Set the current far field filter setting. a=(a)/(a+b). The far field filter has
a single input parameter, which is a number between 0 and 1. By
default, it is 0, which turns the filter off. This filter is applied to all far
field projections.
Examples
Far field projection - spatial filtering 134
See Also
farfield2d 1658 , farfield3d 1661
7.18.2 farfield2d
Projects a given power or field profile monitor to the far field. The electric field intensity |E|2 is returned.
Syntax Description
E2 = farfield2d("mname", f, n, Projects a given power or field profile monitor to the far field.
illumination, periods, index,
direction);
See Also
Far field projections 1657 , farfield3d 1661 , farfieldangle 1659 , farfieldvector2d 1659 , farfieldpolar2d 1659 , farfieldexact2d 1664 ,
farfieldfilter 1658 , farfieldexact 1665 , farfield2dintegrate 1660
7.18.3 farfieldvector2d
The function farfieldvector2d is similar to farfield2d, but it returns the complex electric fields, rather than field
intensity. The data is returned as matrix of Nx3, where the last index refers to Ex, Ey and Ez which are the
complex components of the electric field vector.
Syntax Description
out = Returns the cartesian complex electric fields. Same arguments as
farfieldvector2d( "mname",...); farfield2d.
See Also
farfield2d 1658
7.18.4 farfieldpolar2d
The function farfieldpolar2d is similar to farfield2d, but it returns the complex electric fields, rather than field intensity.
The data is returned as matrix of Nx3, where the last index refers to Er, Eq and Ez, in cylindrical coordinates. For
TM simulations, this function gives precisely the result of farfieldvector2d because the only non-zero field component
is Ez.
Syntax Description
out = Returns the polar complex electric fields. Same arguments as
farfieldpolar2d( "mname",...); farfield2d.
See Also
farfield2d 1658 , farfieldvector2d 1659
7.18.5 farfieldangle
Used for 2D simulations. It returns the matrix of angles, in degrees, corresponding to the data in farfield2d. This is
required because the projection does not use a set of linearly spaced angles for the projection. It is often useful to
re-interpolate the data onto a set of linearly spaced angles using the interp or spline functions.
Syntax Description
theta = farfieldangle( "mname", f, Returns the matrix of angles corresponding to the data in farfield2d
n, index);
See Also
farfield2d 1658
7.18.6 farfield2dintegrate
Used in 2D simulations, this function integrates the far field projection over some range of theta. Angles are
specified in degrees, but the integral is done in radians.
2
E (q )d q
q
Syntax Description
out = farfield2dintegrate(E2, Integrate 2D far field projection data.
theta, halfangle, theta0);
See Also
Near to far field projections 1657 , farfield2d 1658 , farfieldangle 1659
7.18.7 farfield3d
Projects a given power or field profile monitor to the far field. The electric field intensity |E|2 is returned.
Syntax Description
out = farfield3d("mname",f, na, nb, Projects a given power or field profile monitor to the far field.
illumination, periodsa, periodsb,
index, direction);
The following table summarizes how to interpret the ux, uy coordinate vectors and periods input properties for various
monitor orientations.
Monitor orientation Monitor surface normal 'na', 'ux', 'periods a' 'nb', 'uy', 'periods b'
correspond to correspond to
XY plane Z x axis y axis
XZ plane Y x axis z axis
YZ plane X y axis z axis
See Also
Far field projections 1657 , farfield2d 1658 , farfieldvector3d 1661 , farfieldpolar3d 1662 , farfieldux 1662 , farfielduy 1662 ,
farfieldexact3d 1664 , farfieldfilter 1658 , farfield3dintegrate 1663
7.18.8 farfieldvector3d
The function farfieldvector3d is similar to farfield3d, but it returns the complex electric fields, rather than field
intensity. The data is returned as matrix of NxMx3, where N and M are spatial indices and the last index refers to
Ex, Ey and Ez. The components Ex, Ey and Ez are the complex components of the electric field vector. See the
farfield3d documentation for information on interpreting ux, uy, na, nb for various monitor orientations.
Syntax Description
out = Returns the cartesian complex electric fields. Same arguments as
farfieldvector3d( "monitorname",...) farfield3d.
;
See Also
farfield3d 1661
7.18.9 farfieldpolar3d
The function farfieldpolar3d is similar to farfield3d, but it returns the complex electric fields, rather than field intensity.
The data is returned as matrix of NxMx3, where N and M are spatial indices and the last index refers to Er, Eq and
Ej, in spherical coordinates. The components Er, Eq and Ej are the complex components of the electric field vector.
See the farfield3d documentation for information on interpreting ux, uy, na, nb for various monitor orientations.
Note: When viewing far fields from the GUI with the visualizer, three Attributes are availabe: E2, Ep, Es. E2
corresponds to |E|^2, Ep to Etheta, and Es to Ephi.
Syntax Description
out = Returns the spherical complex electric fields. Same arguments as
farfieldpolar3d( "monitorname",...); farfield3d.
See Also
farfield3d 1661 , farfieldvector3d 1661 , Far field projections - Field polarization 136
7.18.10 farfieldux
Used for 3D simulations. It returns the matrix of ux corresponding to the data in farfield3d. See the farfield3d
documentation for information on interpreting ux, uy, na, nb for various monitor orientations.
Syntax Description
farfieldux("mname",f,na,nb,index); See farfield3d help. Arguments are same as for farfield3d.
See Also
farfield3d 1661 , farfielduy 1662 , farfieldspherical 1663 , farfieldexact 1665
7.18.11 farfielduy
Used for 3D simulations. It returns the matrix of uy corresponding to the data in farfield3d. See the farfield3d
documentation for information on interpreting ux, uy, na, nb for various monitor orientations.
Syntax Description
farfielduy("mname",f,na,nb,index); See farfield3d help. Arguments are same as for farfield3d.
See Also
farfield3d 1661 , farfieldux 1662 , farfieldspherical 1663 , farfieldexact 1665
7.18.12 farfieldspherical
This functions interpolates far field data (3D simulations) from E(ux,uy) to E(theta,phi). The far field projections
functions generally return the projection as a function of ux,uy (direction cosines). farfieldspherical can be used to
interpolate this data into the more common units of theta, phi. See the farfield3d documentation for information on
interpreting ux, uy, na, nb for various monitor orientations.
Syntax Description
out = farfieldspherical( E2, ux, interpolate far field data to spherical coordinates.
uy, theta, phi);
See Also
Far field projections 1657 , direction cosine units 132 , farfield3d 1661 , farfieldux 1662 , farfielduy 1662
7.18.13 farfield3dintegrate
Used in 3D simulations, this function integrates the far field projection over a cone centered at theta0 and phi0, with
a width specified by halfangle. The far field electric field is a function of the direction cosines (ux,uy), but
farfield3dintegrate automatically does the change of variables. Similarly, angles are specified in degrees, but
converted to radians before the integral is calculated. See the farfield3d documentation for information on interpreting
ux, uy, na, nb for various monitor orientations.
E (ux, uy )sin( q )d qd f
2
q ,f
Syntax Description
out = farfield3dintegrate(E2, ux, Integrate 3D far field projection data.
uy, halfangle, theta0, phi0);
halfangle optional 90 vector Half angle of the integration cone. unit in degrees. must
have length L or 1. Half angle should be between 0 to 90
degrees.
theta0 optional 0 vector Center angle theta of the integration cone. unit in
degrees. must have length L or 1. Theta0 should be
between 0 to 90 degrees.
phi0 optional 0 vector Center angle phi of the integration cone. unit in degrees.
must have length L or 1. Phi0 should be between 0 to
360 degrees.
See Also
Near to far field projections 1657 , farfield3d 1661 , farfieldux 1662 , farfielduy 1662 , farfieldspherical 1663
7.18.14 farfieldexact2d
This function projects complete complex vector fields to specific locations. It is expected to be correct down to
distances on the order of one wavelength. The projections from multiple monitors can be added to create a total far
field projection.
farfieldexact2d projects any surface to the grid points defined by the vectors x, y. The data is returned in the form of
a matrix that is of dimension NxMx3 where N is the length of the x vector, M is the length of the y vector and the
final index represents Ex, Ey, and Ez. Note that N and M can be 1; when they are both 1, the function is the same
as farfieldexact.
Syntax Description
out = farfieldexact2d( "mname", x, Projects a given power or field profile monitor to the far field at grid
y, f, index); points specified by the vectors x,y.
See Also
farfield2d 1658 , farfieldexact3d 1664 , farfieldexact 1665
7.18.15 farfieldexact3d
The three dimension form of farfieldexact2d. This function projects complete complex vector fields to specific
locations. It is expected to be correct down to distances on the order of one wavelength. The projections from
multiple monitors can be added to create a total far field projection.
farfieldexact3d projects any surface to the grid points defined by the vectors x,y and z. The data is returned in a
matrix of dimension NxMxKx3 where N is the length of the vector x, M the length of the vector y, K is the length of
the vector z and the final index represents Ex, Ey, and Ez. Note that N, M and K can be 1, and when they are all 1,
the function is the same as farfieldexact.
Syntax Description
out = farfieldexact3d( "mname", x, Projects a given power or field profile monitor to the far field at grid
y, z, f, index); points specified by the vectors x,y,z.
See Also
farfield3d 1661 , farfieldexact2d 1664 , farfieldexact 1665
7.18.16 farfieldexact
This function projects complete complex vector fields to specific locations. It is expected to be correct down to
distances on the order of one wavelength. The projections from multiple monitors can be added to create a total far
field projection.
farfieldexact projects any surface fields to a series of points defined by vector lists. The x,y, z coordinates of each
evaluation point are taken element-by-element from the vector lists. i.e., the i-th point in a 2D simulation would be at
[x(i),y(i)].
3D
Vectors lists x,y,z must have the same length L or be length 1. The data is returned in a matrix of dimension Lx3.
The first index represents positions defined by one element from each of x,y, z. [x(i),y(i),z(i)]; the second index
represents Ex, Ey, and Ez.
2D
Vector lists x, y must have the same length L or be length 1. The data is returned in the form of a matrix that is of
dimension Lx3. The first index represents positions defined by one element from each of x,y. [x(i),y(i)]; The second
index represents Ex, Ey, and Ez.
Syntax Description
out = farfieldexact("mname", x, y, 2D far field exact projection
f, index)
out = farfieldexact("mname", x, y, 3D far field exact projection
z, f, index);
See Also
farfield2d 1658 , farfield3d 1661 , farfieldexact2d 1664 , farfieldexact3d 1664
See Also
Grating projection toolbox 150 , Far field projection toolbox 126 , Far field projection script functions 1657
7.19.1 grating
Returns the fraction of transmitted power to each physical grating orders for a given simulation. Results are
normalized such that the sum of all the orders is equal to 1. To convert these values into fractions of the source
power, multiply by the the transmission script function.
3D simulations: Data is returned in a N x M matrix where N,M are the number of grating orders.
2D simulations: Data is returned in a N matrix where N is the number of grating orders.
Syntax Description
out = grating("monitorname",f, Returns the strength of all physical grating orders from monitorname.
index, direction );
The following table summarizes how to interpret the coordinate vector properties for various monitor orientations.
Monitor orientation Monitor surface normal 'N', 'ux', 'gratingn', 'M', 'uy', 'gratingm',
'gratingperiod1', 'gratingperiod2',
'gratingu1', 'gratingu2',
'gratingbloch1', 'gratingbloch2'
correspond to correspond to
XY plane Z x axis y axis
XZ plane Y x axis z axis
YZ plane X y axis z axis
See Also
Grating projections 1666 , gratingn 1667 , gratingperiod1 1669 , gratingbloch1 1671 , gratingu1 1670 , gratingangle 1670 , gratingpolar
1668 , gratingvector 1669
7.19.2 gratingn
Returns a vector of the grating order numbers (i.e. zeroeth order, first order) corresponding to the data from the
grating function. gratingn gives the order numbers for the first dimension of the data (2D and 3D). gratingm gives the
order numbers for the 2nd dimension (3D only). See the grating function documentation for information on
interpreting N, M, ux, uy for various monitor orientations.
Syntax Description
out = gratingn( "monitorname",...); Same arguments as grating function.
See Also
Grating projections 1666 , grating 1666 , gratingm 1668
7.19.3 gratingm
Returns a vector of the grating order numbers (i.e. zeroeth order, first order) corresponding to the data from the
grating function. gratingn gives the order numbers for the first dimension of the data (2D and 3D). gratingm gives the
order numbers for the 2nd dimension (3D only). See the grating function documentation for information on interpreting
N, M, ux, uy for various monitor orientations.
Syntax Description
out = Same arguments as grating function.
gratingm( "monitorname",...);
See Also
Grating projections 1666 , grating 1666 , gratingn 1667
7.19.4 gratingpolar
Very similar to the basic grating function, except that the vector field information is returned in spherical coordinates.
This is useful when studying the polarization effects. The data is normalized such that the sum of |Er|^2+|Etheta|^2+
|Ephi|^2 over all grating orders equals 1. See the grating function documentation for information on interpreting N, M,
ux, uy for various monitor orientations.
3D simulations: Data is returned in a N x M x 3 matrix where N,M are the number of grating orders. The third
dimension is Er, Etheta, Ephi.
2D simulations: Data is returned in a N x 3 matrix where N is the number of grating orders. The second dimension
is Er, Etheta, Ephi.
Syntax Description
out = gratingpolar( "mname", f, Returns the strength of all physical grating orders from the monitor.
index, direction); Output is in spherical coordinates.
See Also
Grating projections 1666 , grating 1666 , gratingn 1667 , gratingperiod1 1669 , gratingbloch1 1671 , gratingu1 1670 , gratingangle 1670 ,
gratingvector 1669
7.19.5 gratingvector
Very similar to the basic grating function, except that the vector field information is returned in cartesian coordinates.
This is useful when studying the polarization effects. The data is normalized such that the sum of |Ex|^2+|Ey|^2+ |
Ez|^2 over all grating orders equals 1. See the grating function documentation for information on interpreting N, M,
ux, uy for various monitor orientations.
3D simulations: Data is returned in a N x M x3 matrix where N,M are the number of grating orders. The third
dimension is Ex, Ey, Ez.
2D simulations: Data is returned in a N x3 matrix where N is the number of grating orders. The second dimension is
Ex, Ey, Ez.
Syntax Description
out = gratingvector( "mname", f, Returns the strength of all physical grating orders from monitorname.
index, direction); Output is in Cartesian coordinates.
See Also
Grating projections 1666 , grating 1666 , gratingn 1667 , gratingperiod1 1669 , gratingbloch1 1671 , gratingu1 1670 , gratingangle 1670 ,
gratingpolar 1668
7.19.6 gratingperiod1
Returns the grating period (i.e. the simulation span) used in the grating calculations. gratingperiod1 gives the grating
period for the first dimension (2D and 3D). gratingperiod2 gives the period of the 2nd dimension (3D only). See the
grating function documentation for information on interpreting N, M, ux, uy for various monitor orientations.
Syntax Description
out = Same arguments as grating function.
gratingperiod1( "monitorname", ...)
;
See Also
Grating projections 1666 , grating 1666 , gratingperiod2 1670
7.19.7 gratingperiod2
Returns the grating period (i.e. the simulation span) used in the grating calculations. gratingperiod1 gives the grating
period for the first dimension (2D and 3D). gratingperiod2 gives the period of the 2nd dimension (3D only). See the
grating function documentation for information on interpreting N, M, ux, uy for various monitor orientations.
Syntax Description
out = Same arguments as grating function.
gratingperiod2( "monitorname", ...)
;
See Also
Grating projections 1666 , grating 1666 , gratingperiod1 1669
7.19.8 gratingangle
Returns the angle vector corresponding to the values returned by grating, in degrees, for 2D simulations. For 3D
simulations, use gratingu1 and gratingu2.
Syntax Description
out = Same arguments as grating function.
gratingangle( "monitorname", ...);
See Also
Grating projections 1666 , grating 1666 , gratingu1 1670 , gratingu2 1670
7.19.9 gratingu1
Returns the grating order direction unit vectors (u1 and u2) corresponding to the data from the grating function from
3D simulation. For 2D simulations, use the gratingangle function. See the grating function documentation for
information on interpreting N, M, ux, uy for various monitor orientations.
Syntax Description
out = Same arguments as grating function.
gratingu1( "monitorname", ...);
See Also
Grating projections 1666 , grating 1666 , gratingu2 1670 , gratingangle 1670
7.19.10 gratingu2
Returns the grating order direction unit vectors (u1 and u2) corresponding to the data from the grating function from
3D simulation. For 2D simulations, use the gratingangle function. See the grating function documentation for
information on interpreting N, M, ux, uy for various monitor orientations.
Syntax Description
See Also
Grating projections 1666 , grating 1666 , gratingu1 1670 , gratingangle 1670
7.19.11 gratingbloch1
Returns the bloch vector (k in_1 and k in_2) used in the grating calculation. This corresponds to the bloch vector setting
in the simulation region. gratingbloch1 gives the bloch vector for the first dimension (2D and 3D). gratingbloch2
gives the bloch vector for the 2nd dimension (3D only). See the grating function documentation for information on
interpreting N, M, ux, uy for various monitor orientations.
Syntax Description
out = Same arguments as grating function.
gratingbloch1( "monitorname", ...);
See Also
Grating projections 1666 , grating 1666 , gratingbloch2 1671
7.19.12 gratingbloch2
Returns the bloch vector (k in_1 and k in_2) used in the grating calculation. This corresponds to the bloch vector setting
in the simulation region. gratingbloch1 gives the bloch vector for the first dimension (2D and 3D). gratingbloch2
gives the bloch vector for the 2nd dimension (3D only). See the grating function documentation for information on
interpreting N, M, ux, uy for various monitor orientations.
Syntax Description
out = Same arguments as grating function.
gratingbloch2( "monitorname", ...);
See Also
Grating projections 1666 , grating 1666 , gratingbloch1 1671
Command Description
addmaterial 1672 Adds a new material into the material database.
copymaterial 1672 Copies an existing material in the material database
setmaterial 1672 Sets any property of an existing material in the material database.
getmaterial 1673 Returns properties of a material in the material database.
getindex 1673 Returns the complex index of a material.
getfdtdindex 1673 Returns the material index as it will be in an actual FDTD simulation.
getmodeindex 1674 Returns the material index as it will be in an actual MODE simulation.
getnumericalpermittivity 1674 An advanced function that returns permittivity, taking into account the effect of
finite size of dt in an FDTD simulation.
deletematerial 1675 Deletes a material from the material database.
materialexists 1676 Returns if or not a material exists in the material database.
getsurfaceconductivity 1676 Returns surface conductivity of specified material which uses the surface
conductivity model.
getfdtdsurfaceconductivity 1676 Returns surface conductivity of specified material which uses the surface
conductivity model as will be used in a simulation.
7.20.1 addmaterial
Adds a new material to the material database.
Syntax Description
?addmaterial; Displays all types of materials that can be added into the material
database.
out = addmaterial("materialtype"); Adds a new material and returns the name of the new material. The
argument "materialtype" is has to match correct string exactly.
See Also
Material database 1671 , setmaterial 1672 , getindex 1673 , getfdtdindex 1673
7.20.2 copymaterial
Makes a copy of a material in the material database.
Syntax Description
out = Creates a copy of the material "materialname". The new name is
copymaterial("materialname"); returned.
See Also
Material database 1671 , setmaterial 1672 , getindex 1673 , getfdtdindex 1673
7.20.3 setmaterial
Modifies properties of a material in the material database.
Syntax Description
?setmaterial("materialname"); Displays the property names of the specified material that can be
modified.
setmaterial( "materialname", Sets the property named "propertyname" of the material with the name
"propertyname", newvalue); "materialname" to newvalue. The argument newvalue can be a number
or a string. The arguments "propertyname" and "materialname" have to
match correct string exactly. For example,
setmaterial("Si","Mesh order",4);
will set the property "mesh order" of the materials "Si" to 4.
See Also
Material database 1671 , addmaterial 1672 , getmaterial 1673 , getindex 1673 , getfdtdindex 1673 , importing arbitrary dispersive
material 231
7.20.4 getmaterial
Returns properties of a material in the material database.
Syntax Description
?getmaterial( "materialname"); Displays the property names of the specified material that can be
modified.
out = getmaterial( "materialname", Returns the property named "propertyname" of the material with the
"propertyname"); name "materialname". The returned variable is either a matrix or a
string, depending on the property in the query.
See Also
Material database 1671 , addmaterial 1672 , setmaterial 1672 , getindex 1673 , getfdtdindex 1673
7.20.5 getindex
Returns the complex index of any material that is in the material database. The index at the specified frequency is
interpolated from the neighboring frequencies where the index data is available.
Syntax Description
out = getindex( "materialname", f); Returns the complex index of the material with the given name. The
index is returned for the specified frequency f. Frequency f is in Hz.
getindex( "materialname", f, Optional argument component can be 1, 2 or 3 to specify the x, y or z
component); component for anisotropic materials. The default is 1.
See Also
Material database 1671 , getfdtdindex 1673 , getmodeindex 1674 , addmaterial 1672 , setmaterial 1672
7.20.6 getfdtdindex
This function returns the material index of a material in the database as it will be used in an actual FDTD simulation.
Many materials (such as Sampled materials) have properties that depend on frequency. Using getfdtdindex, you can
specify frequency range, and the fitting routine will find a best fit of the material data over that range. The index
evaluated at the specified f is then returned. Note that the fit result depends on the fit parameters, Max coefficients
and Tolerance set for the material, thus getfdtdindex result depends on those parameters as well.
Syntax Description
out = Returns the complex index of the material with the given name. The
getfdtdindex( "materialname", f, index is returned for the specified frequency f. Similar to getindex, but
fmin, fmax); you also specify fmin and fmax, the span of frequency of the FDTD
simulation. All frequency units are in Hz.
getfdtdindex("materialname", Optional argument component can be 1, 2 or 3 to specify the x, y or z
f,fmin, fmax, component); component for anisotropic materials. The default is 1.
See Also
Material database 1671 , getindex 1673 , getmodeindex 1674 , addmaterial 1672 , setmaterial 1672
7.20.7 getmodeindex
This function returns the material index of a material in the database as it will be used in an actual MODE
simulation.
Many materials (such as Sampled Materials) have properties that depend on frequency. Using getmodeindex, you
can obtain the refractive index as a function of the specified frequency, f, as it will be used in MODE calculations.
Note that when multi-coefficient models are used, the fit result depends on the fit parameters, Max coefficients and
Tolerance set for the material.
Syntax Description
out = Returns the complex index of the material with the given name. The
getmodeindex( "materialname", f); index is returned for the specified frequency f. This result is identical to
getindex unless the optional arguments fitsampled and fitanalytic are
used. All frequency units are in Hz.
getmodeindex("materialname", Optional argument component can be 1, 2 or 3 to specify the x, y or z
f,component); component for anisotropic materials. The default is 1.
getmodeindex("materialname", Optional arguments to specify if Sampled Materials or Analytic
f,component, fitsampled, Materials should be fitted using Lumerical's multi-coefficient model
fitanalytic, fmin, fmax); (MCM), which is commonly used in FDTD simulations. If either of
these options are set to 1 (true) then you must supply a minimum and
maximum frequency for fitting. The MCM is typically used in MODE
Solutions for
Sampled Materials when calculating waveguide dispersion, and for
Analytic Materials only for the purpose of using precisely the same
materials in both FDTD and MODE simulations.
The default values are 0 (false) for fitsampled and fitanalytic.
See Also
Material database 1671 , getindex 1673 , getfdtdindex 1673 , addmaterial 1672 , setmaterial 1672
7.20.8 getnumericalpermittivity
This advanced function returns the permittivity of a material in the database as it will be used in an actual FDTD
simulation, including the effects of a finite time step, dt. In FDTD, the relationship between the displacement field, D,
and the electric field, E, is given by
r r
D(w ) = e 0 e r (w , dt )E (w )
In the limit where dt tends to zero, we have
lim dt 0 e r (w , dt ) = n 2 (w )
where n(w) is the refractive index returned by the script function getfdtdindex, or shown in the Materials Explorer. If
you set dt to zero when calling this function, it will return exactly the same result as the square of getfdtdindex.
The name of the function is a reminder that it returns the numerical permittivity, i.e., the ratio of D and E, which is
different from the refractive index, i.e. the ratio of the speed of light in a vacuum to the phase velocity of light in the
medium. To understand the relationship between them, we must consider the full, numerical dispersion relation
between w and k, which is given by
2 2 2 2
1 wdt 1 k dx 1 k y dy 1 k dz
e r (w , dt ) sin = sin x + sin + sin z
cdt 2 dx 2 dy 2 dz 2
In the limit where dt, dx, dy and dz tend to zero, it is easy to show that we have the expected result
ck ck
w= =
e r ( w , dt = 0) n( w )
The spatial FDTD mesh and time step are generally chosen to obtain a desired level of simulation accuracy,
essentially by ensuring that the arguments of the sine functions are sufficiently small that sin(x)~x and that the
simulation is stable. For some materials, it may be desired to further reduce the value of the time step, dt, without
modifying the spatial FDTD mesh, in order to obtain a higher level of accuracy for er(w,dt). This script function makes
it possible to calculate, in advance, the value of dt required to obtain the desired accuracy for the permittivity.
The results from getnumericalpermittivity will be different if the Broadband Fixed Angle Source Technique (BFAST) is
used. Since the script function does not require a calculation being performed beforehand, the user needs to specify
if the computation uses BFAST or not. See the BFAST page 590 for more details about this technique.
Syntax Description
out = getnumericalpermittivity Returns the complex permittivity of the material with the given name.
( "materialname", f, fmin, fmax, The permittivity is returned for the specified frequency f. This is similar
dt); to getfdtdindex except for the additional parameter dt. All frequency
units are in Hz.
getnumericalpermittivity("materialn Optional argument component can be 1, 2 or 3 to specify the x, y or z
ame", f,fmin, fmax, dt, component for anisotropic materials. The default is 1.
component);
getnumericalpermittivity("materialn Optional argument use_bfast can be 0 or 1. It indicates whether the
ame", f,fmin, fmax, dt, component, simulation is performed using the Broadband Fixed Angle Source
use_bfast); Technique (BFAST) or not. The default is 0.
See Also
Material database 1671 , getindex 1673 , addmaterial 1672 , setmaterial 1672 , getfdtdindex 1673
7.20.9 deletematerial
Deletes a material from the material database.
Syntax Description
deletematerial("material_name"); Deletes a material named "material_name" from the material database.
See Also
Material database 1671 , setmaterial 1672
7.20.10 materialexists
Returns if or not a material exists in the material database.
Syntax Description
materialexists("material_name"); Returns 1 if the material named "material_name" is present in the
material database. Otherwise return 0.
See Also
Material database 1671
7.20.11 getfdtdsurfaceconductivity
For materials which use a surface conductivity material model (such as Graphene), this function returns the surface
conductivity of the material in the database as it will be used in an actual simulation.
The conductivity evaluated at the specified f is returned. Note that the fit result depends on the fit parameters, Max
coefficients and Tolerance set for the material, thus getfdtdsurfaceconductivity result depends on those parameters
as well.
Syntax Description
out = Returns the surface conductivity of the material with the given name.
getfdtdsurfaceconductivity( "materi The surface conductivity is returned for the specified frequency f.
alname", f, fmin, fmax); Similar to getsurfaceconductivity, but you also specify fmin and fmax,
the span of frequency range of the simulation. All frequency units are in
Hz.
getfdtdsurfaceconductivity("materi Optional argument component can be 1, 2 or 3 to specify the x, y or z
alname", f,fmin, fmax, component for anisotropic materials. The default is 1.
component);
See Also
Material database 1671 , addmaterial 1672 , setmaterial 1672 , getsurfaceconductivity 1676
7.20.12 getsurfaceconductivity
For materials which use a surface conductivity material model (such as Graphene), this function returns the complex
index of any material that is in the material database. The surface conductivity at the specified frequency is
interpolated from the neighboring frequencies where the conductivity data is available.
Syntax Description
out = Returns the surface conductivity of the material with the given name.
getsurfaceconductivity( "materialn The surface conductivity is returned for the specified frequency f.
ame", f); Frequency f is in Hz.
getsurfaceconductivity( "materialn Optional argument component can be 1, 2 or 3 to specify the x, y or z
ame", f, component); component for anisotropic materials. The default is 1.
See Also
7.21 GDSII
The following commands can be used to import and export GDSII files.
Command Description
gdsopen 1677 Opens a GDSII file for writing.
gdsclose 1677 Closes a GDSII file for writing.
gdsbegincell 1678 Starts a new cell in a GDSII file.
gdsendcell 1678 Finishes a cell in a GDSII file.
gdsaddpoly 1679 Adds a polygon element to a GDSII file stream.
gdsaddcircle 1679 Adds an approximation of a circle to a GDSII file stream.
gdsaddrect 1680 Adds a rectangle element to a GDSII file stream.
gdsaddref 1680 Adds a reference to another cell to the current cell in the GDSII file stream.
gdsimport 1681 Imports a cell from a .gds file into the layout environment.
See Also
GDSII import / export functionality and example 480
7.21.1 gdsopen
This function creates a new .gds file and returns a file handle that can be used with the other GdsWriter functions to
write the file. The default database units are in 0.1nm and the user units are microns. The GDSII export function
works as a group of commands, shown below as an example. For more information, please see Userguide - GDSII -
Import and export 480 .
Syntax Description
f = gdsopen("filename", "userUnit", Opens a .gds file in the current directory, specifies the size of user units
"dataBaseUnit") and size of the GDSII file units. f is a file handle to open the GDSII file.
7.21.2 gdsclose
This function closes a GDSII file for writing. Before calling this command, a .gds file has to be previously opened,
see gdsopen 1677 .
Syntax Description
gdsclose("filename") closes a .gds file in the current working directory.
See Also
gdsopen 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsimport 1681
7.21.3 gdsbegincell
This function creates a cell in a GDSII file. All GDS elements (polygons, boxes, references, array references, etc)
must be placed inside a cell, so this function must be called before adding any elements. When finished adding
elements, gdsendcell can be called to finish the cell. Cells cannot be nested, so after calling gdsbegincell, a
new cell cannot be called again until the first called cell has been closed. Although the GDSII file is a flat list of cells,
cells can reference other cells, thus creating a nested hierarchy. See gdsaddref 1680 for more details. A GDS "cell"
exists as a "structure group" when imported to FDTD, see gdsimport 1681 for more details.
Syntax Description
gdsbegincell(f, "cellname") Creates a new cell in a GDSII file.
Note: Just to clarify, a GDS cell is different from a Cell Array 1465 in FDTD.
See Also
gdsopen 1677 , gdsclose 1677 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddref 1680 , gdsimport 1681 , cell 1465
7.21.4 gdsendcell
This function finishes a cell in a GDSII file. This function ends the current cell in the GDSII file stream. The
command gdsbegincell has to be called before closing a cell.
Syntax Description
gdsendcell(f) Finishes the previously created cell in a GDSII file.
See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsaddpoly 1679 , gdsimport 1681
7.21.5 gdsaddpoly
This function adds a polygon element to a GDSII file stream. Polygons are also known as boundary elements in
GDS terminology. This command can be called only if a cell has been created.
Syntax Description
gdsaddpoly(f, layer, [vertices]) Adds a polygon element on a layer with vertices.
See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddcircle 1679 , gdsaddref 1680 , gdsimport 1681
7.21.6 gdsaddcircle
This function adds an approximation of a circle to a GDSII file stream. GDSII files do not support circles, so this is
just a convenient function to create a polygon representation of a circle. Polygons can only be added in a GDSII cell,
so this command can be called only if a cell has been created.
Syntax Description
gdsaddcircle(f, layer, x, y, r, n) Adds an approximation of a circle on a layer with x-, y-coordinates,
radius and number of polygon sides.
See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddref 1680 , gdsimport 1681
7.21.7 gdsaddrect
This function adds a rectangle element to a GDSII file stream. This is just a convenient function to create a polygon
for the case of a rectangle. Other element type for rectangle (such as, box) is not supported at this moment.
Polygons can only be added in a GDSII cell, so this command can be called only if a cell has been created.
Syntax Description
gdsaddrect(f, layer, x, y, width, Adds a rectangle element on a layer with x-, y-coordinates, width and
height) height.
See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddref 1680 , gdsimport 1681
7.21.8 gdsaddref
This function adds a reference to another cell to the current cell in the GDSII file stream. This function replicates the
referenced cell (has to be previously opened and finished) to the current cell, to create a nested hierarchy. The layer
numbers of the replicated structures follow the referenced cell. References can only be added in a GDSII cell, so this
command can be called only if a current cell has been created. In addition, the cell to be replicated has to exist
before it is referenced.
Syntax Description
gdsaddref(f, "cellname", dx, dy) Adds a reference to another cell ("cellname") to the current cell, with a
specified move of dx and dy.
See Also
gdsopen 1677 , gdsclose 1677 , gdsbegincell 1678 , gdsendcell 1678 , gdsaddpoly 1679 , gdsaddcircle 1679 , gdsaddrect 1680 ,
gdsimport 1681
7.21.9 gdsimport
This command imports a cell from a .gds file into the layout environment. This is equivalent to performing a GDSII
import through the FILE->IMPORT menu. See the Layout editor reference guide on GDSII import 480 for more
information.
Syntax Description
n = gdsimport("filename", Imports the specified layer from the specified cell in the specified file into
"cellname", layer); the current simulation environment. The objects created will have their
material set to an object defined dielectric. In 3D, the 2D geometric data
will be extruded to default values in the Z dimension. The optional
returned value, n, is the number of objects that were imported from the
gds file.
n = gdsimport("filename", Same as the above command, but the material of the imported object
"cellname", layer, "material"); will be set to the value specified.
n = gdsimport("filename", This form of the command is only allowed in 3D layouts. The behavior is
"cellname", layer, "material", the same as the above command, but the structures will be extruded in
zmin, zmax); the Z dimension to the specified z min and z max values
Example:
This command imports "cell_1", on the first layer in the GDS_export.gds file, with a specified material, z min and
z max assigned. For more examples, please visitthe Layout editor reference guide on GDSII import 480 .
gdsimport("GDS_export.gds", "cell_1", 1, "Ag (Silver) - CRC", 0, 1e-6);
See Also
System level 1426 , setnamed 1568 , fileexists 1433 , gdsopen 1677
7.22 HDF5
The following commands can be used to read Hierarchical Format Data, version 5 (HDF5) files.
Command Description
h5info 1682 Returns information about the structure of an HDF5 file.
h5read 1683 Reads data from an HDF5 file.
h5readattr 1683 Reads attributes from an HDF5 file.
See Also
Reading HDF5 files 792
7.22.1 h5info
Returns information about the structure of an HDF5 file.
Syntax Description
info = h5info("filename"); Returns a struct "info" that contains information about the structure of
the HDF5 file named "filename."
The struct containing the information about the HDF5 file has the following fields:
See Also
h5read 1683 , h5readattr 1683 , Reading HDF5 files 792
7.22.2 h5read
Reads data from an HDF5 file. The command supports a large number of dataset types such as integer, float,
double, string, compound, etc.
Syntax Description
data = h5read("filename", Reads data in the dataset named "dataset_name" within the
"dataset_name"); HDF5 file named "filename."
See Also
h5info 1682 , h5readattr 1683 , Reading HDF5 files 792
7.22.3 h5readattr
Reads attributes from an HDF5 file.
Syntax Description
attr = h5readattr("filename", "attr_path", Reads the attribute named "attr_name" at the location "attr_path"
"attr_name"); within the HDF5 file named "filename."
See Also
h5info 1682 , h5read 1683 , Reading HDF5 files 792
Command Description
message 1684 Creates a message window that displays some text.
newwizard 1684 Used to create a new user defined wizard.
newwizardpage 1685 This creates a page for the wizard.
wizardwidget 1685 Adds a new widget to the current wizard window.
runwizard 1686 Runs the wizard and returns a value indicating which button was pressed.
wizardgetdata 1686 Returns data entered into a specific widget.
killwizard 1686 This closes the wizard window.
wizardoption 1687 Sets some options for wizard widgets and labels.
fileopendialog 1687 Calls the standard windows file open dialog.
filesavedialog 1687 Calls the standard windows file save dialog.
7.23.1 message
Creates a message window that displays some text. The user must hit Enter, or click the OK button to continue.
Syntax Description
message("text"); Creates a window that displays text.
This function does not return any data.
See Also
User defined GUI 1684 , newwizard 1684
7.23.2 newwizard
Used to create a new user defined wizard. Opens a new wizard window.
Syntax Description
newwizard( w, h, "title"); w and h (width and height) are specified in pixels. The minimum
values for w and h are 200.
title is the wizard window title.
See Also
7.23.3 newwizardpage
This creates a page for the wizard and should be done before adding any widgets.
Syntax Description
newwizardpage( "label1"); Creates a button with the label "label1". Typically, this will be "Done"
or "OK".
newwizardpage( "label1", "label2"); Creates two buttons with labels "label1" and "label2". These will
typically be "Next" and "Back" or "Done" and "Back".
See Also
User defined GUI 1684 , newwizardpage 1685
7.23.4 wizardwidget
Adds a new widget to the current wizard window. This command should only be done after creating a new wizard
page with the command newwizard.
Syntax Description
wizardwidget( "type", "name"); type can be
"number" for a numeric input field
"string" for a alphanumeric field
"checkbox" for a checkbox
"menu" for a pulldown menu field
"label" to add a string label (wizardgetdata does not return
information for labels)
name is a string used to give the input field, checkbox, menu item or
label a name.
wizardwidget( "type", "label", defaultValue provides a default value for numeric inputs, checkboxes,
defaultValue); menu items or strings.
wizardwidget( "type", "label", If the "type" of widget is a "menu", then the menu choices must be
"choices", defaultValue); provided. These choices should be separated by the character "|". For
example, to create a pulldown widget with the name "simulation type"
and 3 choices "TE","TM","3D", with the default choice "3D", the
command is
wizardwidget("menu","simulation type","TE|TM|3D",3);
See Also
User defined GUI 1684 , newwizardpage 1685
7.23.5 wizarddata
This command will cause the wizard window to wait until the user selects OK or Cancel. It then returns value data
from the matrix in a N+1 length matrix, where N is the number of widgets (excluding labels) in the current wizard
page.
Syntax Description
out = wizarddata; The values of out are
out(1) = 0, 1 or -1. 0 means the user pressed Cancel, 1 means the
user pressed the first button (typically "OK" or "Next") and -1 means
the user pressed the second button (typically "Back")
out(2:N+1) gives the numeric values that the user entered for each
input field when out(1) is 1. Note that check boxes return 1 if
checked and 0 if unchecked. Menu items return a number between 1
and M where M is the number of choices in the menu. If out(1) is 0
or -1, all the values out(2:N+1) are zero.
See Also
User defined GUI 1684 , newwizard 1684
7.23.6 runwizard
Runs the wizard and returns a value indicating which button was pressed.
Syntax Description
out = runwizard; Returns either 0, +1 or -1.
0 means the user pressed Cancel, 1 means the user pressed the first
button (created by calling newwizardpage) and -1 means the user
pressed the second button (created by calling newwizardpage).
See Also
User defined GUI 1684 , newwizardpage 1685
7.23.7 wizardgetdata
Returns data entered into a specific widget.
Syntax Description
out = wizardgetdata(N); Returns the value that the user entered into the Nth widget. Out will be
a number or a string, depending on the type of widget.
See Also
User defined GUI 1684 , newwizardpage 1685
7.23.8 killwizard
This closes the wizard window. It should only be called after a wizard window has been created with the newwizard
command.
Syntax Description
killwizard; This closes the wizard window.
See Also
User defined GUI 1684 , newwizardpage 1685
7.23.9 wizardoption
Sets some options for wizard widgets and labels.
Syntax Description
wizardoption The options are
("optionname",setting); "fontsize" sets the font size to any value between 8 and 40
"fieldwidth" sets the width of each widget field to any value between
20 and the full width of the wizard window.
"fieldheight" sets the height of each field to any value between 8 and
the full height of the wizard window.
"margin", sets size of the left margin to any value between 0 and full
width of the wizard window.
See Also
User defined GUI 1684 , newwizard 1684
7.23.10 fileopendialog
Calls the standard windows file open dialog.
Syntax Description
out = fileopendialog; Brings up the open file dialog box and returns the path that the user
selects.
out = fileopendialog(".ext"); Brings up the open file dialog box, displaying only files with the
extension .ext. Returns the path of the file that the user selects.
See Also
User defined GUIs 1684 , filesavedialog 1687
7.23.11 filesavedialog
Calls the standard windows file save dialog.
Syntax Description
out = filesavedialog; Brings up the save file dialog box and returns the path that the user
selects.
out = filesavedialog(".ext"); Brings up the save file dialog box, displaying only files with the
extension .ext. Returns the path of the file that the user selects.
See Also
User defined GUIs 1684 , fileopendialog 1687
command
create_array;
The current working directory is always in the Lumerical script path, and is the most common location for your script
files. You can add additional locations to the path with the addpath 1436 script function. The following location
(within the installation directory) is also always in the path, making it a convenient place to put script functions that
may be needed my all users of the computer. It will be necessary to have admin access to save files in this
location.
C:\Program Files\Lumerical\FDTD\scripts (Windows)
/usr/local/lumerical/scripts (Linux)
Note: Saving script files with the same name as built in script functions
It is generally not recommended to create script files that have the same name as the standard script functions.
In such cases, where there is a conflict between a script file and standard script function, the script file will run.
In other words, this allows you to override the behavior of a standard script function. This can be helpful, but it
can also lead to confusing behavior when done unintentionally.
Note:
All script files use a common variable space. As a consequence, variables defined in the scripts are global, and
the script files have access to all variables defined in the simulation project file. This can lead to problems when
two script files use the same variable names. For example, script_1.lsf (defined below) will print the value 10
to the command line since script_2.lsf modified the variable i.
script_1.lsf
i=1;
script_2;
?i;
script_2.lsf
for(i=1:10) {
# do something
}
main.lsf
clear;
a=1;
b=1;
custom_function;
?x;
custom_function.lsf
x=3*a+b;
Formatting tips
Multiple commands are allowed on a single line.
Blank lines, space and tabs will be ignored. Therefore you can format your script files any way you choose.
Each command must be terminated with a semicolon.
On any line, all characters after a # symbol are ignored.
Finally, you can not define a variable or assign values to a variable that has the same name as one of the script
commands. For example, the following lines
sum = matrix(1,2);
angle = acos(pi/2);
are not valid statements since 'sum' and 'angle' are script functions.
8 Applications
Lumerical's photonic design and simulation products can be used to design, analyze and optimize a wide array of
optical and photonic technologies relevant to numerous applications spanning many industries. To learn more about
how Lumerical's products can be used for various applications, please select from one of the following topics:
Nanophotonic 1694
Metamaterials 1984
OLEDs 2682
8.1 Nanophotonics
Motivation
Nanophotonics describes the field of study that examines how light in the wavelength band from 300nm to
approximately 2000nm interacts with structures at a sub-wavelength scale. At these geometries, photons are
confined within the nanoscale structures and the resulting electromagnetic field confined within the structure can be
defined by solving the boundary conditions of Maxwells equations. With innovative structures capable of confining,
guiding or slowing light a wide array of optical functions can be engineered.
Computational methods for accurately solving Maxwells equations for arbitrary 3D geometries such as the Finite
Difference Time Domain method combined with computer aided design and analysis provide a powerful platform
research and development in nanophotonics. Research and development activities span a wide array of applications
from telecommunications and datacom to biomedical, analog computing and imaging.
Plasmonics 1881
solution.
Alternatively, ongoing research and development into nanolithography and next generation lithography including
DUV, EUV, nanoimprint lithography, and surface plasmon resonant interference lithography may offer promise to
fabricate nanoscale features beyond the diffraction limit. Detailed investigation into such techniques often requires
the use of advanced optical simulation techniques. Lithography simulation can assist with improving device yields
and reducing the number of reticle iterations, allowing a fabrication facility to ramp products faster and save
substantially in production costs.
Simulating the lithographic process prior to manufacture can help ensure that severe proximity effects do not
compromise the manufacturing process. Ultimately, it is advantageous to employ semiconductor metrology
techniques to ensure that the manufacturing process performed as expected. Advanced optical critical dimension
metrology offers a means by which high-throughput wafer inspection can be used to identify surface defects and
manufacturing (e.g. bridging) imperfections. Understanding the interplay of optical test conditions like polarization,
incident angle, and wavelength and the specifics of the defect (size, orientation, etc) is a key capability of a rigorous
optical simulation solution.
Features
Compare results with experimental images obtained from a micrscope with an arbitrary numerical aperture.
Calculate the bright field and phase contrast image for an arbitrary phase delay due to the phase plate.
Rigorously calculate the aerial image printed on the wafer for a variety of illumination schemes as well as
resolution enhancement techniques (RETs)
Lumericals conformal mesh technology can achieve sub-mesh cell accuracy for wavelength scale features.
Multi-coefficient materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep and optimization algorithms make it easy to analyze and optimize parameterized
designs
Getting started
Download relevant products:
FDTD Solutions
Application examples
Solvers 101 Description
8.1.1.1 Imaging
Introduction
A microscope's Numerical Aperture (NA) limits the finest details that can be resolved. A very simplified imaging
system is shown in the figure below. A lens system takes light from the specimen and focuses it onto an image
plane. At some point in the system, an aperture limits the angles of light that can travel through the lens system to
create the final image.
The goal of this example is to provide an analysis script that will post-process simulation monitor data such that it
can be compared to experimental images obtained from a microscope with a given numerical aperture. To do this,
near field monitor data is decomposed into a series of plane waves, which propagate at different angles. Any plane
waves with angles outside of the NA are then discarded. Finally, the remaining light is re-focused onto an image
plane. The script microscopy_imaging.lsf does this calculation, and produces an image of the final result. This
example does not include a magnification factor for the lens system, but that can be added and is used in some
other examples. It does include a defocus setting which allows us to consider the imaged light at a specified
distance from the focal plane.
Solvers 101
FDTD
In this topic
Image Gaussian Beam propagating through
free space 1698
Image Fields above Photonic Crystal Cavity
1699
Associated files
microscopy_imaging_beam.fsp
microscopy_imaging.lsf
microscopy_imaging_2D.fsp
microscopy_imaging_2D.lsf
See also
Microscopy 1696
The left figure below shows electric field intensity at the monitor (near field). In this image, the spatial offset of the
source is visible but it is impossible to discern the direction of propagation. The right figure shows the far field
projection of the light. In this case, the direction of propagation is visible. We can see that the source is a highly
focussed beam that contains plane waves at many angles, but centered at 30 degrees.
The left figure below shows the result from the imaging script with Numerical Aperture (NA) = 1. It looks very much
like the near field because all of the light in the near field image is being collected at the image plane. The right figure
shows the image when NA = 0.3. Much of the detail of the original near field has been lost but the beam spot is still
small. If we continue to reduce the NA, for example, to 0.05, then the imaged beam will become much larger than
the original near field beam.
More information about this cavity and its modes can be found in the Photonic crystals 1821 section. This example
uses the mode at 243.4 THz.
The left figure below shows electric field intensity at the monitor (near field). Many sub-wavelength features are
visible.The right figure shows the far field projection of the light. The majority of the power is radiating at 45 degrees.
The left figure below shows the output of the imaging script with NA=1. The profile is quite different from the near
field because much of the near field energy is bound, rather than propagating. The right figure shows the output of
the imaging script with NA=0.5. The smaller aperture causes more loss of detail. However, some key features such
as the zero at the center are still preserved.
particularly if both beams have the same amplitude at the image plane.
A standard phase contrast microscope design is shown below. The S beam is shown in yellow, and the D beam is
shown in blue.
FDTD Solutions uses the finite difference time domain technique to rigorously solve for the object fields at the
specimen plane, correctly accounting for all the phase delay and diffractive effects even for wavelength scale
structures. All diffraction, refraction, interference, absorption and polarization effects are calculated in the near field of
the specimen without approximation. By post-processing the FDTD simulation data, the equivalent bright field
microscope image and the phase contrast image can be reconstructed at the image plane. In the case of the phase
contrast microscope, the image can be calculated for an arbitrary phase delay due to the phase plate without having
to re-simulate the fields at the specimen.
Solvers 101
FDTD
In this topic
Simulation 1701
Analysis 1702
Results 1703
Associated files
phase_contrast1.fsp
phase_contrast_batch_run.lsf
phase_constrast_analysis.lsf
See also
Microscopy 1696
The example on the following pages will show how to use FDTD Solutions to calculate the image of a complex, low
index, structure with a phase contrast microscope. We will compare the results to the image obtained by bright field
microscope of the same specimen.
In this example, FDTD only simulates the blue region (from Specimen to Image). The simulation and analysis will
proceed with the assumptions listed below. Most of the above assumptions can be modified easily.
1. We will model the specimen illuminated by plane waves at a polar angle of 30 degrees. This angle depends on
the dimensions and properties of the condenser annulus and condenser lens and is determined using other ray
tracing programs.
2. We will assume that the specimen is periodically replicated, but we will only image one period in at the image
plane.
3. We assume that the plane waves at different azimuthal angles are incoherent. Ideally, we would simulate a large
number of azimuthal angles, but in this example we will consider only 4 azimuthal angles.
4. We assume that the plane waves are unpolarized.
5. We assume that the collection optics has a numerical aperture of 0.8.
6. We assume that the magnification factor is 4.
8.1.1.2.1 Simulation
For the FDTD simulations, we consider a complex shape as shown in the screenshot below. The specimen is a
rectangle of glass of index n=1.5 and dimension 4mmx4mmx0.25mm. The specimen is etched with half toroid hole,
inside of which is an ellipsoid of glass of index n=1.4 and axes 1mm, 1mm and 0.25mm in the x, y and z directions
respectively.
The light source is a plane wave of polar angle 30 degrees and wavelength 500 nm.
The fsp file phase_contrast1.fsp contains the template of the structure and source. The script file
phase_contrast_batch_run.lsf will run simulations for 4 azimuthal angles. For each angle, it will calculate 2
orthogonal polarization states for a total of 8 simulations. It will then repeat the simulations without the structure in
order to calculate the precise phases of the surround (S) beam. Each simulation will be saved as an fsp file with a
different name for later analysis.
The simulations with the specimen will re-use the mesh from the first simulation, thereby saving computation time.
8.1.1.2.2 Analysis
After running the script file phase_contrast_batch_run.lsf, the script file
phase_constrast_analysis.lsf can be used to calculate the fields at the image plane. This script will do the
following analysis:
1. The near field image is decomposed into grating order (gratingpolar 1668 command). This is similar to the near
to far field projection, but in a periodic situation, which calculates the angular distribution of the fields. The end
result is is Er(ux ,uy ), Eq(ux ,uy ) and Ef(ux ,uy ) where r, q, f refer to a spherical coordinate system and ux and uy
are the direction cosines that describe the angle of the light. The in-plane wave vectors for each plane wave are
given by k x = k * ux and k y = k * uy , where k = 2*pi/l. Now that we have E(kx,ky) we can do Fourier optics!
2. We assumed periodic boundaries for this example (or Bloch boundaries). This is not strictly necessary (please
see the Imaging 1697 section for an example with a finite sized beam). However, since we used a plane wave
source with Bloch boundaries, we know that light can only diffract at specific angles given by the Bragg
condition. We use the internal function gratingpolar to calculate the strength of each order in spherical
coordinates.
3. The magnification factor is applied. A lens system that provides magnification is only modifying the angle of the
light. So it is as simple as multiplying the direction cosines, ux and uy by a desired factor. Normally, this would
lead to a lot of complications because of the vectorial nature of the E field. However, the beauty of working in
spherical coordinates (Er, Eq, Ef) is that the vectorial components do not changes when ux and uy are modified
because they are a local coordinate system that is tied to the value of ux and uy .
4. We can also apply a numerical aperture which clips any light that has too steep an angle, (ie would not be
collected by the lens system). This means that all beams with ux 2 + uy 2 > NA2 are clipped.
5. We return to Cartesian coordinates because this is what we want at the image plane. This is a straightforward
coordinate change.
6. We calculate the inverse of the original far field projection. This is easier with plane waves than the original
calculation because we only need to sum all the plane waves multiplied by the correct phase factor:
ik x x + ik y y + ik z z
E _ image = E (k x , k x )e
,
The focal plane is where z = 0, so we simply have a Fourier transform to calculate. This is achieved with the
chirped z-transform (czt), which is just a more convenient form of fft.
7. The bright field images E2_image and E2_ref_image are calculated by incoherently summing the contribution
from each azimuthal angle and polarization.
8. The phase contrast image E2_pc_image can be calculated by coherently summing the scattered and reference
beams, with some desired phase offset. The script calculates the image for 5 different phase ofsets. The
contribution from each azimuthal angle and polarization are then added incoherently.
8.1.1.2.3 Results
The script phase_constrast_analysis.lsf will generate the following figures.
The Near field (object field) at one polar angle, azimuthal angle and polarization.
|E|2 angle(Ex)
Image plane of the phase contrast microscope for various phase delays of the S beam. We see that a significantly
better image resolution can be achieved with the phase contrast microscope for the appropriate phase delay of the S
beam.
|E|2 |E|2
|E|2 |E|2
|E|2
For comparison purposes, the script also calculates an image of the specimen as produced by a bright field
microscope. It is clear that the bright field image does not resolve the structure as well as the phase contrast
microscope.
|E|2
Introduction
In this example, we study a spherical Fresnel lens. The lens has a radius of curvature of 100cm and a diameter of
4.8cm. Due to the large size of this structure, we must use a 2D approximation of the structure. The focal point of
the lens can be studied with FDTD Solutions far field projection functions.
Solvers 101
FDTD
In this topic
Introduction 1705
Lens design 1705
Results 1706
Associated files
fresnel1.fsp
fresnel1.lsf
See also
Microscopy 1696
This can be accomplished in several ways. One method is to create a surface object and define the lens by the
following formula
x 2
y = mod R 1 - 1 - 2 ,1micron
R
We can choose the units of our surface object equation to be in microns. Therefore the correct formula to use in the
custom "equation" field is
mod(1e5*(1-sqrt(1-(u*1e-5)^2)),1)
This object is difficult to visualize in the layout editor because it is on 1 micron in height, and 5 cm wide. However,
Results
The structure is defined in the fsp file fresnel1.fsp. After running the file, the script file fresnel1.lsf can be
run and will produce the following results.
The index monitor image showing the shape of the Fresnel lens is shown below. Please note that for better viewing
we have resized the figure window and zoomed in.
The electric field intensity. Note the sharp lines due to discontinuities in the lens
The phase of the electric field, in degrees. When we look near a region with a discontinuity in the lens we see an
additional feature in the phase, as shown below.
The script then does a near to far field projection to calculate the focal length. We do this projection in air, which will
take into account the reflection and refraction that occurs at a flat glass-air interface at the back of the lens. We
predict that the the focal length should be approximately R/(n2-n1) = 200 mm.
The projection does a low resolution calculation over a range of values of x and y to create the following figure.
Please note that the calculation takes several minutes because there are such a large amount of near field data. We
see that the focal plane is indeed at approximately -200mm, as predicted. We confirm this by plotting the E field
intensity (|E|2) along the x = 0 line. This shows the following result and the peak intensity is at -200mm.
We then perform a high resolution projection at y=-200mm in order to plot the field at the focal plane. We see a
highly focussed spot and we can zoom into the center to see that the spotsize is approximately 20 microns.
The results presented above are for TM polarization. The polarization dependence could be studied by repeating the
simulation with TE polarization.
While this 2D example will not reproduce exactly the results expected for a 3D Fresnel lens, it can help identify the
origins of different features in a real lens, and suggest possible design improvements for a 3D lens.
8.1.1.4 Lithography
The demand for smaller, faster and lower power semiconductor devices continues to drive improvements in optical
lithography. Currently very high numerical aperture (NA) exposure tools combined with resolution enhancement
techniques (RET) are used to produce state of the art devices with critical dimensions (CD) less than 100 nm. For
example, at the 45 nm node, some of the features to be imaged are less than a quarter of the wavelength of the 193
nm light source used, requiring the use of alternating phase shift masks (APSM). The associated pitches are sub-
wavelength (~130 nm), which leads to severe proximity effects requiring optical proximity correction (OPC). These
effects need to be understood using lithography simulation so that they may be taken into account during reticle
design in order to achieve a predictable and reliable process. Lithography simulation can assist with improving device
yields and reducing the number of reticle iterations, allowing a fabrication house to ramp products faster and save
As optical lithography techniques have continued to improve, so too have lithography simulation techniques. FDTD
Solutions uses the finite difference time domain technique to rigorously solve for the object fields at the mask. All
diffraction, refraction, interference, absorption and polarization effects are calculated in the near field of the mask
without approximation. FDTD Solutions also incorporates an automatic graded meshing, which greatly reduces
memory requirements and time per simulation. By post-processing the FDTD simulation data, the aerial image at
the wafer may be calculated.
Solvers 101
FDTD
See also
Microscopy 1696
Imaging 1697
The numerical aperture of the illumination (NAi) optics can be used to adjust the degree of coherence of the
illuminating beam. The degree of partial coherence s is given by s = NAi/(M*NAo). Partial coherence values ranging
from 0.3 to 0.7 are commonly used to optimize a particular lithographic process.
One can see that these figures of merit can lead to different strategies for printing progressively smaller and smaller
features. However, it is clear that printing subwavelength features on a wafer requires wavelength (and possibly sub-
wavelength) scale features on the photomask. And as mask features get smaller, approximate techniques for
simulating the lithographic process breakdown. Thus, accurate prediction of the aerial image on the wafer requires
rigorous simulation of the interaction of the source light with the photomask. Such rigorous simulation is possible
using FDTD Solutions.
To use FDTD Solutions to rigorously calculate the aerial image printed on the wafer, we assume Kohler illumination
for the source and illumination optics. With Kohler illumination, points on an extended source are assumed to
radiate incoherently. The optics are arranged so that any point on the extended source arrives at the photomask as
a plane wave, each with slightly different angle of incidence. Thus, for a circular illumination pupil, one simulation
must be performed for each orthogonal polarization state, and the results are added in intensity. Other more
complex illumination schemes (e.g. annular) may also be treated rigorously by performing a larger set of
simulations.
Introduction
This page shows how to use FDTD to accurately predict the aerial images produced by masks used in DUV
lithography.
Solvers 101
FDTD
Associated files
litho_cross.fsp
plot_incoherent.lsf
See also
Microscopy 1696
Imaging 1697
A binary mask consists of a transparent plate covered with a patterned film of opaque material. The transmission
characteristic is "binary" in the sense that the field transmitted is approximately "1" in the transparent region and "0"
in the opaque region. This is an approximate description known as the scalar, thin-mask model. FDTD Solutions
allows for the exact calculation of the transmitted field, and we can determine to what extent the scalar, thin-mask
approximation is valid by examining the transmitted field intensity across the mask. DUV lithography masks are
typically constructed from fused quartz for the transparent plate (or "blank") and a thin chrome layer for the opaque
material.
A plane wave source at a wavelength of =193 nm is incident on the mask at normal incidence. The chrome mask
layer is 100 nm thick, on top of a fused quartz layer with n = 1.55. The material properties for chrome are defined in
the material database (n=0.85; k=1.63 at =193 nm). The mask is periodic in x and y, with period 10. The FDTD
simulation region has periodic boundary conditions in x and y, and absorbing boundaries/PML in z. A graded mesh
is used with conformal variant 1 to very accurately resolve the extent of the chrome mask. A profile monitor is used
to record the field transmitted through the mask as this is the object field to be imaged onto the wafer. The sweep
module contains sweep settings so that both polarizations can be performed concurrently.
Results
Load the script file plot_incoherent.lsf and change the variable 'sn' to the appropriate sweep name. Set the
magnification M=1 and run the script file to run the sweep and plot the results.
x-polarization
Calculate the aerial image intensity for M=1, =0, NA= 0.85
Using the complementary simulation for the plane wave polarized in the y direction, the aerial image is calculated
just above the wafer in air using a simple Fourier optics model of the lithography projection system. The script file
performs the necessary analysis to calculate the aerial image for illumination with partial coherence =0 (coherent)
and imaging optics with numerical aperture NAo= 0.85 and demagnification M=1. The resulting aerial image is
plotted in the figure below.
One can see that even when imaging photomasks with no reduction (at M=1) when the CD is at 2, there is
significant corner rounding and some line shortening in the aerial image.
M=1
Note that images for M=1 and M=4 are plotted on the same scale. While we can see the 4x reduction in the aerial
image (i.e. four bright spots in each field in both the x and y directions), it does not faithfully reproduce the mask
object; due to diffraction, the line shortening and corner rounding are extreme and the spots in the aerial image are
round rather than cross-shaped. In addition, interference and proximity effects lead to non-zero intensity between the
bright intensity spots. Clearly the cross-shape with CD = 2 (on mask) is beyond the resolution limit of a binary
mask in this type of 4X reduction project lithography system. This is because with 4X reduction, the CD feature size
at the wafer is only /2.
M=4
In the next section we will consider a different type of mask that can produce these small feature sizes.
Introduction
This page shows how to use FDTD to image sub-wavelength features that may be created using an APSM mask.
Solvers 101
FDTD
Associated files
litho_4sq.fsp
plot_incoherent.lsf
See also
Microscopy 1696
Imaging 1697
Another type of mask, the alternating phase shift mask (APSM), controls the phase of the incident light by changing
the thickness of the transparent regions of the mask, as well as modulating the intensity using an etched chrome
layer. Here we consider a simple APSM design that exploits the optical phase to improve the resolution of the
lithographic process.
Layout Editor
We now consider the simulation of a chrome APSM that contains a checkerboard array of squares windows, each
square having an edge CD = 2 and also being separated by the same CD = 2. For alternating squares, a portion of
the underlying quartz substrate has been etched away. The depth of the etch is chosen so that there is a phase
difference between the optical wave propagating through the alternately etched windows. Load the simulation project
file litho_4sq.fsp to review the setup in the Layout Editor as shown above. The phase-shift wells marked with
the symbols are those which introduce the phase shift to the transmitted light.
x-polarization
M=5
Solvers 101
FDTD
Associated files
lithography_nano_spr.fsp
lithography_nano_spr.lsf
See also
Surface Plasmons 1881
To reproduce the following results, open and run the simulation file. Use the script file to create the following plots.
A plot of the near field intensity in cross-section through the silver mask layer (y = 0 to 60 nm) and the photoresist
layer (y = -50 to 0 nm) is shown on a logarithmic scale. Surface plasmon modes are clearly seen at the silver mask/
photoresist interface. The periodic structure allows the normal incidence beam to couple to counter-propagating
surface plasmon waves, which gives rise to subwavelength variation in the nearfield intensity inside the photoresist
layer.
The nearfield optical intensity in the middle of the photoresist layer, 30 nm below the contact mask, is plotted as a
function of position. The high contrast ratio shown allows for patterns with minimum size about 80 nm to be
transferred to the photoresist. This sub-wavelength result achieved with surface plasmons is well below the diffraction
limit for a 436 nm source and is therefore amenable to nanolithography applications.
Objective
In this example, we will project the fields from the a periodic structure to a distance of 100 microns and then use the
resulting fields to create a new FDTD source to study the electric field intensity in a layer of photoresist on silicon.
This involves 3 steps:
Solvers 101
FDTD
In this topic
Step 1: FDTD Simulation 1 1715
Step 2: Propagate the fields and create new
source 1716
Step 3: FDTD Simulation 2 1716
Results 1717
Associated files
propagate_periodic1.fsp
propagate_periodic2.fsp
propagate_periodic.lsf
usr_create_fld_EandH.lsf
See also
Solvers - Far field projections from periodic
structures 152
it. The simulation volume represents one unit cell of a periodic structure which has a period of 1.5 microns in both
the x and y directions. The source covers a wavelength range of 0.4 to 0.6 microns, and is polarized with the E field
along the x-axis. We take advantage of the symmetry of the structure to reduce the simulation volume to 1/4 of the
unit cell. This is the same structure as shown in the previous section, but now we simulate only a small z-span of
the structure because we can propagate the light using the plane wave decomposition method. In addition, we have
a mesh override region to force a 10nm mesh around the hole for more accurate results. Please note that this
simulation file can record the fields at many different wavelengths from 0.4 to 0.6 microns. In this case, we have
recorded information at 3 wavelengths. Please run this fsp file.
Please note that the projection can only be done for one wavelength at a time. The desired wavelength is set in the
variable lambda_target and the closest recorded wavelength point will be used. The field intensity pattern can look
very different at different wavelengths. After projecting the fields, a new fld file will be created that can be used to
import the source into the second FDTD simulation. The default name for this file is
source_after_propagation.fld.Please note that the script file usr_create_fld_EandH.lsf must be
saved into your current working directory for this to work.
The fields 100nm below the surface of the photoresist are shown below:
Edit the source in this simulation region, and press the "Import Source" button. Browse to the fld file that was saved
in the previous step and import the source. You can verify that the source field matches what was created in the
previous step by pressing the "Plot current field button".
Run this simulation. It contains a monitor called volume_monitor that records the 3D field intensity inside the
photoresist. Please note that this simulation should only be run for one wavelength at a time because the source
profile is very wavelength dependent.
Results
Using the Visualizer, you can easily image different cross sections of the monitor called volume_monitor. For
example, a cross section of |E|2 in the x-z plane at y=0 is shown below.
Similarly, a cross section of |E|2 in the x-y plane at z=0.5 microns depth is shown below.
Introduction
In this example, we study a binary phase grating mask suitable for MOEMS (Micro-Opto-Electro-Mechanical
Systems) processing, or any lithographic process where an analog intensity profile is required on the wafer. This
example is based on the paper by Sung et al., "Refractive micro-optics fabrication with a 1-D binary phase grating
mask applicable to MOEMS processing".
The concept for this mask is to use a periodic pattern where the period has been chosen to be sufficiently small that
only the 0th order is captured in the imaging system. Instead of controlling the intensity at the object plane, we
simply have to control the transmission to the 0th order. This gives a great deal more flexibility since the 0th order
transmission can be modified between about 0% and 100% by changing the duty cycle of the grating. By modifying
the duty cycle in a continuous manner across the surface of the mask, we can therefore create an analog variation in
the transmission to the 0th order. Since the 0th order is the only order that will be imaged, we can create an analog
intensity pattern at the image plane, on the wafer.
By modifying the duty cycle across the grating, we break the periodicity of the grating. However, if the modification of
the period is sufficiently slow, the grating remains locally periodic. The validity of this approximation can be tested by
performing full 2D and 3D FDTD simulations to compare the image at the wafer.
Solvers 101
FDTD
In this topic
Introduction 1718
Mask design 1719
Verification of the design 1720
Associated files
binary_phase_mask_duty_cycle_sweep.fsp
binary_phase_mask_design.lsf
binary_phase_mask_design_verification_2D.f
sp
construct_2d_verification_mask.lsf
binary_phase_mask_design_verification_3D.f
sp
construct_3d_verification_mask.lsf
See also
Microscopy 1696
Related publications
Sung J, Hockel H, Brown J, Johnson EG,
"Refractive micro-optics fabrication with a 1-D
Mask design
The file binary_phase_mask_duty_cycle_sweep.fsp contains a grating structure design for a 436nm stepper
with 420nm thick PMMA (n=1.52) on sapphire. The structure is parameterized in an analysis group called "structure"
which makes it easy to change the period and duty cycle. For this design, the period is set to be 3 microns which is
below the cutoff period of the stepper, meaning that only the 0th diffracted order will be imaged.
There is an analysis group called "0th" order which calculates the 0th order efficiency and, more importantly, the
normalized transmission to the 0th order. This is important because the total transmission of the grating can change
for different duty cycles so the normalized transmission to the 0th order measures the actual power in the 0th order
for different duty cycles.
There is parameter sweep object called "polarization". It contains a child parameter sweep element called
"duty_cycle". This object will sweep both duty cycle and polarization to calculate the normalized transmission to the
0th order and the 0th order efficiency as a function of both duty cycle and polarization. The polarization is either 0
degrees or 90 degrees which allows us to calculate all results for unpolarized light.
After running the sweep, the transmission to the 0th order, T0, can be visualized by right clicking on the parameter
sweep object. To see both polarizations on the same curve, as well as the unpolarized results, the following lines of
script can be pasted into the script prompt.
T0 = getsweepresult("polarization","T0");
T0_0 = pinch(T0.T0,2,1);
T0_90 = pinch(T0.T0,2,2);
T0_unpolarized = (T0_0+T0_90)/2;
plot(T0.duty_cycle,T0_0,T0_90,T0_unpolarized,"duty cycle","T0");
legend("polarization 0","polarization 90","unpolarized");
which will create the following figure of the normalized transmission to the 0th order (rather than the 0th order
efficiency). This figure is very similar to the figure 4 of Sung et al. but there are some differences because it is based
on a fully vectorial calculation. In particular, it shows some polarization dependent effects. Overall, these effects are
quite small but could be expected to be much more significant if a metal mask were used.
To compare with the publication, we want to design a mask with a target intensity pattern that is similar to the
pattern shown in figure 5. For this, we set the target intensity to be I(x) = x^2/L^2, where L=45 microns. To create
the mask, we sample x every period (3 microns). To achieve the target intensity, we can use a duty cycle that is
either larger or smaller than 0.5, and here we choose to use a duty cycle smaller than 0.5. For each value of the
target intensity, we need to look up the duty cycle that yields that target intensity. The script file
binary_phase_mask_design.lsf will do this. It first loads the fsp file
The parameter sweep object called "polarization" will sweep both polarizations and calculate the unpolarized image
intensity. After running it, we can visualize the result in the visualizer. This is using a magnification factor of 4, an NA
of 0.4, and a defocus (specified in global coordinates) of 0.5 microns. It is important to note that the NA is applied
after magnification because it comes from the pupil aperture inside the stepper. To compare with the target intensity,
we use the following lines of script
E2_image = getsweepresult("polarization","image_intensity_unpolarized");
matlabload("target_profile");
plotxy(E2_image.x*1e6,E2_image.E2/max(E2_image.E2),x_mask*1e6/4,Itarget,"x (microns)","Im
legend("simulated","target");
which creates the following plot
and we can see that our image profile is very close to the target intensity profile.
Finally, we can create a design similar to the 3D design shown in the paper. If we open the fsp file called
binary_phase_mask_design_verification_3D.fsp and run the script file
construct_3d_verification_mask.lsf it will construct the figure shown below. This simulation region is
91x91x0.6 microns 3 so we use symmetric and antisymmetric boundaries to reduce the simulation time and
memory. In addition, we use a mesh override to increase the size of dx and dy which is acceptable since the light is
propagating primarily along the z axis. The total memory required for the simulation is then 6GB to mesh and about
3GB to run. It runs in about 15 minutes on a good workstation. Only one simulation is required to fully characterize
the polarization dependence because of the cylindrical symmetry of the structure.
After running the simulation, we can run the analysis script (which can take a few seconds due to the 3D near to far
field calculations required) and visualize the image intensity with the visualizer. The result for a magnification of 4, an
NA of 0.4, and a defocus (specified in global coordinates) of 0.5 microns can be immediately visualized from the
"analysis" analysis group.
To construct the unpolarized result, consider polarization effects and compare with the target intensity profile we can
use the following lines of script:
E2_image = getresult("analysis","image_intensity");
x = E2_image.x;
y = E2_image.y;
E2_0 = pinch(E2_image.E2);
E2_0 = E2_0/max(E2_0);
E2_90 = transpose(E2_0);
E2_unpolarized = (E2_0+E2_90)/2;
image(x*1e6,y*1e6,E2_unpolarized,"x (microns)","y (microns)","image intensity");
p0 = find(y,0);
nx = length(x);
plot(x*1e6,E2_unpolarized(1:nx,p0),E2_0(1:nx,p0),E2_90(1:nx,p0),"x (microns)","image inte
legend("unpolarized","0 degrees","90 degrees");
matlabload("target_pprofile");
plotxy(x*1e6,E2_unpolarized(1:nx,p0),x_mask*1e6/4,Itarget,"x (microns)","image intensity
legend("unpolarized","target");
which will create the following 3 figures
We can actually get closer to target by reducing the NA of the stepper. This reduces the amount of light collected at
angles other than 0 degrees which occurs because the structure is not truly periodic. We can repeat the analysis
with a different NA and defocus without having to repeat the FDTD simulation. For example, with an NA of 0.3
instead of 0.4 we find much smoother results that are closer to the target intensity profile.
The simulation methodology can be very different depending on whether one is interested in simulating light
scattering from standalone particles, particles on a substrate, or light scattering from a surface with nanoscale
structures:
Standalone particles
For standalone objects such as particles suspended in a fluid, the typically quantity of interest is the absorption/
scattering cross sections. We may also want to look at the near field enhancement around the particles, as well as
the far field angular distribution.
Rough surfaces
A surface with nanoscale structure can be characterized a bidirectional scattering distribution function (BSDF). This
function relates the intensity of an incoming ray to an outgoing ray for all angles of incidence and reflection/
transmission.
Features
Construct and parametrized complex 3D geometry using structure groups
Use Lumericals multi-coefficient materials to accurately model highly dispersive materials such as metals.
Obtain accurate broadband results at multiple wavelengths in a single simulation
Use a large variety of illumination conditions, such as unpolarized light, circularly polarized light or a dark
field beam source
Use a total field/scattered field source to calculate the absorption and scattering cross section of a particle.
Calculate the bidirectional scattering distribution function for a rough surface.
Use a fully vectorial far field calculator to determine the amount of light scattered into various regions of the
far field.
Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy important for
resolving the shape of wavelength and sub-wavelength scale geometry
Built-in parameter sweep and optimization algorithms make it easy to analyze and optimize parameterized
designs
Getting started
Relevant videos (login required):
TFSF source
Application examples
Solvers 101 Description
FDTD Determination of feature size correlated to a strong modulated signal: DVD surface 1735
FDTD Study scattering from isolated small particles on a surface: Defect scattering and
detection 1737
FDTD Examine a surface with nanoscale structure: BSDF 1742
Solvers 101
FDTD
Associated files
nanowire.fsp
plotcs.lsf
nanowire_theory.csv
In this topic
Simulation set up 1730
Results 1731
Modeling instructions 1725
See also
Online Help -> Surface Plasmons 1881
calculated by summing the power flowing outward through the four power monitors located in the scattered field
region of the Simulation Area.
The extinction cross-section is the sum of the absorption and scattering cross-sections
sext ( w ) = sabs( w ) + sscat( w ) .
In this topic
Set up model 1725
Run simulation, plot cross sections 1727
Set up model
Open a blank simulation file. For instructions see the FDTD Solutions GUI page 314 in the Introduction to the
Getting Started Examples.
Press the arrow on the STRUCTURES button and select a CIRCLE from the pull-down menu. Set the
properties of the circle according to the following table.
tab property value
name nanowire
Geometry x (nm) 0
y (nm) 0
z (nm) 0
radius (nm) 25
Material material Ag (Silver) - Palik (0-2um)
Press the SIMULATION button to add a simulation region. Note that if your button does not look like
the button to the left, you will need to press on the arrow to get the simulation region. Set the properties according
to the following table.
tab property value
General simulation time (fs) 200
dimension 2D
Geometry x (nm) 0
y (nm) 0
z (nm) 0
x span (nm) 800
y span (nm) 800
Mesh Settings mesh accuracy 4
mesh refinement conformal variant 1
Note that since we are using a 2D simulation region, properties such as "z span" are irrelevant. The setting for
these properties will be omitted for the remainder of the modeling instructions, and the default values (at z = 0) can
be used.
Press the arrow on the SIMULATION button and select the MESH region from the pull-down
menu. Set the properties according to the following table.
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
Press the arrow on the SOURCES button and select the Total-field scatter-field (TFSF) source from the
pull-down menu. Set the properties according to the following table:
tab property value
General polarization angle 0
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
Press the arrow on the ANALYSIS button and select OPTICAL POWER from the pull-down menu. This
will open the object library window.
Insert a CROSS SECTION analysis group and set the properties of this group according to the following table.
tab property value
name scat
Setup Variables x (nm) 0
y (nm) 0
x span (nm) 110
Make a copy of "scat" with the COPY button and set the properties of this group according to the following
table.
tab property value
name total
Setup Variables x (nm) 0
y (nm) 0
x span (nm) 90
y span (nm) 90
Press the arrow on the MONITORS button and select GLOBAL PROPERTIES from the pull-down
menu. Set the FREQUENCY POINTS to 100.
Press the arrow on the MONITORS button and select the FIELD TIME monitor from the pull-down menu. Set the
monitor properties according to the following table.
tab property value
name time
Geometry x (nm) 28
y (nm) 26
Press on the CHECK button to open the MATERIAL EXPLORER. To obtain a plot of the refractive index
as a function of wavelength, press the FIT AND PLOT button.
Press the arrow next to the CHECK button and select the "Check simulation and memory requirements" button
Next, check if the mesh is fine enough using the VIEW SIMULATION MESH button and ZOOM button in the
toolbars. For more information about how to use these tools, see the Layout editor section of the reference guide
197 .
Press the Resources button and check the number of processes (number of cores) for the local
machine. Then, press the "Run Tests" button to make sure the simulation engine is configured correctly. The
first time you run this test, it may fail and ask you to register your username and password for your operating
system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests.
You can then select which components of the E field data you want to plot in the Visualizer. The screenshot
below shows how to plot the real part of the x component of the electric field.
To plot the cross section results, right-click on the "scat" and "total" analysis groups, and select "Run analysis".
This will run the analysis scripts in the analysis groups to calculate the cross section results.
Right-click again on the "scat analysis group", and you will see an option to Visualize->sigma, which will plot the
scattering cross section as a function of frequency in the Visualizer. To plot the result as a function of wavelength,
simply change the "Parameter" option (near the bottom of the Visualizer) from "f" to "wavelength". You can also
change the "Units" to nanometers on the right side of the Parameters section.
Without closing the Visualizer, go back to the object tree and right-click on the "total' analysis group, and select
add to visualize1->sigma, which will plot the 2 cross section results in the same Visualizer.
Note that the absorption cross section is actually the negative of the result returned by "total", since we want the
power flowing into the box, rather than out of the box. You can add a negative sign to the result in the Visualizer
under "Scalar operation".
Then use the OPEN SCRIPT button to browse to and open the "plotcs.lsf" script file.
Run the script file using the RUN SCRIPT button which is found on the Script File Editor window This will
create the two plots of the cross sections seen in the discussion and results section.
Switch the simulation back into layout mode the SWITCH button .
Edit the mesh. Set dx = dy = 0.5nm.
Press on the arrow on the MONITORS button and select a FREQUENCY DOMAIN FIELD PROFILE monitor from
the pull down menu. Set the properties according to the following table.
tab property value
name profile
General override global monitor settings check
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
Simulation set up
Once the simulation has been set up, it will look as in the screen shot below. The nanowire is the circle in the center
of the simulation region. There are two yellow boxes of monitors which surround the nanowire. In between the two
monitor boxes is a third box drawn with of grey lines. This box shows the Total-field scattered-field (TFSF) source.
TFSF sources are type of plane wave source, mostly used to particle scattering. The pink arrow shows the direction
of propagation (k vector), and the blue arrow shows the polarization (E field vector). In the region inside the grey box,
the total fields (incident plane wave field + any fields scattered by particle) are calculated. At the boundary of the
source, the incident plane wave fields are substracted, leaving only fields scattered by the particle inside the source.
You can find more information about TFSF sources in the Sources section of the online user guide.
Because we use the TFSF source, the power scattered by the nanowire can be computed by measuring the power
flow through a box of monitors located outside of the source (ie. in the scattered field region). The power absorbed by
the nanowire is equal to the power flowing into the box of monitors in the total field region.
In the graphical user interface (CAD), orange lines show the FDTD mesh if desired. There are two different regions: A
graded mesh region (automatic mesh) and a mesh override region. When using automatic meshing, the mesh size
is based on the refractive index. A higher index material will have a smaller step size, inversely proportional to the
index. When a material has a complex index, both the real and imaginary parts are considered by the automatic
mesh algorithm. However, accurate modeling of small geometric features, particularly when there is a high index
contrast between materials combined with curved or angled interfaces, sometimes requires a finer mesh than is
created by the automatic mesh algorithm. In these cases, a mesh override region can be used, as in this example,
to manually define a finer mesh where it is needed.
The above screen shot does not show the full simulation region. Although we are not interested in obtaining any data
outside of the largest yellow monitor box shown above, the simulation span is set to be much larger. We set the
simulation to be larger because the boundaries are PML. PML absorbs incident radiation, but can also absorb
energy from evanescent fields. Hence, the PML should be placed far enough away from the structure so that it does
not interact with evanescent fields. In this case, the PML is about a full wavelength from the structure.
The Ag (Silver) material used for the nanowire is defined with experimental data, rather than an analytic model. A
material model is automatically calculated based on the experimental refractive index data over the source
bandwidth. We can check the material fit (see image below) in the Material Explorer before running the simulation.
The material fit, named FDTD model in the legend, can be adjusted by changing the Max coefficients and Tolerance
parameters in the Material Explorer.
We can see from the above plot that the material data has an index that is on the same order of magnitude as the
background index of 1. Also, we are able to simulate this problem at a small mesh size of 1nm or less. For this
reason, we can change the mesh refinement option to "conformal variant 1" to take full advantage of the conformal
meshing feature, even for a metal like silver. Note that "conformal variant 1" is a good option here because there is
low index contrast, however "conformal variant 1" is not always a good option for metals (the default conformal mesh
will revert to staircasing for interfaces involving metals and PECs). Please see Mesh refinement and Conformal mesh
443 for more detail.
Note that in the screenshot of the simulation above, there is a yellow cross. This cross gives the location of a time
domain monitor. Time domain monitors are used in FDTD simulations to check that the fields have decayed by the
end of the simulation. If the fields have not properly decayed, the simulation results can be incorrect. By default,
FDTD Solutions has a simulation time of 1000fs and shuts off the simulations early if the field strength has decayed
to a user defined fraction of the peak field strength. Below, you can see a plot of the x component of the E field.
Notice that the simulation shut off early at 32fs.
Results
Scattering, absorption and extinction cross-sections can be computed analytically for the nanowire. We have
precalculated the theory for this specific material and saved it in the associated file, nanowire_theory.csv, from
the first page of this getting started example.
Below, the leftmost figure shows the cross-sections obtained with from the FDTD simulation in comparison with the
analytic results. Clearly there is very good agreement. The second figure shows the same results from FDTD, but
analytic results for a radius of 24 and 26 nm. Since the simulation used a 1nm mesh, it is reasonable to expect the
FDTD results to be accurate to within these results. We can see from the figure that this is true.
The above image shows that the maximum extinction occurs near 345nm. We can plot |Ey|^2 as shown in the image
below calculated with a 0.5nm mesh.
Solvers 101
FDTD
In this topic
Simulation setup 1733
Analysis 1733
Results 1734
Associated files
PSL_Cu_scattering.fsp
PSL_Cu_scattering.lsf
PSL_Cu_scattering_helper.lsf
See also
Defect scattering and detection 1737
Simulation setup
The simulation technique is similar to that described in the Defect scattering and detection example. The challenge
in this example is the very thin layer SIO2 of 1.5nm. If we use a mesh override of two cells in resolving the thickness,
the simulation time is much longer, but the results are not significantly different from without SiO2 layer. For fast
result, we will ignore this layer.
Analysis
Differential scattering cross section
Kim et al. state "the differential scattering cross section relates the intensity on a single particle to the power
scattered by it per solid angle" In FDTD Solutions, this is easily calculated with the standard far field projection.
The formulas for alpha and beta allow us to convert the linear polarization component to their equivalent circular
polarization components. In the far field, intensity is proportional to abs(E)^2.
Results
The analysis script will produce the following figures, which can be compared to Figure 7 and 8 from Kim et al. To
reproduce the results from figure 7, open PSL_Cu_scattering.lsf and set the variable fig8 equal to 0. To
reproduce figure 8, set this variable equal to 1.
The agreement is quite good, even though the simulation region is small and uses a coarse mesh. Because the
sphere is metal, we use the mesh refinement option "Conformal Variant 1" to achieve a better approximation of its
shape. The accuracy can further be improved by increasing the X and Y simulation span to 10 um, increasing the
mesh accuracy slider to 3, and by setting the "def" mesh override region to use an effective index of 5, rather than 3.
92, 123 and 155 nm diameter Cu sphere scattering 155nm diameter radius PSL sphere scattering as
at 442 nm wavelength. Figure 7 of Kim et al. a function of wavelength. Figure 8 of Kim et al.
For a comparison, we add the 1.5nm SiO2 layer back to the simulation with 2 cells in z direction using override
mesh, for the 155nm PSL sphere with different illumination wavelengths, the results are shown below:
Please note that since the differential scattering cross sections are in logarithm scale, the difference between with
and without the thin SiO2 layer is small. Therefore, for initial test, it is proper to ignore the very thin layer. However,
for final simulations, the thin layer should be included.
Solvers 101
FDTD
Associated files
dvd.fsp
dvd_width.lsf
See also
Defect Detection 1737
To reproduce the following results, open the simulation file, then run the analysis script.
First, we calculate and plot the near field with and without the metallic bump.
Without the gold post present, the reflected beam looks almost identical to the incident beam. Once the post
moves under the beam, the reflected beam contains a lot of structure. From the near-field profile plotted, we can see
that only the central part of the beam interacts with the gold post strongly.
Next, we look at the far field radiation pattern for the same two simulations.
Without the bump, the majority of the reflected power is would be collected with a NA=0.6 objective. With the metal
post present, there is significant scattered field in the y direction, greatly reducing the amount of power that would be
collected by the objective.
To quantify this, we use the "signal" analysis group, which returns the result "signal" calculated from integrating the
far field results over the cone corresponding to the specified numerical aperture.
thetarad = asin(NA);
# calculate the portion of E field within acceptance angle of the lens NA=0.6
signal=farfield3dintegrate(e2,ux,uy,thetarad*180/pi)/farfield3dintegrate(e2,ux,uy);
Then, we can set up a parameter sweep that varies the dimension of the metallic bump in order to determine when
the minimum signal is returned. We calculate the signal as a function of the post width for a fixed post length (click
on the sweep project and select Visualize -> signal to plot the following result in the Visualizer).
We will test this technique by calculating the far field scattering intensity profile from a PSL sphere on a Si
substrate, as shown in the figure below. Scattering from PSL (PolyStyrene Latex) spheres can be used to calibrate
and test defect detection systems. The simulation results can be compared to those published by S. Stokowski.
Solvers 101
FDTD
In this topic
Simulation technique 1738
Results 1741
Associated files
psl.fsp
psl_analysis.lsf
See also
PSL and Cu sphere scattering 1732
In the above screenshot, the Si substrate is shown in red and the PSL sphere in cyan. The TFSF source is
represented by a box in light-grey, with its injection plane at the top plane of the box. The pink arrow and the blue
arrows represent the light propagation direction and the polarization, respectively. This type of simulation can be
challenging due to the large difference in the refractive indices of the particle and the substrate.
Simulation setup
Physical Structures
A PSL sphere (index 1.6) is located in air above a Si substrate.
Simulation region
We are interested in the far field intensity in this example. The farf field is calculated from the near field recorded by
a power monitor. The required size of the monitor strongly depends on the scattering property of the structures and
should be large enough to collect as much light as possible from the near field. However, this will inevitably result in
a large memory requirement and a longer simulation time. Some test runs might be necessary to find out an
appropriate monitor size and the simulation spans.
In this example, a large simulation span of 7 um is used and, due to the large incidence angle of 70 , the monitor is
positioned very close to the source in order to collect the scattered light propagating almost parallel to the substrate.
Current settings allow the monitor to pick up field components propagating at angles of up to 86.5 with respect to
the surface normal. Since most of scattered near field lies on the right side of the particle, the simulation region is
shifted to the right. Below is the near field of the sphere with a radius 0.11um sphere with P polarization of 70 degree
incidence:
Near field intensity of the sphere w ith a radius 0.11um , P polarization at 70 deg incidence.
In general, conformal technique should be used to reduce the error of material interface. However, for the very
coarse mesh of the smallest sphere with a radius of 0.03um, its performance is degraded since it ha only 5 meshes
in each direction. In addition, for such small sphere, its scattering is relatively uniform and a little stronger backward,
the shifted monitor may not collect all the near field information. To increase the accuracy, one may further increase
the monitor size.
The simulation region uses PML absorbing boundary conditions on all boundaries. Note that for P- and S-
polarizations, since the incidence is angled only in XZ plane, to speed up the simulation, symmetric/anti-symmetric
boundary condition in y min can be used, which is included in the script. For circular polarization at normal
incidence, neither symmetric nor anti-symmetric boundary condition can be applied, since there are two different
polarizations on the symmetric line of the object, please refer symmetric/anti-symmetric boundary condition 466
section for more details.
Source
The source is initially P polarized with a wavelength of 488nm. The angle of incidence is 70 degrees. The source
polarization can be changed to S by editing the script file settings, which sets the polarization to 90 degrees. A
normally incident circularly polarized beam can also be created by editing the script file. First, it sets the source
angle theta to 0. Then, it creates a second source with identical settings, except with a polarization angle of 90
degrees and a phase of 90 degrees. Each source will have a different name.
Monitors
The 2D power monitor located above the source will be used to calculate far field scattering. Only light that passes
through this monitor will be included in the far field projection, so it is important that it is as close as possible to the
sphere. However, we are only interested in scattered field, so it should be above the source. In order to calculate
the far field projection, an analysis group is used, in which the script calculates and output the far field projection
parameters.
Tips:
1: Run a test without particle
To have an initial test, you should run a simulation without the particle. The noise intensity should be less than 1e-
12.
2: Simulation Mesh
Even though the incident angle is large, light inside the silicon substrate travels very close to Z axis, due to large
the large refractive index of silicon at this wavelength. To accelerate the simulation, we use a relatively coarse
mesh in XY for Si by use of the override mesh. In addition, we use fine mesh for the TFSF region including the
particles.
3: TFSF region
The TFSF region can be as small as to enclose the particle, but it should be in a uniform mesh, in particular in the
directions parallel to the injection plane. As like other sources, no monitor can penetrate or pass through the grey
lines.
4: Angle dependence of broadband source
Similar to plane wave, if a broadband source is injected, the real incidence angle
changes with frequency, please refer the description for broadband injection 536 .
Therefore, angled TFSF is usually used for single wavelength illumination.
5: Auto shutoff min
You may notice that the simulation ends at the auto shutoff larger than the default 1e-5. But the result is still
accurate, since in this case, the equivalent intensity inside the simulation region is relative to the TFSF injection
power, which is small. Increasing the simulation time to reach the default auto shutoff min does not improve the
results.
6: Initial simulation vs. final results
It is always a good practice to have relatively low accuracy to speed up the
simulation initially. To get the final results, we strongly recommend to use
larger simulation region, and do converging test 847 .
8.1.2.4.2 Results
We are interested in the scattering profile from the PSL sphere. Open psl.fsp and run the script
psl_analysis.lsf. It will run a series of simulations, calculating the scattering for various polarizations.
Results for the other polarizations can be obtained by modifying psl_analysis.lsf and re-running the script.
The following figures show the normalized scattering profile as a function of defect diameter and source settings.
Please note that for comparison purpose, the far field intensity is normalized to its maximum.
100
140
180
220
The scattering profile is clearly a function of particle diameter when using a 70o angle of incidence. This is not the
case when using a normally incident beam. When using a 70oangle of incidence, it is possible to estimate the
defect size by knowing the scattering profile. These results are very similar to Figure 3 from S. Stokowski.
Next, we calculated the scattered power in the far field within an angular cone between 25 and 72 degrees. The
following plot is generated by changing the plot_scattering flag in the script file. These results are similar to
Figure 5 from S. Stokowski.
P polarized light at grazing angles of incidence is best for detecting small defects because the scattering profile is a
strong function of defect size and has a relatively large scattering intensity.
8.1.2.5 BSDF
Introduction
In this example, we will consider a surface with nanoscale structure. The surface can be characterized using a
Bidirectional Scattering Distribution Function (BSDF). This function relates the intensity of an incoming ray to an
outgoing ray for all angles of incidence and reflection/transmission.
Solvers 101
FDTD
See also
Rough surface object 364
Grating projection toolbox 150
For many surfaces, the specular reflection and transmission is much larger than the diffuse scattering. It can be
useful to separate these two contributions, as shown in the figure below. In this case, we can treat the BRDF and
BTDF as a relatively smooth function for many surfaces, which makes interpolation near the specular directions
much easier.
Simulation methods
There are two approaches that can be used for calculating the BSDF, the gaussian beam and the plane wave.
Gaussian beam with PML boundaries on all sides. Plane wave with Bloch boundary conditions on the x and y
boundaries.
The gaussian beam approach uses a finite-size gaussian beam as the incident field with PML boundaries on all
sides. The disadvantage of this approach is that the diffraction of the gaussian beam will always be included in the
calculation of the BSDF. This means that the BSDF cannot be accurately determined near the specular directions
because we see the diffraction of the finite-size gaussian beam which generally dominates non-specular scattering
from the surface. However, for surfaces that lead to very diffused light, it can be a good method.
The plane wave uses Bloch-periodic boundary conditions. This means that the structure is treated as a periodic
repetition of the surface. The angular distribution of reflection and transmission is only calculated for directions
corresponding to the grating orders of the periodic structure. As long as the period is large enough, this provides
enough angular resolution. The rough surface structure from the object library will create a periodic structure with no
discontinuities when periodic boundary conditions are used. The advantage of this method is that there is no inherent
diffraction of the source beam. For example, a completely flat surface will show that light is purely scattered
specularly, whereas the gaussian beam method will show that the beam spreads due to diffraction of the beam. In
addition, the plane wave method allows the specular intensity to be perfectly separated from the non-specular
scattering, which can be useful if some smoothing of the non-specular scattering is required. The disadvantage of
this method is that the number of scattered orders depends on the angle of the incident beam, which makes data
processing somewhat more complicated. Furthermore, the number of layers of PML absorbing boundaries generally
needs to be increased to account for the poor performance of PML at steep angles of incidence.
In the remainder of this application example, we will use the plane wave method.
Introduction
In this example, we will consider a weakly scattering, thin grating at normal incidence and compare the calculated
BRDF with the theoretical result using the Born approximation. We will study this surface using the plane wave
method.
Solvers 101
FDTD
Associated files
bsdf_simple.fsp
bsdf_simple.lsf
RMS (s) and correlation length (Lc). In this example, these quantities are related to the correlation function by
2
r r r d
H (r ) H (r + d ) = s 2 exp -
Lc
where the average is carried out over all positions on the surface, r, and H is the surface height defined such that
<H(r)> = 0.
The rough surface structure can optionally generate some figures as shown below. To produce these plots, right-
click the 'rought_surface' structure group and enter '1' in the 'make plots' parameter, and then click 'ok.' When a
warning message pops up, reading "This requires a czt of a 2d matrices of size 401x401! Do you want to proceed?",
click 'Yes.'
For this simple case, we will run a single simulation at normal incidence.
Correlation function calculated num erically com pared w ith Correlation function calculated num erically com pared w ith
theory theory (zoom ed in)
Analysis of results
The script file bsdf_simple.lsf can be used to perform the analysis. It first calculates the angular distribution of
scattered orders, which is shown on a log scale below. Note the resemblance to the original random surface in k
space.
It then uses the script function farfield3dintegrate to integrate over a series of collection angles, with an
integration area corresponding to a cone with a 5 degree half-angle. We average over 50 azimuthal angles. We then
can compare to the theoretical result for angles away from normal incidence.
The agreement between theory and simulation is very good above 10 degrees. The agreement below 10 degrees is
not so good because the results come from only a few data points. To improve this agreement, we would need to
simulate a beam that is incident on several different regions of the surface and average the results. This will be done
in the following section.
Introduction
We now want to generate the BRDF and BTDF for a particular surface. In this example, we will use the same
surface from BRDF theory to generate a BRDF and BTDF but any surface could be used. In this study, we will use
the plane wave method.
Solvers 101
FDTD
Associated files
bsdf_simple.fsp
bsdf_calculation_bloch.lsf
Simulation
The starting fsp file is bsdf_simple.fsp. The script file bsdf_calculation_bloch.lsf will calculate the
BRDF and BTDF for 5 different incident polar angles. We assume that the surface roughness has azimuthal
symmetry, and we can rotate the structure by 90 degrees. In addition, we average over 9 random surfaces generated
with the same settings. This is similar to averaging over 9 different locations on the surface in an experiment. To
obtain unpolarized results, we will average the response of S and P polarization on the input. The total number of
simulations is therefore 5 x 2 x 9 x 2 = 180. The user can choose to rerun the simulations, or simply rerun the
analysis when running the script file.
Analysis
For each angle of incidence, we calculate the angular distribution of reflected and transmitted orders. In this
example, there are approximately 50x50 orders, although the number in transmission is different than the number in
reflection due to the different refractive index. This number can be increased by increasing the area of the simulation.
We can then separate the specular transmission and reflection by identifying the 0th order in each case. We
assume that the specular is much stronger than the other orders and that is indeed the case. To separate the
specular light from the diffused light, we assume that the diffused light in the specular direction is the average of the
light diffused to the (+1,0),(0,+1),(-1,0) and (0,-1) orders. To conserve energy, we also subtract this small amount
from the specular power already identified. This separation at precisely the specular angle is somewhat arbitrary, but
provides a smooth function for the diffuse component of the BSDF. We can then calculate the BRDF and BTDF by
integrating the diffused light over various output angles. In this study, we assume that we can integrate over a 5
degree half angle cone, and this helps provide some additional smoothing of the results in addition to the smoothing
that occurs from averaging the different incident positions and incident azimuthal angles. The user can also specify
the half-angle size of the integration region, to modify it as desired.
Advanced note: when using the farfield3dintegrate function, we need to multiply by a factor of
cos(theta_out). This is because our angular distribution represents the relative power carried in each diffracted order,
and not the time averaged Poynting vector.
The user can choose which range of input angles (theta), and output angles (theta_out, phi_out) to calculate. Note
that phi_out represents the difference in input azimuthal angle and output azimuthal angle because we have
assumed that the surface has azimuthal symmetry.
Results
The angular distribution of scattered light is shown below for each of the five angles of incidence.
Reflected fields
0 degrees 15 degrees
30 degrees 45 degrees
60 degrees
Transmitted fields
0 degrees 15 degrees
30 degrees 45 degrees
60 degrees
The script also outputs the specular strengths for reflection and transmission, the total reflected and scattered
power, and the total power
incident angle, specular R, specular T, total R, total T, total R+T
0, 0.00404571, 0.911121, 0.0257424, 0.974054, 0.999796
15, 0.004939, 0.907587, 0.0257847, 0.973971, 0.999756
30, 0.00841839, 0.893595, 0.0276189, 0.972104, 0.999723
45, 0.0176576, 0.860782, 0.0348971, 0.964782, 0.999679
60, 0.0403746, 0.806879, 0.0528771, 0.944788, 0.997665
Note that the total power is not exactly 1 due to numerical errors. If it is substantially different than 1, it means that
there is an error in the simulation setup, or that more layers of PML may be required.
The BRDF, BTDF and specular data is saved to an *.ldf file and can be reloaded as required.
$CASE LOWER
models
rawdata
0 0
-0.996195 0 0
-0.993136 0 0
-0.989185 0 0
-0.984345 0 0
-0.978622 0 1.08113e-007
-0.972019 0 9.73739e-008
-0.964543 0 9.73739e-008
...
...
...
0.866025 0
-0.996195 0 3.01866e-008
-0.993136 0 3.01866e-008
-0.989185 0 3.01866e-008
return
$case upper
Solvers 101
FDTD
Associated files
mie_theory_2d.fsp
mie_theory_2d.lsf
mie_cylinder.txt
See also
Surface Plasmons 1881
Mie scattering 3D 1752
TFSF sources 546
Related publications
H C van de Hulst, "Light Scattering by Small
Particles", John Wiley, Ch. 15 (1957)
Results
Open and run the simulation file named mie_theory_2d.fsp. The simulation creates the mpeg movie below.
The Total-Field Scattered-Field (TFSF) source is used to create a plane wave incident on a dielectric cylinder. Only
light scattered by the cylinder propagates beyond the TFSF boundary.
After running the simulation, run the script file named mie_theory_2d.lsf. The script file computes a series of
far field projections at 2 wavelengths, and compares the results to the analytic data for scattering from a dielectric
cylinder that are stored in the file cylinder.txt. Note that the monitors record 25 wavelengths, but the script in
the analysis group selects the monitor data at 1 and 2 microns. The resultant plot (logarithmic scale) is shown
below. The analytic and simulated results agree very well at all angles, over more than 5 orders of magnitude.
The script can also calculate the scattering and absorption cross sections. The absorption will be zero, since the
cylinder is a composed of a dielectric with no absorption. To calculate the cross sections, edit the script and set
the do_cross_sections variable to 1.
Solvers 101
FDTD
In this topic
Simulation setup 1753
Cross sections 1754
Far field 1755
Field enhancement 1756
Associated files
mie_example_3d.fsp
mie_analysis_3d.lsf
mie_au_jc_raw.txt
mie_au_jc_fdtd.txt
See also
Surface Plasmons 1881
Mie scattering 2D 1751
TFSF sources 546
Simulations with Silver 274
Projections from a monitor box 817
Related publications
Bohren, C.F., and D.R. Huffman,
1983: Absorption and Scattering of
Light by Small Particles (Wiley-
Interscience, New York).
Simulation setup
The file mie_example_3d.fsp contains an example of the Mie problem in 3D, using a total-field scattered-field
source(TFSF) that surrounds a gold particle. There are two analysis groups, each of which consist of a box of power
monitors: one in the total field region and one in the scattered field region. These analysis groups can be used to
calculate the absorption and scattering cross sections, as well as the angular distribution of scattered radiation. In
addition, 3 frequency profile monitors are added in the total field region to calculate the electric field enhancement.
The total scattered field source covers a wavelength range of 300 to 600 nm.
The gold material is a copy of the "Au (Gold) - Johnson and Christy" material that is contained in the default material
database. Since the default number of coefficients is not sufficient to provide a good fit to the sampled data over the
source bandwidth, the maximum coefficients is set to 10. The theoretical Mie scattering cross sections (absorption
and scattering) have been calculated for both the material fit and the sampled data and are stored in the files
mie_au_jc_fdtd.txt and mie_au_jc_raw.txt, respectively.
With the default settings (simulation span is 1x1x1 um3 and a mesh accuracy of 3, plus an override region of 5nm at
the sphere) the simulation will require about 234 MB of memory.
Once the simulation is finished, mie_analysis_3d.lsf will perform the following analysis.
encompass not only the gold sphere, but also the entire TFSF region. This was done intentionally; the TFSF
sources work best in uniformly meshed regions.
Also note that the mesh spacing of the override region effects the location of the analysis boxes. Sources require a
certain amount of space to inject the fields. The amount of space required is ~2 mesh cells and is depicted
graphically by light white shading that surrounds the source. Within this region, the fields are not physically
meaningful. Hence monitors should not be placed in this region.
The MIe efficiency is defined as the ratio of cross_section of scattering/absorption and the geometrical area pi*r^2;
and the size parameter is 2*pi*r/lambda.
The above plots compare the FDTD results with the results from theory which were computed using the Gold data
from the material fit. In the script file, change the name of the file from which to plot the theoretical results from
mie_au_jc_fdtd.txt to mie_au_jc_raw.txt to compare the FDTD results with the results from theory that
were computed using the raw Gold data. Running the script file results in the following two plots for the cross
sections.
power (which is infinite for an ideal plane wave since it has infinite extent), it is best to normalize by the source
intensity. This leads to power measurements being returned in cross section type units. For more information,
see the Power normalization page of the TFSF sources 546 section.
Mesh refinement Set the mesh refinement to 'conformal variant 1' to achieve sub-cell resolution for the
gold particle boundary. Care must be taken when selecting this setting if the mesh is
coarse and there is a large difference in permittivity between the metal and
surrounding medium at the frequencies of interest. It is best to perform some
convergence testing. A more detailed discussion on convergence testing can be found
on the convergence testing page 847 .
Mesh size Set the mesh override mesh size to 0.8nm
Simulation span Set the simulation span to 2um in all directions.
When the simulation region is too small, evanescent tails of the resonant surface
plasmon modes will interact with the PML boundary conditions.
PML reflections Any light reflecting from the PML boundary conditions may affect the results. More
PML layers will reduce reflections. However, if you are using the "stretched coordinate
pml" with its default 8 layers, no need to change it, except you need much higher
accuracy.
Symmetry Set the X min boundary condition to Symmetric
Set the Z min boundary condition to Anti-Symmetric
We can take advantage of the symmetry of the simulation to reduce the simulation
memory and time by a factor of 4.
The following figures show the cross sections from the higher accuracy simulation. Agreement between the FDTD
and theoretical results is clearly much better.
Field enhancement
We use a series of profile monitors to image the field profile |E|^2 in the YZ, XZ and XY planes through the center of
the particle. Notice that the edge of the TFSF source is visible in the plots. These figures were created with the
higher accuracy settings.
Bloch modes are the name given to optical modes which can propagate through the photonic crystal lattice. The
corresponding photonic bandstructure for a particular photonic crystal structure illustrate photonic band gaps where
Bloch modes do not exist, and where such Bloch modes can propagate.
FDTD Solutions is a high performance optical solver that can capture the effects of wavelength-scale photonic
crystal patterning
and solve scientific issues related to the design, analysis and optimization of photonic crystal cavities, devices and
components.
Features
Optimize a wide variety of grating designs 1788
Calculation of photonic crystal bandstructure and band gaps 1843 , waveguide Bloch mode profiles 1871 and
photonic crystal cavity modes and quality factors 1807 for those modes in 2D and 3D
Propagation in photonic crystal waveguides 1856 without and with imperfections 499 , including calculation of
effective index, propagation constant, propagation loss, dispersion, bending loss, group velocity, group
dispersion of photonic crystal waveguide components
Propagation in and performance of photonic crystal based devices including switches 1873 , splitters, bends,
resonators 1804 , filters, cavities 1804 , and input/output couplers
Effect of photonic crystal patterning on the performance of devices including photonic crystal light emitting
diodes (OLEDs) 2682 , VCSELs, and photonic crystal enhanced solar cells 2635
Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy important in photonic
crystal modeling
Multi-Coefficient Materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs
MODE Solutions can be used to analyze photonic crystal fiber and planar photonic crystal components.
Features
For photonic crystal fiber and other microstructured optical fibers:
Photonic crystal fiber (PCF) 1770 mode profiles, effective index, propagation constant, propagation loss,
dispersion, bending loss, group velocity, group dispersion
Sensitivity of PCFs to size and other environmental factors that result in changes in the refractive index
profile
Photonic crystal fiber macrobending loss 1781
Far field radiation profiles of photonic crystal fiber modes and modes of other microstructured optical fibers
Coupling efficiency 2185 between photonic crystal fiber modes and other waveguide modes
Getting started
Relevant videos (login required):
Bandstructure calculations
Cavities and resonators
Application examples
Solvers 101 Description
solver and the Photonic Crystal Fiber example uses the FDE 101 solver.
Problem definition
The goal of this example is to demonstrate how FDTD Solutions may be used to analyze photonic crystal cavities.
We want to determine the resonant frequency, Quality factor, and mode profile of the cavity modes. Once we learn
how to find the mode of interest and measure its Q-factor, we will use a particle swarm optimization to find the inner
hole radius which provides the maximum Q factor.
Note: The screen shots in this example were created with the Mac version of FDTD Solutions. The graphical user
interface looks a slightly different than it does on Windows and Linux.
Solvers 101
FDTD
Associated files
ppc_cavity.fsp
In this topic
Simulation set up 1759
Simulation results 1762
Further analysis: Symmetry 1763
Further analysis: Optimization of inner hole radius 1764
See also
Cavities and Resonators 1804
Simulation set up
The cavity is constructed by perforating a slab of Ta2O5 (which has an index of 2.0995) with air holes forming a
hexagonal lattice. The lattice constant is 575 nm, and the air hole radius within the photonic crystal lattice is 194
nm. The cavity itself is formed by removing a central hole, by reducing the radius of the inner six holes to 100 nm,
and by removing holes along the outer edge of the cavity to form the structure shown in the figures below.
When we construct this structure in FDTD Solutions, we create the slab out of a rectangle. Then we add cylinders to
the simulation for the holes. In the locations where the holes and the slab overlap, we use the mesh order property to
make sure that FDTD Solutions uses the refractive index data from the holes (cylinders) instead of from the slab
(rectangle). For more details about mesh order, refer to the mesh order 271 page in the Reference Guide.
Two dipole sources (depicted with green arrows to show the direction of the H field) are used to excite the modes of
the cavity. These dipoles are not located in the center of the PC structure in order to reduce the chance that they are
located at a zero of the cavity mode. The dipole sources are used to inject energy into the simulation volume. Some
of the dipole radiation will be coupled into the cavity modes and decay slowly. The radiation which does not get
coupled into the cavity modes will be scattered and quickly exit the simulation volume.
The frequency domain monitors in FDTD simulations calculate the mode profile by taking a discrete Fourier
Transform of the time domain data. Obviously, we do not want to include the portion of the time signal at the
beginning of the simulation, since it contains radiation which does not excite the modes; we are only interested in
the later portion of the time signal when all the energy left in the cavity is in the resonant modes. As you can see in
the modeling instructions on the next page, we can use monitor apodization to select only the portion of the time
data at which all the energy left in the simulation is in the resonant modes. A more in depth discussion of monitor
apodization (also based on a PC cavity) can be found in the Apodization 660 .
The rest of this set up section discusses some important simulation settings, namely the boundary conditions, the
mesh and the simulation time.
Boundary Conditions
The orange boundaries which can be seen in the screenshot above are Perfectly Matched Layer (PML) boundary
conditions. PML boundaries absorb incident radiation, and are intended to absorb all radiation propagating away from
the cavity. It is important to leave some distance between the cavity and the PML boundaries. If the boundaries are
too close to the cavity, they will start to absorb the non-propagating local evanescent fields that exist within the
cavity. A simple rule is to leave at least half a wavelength of distance above and below the structure.
Next, notice that the lower half of the simulation (z<0) is shaded blue. This is because we used a symmetric
boundary condition on the z min boundary in order to reduce the computation time by a factor of two. The drawback
of using the symmetric boundary condition is that it will forbid certain modes from appearing in the results (modes
that do not exhibit the same symmetry relation as the boundary condition). For this PC cavity, there is a plane of
symmetry through the center of the slab (z=0 plane). Using a symmetric boundary condition on this plane will only
allow TE-like modes and eliminate TM-like modes from the results.
Note that the reason the dipoles are located z=0 is because this is the ideal location for the sources. Magnetic
dipoles will have an E field pointing along the z=0 plane. The blue color of the symmetric boundary condition is
intentional; it indicates that the E field should lie along (be parallel to) this boundary. Most sources in FDTD
Solutions contain blue arrows which show the E field. These should always lie on blue boundaries.
Mesh
To get good results for cavity simulation, it is important to include an integer number of mesh cells per lattice
constant in the two directions. The wavelength in the material is on the order of l = c / f / n = 3e8 / 160e12 / 2.0995
= 890 nm. We can expect reasonable accuracy with a l/10 mesh. 8 points per period in the x direction gives a mesh
size of 575nm/ 8 = 71.875nm. The mesh size will be smaller in the y direction since the lattice constant is
575*sin(60) nm. This should give reasonable accuracy while keeping the simulation time to a minimum.
To make sure that the mesh can actually be an integer number of mesh cells, the simulation (FDTD) span has to fit
exactly an integer number of mesh cells inside the boundaries. For this reason we set the x span of the FDTD region
to 575*12 nm and the y span of the FDTD region to 575*sin(60)*12 nm
By clicking the 'View mesh' button, it is possible to view the mesh around the structure. It is important that each
hole is meshed in the same way. If the mesh lines fall at different locations with respect to the holes, each hole will
have a slightly different size and shape in the simulation.
Before running simulations with periodic structures, it is good practice to use an index monitor to check that the
structure actually looks periodic when it is meshed. The index monitor results below show that each of the holes
looks like a cross. This is because the mesh is a bit coarse. However, each cross (except for the 6 inner holes)
looks identical. It is important to make sure that the holes all are meshed the same way, if we want to obtain good
results. It is possible to view the meshed structure with the index monitor in layout mode (i.e. before the simulation
has been run).
The modeling instructions section on the next page contains step by step instructions of how to create index
monitor plots.
Simulation time
To obtain accurate frequency domain data, it is generally required to run the simulation until the time domain fields
have decayed to zero. High quality factor cavity simulations are one exception to this rule. This is fortunate, since
high Q modes decay very slowly. Running high Q cavity simulations long enough for the fields to fully decay would
be very slow.
A combination of time domain analysis and frequency domain apodization allow us to accurately calculate the Q-
factor and profile of cavity modes without running the simulation until the fields decay. However, some care should
still be taken when using this technique. Other measurements like power transmission and field amplitudes will not
necessarily be correct when the simulation is stopped early.
Simulation Results
The simulation contains a Q analysis group, which contains a script that finds the resonance peaks and Q factors of
the cavity modes. We have placed the Q factor group, which contains a time monitor, away from the origin of the
simulation for exactly the same reason the dipoles are not placed at the origin.
We can use the analysis script to obtain the largest two resonance peaks in the source bandwidth and their Q
factors. It is easy to obtain more resonance peaks: Simply change the "number_resonances" parameter in the
Analysis-> Variables tab of the Q analysis object.
We can also obtain a plot of the E fields as a function of time (below right) and a plot of the resonance peaks. The Q
factor calculations are discussed in detail in the Cavities and Resonators 1804 section of the Online Help.
Once we know the resonance frequencies, the corresponding E field profiles can be plotted.
The image below shows real(Ey) for the mode at 201 THz.
From the above image and the discussion on the Choosing between symmetric and anti-symmetric BCs 466 page in
the User Guide - Simulation section, we can see that the E fields for the mode of interest have a plane of anti-
symmetry at X=0, and a plane of symmetry at Y=0.
Whenever the EM fields have a plane of symmetry through the middle of the simulation region, using symmetrical
boundary conditions will give the same results as running the full simulation. The plot below shows real(Ey) after we
set the x min and y min boundary conditions to anti-symmetric/symmetric. This plot looks identical to the one above
except for the magnitude. The change in magnitude arises because the sources have been mirrored, i,e in the full
simulation there are only two sources, but by using symmetry we have mirrored these sources so that there are now
8.
In this case, we choose to try to find the radius of the 6 inner holes of the PC Cavity which optimizes the Q factor of
the first resonance. The sweep below shows an optimal radius corresponding to 0.167*0.575 um = 96 nm.
In this topic
Create PC and check material index 1765
Add sources and monitors. Run simulation and get data. 1767
Symmetry 1769
Optimize inner hole radius 1769
Press on arrow on the STRUCTURES button and select a RECTANGLE from the pull-down menu.
Set the properties of the ring according to the following table.
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
Press on arrow on the COMPONENTS button and select PHOTONIC CRYSTALS from the pull-
down menu. This will open the object library window.
Select HEXAGONAL LATTICE PC H-CAVITY from the list and press the INSERT button.
Set the properties of the PC Cavity according to the following table.
tab property value
Properties x ( m) 0
y ( m) 0
z ( m) 0
material etch
H number 2
z span ( m) 1
n side 6
a ( m) .575
radius .194
Press the DUPLICATE button to create a second copy of the hexagonal lattice PC cavity. Edit the
properties according to the following table
tab property value
name inner
Setup Variables x ( m) 0
y ( m) 0
z ( m) 0
H number 1
n side 2
radius ( m) .100
Press on the SIMULATION button to add a simulation region. Note that if your button does not look
like the button to the left, you will need to press on the arrow to get the simulation region. Set the properties
according to the following table.
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
force symmetric y mesh check
force symmetric z mesh check
Note: Forcing a symmetric x mesh ensures that a mesh line lies at x=0, and therefore the mesh does not change
when we switch the x min boundary condition from PML to symmetric or anti-symmetric. Strictly speaking we do not
need this option for this particular simulation since we have set up the mesh in this example so that there will be a
mesh line at x=0 anyways.
Press on the arrow next the the SIMULATION button and select MESH OVERRIDE from the pull-down menu. Set
the properties according to the following table.
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
Press on the arrow on the MONITORS button and select the INDEX monitor from the pull-down menu.
Set the properties according to the following table.
tab property value
name index
Geometry x ( m) 0
y ( m) 0
x span ( m) 10
y span ( m) 10
Get the index monitor data: you can use visualizer 740 Visualize->index to get the index distribution or verify the
structure without running the simulation.
Press the arrow on the on the SOURCES button and select the DIPOLE source from the pull-down
menu. Set the properties according to the following table:
tab property value
name dipole1
General dipole type Magnetic dipole
Geometry x ( m) .1
y ( m) .2
Frequency/Wavelength frequency start (THz) 160
frequency stop (THz) 250
While the dipole is still selected, click the DUPLICATE button on the toolbar (or, use the keyboard shortcut
key D). Set the name to dipole2 and the x location of the dipole to 0.3 microns.
Press the arrow on the on the ANALYSIS button and select RESONATORS from the pull-down menu.
This will open the object library window.
Insert the Q ANALYSIS analysis group. Set the location of the monitor to x = .4 m, y = .2 m and z = 0 m.
Press the Resources button and check the number of processes (number of cores) for the local
machine. If you have additional computers on the network with FDTD installed as well as extra engine licenses,
you can add them to the resource list. Click "Add" and set the appropriate properties.
Press the "Run Tests" button to make sure the simulation engines on the resources are configured correctly. The
first time you run this test, it may fail and ask you to register your username and password for your operating
system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests. If
there are any errors or warnings, they will appear in the "Result" field.
Run the simulation by pressing the RUN button . For more information about setting the parallel computing
options see the Running simulations chapter.
To get the Q factor of the cavity, right-click on the Qanalysis group and select "runanalysis". Alternatively, open
the edit window for the Qanalysis group, and under the Analysis->Script window, press the RUN ANALYSIS
button to run the script.
Add profile monitor (now that we know the resonance frequencies for the structure)
Press the arrow on the MONITORS button and select the FREQUENCY DOMAIN FIELD PROFILE
monitor from the pull-down menu. Set the monitor properties according to the following table.
tab property value
name profile
General override global monitor settings check
use source limits uncheck
frequency points 2
minimum frequency (THz) 201
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
Press the SWITCH TO LAYOUT button to the objects tree 208 window.
To plot real(Ey), simply select "Y" for Vector operation and "Re" for Scalar operation.
SYMMETRY
To reduce memory requirement and speed up simulation, we can use the symmetry boundaries.
For more information on using symmetry boundaries, see the Symmetry boundaries 466 page.
Each generation of the optimization will create a temporary set of simulations to be run before being replaced by
the next generation. The job monitor will show the individual progress for each simulation of a generation set. In
the screenshot below, the simulation is using both Local Host and Laptop to run through the iterations in parallel.
Note that in distributed mode, the source fsp file must be stored on the network, accessible by all the computing
resources.
Problem definition
In this example, we show how to use MODE Solutions to study a photonic crystal fiber (PCF). Using the built-in
analysis tools, we will calculate the effective index and dispersion of the PCF, as well as estimate how efficiently
light can be coupled in to the PCF, and how much loss can result from bending the fiber.
Solvers 101
FDE
Associated files
LMA-35.lms
In this topic
Modeling instructions 1775
Discussion and results 1771
Simulation set up
The PCF is constructed by perforating a circular fiber of radius 300 um with air holes forming a hexagonal lattice.
The lattice constant is 23.2 um, and the air hole radius within the photonic crystal lattice is 5.8 um. The cavity itself
is formed by removing a central hole. Since the material of the air hole is specified as "etch" (with mesh order 1),
whereas the mesh order of the fiber is 2, MODE Solutions will use the refractive index data from the air holes in
regions where the two objects overlap. For more details about mesh order, refer to the mesh order 271 page in the
Reference Guide.
It is always a good idea to start with a relatively coarse mesh (a good rule of thumb is 50 grid points in each of the x
and y direction). This way the simulation will run quickly and still provide reasonable results. When high accuracy is
required, increase the number of grid points. Note that the more grid points you use, the more memory required.
It is important to make sure that periodic structures are properly discretized in order to get accurate results. In
general, it is always good to ensure that you can fit an integer number of mesh cells within each period of the device,
and within the span of the simulation region. In this example, the x and y span are both 12 times the period of the
structure along the respective axis, and there are 60/12=5 mesh cells per period.
In the screen shot below (or if you view the mesh in MODE Solutions by clicking on VIEW SIMULATION MESH
), it is possible to see that there is a mesh cell at the same point at each period of the hole array. If the mesh
lines fall at different locations, each hole will have a slightly different size and shape, reducing the accuracy of the
simulation.
Note that by setting the y min boundary condition to symmetric the lowest order mode with electric field polarized
along the x axis has been chosen.
By selecting various modes within the table, the spatial intensity profile of the mode will be plotted in the window.
Note that mode #1, with the highest effective refractive index, consists of a central intensity lobe - this is the
fundamental mode that we are looking for (with effective index of approximately 1.4436). We can now use this value
to speed up the calculation process when using a finer mesh with the SEARCH NEAR N option. Note that the
fundamental mode is found in the first attempt, but now with a higher spatial resolution. The effective index may shift
slightly due to the higher resolution meshing.
The modes of interest are typically those that have energy near the center of the photonic crystal fiber (and away
from the PML boundary layers). Modes found near the PML boundary conditions tend to be artificial, and are
automatically hidden. The ADVANCED OPTIONS tab can be set so that MODE Solutions returns all of the modes
found should you be interested in doing so.
For each mode listed in the mode table, the effective index, propagation loss and polarization properties (see Mode
List and Deck 751 for a more precise definition) are shown.
We can get the dispersion plot below by following the instructions in the "Modeling instructions" section. Note that
this is the plot of the total dispersion (i.e. material dispersion + waveguide dispersion), which at 1.55 microns is
equal to 25.8 ps/(nmkm). To calculate the dispersion to greater precision, the number of grid points could be
increased. It is good practice to double the number of grid points and see if the results change significantly.
Now, to determine the fraction of the total measured dispersion results from the waveguide itself, we need to remove
the material dispersion from the Corning material. To do this, we need to determine the refractive index of the
Corning material at the wavelength of interest (1550nm) using the MATERIAL EXPLORER (press the MATERIAL
EXPLORER button in the Material Database):
Note that the material is set to "Corning 7980 Silica". To determine the refractive index, set the min and max
wavelengths to 1.55 microns and press "Fit and plot", and read off the real part of the effective index (1.4440) from
the Re(index) plot. Once we set the index of the fiber to be a non-dispersive material of index 1.4440 and re-perform
the sweep, the frequency sweep plot will show that the (waveguide only) dispersion is equal to about 1.3 ps/
(nmkm). Thus, the material dispersion is the dominant component of the total dispersion for this micro-structured
fiber design.
In this topic
Set up model 1775
Modal analysis 1777
Frequency analysis 1778
Set up model
The physical structures to be modeled are created using the STRUCTURES tab in the Layout Editor. The first step
is to create the fiber with the air holes.
Begin by starting MODE Solutions. You can save the MODE Simulation Project file (extension *.lms) at any point
in this process. To do so, choose SAVE in the FILE menu.
Press the MATERIAL DATABASE button and add a new sellmeier material with the following
properties:
section property value
name Corning 7980 Silica
color dark blue
Material Properties A0 1
B1 0.68374
C1 0.00460353
B2 0.420324
C2 0.0133969
B3 0.585027
C3 64.4933
Press on arrow on the STRUCTURES button and select a CIRCLE from the pull-down menu. Set the
properties of the circle according to the following table.
tab property value
name fiber
Geometry x ( m) 0
y ( m) 0
z ( m) 0
z min ( m) -0.5
z max ( m) 0.5
radius ( m) 300
Material Corning 7980 Silica
Press on arrow on the COMPONENTS button and select PHOTONIC CRYSTALS from the pull-
down menu. This will open the object library window.
Select HEXAGONAL LATTICE PC H-CAVITY from the list and press the INSERT button.
Set the properties of the PC Cavity according to the following table.
tab property value
name pc cavity
Properties - Origin x ( m) 0
y ( m) 0
z ( m) 0
Properties - User Properties material etch
H number 1
z span ( m) 1
n side 6
a ( m) 23.2
radius ( m) 5.8
Press on the SIMULATION button to add an EIGENMODE SOLVER simulation region. Note that if
your button does not look like the button to the left, you will need to press on the arrow to get the simulation
region. Set the properties according to the following table.
tab property value
General solver type 2D Z normal
Geometry x ( m) 0
y ( m) 0
z ( m) 0
x span ( m) 12 * 23.2
y span ( m) 12 * 23.2 * sin(60*pi/180)
Mesh settings - Number of mesh mesh cells x 60
cells without override regions
mesh cells y 60
Boundary conditions x min bc PML
x max bc PML
y min bc Symmetric*
y max bc PML
Press the Zoom EXTENT button to resize the view in the Layout Editor.
Modal Analysis
Select the ANALYSIS tab with the RUN ACTIVE SIMULATION button .
Under the Modal analysis tab, enter the following parameters:
tab property value
Modal analysis wavelength (um) 1.55
number of trial modes 20
search in range
n1 1.44399 (max n)
n2 1.4
Click the MESH STRUCTURE button to see the meshed PCF.
Press the CALCULATE MODES button. Once you see a few modes appear in the index table, press the STOP
button on the progress window.
Once we determine the effective index of the fundamental mode to be near 1.4436, return to the layout editor by
LAYOUT button . Select the MODE object and set the number of mesh cells in x and y to be 120. This will
make the simulations slower, but more accurate.
Back to the MODAL ANALYSIS tab, now select the SEARCH NEAR N option, uncheck use max index, and enter
the effective index of 1.4436. Then press the CALCULATE MODES button.
In addition to the Modal Analysis tab, one can also view the calculated modes using the Visualizer 740 . In the
Object tree as shown below, under the Eigensolver simulation region there is a EigensolverDataGroup called
"data", which contains a material monitor as well as all the modes in the current mode list. One can then right
click on the object and choose to Visualize the different datasets corresponding to each object.
Frequency Analysis
Under the Frequency analysis tab, select the mode that you want to track (by clicking on it in the mode table),
and enter the following parameters:
tab property value
Frequency analysis stop wavelength (um) 1.4
number of points 10
number of test modes 3
track selected mode on
detailed dispersion calculation on
Click on the FREQUENCY SWEEP button to begin the scan. The scan will take about a minute.
To plot the calculated dispersion as a function of wavelength, select the FREQUENCY PLOT tab in the bottom
righthand corner of the frequency analysis window. Then select "Dispersion" in the plot pull down menu. The plot
can be seen above the frequency plot tab. If you press the PLOT IN NEW WINDOW you will get a new window.
To determine the fraction of the total measured dispersion results from the waveguide geometry, as opposed to
bulk material dispersion, we need to return to the layout editor and change the material properties of the fiber.
Return to the layout editor by clicking the LAYOUT button , MODE Solutions will automatically close the
Analysis Tab.
Select the fiber structure, set the material from "Corning 7980 Silica" to "<Object defined dielectric>" and set the
INDEX to 1.444, rerun the frequency sweep.
Bend Analysis
In the following step of analyzing the photonic crystal fiber, we examine how the total loss in a 90 degree bend varies
as a function of the radius of curvature. Before running the sweep, switch back to LAYOUT and set the material for
the fiber back to "Corning 7980 Silica" and recalculate the modes. To perform a series of simulations to investigate
the effect of systematic changes on cavity performance, it is convenient to take advantage of the built-in parameter
sweep tool in MODE Solutions. There are 3 steps to setting up the bend analysis parameter sweep:
Next, we want to save the loss of the fundamental mode at each bend radius setting.
Switch back to LAYOUT and edit the MODE data group by right clicking on the object with your mouse. Select
the Edit object option from the list as shown in the figure above.
In the Analysis->Variables tab click the bottom ADD button. This will add a result which the data group can give to
the parameter sweep. Rename the result to "loss" as shown in the bottom left window.
Switch to the Analysis_>Script tab shown in the right part of the image below. Then add the following lines of
script commands which will add data to the "loss" result once a simulation has run. Press OK to save your
changes.
fund = bestoverlap("FUND"); # find the mode that best overlaps with "FUND"
p
loss roc
However, here it is more useful to plot 2 (instead of just loss), since we want to determine the loss in a
90 degree bend. Note that this is the actual bend angle, not the bend orientation 111 .
To do this, open the script prompt window using the VIEW menu at the top of the graphical user interface, or by
right clicking on the top title bar 211 of the MODE Solutions GUI. Copy and paste the following commands into the
script prompt and press ENTER on the keyboard to execute them.
result = getsweepresult('sweep','loss');
loss = result.loss;
roc = result.roc;
plot(roc*1e3,loss*roc*pi/2,"radius (mm)","loss in 90 degree bend (dB)","","logplot");
In many cases, a 1D stack simulation is used an an initial starting point to verify the accuracy of the FDTD solution,
since an analytic solution exists.
Solvers 101
FDTD
See also
Transfer matrix RT calulator 156
Two approaches are available for studying 1D systems: Use the analytic 1D stack RT script function or use a direct
FDTD simulation.
For more information, see the Transfer matrix RT calulator 156 page.
Solvers 101
FDTD
Associated files
plane_4layer.fsp
plane_4layer.lsf
See also
Analytic solution 156
Simulation setup
The above figure shows the simulation file plane_4layer.fsp. The n = 1:1.5:2.5:1.5 dielectric stack is visible,
along with the plane wave source (white line, 1 um single wavelength) and profile monitors (yellow line). A plane
wave source with Bloch boundary conditions is the typical setup for this type of simulation, which makes the
simulation volume is basically 1D. Each simulation will provide R and T at a single angle. A series of simulations
must be run to calculate R and T vs theta. After opening the fsp file, run the parameter sweep followed by the
plane_4layer.lsf script file to reproduce the following results.
Advantages:
This technique can easily be extended to periodic gratings
Disadvantages:
One simulation is required for each angle
Results
The parameter sweep is set up to run 30 simulations at angles from 0 to 60 degrees. Once the parameter sweep is
complete, the script plots the results from the parameter sweep with the theory. Below you can see the reflection
and transmission for an s-polarized (TM) plane wave.
The results shown in the above figure are good, but can be improved upon. The fsp file and script are setup to use a
10 nm mesh, which gives good results while keeping the simulation time reasonably short. Re-running the
calculation with a 5nm mesh will give much better agreement. To use a 5nm mesh, change the following settings.
In the simulation file, go to the objects tree and edit the following objects
FDTD region: Set the "x span" to 5nm. Set "dx","dy" to 5nm.
In the simulation file, go to the optimization and sweeps window, then
Edit the sweep, and set the number of points to 60. As a result the reflection and transmission plots will contain
more points so they will look smoother.
PML
The simulation region boundary conditions in the y-direction use SCPML with the "steep angle" profile to prevent any
reflections from light incident at steep angles. More information on the PML profile settings can be found at PML
boundary conditions 460 .
within 10 nm. It is interesting to see how sensitive the analytic solution is to variations of 10 nm in the layer
thicknesses.
The figure above shows the same FDTD reflection result as in the previous figure. The other two lines show the
minimum and maximum reflections that will occur by changing the thickness of the two middle layers by +5nm or -
5nm, as calculated with the analytic formula. The results are clearly within the error of the mesh.
Solvers 101
FDTD
Associated files
dipole_2layer.fsp
dipole_2layer.lsf
dipole_4layer.fsp
dipole_4layer.lsf
See also
RT of a 4 layer stack 1782
Simulation setup
The above figure shows the simulation setup of dipole_2layer.fsp. The Air - Glass interface is visible, along
with the dipole source (blue circle) and profile monitor (yellow line). A profile monitor is located just below the
stack. Forward and backward far field projections are calculated from the monitor. The reflection can be calculated
by dividing the backward projection by the forward projection. One simulation per polarization is required.
Advantages:
One simulation gives R and T at all angles
Disadvantages:
This technique can only be used for unpatterned slab, not for gratings
As the stack becomes larger, very wide simulation spans may be required
Results
The script dipole_2layer.lsf will run two simulations, and then calculate the analytic solution. The simulated
and analytic reflection and transmission vs. incident angle are plotted for both polarizations.
Solvers 101
FDTD
Associated files
evanescent.fsp
evanescent.lsf
Simulation setup
The above figure shows a plane wave propagating at 33 degrees through a material with an index of 2. There is a
0.5um air gap between the two high index layers. The source wavelength is 1um.
The built in parameter sweep is used to change the source angle and run one simulation per source angle. As in the
plane wave R and T calculations, the source angle is set in the model. The model then changes both the source
angle and the minimum number of PML layers to match the source angle. For more details, see the section entitled
PML on the Planewave technique page (go to the R and T calculations link directly above).
Analysis
A quick calculation with Snell's law would lead you to believe that nothing will propagate beyond the first interface,
since 33 degrees is past the critical angle of this interface.
n1 sin q1 = n2 sin q 2
2 sin q1 = 1sin( 90)
q1 = 30
However, the evanescent fields extend some distance through the air and can couple into the third layer.
Results
8.1.3.3 Gratings
Please select one of the following topics.
Introduction
This example shows how to calculate the grating orders from a blaze grating. This grating has many grating orders
at each wavelength. In order to capture the signature of the total reflection and transmission, more frequency points
in the monitors are required.
Solvers 101
FDTD
Associated files
grating_blaze.fsp
grating_blaze.lsf
See also
BFAST 590
Gratings 1788
Grating order
transmission 1790
Grating projection
toolbox 150
Broadband Injection
Angles 536
Simulation setup
A blaze grating is shown in the simulation file above. It is composed of a low index (1.4) substrate with a 40nm thick
high index (3.4) coating. The grating angle is 30 degrees. A broadband plane wave source is incident at 15
degrees. We will use the grating order transmission analysis objects described in the Grating order transmission
section to measure the reflection and transmission.
Results
Open grating_blaze.fsp and run the simulation. When it finishes, use the script grating_blaze.lsf to
calculate the reflection and grating orders at a fixed wavelength from the grating. Note that we used BFAST 590
source so all the interested wavelengths have the same incident angle.
Introduction
This example provides example simulations which use the grating order transmission analysis group to calculate the
fraction of power transmitted into each grating order. It also shows how to calculate the number of grating orders
that exist as a function of wavelength. The grating order transmission analysis group is available from the object
library.
Solvers 101
FDTD
Associated files
grating_order_transmission.fsp
grating_order_transmission.lsf
See also
BFAST 590
Grating examples 1788
Grating projection toolbox 150
Grating and far field projection analysis
objects 813
grating 1666 , find 1489 , pinch 1483 script
commands
Simulation setup
Calculating the total transmitted power through a monitor is very easy to do with the transmission function.
However, it is sometimes necessary to calculate the power scattered into a particular grating order of a periodic
structure. This calculation is more challenging, requiring both the grating and transmission functions, plus a
reasonable amount of matrix manipulation. The analysis object also calculates the number of supported grating
orders.
The associated simulation files use the grating order transmission analysis object to do these calculations. You can
insert this object from the object library in the far field projections section.
Results
To reproduce these results, open grating_order_transmission.fsp, then run
grating_order_transmission.lsf. The script will run the simulation, then run the analysis object scripts and
create some final plots, as shown below. Note that we used BFAST 590 source so all the interested wavelengths
have the same incident angle.
N
ot
ic
e
th
at
th
e
-Z
di
re
ct
io
n
(r
efl
e
ct
io
n)
s
u
p
p
or
ts
m
or
e
or
d
er
s.
T
hi
s
is
d
u
e
to
th
e
hi
g
h
er
in
d
e
x
of
th
e
s
u
b
st
ra
te
.
Al
s
o
n
ot
ic
e
th
at
m
or
e
gr
at
in
g
or
d
er
s
ar
e
s
u
p
p
or
te
d
at
s
h
or
te
r
w
av
el
e
n
gt
h
s.
T
ot
al
tr
a
n
s
m
is
si
o
n
th
ro
u
g
h
th
e
m
o
ni
to
r,
a
n
d
th
e
tr
a
n
s
m
is
si
o
n
to
th
e
(0
,0
)
gr
at
in
g
or
d
er
.
N
ot
ic
e
th
at
w
h
e
n
th
er
e
is
o
nl
y
o
n
e
s
u
p
p
or
te
d
gr
at
in
g
or
d
er
,
T
_(
to
ta
l)
is
e
q
u
al
to
T
_(
0,
0)
Pr
o
p
a
g
at
io
n
di
re
ct
io
n
of
th
e
(0
,0
)
gr
at
in
g
or
d
er
,
in
te
r
m
s
of
th
et
a,
p
hi
.
T
h
e
pr
o
p
a
g
at
io
n
di
re
ct
io
n
a
n
d
st
re
n
gt
h
of
th
e
gr
at
in
g
or
d
er
s
at
0.
8
u
m
.
Introduction
High-contrast polarization control devices composed of sub-wavelength metal gratings - nanowire grid polarizers - are
replacing bulk optical elements. Nanowire grid polarizers offer improved extinction ratio contrast, minimal absorption
to address high brightness illumination, and compact form factors to facilitate mass manufacture and integration
within small optical assemblies. However, nanowire grid polarizers are challenging components to design,
especially if manufacturing imperfections are taken into account. In this application example, we show how FDTD
Solutions can be used to maximize the contrast ratio of a nanowire grid polarizer at any angle, while maintaining
high transmission.
Solvers 101
FDTD
Associated files
mwp.fsp
mwp_spectrum.lsf
mwp_dutysweep.lsf
mwp_45deg.lsf
See also
Gratings 1788
References
Ahn et al,. "Fabrication of a 50 nm half-pitch Schematic diagram showing light incident on the top surface of the
wire grid polarizer using nanoimprint nanowire grid polarizer.
lithography", Nanotechnology, 16, 18741877
(2005)
Simulation setup
We will calculate the contrast ratio of a nanowire grid polarizer made of a glass substrate (n=1.4) with an aluminium
nanowire grating of linewidth W and thickness H. The source illuminates the top surface of the grating polarizer. We
anticipate that the polarizer should block S-polarized light, i.e. when the electric field is polarized tangential to the
grating lines as shown in the figure above.
In the first analysis, we will calculate the contrast ratio versus pitch for a 50% duty cycle grating with thickness of
H=140nm and normal incidence light. The pitch will be varied between 40nm and 240nm (corresponding to a variation
in linewidth of W=20nm to W=120nm). We will plot the results at 3 different wavelengths (=450nm, =550nm and
=650nm).
In the second stage of the analysis, we will calculate calculate the contrast ratio at 550nm and a grating pitch of
140nm as a function of the duty cycle, again with light at normal incidence.
The third investigation involves illuminating the nanowire grid polarizer with non-normal incidence light. Efficiency of
the previous structure (550nm wavelength, 140nm pitch) with a 50% duty cycle is measured at a 45 degree
incidence angle. Field amplitude and phase plots are also generated.
This plot
apparently
shows that the
contrast ratio
varies over 7
orders of
magnitude and
has a maximum
at a duty cycle
of 0.9. However,
this curve is
misleading
because the
large contrast
ratios are in fact
due to a small S
transmission.
Transmission of
S-polarized light
for the
aluminium
nanowire grid
polarizer as a
function of the
grating duty
cycle.
This S
transmission is
numerically
simulated to be
approximately
2e10^-6 for a
duty cycle of
50% and
decreases to
10^-12 for larger
duty cycles. For
manufactured
devices, S
transmissions
on the order of
10^-3 are more
realistic.
Transmission of
P-polarized light
for the
aluminium
nanowire grid
polarizer as a
function of the
grating duty
cycle.
This curve
shows that the
transmission of
P-polarized light
decreases as
the duty cycle
increases.
Based on these
results, an
aluminum
grating with a
duty cycle of
50% has a
transmission of
about 85%.
With an s-
polarized
transmission of
2e10^-6 , an
ideal 50% duty-
cycle aluminum
grating can
achieve a
contrast ratio of
approximately
4e10^6.
The above results demonstrate that contrast ratios on the order of 4e10^6 can be obtained. However, such large
contrast ratios are difficult to achieve in practice due to manufacturing imperfections.
Non-normal incidence
Open mwp.fsp, and run mwp_45deg.lsf. The script will first modify the simulation parameters in the following
way:
The boundary conditions are changed from periodic to Bloch, which are required for non-normal incidence
illumination.
The source is rotated by 45 degrees
The simulation volume along the Y-axis is increased to make the fields easier to visualize.
The source polarization is set to P (or TE)
The aluminum grating wiregrid polarizer has a TE transmission of approximately 85% for a normally-incident plane
wave. The transmission is mostly unchanged for a 45 degree incidence.
Introduction
We will calculate the reflectivity of a simple dielectric grating described in Cunningham et al. This grating is
designed to create a narrow resonant reflectivity line that can be used in biosensor applications.
Solvers 101
FDTD
In this topic
Introduction 1801
Simulation setup 1802
Results 1802
Associated files
grating_silicon_nitride.fsp
grating_silicon_nitride.lsf
See also
Gratings 1788
Related publications
Cunningham et al,. "A plastic colorimetric
resonant optical biosensor for multiparallel
detection of label-free biochemical
interactions", Sensors and Actuators, B, 85,
219-226 (2002)
Simulation setup
The grating is made from a thin layer (120 nm) of Silicon Nitride deposited on a 200 nm thick grating of epoxy. The
period of the grating is 550 nm and we will consider a wavelength range of 750 nm to 900 nm. This grating is
designed to create a narrow resonant reflectivity line that can be used in biosensor applications.
As a first approach, we will use a dielectric index of 2.05 for the Silicon Nitride and and 1.5 for the epoxy. The grating
itself is immersed in water, which can be set by defining the background index for the simulation to be 1.333. We
will ignore any material dispersion or loss.
In the setup, we have 3 point time monitors to verify that the field decays by the end of the simulation. We use 2
power monitors with 2000 frequency points to measure the transmission and reflection from 750 to 900 nm. We use
a mesh accuracy of 4. However, as with many periodic structures, a mesh override region is required at the grating.
This is used only in the x direction to ensure the structures symmetry.
It is also worth noting that the automatic shutoff is set to 10e-9 for this simulation. This structure has a sharp
resonance that will last a long time, but contain only a very small fraction of the total energy that was injected into
the simulation. The default automatic shutoff setting would terminate the simulation too early, leading to inaccurate
power measurements.
Results
Step 1
Run the simulation. Note that the polarization of the simulation is TE, meaning that the electric field (blue arrows) is
normal to the lines of the grating. After running the simulation, look at the reflection time signal in the grating, and
zoom in, it should look like the following. We can see that the field has decayed and that the simulation has run long
enough, so the data is valid.
Step 2
Run the script file grating_silicon_nitride.lsf. This file will calculate and plot the transmission (T) and
reflection (R) and plot the results as a function of wavelength. It will also plot R+T to verify that R+T=1. The maximum
error in R+T=1 is only 0.9% across the entire wavelength range.
The reflection spectrum only is also plotted, as shown below. The figure is nearly identical to the experimental
results shown in Figure 3 of Cunningham et al. The small discrepancies are due to any differences in the actual
material refractive indices and the values used in the simulation, as well as any manufacturing imperfections in
device fabrication.
Step 3
We can rerun the simulation with TM polarization (electric field tangential to the grating lines) and obtain this result.
For this polarization, we don't see the narrow resonance.
Application examples
Photonic Crystal Cavity Tutorial 1759
Other resources
Webinar - Cavities and resonators video
Objective
This example shows how to correct the amplitude of field data recorded by frequency domain monitors when the
simulation does not run long enough for the fields to fully decay.
Solvers 101
FDTD
Associated files
cavity_mode_amplitude.fsp
cavity_mode_amplitude.lsf
See also
Cavities and resonators 1804
Quality factor calculations 1807
NOTE:
In most cases, it's not necessary to calculate the absolute amplitude of the mode profile. The Quality (Q) factor
and relative mode profile are usually the quantities of interest.
If your FDTD source is representative of the physical source, you may want to know the actual amplitude of the
mode profile. This page shows how to correct the mode profile amplitude for high Q cavities where it's not practical
to run the simulation until the fields decay to zero.
The reason that the amplitude will be incorrect is that the simulation ends before the cavity fields have decayed to
zero, as shown in the following figure. The frequency monitor field normalization is only correct when the entire time
signal is considered. This effect is very similar to configuring the monitor to use End Apodization.
Figure 1
It's possible to correct the field amplitude's simply by re-scaling the fields. The field amplitude is proportional to the
area under the curve of the above figure. Therefore, we need to correct the fields by the fraction of the area that was
missed because the simulation stopped too early. The field scale factor is a function of the resonant frequency, the
simulation end time, and the Quality factor of the mode:
1
g=
- wt END
2Q
1- e
r r
E = gEsim
The file cavity_mode_amplitude.fsp contains an analysis group that does this calculation. The group "mode
profile and Q" contains a frequency domain field monitor and a Q analysis group. The Q analysis group is used to
calculate the Q-factor of the mode. Once the Q is known, the group rescales the field data from the field monitor by
gamma, the field scale factor.
To see how it works, run the script file name cavity_mode_amplitude.lsf. The script will run two simulations:
one that is 500fs long and and other that is 3000fs long. The script will plot |E(t)|^2, |E(x,y)|^2 directly from the
monitor, and |E(x,y)|^2 after it has been rescaled.
Figure 2 Figure 5
Figure 3 Figure 6
Field profile from the the analysis group,
after the field data has been rescaled.
Objective
This page describes how to calculate the quality factor (Q) of resonance peaks in a resonant cavity.
There are two classes of cavities for Q factor calculations, low Q cavities and high Q cavities. The 2D example file
includes both the standard (high) Q analysis object, and the low Q analysis object. The 3D example only includes
the standard analysis object because the quality factor of this cavity is too high for the low Q object. Both
simulation files contain a cavity that supports two modes, and a Q analysis group to compute the Q factor. The high
and low Q analysis groups can also be inserted into your simulation from the object library in the resonators section.
Solvers 101
FDTD
In this topic
Low Q cavities 1808
Hi Q cavities 1809
Associated files
quality_factor_2D.fsp
quality_factor_3D.fsp
See also
Cavities and resonators 1804
Low Q cavities
A cavity is called a low Q cavity when the electromagnetic fields decay completely from the simulation in a time that
can be simulated reasonably by FDTD. In this case, the quality factor can be determined from the Fourier transform
of the field by finding the resonance frequencies of the signal and measuring the full width half maximum (FWHM) of
the resonant peaks. We can then use Q = fR /Df where fR is the resonant frequency and Df is the FWHM.
Example:
The low Q analysis group contained in the quality_factor_2D.fsp simulation uses this method to find the Q
factor of resonance frequencies. Run the simulation file. Then choose to edit the low Q analysis object and press the
RUN ANALYSIS button. The analysis script output will contain the location of the resonance frequencies and their
corresponding Q factors.
Resonance 1:
frequency = 230.727THz, or 1299.34 nm
Q = 156.883 +/- 0.82616
Resonance 2:
frequency = 205.814THz, or 1456.62 nm
Q = 77.498 +/- 0.226738
The analysis script also creates two plots. The plot shown below to the left contains one of the field components
(Hz). You can see that the fields have decayed by the end of the simulation time. The second plot shows the
location and relative amplitude of the resonance peaks.
Note that the initial transients of the source are neglected by setting the "start time" for the time monitors to 200fs.
The "start time" for the time monitors is the time at which the monitors begin recording data. This setting can be
changed in the user properties for the analysis group. Also, note that in the analysis group, it is possible to use one
time monitor or an array of time monitors for the Q factor calculation. The problem with using one time monitor is
that if the one monitor is placed at or near a null of the cavity mode, then due to the fact that the field intensity is
very low, the Q factor can have a large uncertainty (if it is even possible to obtain a meaningful result).
The quality_factor_3D.fsp simulation file contains a 3D version of the low Q analysis object. This object can
also be added from the object library.
High Q cavities
A cavity is considered to be a high Q cavity when the electromagnetic fields cannot completely decay from the
simulation in a time that can be simulated reasonably by FDTD. In this case, we cannot determine Q from the
frequency spectrum because the FWHM of each resonance in the spectrum is limited by the time of simulation,
Tsim , by FWHM ~ 1/Tsim . Instead, the quality factor should be determined by the slope of the envelope of the
decaying signal using the formula
- 2 pf R log 10 (e)
Q=
2m
where fR is the resonant frequency of the mode, and m is the slope of the decay in SI units.
max frequencies occurs at = r + a and = r - a . Therefore, FWHM = 2a . Substituting this value into the
original Q formula and solving for a gives
wr
a=
2Q
Now that we know how to relate a to Q, we must determine how the slope of the time signal decay is related to Q.
We must take the log of the time signal to make the envelope a linear function.
- wr t
log 10 (| E (t ) |) = log 10 (e) = mt
2Q
where m is the slope of the log of the time signal envelope. Solving for Q, we get
- wr log 10 (e)
Q=
2m .
Example:
By opening the edit dialog box for the Q factor analysis object located in quality_factor_3D.fsp, you can
see that the analysis object solves these problems by
accurately calculating the envelope of the time-domain field signal
isolating each resonance peak in the frequency domain using a Gaussian filter, and then taking the inverse Fourier
transform to calculate the time decay separately for each peak. The slope of the time decay is then used to
calculate the Q factor and obtain an error estimate.
Next, run the simulation. When the simulation is complete, choose to edit the analysis object and press RUN
ANALYSIS button. The analysis script output will contain the location of the resonance frequencies and their
corresponding Q factors.
Resonance 1:
frequency = 178.786THz, or 1676.82 nm
Q = 306.279 +/- 1.41318
Resonance 2:
frequency = 227.307THz, or 1318.89 nm
Q = 274.874 +/- 4.50921
The analysis object also produces the following plots (by modifying make_plots=0 to make_plots=1 before running
the analysis).
The time decay of the field components and their The spectrum and the Gaussian filters used to isolate
envelopes. Note that not all the field components have the resonant peaks.
decayed by the end of the simulation time. The image
shown at the top of this topic shows a close-up of the
data for the field drawn in red (Ey).
The spectrum of resonances. Each resonant peak The time decay of the sum of squared field components
appears in a different color. on a logarithmic scale. The slope of these lines is used
in the Q factor calculation.
t ( w ) = h( w ) i ( w )
where t is the response (for example, the electric field at a point in space), i is the source signal (for example, the
dipole moment) and h is the transfer function that relates both quantities for each angular frequency w. The quantity
h is an intrinsic property of the resonator and is the impulse response of the system, ie the response when i(w) = 1,
or i(t) is a delta function.
When calculating quality factors, we are interested in the case where h contains a single pole response
r
h( w ) = + b( w )
i (w - w r ) - a
where b(w) are additional contributions to h, typically representing much broader features in the frequency domain
that decay very rapidly in the time domain. We know a is related to Q by
wr
a=
2Q
Low Q cavities
The ideal method for calculating Q is to calculate h(w) and extract Q. This is what we do when Q is small enough
that we can run the simulation until the fields have decayed. We then calculate h(w) by
h( w ) = t ( w ) / i ( w )
In FDTD Solutions, with the cw normalization turned on, we are calculating h(w) and therefore obtain the intrinsic
quality factor, independent of the type of the source excitation pulse or spectrum. Repeating Q measurements with
different lengths of source pulses, or even with extremely complicated source pulses will not change the function
h(w) measured except for some numerical error which can become large if i(w) is very small near the resonant
frequency.
High Q cavities
When working with high Q cavities, we want to find a method that is more efficient to calculate Q because it is
impractical to run FDTD simulations long enough to calculate h(w) correctly. As a result, we recognize that if and
only if the source pulse is a delta function, we have
t ( w ) = h( w )
t (t ) = r exp (- at + i wr t )u (t )
We can therefore extract the value of Q by measuring a from the exponential decay in the time domain. It is critical
to note that we only have exponential decay of the time signal if the source pulse is a delta function. If we use any
other function to excite the the resonator, we cannot use this method to extract the quality factor as we cannot
disentangle the contribution of the source pulse and the resonator itself without running the simulation until the fields
have completely decayed. In practice, we cannot use a delta function for the source, but we can make the
approximation that the source is a delta function as long as the function i(w) is nearly constant over the bandwidth of
the resonator. As a result, it is not relevant to try and normalize away the source spectrum as we do in the low Q
case, because we must assume that the source is approximately a delta function to perform this calculation. Using
other source spectra will result in time domain fields that do not necessarily decay exponentially.
By using a near delta function as the source input, we can assume that the time domain fields will decay
exponentially, and we can try to extract the quality factor from that decay. In reality, h(w) is more complex than a
single pole response, due to the contributions of b(w), and we must wait for the other contributions of h to disappear
in the time before we can measure the decay rate. Fortunately, the contributions of b(t) generally decay much faster.
For this reason, we must remove some of the early time signal to measure the exponential decay accurately. The
amount of time that must be removed is somewhat problem dependent.
The majority of the calculation in the high Q cavity calculation is associated with extracting the exponential decay
from a time signal of the form
exp (- at ) cos(wr t )
and eliminating the early part of the time signal where h(t) has other terms that make it difficult to extract the decay.
The more advanced parts of the calculation involve extracting several decay rates from several single pole
resonances at different resonant frequencies by doing some filtering in the frequency domain before returning to the
time domain to calculate the decay.
Objective
This page will go through the simulation setup and analysis of results using a 1D multilayer stack cavity device as
an example. There are a broad range of different types of cavities and resonator devices, so the required simulation
setup will be different depending on the device being simulated, and the quantities of interest.
Solvers 101
FDTD
Associated files
high_Q_resonator.fsp
high_Q_resonator.lsf
See also
Quality factor calculations 1807
Introduction
The device in the associated simulation file uses distributed Bragg reflectors (DBRs) that act as mirrors which trap
light in the cavity between them. The script file calculates the theoretical quality factor (Q) of the device, sets up the
simulation structure and mesh override region, runs the simulation, and gets the simulated Q result which is
calculated using the high Q analysis group. The script outputs the theoretical Q and the simulated Q.
The theoretical Q factor for this resonator is approximately 428000 whereas the Q factor achieved by the simulation
is approximately 407000. This agreement (roughly 5% difference) is quite good, given that the performance of these
high Q devices can be extremely sensitive.
Q FDTD: 406864
Q theory: 427854
Note: Detailed information about calculating the analytic reflection/transmission spectrum of a multilayer stack can
be found in the Multilayer stacks 1781 application section.
Simulation setup
Structure
For periodic structures, parameterization of the design makes it simpler to make changes to the device while
reducing the risk of mistakes. In the example, the structure and mesh are automatically set up by the
high_Q_resonator.lsf script, so you can simply change the desired set up parameters (such as the number of
mirror periods) in the script, and the new structure will be set up automatically when the script is run.
Some pre-made structures such as the ring resonator and photonic crystal cavities can be inserted from the object
library.
Simulation region
A simple rule of thumb is to keep PML boundaries at least half a wavelength away from the structures. If the PML
boundaries are too close to the structures they may absorb radiation that would have otherwise remained in the
simulation, and this is an artificial source of loss.
If the device has some periodicity, it is important for the simulation mesh to match the periodicity of the device. If
mesh lines fall at different locations for each period of the structure, each period will be meshed in a slightly different
way, breaking the perfect periodicity required in a high Q system. You can avoid this problem by ensuring there are
an integer number of mesh cells in each period. In the example simulation, the mesh step size in the mesh override
regions is chosen so that there are an integer number of mesh cells per period of the device.
When dx, dy, dz and dt are finite, the dispersion relation on the FDTD mesh is not identical to free space and this
results in grid dispersion errors. The errors due to grid dispersion are commonly negligible, but they build up as light
propagates over many mesh cells, so this can become an issue in high Q resonator simulations. The error due to
grid dispersion can be reduced by using a finer simulation mesh. By reducing the target dx for the mesh override
regions in the example script file by half, the resulting simulated Q is closer to the theoretical Q.
If several modes are supported, you can use symmetry boundary conditions to allow particular modes (while
suppressing others). This is particularly useful when studying systems with degenerate modes. As well when
measuring the Q, if multiple modes are allowed, energy can scatter into other modes and lower the measured Q.
Sources
You can also isolate particular modes by setting the source position and polarization such that it excites some
modes but not others.
You can also override the default source pulse to make it more narrow band. By default, the source will inject a
relatively broadband pulse, that may excite many modes. You can override this behavior to create a narrow band
pulse so fewer modes are excited. To do so, go to the Frequency/Wavelength tab of the source and use the time
domain settings to create a longer, more narrow band pulse. Using extremely narrow pulses may require you to
increase the overall simulation time.
Monitors
The type of monitor that is used will depend on the type of measurement that you want to do. See the calculations
section below for more information about different types of analysis.
In the example file we are interested in measuring the Q of the device and a time monitor in the Q analysis group is
used to record the resonant fields over time. The placement of the monitor is inside the cavity between the mirrors
since this is where the resonant fields will be strongest. Several time monitors can be used and the data from each
monitor averaged so that the fields from the resonance will be recorded even if some of the monitors happen to be
located in a node position.
Calculations
The type of analysis that is performed depends on what quantities you would like to extract from the simulation.
Methods for calculating some commonly measured quantities are discussed below.
Resonant frequencies
Resonant frequencies of the device can be found by using time monitors to record the resonant fields over time, then
plotting the spectrum of the time monitor results (this is the Fourier transformed time signal) will result in peaks at
the resonant frequencies. The findpeaks script function can be used to locate the location of the peaks in an array.
Mode profiles
To plot mode profiles of a structure, you need to first isolate the mode of interest. A frequency domain power or
profile monitor will provide the resulting mode profile plot.
To isolate a mode of interest, you may need to use symmetry boundary conditions especially when there are
degenerate modes of the structure. You will also need to plot the results at the resonant frequency of the mode.
The 3D photonic crystal cavity analysis 1841 example is an example where this is done.
When simulating high Q cavities, it is not possible to measure Q in this way because it would require running the
simulation until fields decay, which is not practical. Instead, we use high Q analysis which uses an equivalent time
domain technique (described in the High Q Cavities section of Quality factor calculations 1807 ).
The object library contains high and low Q factor analysis groups that can be used to calculate the Q of your device.
Mode volume
The mode volume of a confined mode can be calculated using different methods. See the page on the mode volume
846 analysis group for information about each method. A mode volume analysis group is available in the Object
library which returns the mode volume calculated using any of the methods discussed.
Purcell factor
The Purcell factor is a measure of the enhancement of the rate of spontaneous emission of a source compared to
3
3 l Q
FP =
the rate in a homogeneous environment. This can be calculated using
4 p 2 n V . For dipole sources in a
resonator, dipolepower(f)/sourcepower(f) is equivalent because the dipolepower script command returns the power
emitted by the dipole source, and the sourcepower script command returns the ideal power emitted by a dipole
source in a homogeneous medium. See the Purcell factor 1816 example for more information.
Scattering parameters
The scattering parameters of the device can be calculated in order to characterize the device so that it can be
simulated using INTERCONNECT. See the ring resonator getting started tutorial for an example where this is done.
For high Q cavities/resonators that take a long time to simulate in FDTD, you can characterize them once using
FDTD and simulate the device quickly using interconnect.
Objective
In this example, we determine the resonant frequencies plot the first and second order whispering gallery modes
supported by a GaN microrod.
Solvers 101
FDTD
Associated files
cavity_whispering_gallery.fsp
See also
3D PC cavity modes 1821
Apodization 660
Correcting field profile amplitudes 1805
References
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38
Introduction
Whispering gallery modes occur when light is trapped in a sphere or disk by total internal reflection. These modes
can have high Q and low mode volume. Applications of these structures include microlasers and optical switches.In
this example we are interested in finding the first and second order whispering gallery modes of a GaN cylinder,
reproducing the resulting field profile from the reference paper by Tamboli et al. (see the References section above).
Here, the resonances of the structure are expected at 418 and 428 nm wavelengths.
Method
To start with, we can locate the resonant frequencies of the structure by running an initial simulation using a dipole
source and time monitors. We set the wavelength range injected by the dipole source to be between 400 and 450
nm to excite the resonant frequencies in this range. We have also placed the source near the edge of the structure
since this is where we expect the modal fields to be strong.
To find the resonant frequencies of the structure, we can take the Fourier transform of the field over time from a time
monitor, however, for high Q devices, using a frequency domain monitor with end apodization is preferable since the
fields do not decay fully by the end of the simulation. More information can be found on the apodization 660 page. In
the simulation file, a point monitor is used and is also placed close to the edge of the structure.
After finding the location of the resonant frequencies, we can set the frequency domain profile monitors to record the
field profile at the resonant frequencies by editing the General tab.
Results
The following plot shows the field spectrum from the frequency domain power monitor. Using the findpeaks script
shows that the resonant frequencies are x and y which corresponds to wavelengths of approximately 418.2 nm and
428.6 nm. Using a finer mesh can give more accurate results.
The resulting plots of the magnetic field profile at 418 and 428 nm agree with figure 4 from the reference.
Objective
The calculation method for the Purcell factor is discussed and the Purcell factor for a microdisk resonator is
calculated.
Solvers 101
FDTD
Associated files
cavity_purcell_factor.fsp
See also
dipolepower 1600
sourcepower 1601
Quality factor calculations 1807
The Purcell factor result is equivalent to dividing the power emitted by a dipole source in the environment by the
power emitted by the dipole in a homogeneous environment (bulk material) since the emission rate is proportional to
the local density of optical states (LDOS), and the LDOS is proportional to the power emitted by the source. You
can use the following line of code to verify the result.
purcell_factor=dipolepower(f)/sourcepower(f);
The command dipolepower 1600 returns the power actually radiated in the environment, and sourcepower 1601 returns
the power that would be radiated by a dipole in a homogeneous medium. This ratio of power is equal to the decay
rate enhancement, or Purcell factor (please see Fluorescence enhancement where this approach is used to
calculate the decay rate enhancement of fluorphores near metallic particles and the Novotny, "Principles of Nano-
Optics" reference).
Its important to note that this analysis method depends on having the simulation run until the fields have completely
decayed. As well, the dipolepower command only works if your dipole is in a lossless dielectric medium. If the dipole
is embedded in a dispersive medium then instead of using the dipolepower command, you can get the power emitted
by the source by measuring the power flow out of a small box of monitors surrounding the source. The transmission
box analysis object from the Object library can be added for this purpose.
Another method for measuring the Purcell factor is by using the following formula, however this method is not
preferred because the definition of mode volume will depend on your structure, and the calculation method is
relatively complex compared to the first method:
3
3 l Q
FP =
4p 2 n V
Q is the quality factor and V is the mode volume. See the quality factor calculations 1807 page and mode volume 846
Example
In this example we calculate the Purcell factor of a microdisk resonator structure using the first method of measuring
the emitted power.
The Purcell factor will depend on location and frequency so we first run a preliminary simulation using a broadband
source to determine the resonant frequency and location of the strongest modal fields. For the preliminary
simulation, make sure the broadband source is enabled, and the dipole source is disabled. The time monitor is set
up to start recording fields after 20 fs when the transient fields have decayed so that only resonant fields of the
structure remain. By plotting the spectrum result from the time monitor, we find that the resonant frequency of the
mode is at 714 nm.
Using this information we can set up the profile monitor to record data at 714 nm. The profile monitor is also set up
to use apodization again to exclude the effect of the source.
We then set the dipole source frequency to the resonant frequency and place the dipole in the location where the
modal fields are maximized. With the dipole source enabled, and the broadband source disabled, re-run the
simulation. We find a Purcell factor of about 2354 which is similar to the Purcell factor calculated using the boundary
element method from the reference. Note that we only used one simulation with one dipole orientation to determine
the Purcell factor since this orientation results in the maximum Purcell factor, and the maximum Purcell factor is
what we are looking for. In the case where you want to Purcell factor of an isotropic emitter, you can average the
results from three orthogonal dipole orientations.
Introduction
Waveguide-based photonic microcavities and their associated high quality factor resonances are of increasing
importance for a number of technological applications, including filtering and sensing. An example of these types of
photonic microcavities is a six air-slot microcavity, with the central semiconductor tooth intentionally widened to
introduce a transmission resonance within the stop band of the underlying Bragg structure. This particular photonic
microcavity is designed to be supported by a high index substrate, unlike the alternative air membrane photonic
microcavities.
Solvers 101
FDTD
In this topic
Introduction 1818
Simulation setup 1819
Results 1819
Associated files
waveguide_bragg_microcavity.fsp
waveguide_bragg_analysis.lsf
Related publications
Kleckner, T.C. and Modotto, D. and Locatelli,
A. and Mondia, J.P. and Linden, S. and
Morandotti, R. and De Angelis, C. and
Stanley, C.R. and van Driel, H.M. and
Aitchison, J.S, "Design, fabrication, and
characterization of deep-etched waveguide
gratings," Lightwave Technology 23(11) pp.
3832-3842 (2005)
Simulation setup
The built-in mode solver is used to calculate and launch a waveguide mode into the microcavity.
The microcavity is excited by launching a
TE-polarized guided mode of the input
optical waveguide. The MODE Solutions
mode solver, which is integrated within the
FDTD simulation environment, allows the
end user to easily select the desired
waveguide mode for launch from the
complete set of guided modes. This
waveguide mode is incident upon the
photonic microcavity, and the frequency
response of the microcavity is measured
using field profile simulation monitors.
Results
Use a broadband excitation to locate the cavity resonance.
Measure the CW field enhancement on (top figure) and off (bottom figure) resonance.
Additional resources
PC bandstructure video
Introduction
The goal of this example is to demonstrate how FDTD Solutions may be used to analyze photonic crystal
nanocavities such as the one shown below. This is accomplished by reproducing the results in the paper by Y.
Tang. This paper contains detailed information on the cavity structure as well as experimental and simulated data to
compare against.
Using the techniques described in this example, it is possible to study other PC cavities. Since FDTD Solutions can
simulate arbitrary geometries and materials, it is possible to adapt the methods presented here to study any micro/
nanoscale cavity.
Solvers 101
FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838
Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821
Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38
Summary of results
Using FDTD Solutions, we can calculate the resonant spectra of the cavity createdy by removing the center hole
(H1) or by removing the center hole and the next ring of holes (H2).
For the H1 cavity, we compare using a constant dielectric model with a physically realistic GaAs/AlGaAs material
model, as shown below. The peak spectra correspond well with the published results.
For H2 cavity, we can look at the spectrum to identify the 8 resonances found in the paper. Then use symmetry and
anti-symmetric boundaries to isolate degenerate modes.
Finally, we show how to calculate and plot all the modes of the H2 cavity. For example, the A11 mode is shown
below.
Solvers 101
FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838
Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821
Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38
Structure overview
The structure is formed on a thin GaAs / AlGaAs membrane suspended in air. For the purposes of this analysis,
layer structure is assumed to be 170nm of GaAs sandwiched between 45nm layers of Alx Ga1-x As with x=0.3. Note
that in the publication, the layers are 40nm of AlGaAs and an additional 5nm layers of GaAs, however, the 5nm
layers are not expected to modify the results substantially, and yet would required a finer mesh size. For this
reason, we have simply made the AlGaAs layers 45nm thick instead of 40nm. The total layer thickness is 260nm.
This layer structure is contained in a structure group. This group allows you to use a constant dielectric for all the
layers with a value of n=3.4 (the same as the value used in the simulations of the publication) or, alternatively, to use
experimental data for GaAs from Palik, and a theoretical model for Alx Ga1-x As with x=0.3.
The theoretical model is generated by the script AlGaAs_Adachi.lsf, which saves a text file of values of n and k,
which was then imported into the material database as a new material.
The photonic crystal consists of a triangular lattice of air holes in the membrane. The pitch of the lattice, a, is
366nm. For this example we will consider the case where the radius of the holes is 0.37a = 135.4nm.
The cavity is created using one of the structures from the Components Library. This structure is fully parameterized
and allows the user to select the various parameters such as the pitch, H_number, etc. The material for the holes is
set to etch. The layer structure is compose of 3 rectangles, which are grouped and parameterized as described
previously. Finally, key parameters have been added to the model, as shown below. These parameters are set by
the model and will override any direct settings of the children.
The model and it's children, seen in the Objects The model properties. These values will override any values set
Tree in the children.
The cavity is created by removing either the center hole (H1) or the center hole plus the next ring (H2). This can be
achieved by setting the H_number in the model to 1 or 2. The H1 cavity is shown below.
accuracy for a given mesh size. Setting a small mesh size will increase the calculation time and increase the
accuracy of the result. The approach used here is to start with a coarse mesh to obtain initial results and understand
the physics of the problem and then, if desired, to move to a fine mesh to obtain the final answer. We control the
mesh in the x and y directions by adding a mesh override region and directly setting the value of dx and dy. For the
z direction, we can allow the auto non-uniform meshing to choose an appropriate mesh. Initially, we can set the
mesh accuracy slider of the simulation region to 2, which will control the z mesh. For the x and y meshes, we can
choose a coarse mesh with 10 points per period of the PC (36.6nm grid). Since we are using a triangular lattice, we
set the y mesh cell size to be sqrt(3)/2 times the x grid cell size. This ensures that the FDTD mesh is perfectly
periodic in the y direction and yields better accuracy for a given mesh cell size. This setup is handled by the model
so it is sufficient to choose the "grid points per pitch" property and set it to 10. The model then sets the
corresponding values of dx and dy for you.
Set the simulation time to 2000 fs. The simulation time length will be discussed in the source properties section.
The boundary conditions used for simulating a finite sized object such as the PC cavity are known as the PML
(Perfectly Matched Layer). These boundary conditions absorb incident radiation. The PML boundary condition is the
default when a new simulation area is created. There are 2 key changes that need to be made to the default PML
settings, and these can be done in the Advanced Options of the FDTD Simulation region:
Uncheck the " extend structure through pml" checkbox. For photonic crystals, we can actually get better PML
performance if we allow the PC to extend into the PML. Without this, the last layer of materials at the edge of the
boundary will be automatically extended completely through the PML.
Set the value of "pml kappa" to 5. The pml, in combination with the dispersive materials that we will be using, can
lead to increased numerical instability in the PML. This can be controlled for reasonable simulation times by
increasing the value of PML Kappa.
It is also possible to employ symmetry boundary conditions in cases where the structure itself exhibits symmetry.
Symmetry boundary conditions can reduce computation time, however, the cost is that they will forbid certain
modes from appearing in the results (modes that do not exhibit the same symmetry relation as the boundary
condition). For this PC cavity, there is a plane of symmetry through the center of the slab (z=0 plane). Using a
symmetric boundary condition on this plane will only allow TE modes and eliminate TM modes from the results.
Since this structure has little or no TM bandgap and the cavity modes are expected to be TE, we will use the
symmetric boundary condition on this boundary.
Finally, when studying resonators, it is a good idea to disable to the autoshutoff feature of FDTD Solutions. This is
because a high Q resonator, which traps light over a very small bandwidth, may only trap a small fraction of the
original excitation energy which is broadband. As a result the autoshutoff can trigger too early and cause problems
with our time apodization of monitors. The autoshutoff can be disabled by unchecking the "use early shutoff" in the
Advanced Options tab of the FDTD simulation region.
short pulse of radiation to excite a broad range of frequencies. In order to effectively excite the cavity modes we need
to ensure that the polarization of the dipole sources is similar to the polarization of the modes we wish to excite. In
this case we want to excite TE modes so we will use a vertically (z) polarized magnetic dipole. We also need to
ensure that the dipole sources are placed in locations where the mode profiles do not exhibit nulls. To accomplish
this we use a random set of dipoles over the desired area. If we wanted to excite TM modes we would use vertically
polarized electric dipoles, and we would have to change or z min boundary condition to Anti-Symmetric.
The final step in setting the sources is defining the excitation pulse. This is done by simply selecting the appropriate
wavelength range that we want to study. In this case, we choose 1000nm to 1400nm. We used the global source
properties to do this, to avoid having to make the changes for each dipole individually. Note that each dipole must be
set to use the global source properties, which is not the default.
The simulation time defined in the simulation region properties is 2000fs and much longer than the pulse length. This
is because we want to monitor the fields in the cavity after the pulse has excited modes. Analyzing the fields in the
cavity after the initial pulse will reveal the frequencies of the cavity modes.
Simulation monitors
There is an analysis group of monitors called "resonance finder". Fourier transform analysis of these time signals will
reveal the cavity mode frequencies. This is handled automatically by the analysis script in the group. By default, we
choose to use 8 total time monitors which are spread randomly over a region of the cavity. The extent of these
monitors is set by the model and depends on the H_number chosen for the cavity. This helps us avoid any nulls of
particular modes.
There are also frequency domain profile monitors to capture the modal fields. These monitors are stored in an
analysis group called mode_profiles. This analysis group can find the mode profiles of up to 12 modes. The user
must specify the resonant frequency of the modes and the desired apodization settings. The apodization settings
are critical to finding the right mode profile. For more details on apodization settings, please see the Apodization 660
in the User Guide under Monitors and Analysis Groups.
Solvers 101
FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838
Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821
Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38
H1 cavity
The H1 cavity is formed by removing a single hole from the photonic crystal, as shown in the figure below. This can
Load and run the simulation file Tang_cavity.fsp. Then edit the "resonance finder" object and press the "Run
Analysis" button which will generate the following figures and results.
Plotting the spectrum as a function of normalized units of (a/lambda) is also possible with the script commands
below, which can be pasted into the script prompt, or used to create a new script file:
select("::model");
a = get("a");
mname = "resonance finder";
runanalysis(mname);
f = getdata(mname,"f");
spectrum = getdata(mname,"spectrum");
plot(f*a/c,log10(spectrum),"frequency (a/lambda)","spectrum (a.u., log scale)");
setplot("x min",0.2);
setplot("x max",0.44);
This will generate the following figure
In this example there are a number of peaks present in the result. These peaks correspond to cavity modes and
bandgap edges. Often peaks are observed at the bandgap edges since the modes at these frequencies have a very
low group velocity and do not decay away very quickly. The 2 peaks that correspond to the cavity modes appear at
approximately 0.31 and 0.37, in reasonable agreement with the results for the first and second order modes in the Y.
Tang paper, which were also calculated assuming a constant permittivity for the slab.
Note that we can rerun the simulation with using a GaAs and AlGaAs model for the materials. This can be
accomplished by setting the property "use constant dielectric" of the "layer structure" group to 0. The figure below
compares the results.
We can see that the spectra agree well at lower frequencies but there is a shift at higher frequencies. This shift
makes sense when we consider that the GaAs makes up 170nm of the 260nm layer and has in index higher than
3.4 at higher frequencies, as shown below.
In the remainder of the example, we will use a constant dielectric model. This should give the best agreement with
the simulated results of Tang et al., however the dispersive model should give better agreement with the
experimental results.
Next steps
To resolve the mode profiles of the cavity modes we can adjust the frequency domain profile monitor settings
(center frequency and apodization) to calculate the mode profiles of these resonances.
To learn more about the symmetries of the modes and look at mode profiles of degenerate modes, we can apply
various combinations of symmetric and anti-symmetric boundary conditions to the x=0 and y=0 planes and repeat
the simulation.
To gain a highly accurate result, we can repeat the simulation with a finer grid size. It may also be useful to
investigate any effects of moving the PML boundaries further from/closer to the cavity.
We will demonstrate most of these steps in the next section when we look for H2 cavity modes.
Solvers 101
FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838
Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821
Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38
H2 cavity setup
To study the H2 we simply need to change the H_number in the model to 2.
First results
After running the simulation, the following script can be used to plot the spectrum in normalized frequency units of
(a/lambda):
select("::model");
a = get("a");
mname = "resonance finder";
runanalysis(mname);
f = getdata(mname,"f");
spectrum = getdata(mname,"spectrum");
plot(f*a/c,log10(spectrum),"frequency (a/lambda)","spectrum (a.u., log scale)");
setplot("x min",0.27);
setplot("x max",0.36);
Looking at these results we can immediately see that there are 8 peaks in the frequency range of interest (we have
restricted to looking at the approximate frequency range where experimental results exist). The frequencies of the
peaks are within a few percent of the experimental results, although it is not immediately obvious which peak in the
simulated results necessarily matches up with each experimental peak. We also have an extra peak in the
simulated results that is not identified in the experimental data. In general the agreement is quite good for a first
attempt.
We can also see that two of the peaks appear to be split - this is likely because these correspond to theoretically
degenerate peaks where the degeneracy is broken by the cartesian simulation mesh. On a triangular lattice, modes
can be degenerate based on a 60 degree lattice symmetry. The cartesian mesh can artificially break this symmetry,
and this effect will be more apparent on a coarse mesh. We can rerun the simulation on a finer mesh by
Setting the "grid points per pitch" property of the model to 20 instead of 10. This will halve the size of dx and dy.
Increasing the mesh accuracy slider of the FDTD simulation region to 4 instead of 2.
If we rerun the simulation (which now takes significantly longer), we can compare the results on a fine and a coarse
mesh, shown below. We see that there is reasonable agreement between the 2 results, with a frequency shift that
generally becomes larger at higher frequency (shorter wavelength), which is expected. We also see that the splitting
of the peaks disappears with a finer mesh. However, the coarse mesh is surprisingly accurate, especially when
considering that, at a wavelength of 1000nm, lambda0/(n*dx) ~ 8. This is partly a consequence of using Lumerical's
conformal mesh technology which makes it possible to obtain good results at coarser mesh sizes. For the
remainder of this example, we will continue to work at a coarse mesh. For publication quality results, we should
repeat several more simulations to ensure that the results have converged to within our tolerances.
Detailed analysis
To understand the problem further, we are going to use symmetry and anti-symmetry to classify the modes. We are
also going to use our frequency domain profile monitors to calculate the mode profiles. The first step is to add the
frequency domain power monitors and adjust their frequency and apodization settings.
Apodization. The simulation runs for 2000fs. We should choose full apodization, a time center of 1000fs, and a
time width of 200fs. This means that the FHWM of the apodization spectrum will be 4*log(2)/(2*pi*200fs) ~ 2 THz.
Choosing this apodization means that peaks should be separated by more than 2THz, and that we will measure
the correct mode profile as long as we choose a frequency for our monitor within about 2THz of the correct peak.
Plotting the spectrum in un-normalized units, we can see that this should not be a problem. For more details on
apodization, please see the Apodization 660 in the User Guide under Monitors and Analysis Groups.
Frequency settings. We want to add 8 monitors with frequencies between 220 and 300 THz. In reality, we will add
9 monitors to account for the artificial double peak at 276 THz.
These monitors can be added by hand, but the simulation contains an analysis group called mode_profiles that is
designed to add up to 12 frequency monitors in the x-y plane. This makes it easy to adjust the apodization settings
for all monitors. To simplify calculating the 9 resonant frequencies, the script file
Tang_cavity_setup_profile_monitors.lsf will calculate the 9 resonances within the desired bandwidth
and set the frequencies of the mode_profile analysis group accordingly. The resonant frequencies must be reset
any time there are changes to the mesh accuracy, material settings or any other settings that could cause the
resonant peaks to shift.
Mode Symmetry
The next step is to consider the symmetry of the modes. We will do so by repeating the simulation 4 times using
the different combinations of symmetric and anti-symmetric boundary conditions on the x=0 and y=0 planes of
symmetry. Each of these simulations take ~1/4 of the time to run as the full simulation. This can be accomplished
using the "sweep symmetry" object included with this example. This object can be found in the Optimization and
Sweeps window.
Editing the object shows that it is configured to run 4 parameter sweeps, and each time it will apply a different
symmetry condition to the min x and min y boundaries.
After running the parameter sweep object, the following lines of script will plot all the spectra. These lines are also
saved in the file Tang_cavity_symmetry.lsf.
select("::model");
a = get("a");
The figure below shows the resulting plot. The legend indicates if no symmetry was used, or when symmetry was
used at the x min/y min boundary. For example Symmetric/Anti-Symmetric means that the x min boundary
condition was Symmetric, while y min was Anti-Symmetric. In general the results show that certain peaks are
present with only one combination of symmetry boundaries (non-degenerate mode) while other peaks show up for
multiple combinations of symmetry boundaries (degenerate modes). Each peak in the data figure below is marked
with either a "D"or a "N" to indicate a degenerate or non-degenerate mode.
We can now refer back to the experimental results presented in the Y. Tang paper and identify the simulated modes
with the experimental modes. The following table lists the mode frequencies from the Y. Tang paper along with their
degeneracy as determined by the line width/polarization analysis. It is now easy to see which modes in the
simulated data correspond to the experimental data. The results are summarized in the table below.
8 D NA 0.354
The results in the preceding table show that the 8th peak in the simulated data was a degenerate mode that was
slightly higher in frequency than the quantum dots could excite in the experiment. Knowing that this mode is there,
you can actually see a very small bump in the experimental data around 0.352 that might correspond to this mode.
The simulation data is in very good agreement with the experiment. The worst case difference in model versus
experiment is ~3.5%, which is consistent with the worst case difference in the plane wave model (as compared to
experiment). The average difference in experimental versus simulated mode frequencies is less than 2%. This is
quite good agreement for the simple model that we have used. The results could certainly be improved by using a
finer mesh, using more realistic material models, and making sure that the simulated structure dimensions is in
agreement with the experimentally fabricated device, for example, by defining the structure using an SEM import.
Solvers 101
FDTD
In this topic
Introduction 1821
Simulation setup 1824
Results - H1 cavity 1828
Results - H2 cavity 1833
Results - H2 cavity mode profile 1838
Associated files
pc_3D_cavity.zip
See also
Photonic Crystals 1821
Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov,
V. Oktyabrsky, S., Characterization of 2D-
photonic crystal nanocavities by polarization-
dependent photoluminescence, 5th IEEE
Conference on Nanotechnology, July 2005,
vol. 1, pp 35-38
In addition to collecting the spectrum for each symmetry setting, the parameter sweep object also collected a matrix
of |E|2. In each simulation, this matrix is created by the mode_profiles analysis group. The parameter sweeps
collates all of this data into a single matrix. At the end of the sweep, we have a variable called E2 which is a 4D
matrix, of size length(x) X length(y) X 9 X 4. The first 2 dimensions are the x and y axes in the x-y plane. The third
dimension corresponds to the 9 resonant frequencies collected, and the final dimension is the 4 values of parameter
sweep that we ran, corresponding to the 4 possible symmetry/anti-symmetry combinations.
The script file plot_modes.lsf gets the 4D matrix E2. It then interpolates onto a finer mesh, and collects some
structure outline results from the index monitor to create a higher resolution matrix for better imaging of the results.
It then plots different results by choosing specific resonant frequencies, and specific symmetry/anit-symmetry
conditions. Each figure is automatically exported to a jpg file. The results are shown below.
Degenerate modes
E11
E12
E13
E14
Non-degenerate modes
A11
A12
A2
B2
Unknown
The mode profiles presented here agree very well with those presented in the Y. Tang paper that were calculated
using a plane wave model.
Introduction
The goal of this example is to demonstrate how the varFDTD solver in MODE Solutions may be used to analyze
photonic crystal nanocavities such as the one shown below. This is accomplished by reproducing the results in the
paper by Y. Tang. This paper contains detailed information on the cavity structure as well as experimental and
simulated data to compare against.
Solvers 101
varFDTD
Associated files
cavities_3Dpcm.lms
See also
PC Micro Cavity Tutorial (FDTD) 1759
Related publications
Tang, Y. Mintairov, A.M. Merz, J.L. Tokranov, V.
Oktyabrsky, S., Characterization of 2D-photonic crystal
nanocavities by polarization-dependent
photoluminescence, 5th IEEE Conference on
Nanotechnology, July 2005, vol. 1, pp 35-38
Setup
The completed simulation file can be downloaded from the above link. See the FDTD Solutions example 1821 for an in
depth discussion on the optimal way to setup the simulation. Overall, the setup of this simulation in MODE
Solutions is very similar to FDTD Solutions. The structures can be copied directly from the FDTD Solutions example
file. The simulation region, sources and monitors should be setup in a similar way. Of course, while the setup is
very similar, a few differences exist:
- Propagator object - Effective index tab: We will use the default settings, including the Narrowband option, which
will neglect any slab dispersion. For improved accuracy, you can try using the Broadband option.
Results
The simulation is very quick and should be finished in a few seconds. Next, run the Qanalysis object to find the
resonant frequencies. This involves a large number of fft's and will take a couple of minutes. The following
commands can be used to output the results to the script prompt. The Qanalysis object can also be used to plot
the spectrum (and filters used for the calculation).
runanalysis;
Q = getresult("Qanalysis","Q");
?Q.f/1e12;
?Q.Q;
result:
192.376
207.302
197.875
result:
202.889 293.017 237.532
The amplitude of each resonance is not very meaningful, as it depends on the position of the sources used to excite
the system and the position of the time monitors used to measure the response.
From the calculated resonant frequencies, we can set up two profile monitors in order to obtain their profiles and
each monitor can monitor two frequencies. After re-running and averaging the 3 analysis groups, the results are
summarized as below
8.1.3.5.2 Bandstructure
Introduction
This topic provides a number of bandstructure calculation examples for different lattice types. (For layered structures
with no patterning, one can also use the technique described in Slab mode analysis of a OLED layer structure 2711 to
obtain the dispersion relation.)
In this topic
Simulation Methodology 1844
Square 2D 1848
Triangular 2D 1850
Square 3D 1851
FCC 3D 1852
Planar 3D 1853
Planar 3D Hex 1854
BCC 3D 1855
Waveguide 3D 1856
Magneto-Optical waveguide 1859
Background
This example assumes that you are familiar with the concepts of bandstructure, Brillouin zones and Bloch's
theorem.
We intend to study structures that are periodic in at least one dimension. For simplicity, consider a structure
periodic in the x direction, with period a. Bloch's theorem tells us that the modes of a periodic structure can be
written as
Ek ( x) = exp( ikx)uk ( x)
where u(x) is a periodic function of x, with period a. This means that u(x+a)=u(x). Another way to write Bloch's
theorem is that
Ek ( x + a ) = exp( ika) Ek ( x)
This defines Bloch boundary conditions in one dimension and this condition can be generalized to two or three
dimensions in a straightforward way. Bloch boundary conditions are used in FDTD Solutions to calculate the
properties of an infinite periodic structure by simulating only one unit cell. The photonic bandstructure is calculated
by determining the angular frequencies, wn(k), as a function of wave vector k for all the Bloch modes in a given
En , k ( w , r )
frequency range. Also, the spatial field information for a particular Bloch mode, in two and three
dimensions can also be determined.
Simulation Setup
In the following example files, the variables used in the simulation including the period of the structure, the
apodization parameters, and bloch vectors (k vectors) are set using the 'model' analysis groups 393 setup script. You
can modify the values of these parameters by editing the 'model' group variables shown below.
When setting up your own simulations using the bandstructure analysis group (available from the Object Library),
you can use the 'model' analysis group in a similar fashion. This will make it easier to change the value for each
parameter since this all groups that use that parameter in their setup or analysis will be updated automatically.
Structure
It is only necessary to simulate one unit cell of the structure for bandstructure calculations. Non-rectangular lattices
(i.e. triangular, FCC) are an exception. In such cases, it is necessary to include multiple unit cells to create a
structure that is periodic in the X,Y,Z direction since the FDTD simulation region is always rectangular. For example,
it is necessary to include two unit cells in the simulation for triangular lattices, and the FCC lattice requires 4 unit
cells.
Simulation region
Bloch boundary conditions should be used at each boundary where the structure is periodic. Each simulation will
give the band frequencies for a particular bloch vector. The bloch vector, k, is a property of the Bloch boundary
conditions.
For non-rectangular lattices, the mesh should be adjusted so each unit cell included in the simulation region is
meshed in exactly the same way (ie, the mesh lines fall at the same positions relative to the structure for each unit
cell).
We can also use symmetry in the simulation region boundary conditions in order to restrict the possible modes that
can exist to isolate bands of interest.
In the case of planar structures that are periodic in two dimensions but finite in the third dimension, we use PML
boundaries in the finite-direction and we typically leave a distance of half of the longest wavelength of the source
between the structure and PML boundaries to prevent any artificial loss due to coupling between the evanescent
fields of the structure and the PML material.
Sources
The field profile of the source is not particularly important in bandstructure simulations. The goal is simply to create a
source capable of exciting all modes of interest for the device. A number of randomly oriented and randomly
distributed dipole sources is the most convenient way to do this. Using several dipoles ensures that all modes will
be excited, even if one dipole is located at a node. It is also possible to set the dipole orientations to only excite
certain modes in order to isolate bands of interest.
For structures with non-rectangular lattices, calculating bandstructure is slightly more complex than for rectangular
lattices because the simulation region will necessarily include multiple unit cells. To avoid problems with artificial
zone folding, there must be matching dipole sources in each unit cell. The matching dipoles must be in exactly the
same position within each unit cell. The dipole phase must also be adjusted according to the following formula:
r r
D q = - 180
p k Dr
where
= phase offset from reference dipole
r
k = simulation wave vector
r
r = position offset from reference dipole
The Object library contains a dipole cloud object which automatically sets up the correct dipole offsets for various
lattice types. This can be inserted from the Analysis -> Bandstructure category in the Object library.
Monitors
After the dipole sources excite the system, the simulation continues to run for a reasonably long time. Randomly
distributed time monitors collect the fields over time. Destructive interference causes most of the fields to decay
quickly, but some of the fields will excite the modes of the structure and continue to propagate indefinitely. The
frequencies of these modes can then be easily detected from an FFT of the fields vs time.
Bandstructure Calculation
Step 1: Fourier transform
In the bandstructure analysis group, we load the time signals from each time monitor for each field component. Next,
we apodize the signals by applying a Gaussian-shaped windowing function. The parameters defining the
characteristics of the Gaussian, apod_center and apod_width, are set within the model analysis group. By apodizing
the time signal, we are filtering out the beginning and end portions of the time signal so that we only consider a
portion of time signal following the source pulse injection time and before the simulation is cut off. For more
information please refer to Apodization. 660
The Fourier transform of the apodized time signals are then used to calculate the bandstructure.
The following portion of the script from the bandstructure analysis group performs the steps described above for the
time signal of one field component of one monitor. The result, abs(czt(signal,t,2*pi*f))^2 is a spectrum
with peaks at the resonant frequencies.
#apodize the signal with a gaussian, to ignore start and end effects
You can also collect the results and image fs in the script, and plot the bandstructure by finding the peak
frequencies for each k vector.
The following script finds the 10 largest frequency peaks for one k vector and discards the peaks that are below a
minimum value determined by the tolerance. The results are collected in f_band. The bandstructure plot is obtained
by plotting f_band for each k vector.
# set variables
tolerance = 1e-4;
num_band = 10;
temp = findpeaks(fs,num_band);
#collect data for any peaks that are more than 'tolerance' of the maximum peak (to avoid
minvalue = fs(temp(1))*tolerance;
f_band=matrix(num_band);
for(bandcount = 1:num_band) {
if( fs(temp(bandcount)) > minvalue) {
f_band(bandcount) = f(temp(bandcount));
}
}
Image of fs (f vs k)
Bandstructure plot
8.1.3.5.2.2 Square 2D
This page provides two bandstructure examples for 2D rectangular structures. First is an array of dielectric rods,
and second is a multi-layer 'wavy' structure described in Ohtera et al.
Solvers 101
FDTD
See also
Triangular 2D 1850
Square 3D 1851
Planar 3D 1853
Associated files
square2D.fsp
square2D.lsf
wavy2D.fsp
wavy2D.lsf
Related publications
Ohtera et al, "multichannel photonic crystal
wavelength filter array for near-infrared
wavelengths", Journal of Lightwave
Technology, vol. 25, no. 2, 499-503, Feb 2007
First we consider a 2D photonic crystal composed of a square lattice or rods with period 500 nm. The rods are
In this example, the dipole cloud analysis group has been modified from the one from the Object library by adding a
"theta" parameter. The "theta" parameter allows us to specify the orientation of the dipoles instead of setting random
dipole orientations. By setting the dipole orientations we can selectively excite the TE or TM bands of the structure.
To begin, load the example file square2D.fsp. Run the script square2D.lsf to complete the parameter sweeps
Gamma-X, X-M, and M-Gamma. This will calculate the bandstructure in these three directions and produce plots of
fs vs k and the bandstructure. If you wish to display all points in the same color as shown on the figure below, open
the chart settings and check the "plot all data in the same color" option.
There are points plotted at zero frequency for every value of k. This is because the script file looks for 10 bands and
sets them all to have zero frequency. If less than 10 bands are found in the data, the remaining bands remain at zero
and appear in the plot. If you don't see any points at zero, you may want to increase the number of bands you are
looking for.
square2D.fsp is setup with TM polarized dipoles. If you want to calculate the TE bandstructure, change the
polarization setting of the dipole cloud object from TM to TE, then re-run the sweeps. The resulting bandstructure is
shown below.
Next, we can calculate the bandstructure of the wavy structure described in Ohtera et al. The stack is composed of
alternating wavy dielectric layers with refractive indices n = 1.47 and 2.28, as illustrated in the figure below. We
assume the structure is uniform in the z direction and periodic in the x and y directions. The goal is to calculate the
symmetric modes of this structure for TM sources. (where electric field points in the z direction)
To begin, run the sweep named ky. The sweep will scan over the bloch wave vector from ky=0 to 0.5. The script file
wavy2d.lsf can be used to plot the sweep results. The FDTD result is in good agreement with figure 2 in the
paper by Ohtera.
8.1.3.5.2.3 Triangular 2D
Solvers 101
FDTD
See also
Bandstructure 1843
Square 2D 1848
Square 3D 1851
FCC 3D 1852
Planar 3D Hex 1854
Associated files
tri2D.fsp
tri2D.lsf
Triangular lattice problems can be solved by creating a larger unit cell that is rectangular, from two triangular unit
cells. This means that you must use a pair of sources with the appropriate phase between them. The analysis object
dipole_cloud_tri automatically creates a set of randomly positioned dipoles, with a matching set of dipoles in each
unit cell.
To begin, load the example file tri2D.fsp. Run the script tri2D.lsf to complete the parameter sweeps K-
Gamma, M-K, and Gamma-M. This will calculate the bandstructure in these three directions. Finally, it will plot the
results.
The dipole sources in the file are oriented along the z-direction by default to return the TM bandstructure. In order to
get the TE bandstructure, edit the dipole_cloud analysis group and change the "theta" property from 0 to 90 to
change the orientation of the dipoles so that they are polarized in the xy-plane.
TE bandstructure
TM bandstructure
8.1.3.5.2.4 Square 3D
Solvers 101
FDTD
See also
Bandstructure 1843
Square 2D 1848
FCC 3D 1852
Planar 3D 1853
Waveguide 3D 1856
Associated files
square3D.fsp
square3D.lsf
Related publications
H. Szer and J. Haus, "Photonic bands:
simple-cubic lattice," J. Opt. Soc. Am. B 10,
296-302 (1993).
Here we consider a 3D photonic crystal composed of a close-packed simple cubic lattice of air spheres in a
dielectric medium with a permittivity of 13 and lattice period 500 nm.
First, load the example file square3D.fsp. Next, run the square3D.lsf script to complete the sweeps for
calculating the bandstructure along the high symmetry directions. After all the simulations have completed, the
script will plot the sweep results. If you wish to display all points in the same color as shown on the figure below,
open the chart settings and check the "plot all data in the same color" option.
This example shows how you can get results quickly by setting a coarse dx, dy and dz. Once you have narrowed in
on the portion of the bandstructure you are interested in, you can reduce the values of dx, dy and dz to obtain more
accurate results. To be certain of your final accuracy, it is worth running some convergence tests. The resulting
bandstructure from this example does match the results published by Szer and Haus in the reference listed
above.
8.1.3.5.2.5 FCC 3D
Solvers 101
FDTD
See also
Bandstructure 1843
Square 3D 1851
Triangular 2D 1850
Associated files
bandstructure_fcc.fsp
bandstructure_fcc.lsf
Related publications
Lopez et al., Effective refractive index and
group velocity determination of three-
dimensional photonic crystals by means of
white light interferometry, Physical Review B
73, 125103, 2006.
Here we consider the 3D photonic crystal described in Lopez et al. The crystal is an FCC close packed lattice of
spheres with diameters of 708nm.
Calculating the bandstructure of triangular type lattices (FCC, BCC, 2D triangular) is a bit more complex than
rectangular latices because the simulation region will necessarily include multiple unit cells. For an FCC lattice, the
simulation region will include 4 unit cells. To avoid problems with artificial zone folding, we must have matching
dipole sources in each unit cell. Each of the matching dipoles must be in exactly the same position within its unit
cell. The dipole phase must also be adjusted according to the following formula:
r r
D q = - 180 k Dr
p
where
= phase offset from reference dipole
r
k = simulation wave vector
r
r = position offset from reference dipole
To reproduce the results in Figure 1 of Lopez, open the simulation file, then run the script. The script will run a
series of simulations, calculating the band structure from the Gamma point to the L, W, K, L and U high symmetry
points.
8.1.3.5.2.6 Planar 3D
Solvers 101
FDTD
See also
Bandstructure 1843
Square 2D 1848
Square 3D 1851
Planar 3D Hex 1854
Waveguide 3D 1856
Associated files
planar3D.fsp
planar3D.lsf
In this example, we consider a membrane structure of thickness 200 nm and refractive index =3.4. A square lattice
of holes with radius = 130 nm have been etched into the layer. The lattice period is 500 nm.
In this case, we use symmetric boundary conditions to reduce the computational volume and to consider only TE-
like photonic crystal modes in the slab.
To begin, load the demo file planar3D.fsp. The dipole source group and bandstructure groups are similar to the
Square 3D example. The planar (2D periodic) nature of this device is the only difference, which means there is no
need to sweep kz.
Use the script file planar3D.lsf to run the Gamma-X parameter sweep and create the following plot.
Solvers 101
FDTD
See also
Bandstructure 1843
Square 2D 1848
Square 3D 1851
Triangular 2D 1850
Planar 3D 1853
Waveguide 3D 1856
Associated files
planar3D_hex.fsp
planar3D_hex.lsf
In this example, we consider a membrane structure of thickness 200 nm and refractive index =3.4. A hexagonal
lattice of holes with radius = 130 nm have been etched into the layer. The lattice period is 500 nm.
In this case, we use symmetric boundary conditions to reduce the computational volume and to consider only TE-
like photonic crystal modes in the slab.
To begin, load the demo file planar3D_hex.fsp. The simulation setup very much like the rectangular lattice
planar example, but with a number changes related to the hexagonal lattice. See the 2D triangular lattice example
for more information on simulating Hexagonal / Triangular lattices.
To run the three parameter sweeps: Gamma-M, M-K, K-Gamma, and to plot the results, run the
planar3D_hex.lsf script file.
8.1.3.5.2.8 BCC 3D
Solvers 101
FDTD
See also
Bandstructure 1843
FCC 3D 1852
Triangular 2D 1850
Associated files
bandstructure_bcc.fsp
bandstructure_bcc.lsf
Here we consider the 3D BCC photonic crystal. The crystal is composed of dielectric spheres with refractive index 4
and a filling ratio of 10%.
Calculating the bandstructure of triangular type lattices (FCC, BCC, 2D triangular) is a bit more complex than
rectangular latices because the simulation region will necessarily include multiple unit cells. For a BCC lattice, the
simulation region will include 2 unit cells. To avoid problems with artificial zone folding, we must have matching
dipole sources in each unit cell. Each of the matching dipoles must be in exactly the same position within its unit
cell. The dipole phase must also be adjusted according to the following formula:
r r
D q = - 180 k Dr
p
where
= phase offset from reference dipole
r
k = simulation wave vector
r
r = position offset from reference dipole
To reproduce the following bandstructure plot, open the bandstructure_bcc.fsp simulation file, then run the
bandstructure_bcc.lsf script file.
8.1.3.5.2.9 Waveguide 3D
Introduction
When photonic crystals are used to make waveguides, the calculation of the photonic bandstructure becomes a 1
dimensional problem since the waveguide structure is only periodic in the direction of propagation. In this example
we calculate the bandstructure and mode loss of the waveguide structure described in K. Ogawa et al.
Solvers 101
FDTD
Associated files
waveguide3D.fsp
waveguide3D.lsf
See also
Photonic Crystals 1821
Bandstructure 1843
Waveguides 1876
Related publications
K. Ogawa et al., "Broadband Variable
Chromatic Dispersion in Photonic-Band
Electro-Optic Waveguide", OThE4, OFC
(2006)
Simulation setup
The waveguide has been drawn up in the simulation file waveguide3D.fsp, and is shown in the figure above. The
waveguide is composed of a rectangular a Si3N4 rectangular core (1 m width and 400nm thickness), shown in green,
on a 100 nm thick layer of Si with a triangular PC lattice of lattice constant a = 400 nm and hole diameter 260 nm.
The holes are filled with SiO2 and the cladding above the waveguide core is also SiO2. The 100 nm thick Si layer is
on a 1 m thick layer of SiO2. The substrate is Si.
We use a different dipole cloud than the one in the Object library. The dipole cloud object that we use in this
simualtion does not set the properties of the dipoles so that we are able to set them directly by modifying the global
source properties. This allows us to easily create a narrowband source when we want to selectively excite the
fundamental mode only.
Analysis
Before calculating the bandstructure, we will consider the type of results we expect. The waveguide is periodic in the
direction of propagation, with period = a * sqrt(3), where a is the photonic crystal lattice constant. Since a = 400 nm,
we have a period of approximately 693 nm. However, if we consider the microstructure along the direction of
propagation of the waveguide, the 2D PC consists of alternating rows of holes, each row shifted laterally to the next.
Apart from the lateral shift, there is no difference between the first row of holes and the second one. Therefore the
structure is "nearly periodic" with a pitch of period/2. We can expect to see results that are nearly equivalent to a
waveguide that is periodically modulated at a pitch of period/2=346.5nm. When the guide wavevector, k, equals 2p/
period, there will be a barely observable bandgap. However, when the wavevector is 2p/(period/2) = 2*2p/period, we
expect to see a large bandgap.
It should be noted, however, that the true period of the waveguide is 693 nm. Thus PC waveguide modes near the
large "second order" band gap may have radiation components that contribute to loss. In addition, there may be
some weak coupling at a wavelength of 1550nm to the Si substrate with the SiO2 cladding n=1.45 only 1 micron
thick. Although this coupling mechanism is very weak, it will contribute to the loss over propagation distances of a
large number of periods.
All modes
With the default settings in the simulation file, the sweep named Bandstructure will calculate the bandstructure for
kx = 0-0.5. The script produces the plot below which includes points representing the zone-folded lightline for the
cladding material (n=1.45). In the screenshot below, red lines have been drawn over the points composing the
lightline for clarity. It should be noted that any modes above the lower branch of the lightline are lossy although the
loss is very small, while any modes above the upper branch of the lightline are highly lossy. The waveguide bandgap
is shown on the figure and the lower curve shows that the predicted gap is around f = 0.29. This corresponds to a
wavelength range of approximately 1400nm. There is also a higher order mode supported in the waveguide at higher
frequencies and it exists below the upper lightline. Some care might be required to avoid coupling light into this
mode at the waveguide facet.
Hint: for more accuracy, the waveguide bandstructure can be run again with twice as many grid points in x and y.
This change will lengthen the amount of time required to calculate the bandstructure but will make the calculation of
the bandgap more accurate.
Fundamental mode
The bandstructure calculated above shows the waveguide has many modes. Here, we'll concentrate on the
fundamental mode just below the gap at a normalized frequency of 0.27 (1500 nm, 200THz) for k=0-0.05.
modes (ideally only one). This requires a longer time offset = 350
domain pulse and is the reason we increased the length
of the simulation.
Model group In setup -> variables tab
f1 = 200 THz
f2 = 220 THz
Parameter sweep kx end point = 0.05
number of points = 20
If you change the number of bands to 1 in the script file and re-run it with the updated parameter sweep mentioned
above, the following plots will be created.
Loss
We can calculate the intrinsic loss of the photonic crystal waveguide. This is the loss due to the period of
approximately 693 nm which allows weak coupling into the substrate.
The excitation and subsequent decay of the waveguide mode is sampled at various points inside the waveguide and
the associated amplitude time signal, plotted on a log scale. We can see the source pulse and then the slow decay
of the waveguide mode. If we zoom in on the decay region, we see a straight line, indicating the expected
exponential decay of the mode.
The analysis object field_decay_slope calculates the slope of the decay. This data is used by the script file to
calculate the loss parameter. In order to translate this into a loss per unit length, we need the group velocity of the
mode. The script file also calculates the group velocity from the bandstructure data. The group velocity is
normalized to the speed of light in a vacuum. The loss is plotted in dB/mm.
In the script file, change the number of bands to 1 and re-run the updated parameter sweep mentioned above with
the the script file. The following curve will be plotted
These results look reasonable, as we expect this loss to increase closer to the band-edge as the group velocity
decreases.
the dispersion relations and bandstructure, as shown in Waveguides 3D 1856 . In this section, we will use the same
FDTD method to analyze the dispersion of waveguides that are uniform in the direction of propagation. For simple
material systems, the FDE solver is the best solver for studying uniform waveguides, but it is not capable of
simulating waveguides composed of some complex materials such as off-diagonal anisotropic and nonlinear
materials. For these advanced material systems, the FDTD method must be used.
In this example, we start by demonstrating the simulation methodology by calculating the bandstructure of simple
uniform waveguide composed of a simple linear, isotropic material. Next, we repeat the calculation using a diagonal
anisotropic material. Finally, we repeat the calculation again using a magneto-optical material (non-diagonal
anisotropic material). It is worth noting that the first two material systems could be studied with the FDE solver, but
not the third.
For periodically patterened waveguides, such as the line-defect photonic crystal waveguide, we simulate one unit cell
along its propagation direction. For any uniform waveguide, any length of the waveguide can be considered as
"periodic" along its propagation direction. Therefore, for these waveguides, we can also simulate one "unit cell". In
this case, the value of the period is "arbitrary". For the sake of simulation efficiency, we use one mesh along the
propagation direction, eg., the span is dx if along x axis. This means that we have only one single FDTD Yee cell in
this direction. The result is to push the edge of the Brillourin zone to k=pi/dx.
To reduce the grid dispersion, this mesh size dx should be typically less than lambda/neff/10 where neff is the
largest effective index we want to study. In the case of index guided structures, we can set dx < lambda/n/10 where
n is the maximum index. In any case, there is little computational cost to making dx smaller UNTIL it becomes
smaller than dy and dz. The single mesh cell should be enforced with a mesh override region. For example if we
want dx = 25nm, we can use a mesh override region that forces dx (but not dy or dz) to be 25nm, and then we set
the x span of the FDTD region to 25nm.
Solvers 101
FDTD
Associated files
nr_waveguide3d.fsp
nr_waveguide3d.lsf
See also
Photonic Crystals 1821
Bandstructure 1843
Waveguides 1876
Line defect 1879 wavegide
Magneto-Opitcal Kerr effect 2879
Creating anisotropic materials 253
Simulation setup
The waveguide has been drawn up in the simulation file nr_waveguide3d.fsp, which is a simple rib waveguide
shown above.The waveguide is composed of a rectangular core (2.6 m wide in y and 1 m thick in z, refractive index
1.5), on a substrate of refractive index 1.4. The anisotropic or nonlinear parameters will be added in the analysis
section.
Suppose the propagation is along x, we can use a "x span" of 50nm or so and a override mesh with dx=50nm to
have only one cell in x. This means we have approximately lambda/dx=1.55microns/1.5/50nm ~ 21 points per
wavelength in the direction of propagation. Such small mesh size makes the additional grid dispersion small(see
details 1674 on grid dispersion in FDTD).
If we have no idea of the mode profiles and want to extract the full bandstructure information then a randomized
dipole cloud should be used as a source, with a bandwidth that covers the full range of frequencies we want to
consider, see the examples in Bandstructure 1843 .
For the current example, we know that the waveguide mode we are looking for is a small perturbation to the
waveguide system (for example for some nonlinear or anisotropy effects), then we can use a mode source that starts
with the solution from the FDE solver. This will converge much faster than a randomized dipole cloud. However, the
user should be cautious because some modes may be completely eliminated by this approach, particularly if they
have a different symmetry from the mode used to excite the system.
This waveguide supports two almost degenerate TE and TM modes. With the FDE solver, we can select both the
TE and TM modes and then track these modes in a wavelength sweep of 1.5 m to 1.6 m. Such sources will be
approximately polarized at 45 degrees in the waveguide and will excite both modes equally. We cannot use only one
mode source because the modes are orthogonal. We use the simulation band from 1.4 to 1.7 m. The value of beta
or effective index vs wavelength can then be calculated through sweeping kx. For a fast demonstration, we only
sweep 5 points from kx=5.6e6 to 6.0e6 rad/m.
Analysis
We first simulate the regular waveguide without anisotropy or nonlinear property. Open the nr_waveguide3d.lsf file,
and run the lsf file to sweep different k ( set in the sweep group). Then the effective index can calculated as k/k0
where k0 is the wavenumber in vacuum. The beta and the spectrum vs. wavelength are plotted as follows:
It clearly shows that there is only one resonant peak at each k due to the mode degeneration.
Anisotropic waveguide
We now set the object core to have an anisotropic refractive index of 1.5;1.49;1.51. This will break the degeneracy
of the TE and TM modes. After re-running the sweep and the script file, we see the following figures showing that the
degeneracy is indeed broken. At each k, there are two resonate frequencies corresponding to the two modes.
It is also useful to run the simulation with an intermediate value of kx = 5.9e6 rad/m. We can then plot the E field in
the time monitor waveguide center, and particularly the values of Ey and Ez as shown above (bottom left). We can
see that while we inject both modes, there is no coupling between them which makes sense because the two
modes are orthogonal.
Magneto optical material has an anisotrpoic permittivity with off-diagonal components. When light passes through
such material, the polarization plane will rotate, and the left- and right- rotated circular polarization will propagate in
different speed. Such anisotropic permittivity can be diagonalized (please refer "anisotropic materials 253 "). We
enable the grid attribute called faraday_effect and make sure that the object core has the "grid attribute name"
property also set to faraday_attribute. The grid attribute faraday_effect applies a complex unitary transformation of
that was setup with the following script:
# Define U
# EL = (-Ey + 1i*Ez)/sqrt(2);
# ER = (-Ey - 1i*Ez)/sqrt(2);
# E_circular = U * E_cartesian, therefore:
U = [ sqrt(2), 0, 0;
0, -1, 1i;
0, -1, -1i] / sqrt(2);
Now we have a waveguide made of a material with left and right circularly polarized light which have indices of 1.49
and 1.51. This means that our initially injected light which is approximately 45 degree polarized should rotate as the
simulation runs. Additionally, we can extract the neff vs lambda using the same approach for both of the resulting
modes. These results are
Finally, if we want to extract the mode profiles for the 2 resulting modes, we need to add a frequency domain monitor
(called "mode profiles") and ensure that the wavelengths chosen correspond to the peak values of the 2 modes. To
find the exact frequency, we can have the time monitor apodized starting from 300fs to 900fs. Run the simulation
and using the following script to extract the frequency:
t=getdata("waveguide center","t");
Ey=getdata("waveguide center","Ey");
f=linspace(190,197,100)*1e12;
eey=czt(pinch((Ey)),t,f*2*pi);
plot(c/f*1e6,abs(eey));
plot(f*1e-12,abs(eey));
n=findpeaks(abs(eey),2);
?c/f(n)*1e6;
For the profile monitor, we also need to use the same apodization, and record the profiles for the found wavelengths
or frequencies. Please note that these mode profiles look very similar when considering |E|. Looking at a line plot of
the phase through the center of the mode, we can see that the phase of Ey and Ez is advanced or retarded by 90
degrees, corresponding mainly to a right or left circularly polarized mode.
Introduction
In the previous 2D-periodic photonic crystal bandstructure examples, we have only considered modes that propagate
within the plane of periodicity, where kx and ky vary and kz=0. This example demonstrates how to get bandstructure
plots for out-of-plane propagation where kz is no longer 0.
Solvers 101
FDTD
Associated files
tri_2D_kz.fsp
tri_2D_kz.lsf
See also
Simulation Methodology 1844
Triangular 2D 1850
Related publications
Joannopoulos, J.D. et al. Photonic Crystals:
Molding the Flow of Light. 2nd Ed. Princeton:
Princeton University Press, 2008. 75-8.
Simulation setup
In this example, we want to simulate the out-of-plane bandstructure for a triangular lattice with rods that are uniform
and infinite in the z-direction. By using a 3D simulation with Bloch boundary conditions in the x, y, and z directions,
this allows us to control the values of kz as well as kx and ky. The simulation region only needs to be one mesh cell
thick in the z-direction.
The model analysis group is used to set the value of kz. In order to get the band frequencies over a range of kz
values, we set up a parameter sweep task to sweep the value of kz over the desired range. In this example we are
interested in the out-of-plane bandstructure at point gamma where kx=0 and ky=0, and we sweep kz from 0 to 2 in
bandstructure units (SI*a/(2*pi)). The values of kx and ky in the sweep can be changed in order to get the out-of-
plane bandstructure at a different point on the Brillouin zone.
Results
The resulting band diagram closely matches the first few bands of a structure of the same material and radius/lattice
constant ratio plotted in Figure 11 in Chapter 5 of Joannopoulos' text.
Plot of fs vs k
Extracted band diagram
Solvers 101
FDTD
Associated files
bandstructure_1D.fsp
bandstructure_1D_fixed.fsp
bandstructure_1D.lsf
See also
Simulation Methodology 1844
Square 2D 1848
To demonstrate how to extract the bandstructure for simulations with high loss, here we show an example of a 1D-
periodic chain of spheres made of a highly absorbing metal, with PML boundaries on four sides.
bandstructure_1D.fsp contains the simulation set up according to the simulation methodology 1844 page and it
does not yield a clear bandstructure diagram. bandstructure_1D_fixed.fsp has implemented some of the
following solutions listed below, and results in a clear bandstructure plot. The bandstructure plots can be obtained by
running the bandstructure_1D.lsf script file.
The following figures compare the sum of the Fourier transforms of the time monitor data, fs, at a particular k vector
for the lossless square 2D 1848 simulation (left), and the lossy 1D-periodic chain example here (right). You can see
that the signal from the simulation with low loss has sharper, narrower peaks and less noise than the signal from the
simulation with high loss. This is why it is more difficult to obtain the correct resonance peaks for simulations with
high loss.
Solutions
The following plots show the bandstructure diagram for the unmodified bandstructure_1D.fsp (left) and
modified bandstructure_1D_fixed.fsp (right) simulation files based on the solutions listed below.
Similarly, by choosing monitor placement one can also minimize the signal that is recorded from modes you are not
interested in. In our example we have also placed the monitor on the x-axis.
Symmetry
You can use symmetry in the boundary conditions to isolate modes of interest. In our example, we are interested in
a mode that is symmetric across the y and z axes. By setting the y and z boundary conditions to be symmetric, we
eliminate any modes that do not satisfy this symmetry condition.
Apodization
The resonance that we are interested in may only occur for a short period of time and it may not occur at the center
of the recorded time signal. To help determine which portion of the time signal to take the Fourier transform from,
you can run a preliminary simulation and look at time monitor signal, or use a movie monitor to estimate the center
time and duration of the resonance. You can then use this information to adjust the apodization 660 window center
and width settings in the analysis tab of bandstructure object.
Source spectrum
You can also adjust the source spectrum to ensure that more energy is coupled into the bands you are interested
in. For example, if you are interested in the high frequency bands, you can adjust the source frequency center and
bandwidth to the range that overlaps with the higher frequency bands. As a result, the strength of the resonance
peaks in the Fourier transformed time signal from the higher frequency modes will increase relative to the lower
frequency resonance peaks, allowing you to extract the higher frequency bands. In the example file that has been
fixed, the minimum and maximum source frequencies have been set to match the apodization frequency range in the
bandstructure object analysis tab variables.
Tolerance
It is also possible that you have a clean signal from which to extract the bandstructure but some of the points are
being excluded from the bandstructure plot because the height of the resonance peak is below tolerance. If the
bands can be seen clearly in a plot of fs vs k, then you will be able to extract more of the points in the bandstructure
by lowering the tolerance setting in your analysis script.
8.1.3.5.2.13 Woodpile 3D
Solvers 101
FDTD
In this topic
Bandstructure 1843
Square 3D 1851
FCC 3D 1852
Associated files
woodpile_bandstructure.fsp
woodpile_bandstructure.lsf
Related publications
"Photonic Crystal Laser-Driven Accelerator
Structures", A dissertation submitted to the
department of physics and the committee on
graduate studies of Stanford University in
partial fulfillment of the requirements for the
degree of Doctor of Philosophy, Benjamin
Cowan, March 2007 - Chapter 3
In this example, we calculate the bandstructure of a woodpile structure described in the above reference. See
chapter 3 of the thesis for details of the structure geometry used in this example, as well as further information on
the woodpile Brillouin zone and location of symmetry points
Due to the geometry of the woodpile structure, the simulation region encompasses two unit cells of the structure.
For this reason, each dipole source must have matching dipole in the second unit cell to avoid artificial zone folding
problems. See the FCC 3D example for more information.
To calculate the bandstructure, open woodpile_bandstructure.fsp and run the associated script. The script
will run a series of parameter sweeps to calculate the bandstructure between selected symmetry points.
Like the band structure construction, in general there are two methods to create the equi-frequency contours. One
method uses frequency-domain "Plane Wave Expansion (PWE) " method, and the other uses the time domain
method which will be described below.This example shows how to use the time domain method with FDTD
Solutions. The EFC is obtained at given frequencies by Fourier-transforming the spatial field at steady-state recorded
from a frequency-domain field monitor.
Solvers 101
FDTD
Associated files
square2D_efc.fsp
square2D_efc.lsf
See also
Photonic Crystals 1821
Bandstructure 1843
References
[1] Dennis W. Prather et al, Photonic crystals:
theory, applications, and fabrication, Wiley, 2009
Jean-Michel Lourtioz, Photonic crystals--Towards
nanoscale photonic devices, Springer, Berlin, 2003
[2] Guilin Sun and Andrew G. Kirk, "On the
relationship between Bloch modes and phase-related
refractive index of photonic crystals," Opt. Express
15, 13149-13154 (2007)
http://www.opticsinfobase.org/abstract.cfm?URI=oe-
15-20-13149
[3] Guilin Sun and Andrew G. Kirk,"Analyses of
negative refraction in the partial bandgap of photonic
crystals," Opt. Express 16, 4330-4336 (2008)
http://www.opticsinfobase.org/abstract.cfm?URI=oe-
16-6-4330
[4] Rafif E. Hamam, Mihai Ibanescu, Steven G.
Johnson, J. D. Joannopoulos, and Marin Soljacic,
"Broadband super-collimation in a hybrid photonic
crystal structure," Opt. Express 17, 8109-8118
(2009)
http://www.opticsinfobase.org/oe/abstract.cfm?
URI=oe-17-10-8109
Here we use a 2D square photonic crystal similar to the one illustrated in the 2D bandstructure example. It is
composed of dielectric rods in air. The lattice constant is ax=ay=0.325 um and the refractive index is 1.583. Since
the simulation volume is quite large, and the photonic crystal structures creates strong resonances, the simulation
time is set to 10,000fs, which is longer than usual simulation. To speed up simulation, and to excite only modes
with a given symmetry, we use symmetry BC's to simulate only one quarter of the photonic crystal. To have
accurate spatial Fourier transform, the simulation region is set to be 60 by 60 um, thus an array of 120 by 120 is
created. A mesh override region is used to ensure the mesh has the same periodicity as the structure.
To excite all the possible spatial modes, the dipole source is usually not recommended to be located at a high
symmetry location (i.e. the center of a hole). We set one dipole source off-center. Due to the symmetry BC's, the
dipole source will be mirrored in the other 3 quadrants. A frequency domain field monitor will be used to record the
spatial field profile over the entire domain at a number of frequencies. In this case, we simulate TM polarization, so
we only need to monitor Ez field.
After the simulation we look at the spatial field intensity at given frequency. The left figure below shows |E(x,y)|^2 in
log scale at wavelength 1.5um. We then can use a Fourier transform to look at the same data in reciprocal lattice
space E(kx,ky) where kx,ky are spatial frequencies or wavenumbers.
We can either use fast Fourier transform (fft) or chirped Fourier transform (czt). The standard fft function will work,
but it will give results for a very large range of wave numbers. The czt function is often more convenient as it allows
you calculate the transform only over the wave numbers of interest. This example uses the czt function to get the
transform for Bloch wave numbers from -3*pi/ax to 3*pi/ax. The right figure below shows the Fourier transform of Ez
at a wavelength of 1.5um, corresponding to a normalized frequency of f*a/c= 0.217. The high symmetry points
Gamma, X and M are illustrated on the figure. Other Brillourin zones are clearly shown, which are not plotted when
using the PWE method.
Field profile |Ez(x,y)|^2 at 1.5um in log scale First Brillouin zone and higher-order Brillouin zones |
E(kx,ky)|^2
Below is the bandstructure of this photonic crystal, calculated with FDTD Solutions using the technique described in
the Bandstructure 1843 section. The red line corresponds to the normalized frequency of 0.217. The radius of the
circle corresponds to the wavenumber originated from Gamma point. The traditional bandstructure plot only shows
modes along the Gamma-X-M-Gamma line. The EFC allows us to see all the possible wavevectors.
Users familiar with PWE method may wonder why the equi-frequency contours in the higher-order Brillourin zones
(not surrounding Gamma) do not have the same intensity. The reason is that the system was excited by a single
real dipole. The coupling of the dipole to each spatial harmonics is not the equivalent, which leads to different
amplitudes. This can be an advantage of the time domain method: it can analyze the relative amplitude of each
spatial harmonics contributed to the Bloch modes. Recall that the Bloch modes are expressed as [1]
(
exp( i k r ) Am,n exp i (mG x + nG y ) r ),
where k is the fundamental wave vector, Gx and Gy are reciprocal lattice constants, and Gxax=2 , Gyay=2 .
Depending on the photonic crystal's structure, one spatial harmonic mode may have higher coupling efficiency than
the other.
From other Brillouin zones, one can know the relative amplitude or intensity of other spatial harmonics. The
fundamental mode has m=0,n=0 with amplitude A00. So (m,n)=(1,0) is the spatial harmonic mode with k + G x ,
and its amplitude A10 is smaller than A00. One can easily identify the modes (0,1),(-1,0),(0,-1) , which have the
same amplitude as A10 due to symmetry, and the modes of (1,1),(-1,1),(-1,-1),(1,-1), with smaller amplitude than
A10. If necessary, you can estimate quantitatively the amplitudes of those modes [2] (note that the figure shows
intensity in log-scale). However, please keep in mind that those modes are not isolated, and all such modes
compose of the Bloch waves inside the photonic crystal.
In a homogenous medium, the reciprocal lattice constant is zero, so no Bloch modes can be found, although one
can get similar EFCs for the fundamental wave vectors at different frequencies.
Most often people are only interested in the EFCs at the first band. Figures below shows EFCs at 1.5um, 1.25um,
and 1.0um, or f*a/c=0.216667,0.26 and 0.325, respectively, directly from fft calculation, which are circles in all the
cases and all in the first band. This is common for the first band.
It can be useful to plot multiple EFC's on a single figure, to more clearly see how the contour evolves as a function of
frequency, as shown on above (bottom right). From the equi-frequency contour plots above, you can see that the
radius of the circle increases with frequency, thus the dispersion slope is also positive. This is in consistent (and
equivalent) to the bandstructure data obtained by other means.
EFC plots can be a helpful tool when analyzing some aspects of photonic crystals [2], such as negative refraction
when the fundamental wave numbers decreases as frequency increases (in higher band [2], or the first band at the
partial bandgap [3]), collimation (square-like EFCs [4]), and highly dispersive effects etc.
Objective
The goal of this example is to demonstrate how to simulate the Bloch mode profile of a periodic structure, including
degenerate modes.
Solvers 101
FDTD
Associated files
bloch_mode.fsp
bloch_mode_bandstructure.lsf
bloch_mode.lsf
See also
Photonic Crystals 1821
Bandstructure 1843
Making a CW movie 870
Apodization 660
Square 3D 1851
Here we use a 3D cubic lattice structure composed of a simple cubic lattice of spheres with lattice period 500 nm.
The spheres are composed of a material with refractive index = 3, and radius = 130 nm. The bandstructure for this
lattice is shown below. To generate the band diagram, open bloch_mode.fsp run the
bloch_mode_bandstructure.lsf. If there is no sweep data, enable the dipole_cloud and bandstructure
analysis group to run all the sweep. Please refer to bandstructure calculation 1844 for more details.
Now we extract the Bloch modes of the 2 lowest order modes at the Brillouin zone edge (kx = p/a) from a single
simulation. We know that these modes have frequencies 256 THz and 281 THz when (kx, ky, kx) = (0.5, 0, 0), at the
20th sweep point. We also know that the Bloch mode can be written as
Ek ( x) = exp( ika)uk ( x) . Our goal is to
extract uk(x).
Load the file bloch_mode.fsp. This example uses two 3D frequency profile monitors to determine the field profiles
of the modes. Each monitor is set to the frequency of one of the modes and uses the time apodization feature to
correctly extract the field profile information at that frequency using Fourier transforms.
Due to the symmetry of the problem, each of the bands calculated in the bandstructure above is doubly degenerate,
one mode for each polarization. Thus care must be taken to excite only one of these Bloch modes. By placing a
point dipole source on a symmetry plane of the lattice, one mode of a specific polarization may be excited directly.
Note that it is very important, when degenerate modes are present, to use symmetry properties to determine where
to place the point dipole sources. Otherwise you will extract the field profile corresponding to a linear combination of
all the degenerate modes!
After running the simulation project, open the script prompt and run the script file bloch_mode.lsf. This will
calculate |uk(x)|2 for the modes at the two frequencies and plot cross sections of them. The results are shown
below:
Introduction
The self-collimation of light in perfectly periodic photonic crystals (PC) have attracted significant research efforts due
to its potential role in photonic integrated circuits, which have several key advantages over discrete optical
components. The goal of this example is to demonstrate a simple optical switch utilizing self-collimated beams and
line defects in photonic crystals.
Solvers 101
FDTD
Associated files
pc_switch.fsp
power_vs_r.lsf
pc_switch_2beams.fsp
See also
Photonic Crystals 1821
Related publications
Lee et al., "Line-defect-induced bending and
splitting of self-collimated beams in two-
dimensional photonic crystals", App Phys
Let 87, 181106 (2005)
The 2D photonic crystal is composed of dielectric rods of radius 0.35um and dielectric constant of 12. The lattice
constant is a = 1um and Perfectly Matched Layers (PML) are used on all boundaries. A Gaussian beam (with
FWHM of about 5um) at frequency 0.194c/a is launched from one side of the PC, and the resultant modes have
electric fields parallel to the rod axis. Note that the PC is extended pass the PML boundaries in order to prevent
reflections at these boundaries (see Extending structures through PML 368 ).
As shown in Lee et al. and the figures below, the self-collimated beam can propagate with almost no diffraction along
the PC (left image), and can also be completely reflected at the PC-air interface created by the line defect along the
diagonal (right image).
The power_vs_r.lsf script sweeps through the various defect radii and plots the transmission/reflection as a
function of defect radius for the file pc_switch.fsp. The result reproduces figure 2 of the Lee et al. paper,
demonstrating that the power ratio between the two split beams can be very well controlled by varying the radii of the
defect rods.
Optical switch
An optical switch is purposed by Zhang et al. based on the same PC/line defect set up described above. The defect
radius here is 0.274um, which results in about 50% transmitted and reflected power (see the point of intersection in
the figure above). The figures below show the results of the line defect on the self-collimated beam.
I o1 = I 0 (1 + sin (j1 - j 2 ))
I o1 = I 0 (1 - sin (j1 - j 2 ))
By combining the results for both 1 and 2 Gaussian beams, this PC/line defect device can now operate as a logic
OR and XOR gate, as describe in Table 1 of the Zhang et al paper. These results can be reproduced using
pc_switch_2beams.fsp.
PC bandstructure 1876
8.1.3.6.1 PC bandstructure
Accurate bandstructure calculations are important for the design and analysis of photonic crystal devices. In this
example, we will focus on how to use MODE Solutions' 2.5D FDTD propagation method to calculate the
bandstructure of a slab photonic crystals device with a square and hexagonal lattice of holes.
For a more general description of how to calculate bandstructures using the FDTD method, please see
Bandstructure calculations 1843
Solvers 101
varFDTD
In this topic
Setup 1877
Results and discussions 1878
See also
Bandstructure calculations 1843
2.5D FDTD propagation method
Simulation Setup
In general, bandstructures can be calculated using a time domain method or using a plane wave expansion method.
One advantage of using the finite-difference time-domain (FDTD) method is that one can calculate slab photonic
crystals without band-folding effects. This technique is very useful for most photonic crystal devices compatible with
CMOS technology, where the geometry is planar, with a non-periodic 3rd dimension. In this example, we use the
2.5D FDTD propagation method in MODE Solutions to calculate the bandstructure of a slab photonic crystal with a
square and hexagonal lattice. We will also compare the results to that of 3D FDTD to show that the 2.5D FDTD
method can give comparable results with a fraction of the memory and simulation time required by 3D FDTD.
This example is the same as the Planar 3D example 1853 from the FDTD Solutions knowledge base. Here, the
membrane structure has thickness 200nm and a refractive index value of 3.4. A square lattice of holes with radius =
130nm have been etched into the layer, with the lattice period ax = 500 nm. Just like in the 3D FDTD example, the
2.5D FDTD "PROP" simulation region will cover exactly one period (unit cell) of the device. Note that the key
parameters such as the period, start/stop frequencies are specified in the "model" analysis group, under Setup-
>Variables. The "dipole_cloud" analysis group contains randomly-distributed electrical dipoles used to excited the
Bloch modes. The bandstrucutre analysis group contains randomly-distributed time monitors, and the time signals
are combined and used to calculate the bandstructure. A sweep project Gamma-X has been created to sweep the
k-vectors and locate the band gap for this square lattice. Note that this slab PC device supports TE and TM-like
modes. By choosing E mode(TE) for the polarization option under the Effective index tab of the "PROP" simulation
region, only the TE-like bandstructure will be calculated.
Since we are interested in the bandstructure over a large frequency range, it is important to verify the slab mode
profile over the entire simulation frequency range. For example, if the start frequency is too small, the slab may not
have a well-supported mode.
Correct, the slab mode is supported over the entire Incorrect, the slab is not supported at longer
frequency range wavelengths.
Based on these considerations, we will choose the start/stop frequencies to be 60THz/200THz, which covers most
of the first and the second bands.
One can see that the results obtained using 2.5D FDTD and 3D FDTD are very similar.
Hexagonal lattice
In this section, we will calculate the bandstructure for a hexagonal lattice similar to the one from the Photonic
Crystal Waveguide 1879 example. To begin, open plannar_hex.lms, and change the "bandwidth" option
(under the Effective index tab of the "PROP" simulation region) to "broadband". Use
the script file planar_hex.lsf to run the Bloch wavevector parameter sweeps. The figures below show the
bandstructure of the TE and TM-like modes. Note that there is no bandgap for the TM-like modes.
For comparison, the figure below shows the bandstructure calculated using 3D FDTD, including both the TE and TM-
like modes. One can see that the agreement is very good, and we get a similar band gap between the two methods.
Calculating the bandstructure of a perfect photonic crystal is a good starting point for designing a photonic crystal
waveguide. The fact that we can get comparable results between 2.5D FDTD and 3D FDTD means that we can use
the 2.5D FDTD method to study slab photonic crystals devices efficiently. Depending on the type of defect and
modification on the photonic crystal geometry surrounding the waveguide, the low transmission band will often not
coincide with the band gap calculated for the perfect photonic crystal. In this case, the 2.5D FDTD method can be
very useful for studying how the propagation of light in the photonic crystal waveguide is affected by modifications in
the PC geometry.
In the example 1879 on the next page, we will use the 2.5D FDTD method to study a photonic crystal waveguide with
a line defect and an increased hole radius along the defect (the increased hole radius often leads to the broadening
and shifting of the band gap to higher frequencies).
Introduction
In this example, we use the 2.5D FDTD propagation method ('varFDTD' solver) in MODE Solutions to study the PC
waveguide described in O.V.(Alyona) Ivanova et al.
To accurately model this device, the complex scattering and interference effects from the high index contrast
photonic crystal must be precisely modeled. This typically requires a rigorous (but relatively slow) technique like 3D
FDTD. In this example, we show that it is also possible to obtain accurate results using the MODE Solutions' 2.5D
varFDTD propagation method, which is much more efficient and only requires the simulation time and memory of 2D
FDTD.
Solvers 101
varFDTD
In this topic
Setup 1880
Results and discussions 1881
Associated files
PhC_waveguide_L1.lms
Reference
O. V. (Alyona) Ivanova, Remco Stoffer,
Lasse Kauppinen, and Manfred Hammer,
"Variational Effective IndexMethod for 3D
Vectorial Scattering Problems in
Photonics: TE Polarization"
Simulation Setup
The following instructions briefly describe how to setup this simulation. Initially, you may want to skip this section
and proceed to "Results and Discussions" using the completed simulation file PhC_waveguide_L1.lms.
The waveguide described in O.V.(Alyona) Ivanova et al. is deposited on a glass substrate with refractive index 1.445.
The core has refractive index sqrt(12.1) ~ 3.5 with a thickness of 220nm. The hole radius is 135nm, and the modified
hole radius is 170nm. The period 'a' is 440nm. The input/output waveguide width is sqrt(3)*a. The upper cladding is
air. This is a typical one-line defect (L1) PhC waveguide.
To set up the simulation in MODE Solutions, start by creating a new blank simulation. Next, open the "Material
database" , click the Add button and select "Dielectric", set the index parameter to 1.445, and then click
the Color column to choose the color you like. Finally, name the newly created material "Substrate".
Click the Structure button and choose Rectangle , set the name to "SiO2", x and y span = 20um,
z max 0 and z min=-9um, and set the material property to "Substrate". Then add a central core layer "Core"
thickness 220nm, length 18*440nm, width 20um. The width of the input and output waveguides should be sqrt(3)
*440nm. Next, add a circle and array it as required to create the PC array (see Arrays of objects 356 for more detail
on how to use the "array" function). Set the material property to 'etch'. To form the PhC waveguide, delete unused
holes and the central row of the holes, and modify the holes above and below the central row. You can group the
array of holes into a structure group.
Add a varFDTD simulation region and set the span to 15 by 12 by 6 um (x,y, z), set the polarization to "E mode
(TE)", set x0 and y0 in the core region (this point will be used to calculate the vertical slab mode, so you should not
specify a location on top of the etched holes). The location of the 4 test points will not effect the simulation. Set the
simulation time to 20000fs, as this device has strong resonances and the fields will require longer to decay. Un-
select the 'Clamp values to physical material properties" option, set the Bandwidth setting to Broadband.
Add a mode source and set the wavelength range from 1.3 to 2.0 um. The fundamental TE mode that will be injected
by this source is mostly Ey polarized. Due to the symmetry of the mode and structure, set the Y-min boundary
condition to anti-symmetry. This will make the simulation run 2x faster. All other boundaries should be set to PML.
Add an Effective Index monitor, a transmission monitor "T" and reflection monitor "R", as well as a profile monitor
"Profile" with only 3 monitoring frequency points.
These effective index values are generated by collapsing the vertical dimension based on the methods described in
2.5D FDTD propagation method 107 . One can see that the core index has an effective index of around 2.8. Next, we
can plot the transmission and reflection spectra:
One can see that there is a stop-band from approximately 1.52um to 1.65um, which are comparable to the published
results.
8.1.4 Plasmonics
Motivation
Plasmonics is a field of study that explores the interaction of light waves and metallic surfaces, and the resulting
density waves of electrons that can be generated from this interaction. The resulting electron density wave that
propagates along the surface of the metal is referred to as a surface plasmon polariton, or a surface plasmon. Owing
to the strong frequency dependence of the complex permittivity of the metal, plasmons themselves exhibit strong
variations with frequency, and this frequency dependence results in surface plasmon resonances.
While plasmon propagation along metals is very lossy, the plasmon is tightly confined to the metal. This tight
confinement is being studied for application to compact signal routing over very short distances in highly integrated
planar lightwave circuits. This confinement can also lead to associated electromagnetic field enhancement which is
of use in bio/chemical sensing, decay rate engineering, and light absorption for photovoltaics.
Local
near
field
enhance
ment of
an array
of
nanohol
es on a
thin gold
film.
Features
Negative index metamaterials 1995 designed with materials that support surface plasmon resonances
Emission and absorption properties of metallic optical antennas
Increased efficiency of surface plasmon enhanced thin film silicon solar cells 2663
Electromagnetic field enhancement 1752 engineering
Frequency analysis of resonant modes for dispersive metal nanoparticles and nanoparticle systems
Decay rate engineering 1915 with metallic nanoparticles
Resonant transmission and subwavelength focusing 1912 through patterned metallic thin films including
plasmonic lenses and bullseye apertures 1910
Propagation along longitudinally-varying surface plasmon waveguides and metal-insulator-metal waveguides
Optical properties of metallic metamaterials 1990
Mode profiles, effective index, propagation constant, propagation loss, dispersion, bending loss, group
velocity, group dispersion of surface plasmon waveguides 1929 and metal-insulator-metal waveguides
Lumericals conformal mesh technology can provide sub-mesh cell modeling accuracy important in photonic
crystal modeling
Multi-coefficient materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs
Getting started
Relevant videos (login required):
Introduction to plasmonics
TFSF source
Application examples
Solver 101 Description
FDTD Simple Glass-Silver-Air slab 1905 , Simple Gold-Air slab 1907
FDTD, FDE Waveguide coupled SP mode 1926 , Gap Plasmon Waveguide 1929
Problem definition
Consider a rectangular silver surface plasmon waveguide with dimensions 1000nm x 100nm described in [1].
We want to measure the effective index of the ssb0 mode at 633nm. We will also calculate the effective index of
this mode as a function of waveguide thickness, from 50nm to 200nm.
Solvers 101
FDE
Associated files
plasmon.lms
plasmon_plot.lsf
In this topic
Modeling Instructions 1887
Discussion and Results 1884
Related references
1. P. Berini, "Plasmon-polariton
waves guided by thin lossy metal
films of finite width: Bound modes of
symmetric structures", Phys. Rev.
B, 61, 10484-10503 (2000).
Learning objectives
In this example, we show how MODE Solutions can be used to study surface plasmon modes. We will use a non-
uniform mesh to more accurately resolve the fields near the metal interface. The user will learn to:
Create a new material
Use symmetric boundary conditions
Use mesh override regions to create a non-uniform mesh
Use a built in parameter sweep to get the effective index and loss vs. thickness of the waveguide
Simulation setup
We are trying to recreate the results in the Berini paper [1], so it is important to use the same material properties.
We will create a new silver material, rather than using the standard silver definitions included with MODE Solutions.
the permittivity of Ag given in the reference paper is -19+0.53j.
The screenshot below shows the plasmon waveguide and the mode solver region.
Notice the shaded green and blue regions. The blue shaded section is a result of the fact that the x min boundary
condition of the simulation region has been set to symmetric. In other words, we have put a magnetic wall (perfect
magnetic conductor) at x = 0. Similarly, the green shaded region indicates that the y min boundary condition is anti-
symmetric. This indicates that we have put an electric wall (perfect electric conductor) at y = 0. See Symmetric and
anti-symmetric BCs 466 for more information about choosing symmetric and anti-symmetric boundary conditions.
Table 1 of the reference shows that the fields from the ssb0 posses this symmetry. The boundary conditions will
need to be changed if you are interested in finding modes which have fields with different symmetry. You can find all
of the modes that the waveguide supports if you set all of the boundary conditions to metal. Note that the time to find
modes and memory required to find modes will increase if all the boundary conditions are metal. This is because the
mode solver can use shortcuts to find the fields in the shaded region if your simulation posseses symmetry/anti-
symmetry about one axis.
The orange lines in the screenshot above show the mesh used in the mode calculation. Notice that the mesh is finer
at the edges of the structure. This is because we expect the fields to be concentrated near the edges of the
waveguide. Increasing the mesh here, will increase the rate of convergence of the effective index, loss and field
profiles as you reduce the size of the mesh.
Finally, notice that we use metal boundary conditions instead of PML boundary conditions. The reasons for this are
described in the Starting with metal boundary conditions 464 page.
The following figures show the field components of the SSb0 mode. The phase of the mode automatically determined
from MODE Solutions differs from the Berini figures by 180 degrees. This phase difference can be correct in the
plasmon_plot.lsf script.
It is important to notice that most of the field energy is confined to the corners of the waveguide. The following
figures show the electric field intensity over the entire waveguide area (left figure), then zoomed in near the waveguide
corner (right figure).
Simulation setup
Start a new simulation. Since we are using a 2D Z-normal Eigenmode solver you can open the simulation up in 2D
drawing mode by selecting the menu options below. This hides the z dimension since we are not using it.
Press on the arrow on the STRUCTURES button and select a RECTANGLE from the pull-down
menu. Set the properties according to the following table.
tab property value
name waveguide
Geometry x ( m) 0
x span ( m) 1
y ( m) 0
y span ( m) 0.1
z ( m) 0
z span ( m) 1
Material material Ag Berini :: 633nm
Press on the arrow on the SIMULATION button and select a EIGENMODE SOLVER region. Set the
properties according to the following table.
Press on the arrow on the SIMULATION button and select a MESH region . Set the properties according to
the following table.
tab property value
General set mesh multiplier yes
x mesh multiplier 100
y mesh multiplier 100
Geometry x ( m) 0.5
x span ( m) 1e-7
y ( m) 0.05
y span ( m) 1e-7
z ( m) 0
Analysis Window You can plot the components of the profile using the mode plot options of the analysis window.
See the mode plot options 753 page in the reference guide for more details.
Script File Open the script file editor, as shown on the MODE Solutions GUI page of the Introduction
section. Next, press on the OPEN button and browse to the plasmon_plot.lsf script
file included in the installation directory for MODE Solutions or on the first page of this example
1883 . Then press on the RUN SCRIPT button . The script will generate the plots on the
previous page.
Visualizer In the analysis window, the mode data appears in a list with mode numbers. Find the mode of
interest and select it in the Object tree as shown below. Choose to Visualize the
electromagnetic fields.
You can then select which components of the E field data you want to plot in the Visualizer.
The screenshot below shows how to plot the real part of the z component of the Electric fields.
Edit the MODE data group by right clicking on the object with your mouse. Select the Edit object option from the
list.
In the Analysis->Variables tab click the bottom ADD button twice. This will add two results which the data group
can give to the parameter sweep. Rename these two results "neff" and "loss" as shown in the bottom left window.
Switch to the Analysis->Script tab shown in the right part of the image below. Then add the following two lines of
script commands which will add data to the "neff" and "loss" results once a simulation has run. Press OK to save
your changes.
neff=getdata("mode1","neff");
loss=getdata("mode1","loss");
Press on the CREATE NEW PARAMETER SWEEP button to add a new sweep to the simulation. Right
click on the parameter sweep and choose to Edit the parameter sweep. Set the properties according to the
following screenshot. Notice that the only results you can chose are the results which are seen in the screenshot
of the Analysis->Variables tab above.
# plot results
plot(thickness*1e6,neff,"Waveguide thickness (um)","effective index");
plot(thickness*1e6,loss*633e-9/(2*pi*20*log10(exp(1))),"Waveguide thickness (u
Visualizer Right click on the parameter sweep and choosing what data to visualize, as shown in the image
below. Note that the loss will be in dB/cm, and that the script commands above converted the units
of the loss to k.
FDTD
FDE
See also
Surface Plasmons 1881
Common simulation considerations 1895
Introduction
The field of plasmonics is very broad with numerous applications, and the simulation methodology can be
complicated and highly dependent on the device operation. This can often lead to mistakes in the simulation set up
and in the interpretation of the results. In this chapter, we focus on three general categories of plasmonic simulations
and discuss the simulation methodology and workflow for each. They include:
This chapter will focus on how to obtain these results for the three general categories. For other types of plasmonic
simulations, please click on the links below:
The common simulation considerations 1895 section contains simulation tips that are important for all plasmonics
simulations. If you are unsure about which category your experiment falls into, please contact
support@lumerical.com.
In this topic
Mesh refinement 1895
Broadband material dispersion 1896
Mesh refinement
With the FDTD method, it is not possible to resolve interfaces to higher precision than the size of the mesh used.
This is an important issue to consider for plasmonic simulations, since the results are often very sensitive to the size
of the mesh near interfaces.
One solution is to use mesh override regions to force a very small spatial mesh to more accurately resolve the
locations of the metal interface. The disadvantage of this method is that it can greatly increase simulation times and
memory requirements. Lumericals conformal mesh technology can allow you to obtain more accurate results for a
given mesh size, so it is always worth considering this mesh refinement method over the traditional stair-casing
method. Conformal variant 0 443 is the default setting.
Note that with simulations that involve metal structures, the default conformal mesh reverts to stair-casing for all
metal interfaces. In this case, one would need to specify a variant of the default conformal mesh to take advantage
of the conformal mesh technology if necessary.
Please take care when using conformal mesh technology with metals, and do some convergence test to be sure
that the conformal mesh technology is appropriate for your precise application. For more detail on the different
variants of the conformal mesh, and how they should be used, please see mesh refinement options 443 .
Simplified models of idealized materials such as Drude, Debey or Lorentz can offer good insight into the behavior of
optical materials through their characteristic shapes, but fail to accurately capture the dispersive properties of real
materials. Lumericals Multi-Coefficient Model (MCM) can solve for materials with arbitrary dispersion, making it very
useful for plasmonic simulations.
If you are running broadband simulations, you should try to use real data for your metal materials so that the actual
material dispersion used in the simulation is as realistic as possible. Please see creating sampled data materials
226 for detailed instructions on how to import material data into your simulation. Once you have defined the material
data, it is important to check the material fit 272 (in the material explorer) before you run the simulation to make sure
that the error between the MCM fit and your material data is within tolerance:
Convergence Testing
Simulation results will always contain some numerical error. It is important to understand some of the sources of
numerical error and steps that can be taken to reduce the error to an acceptable level. Some common sources of
error for plasmonic simulations are:
Staircasing effect
When dx, dy, dz and dt are finite, it is not possible to resolve geometric features to arbitrary resolution. This is
especially important for plasmonic simulations since the results are often very sensitive to the size of the mesh
near interfaces.
Convergence test: systematically decrease the mesh size around the critical features until the result converges.
This is typically done with mesh override regions, since it is often unnecessary to refine the mesh everywhere in
the simulation region. This convergence test is crucial for making sure that the size of the mesh near metal
interfaces is small enough.
For a complete discussion on how to test convergence, please see Testing convergence 847 .
In this topic
Source 1897
Simulation 1897
Monitors and analysis - cross
sections 1898
Monitors and analysis - near/far field
analysis 1899
Examples 1899
See also
Simulation methodology 1894
Common simulation considerations
1895
For standalone objects (such as particles suspended in a fluid), we often want to calculate the absorption/scattering
cross sections. We may also want to look at the near field enhancement around the particles, as well as the far field
angular distribution. The following simulation methodology provides a template for how to set up this simulation and
how to obtain these results.
Source
FDTD Solutions provides a Total Field/Scattered Field source, which is useful for particle scattering simulations. A
TFSF source is a type of plane wave source that separates the computation region into two distinct regions:
Total Field region - the sum of the incident plane wave plus the scattered field
Scattered Field region - includes only the scattered field
Simulation region
PML (absorbing) boundaries should be used on all sides of the simulation region.
As mentioned in common simulation considerations 1895 , a mesh override region is often used to more accurately
resolve the metal interface of the nanoparticle. When using TFSF sources, the mesh override region should be large
enough to cover the entire TFSF region, since TFSF sources work best in uniformly meshed regions.
provides a "trans_box" analysis group that returns the net power flow out of a rectangular volume, this
means that we can use
a trans_box outside the TFSF source to calculate the scattered power
a trans_box inside the TFSF source to calculate the absorbed power
Note that the mesh spacing of the override region affects the location of the monitors in the trans_box analysis
group. Sources require a certain amount of space to inject the fields. The amount of space required is ~2 mesh cells
and is depicted graphically by light white shading that surrounds the source. Within this region, the fields are not
physically meaningful. Hence monitors should not be placed in this region.
Note that the power returned by the transmission box, T is the net power normalized by the source power. To
calculate the absorption/scattering cross sections, we want to normalize T by the source intensity (source power/
area of source):
The Object Library also provides a specialized "cross_section" analysis group that returns the cross sections
in the correct units.
Near field
One can place profile monitors anywhere in the near field region to study the near field enhancement. Once the
simulation finishes running, simply right-click on the monitor and send the results to the Visualizer 740 to study the
near field results.
Far field
For far field results, we cannot simply use a plane monitor for this calculation (as we do for periodic structures) 1902 ,
since we have to consider light scattered into all directions. Fortunately, the fields radiated outside of a closed box
by sources located inside the box can be determined exactly from the field components at the surface of the box.
This means that we can use the approach described in projections from a monitor box 817 to calculate the far field
results. The Object Library provides a "scat_ff" analysis group that calculates the far field projections for
each surface of the monitor box and then sums up each surface to return the final result.
Examples
For some examples that use this simulation methodology for standalone objects, please see:
In this topic
Source 1897
Simulation 1897
Monitors and analysis 1899
Examples 1899
See also
Simulation methodology 1894
Common simulation considerations
1895
For a single device on a substrate (such as defect detection/scattering, antenna simulations), we often want to study
scattering into specific regions in the far field (instead of the total scattering cross section). In this case, it makes
more sense to use the concept of differential scattering cross section, or the intensity on a single particle to the
power scattered by it per solid angle. The following simulation methodology provides a template for how to set up
this simulation and how to obtain these results.
Source
The type of source to use will depend on the size of the beam and the size of the device. Whether the device is
uniformly illuminated or not also affects the choice. The TFSF source can be used when the device is uniformly
illuminated by the source. A Gaussian beam source can be used when the source does not uniformly illuminate the
device.
When using a Gaussian beam source, the user has the choice of using scalar approximation or a fully vectorial thin
lens source option (good for tightly focused spots). Please see beam options 521 for more detail. Usually the
illumination on the scatter should be relatively uniform, which means the beam waist size is larger than the scatter.
Simulation region
PML (absorbing) boundaries should be used on all sides of the simulation region.
Again, irrespective of the source used, mesh override regions should be used in the region near the device.
Near field
One can place profile monitors anywhere in the near field region to study the near field enhancement. Once the
simulation finishes running, simply right-click on the monitor and send the results to the Visualizer 740 to study the
near field results.
Far field
Note that we cannot use the projections from a monitor box 817 technique used for standalone objects 1896 , since the
technique only works when all of the monitors are in a homogeneous material. When a substrate is present, the
best way to calculate the far field scattering pattern is to use one monitor, located above or below the particle
(depending if you want scattering in the forward or backwards direction). Note that the monitor plane should always
be placed in a homogeneous region in the near field. You can then calculate the far field projections from the monitor
directly in the Results View 736 window, or with far field projections 1657 script commands. When using a single
monitor, it's important to make the simulation span large enough so that most of the scattered light will pass through
the monitor before hitting the PML absorbing boundary conditions. Often, a simulation span of more than 10
wavelengths is necessary for good results.
Examples
For some examples that use this simulation methodology for studying a single device on a substrate, please see:
In this topic
Source 1897
Simulation 1897
Monitors and analysis 1899
Examples 1899
See also
Simulation methodology 1894
Common simulation considerations
1895
For devices that are periodic (such as nanostructure arrays, multilayer devices), we often want to study the resonant
transmission/reflection properties. This includes the total transmission/reflection, or the transmission/reflection into
particular orders.
Source
Plane wave sources should always be used for periodic simulations. When using sources such as dipoles and
Gaussian beams with periodic boundaries, the sources will also be copied across each unit cell in the periodic
directions, which is unphysical.
For sources at normal incidence, or for single frequency simulations with injection at normal incidence, the plane
wave type should be set to "Bloch/Periodic".
For broadband simulations with injection at non-normal angles, the plane wave type can be set to "'BFAST". The
BFAST 590 technique can be used to inject light at a constant angle over all frequencies. For a complete description
on how to set up a simulation with a plane wave source injected at an angle, please see plane waves - angled
injection 529 .
Simulation region
When using the "Bloch/Periodic" plane wave type, periodic boundaries should be used if the source is injected at
normal incidence, and Bloch boundaries should be used when the source is injected at angled incidence in the
directions where the structure is periodic. When using the "BFAST" plane wave type, the boundary conditions in
periodic directions is automatically set to use the BFAST technique, so the boundary conditions in those directions
do not need to be set. In the directions of periodicity, the simulation span must correspond to exactly 1 unit cell of
the device.
When using the For directions that are not periodic, PML (absorbing) boundaries should be used.
Note that symmetry can still be used for periodic boundaries by setting the min/max settings to be the same. For
example, the settings below correspond to a periodic simulation.
Near field
One can place profile monitors anywhere in the near field region to study the near field enhancement. Once the
simulation finishes running, simply right-click on the monitor and send the results to the Visualizer 740 to study the
near field results.
Far field
The best way to calculate the far field scattering pattern is to use one monitor, located above or below the structure
(depending if you want scattering in the forward or backwards direction). Note that the monitor plane should always
be placed in a homogeneous region in the near field. Once the simulation finishes running, you can calculate the far
field projections from the monitor directly in the Results View 736 window, or with far field projections 1657 script
commands. Note that it is possible to use the projection functions to calculate the far field distribution of finite sized
periodic arrays (even if the simulation is infinitely periodic). See far field projections -> periodic structures 142 for
more detail.
Transmission/Reflection
In many cases, we are only interested the total transmission/reflection of the device. This can be easily calculated
by placing power monitors above and below the structure, and then plotting the transmission in the Results View 736
window. Note that power flowing towards the -x/-y/-z directions will carry a negative sign.
For structures that support multiple grating orders, we may want to look at the transmission/reflection into particular
orders. FDTD Solutions has built-in grating projection calculations 1666 that can be used to calculate the direction and
intensity of light reflected or transmitted through a periodic structure. The Object Library also provides a
"grating_transmission" analysis group can be used to find the transmission into any order. For a list of
examples, see the gratings 1788 section of the applications library.
Examples
For some examples that use this simulation methodology for studying periodic structures, please see:
Solvers 101
FDTD
Associated files
sp_film_resonance.fsp
sp_film_resonance.lsf
sp_film_dispersion.fsp
sp_film_dispersion.lsf
See also
Surface Plasmons 1881
Bandstructure 1843
Results
The plot to the left below shows the simulated reflection spectrum as a function of source angle in comparison with
the analytic solution. The resonance angle for both the analytic solution and FDTD simulation are found at
approximately 47 degrees. The plot on the right shows the E field intensity as a function of x for all of the angles of
incidence. For a higher resolution of the E field intensity over x, the mesh accuracy setting in the FDTD simulation
region object can be increased.
To recreate the plot, open sp_film_resonance.fsp. Run sp_film_resonance.lsf script file to run the
parameter sweep, plot the results and compare them with theory.
Dispersion relation
Next, we calculate the dispersion relation of the SPR mode(s) using a technique described in the Bandstructure 1843
section. Basically, we do a parameter sweep over the wave vector ky and look for frequencies with strong
resonances. To reproduce the following results, open spr_film_dispersion.fsp, run the parameter sweep,
then run the script spr_film_dispersion.lsf.
In the following figures, two SPR modes are visible (Air:Ag:Glass and Glass:Ag:Air) as well as the Air and Glass
light lines.
Solvers 101
FDE
Associated files
surface_plasmon.lms
surface_plasmon.lsf
surface_plasmon.ldf
Simulation setup
The figure above shows the structure and physical constants of air/gold interface. The gold layer is many
nm
wavelengths thick, with a refractive index of = 0.238+3.385i at a wavelength of 632.8nm.
Analysis
The analytical solutions for the effective index and propagation loss for the surface plasmon modes are given by the
following expressions:
k sp
N sp =
ko
40 p imag ( N sp )
Lsp =
l log( 10) 1000
where
k02 e i e m
k sp =
( ei + e m )
e i = 1, e m = nm2
These will be used in the evaluation of the MODE Solutions results.
Results
The script surface_plasmon.lsf finds the TM1 mode and plots the effective index and propagation loss as well
as the corresponding % errors as a function of the number of grid points. The script also analyzes the improvements
in performance of using a graded mesh instead of a uniform mesh.
The left figure show s Effective index and the right figure show s propagation loss calculated for air/gold interface at a
w avelength of 632.8nm . The blue curves denote the MODE Solutions calculations, and the horizontal green lines show the
analytic results. The x axis show s the num ber of grid points used in the calculation.
The left figure show s the error in percentage of MODE Solutions calculation for fundam ental surface plasm on m ode of air/
gold interface at a w avelength of 632.8 nm . The x-axis is the num ber of grid points in the one-dim ensional calculation
region.
It can be shown that if Staircase in the "mesh refinement" setting is used, the errors are much higher than with
the Conformal Variant 1 mesh refinement setting.
Introduction
We will calculate the transmission through a sub-wavelength aperture in a thin silver film. Surface plasmon modes
created by a series of rings around the aperture are used to enhance the transmission. Simulation results will be
compared to the experimental results published by Lezec et al.
Solvers 101
FDTD
Associated files
sp_bullseye.fsp
sp_bullseye_analysis.lsf
See also
Surface Plasmons 1881
Focusing with subwavelength aperture 1912
Simulation setup
The file sp_bullseye.fsp contains a simulation of the structure shown in Figure 1 from Lezec. A bullseye
pattern is etched from a free standing 300nm thick silver layer. The central hole has a radius of 150nm, and goes
completely through the silver layer. Four 60nm deep grooves are etched in both the top and bottom of the layer
surround the hole. Please note that the silver material fitting needs to be adjusted.
A mesh override region is used to force a small mesh around the structures and TFSF region.
A broadband Total Field Scattered Field (TFSF) plane wave source (400-1000nm) is incident on the lower surface. A
frequency domain power monitor is located above the upper surface and will be used to measure transmission
through the aperture. Note that we need unpolarized result, usually it needs at least two simulations, each for one
polarization. For this particular structure, since it has rotational symmetry, so the unpolarized result can be
obtained from a single simulation, see the script in the analysis group. For more information on calculating
response for unpolarized an incoherent illumination, see the Coherence 596 page.
Results
Two simulations are required, with and without the grooves. In the structure group Thin Film, the variable
"make_grooves" allows you to choose if the grooves should be added to the simulation. Set "make_grooves" to 1 to
add the grooves, and 0 to leave them out. By comparing the simulations, enhancement due to the groves can be
determined. For initial results, the mesh override region can be deleted. This will make the simulation faster and
require less memory, but produce less accurate results. As soon as each of the simulations are complete, run the
script sp_bullseye_analysis.lsf. It will calculate a series of far field projections for that simulation and
create three figures. Results for the simulation with grooves are shown on the left, and without grooves on the right.
Fig.1a Transm ission at various collection angles Fig.1b Transm ission at various collection angles
Fig.1 produced by the script shows the far field projection of the transmission monitor as a function of frequency at a
series of collection angles. It is important to note the difference in scale in the two cases. The peak transmission
with the bullseye grooves is about 1.2e-11 at 660 nm. Without the grooves, the transmission at 660 nm is about
2.5e-14. This shows that the grooves improve transmission by three orders of magnitude. This result shows very
good agreement with Figure 1.B in Lezec, et al.
Fig.3a far field projection at the w avelength w ith the peak Fig.3b far field projection at the w avelength w ith the peak
transm ission transm ission
The second figure from the analysis script shows the far field projection at the wavelength with the peak
transmission. The third figure shows a 1D slice of the same data. The above figures show the far field projections at
660 nm. It is clear that adding the grooves results in a much more focused beam. The divergence angle with the
grooves is 5 degrees, compared to 45 degrees without the grooves.
The above image is a vector plot of the poynting vector in the xy plane, above the feature. It is often more meaningful
to plot the poynting vector rather than the fields, as is the case here (plots of the electric field will often contain
vectors pointing in different directions representing the oscillation in the field direction). With a vector plot of the the
poynting vector you can see the direction of power flow. It can be helpful to create an electric field vector plot to
study circularly polarized or elliptically polarized beams.
Solvers 101
FDTD
Associated files
Garcia_Vidal.fsp
Garcia_Vidal.lsf
See also
Surface Plasmons 1881
Bullseye aperture 1910
Related publications
F. J. Garcia-Vidal, L. Martin-Moreno, H. J.
Lezec, and T. W. Ebbesen, Focusing light
with a single subwavelength aperture flanked
by surface corrugations, Appl. Phys. Lett.
83, 4500 (2003).
Simulation setup
As shown above, the simulation contains a structure with a subwavelength aperture surrounded by grooves.
In order to reproduce the results from figure 2 of Garcia-Vidal et al, the structure in Garcia_Vidal.fsp has 20
groves on the output surface with a period of 500nm. The groove width and depth are 40nm and 83.5nm respectively.
Since the authors of the publication assume perfect metal boundary conditions in their theoretical calculations, the
PEC material is used for the structure.
The structure is contained in a group so that it is easy to modify geometrical parameters such as the groove depth
or width.
A 500-600nm TE plane wave impinges on the structure from the left and a monitor is place in the near field to the
right. The near field data from this monitor is used to get the fields as a function of x and y to the right of the
aperture.
Results
After the simulation Garcia_Vidal.fsp has run to completion, run the script file, Garcia_Vidal.lsf. The
script file uses far field projections of the data from the monitor to calculate the fields to the right of the aperture. The
time that it takes to run the script file will depend on how many points are desired in the far field projection. The
results below can be obtained by using 1000 points in x and 500 points in y. The attached script file is set to less in
order to reduce the time it takes to run the script file.
Note that due to grid dispersion, using the far field projections is more accurate than simulating a large area at the
output of the aperture and using a 2D monitor to measure the fields.
Once complete, the script file produces the three figures below. The script also calculates the focal width and length,
and prints the results to the command prompt. The focal length is the distance from the aperture to the focal point
and the focal width is the full width half maximum of the fields in the direction perpendicular to the field propagation.
For the attached simulation, the focal length and width are
Cut along the line y=0 from the previous picture. The peak occurs at the focal length determined to be 47.58
microns.
We gratefully acknowledge collaborative development of this example with Joseph Lakowicz and Mustafa Chowdhury
at the Center for Fluorescence Spectroscopy, Medical Biotechnology Center, University of Maryland School of
Medicine (http://cfs.umbi.umd.edu/jrl/index.html), Stephen Gray at Argonne National Labs (http://
anchi8.chm.anl.gov/staff/chem-dyn/gray.html), and discussions with David Ginger at the University of Washington
(http://depts.washington.edu/gingerlb/).
Solvers 101
FDTD
Associated files
fluorescence_decay.fsp
fluorescence_decay_setup.l
sf
fluorescence_decay_analysi
s.lsf
See also
Surface Plasmons 1881
Mie scattering 3D 1752
dipolepower 1600 script function
Source - Dipole 511
Related publications
J. Gersten and A. Nitzan,
"Spectroscopic properties of
molecules interacting with small
dielectric particles", J. Chem. Phys.
75, 1139 (1981).
L. Novotny and B. Hecht, "Principles
of Nano-Optics", Cambridge
University Press, Cambridge,
(2006).
Chowdhury, et al, Systematic
Computational Study of the Effect of
Silver Nanoparticle Dimers on the
Coupled Emission from Nearby
Fluorophores, J. Phys. Chem. C.,
112(30), 11236-11249 (2008).
P. Bharadwaj and L. Novotny,
"Spectral dependence of single
molecule fluorescence
enhancement," Opt. Express 15,
14266-14274 (2007).
Backgroud
The analysis of the FDTD results rely on the fact that, for an atomic dipole transition that can only occur through
radiation, the quantum mechanical decay rate in an inhomogeneous environment can be related to the classical
power radiated by the dipole in the same environment [Novotny and Hecht]. Specifically, we have the relationship
g P
=
g 0 P0
where
g and P are the decay rate and radiated power in an inhomogeneous environment (with the nanoparticle near the
dipole source),
g0 and P0 are the decay rate and power radiated in a homogeneous environment (without the nanoparticle, but just
the dipole source).
QE =
g
rad non- rad
g +g
where grad and gnon-rad are the radiative and non-radiative decay rate.
Simulation setup
The fsp file fluorescence_decay.fsp should be used as the starting fsp file. Note that we use symmetric and/
or anti-symmetric boundary conditions to reduce the simulation time and memory. After opening this file, run the
script file fluorescence_decay_setup.lsf. At the start of this script file, the dipole orientation, material,
sphere radius, distance between the dipole and the sphere, the mesh size and mesh accuracy can be chosen. The
mesh size is applied using a mesh override region and will only be used over the sphere and dipole. Outside this
region, automatic graded meshing will be used with the specified mesh accuracy setting.
perpendicular = 0; # set to 0 for parallel orientation
material = "Au (Gold) - Palik";
a = 20e-9; # sphere radius
d = 15e-9; # distance between dipole and sphere surface
dx = 5e-9; # mesh size used over sphere and dipole region
mesh_accuracy = 2; # used outside the sphere and dipole region
After running the setup script, run the simulation.
Results
The script file file fluorescence_decay_analysis.lsf can be used to analyze the FDTD results and compare
to theoretical values. The theoretical values are calculated for a dipole distance of d-dx and d+dx. The FDTD result
should lie between these two theoretical calculations, since the position of the dipole (and the sphere radius) can
only be accurately defined to within about dx. If you modify the dipole orientation, sphere radius, distance between
the dipole and sphere or the mesh size, dx, in the setup script, you must also make the same modification in the
analysis script.
The normalized decay rate is the ratio of the decay rate for the fluorophore (dipole) near the nanoparticle to the
decay rate of the fluorophore (dipole) in free space. The script file creates three figures:
1. The normalized radiative decay rate vs wavelength. ( grad / g0rad )
2. The normalized non-radiative decay rate vs wavelength. ( gnon-rad / g0rad )
3. The quantum efficiency (QE) vs wavelength
Fig. 1 Sim ulation and theoretical results for parallel orientation (x polarized)
Fig. 2 Sim ulation and theoretical results for perpendicular orientation (z polarized)
In the above figures, for both parallel and perpendicular dipole orientations, we see that the FDTD results are
between the theoretical results for d-dx and d+dx, with d=15nm and dx=5nm.
Below, we see the results for parallel and perpendicular orientations in this case. Again, the agreement between
FDTD and the theoretical calculations is good, particularly when we consider the difference between theoretical
values for dipoles-sphere distances of d-dx and d+dx. The FDTD results for the perpendicular orientation are
sometimes slightly outside the expected range. This is partly due to errors in the FDTD calculations and partly due
to the approximations made when calculating the theoretical results.
Fig. 3 Sim ulation and theoretical results for parallel orientation (x polarized) w ith higher m esh accuracy
Fig. 4 Sim ulation and theoretical results for parallel orientation (z polarized) w ith higher m esh accuracy
Advanced settings:
Simulation auto-shutoff
The simulation auto-shutoff is used to terminate simulations when the fields have decayed. The default setting is 1e-
5, meaning that the simulation will shutoff when the electromagnetic energy has decayed to 1e-5 of it's peak value.
For broadband simulations and resonant structures, this can sometimes lead to ripples in the frequency domain
monitors at certain wavelengths because the simulation can terminate too early for some resonance. In this
example, the default settings lead to small ripples for wavelengths above approximately 650nm. To avoid the
problem, this setup script sets the auto-shutoff limit to 1e-8.
get good results. While this is very unlikely to occur in general, in some unfortunate geometries it can lead to very
slow convergence.
This situation will most likely occur when the radius, a, is an integer multiple of dx/2. In this case, the mesh cell at
(0,0,a) may be counted as inside the metal sphere, while neighboring cells, for example (dx,0,a) are in air. This
sharp "point" near the dipole at (0,0,a+d) can make the simulation slower to converge. To avoid this, the setup script
sets the radius to be a-0.01nm. By reducing the radius by 0.01nm, we avoid a sharp point of metal possibly
appearing near the dipole.
If you are interested in testing your own structures, use an index monitor and disable the spatial interpolation, as
shown below.
You can then look at all three components of the index (x, y and z). If you see an image like the one below, you
should consider making a small change to the object dimensions or mesh settings.
Alternatively, if you see an image like this, then the surface of the sphere appears flat near the dipole and you will
get faster convergence.
In most cases, the results should converge as dx is reduced, and the rate of convergence is faster when lightning
rod effects are avoided.
Solvers 101
FDTD
Associated files
sp_filter.fsp
sp_filter.lsf
See also
Surface Plasmons 1881
Related publications
Tal Ellenbogen et al, "Chromatic Plasmonic
Polarizers for Active Visible Color Filtering and
Polarimetry", Nano Lett.12(2):1026-31 (2012)
Simulation setup
The file sp_filter.fsp can be used to simulate an array of chromatic plasmonic polarizers (CPPs). The
simulation file contains one unit cell of the periodic structure. The polarization angle of the source can be set in the
polarization Analysis Group. If set to 0 or 90 degrees, the group will automatically use either symmetric or anti-
To obtain the polarization information required for figure 2, two simulations are necessary, which is done by the
figure2 object in the Optimization and Sweeps window. To obtain information on the transmission minima to
recreate figure 3, we use the figure3 sweep object which will record the transmission minimum as a function of
CPP horizontal length.
Results
The results of the sweeps should already be saved into the file. However, it is a good idea to try rerunning each
parameter sweep. The script file sp_filter.lsf will then analyze the results and plot them as they are displayed
in figures 2b, 2d and 3 of Ellenbogen et al. Please modify figre2 and figure3 to be 1 as to run the sweep and 0 not to
run the sweep.
We can see that there is good agreement with the published results. To improve the results, it would be possible to
use a smaller mesh size (here we use 5nm over the Al CPP), replace the ITO with a better material model (here we
used a dielectric with n=1.9), and draw the structure in a way that is closer to what has been fabricated. Also, it
should be noted that the polarization angle definition was reversed between figures 2b and 2d of the publication.
Introduction
We will calculate the transmission and reflection spectrum from an array of nanoholes in a metallic film. We will also
consider the near field profiles at the surface of the film and the local field enhancements.
Solvers 101
FDTD
Associated files
sp_array.fsp
sp_array.lsf
See also
Surface Plasmons 1881
Simulation setup
The file sp_array.fsp can be used to simulate an array of nanoholes of radius 100 nm and pitch 400 nm in a 100
nm thick layer of gold. The gold layer uses the "Au (Gold) - CRC" model included in the default material database.
The plane wave source covers a wavelength range of 400 to 750 nm. A single unit cell of the array is modeled, and
symmetric/anti-symmetric boundary conditions are used to further reduce the simulation volume by a factor of 4.
(Please note that symmetric/anti-symmetric boundaries must be consistent with the source polarization.) With an
FDTD mesh accuracy of 2, and a 10 nm mesh override in the gold, the simulation runs in a few seconds on a single
computer. Some convergence testing of the mesh size should be done for each simulation and typically mesh sizes
of 5 nm or less should be used for the final results.
Results
After running the simulation, run the script file sp_array.lsf. It will perform a series of representative calculations
and create the figures shown below. We can see that there are a number of resonances with the strongest at
approximately 675nm. The script also creates a figure of the transmission normalized to the area of the hole divided
by the unit cell area, which makes it easy to see where we have extraordinary transmission.
The cross section in the x-z plane shown below has the colorbar adjusted to a range of 1 to 10. This makes it
possible to easily see the region where the near field intensity enhancement is at least 10.
In the following application example, we will measure the local enhancement factor near a Pt nanoparticle on a
smooth Ag surface.
Solvers 101
FDTD
Associated files
sers_pt_ag.fsp
sers_pt_ag.lsf
See also
Surface Plasmons 1883
Mie scattering 3D 1752
Related publications
Kim K, Choi JY, Lee HB, Shin KS.,Raman scattering of
4-aminobenzenethiol sandwiched between Ag
nanoparticle and macroscopically smooth Au substrate:
effects of size of Ag nanoparticles and the excitation
wavelength.,J Chem Phys. 2011 Sep 28;135(12):124705
Kwan Kima, Hyang Bong Leea,Kuan Soo Shinb,
Surface-enhanced Raman scattering characteristics of
nanogaps formed by a flat Ag substrate and spherical
Pt nanoparticles, Spectrochimica Acta Part A100(2013)
10-14
Kwan Kim,Dongha Shin,Hyang Bong Leea and Kuan
Soo Shin, Surface-enhanced Raman scattering of 4-
aminobenzenethiol on gold: the concept of threshold
energy in charge transfer enhancement, Chem.
Commun., 2011,47, 2020-2022
Wen-Di Li, Fei Ding, Jonathan Hu, and Stephen Y.
Chou, Three-dimensional cavity nanoantenna coupled
plasmonic nanodots for ultrahigh and uniform surface-
enhanced Raman scattering over large area, Optics
Express, Vol. 19, Issue 5, pp. 3925-3936 (2011)
Simulation challenge
Under proper conditions, both the metallic nanoparticle and the plasmonic surface can produce localized surface
plasmon and surface plasmon polariton (SPP). When the two geometric objects are very close but not in touch, the
positive interference between their surface plasmons can create huge field intensity in the "hot spot" inside the gap.
Typical size of the gap is in a few naometers or even smaller. This can lead to large memory requirement and long
simulation times. We use TFSF source, and simulate only a small piece of the structure, in order to find the
maximally possible EFs.
The profile monitors "xz" and "yz" are used to record the local field profile at 50 frequency points.
After running this simulation, run the script file sers_pt_ag.lsf to calculate the enhancement factor (E^4). The
following figures show E^4 in the XZ plane. The coarse simulation runs in about 40 minutes on a reasonable
computer and requires about 1.5 GB of memory. The higher accuracy simulation (0.2nm gap z mesh, 0.5nm gap x/
y mesh), the time and memory increase by roughly a factor of 10.
Tips:
- Convergence testing: The localized EF may be strongly dependent on the mesh, you may need to have
convergence test.
- Mesh size: We are most interested in making the z mesh small at the gap, to help resolve the very small (1nm)
gap distance). It is less important to force a small mesh in the X/Y directions, since the structure is not changing
so rapidly in those directions. However, if the aspect ratio of the mesh (ie. the difference in size between the X/Y
and Z mesh) become too large, the simulation can become unstable. In such situation, it may be necessary to
force a smaller X/Y mesh. Another possible solution is to slightly reduce the 'dt stability factor' (property can be
found in the FDTD region - mesh settings tab).
Solvers 101
FDE
Associated files
sp_waveguide.lms
See also
Surface Plasmons 1881
Related publications
C.R. Lavers and J.S. Wilkinson, "A
waveguide-coupled surface-plasmon sensor
for an aqueous environment", Sensors and
Actuators, B 22, 75-81, (1994)
Simulation setup
The file sp_waveguide.lms is setup as described in Lavers and Wilkinson.
The Silver material properties are defined with the silver material "Ag (silver) - Johnson and Christy" included with
MODE Solutions, rather than the values specified in Lavers and Wilkinson. This could account for some of the
differences between these simulations and the results given in the paper.
Results
Mode profile
Select the Analysis - Modal Analysis tab. Set the wavelength to 500nm. Click the Calculate Modes button to
search for propagating modes in this structure. Three modes will be found. The first, with an effective index of
approximately 1.57, is the surface plasmon mode. We can tell that this is the surface plasmon mode because it has
a high loss and most of the field intensity is near the silver layer. The second and third modes, with effective indices
close to 1.52, are the waveguide modes. These modes have much lower loss and are primarily confined to the
waveguide layer. The following figure show the mode profiles.
The figure on the left shows |E|^2 as a function of y while the right figure shows |Ey|^2 as a function of y. Notice that
the fields in Mode 1 and Mode 3 are TM polarized (Ey and Ez only) while Mode 2 is TE (Ex only). This is important
because it means the surface plasmon mode (Mode 1) can only couple to one of the waveguide modes (Mode 3).
The line with the steep slope is the surface plasmon mode. At approximately 547nm, the effective index of the
surface plasmon mode becomes equal to the effective index of the waveguide modes. At this point, the TM modes
will have the highest coupling efficiency. We expect the TM waveguide mode to suffer from high loss at this
wavelength because energy from the waveguide mode will couple into the high loss surface plasmon mode.
It is also interesting to notice the drastic change in slope of the surface plasmon mode at 555nm. At this point, the
effective index is 1.512; the value of the substrate index. The mode is no longer confined to the metal layer and
begins radiating power into the substrate.
Due to the implementation of the frequency sweep, color coding of the modes becomes mixed up at crossing points.
This problem usually does not occur with the "track selected mode" option, as we will see in the loss section
below. However, the "track selected mode" option only allows for one mode to be tracked at a time. Therefore three
frequency sweeps would be required.
Loss vs wavelength
Still in the Analysis - Frequency analysis tab, select Set calculation parameters from the options menu. Select the
TM waveguide mode (mode 3). Select "track selected mode", then start the frequency sweep. Once the sweep is
finished, select "Loss" from the list of Plot options below the figure. The following figure will be displayed.
As expected, the mode has much higher loss at approximately 550nm because it can couple to the surface
plasmon mode. This result matches Figure 3 from Lavers and Wilkinson.
Solvers 101
FDTD
FDE
Associated files
GPW.lms
GPW.fsp
MODE_simulation_endfire.lsf
MODE_simulation_width.lsf
MODE_transmission_vs_NA.ldf
FDTD_sweep_plot_results.lsf
FDTD_helper.lsf
FDTD_transmission_vs_NA.ldf
See also
Surface Plasmons 1881
Related publications
Jing Wen, Sergei Romanov, and Ulf Peschel,
"Excitation of plasmonic gap waveguides by
nanoantennas," Opt. Express 17, 5925-5932
(2009)
Simulation setup
The file GPW.lms sets up the gap surface plasmon waveguide model as shown in the screenshot below. Here the
graded mesh capability is particularly powerful for the rapid field variations present in surface plasmon devices.
In the Analysis window (shown below), one can easily find the mode(s) of interest by scanning through a specific
refractive index range, or searching near the maximum refractive index at the wavelength of operation.
To find the modes of interest, scan over refractive indices between the low-index core and the high-index cladding
layers.
Each mode found is expressed in terms of effective index, propagation loss configured in length units expressed
1. Calculate the coupling efficiency of end-fire coupling a high NA source into the gap surface plasmon waveguide
2. Analyze the efficiency of the optical antenna structure as an alternative in-coupler for the gap surface plasmon
waveguide
We use MODE_simulation_width.lsf to calculate how the imaginary part of the gap surface plasmon
waveguide propagation constant varies with waveguide width.
Results
1. Calculate how the imaginary part of the gap surface plasmon waveguide propagation constant varies
with waveguide width
The width of the waveguide metal layers are varied from 50 to 150nm, and the imaginary part of the propagation
constant is recorded. In the limit of very wide waveguides, a propagation constant of 1.65 - 0.024i is calculated, in
good agreement with the work of Wen et al.
2. Calculate the coupling efficiency of end-fire coupling a high NA source into the gap surface plasmon
waveguide
A series of high numerical aperture modes ranging from NA=0.5 to NA=0.9 are recorded, with the overlap calculation
performed for each combination.
The figure above shows that only 2.5% - 5.9% (depending on the NA) of the incoming light is coupled into the gap
surface plasmon waveguide mode, owing to the very high confinement of light within the air region between the two
metal electrodes
3. Analyze the efficiency of the optical antenna structure as an alternative in-coupler for the gap surface
plasmon waveguide
To analyze the coupling efficiency of the optical antenna structure, a 3D model GPW.fsp is constructed in FDTD
Solutions (shown below). The optical antenna consists of two electrodes with 90 degree stub sections, illuminated
with a high NA beam focused on the center of the antenna.
The polarization of the high NA source is oriented perpendicular to the direction of waveguide propagation
A monitor plane is established at the end of the antenna to measure the power flow through that surface, which
normalized to the source power provides the coupling efficiency of the antenna
The "beam_position" parameter sweep project in GPW.fsp finds the optimal position along the length of the gap
surface plasmon waveguide to focus the light beam by iteratively running a series of simulations at different source
locations. A planar transmission monitor at the entrance of the waveguide measures the power transmission, taking
into account both the optimum location to couple light into the waveguide, and propagate it along the length of the
gap surface plasmon waveguide which has losses on the order of 1 dB/micron.
The "NA" parameter sweep project calculates the coupling efficiency of injecting light into the gap surface plasmon
waveguide (for NA=0.5 to NA=0.9, as in step 2). We store this data in FDTD_transmission_vs_NA.ldf and
compare this result with that of the end-fire coupling case in step 2 using FDTD_sweep_plot_results.lsf.
One can see that comparable coupling efficiencies on the order of 2-5% are obtained with high NA objectives.
However, the integration benefits of coupling into the gap surface plasmon waveguide from the surface demonstrates
the promise of utilizing such optical antenna structures to achieve high-density integrated optical components. In the
case of the optical antenna, normalizing the coupled light to the power contains in a 1 micron diameter spot, as is
done in Wen et al. yield coupling efficiencies in excess of 10%, as reported in that paper
Solvers 101
FDTD
HEAT
Associated files
Part 1:
diabolo_array.fsp
dipole_array.fsp
diabolo_array.ldev
dipole_array.ldev
get_Pin_sweep_result
.lsf
Part 2:
diabolo_superstructu
re.fsp
diabolo_single.fsp
diabolo_superstructu
re.ldev
diabolo_single.ldev
See also
Surface Plasmons 1881
Related publications
[1] Z. J. Coppens, W. Li,
D. G. Walker, and J. G.
Valentine, "Probing and
Controlling Photothermal
Heat Generation in
Plasmonic
Nanostructures," Nano
Letters, vol. 13, pp. 1023-
28, 2013.
An (advanced) "Power absorbed" analysis group is used to measure and save the absorbed optical power in the
antenna. The analysis group is modified so that it can calculate the absorbed power for a certain input power
defined by the "input_power" parameter and can save the data in a .mat file whose name is defined by the
"filename" parameter.
The dipole_array.fsp project file uses a similar setup using dipole antennae where each antenna is 215
nm long, 50 nm wide, and 50 nm thick [1].
Thermal (HEAT)
Open the diabolo_array.ldev project file in DEVICE. The thermal simulation is performed for one unit cell
centered on one gold diabolo antenna and so the structure in the project file contains a single antenna on top of
a Sapphire (Al2O3) substrate. The dimensions of the antenna is identical to the setup in FDTD Solutions. The
thickness of the substrate is set to 250 micron which is a typical value for commercially available sapphire
wafers. An Import heat source is used to import the optical absorption data saved by FDTD Solutions to be
used as heat input to the simulation. Two temperature monitors are placed surrounding the antenna to record
the temperature profile. A sweep (Pin) is set up in the project file to apply a scaling factor on the heat source to
perform multiple simulations under varying input powers.
The fixed temperature thermal boundary condition is applied at the bottom of the simulation region to set it at
room temperature (300 K). The top of the simulation region is covered by air which has a convective boundary
condition defined at its interface with gold and sapphire to model heat loss at the top surface of the structure
through convection. The model for convection is chosen to be constant with a convective heat transfer
coefficient h = 10 W/m2K from the Material Interfaces.
Optical Resonance
Open the diabolo_array.fsp project file in FDTD Solutions. Open the property editor for the plane wave
source (incident) and change the frequency range to start from 0.9 micron and stop at 1.2 micron. Run the
simulation and visualize the Transmission from the "transmission" DFT monitor. Use scalar operation "-Re" to
make the sign of the real part of transmission positive. The plot will show that the transmission has a minima
around 1064 nm which is consistent with the findings of Ref. [1]. Alternatively, right click on the analysis group
and plot Pabs_total to visualize the absorbed power which also shows a maxima around 1064 nm indicating that
the diabolo antenna has a resonance at a wavelength of 1064 nm. The same simulation can be done for the
dipole antenna using the dipole_array.fsp project file.
Optical absorption
Next, edit the property of the plane wave source again (in the diabolo_array.fsp project file) and change it
back to a single wavelength of 1064 nm by setting both the start and stop wavelengths at 1.064 micron. Run the
simulation again and once the simulation is run, right click on the analysis group and click "Run analysis". The
analysis group will calculate the absorbed power in the antenna and save it in a .mat file whose name can be
defined under from the Analysis tab. By default the name of the .mat file is set to be
Pabs_diabolo_array_1mW.mat. The input power is scaled in the analysis group to an input power of 1mW
for the entire array. Consistent with the experimental setup of Ref. [1], we assume that the incident beam has a
FWHM of 19.5 micron covering 2583 antennae. Thus, in the analysis group, we use an input power of 1/2583
mW or 3.87147e-07 W for the unit cell to scale the absorbed optical power. After the analysis is done, we can
right click on the analysis group to visualize the absorbed power (Pabs).
Following the same approach, simulate and save the absorbed power for the dipole antenna array using the
dipole_array.fsp project file.
Thermal (HEAT)
Open the diabolo_array.ldev project file in DEVICE. The heat source (heat) already has the optical
absorption data loaded but you can also load the Pabs_diabolo_array_1mW.mat file onto the heat source
and select the Pabs attribute to import the data saved by FDTD simulation. Set the scaling factor in the heat
source to 55 corresponding to an optical input of 55 mW and run the simulation. Once the simulation is run, the
results will be loaded in the HEAT solver region and in the temperature monitors. Right click on the first monitor
(monitor_1) and visualize temperature to see the temperature profile.
Tem perature profile at the antenna and the top surface of the
substrate
Next, from the optimizations and sweep window, run the "Pin" sweep to vary the input optical power from 5 mW
to 125 mW in 7 steps and run the simulations. The sweep saves the "boundary" dataset available in the HEAT
solver region as a result which records the power flow at the boundaries. However, the result that we are
interested in is the temperature rise in the simulation structure under different optical intensities. The script file
get_Pin_sweep_result.lsf script file can be used to read the temperature profile from each of the
simulation files and calculate the average increase in temperature so that it can be plotted against input optical
power. Make sure that the "project_name" variable in the script is set to the name of the .ldev file and run the
script.
The script will load the temperature data in monitor_2 of each simulation file to get the surface temperature for
each incident power. We then assume that the 2583 antennae in the center of the array that gets illuminated by
the incident light are at an uniform temperature given by the peak temperature in monitor_2 and the surrounding
region where the antennae are not illuminated is at a constant temperature equal to the room temperature (300
K). the temperature distribution is thus assumed to have the top-hat profile shown below (left). The total surface
area is considered to be 85 micron x 85 micron as per Ref. [1]. By comparing the ratio of the illuminated and
unilluminated area, the increment in average surface temperature is found to be equal to 0.0413*(Tsim - 300). The
script calculates this rise in average temperature and plots it as a function of input optical power. This averaging
is done so that the simulation result for a single unit cell can be compared against the measured temperature of
the entire experimental setup. The figure below (right) shows the temperature rise for both the diabolo and dipole
arrays as a function of input power. The plot is in agreement with Fig. 4(b) of Ref. [1].
Optical sim ulation setup for the diabolo antenna w ith plasm onic lens (superstructure)
Thermal (HEAT)
Open the diabolo_superstructure.ldev project file in DEVICE. The setup contains the single antenna
on top of the Sapphire substrate. The thickness of the substrate is kept at 250 micron. However, the X and Y
span of the simulation region has been made larger (4.44 micron) in this simulation to match the FWHM of the
incident beam in order to account for the spreading of the heat in the surrounding area. The same two
temperature monitors are used to capture the temperature and the same fixed temperature thermal boundary
condition is used at the bottom surface of the substrate to keep it at 300 K. The top of the simulation region if
filled with Air with convective boundary conditions defined in the Material Interfaces. The import heat source has
been loaded with the result saved by FDTD simulation of the diabolo_superstructure.fsp project file.
The diabolo_single.ldev project file also has an identical setup with the difference that the heat source
has been loaded with result from the simulation of the diabolo_single.fsp project file.
NOTE: Due to the large simulation volume, the run time of these simulations will be quite long as compared to
the periodic array simulations.
Pabs for the single antenna and the superstructure at Z= 0.00785 m icron
Thermal (HEAT)
Open and run the diabolo_superstructure.ldev project file in DEVICE. Once the simulation is run right
click on monitor_1 and visualize temperature. Similarly, run the diabolo_single.ldev project file and
visualize the temperature profile from monitor_1. The figure below shows that the peak temperature in the
superstructure is considerably larger than in the single antenna. The peak rise in temperature in the
superstructure (antenna with lens) is approximately 280 K where the peak rise in temperature for the single
antenna is about 70 K. These results are in agreement with the simulation results from Ref. [1].
Tem perature profile for the single antenna and the superstructure w ith the plasm onic lens
Getting started
Download relevant products:
FDTD Solutions
MODE Solutions
Application examples
Solvers 101 Description
Solvers 101
FDE
Associated files
arrow_rib.lms
Reference
F. Prieto, L. M. Lechuga, A. Calle,
A. Llobera, and C. Dominguez.
"Optimized silicon antiresonant
reflecting optical waveguides for
sensing applications," IEEE J.
Lightwave Tech., 19, 75-83 (2001)
We construct the core of the waveguide with a rectangle. To make the coating 1 layer, we take the same rectangle,
change the material and make it a bit larger. Then we set the mesh order property. This acts like a Boolean
operation so that when the core and the coating rectangle overlap, the FDE solver uses only the material properties
from the core.
The coating 2 layer is created similarly. We use an even larger rectangle, and place it on top of the core and first
coating layer. Then we set the mesh order so that where the three materials overlap, the eigenmode solver uses only
the material data from the core. When the two coating layers overlap, the eigenmode solver uses only the material
data from the first coating layer.
The medium to which this structure is exposed, in this case water, is modeled by setting the background index of
the FDE solver to 1.3325.
Because we are looking for the fundamental TM mode, we know that we can use symmetric boundary conditions.
This filters out the modes which do not have the correct symmetry, for example the fundamental TE mode. You can
get a complete list of the modes the structure supports by setting all the boundary conditions to PML. You can find
more information about symmetric/anti-symmetric boundary conditions on the Symmetric and anti-symmetric BCs
466 page.
The reason that the boundary conditions have been set to PML is because this waveguide is expected to have
attenuation loss. The loss returned by the FDE solver is equal to the loss to dispersive materials plus the loss
through the PML.
The loss returned for this mode is 2.07 dB/cm. Figure 12a of the reference contains a plot of loss versus structure
size for a slightly different structure. Nevertheless, the loss from the FDE solver is close to what would be expected
from the plot in the paper.
The following plot shows the loss for this mode as a function of wavelength. You can see that the loss increases
quickly as the wavelength increases.
Objective
This page reviews how one can calculate Green's function components, local density of states and spontaneous
decay rate and discusses how the aforementioned quantities relate to the dipolepower command in FDTD Solutions.
The derivation of the equations are for the most part taken from Novotny's "Principles of nano-optics".
Solvers 101
FDTD
Associated files
dipole_gf.fsp
dipole_gf.lsf
dipole_field.fsp
dipole_field.lsf
dipole_field_advanced
.fsp
dipole_field_advanced
.lsf
See also
Dipolepower 1600
Sourcepower 1601
Transmission box 841
Source - Dipole 511
Fluorescence enhancement
1915
References
L. Novotny and B. Hecht,
Principles of Nano-Optics,
Cambridge (2006).
NOTE: To observe the behaviour of the real part of the electric field as a function of position, open and run
dipole_field.fsp and dipole_field.lsf. Both the real and imaginary parts are plotted. The real part
approaches infinity at the location of the dipole. However, when it is averaged over one mesh cell, it is a finite
negative value, as shown in the figure below. To achieve closer agreement between the FDTD result and the
theoretical average, special care must be taken to set-up the simulation appropriately. For more information, see the
note below for advanced users.
When the mesh size is reduced, the relative error between the FDTD real part of the field and theoretical average at
the dipole location decreases, however the absolute error increases.
From this, the spontaneous decay rate for a two-level quantum system at r0 and w0 can be calculated:
2w
g= | m |2 r z (r0 , w )
3h e 0
The total local density of states is obtained by averaging over the different orientations which translates to averaging
the three diagonal G components:
1 6w 6w 6w 2w t
r (r0 , w ) = 2 Im{Gxx (r0, , r0, ; w )} + 2 Im{G yy (r0, , r0, ; w )} + 2 Im{Gzz (r0, , r0, ; w )} = 2 Im{Tr[G (r0, , r0, ; w
3 pc pc pc pc
The second part of the script, dipole_gf.lsf, calculates the power radiated by the dipole next to a dielectric sphere
normalized to the power that would be radiated by a dipole in a homogenous medium.
This calculation is done using the dipolepower function, the Green's function formulation as well as a box of monitors
enclosing the dipole. The box of monitors is useful for dispersive or lossy media where the results of dipolepower are
not reliable. All results are in close agreement as shown in the figure below:
Given the close agreement of the dipolepower command with the green's function formulation, when we are
interested in calculating LDOS or the decay rate, we can directly use the dipolepower function instead of calculating
the imaginary part of Green's function first:
12 e 0 e r (dipolepowe r ( f )) | sourcenorm ( f ) |2
r z (r0 , w0 ) =
pw 2 | m |2
8 e r (dipolepowe r ( f )) | sourcenorm ( f ) |2
g (w) =
pwh
The last part of the script dipole_gf.lsf, calculates and plots these. Note that both the decay rate and the LDOS
quantities are for the zz direction only. One would need to sum up the results in all three orientations for the total
rates.
Solvers 101
FDTD
Associated files
antenna_linear.fsp
antenna_do_far_field.lsf
See also
Low frequency simulations 627
Related publications
J. D. Jackson, "Classical Electrodynamics,
Second Edition", John Wiley & Sons, 1975,
p. 401
Simulation setup
The above screenshot shows a thin, center fed, linear antenna of length d, oriented in the z direction. When driven
with a sinusoidal input, the current density is approximately
r kd r
J ( x ) = I sin - k z d ( x) d ( y ) e
2 for |z|<d/2, k=2*pi/lambda.
In FDTD Solutions, we can create such a current density with a series of dipoles. The amplitude of each dipole is
set based on the above formula.
A box of power monitors records the radiation pattern from the antenna, and calculates the far field radar cross
sections.
The group called "linear antanna" is a construction group that creates the linear antenna from a number of electric
dipoles.
There is a simple analytic formula for the radiation cross section when the antenna length is equal to 1/2 lambda, or
lambda. The script will plot the FDTD result together with the theoretical result. As the figures show, the agreement
is very good.
XZ far field radiation cross section XZ far field radiation cross section
Getting started
Download a free trial of FDTD Solutions and MODE Solutions
Download free trial
Introduction
In this example, we will model a simple uniaxial LCD layer. For more complex LC orientations, see Twisted Nematic
LCD 1955 .
Solvers 101
FDTD
Associated files
LCD.fsp
See also
LC rotation 263
Twisted Nematic LCD 1955
Tuning of SOI ring resonator 1956
Simulation setup
The anisotropy resulting from the orientation of liquid crystals cause light polarized along the LC director to
propagate at a different velocity than light polarized along the perpendicular direction. This birefringence leads to a
change in polarization between the incident light and the light that is transmitted through the LC layer.
To model this effect in FDTD Solutions, we will use an anisotropic material and a LC grid attribute object, which
allows us to specify an arbitrary orientation for the LC layer. All we have to do in this case is to set the angles theta
and phi in the LC attribute object corresponding to the desired LC orientation. In LCD.fsp, we start with a plane
wave polarized at 45 degrees in the x-y plane, and use the polarization ellipse analysis group to study the change in
polarization for the transmitted light. The polarization ellipse analysis object can be found in the object library
Results
We will look at the results for two types of LC orientation: the first with the LC director pointing along the z axis
(theta = 0, phi = 0), and the second with the director pointing along the y axis (theta = 90, pi = 0). In the first case,
the light polarized along the x and y directions will still propagate at the same velocity, so we do not see any change
in the polarization of the output light. In the second case, the light polarized in the y direction will propagate at a
different velocity than x, and we will see a change in the polarization as a result of the difference in phase between
the two components. This phase difference is directly proportional to the thickness of the LC layer:
2 phDn
Df =
l
To determine the optimal thickness required to change the polarization by 90 degrees (ie. from 45 degrees to -45
degrees), we set up a parameter sweep project to sweep the thickness of the LCD layer from 2 to 3 microns, and
track the ellipticity (ie. the ratio between the major and minor axis) as a function of this change. The result of the
parameter sweep is shown below (you can see this by right-clicking on the sweep project, and selecting Visualize-
>ratio) .We can see that the optimal thickness is around 2.75um.
l
h= = 2.75 mm
This is the expected result for
D f = p , since 2Dn .
Introduction
In this example, we will model a Twisted Nematic LCD (TN-LCD). For a simple uniaxial LCD, see Simple LCD 1953 .
Solvers 101
FDTD
Associated files
LCD_twist.fsp
LCD_twist.lsf
LCD_twist_analysis.lsf
See also
LC rotation 263
Simple LCD 1953
Tuning of SOI ring resonator 1956
Simulation setup
When no voltage is applied across the TN-LCD, the liquid crystals are oriented in a twisted configuration, and the LC
director makes a homogeneous turn of 90 degrees from the bottom surface of the LC layer to the top. As the light
enters the LC with a polarization parallel the bottom director (x axis in this example), the linear polarization of the
light will roughly follow the rotation of the director, and as a result the light transmitted will be polarized in the y
direction. When a voltage is applied, the external electric field forces the LC director to become homogeneous and
parallel to the propagation direction, and there will be no change in the polarization state of the light.
To model the 90 degree twist in the LC orientation in FDTD Solutions, we will use an anisotropic material combined
with a LC import grid attribute. The script LCD_twist.lsf sets up the LC orientation in the helical twist
configuration, as can be seen in the file LCD_twist.fsp. We start with a plane wave source that has the same
polarization as the bottom LC director (along the x axis), and use a 2D DFT monitor to track the change in
polarization of the light as it propagates through the TN-LCD .
Results
Here, we can define the polarization (at each point along z) by the TE fraction:
2
Ex
2 2
Ex + Ey
The script LCD_twist_analysis.lsf plots the "TE fraction vs z" in the TN-LCD layer:
When operating in a real situation, the TN-LCD layer will be sandwiched between two polarizers (with a 90 degree
polarization difference). Without an external field, the light will go through a 90 degree polarization change in the
LCD layer and will therefore be allowed to pass through the top polarizer (hence the ON state). When an external
field is applied, the crystal will become aligned with the field, and as a result, there will be no change in the
polarization of the incident light, and the top polarizer will not allow any light through (hence the OFF state).
Introduction
In this example, we will model tuning of an SOI ring resonator filter using liquid crystals (LCs).
Solvers 101
FDTD
VarFDTD
Associated files
LC_ring_resonator.fsp
LC_ring
resonator_setup.lsf
LC_waveguide.lms
See also
LC rotation 263
Simple LCD 1953
Twisted nematic LCD 1955
Optical switch 1959
Optical phased array 1962
Related publications
W. D. Cort, J. Beeckman, T. Claes,
K. Neyts, and R. Baset, "Wide
tuning of silicon-on-insulator ring
resonators with a liquid crystal
cladding" Opt. Lett. Vol. 36, No. 19,
pp. 3876-3878 (2011)
Simulation setup
The ring resonator covered with LCs is considered here. The evanescent tail of the propagating mode outside the
waveguide feels different refractive index depending on the direction of LCs, which result in the change of the effective
index of a mode. By modifying the mode effective index, we can tune the resonant wavelength of the ring resonator.
The script file LC_ring resonator_setup.lsf sets up the distribution of LC orientations. Then you can set up
the distribution of LC orientations. The variable "alignment" in the script file controls the orientation. If you set
"alignment=0" or "alignment=1", the LCs align along the waveguide or align vertically, respectively. The ordinary
index no and extraordinary index ne of the LC is, respectively, no =1.53 and ne =1.71.
Results
To calculate the change of the effective index for different LC orientations, we also prepare MODE Solutions
simulation file LC_waveguide.lms. In the material database in this simulation file, we define LC materials named
LC_x, LC_y and LC_z where the LC is aligned x-, y-, and z- axis, respectively. The figure below shows the mode
profile for x-aligned LC and we can see that there exists electric field distribution outside the waveguide. When the
orientation of LCs which cover the waveguide is changed, the evanescent field feels different refractive index, which
results in the change of the effective index of a waveguide mode.
Using MODE Solutions, we can also calculate effective indices and evaluate the amount of the change of the
effective index for different LC orientations. The figure below shows the effective indices for the fundamental TE
modes for different LC orientations together with those for isotropic materials with no and ne.
The figures below show the transmission of the drop and through port for different LC orientations. After setting up
the LC orientation using the script file LC_ring resonator_setup.lsf and running the simulation
LC_ring_resonator.fsp, you can use Visualizer to plot these figures. The left figure below shows the
transmission when LCs are aligned along the waveguide and the right figure shows the transmission when LCs are
aligned vertically. As we can see, the resonant wavelength around 1.55 m shifts by 10nm, from 1550nm to 1540nm.
Introduction
In this example, we will model a directional coupler based optical switch using liquid crystals (LCs).
Solvers 101
FDTD
Associated files
LC_optical_switch.fsp
LC_optical_switch.lsf
See also
LC rotation 263
Simple LCD 1953
Twisted nematic LCD 1955
Tuning of SOI ring resonator 1956
Simulation setup
A directional coupler based optical switch is considered in this example. Two identical single-mode slab polymeric
waveguides sandwiches an LC layer which control the level of coupling between the waveguides. Fundamental TE
mode (Electric field has y component Ey) is injected into waveguide 1 as shown below. The level of coupling is
adjusted by the orientation distribution of the LCs. Ferroelectric liquid crystals with the the ordinary index no =1.462
and the extraordinary index ne =1.546 is assumed in this example.
When the LC orientations are distributed as the "state1" as shown right below, the electric field Ey feels smaller
index averagely and the light guidance into LC region is reinforced, which means weak coupling between two
waveguide. Due to the weak coupling, the light injected into the waveguide 1 can propagate in the waveguide 1 for a
long distance, which can be used as a bar state. On the other hand, when the the LC direction is distributed as
show in the "state2" below, the electric field Ey feels larger index averagely and the light leakage into LC region is
promoted, which means strong coupling between two waveguide. Due to the strong coupling, the light can travel
between the waveguide back and forth in a shot distance, which can be used as a cross sate.
If you run the script file LC_optical_switch.lsf on the script editor of simulation file
LC_optical_switch.fsp, you can set up the LCs orientation. The variable "state" in the script file controls the
LC state. If you set "state=1" or "state=-1", then you can set up "cross state" or "bar state", respectively.
When we choose "state=1", i.e. the cross state, the angle linearly increases toward the center of the LC region,
and then linearly decreases toward the end of the other side.On the other hand, when we choose "state=-1", i.e. the
bar state, the angle linearly decreases toward the center of the LC region, and then linearly increases toward the
end of the other side as shown in the figure below.
Results
The figures below show the field distribution in the waveguide. The left ant the right is the distribution of |Ey| for cross
and bar state, respectively.
The movies below show the pulse propagation for both states.
Cross state Bar state
Introduction
In this example, we will model an optical phased array using liquid crystals (LCs).
Solvers 101
FDTD
Associated files
LC_phased_array.fsp
LC_phased_array.lsf
See also
LC rotation 263
Simple LCD 1953
Twisted nematic LCD 1955
Tuning of SOI ring resonator 1956
Simulation setup
Beam steering using LC optical phased array is considered in this example. The figure above shows the model of the
phased array in FDTD Solutions. In this model, the orientations of the LCs rotate anti-clockwise from the bottom to
the top as a function of y. Due to the change of the LC orientation, the light passing through the LC region feels
different refractive index depending on the position y, which results in an optical path length difference as shown blow
at the exit surface. As a result, the phase from is tilted and the beam steering can be achieved.
Results
A pulse propagation in LC phased array when a Gaussian beam is injected is shown below. We can see that the
light propagates with varying velocity as a function of y and the tilted wavefront at the exit surface.
Applying far field transformation to the power monitor located just in front of the exit surface, which is named far field
in the simulation file, we can get the angular distribution of far field intensity at 1m away from the device. The result
is show below and we can see that the beam is steered about 0.8 degrees in this case.
As light propagates through the polymer, a small fraction of power is absorbed, which changes the refractive index.
The changing index affects the beam propagation, which in turn alters the absorption profile. A series of FDTD
simulations are required to simulate this system.
Solvers 101
FDTD
Associated files
polymer_curing.fsp
polymer_curing.lsf
See also
Material science 215
User Guide - Materials 215
Import object - n,k material 492
Simulation setup
The primary assumption required by this technique is that the time scale of the curing process is many orders of
magnitude slower than 1/f. If this assumption holds, then the material properties change much slower than the time
it takes any one photon to pass through the device. This allows us to approximate the system with a series of
simulations with fixed refractive index profiles. The absorption profile from one simulation is used to update the
refractive index profile for the next simulation, and so on.
In this example, we assume a very simple curing process. The index increases linearly with the absorbed power.
Initially, the index is 1.5, and it can increase to a maximum of 1.6. Obviously real materials will have more complex
behavior, but the basic idea is the same.
To reproduce these results, open the simulation file and run the script. It will run a series of 5 simulations and create
the following figures. Initially, the index of the polymer is 1.5 everywhere. By the end of the simulation, the index
has increased to 1.6 at the center of the beam.
Note: Symmetry
The recommended procedure for using symmetry boundary conditions is to draw the entire physical structure, even
if only 1/4 of the structure will actually be simulated.
In this example, you will notice that the polymer object is only defined in 1/4 of the volume. This is slightly unusual
and not generally recommended. We decided to draw only 1/4 of the polymer so the index profile was clearly
visible from the main CAD viewports. It also makes the simulation file smaller, since we only need to store the
material properties in 1/4 of the volume.
If you choose to draw only one quarter of your device when using symmetry boundaries, it is very important that
the structure extend at least 1 full mesh cell beyond the symmetry boundary. This is required for the symmetry
boundaries to function properly. In this example, if you look closely, you will see the polymer extends 0.5um
beyond the planes of symmetry.
Getting started
Download a free trial of FDTD Solutions
Download free trial
Introduction
This page shows how to calculate the photonic force on a particle from the Maxwell Stress Tensor (MST).
Solvers 101
FDTD
Associated files
tweezer.fsp
See also
Optical tweezers 1967
Particle force (2D) 1971
Particle motion (2D) 1973
Particle force 1975
Force on a wall 1976
Related publications
Rockstuhl and Herzig, J. Opt. A: Pure Appl.
Opt. 6 (2004) p. 921
Jackson, Classical Electrodynamics, p. 239
The time averaged force F on a particle due to harmonic fields may be calculated from the Maxwell Stress Tensor
(MST). The net force can be found by integrating the MST over a closed surface surrounding the particle. We use a
box of power monitors ( four 1D monitors in 2D simulations, six 2D monitors in 3D simulations) to record the fields
on this surface.
F = 12 Re (Tab n b )
S b
,
where the elements of the Maxwell stress tensor for harmonic fields are given by
r2 r2
Tab = eEa E *b + mH a H *b - 12 d ab e E + m H
,
and n , is the unit normal of S.
The tweezer.fsp simulation contains an analysis group named optical_force_2D. This analysis group can
be inserted from the Object library in the Advanced analysis category. The analysis group contains four identical
subgroups, whose analysis scripts calculate the components of the stress tensor from the simulation. The analysis
script of the main group integrates the stress tensor to provide the total force on the particle.
The optical force can be calculated with either the MST or Volumetric analysis groups. The two techniques give
the same result within numerical error, but each has its own strengths and weaknesses.
- Memory
The MST technique requires less memory because it only collects field data on the surface of the box.
- Numerical noise
The Volumetric technique is less sensitive to numerical noise, making it the better choice when the force is very
small (small index contrast, very tiny particles).
-Mesh
The Volumetric technique is sensitive to the number of mesh points. The results become less reliable if the mesh
is too coarse.
Introduction
This page shows how to calculate the photonic force on a particle by calculating the force per unit volume and
integrating over the entire volume to obtain the total force.
Solvers 101
FDTD
Associated files
tweezer.fsp
See also
Optical tweezers 1967
Particle force (2D) 1971
Particle motion (2D) 1973
Particle force 1975
Force on a wall 1976
Related publications
Rockstuhl and Herzig, J. Opt. A: Pure Appl.
Opt. 6 (2004) p. 921
Jackson, Classical Electrodynamics, p. 239
The force on a charged particle in the presence of an electric and magnetic field is given by
r r r r
F = qE + qv B
where q, v, E, and B are, respectively, the charge, velocity, electric field and magnetic field.
In a medium with charge per unit volume and current density, the force per unit volume is given by
r r r r r r r
Fv = rE + rv B = rE + J B
where r is the total charge per unit volume and J is the total current density. These quantities are given by
r r
r = e 0 E
r
r P
J =-
t
where P is the polarization.
In Lumerical's FDTD solver, all the material properties are included in the permittivity. As a result there is no free
r r
current density and no free charge, therefore D = 0 . This is an arbitrary choice without physical consequence.
For example, in a conductor with conductivity s, it is possible to solve Maxwell's equations using a relative
r r
permittivity of 1 and a free current density of J = sE . It is physically equivalent, however, to solve a system with no
er = 1+ i s
we 0
free current and relative permittivity of . Both methods will give the same physical results.
r r r r
P ( w ) = e i wt P (t )dt J ( w ) = i w P (w)
In the frequency domain, and with Lumerical's sign convention of , we have
the final expression for the force per unit volume is therefore given by
r r r r r r
(
Fv = e 0 E
r r
)Er + i wP B r r
(
= e0 E )E + i w ( e - e ) E B
0
In a medium with a background index that is not 1, it is most numerically efficient and accurate to get the net optical
force that will result in motion of the particle by rescaling the background permittivity, yielding a final equation
r r r r r r
( )
Fv = e b e 0 E E + i we 0 ( e r - e b ) E B
where eb is the background relative permittivity, and er is the relative background permittivity throughout the volume.
Note that the equation for net force without rescaling with the background permittivity will give the total force on the
volume including force on the background material which does not result in motion of the particle.
The volumetric technique is typically more accurate because many interpolation errors can be avoided. However, it
can require a significant amount of memory because the electromagnetic fields and the permittivity must be recorded
throughout the volume.
- Memory
The MST technique requires less memory because it only collects field data on the surface of the box.
- Numerical noise
The Volumetric technique is less sensitive to numerical noise, making it the better choice when the force is very
small (small index contrast, very tiny particles).
-Mesh
The Volumetric technique is sensitive to the number of mesh points. The results become less reliable if the mesh
is too coarse.
FDTD
In this topic
Simulation setup 1971
Associated files
tweezer.fsp
tweezer_position.lsf
See also
Optical tweezers 1967
Maxwell stress tensor 1968
Particle motion (2D) 1973
Particle force 1975
Force on a wall 1976
Related publications
Rockstuhl and Herzig, J. Opt. A: Pure Appl.
Opt. 6 (2004) p. 921
Jackson, Classical Electrodynamics, p. 239
Simulation setup
Consider a Gaussian laser beam with wavelength =1000nm with NA=0.7, focused on to a dielectric rod in 2D with
radius r=40nm and refractive index n=1.5. The background index is 1. The rod is located at (x,y) = (0,-100nm)
relative to the center of the focused Gaussian beam.
Four 1D field profile monitors are used to define the closed surface S. An additional 2D field profile monitor is used
to observe the focused laser beam path.
The analysis script located in the optical force MST analysis group integrates the stress tensor to provide the total
force on the particle. The optical force MST analysis group contains four subgroups which are used to calculate the
components of the stress tensor from the simulation.
Force on a particle
After running the simulation, the field profile can be plotted with the following script commands:
x=getdata("field","x");
y=getdata("field","y");
E2=getelectric("field");
image(x*1e6,y*1e6,E2,"x (um)","y (um)","E2");
The following figures show the field profile for simulations without and with the dielectric rod. The first figure, without
the rod, shows the beam has a focal point at x=0, Y=0. The second figure shows the field when the rod is present.
The light is seen to refract through and reflect off the rod. This small change in photon momentum applies a force to
the rod. Using the field data collect by the monitors forming the closed surface S, we can calculate the components
of the Maxwell Stress Tensor and then integrate the components normal to S over the surface.
F= getresult("optical force MST","F_total");
?F.F_totalx;
?F.F_totaly;
result:
3.9735e-021
result:
2.04787e-021
We can run the same analysis script on the simulation without the sphere. In principle, the force should be zero,
but the simulation will always measure a non-zero force due to numerical errors. Running a reference simulation
without a particle is a good way to estimate the numerical error, since you know the force should be zero. The
Volumetric technique for measuring optical force tends to have smaller numerical errors than the MST technique.
Force vs position
To calculate the optical force as a function of x position relative to the focal point of the beam, run the script file
tweezer_position.lsf. The particle is offset by -50nm in the Y direction. This script actually changes the
beam focal point, rather than the rod position. This technique of modifying the source focal point is more efficient
since the simulation X span can be kept small. The following figure will be created.
The negative slope of the force vs position data near X=0um suggest the presence of a stable trapping region.
Introduction
We continue to use the example from the previous section to calculate the dynamic motion of the rod. The previous
example showed how to calculate the force on a particle. Once the force on the rod at a particular position is
known, it is possible to determine the rod motion as a function of time.
Solvers 101
FDTD
In this topic
Introduction 1973
Simulation setup 1973
Analysis 1973
Results 1974
Associated files
tweezer.fsp
tweezer_motion.lsf
See also
Optical tweezers 1967
Maxwell stress tensor 1968
Simulation setup
The simulation volume needs to be slightly modified. In the previous simulations, the beam focal point was changed,
rather than actually moving the rod. This was more efficient for scanning over a large range of X positions because
the simulation volume could be kept small. In these simulations, we will leave the focal point fixed, and actually
move the rod.
The script tweezer_motion.lsf will make the necessary modifications before starting the simulation.
Analysis
The following equations are used to calculate the rod motion resulting from the optical force.
r r r
F = mA - tV
r r r
V = V0 + At
r r
X = X 0 + V0t + 12 At 2
The first simulation gives the initial force on the rod. Once the force is known, acceleration is easily calculated.
Assuming constant acceleration for a short period of time, we can calculate the future position of the rod. At this
point, another simulation is run, calculating the force on the rod at this new position. Once again, the acceleration
and future position can be calculated. This process can be repeated as many times as required.
Results
Open tweezer.fsp and run tweezer_motion.lsf. The script will first modify the simulation region as
described above. It then runs a series of simulations. The rod position at time step i+1 is calculated from the time
step i position, velocity, and force. The following figures will be generated, showing the particle position and force
as a function of time.
The rod is trapped at a point 0.4um in front of the focal point of the beam.
Once tweezer_motion.lsf is complete, we can watch the particle motion as a function of time in the GUI with
the following script commands.
# recreate particle motion in GUI
setview("extent",view);
for (i=1:length(T)) {
switchtolayout;
select("circle");
set("x",X_t(i,1)+focal_point);
set("y",X_t(i,2));
pause(0.3);
}
Solvers 101
FDTD
In this topic
Simulation setup 1975
Associated files
tweezer3D.fsp
tweezer3D.lsf
See also
Optical tweezers 1967
Maxwell stress tensor 1968
Particle force (2D) 1971
Particle motion (2D) 1973
Force on a wall 1976
Simulation setup
A TFSF source is used to simulate a plane wave incidence upon the sphere. The wavelength range is 400-1500nm.
The dielectric sphere has an index of 1.1 and a radius of 40nm. The background index is 1. A mesh override region
forces a 10nm mesh around the sphere, monitors and source. In this simulation, we use the volumetric optical force
analysis object because the forces generated in this simulation are near the limit of the MST technique. The
optical_force analysis objects can be inserted from the Object library under the Advanced analysis section.
Force on a particle
When the simulation is finished, you can plot the force on the particle as calculated by the optical force volumetric
analysis object. The following figure will be created.
From the symmetry of the system, we expect that Fx and Fy (the force in the X and Y directions) is zero. The force
should only be in the + Z direction, and it should have a strong frequency dependence (1/w^4). The simulation
confirms these points. Use the associated script file to confirm the w^4 dependence. The script file will also plot the
force as calculated with the MST analysis object. The result is clearly less linear. This discrepancy is due to the
fact that the force generated in this example is near the numerical limit of the MST technique. For situations with
larger forces (ie. a larger particle, or larger index contrast), the volumetric and MST techniques should agree.
Introduction
We have calculated the optical force on a particle in the previous examples. In this example, we will look at the
optical force on a metal wall as well as a dielectric wall and compare the results to the easily calculated theoretical
predictions to further confirm the validity of this technique.
Solvers 101
FDTD
In this topic
Introduction 1976
Simulation setup 1976
Analysis and Results 1977
Associated files
force_wall.fsp
force_wall.lsf
See also
Optical tweezers 1967
Maxwell stress tensor 1968
Particle force (2D) 1971
Particle Motion (2D) 1973
Particle force 1975
Simulation setup
A planewave source with wavelength 0.5 um is used. The metal wall is simulated as a perfect electric conductor.
The background index is 1. A box of two 2D power monitors are used to define the closed surface S. The reason for
this is that periodic boundary conditions are used and all of the light is assumed to eventually either reflect back to
transmit through.
The analysis script located in the optical_force_slab analysis object integrates the stress tensor to provide the total
force on the particle. There are two analysis groups contained in the optical_force_slab analysis group (one for each
of the two z power monitors) which are used to calculate the stress tensor.
The force_wall.lsf script also calculates the theoretical prediction of the same force. For a perfect metal slab,
the reflection coefficient is 1.
In every second, the source emits N photons each with energy E and momentum p, for a total power of P.
P P
N= = ,
E hn
r h nh
p= =
l l0
(Note that this momentum is the Minkowski or canonical momentum which is appropriate for the calculation of
optical force, for details see http://rsta.royalsocietypublishing.org/content/368/1914/927.full.)
The force on the wall is equal to the change in the momentum of all the photons. Since the photons hit the wall and
return with the same speed, the change in their momentum is 2p:
r Pl nh 2nP
F = 2 Np = ( 0 ) 2 ( ) =
hc l c
Once the script is run, both the theoretical and FDTD analysis method results are calculated. The values are in
agreement as expected.
The same procedure can be carried out for a dielectric wall. The only difference in this case is that not all the
photons are reflected back, and so both of the power monitors above and below the wall will have non zero readings.
The reflection coefficient of the dielectric is extracted from the Fresnel equations. The fraction of the intensity of the
reflected field to that of the incident field can then easily be calculated:
nair - nwall
R=
nair + nwall
2 pd wall nwall
4 R sin 2 ( )
Ir l
=
I i (1 - R) 2 + 4 R sin 2 ( 2 pd wall nwall )
l
2P I r
F=
c Ii
Edit the rectangle object so that the material is a user defined dielectric with index 1.5. In the script, the variable
PEC to 0 and rerun the script. Again the analysis group results and the theoretical results are in agreement as
expected.
Solvers 101
FDTD
Associated files
thermal_emission.fsp
thermal_emission.lsf
See also
Monitors and analysis groups 668
References
David L. C. Chan, Marin Solja?cic and J. D.
Joannopoulos, "Thermal emission and design
in 2D-periodic metallic photonic crystal slabs,"
Optics Express, Vol 14, 8785-8796 (2006).
http://dx.doi.org/10.1364/OE.14.008785
Here, we calculate the thermal emission of periodic structure consisting of a tungsten slab and a dielectric slab with
a periodic array of holes. The emission is calculated for hole periods of 2um and 3um. The thickness of the tungsten
slab is chosen as 1.0a while the thickness of the dielectric is chosen as 0.2a with holes of radius 0.4a. In this
simulation, we use a linearly polarized plane wave as an incident wave, although in the actual situation the thermally
emitted light is unpolarized. Regarding with how to perform simulation for unpolarized incident wave, please see the
"Unpolarized beam" page. We study the thermal emission which is radiated into the perpendicular direction to the
periodic structure.
The Multi-coefficient material model gives an accurate material fit over a large wavelength range, allowing us to
collect very broadband results from a single simulation.
To calculate absorptivity, i.e. emissivity, we put 2 power monitors located above and below the structure, and
calculate the power absorbed in the region between the monitors. The left figure below shows the emissivity for
periods a=2 m and 3 m. The thermal emission spectrum can be obtained by multiplying the emissivity by the black
body emission spectrum. They are shown in the right figure below together with the blackbody spectrum.
To reproduce these results, run the script file thermal_emission.lsf. It will run 2 simulations (one for a=2 m and the
other for a=3 m) and create figures of the above results. Details of the thermal emission calculation can be found in
the "thermal emission" analysis group.
Solvers 101
FDTD
Associated files
sp_ebeam.fsp
sp_ebeam.lsf
Related publications
Pratik Chaturvedi et al,
"Imaging of Plasmonic
Modes of Silver
Nanoparticles Using High-
Resolution
Cathodoluminescence
Spectroscopy", ACS Nano
3 (10), 2965-2974 (2009)
where e is the electron charge and v is the velocity of the electron. In the frequency domain, this corresponds to a
current density of
r r - i wz
J ( w , r ) = ev 2u z exp d ( x - x0 ) d ( y - y0 )
v
This current density can be simulated by using a large number of closely space dipoles along the electron trajectory,
of the form
r r p i wz
p ( w , r ) = 0 u z exp
iw v
Since the system is linear, we can study a system of dipoles of the form
r r i wz
p ( w , r ) = p0u z exp
v
and multiply the electromagnetic fields by a factor of 1/iw during the post processing phase. We will not be
concerned with the overall normalization factor p0. In the time domain, we can create the desired sources by
delaying the source pulses by z/v.
In the absence of any structure, similarly to how a constant DC current through a wire will not produce any radiation,
the electron beam will not generate any radiation because it is moving at a constant velocity. In FDTD, we are
obliged to simulate only a finite portion of the electron path and the sudden appearance and disappearance of the
electron will generate radiation. To minimize this problem, a raised-cosine filter is introduced to turn on and off the
dipoles' amplitude gradually. We are also running a reference simulation (without the nanoparticle and substrate) to
subtract anything that can potential obscure the signal from the nanoparticle. Although this makes the analysis
slightly more complex, we can calculate the electromagnetic fields at frequency w by taking the difference in fields
between the simulations, using sp_ebeam.lsf. To get an accurate difference, we must force the simulation mesh
to be exactly the same with and without the structure. For this reason, we use mesh override regions over all the
structures.
Setup scripts
We use a setup script contained in the ebeam group to create all the sources with the correct pulse delays and
positions. In this example, we use an electron velocity of 0.2*c. A raised-cosine filter is also introduce to gradually
turn on and off the dipoles.
Results
To reproduce the plots below, open the sp_ebeam.fsp simulation and run the sp_ebeam.lsf script file. The
script file will run two simulations, take the difference in electromagnetic fields and calculate the scattering
spectrum. This means that it will calculate the total power scattered into the upper z half space due to the presence
of the gold particle and substrate.
Note that the CW normalization with a large number of sources leads to a variety of complications. Instead, we use
the no normalization 1598 state, and remove the spectrum of the source pulse by calculating the sourcenorm for a
single source pulse, rather than a sum of all the dephased source pulses.
Poynting vector at
the first peak
wavelength.
Angular distribution
of the electric field
intensity in the far
field calculated at
the first peak
wavelength.
Movie of simulation.
A number of
interesting
phenomena are
visible, including:
- Injection errors
that occur at the
beginning and end
of the simulation.
These errors exist
because we only
inject a finite length
portion of the
electron beam and
are already
minimized using a
filter to control the
dipoles' amplitude.
Convergence testing
This example was run with a mesh size of only 10nm. Some convergence testing should be done. Typically, a mesh
size of 1-5 nm is required to obtain acceptable accuracy for gold nanoparticles in this wavelength range. The z span
is also important in convergence testing where the injection error can be further reduced for longer z span.
8.2 Metamaterials
Motivation
Natural materials exhibit only a small part of electromagnetic properties which are available in theory. Researchers
have made great efforts to explore new materials that are having some specific desired properties. Electromagnetic
metamaterials are artificially engineered materials that are designed to interact and control electromagnetic waves at
the beginning of the new era. "Meta" in Greek means "beyond", or "higher", "alerted", or "changed". That says,
metamaterials are not found in nature. However, they are composed of natural materials. The designers' role is to
engineer the composite "atoms" of the metamaterials from natural materials with different shapes or structures. In
most cases, metamaterials are composed of sub-wavelength, periodic structures. The goal of many metamaterial
simulations is to design and measure the effective material properties of these devices. The operation frequency
range can be at RF, microwave 1997 , terahertz 1995 (THz) and optics 1999 .
Photonic metamaterials are periodic optical nanostructures often composed of metallic elements on a dielectric or
semiconducting substrate, where the period is shorter than the wavelength of light. They are of large scientific
interest as the dielectric response of those materials can be engineered through semiconductor manufacturing to
yield interesting physical phenomena at optical wavelengths.
Effects of interest include realizing synthetic optical structures with an effective negative index of refraction, resulting
in so-called negative refraction. Negative refraction can be used to realize superlenses which offer enhanced spatial
resolution beyond that available via diffraction-limited focusing. Photonic metamaterials can be used to assess split-
ring resonators and optical antennas that can be designed to efficiently capture and emit optical radiation.
Simulating metamaterials
FDTD Solutions can be used to study sub-wavelength periodic and highly-diffractive optical metamaterial elements
and the interesting optical characteristics they exhibit. One can directly measure various quantities of interest,
including:
Field enhancement at different parts of the structures
Transmission and reflection spectrum
Scattering and absorption cross sections
Chirality and circular dichroism
The effective material properties are also a typical quantity of interest and can be calculated with some post-
processing of the simulation results. This includes:
S parameters
Effective material properties such as the refractive index, impedance permittivity and permeability
In addition, a combination of optical solvers and electrical solvers can be used to characterize active metamaterials.
For example, DEVICE can be used to simulate the effect of bias-induced carrier density variations on the refractive
index of the metamaterial, and FDTD Solutions can be used to calculate the corresponding optical response.
Features
Simulate metamaterials at RF, microwave 1997 , terahertz 1995 (THz) and optical 1999 frequencies and provide
simulation results across wide bandwidths in a single calculation for 2D and 3D metamaterials
FDTD Solutions can easily calculate the power reflection, power transmission, field enhancements, resonant
frequencies and associated quality factors, and s-parameters 1987 for metamaterials
Flexible post-processing allows for the extraction of bulk/effective material properties 1989 like effective
refractive index including the negative index response of metamaterials, effective permittivity and
permeability, circular dichroism 1999 , scattering and absorption cross sections
Lumericals conformal mesh technology can provide sub-mesh cell accuracy of common materials used in
metamaterials, including perfect electrical conductors (PECs), metals, and other dispersive materials
Multi-coefficient materials (MCMs) can accurately model dispersive materials across wide wavelength
ranges
Simulate metamaterial microbolometers 2012 with FDTD Solutions and the heat transport solver in DEVICE.
Simulate active metamaterials 2005 with FDTD Solutions and the charge transport solver in DEVICE.
Built-in parameter sweep 699 and optimization algorithms 716 make it easy to analyze and optimize
parameterized designs
Getting started
Relevant videos (login required):
Metamaterials
Application examples
Solver 101 Description
FDTD Bulk metamaterials 2002
DEVICE
FDTD, Metamaterial Absorbers 2007
DEVICE
8.2.1 Methodology
This section mainly deals with simulating the the artificial "atoms" such as wire pairs and split rings of metal that
can be used to create unusual effective bulk properties, such as a negative refractive index, and we will discuss the
details of effective parameter extraction. For an example of creating bulk electric and magnetic media, please see
the bulk metamaterials 2002 example.
Solvers 101
FDTD
DEVICE
See also
S Parameter extraction 1987
Effective bulk properties 1989
Effective parameters - Smith 1990
Low frequency simulations 627
Thin layers
Some metamaterials have extremely thin layers compared to wavelength. It is possible to represent a thin layer
using a 2D rectangle or 2D polygon object and specifying the material using a conductive material model 241 .
If using a 3D object to represent the thin layer, for accurate simulation results it's important to to have at least a
couple of mesh cells to resolve the thickness of the layer. When the layer is very thin, this requires an extremely
small mesh, which significantly increases the total memory and time requirements of the simulation. In such cases,
it is possible to use a much thicker layer in your simulations. For example, if the layer is actually 1/1000 of a
wavelength thick, setup your simulation with a layer thickness of 1/10 or 1/50. This allows you to use a much larger
mesh size, without a significant loss of accuracy.
Quantities of interest
It is possible to directly measure many quantities of interest from an FDTD simulation of a metamaterial device,
including
field enhancement throughout the structure
transmission and reflection spectrum
scattering and absorption cross sections
circular dichroism
In addition, the effective material properties are often of interest. Parameter extraction is possible, but requires
additional post-processing of the simulation results. See the following page for more information on calculating:
S parameters
effective material parameters: refractive index, impedance, permittivity and permeability
See also
Methodology 1986
Effective bulk properties 1989
Effective parameters - Smith 1990
Related publications
D. R. Smith et al., "Electromagnetic
parameter retrieval from inhomogeneous
metamaterials", Phys Rev E 71, 036617
(2005)
Szab, Z., G.-H. Park, R. Hedge, and E.-P.
Li, "A unique extraction of metamaterial
parameters based on kramers-kronig
relationship," IEEE MTT, vol. 58, no. 10,
2010, pp. 2646-2653
S parameters measurements
Understanding S-parameters
S parameters describe behaviors of a 2 by 2 network or transmission lines (see the figure at the right below):
S parameters for a 2 port network Phase compensation for source and monitors
for two given input signals a1 and a2, the outputs b1 and b2 can be calculated as
b1 S11 S12 a1
=
b 2 S 21 S 22 a 2
Recognizing that the a,b coefficients are directly proportional to the electric fields, the S parameters can be
calculated from the definition above, eg, S11=b1/a1=E_r/E_i and S21=b2/a1=E_t/E_i where E_i, E_r, E_t are the
incident, reflected and transmitted electric fields. This technique makes it very simple to obtain S-parameters for a
given device, but it does make a number of assumptions. It's important to ensure that all of the assumptions are valid
for your simulation.
This analysis assumes that the structure does not significantly affect the polarization of the incident fields, and
that the fields are polarized along one of the major axes (X,Y,Z). For example, if the incident fields are X polarized,
this analysis assumes the reflected and transmitted fields are primarily X polarized. This analysis selects the
largest field component to do the parameter extraction.
If the polarization is important, this analysis must be generalized to treat each polarization separately. If you have
interest, please contact support@lumerical.com .
To measure the S-parameters in the near field (as done in the S-parameter analysis object), the transmitted and
reflected fields must be propagating like a simple plane wave at the point of measurement. The measurements
will not be correct if evanescent fields are present, or if the structure supports multiple grating orders. To avoid the
evanescent fields, make sure the monitor is sufficiently far from the structure. Multiple grating orders are rare,
since the structures are usually sub-wavelegth, but if they do exist, the S-parameters must be extracted from far
field measurements. Contact support@lumerical.com for more information on this calculation.
In your simulation, the sources and monitors are always some distance from the surface of the metamaterial (for
example, the monitors must be far enough from the structure to avoid evanescent fields). The fields will
accumulate additional phase as they propagate from the source to the metamaterial, and from the metamaterial to
the monitors. The S parameters are intended to characterized only the metamaterial, without this additional
propagation phase, thus we must compensate this additional phase. Suppose the wavenumber in the incidence
space is k i, and the wavenumber in transmission space is k t, the extra phase in Monitor T from source S is k irs
+k trt where rs and rt are distances (so they are positive). For reflection Monitor R, the extra phase from source S
is k irs +k irr .
Based on the above discussion, a ready-to-use S Parameter analysis group is available in the Object Library. In
most cases you only need to set the slab thickness, the locations of the slab center and source position along x
axis, and the background refractive index in Analysis--Variables. The phase compensation is done in the Script. The
phase compensation assumes that the background index is the same on both sides of the metamaterial. Also note
that because the reflected and transmitted waves must be propagating like plane waves, we use a point frequency-
domain monitor to record the electric field component. The analysis group also contains two 2D surface-monitors,
which are used to measure the power transmission and to check that the fields are in fact propagating like a single
plane wave.
Solvers 101
FDTD
See also
Methodology 1986
S Parameter extraction 1987
Effective parameters - Smith 1990
Related publications
D. R. Smith et al., "Electromagnetic
parameter retrieval from inhomogeneous
metamaterials", Phys Rev E 71, 036617
(2005)
Szab, Z., G.-H. Park, R. Hedge, and E.-P.
Li, "A unique extraction of metamaterial
parameters based on kramers-kronig
relationship," IEEE MTT, vol. 58, no. 10,
2010, pp. 2646-2653
From Eq. (9) in the reference paper, the effective refractive index neff is calculated as:
1 1 - S112 + S 212
neff = cos -1
kd 2 S 21
and the effective impedance is
2
(1 + S11 ) 2 - S 21
z= 2
(1 - S11 ) 2 - S 21
Once the effective refractive index and the effective impedance are obtained, it is easy to retrieve the effective
permittivity and the effective permeability as following:
e eff = nz
meff = n / z
Important note:
It is important to remember that parameter extraction is non-trivial. Determining n and z (and therefore epsilon and
mu) unambiguously is one of the challenges in this field, and is still an area of active research. One issue is that
the above functions are multi-valued. Selecting the wrong root will lead to incorrect results. The above calculation,
which is implemented in the S parameter analysis object, works in some situations, but it certainly does not work
in all cases. The implementation provided in the Effective parameters - Smith 1990 example should be viewed as a
starting point for your parameter extraction work, rather than a robust analysis that will work in all situations. For
an alternate extraction method, see the Szab reference provided at the top of this page.
case
This section will give a brief overview of the method for calculating the effective material properties that applies when
the device behaves differently in the forward and backward source propagation directions. In other words, when the
scattering parameter S11 is not equal to S22. This may be the case if there is a substrate on one side of the
metamaterial. In this non-symmetric case, the following equations still apply:
e eff = nz
meff = n / z
And we can use the following equations to obtain n and z:
1
cos(nkd ) =
2 S 21
(1 - S11S 22 + S 21
2
)
(T22 - T11 ) (T22 - T11 )2 + 4T12T21
z=
2T21
The values of the T matrix can be calculated from the S parameters as well:
T11 =
(1 + S11 )(1 - S 22 ) + S 21S12
2 S 21
T12 =
(1 + S11 )(1 + S 22 ) - S 21S12
2 S 21
T21 =
(1 - S11 )(1 - S 22 ) - S 21S12
2 S 21
T22 =
(1 - S11 )(1 + S 22 ) + S 21S12
2 S 21
The above method is also discussed in the Smith et al. reference. Since these equations require us to know S21
and S22, we need to run two simulations, one with the source propagating in the forward direction, and the other with
the source propagating in the backward direction in order to get these values. The analysis in the S-parameters
analysis group is set up to perform the analysis for the symmetric case. As with the symmetric case, parameter
extraction is non-trivial due to challenges with choosing the correct roots of the equation.
Solvers 101
FDTD
Associated files
s_parameters_effective_eps
_mu.fsp
s_parameters_test.fsp
s_parameter_test.lsf
s_using_extracted_paramete
rs.fsp
See also
Methodology 1986
S Parameter extraction 1987
Related publications
D. R. Smith et al., "Electromagnetic
parameter retrieval from
inhomogeneous metamaterials",
Phys Rev E 71, 036617 (2005)
Simulation setup
The file s_parameters_effective_eps_mu.fsp contains the simulation of the structure shown in Figure 2
from Smith et al. As shown in the image above, the simulation contains a cubic unit cell of length 2.5mm. Periodic
boundary conditions are used to extend the structure in the y and z directions, and a plane wave source operating at
5-20GHz is injected in the x direction.
The substrate is 0.25 mm thick and composed of FR4 which has a permittivity of 4.4 and a loss tangent of 0.02. A
copper split ring resonator (SRR) and wire are positioned on opposite sides of the substrate. The width of the wire is
0.14 mm, and it runs the length of the unit cell. The outer ring length of the SRR is 2.2 mm and both rings have a
linewidth of 0.2 mm. The gap in each ring is 0.3 mm, and the gap between the inner and outer rings is 0.15 mm.
The thickness of the copper is given as 0.017mm in Smith, but since this is much smaller than the wavelength, we
use a 2D sheet to represent it.
Since in the GHz range most metals act like perfect electrical conductors (PEC), the PEC material model is used
for the copper elements. Also, note that the material fit for FR4 deviates from a straight line as given by the
permittivity and loss tangent. This is due to the fact that materials cannot be fit by a straight line over the whole
frequency range. However, this does not noticeably affect the frequency dependence of the S parameters. In
addition, a straight line model for the material properties is not completely accurate since in practice FR4 material
properties are frequency dependent.
The conformal variant 1 mesh refinement option is used in this example to take full advantage of the conformal
meshing technology to accurately represent the ring widths. In addition, the autoshutoff min in the advanced tab of
the FDTD region is reduced to 1e-7. This ensures that the fields decay sufficiently at the resonance frequencies
before the simulation automatically shuts off. Relatively coarse mesh settings are used for demonstration purpose
due to the properties of PEC. Results with finer mesh are presented in a later section on this page.
Results
Using the parameter extraction techniques described in the Parameter extraction 1987 page, we will calculate the
effective refractive index, and related properties, for this structure. First, let us check if the transmitted wave can be
regarded as plane wave, as required by the parameter extraction analysis. The intensities of Ey field component from
the T Monitor are shown below at two wavelengths:
Plane w ave verification - abs(Ey)^2 from T m onitor at Plane w ave verification - abs(Ey)^2 from T m onitor at
w avelength 60 m m w avelength 15 m m
It can be seen that the Intensity variation in the near field is only on the order to 1e-3, which can be considered as
uniform, thus justifies the use of near field point monitor. The uniformity of the intensity can be further increased if the
finer override mesh is extended.
S-param eters, index, im pedence, perm ittivity, perm eability plots from the s_param s analysis group. These plots are
obtained w ith finer m esh (dx=dy=0.03m m , dz=0.025m m in the m esh override).
To test both the amplitude and phase, the simulation file s_parameters_test.fsp can be used. in this file, we
simply have a planar substrate with no metallic components so the S parameters can be easily calculated
theoretically. After running this fsp file, the script file s_parameter_test.lsf can be used to compare the S
parameters with the theoretical results. It will display the following figures.
We can simulate the electromagnetic response of the metamaterial using the extracted material parameters.
Although Smith's paper mentions that for this example the effective method does not rigorously satisfy an effective
medium limit, we can still get some results reasonably agreed with the original metamaterial which is inherently
inhomogeneous.
Before setting up the simulation file, we need some analytical parameters from the extracted data in order to use the
magnetic electric Lorentz (MEL) model since it has dispersive and lossy permeability. By some analysis, we can
use the permeability in MEL model, which is relatively easy to have analytical expression, whereas for the extracted
permittivity, we can import it into the material database, which is used as the base material for the MEL model.
Some estimated parameters for the analytical permeability are listed below:
delta_mu = 0.6 (H/m)
wm = 6.1e10 (rad Hz)
delta_m = 1.43e9 (rad Hz)
To set up the simulation file with minimum effort, we can modify the structure in the original file to be a bulk slab with
material of MEL created from above description. Since now it is a bulk material, we can simulate only in 2D. What
we want to compare is its transmission and reflection, thus in the analysis group s_params, only R and T are kept
and all others are deleted. You can run the file s_using_extracted_parameters.fsp which is ready to use.
After simulation, we can plot the results with the original transmission/reflection for comparison as follows:
From the above figure, we can see that the results using the extracted/simplified effective data agree well in certain
degree with those using the original metamaterial.
Once the extracted permittivity is imported as the base material (named "bulk") of the MEL model, the default
setting of the material fitting can lead to a good fitting. However, due to its large imaginary part, the simulation can
diverge at late time. To avoid this, we simply chose the simplest two-coefficient fitting, which neglects the imaginary
part and the anti-resonance of the real part. Even with such simplification, the result is reasonably good with the
original transmission and reflection. Since the main purpose of this section is to validate the extracted data, we do
not pursue highly agreed results. With careful adjustment, you may get a better agreement with your own
metamaterial design.
For the magnetic electric Lorentz model, please refer the Material Database section in the Reference Guide 243 to
get more information.
Solvers 101
FDTD
DEVICE
Associated files
negative_index_chen.fsp
negative_index_chen_analys
is.lsf
See also
Bulk metamaterials 2002
Retrieving S parameters 1987
Simulation setup
The file negative_index_chen.fsp contains an example of the structure as described in Figure 1 from Chen'
paper.
Metamaterial structure here is composed of gold patterning on a GaAs substrate. Gold can be represented using a
plasma material model (with plasma resonance ( ) and collision frequency (vc)), and this can be expressed as a
simple conductive model in the low frequency limit when << c. In this limit, the material can be approximated
using the PEC (perfect electrical conductor) material.
The physical thickness of the gold is 200 nm, but this would require a very small mesh size for dz. However, since
the thickness of the material is much less than the wavelength of about 130-1200 um, the metal can be represented
using 2D sheets which do not require a fine mesh in the z-direction.
For the GaAs substrate, a simple constant refractive index (dielectric) model was used. It may be possible to
account for a free carrier model by adding a conductivity that depends on bias voltage.
Once you have run the script to generate the vector plot,
modify the plot properties as follows:
Solvers 101
FDTD
Associated files
negative_index_zhou.fsp
negative_index_zhou_analys
is.lsf
See also
Bulk metamaterials 1984
Retrieving S parameters 1987
Simulation setup
The file negative_index_zhou.fsp contains an example of the structure shown in Figure 1 from Zhou.
The material properties (plasma resonance and collision frequency) were estimated from copper data in the visible.
This should be a reasonable estimate of the properties in the microwave range. Initially, this simulation was quite
numerically unstable. This turns out to be due to the fact that the permittivity is approximately -2.3e4 + 1.6e7 * i. In
other words, the properties are completely dominated by the complex permittivity. To control the instability, the
plasma model was replaced by a simple conductive model which can be obtained by an expansion of the plasma
model when the collision resonance frequency is much larger than the source frequency. Further testing showed that
the results were not sensitive to the precise value of the real permittivity. At the 10-20 GHz frequencies, the
imaginary permittivity is so large that the metal behaves like a perfect electrical conductor. The penetration depth is
only lambda/10000, which would never be resolved in FDTD anyway. It is surprising that in the paper they explicitly
say that they use a Drude model, unless they mean a conductive model which is the limit of the Drude model when
w << nu_c. In this simulation, we have used the PEC (Perfect electrical conductor) material model which is
appropriate for such situations.
To prevent coupling between the PML above and below the structure and any evanescent fields of the structure, a
distance of half a wavelength is left between the structure and PML.
The copper thickness is meant to be 10 um, but this would require a very small mesh size for dz, so we represent
the material using 2D sheets.
The conformal variant 1 mesh refinement option is used in this example to take full advantage of the conformal
meshing technology to accurately represent the spacing between the wires, and the width of the wires.
Note that some of the dimensions were not well defined in the paper, so the simulation results are similar but do not
match exactly. Additionally, the source and receiver used in the experiment are angled at 7.5 degrees from normal,
whereas the source in the simulation is injected at normal incidence and the reflection monitor measures the
reflected power at angles.
Results
When the simulation is finished, run negative_index_zhou_analysis.lsf to produce the following results.
The transm ission plot w hich is sim ilar to Figure 2a from Zhou.
Solvers 101
FDTD
Associated files
gammadion_dichroism.fsp
See also
Circular polarization 540
Related publications
Do-Hoon Kwon et al., "Optical planar chiral
metamaterial designs for strong circular dichroism
and polarization rotation," Opt. Express 16, 11802
(2008).
We consider a gammadion shaped periodic structure shown in Fig. 1. In this structure, an aluminum layer is
sandwiched by silver layers and the excitation of surface plasmon leads to the enhancement of the circular
dichrosim.
(c)Side view
1. Use two plane wave sources to generate circularly polarized illumination, as described in the circular polarization
540 page. In this case, two FDTD simulations will be required to get the CD; One for right-circular polarization and
the other for left-circular polarization. This approach is not used in the associated example simulation file.
2. Use one plane wave source (as in the example simulation file gammadion_dichrosim.fsp). By taking
advantage of the four-fold rotational symmetry of the structure, the transmittance can be obtained from a single
simulation, as explained below:
The field distributions F (E or H) for circular illumination can be obtained from a single linearly polarized simulation by
FR ( x, y, z ) = Fx ( x, y, z ) + Fy ( x, y, z )e j p / 2
FL ( x, y, z ) = Fx ( x, y, z ) + Fy ( x, y, z )e - j p / 2
(2)
where FR (FL) is the field distribution for right- (left-) circularly polarized incident wave, and Fx (Fy) is the field
distribution for a x (y) linearly polarized plane wave. If we assume four-fold rotational symmetry of the structure, the
field distribution for y-polarized plane wave is incident on the structure, Fy, is given by that for x-polarized incident
plane wave, Fx, as
Fx _ y ( x, y, z ) = - Fy _ x ( y,- x, z )
Fy _ y ( x, y, z ) = Fx _ x ( y,- x, z )
Fz _ y ( x, y, z ) = Fz _ x ( y,- x, z )
(3)
where FU_V (u=x, y, z; v=x, y) is the u-component of the field distribution for v-polarized incident wave.
Once we get the field distribution FU (U=R or L) for circularly polarized plane wave using the relation Eqs.(2) and (3)
from one FDTD simulation (simulation for x- or y- polarized incident wave), the power traveling down in the substrate
over a unit cell is given by
1 *
PU = Re( EU H U )dS
S _ u n itcell 2 (4)
If we normalize the power P by incident power using script function "sourcepower", we obtain transmittance T as
TU = PU / sourcepower
(5)
The simulation file gammadion_dichrosim.fsp uses a single x-polarized source. The field distribution on a plane
under the gammadion structure (in the substrate) is recorded in a power monitor named "T", within the analysis
group named "CD". The script in the "Analysis" tab => "Script" tab of this analysis group calculates the
transmittance of circular polarizations following the way mentioned above (method 2). From the CD analysis object,
you can plot the CD vs wavelength by use of the "visualizer". In the figure below, we can see a peak in the CD
around 1.1um.
Solvers 101
FDTD
Associated files
negative_index.fsp
magnetic_electric_lorentz.lsf
See also
Metamaterials 1984
magnetic-electronic model 243
Material setup
FDTD Solutions includes a magnetic and electric Lorentz medium, described at Permittivity models 223 . We can use
this material model to create a bulk negative index medium where both real(e) and real(m) are negative at the same
wavelength.
We can open the file negative_index.fsp which includes this material and can then use the script file
magnetic_electric_lorentz.lsf to plot the resulting properties. The relative permittivity (which in this case is equal to
the relative permeability) is shown below.
Above, we see the real and imaginary parts of the In this figure, we see that from 700nm to 800nm, the
permittivity. permittivity (and permeability) are negative while the
imaginary part is less than 0.1. We further expect that
near 760nm, the real part of the refractive index will be
close to -1.
Simulation setup
We setup a simulation with a beam at 45 degrees incidence on a 2 micron slab of our negative index medium in a
background of air. In addition, we have added a mesh override region over the slab, and set the equivalent index for
the mesh to 2. The reason is that the magnetic electric Lorentz medium is included with FDTD Solutions but is
implemented as a plugin. At mesh time the software will base the target mesh size for this material on the
background material (which defaults to the vacuum if none is selected). Therefore we may want to use a mesh
override region to force a smaller mesh size if we know that the material will need it. In this case, for safety, we
override the mesh with an equivalent index of 2, which is more than sufficient for the electric and magnetic properties
over the wavelength range of 700 to 800nm.
Additionally, since the beam is incident at 45 degrees, which is relatively steep, we increased the minimum number
of layers of PML from 12 to 24 in the Advanced Options of the FDTD simulation region.
Note, the PML default settings are modified to overcome possible diverging simulation, which need some knowledge
on PML.
Results
After running the simulation, we can visualize the E field over the entire structure from the monitor called 'profile', as
shown below.
We can select the Parameter lamba and the drag the slider on the lower right to look at the profiles at different
wavelength. The profile at approximately 761nm has the lowest reflection and highest transmission, as we would
expect from the curve permittivity data. We can see this result, which clearly shows the unusual refractive properties
of a bulk negative index medium.
Solvers 101
FDTD
CHARGE
Associated files
active_thzmaterial.ldev
active_thzmaterial.fsp
active_thzmaterial_np.lsf
Reference
H.-T. Chen et al., "Active terahertz metamaterial
devices", Nature 444, 597-600 (2006)
NOTE: If you are using an older version of DEVICE (v.4.6.631 or older) then please download the simulation
(.ldev) file from this archived KB page as the current files may not run with the older DEVICE.
Theory
A range of voltages are applied to the metamaterial via contacts and the corresponding carrier densities are
calculated and recorded. The effect of the carrier densities on the refractive index of the GaAs layer is then
calculated.
To calculate the effect of the change in the carrier density on the refractive index, an FDTD Solutions simulation will
be run. The np density grid attribute in FDTD Solutions will take the carrier density information and calculate the
corresponding changes in the real and imaginary parts of refractive index of the material according to the Plasma-
Drude formulation. For a more detailed description of this grid attribute and the formula, please visit the Charge to
index conversion 402 .
CHARGE Simulation
The metamaterial including the GaAs epilayer and the gold stripes can be set up in DEVICE. Open the
active_thzmaterial.ldev file in DEVICE. The dimensions of the structure reflect the structures in the
referenced paper by Chen et al.
In this example, The CHARGE solver uses a 2D simulation domain, several x-normal cross sections of the structure
are simulated individually for a full picture of the carrier density profile across the entire metamaterial. A parameter
sweep 699 task has been set up under the sweeps and optimizations tab to sweep over the position of the simulation
region for 5 different cross sections. The electron density is then collected for each of the cross sections, simulating
voltages between 0 and 16 volts for every one of the cross sections. A charge monitor will record the n and p
distributions and save them to .mat files for the corresponding cross sections, which will be imported into the
npdensity grid attribute in FDTD Solutions.
Note:
1. When sweeping the simulation positions of x=0 um, 3.5 um, 9.5 um, 16 um and 21.5 um, resulting data from
the charge monitor will be recorded in different output .mat files, which is set in the script in "model".
2. Since no other output is needed, in the "Results" of the sweep, we set the current to output, which is arbitrary.
If you do not set any result, after sweep, you will need to manually close the sweep dialogue.
3. The sweep of applied voltages is set in the Boundary Conditions table for the electrical contact named
"emitter".
If the sweep task in CHARGE solver is run, the location of the simulation region object is varied from the center to
the edge of the structure sweeping over 33 voltage points at each cross section. Once the sweep is run, we can
open the different sweep files in the newly created folder and look at results such as the charge distribution,
electrostatic feild etc at different bias for different position.
FDTD Simulation
In FDTD Solutions, to symmetry boundaries are used and so only the first quarter of the simulation region is
included, as shown in THz device 1995 . We only create the npdensity objects in that quarter as well. Carrier densities
are used to calculate the corresponding refractive index of GaAs according to the Plasma-Drude model explained of
Charge to index conversion 402 . Note that the x span has to be specified according to the cross section of the
device. This has already been done in the provided .fsp file so you can skip this.
To calculate the overall device transmission as a function of the applied voltage, a parameter sweep 699 is used in
FDTD Solutions under the sweeps and optimizations task. The file is set to only sweep voltage of 0 V, 8 V, and 16 V
when the emitter voltage has been changed to positive in "model". Users with multi-processor computers or access
to concurrent computing resources (e.g. a compute cluster) can take advantage of these extra processors by
configuring the resources 213 in FDTD Solutions to utilize all available cores during the parameter sweep.
Run the sweep task in the .fsp file. The sweep will run simulations for all three bias values at a range of frequencies
from 0.25 THz to 2.5 THz. Use the following lines of script to plot the results once the sweep is done. The plot is
similar with the curve in Figure 3a of the referenced paper.
f = pinch(getsweepdata("sweep","f"));
T = pinch(getsweepdata("sweep","T"));
V = pinch(getsweepdata("sweep","V"));
plot(f(1:100,1)*1e-12, T(1:100,1),T(1:100,2),T(1:100,3), "Frequency (THz)",
"Transmission");
legend("V=0 volts", "V=8 volts", "V=16 volts");
Discussion
Compared to the reference paper, one may find there are some differences from the above result. For example at
higher frequency, the transmission is higher than the paper. This is because, we approximate the structure as
symmetric not only in x direction, but also in y direction. If removing the symmetry in y, the transmission at higher
frequency will be much lower. However, since the paper did not give complete information on the refractive index of
GaAs, the doping concentration and doping profile/region, and we simplified the simulation of n-GaAS and SI-GaAs
as GaAS with a constant refractive index of 3.5 in FDTD Solutions and set electric properties in CHARGE, we
simplified the structure as cross sections, and doping causes loss even without bias voltage, the differences are
reasonable.
In this section, we will look at three examples where a combination of solvers (optical, thermal and electrical) are
used to address the complex design requirements for metamaterial absorbers.
(simple example, optical only) absorber 2010 (optical + heat transport + charge
(charge transport + optical) transport )
Introduction
In this example, we will calculate the absorption characteristics of a plasmonic metamaterial absorber based on [1].
The absorption mechanism for these devices is mostly governed by the excitation of localized electromagnetic
resonances, and is highly dependent on the geometry of the top metal layer and the thickness of the dielectric layer.
Solvers 101
FDTD
Associated files
plasmonic_absorber.fsp
plasmonic_absorber_RTA.lsf
plasmonic_absorber_angle_sweep.lsf
See also
Unpolarized beam 602
Source - BFAST 590
Related publications
[1] J. Hao et al., "Nearly total absorption of light and
heat generation by plasmonic metamaterials," Phys.
Rev. B 83, 165107 (2011).
Simulation setup
The plasmonic absorber is composed of a periodic array of subwavelength metal patches on top of a thin dielectric
layer and a highly reflecting thick metal layer. For the optical simulation, we only need to simulate a single unit cell.
The file plasmonic_absorber.fsp contains the structure shown in Fig. 1. The design parameters of the device
can be defined in the 'Setup' tab of the 'model' object in the object tree.
Both symmetric and anti-symmetric boundary conditions 466 are used to reduce the simulation time. The two power
monitors, 'R' and 'T', are used to calculate the transmission and reflection (and therefore, absorption) spectrum of the
device. To be consistent with the simulations in reference 1, a Plasma (Drude) 223 material called 'silver' was added
to the material database and assigned to the top and bottom metal layers and a refractive index of 1.75 was used for
the dielectric layer.
Results
When the simulation (plasmonic_absorber.fsp) finishes, run plasmonic_absorber_RTA.lsf to create the
images shown below.
For these type of metamaterial absorbers, the spectral location of the resonance does not shift with the angle of
incidence when the correct mode is excited. This is a highly desirable feature for infrared sensing applications as the
detected light usually comes from many different angles. To verify that the desired absorption spectrum is robust for
non-normal incident angles, one can take advantage of the broadband fixed angle source technique (BFAST) 590 to
simulate the absorption spectrum for a range of incident angles. The script
plasmonic_absorber_angle_sweep.lsf uses BFAST 590 to sweep the incidence angle for a broadband
plane wave source. One can see from the figure below that the absorption spectrum has little dependence on the
illumination angle, as expected.
Solvers 101
FDTD
Associated files
graphene_absorber_uniform.fsp
graphene_absorber_fishnet.fsp
graphene_absorber_ef_sweep.lsf
See also
Graphene modeling methodology 2774
Graphene electro-optical modulator 2795
Related publications
[1] A. Andryieuski and A. V. Lavrinenko, "Graphene
metamaterials based tunable terahertz absorber:
effective surface conductivity approach," Opt.
Express 21, 9144 (2013).
Simulation setup
The absorption spectrum of the graphene absorber can be tailed by changing the key geometric parameters. Below
are the two types of structures we will consider: uniform graphene sheet and graphene fishnet metamaterial.
We use a 2D graphene material model 2774 based on the surface conductivity of the graphene. For this example, a
conductivity scaling of 2 is used for the graphene model to account for the two layers of graphene sheets used in [1].
A 2D rectangle object is used to model the sheet, and there is no need to add a mesh override region over the
graphene to resolve the thin layer. For the fishnet geometry, polygon objects with the refractive index of 1.53
(corresponding to the background index for dielectric) were used to pattern the 2d graphene sheet.
On the 'z min' boundary of the simulation region, a PEC (perfect electrical) boundary was used to mimic the perfect
mirror. A background index of 1.53 was used.
Results
The absorption spectra of the uniform and fishnet structures as a function of the chemical potential can be obtained
by opening each of the simulation file (graphene_absorber_uniform.fsp and
graphene_absorber_fishnet.fsp) and running the script file (graphene_absorber_ef_sweep.lsf). The
key results from the simulation can be summarized as follows:
The absorption spectrum of the graphene absorber is strongly dependent on the chemical potential
A broader absorption spectrum can be obtained with the fishnet structure. Furthermore, this spectrum can be
tuned by changing the geometry of the fishnet metamaterial.
Absorption spectra as a function of chem ical potential (Fig. 5 and Fig. 6 from [1])
If you happen to know the chemical potential of the graphene, you can directly enter the value in the graphene
material model. If not, you can use the charge transport solver to obtain the chemical potential as a function of
applied voltage. Additional information on how to extract the chemical potential as a function of applied voltage can
be found in the graphene electro-optical modulator 2795 example.
Solvers 101
FDTD
Associated files
meta_microbolo.fsp
meta_microbolo_r.lsf
meta_microbolo_steady.lde
v
meta_microbolo_transient.
ldev
meta_microbolo_extract.ls
f
See also
Photothermal Heating in
Plasmonic Nanostructures 1933
The main elements of metamaterial microbolometer are an absorber and a thermistor. The absorber is composed of
a silicon layer sandwiched between a periodic gold disks and a gold mirror. Under the absorber, there is a thin
silicon nitride (Si3N4) film followed by the vanadium oxide (VOx) thermistor layer. The thin silicon nitride layer
delivers heat from the absorber to the thermistor layer and serves as electrical insulation. The device is suspended
Typical design goal for metamaterial microbolometers is to reduce the pixel size without sacrificing detector
sensitivity and the thermal time constant. This requires both optical and thermal simulations. We first carried out an
optical simulation to calculate the absorption due to IR radiation. Then we take the optical absorption profile and use
it as a heat source in the subsequent heat transport simulation in DEVICE to calculate the temperature change in
the thermistor layer. In addition, because the heat transport solver in DEVICE solves the coupled system of
equations for heat transport and conductive electrical transport, we can also look at the electrothermal effect due to
an applied voltage and calculate the IV response for the microbolometer.
Optical simulation
Since the absorption is mostly confined in the absorber region, we can consider only this part of the device in optical
simulation and ignore the rest of the underlying layer. Assuming that the optical behavior of each pixel is identical ,
we can further reduce the simulation volume by only including a single unit cell of the array and impose periodic
boundary conditions as if there are infinite number of such arrays. This will significantly reduce the simulation time
required. If the radiation has a non-uniform distribution and each pixel experiences different amount of absorption,
then more unit cells in the device will need to be included in the optical simulation.
When applicable, the simulation time can be further reduced by taking advantage of the symmetry 466 of the
structure. As seen in the figure below, a mesh override 440 region is used to resolve the thin layers as the thickness
of the dielectric layer is critical to the absorption.
After running the simulation file meta_microbolo.fsp, run the meta_microbolo_RTA.lsf to create the
following plots.
f = getdata('R','f');
T = -transmission('T');
R = transmission('R');
plot(c/f*1e6,R,T,1-R-T,"Wavelength (um)","R/T/A");
legend('R','T','A');
The cross-sectional electric/magnetic field profiles can be visualized from the 'xz' and 'yz' monitors. The spatial
distribution of absorption can be visualized by right-clicking 'pabs' analysis group and selecting 'Pabs'. You can set
the 'Parameter' setting as below and use the slicer to get the cross-sectional view at the desired locations. The
results show that the magnetic field is confined mainly in the dielectric layer, and this strong magnetic resonance is
responsible for the high absorption.
Reflection/transm ission/absorption spectra, the m agnetic field (Fig 2. (a) and (d) of the referenced paper) and absorption
profile at resonance
The absorption resonance of this device can be tailored by changing the radius of the metal disk as shown in the
following plot, which can be created by running the meta_microbolo_r.lsf. With a radius of 530nm, the
absorption resonance peaks at around 9.3um, which corresponds to the human body radiation.
Absorption as a function of radius and w avelength (Fig 2. (b) and (a) of the referenced paper)
Schem atic diagram of integrated m icrobolom eter on substrate and its perspective view in DEVICE
The 'pabs' analysis group in the optical simulation automatically saves the absorption profile into a .mat file. This file
can be imported into the heat transport simulation by using the 'Import source' option from the main menu and
selecting the specified file. Note that because we only included 1 unit cell in the optical simulation, we have to copy
heat source into each pixel. One can do this easily with the "copy" or "array" function.
We are going to study both the steady-state and transient characteristics of the system in response to the heat
source. In both cases, a fixed temperature of 293.15 K is applied to the two pillars supporting the microbolometer as
shown in the following figure.
For the steady-state simulation, meta_microbolo_steady.ldev, the solver type is set to 'steady state' in the
Edit Heat Solver window. After running simulation, right-click on the 'HEAT' object and visualize the 'thermal' result.
In the visualizer, select 'T' in the attribute. Since the absorbed power is relatively small, the resulting temperature
change in the microbolometer is very small and is almost uniform in the absorber region. The plot below shows the
change in temperature as a function of pixel size, and one can see that, as expected, dT increases quadratically as
a function of pixel size
Steady-state therm al distribution and the tem perature change as a function of the pixel size (Fig. 6 (b) of the referenced
paper)
For the transient simulation, meta_microbolo_transient.ldev, the solver type is set to 'transient' in the Edit
Heat Solver window. The on/off setting of the import source can be adjusted in the 'Transient' tab of the same
window. To obtain the transient temperature response, run the meta_microbolo_extract.lsf. The following
plot was obtained by running optical and heat transfer simulations for pixel sizes of 5 and 10 um. It is worth noting
that while a larger pixel size gives a larger temperature change, it take longer to reach a steady state level.
Getting started
Relevant videos (login required):
PIC Design Methodologies
Passive Building Blocks
Optimization
Modulators and Detectors
Thermally Tuned Waveguide
Compact Model Library Creation
Circuit Simulations and Applications
The 3D finite-difference time-domain (FDTD) solver in FDTD Solutions is one of the most versatile and rigorous
methods for simulating light interaction with nanoscale components. However, when applied to three-dimensional
structures, FDTD is highly computationally intensive, making it difficult to treat large integrated optical components
efficiently.
MODE Solutions provide several alternative methods for simulating wave propagation over large distances. The 2.5D
variational FDTD (varFDTD) solver and the eigenmode expansion (EME) solver can simulate how waveguide
modes propagate along longitudinally-varying waveguide geometries over long distances. For planar geometries
where there is negligible coupling between vertical modes, varFDTD can achieve accuracy comparable to 3D FDTD
with computation times comparable to 2D FDTD. For 3D geometries where there is coupling between vertical modes,
EME is a frequency domain method that offers a good alternative to 3D FDTD because its computational
requirements scale exceptionally well with distance.
Both FDTD Solutions and MODE Solutions have built-in finite-difference eigenmode (FDE) solver, which can be
used for modal analysis of waveguides and fiber cross-sections of arbitrary cross section.
Users have the ability to streamline their design process by being able to select and run different solvers using the
same CAD environment, geometry and analysis tools. For example, the design of a ring resonator can be quickly
optimized using varFDTD, with final verification and S parameters extraction done in a full 3D FDTD simulation. Or,
the design of a polarization converter can start with modal analysis and follow up with propagation using the 2D or
3D EME solver.
Features
FDTD Solutions:
Waveguides and passive routing elements including splitters, mode converters and crossovers
Input/output couplers based on grating couplers 2075
Resonators analysis with integrated Q-factor Analysis Object 1807 for low- and high-Q resonator structures
including, for example, ring resonators 2039
3D photonic-crystal cavities 1821 , photonic crystal waveguide 1856 , and photonic crystal bandstructure 1843
Plasmonic waveguides
MODE Solutions:
Waveguide structure design including, for example, effective index, dispersion, group index, and propagation
loss for straight and bent waveguides
Coupling efficiency between different waveguide sections using the built-in overlap calculator 763
Optimize large planar waveguide geometries quickly and efficiently using the 2.5D variational FDTD solver
Optimize long passive devices such as tapers, Bragg gratings and MMI couplers efficiently using the
eigenmode expansion solver
Plasmonic waveguides 1883 and components arrayed waveguide gratings (AWGs) 2119
Getting started
Relevant videos (login required):
Passive components and electro-optic modulators
Grating couplers design and optimization
Bragg waveguide gratings and resonators
Eigenmode expansion solver and applications
Application examples
Solvers Description
101
varFDTD
FDE, Tapers 2124
EME,
varFDTD
FDE Impedance 2141
EME
The example will show how to design and simulate a ring resonator using the
FDE solver to achieve a desired free spectral range (FSR) and quality factor
(Q factor) for a silicon on insulator (SOI) based waveguide design targeting
on-chip communication applications.
This example will use the initial design introduced in Ring Resonator (design
and initial simulation) 2021 to perform additional analysis with the varFDTD
solver.
The example will show how to set up the same ring resonator simulation in
3D FDTD and extract the S parameter results.
This example will show how to design and simulated a spot size
converter that can efficiently couple light from a strongly confined high
index contrast silicon waveguide into an optical fiber, using the EME
solver.
Problem definition
This is Part 1 of the ring resonator getting started tutorial. Here, we will consider how MODE Solutions can be used
to design and simulate a ring resonator. We will use the software to achieved a desired free spectral range (FSR)
and quality factor (Q factor) for a silicon on insulator (SOI) based waveguide design targeting on-chip communication
applications. In Part 2, Ring resonator (parameter extraction and yield analysis) 2033 , we will consider how to carry
out the parameter extraction and yield analysis process for this design.
Solvers 101
FDE
varFDTD
Associated files
ring_resonator.lms
ring_resonator.fsp
fdtd_results.ldf
ring_resonator.lsf
ring_resonator_fdtd.
lsf
In this topic
Discussion and results 2028
Modeling instructions 2022
References
Hammer, M. and Hiremath,
K.R. and Stoffer, R. (2004)
Analytical approaches to
the description of optical
microresonator devices.
(Invited) In: Microresonators
as Building Blocks for VLSI
Photonics, 18-25 October
2003, Erice, Italy. pp. 48-71.
AIP Conference
Proceedings 709. Springer.
ISSN 0094-243X ISBN 978-
0-7354-0184-6
Learning objectives
In this example, we show how MODE Solutions can be used to design a ring resonator. The user will learn to:
Insert a ring resonator object from the components library
Use the Eigenmode Solver to choose the waveguide spacing, coupling length and ring length for the desired FSR
and Q factor
Compare results with the theoretical design and 3D FDTD results
In this topic
Create Ring Resonator 2022
Add Eigenmode Solver and Find group index 2023
Determine Coupling Length 2024
Update Ring Resonator properties and Run Propagator Simulation 2024
Press on arrow on the STRUCTURES button and select a RECTANGLE from the pull-down menu.
Set the properties of the insulator substrate rectangle according to the following table.
tab property value
Geometry x ( m) 0
x span ( m) 16
y ( m) 0
y span ( m) 16
z ( m) -2
z span ( m) 4
Material material SiO2 (Glass) - Palik
Press on arrow on the COMPONENTS button and select INTEGRATED OPTICS from the pull-
down menu. This will open the object library window.
Select RING RESONATOR from the list and press the INSERT button.
Set the properties of the ring resonator according to the following table. The coupling length and radius used for
the first part of the simulation are just an initial guess and will be modified to the correct values later.
tab property value
Properties x, y, z ( m) -7,0,0.09
Lc ( m) 0
gap ( m) 0.1
radius ( m) 4
material Si (Silicon) - Palik
base width ( m) 0.4
base height ( m) 0.18
x span ( m) 14
base angle 90
Press on the arrow on the on the SIMULATION button and select the EIGENSOLVER from the pull-
down menu. Set the properties according to the following table. This will place the eigensolver region at the input
bus for the ring resonator.
tab property value
General solver type 2D X normal
Geometry x ( m) -5
y ( m) 3.6
y span ( m) 4
z ( m) 0.075
z span ( m) 1
Mesh settings mesh cells z 100
mesh cells y 200
Press on the RUN button to open the eigenmode solver analysis window. Press on the MESH STRUCTURE
button to plot the meshed structure. Set the wavelength to 1.5 microns.
Click the "Calculate Modes" button and then, select the mode of interest (mode #1) in the Mode list
Switch to the frequency analysis tab and set the following parameters:
property value
track selected mode yes
stop wavelength (um) 1.6
number of points 4
detailed dispersion calculation yes
Click on the FREQUENCY SWEEP button to begin the scan. The scan will take about a minute.
To plot the calculated dispersion as a function of wavelength, select the FREQUENCY PLOT tab in the bottom
righthand corner of the frequency analysis window. Then select "group index" in the plot pull down menu. The plot
can be seen above the frequency plot tab. If you press the PLOT IN NEW WINDOW you will get a new window. If
you zoom into the plot, you can see that at 1.55 microns, the group index is about 4.63.
Press the SWITCH TO LAYOUT button . This deletes all the mode data and allows us to edit the
eigenmode solver.
Move the center of mode solver to x = 0 so that the mode solver is located in a region where two waveguides cross
the mode solver.
Press on the RUN button to open the eigenmode solver analysis window. Press on the MESH STRUCTURE
button to plot the meshed structure. Set the wavelength to 1.55 microns, and press FIND MODES.
The neff values for the first and second modes are given in the mode list. We can plug in these neff values into an
analytical formula (see the discussion and results page) in order to determine the coupling length.
Press the SWITCH TO LAYOUT button so that it is possible to edit the simulation.
Set the properties of the ring resonator using the values of the coupling length and the radius determined from the
previous steps, ie
tab property value
Setup Variables radius ( m) 3.1
Press the arrow on the on the SIMULATION button and select the varFDTD from the pull-down
menu.
Set the properties according to the following table.
tab property value
General simulation time (fs) 5000
Geometry x ( m) 0
x span ( m) 10
y ( m) 0
y span ( m) 10
z ( m) 0
z span ( m) 1
Effective index bandwidth broadband
There is a green cross in the graphical user interface which sets the location of the core slab mode for the
propagator. Click on PROP object to select the cross and then drag it so that it overlaps with the Silicon portion of
the ring resonator.
Since the effective index is a broadband material, the propagator finds a material fit to the effective index data
before running the simulation. Press on the arrow next to the CHECK button and select the MATERIAL
EXPLORER. This will open the material explorer, where you can check the fit to the slab mode at the location you
just selected. You can also see the material fit for the test materials (which are shown by blue crosses in the
graphical user interface).
Next, re-edit the propagator region and select the EFFECTIVE INDEX tab. The plot of the slab mode should look
like the image below.
Press the arrow on the on the SOURCES button and select the MODE source from the pull-down
menu. Set the properties according to the following table.
tab property value
Geometry x ( m) -4.5
y ( m) 3.6
y span ( m) 3
Frequency/Wavelength wavelength start ( m) 1.5
wavelength stop ( m) 1.6
In the previous step we calculated the coupling length from the effective index difference from the mode solver. You
can see the effective index difference which the propagator sees by setting x = 0 so that the mode source is in
between two waveguides. Then choose to user select the modes. This technique is shown in a bit more detail in
the waveguide couplers application example in the MODE Solutions online help.
Press on the arrow on the on the Monitors button and select the frequency domain field and power
monitor from the pull-down menu. Set the properties according to the following table
tab property value
name drop
Geometry monitor type Linear Y
x ( m) -4.2
y ( m) -3.6
y span ( m) 2
General override global monitor settings yes
frequency points 500
Press the DUPLICATE button to create a copy of the monitor. Set the properties according to the following
table.
tab property value
name through
Geometry x ( m) 4.2
y ( m) 3.6
Press on the arrow on the on the Monitors button and select the field time monitor from the pull-down menu.
Set the properties according to the following table
tab property value
name time_drop
Geometry x ( m) -4.2
y ( m) -3.6
Press the DUPLICATE button to create a copy of the monitor. Set the properties according to the following
table
tab property value
name time_through
Geometry x ( m) 4.2
y ( m) 3.6
Press on the RUN button to run the propagator simulation. The job manager will appear and show the
progress for the simulation.
Once the simulation finishes running, all the monitors and analysis groups in the object tree will be populated with
data. The Results View window (which can be opened by clicking on the "Show result view" button) will display all
the results and their corresponding dimensions/values for the selected object. Plot the time signal and spectrum
Ey by right-clicking on the "time_drop" time monitor and selecting Visualize -> E or spectrum. (The field profiles
can also be visualized in the same way.)
Press on the OPEN button and browse to the ring_resonator.lsf script file.
Save the fdtd_results.ldf file in the same folder. This lumerical data file (*.ldf) contains the results from
the 3D FDTD simulation. This data file can also be created by running the ring_resonator.fsp 3D FDTD
simuluation followed by the ring_resonator_fdtd.lsf script file. The aforementioned script file will
automatically generate the data file.
Press on the RUN SCRIPT button . The script will calculate the theory and send a data set to the visualizer.
The data set contains the analytical, the 3D FDTD and the propagator transmission through the drop channel (or
output bus).
By default there will only be one copy of the data set. Press on the duplicate button twice to create two more
copies of the data set. You can see the duplicate button in the left part of the screenshot below.
As shown in the screenshot below, set the attributes of each copy of the data set so that they plot a different
transmission. Once you have done this, you will see the three transmission plots in one figure in the Visualizer.
Movie monitor
To add a movie monitor to the simulation, press on the arrow on the on
the Monitors button and select the movie monitor from the
pull-down menu.
Movie monitors are always 2 dimensional and show the progress of the
2D portion of the propagator simulation, which is run after the
propagator compresses the z-dimension of the propagator region.
In the ring_resonator.lms simulation, note that the general tab is
set up to plot the Ey component of the field (since the TE slab mode is
chosen for the propagator). Also, notice that the scale is reduced from a
default of 1 to a setting of 0.1 so the fields are more visible in the movie
By default the movie monitor is set as inactive. It is possible to activate/
deactivate the movie monitor by right clicking on the object with the
mouse as shown in the screenshot to the right. When the movie
monitor is active, a movie with the same name as the movie monitor is
saved in the current working directory. The movie monitors are disabled
in the simulation because the simulation takes longer to run when
movie monitors are enabled.
The major defining quantities are the average (effective) ring length L, the complex propagation constant of the
circulating mode, the field transmission coefficients of the waveguide coupler t11 and t12, and the bend loss.
The real part of the propagation constant is the phase constant. The total ring loss is due to the imaginary part of
beta, the bend loss, and other scattering losses at the coupling region. For the high index contrast waveguides we
are considering, at wavelengths around 1550nm, the propagation loss and bend loss are small. For this analysis we
will neglect all losses, but the different loss contributions could easily be considered in a more detailed analysis.
For the case of the ring-shaped waveguide coupled to two optical waveguides, the dropped optical power can be
expressed as
4
t12
PD = PIN 2
1 - t112 e i bL
On resonance, the phase acquired by the wave after a complete round-trip is an integer multiple of 2 , i.e., L =
2 N, with N as the mode number. If the effective refractive index is independent of wavelength, then ring length (also
called the perimeter) is an integer multiple of the effective wavelength on resonance, or L = N0/neff, where the
effective refractive index is defined as neff = c/ and 0 = c/f0 is the free-space wavelength at the resonance
frequency f0.
In reality, the effective index does depend on wavelength and the resonances are separated by the free spectral
range (FSR) which, in wavelength units, is given by
l2
FSR =
ng L
where ng = c(d/d ) is the group index.
Since the bending loss is low for high index waveguides, and we are ignoring other sources of loss, the Q factor is
approximately given by
l ng L p t11
Q= =
2 dl l 1 - t11 2
We will now use the above formulas to design a ring resonator for a WDM system with a channel spacing of 200GHz
(1.6nm at 1550nm). We want to design the system to drop every 16th channel. The FSR should therefore be
3200GHz (25.6nm at 1550nm). We would like the FWHM of the drop to be 100GHz, corresponding to a Q of
We will use a system made of an SOI waveguide. The waveguide is 400nm wide and 180nm high.
Now that we know the group index, we can easily calculate the total desired ring length.
c
L= 20.2 mm
ng FSR
t11
n Lp
= g
+1 -
ng L p
2Q l
2Q l
Using our known group index, ring length and center wavelength, we find t11 ~ 0.95 and therefore t12 ~ 0.31
If we use the Eigenmode Solver to calculate the index of the coupled waveguide system, we know that the coupling
length can be determined from the difference in effective index of the symmetric and anti-symmetric coupled modes
by the formula
l
Lcoupler = sin -1 ( t12 )
pDn
Using a 100nm gap between the waveguides, we find delta-n = 0.109 at 1550nm. This gives a coupling length of
approximately 1427nm. In reality, we will use a coupling length of 0 and will obtain enough coupling from the bent
section of the ring near the straight waveguide.
The radius of the ring can be chosen such that we have the desired coupling length and the desired total ring length.
For the remainder of the example, we will use a radius of 3.1 microns, and we will use this design for the Propagator
simulation in the next step.
Propagator Simulation
In this Propagator simulation, the MODE source will calculate the fundamental TE mode of the waveguide,and use
this to inject a guided mode into the upper waveguide. For an overview of the 2.5D variational FDTD solver, see the
Lumericals 2.5D FDTD Propagation Method whitepaper on our website.
The ring resonator is a high Q device which traps the light for many round trips in the ring. These high Q devices
require longer simulation times in the time domain than non-resonant devices. We will start with a simulation time of
5000fs, although more time may be necessary. Note that this is longer than our default simulation time (1000fs). It is
important to increase the simulation time because the frequency domain monitor results are incorrect if the
simulation time is not set long enough for the fields to decay.
After running the simulation, we can consider the E field intensity near a drop resonance.
Results
We can compare the result with the theoretical curve based on our target FSR and Q. Note that we have adjusted
the phase of the coupling coefficient to align the peaks near 1550nm, since only the amplitude of the coupling
coefficient is given by Q.
The results are in reasonable agreement for the theoretical FSR but the Q factor is incorrect. This is due to
neglecting all sources of loss in the theoretical curve calculation
not achieving exactly the desired value of t12
The 3D FDTD simulation shows lower total transmission because it accounts for more sources of loss.
Note that we have adjusted the theoretical peaks to give a maximum at 1550nm. The precise position of this peak is
very sensitive to the exact optical length of the ring.
Next Steps
Please see Part 2 of the ring resonator tutorial: Ring resonator (parameter extraction and yield analysis) 2033 , where
we will consider how to carry out the parameter extraction and yield analysis process for this design.
Problem definition
This is Part 2 of the ring resonator getting started tutorial. Here, we will consider how to carry out the parameter
extraction and yield analysis process for the design that we introduced in Ring resonator (design and initial
simulation) 2021 . Please go through this example before proceeding.
Solvers 101
varFDTD
Associated files
ring_resonator2.lms
ring_resonator2_yield.lms
In this topic
Discussion and results 2036
Modeling instructions 2033
References
Hammer, M. and Hiremath, K.R. and Stoffer, R. (2004)
Analytical approaches to the description of optical
microresonator devices. (Invited) In: Microresonators as
Building Blocks for VLSI Photonics, 18-25 October 2003,
Erice, Italy. pp. 48-71. AIP Conference Proceedings 709.
Springer. ISSN 0094-243X ISBN 978-0-7354-0184-6
Learning objectives
In this example, the user will learn to:
Use Mode Expansion Monitors 649 to extract the parameters for interfacing with circuit level simulations in
INTERCONNECT.
Compare the S parameter results with 3D FDTD.
Use the Yield Analysis 728 feature to track the effect of fabrication errors on the free spectral range (FSR) of the
ring resonator.
In this topic
Parameter extraction 2033
Parameter extraction
Add a mode expansion monitor by pressing on the arrow on the Monitors button and select the Mode
expansion monitor from the pull-down menu. Set the properties according to the following table. (Note that you can
add mode expansion monitors in layout or analysis mode, so it is not necessary to switchtolayout if the
simulation has already been ran.)
tab property value
name expansion
Geometry monitor type Linear Y
x ( m) -4.2
y ( m) 3.6
y span ( m) 3
z (um) 0
z span (um) 2
We have positioned this monitor directly in front of the MODE source, and we will use the fundamental mode of the
top waveguide to expand the field at the 4 ports of the ring resonator.
In the Mode expansion tab, select the fundamental mode for "Mode calculation". You can use the Visualize Mode
Data button to study the field profile for this mode.
In the "Monitors for expansion table", select the 4 power monitors we have set up at the 4 ports of the Ring
Resonator as follows:
Plot results
Once the mode expansion monitor has been defined, you will see the list of results in the Result
VIew panel. Multi-select the modal expansion results and select "Calculate". Once the calculations
are complete, one can plot the results in the Visualizer.
Note that when the Visualizer first opens up, you will see a list of all the attributes of all the results. One can use the
"Remove" button on the right side of the attribute panel to remove any unwanted attributes, keeping only the relevant
ones. For a complete description of all the results from the mode expansion monitors, please refer to Mode
Expansion Monitors 649 .
S parameter calculations
In ring_resonator2.lms, the model analysis group in the provided pre-made simulation file has been set up to
calculate the S parameters. Since the expansion monitor automatically returns the expansion coefficients for the
forward and backward propagating light (a and b), we can calculate the S parameters very straightforwardly. The
calculations can be found in the script under the Analysis tab of the "model" group, this script will also export the S
parameter results into a .txt file, which can be imported directly by INTERCONNECT.
As shown in the figures above, the Results View will automatically show the S parameters result returned by the
model analysis group. One can then visualize this result by right-clicking on "S" and selecting Visualize.
Yield analysis
To test how our design is affected by fabrication errors, we can use either a parameter sweep or an yield analysis
project.
In ring_resonator2_yield.lms, a "FSR" analysis group has been added, which will return the FSR by finding
the peaks in the transmission spectrum of the "through" monitor. We will track the change in the FSR as a function
of the waveguide width and height, assuming a fabrication error of 10nm.
Parameter sweep
A nested parameter sweep project has been set up to track the change in FSR as a function of the width of the
waveguide (from 0.39 to 0.41 microns) and the height of the waveguide (from 0.17 to 0.19 microns). Once the sweep
is complete, one can plot the map of the FSR as a function of the waveguide height and width to see how the result
deviates from the original design as a result of this 10nm fabrication error.
Yield analysis
An yield analysis project has also been set up to vary the width of the waveguide based on a Gaussian distribution
centered at 0.4 microns, with a standard deviation of 0.01 microns. Once this is run, we will be able to see whether
the FSR falls within our target specification range of 27nm to 27.5nm.
The mode expansion monitor is setup to calculate the amount of forward and backward propagating power in the
fundamental TE mode for the 4 monitors at the input and output ports. First, we can look at this in the Visualizer.
Note that this analysis takes several seconds because each waveguide mode is recorded over 500 frequency points.
To speed up the calculation, we have used a single mode at the center frequency for the expansion, however we
could calculate more mode profiles over the device bandwidth to obtain a more accurate expansion. Once
calculated, the expansion is stored in memory and will be saved to the .lms file for quick future reference. The figure
below shows the amount of power reflected in port 1 and transmitted through ports 2, 3 and 4 (T forward/T
backward).
It is interesting to note the resonant reflection and transmission that is occurring at port 1 and port 4 (blue and
green). The power reflected and leaking out port 4 is equivalent. These are due to weak coupling between forward
and backward propagating modes in the ring, which can have a substantial effect due to the high Q of the device.
As mentioned in the Modeling instructions 2033 section, the model itself is an analysis group that is setup to calculate
the S parameters. Select the model and use the Results Manager to calculate the S matrix. During the calculation,
S11, S21, S31 and S41 are saved to the text file FDTDtoINTERCONNECT.txt which can be used to create a ring
resonator element in INTERCONNECT. The different S parameters can be easily visualized. For example, below we
see the phase of S21 and S31. We can see the effect of the resonances which lead to sudden changes in the slope
of the phase which indicates the sudden change in group delay at resonance.
The same ring resonator is modeled using 3D FDTD in the Ring Resonator FDTD section 2039 , and the results are
shown below:
These are in reasonable agreement with the Propagator results shown in the previous section (especially in the
FSR). There are some differences in the Q factors, which is not too surprising as FDTD accounts for more sources
of loss. That being said, one can go a long way towards optimizing the design with only Propagator simulations.
Below is a summary of the simulation requirements for the two types of solvers:
Note that this is a relatively small simulation (10x10um span in the x/y directions). Typical simulations with ring
resonators or other silicon photonic devices require much larger simulation regions and much longer simulation
times. In that case, it is even more important to consider using MODE Solutions' Propagator, which may lead to a
significant amount of time savings.
Yield analysis
To make sure that the actual device will work as expected, it is often necessary to consider imperfections that can
result from the fabrication process. To do this, we first set up a nested parameter sweep to track change in FSR as
a function of the waveguide height and width (assuming fabrication error of 10nm). The following figure shows the
map of the FSR vs waveguide height and width:
Then, in the yield analysis, we can define the target range for the FSR. Once the simulations finishes running, the
log at the bottom of the "Yield analysis status" window will show the calculated yield percentage which corresponds
to the percentage of trials that falll within the specified yield estimate range. One can also plot the FSR histogram as
shown below. (Note that even though we are only considering the FSR in this example, it is very straightforward to
extend this analysis to take into account other properties such as the shift in the resonance peaks, the Q factors ...
etc using the same methodology.)
The parameter sweep and yield analysis shown in this example required more than 100 simulations. More
simulations will be necessary if we want to change more parameters. This is another reason to consider using the
Propagator instead of running 3D FDTD simulations.
Problem definition
The device being studied in this example is a ring resonator filter. It consists of two waveguides (through and
drop channels) connected by a ring. As the input mode propagates past the ring, a fraction will couple into the ring.
Due to the circular nature of a ring, the mode will circulate around the ring many times. As the mode circulates, it
will interfere with itself. The interference pattern is strongly wavelength dependent, which is why these devices can
be used as filters. Some wavelengths will pass through the device, while other wavelengths will be re-directed into
the drop channel.
We will use FDTD Solutions to study the same ring resonator in 3D that was designed in a varFDTD simulation
using MODE Solutions. We will then show how we can extract S parameters that can be used for circuit level
simulations in INTERCONNECT.
We will start with the geometric parameters determined in the MODE Solutions getting started example.
Solvers 101
FDTD
Associated files
ring_resonator.fsp
ring_resonator_fdtd.lsf
fdtd_results.ldf
ring_resonator.lsf
In this topic
Discussion and results 2047
Modeling instructions 2040
See also
Making a cw movie 644
In this topic
Object setup 2040
Run simulation 2044
Plot results 2044
Calculate S parameters 2046
Object setup
We will start with the geometric parameters determined in the MODE Solutions getting started example.
Structure
Open a blank simulation file.
Press on aarrow on the STRUCTURES button and select a RECTANGLE from the pull-down menu. Set the
properties of the insulator substrate rectangle according to the following table.
tab property value
Geometry x ( m) 0
x span ( m) 22
y ( m) 0
y span ( m) 16
z ( m) -2
z span ( m) 4
Material material SiO2 (Glass) - Palik
Press on arrow on the COMPONENTS button and select INTEGRATED OPTICS from the pull-down
menu. This will open the object library window.
Select RING RESONATOR from the list and press the INSERT button.
Set the properties of the ring resonator according to the following table. The coupling length and radius used for
the first part of the simulation are just an initial guess and will be modified to the correct values later. The value of
the index property of the ring resonator is not used unless the material is specified as <Object defined dielectric>,
so it's value can be arbitrary.
tab property value
Properties x, y ( m) -12.5, 0
z ( m) 0.09
Lc ( m) 0
gap ( m) 0.1
radius ( m) 3.1
material Si (Silicon) - Palik
base width ( m) 0.4
base angle (degrees) 90
base height ( m) 0.18
x span ( m) 25
FDTD Region
Press on the SIMULATION button to add a simulation region. Note that if your button does not look
like the button to the left, you will need to press on the arrow to get the simulation region. Set the properties
according to the following table.
tab property value
Source
Press the arrow on the on the SOURCES button and select the MODE source from the pull-down
menu. Set the properties according to the following table.
tab property value
Monitors
We will set up power monitors at the 4 ports of the ring resonator to calculate the transmission through each port,
and the S parameters.
Press on the arrow on Monitors button and select the frequency domain field and power monitor
from the pull-down menu. Set the properties according to the following table
tab property value
name drop
Geometry monitor type 2D X-normal
x ( m) -4.2
y ( m) -3.6
y span ( m) 3
z (um) 0
z span (um) 2
Use the DUPLICATE button to create three copies of the monitor. Set the properties according to the
following tables.
tab property value
name drop2
Geometry x ( m) 4.2
y ( m) -3.6
We will also place time monitors at each port to study the field as a function of time.
Press on the arrow on the on the Monitors button and select the field time monitor from the pull-down menu.
Set the properties according to the following table
tab property value
name t_drop
Geometry x ( m) -4.2
y ( m) -3.6
Use the DUPLICATE button to create three copies of the monitor. Set the properties according to the
following tables.
tab property value
Name t_drop2
Geometry x ( m) 4.2
y ( m) -3.6
Monitors button and select the frequency domain field monitor from the pull-down menu. Set the
properties according to the following table.
tab property value
name full_profile
General override global monitor settings select check box
frequency points 5
Geometry monitor type 2D Z-normal
x ( m) 0
y ( m) 0
x span ( m) 16
y span (um) 12
z (um) 0
Lastly, we will add the Mode expansion monitor for the S parameters calculation. Press on the arrow on the
Monitors button again and select the Mode expansion monitor from the pull-down menu. Set the properties
according to the following table.
tab property value
name expansion
Geometry monitor type 2D X-normal
x ( m) -4.2
y ( m) 3.6
y span ( m) 3
z (um) 0
z span (um) 2
We have positioned this monitor directly in front of the MODE source, and we will use the fundamental mode of the
top waveguide to expand the field at the 4 ports of the ring resonator.
In the Mode expansion tab, select the fundamental TE mode for "MODE calculation". You can use the Visualize
Mode Data button to study the field profile for this mode.
In the "Monitors for expansion tabl"e, select the 4 power monitors we have set up at the 4 ports of the Ring
Resonator as follows:
Press the Resources button and check the number of processes (number of cores) for the local
machine. If you have additional computers on the network with FDTD installed as well as extra engine licenses,
you can add them to the resource list. Click "Add" and set the appropriate properties.
Press the "Run Tests" button to make sure the simulation engines on the resources are configured correctly. The
first time you run this test, it may fail and ask you to register your username and password for your operating
system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests. If
there are any errors or warnings, they will appear in the "Result" field.
Plot results
Once the simulation finishes running, all the monitors and analysis groups in the object tree will be populated with
data. The Results View window (which can be opened by clicking on the "Show result view" button) will display all
the results and their corresponding dimensions/values for the selected object. Plot the time signal and spectrum
Ey by right-clicking on the "t_drop" time monitor and selecting Visualize -> E or spectrum.
You can then select which components of the E field data you want to plot in the Visualizer. The screenshot
below shows how to plot the real part of the y component of the electric field.
To plot the transmission through the through monitor, right-click on the "through" power monitor and select
Visualize->T.
To plot the magnetic field intensity at 1.52 microns, right-click on the full_profile monitor and select Visualize->H
and select the appropriate wavelength.
Calculate S Parameters
The model analysis group in the provided pre-made simulation file has been set up to calculate the S parameters.
Since the expansion monitor automatically returns the expansion coefficients for the forward and backward
propagating light (a and b), we can calculate the S parameters very straightforwardly. The calculations can be found
in the script under the Analysis tab of the "model" group, this script will also export the S parameter results into a
.txt file, which can be imported directly by INTERCONNECT.
As shown in the figures above, the Results View will automatically show the S parameters result returned by the
model analysis group. One can then visualize this result by right-clicking on "S" and selecting Visualize.
Simulation set up
FDTD Solutions contains a mode source with an integrated mode solver. This source will be used to inject a guided
mode into the upper waveguide. The mode source is set to calculate the fundamental TE mode of the waveguide.
In the screen shot shown to the left below, the mode source injection plane is drawn with a white outline and grey
shaded region where it is inside the FDTD simulation region. The injection direction is depicted with the pink arrow.
The line on the image on the right shows the mode profile |E|^2 that will be injected by the mode source. The mode
profiles can be viewed simply by right clicking on the mode source object, or using the Results Manager window
when the mode source is selected. You can also view the mode profile by editing the mode source object.
Notice that the mode profile goes to zero at each edge of the image. For accurate simulations, it is important that
the mode source be large enough to contain the entire mode. If the mode source is too small, the mode will be
truncated, leading to simulation errors. Similar rules apply to the FDTD simulation region, shown as an orange box.
The absorbing PML boundaries of the simulation region can not be placed too close to the structure, or they will clip
the mode.
The ring resonator is a high Q device which traps the light for many round trips in the ring. These high Q devices
require longer simulation times in the time domain than non-resonant devices. Based on the MODE Solutions
example, we will start with a simulation time of 4000fs, although more time may be necessary.
This is longer than our default simulation time (1000fs). It is important to increase the simulation time because the
frequency domain monitor results are incorrect if the simulation time is not set long enough for the fields to decay.
Results
Initially, we set the mesh accuracy to 1 and run the simulation. It is a good idea to run simulation at very low mesh
accuracy while they run quickly to be sure that most settings are correct and that we are obtaining reasonable
results. The simulation will run in about 5 minutes or less on a modern workstation. Please refer to the Modeling
Instructions 2040 page for detailed information on how to generate some of the plots below.
The plot to the left below shows the Ey field in the drop channel. Notice that the initial peaks are rapidly distorted
due to dispersion. The figure on the right shows the associated spectrum at the drop channel. As expected, we see
resonances approximately every 25.6nm. We also notice that some of the resonances are split. This is in fact an
effect of coupling between forward and backward propagating modes in the ring which are weakly coupled and which
leads to a Rabbi splitting. In principle, the backward propagating modes should not be excited, however, there is
some scattering to backward propagating modes each time the waveguides are close together. This effect is made
worse by the very low mesh accuracy, which can also introduce backscattering throughout the ring due to
staircasing effects. We will see that these effects are significantly reduced as we increase the mesh accuracy.
Nonetheless, backscattering effects can have important consequences in real devices.
The figure below shows the magnetic field intensity at 1.52 microns in the device. Here we clearly see the standing
wave pattern from forward and backward propagating modes, which leads to the Rabbi splitting observed at the 1.53
micron resonance. Note that this causes light to be reflected back into the source and to output both forward and
backward at the drop waveguide.
We can rerun the simulation with a mesh accuracy of 2. This will take 25 minutes or less on a modern workstation
to run the full 4000fs.
We can select the through and drop channels to quickly plot the transmission in these waveguides using a
visualizer. The ripples in the result are an indication that the fields in the ring have not fully decayed before the end of
the simulation, as these ripples are characteristic of the fourier transform of a time signal that is truncated. We also
notice that the splitting of the peaks has disappeared, indicating that the coupling to backward propagating modes
was artificially large due to the extremely coarse mesh used. However, we will see that there is still backward
propagating light generated and it would be worth doing some convergence testing of the mesh size, particularly
around the waveguide coupling region, to determine how significant a problem this might be for an actual device.
The following lines of script will also export the drop results in a format that can be used for MODE Solutions to
compare with the MODE Solutions results.
Tdrop_3DFDTD = -transmission("drop");
lambda_3DFDTD = c/getdata("drop","f");
savedata("fdtd_results.ldf",Tdrop_3DFDTD,lambda_3DFDTD);
We can also obtain the spatial field profiles at various frequencies. The right image below shows |E|^2 at 1.6
microns, where almost all the light is transmitted to the through channel. The left image is shown at 1.5238
microns, where we begin to see light resonate more strongly in the ring. Once the spectrum is determined of course,
we can adjust the wavelength of our profile monitor to capture the fields precisely on and off resonance.
Parameter extraction
The ring resonator is a 4 port device, which we we can label 1 through 4, as shown below. We can use a mode
expansion monitor to calculate the complex mode expansion coefficient for both forward and propagating modes in
each waveguide. This allows us to easily construct the 16 parameter S matrix which can be exported for use in
INTERCONNECT. In reality, this device is so symmetric, that only 4 coefficients of the S matrix need to be
calculated - for example, S11=S22=S33=S44.
The mode expansion monitor is setup to calculate the amount of forward and backward propagating power in the
fundamental TE mode for the 4 monitors at the input and output ports. First, we can look at this in the Visualizer.
Note that this analysis takes several seconds because each waveguide mode is recorded over 500 frequency points.
To speed up the calculation, we have used a single mode at the center frequency for the expansion, however we
could calculate more mode profiles over the device bandwidth to obtain a more accurate expansion. Once
calculated, the expansion is stored in memory and will be saved to the fsp file for quick future reference. The figure
below shows the amount of power reflected in port 1 and transmitted through ports 2, 3 and 4. It is interesting to note
the resonant reflection and transmission that is occurring at port 1 and port 4. The power reflected and leaking out
port 4 is equivalent. As discussed above, these are due to weak coupling between forward and backward propagating
modes in the ring, which can have a substantial effect due to the high Q of the device.
The model itself is an analysis group that is setup to calculate the S parameters. Select the model and use the
Results Manager to calculate the S matrix. During the calculation, S11, S21, S31 and S41 are saved to the text file
FDTDtoINTERCONNECT.txt which can be used to create a ring resonator element in INTERCONNECT. The
different S parameters can be easily visualized. For example, below we see the phase of S21 and S31. We can see
the effect of the resonances which lead to sudden changes in the slope of the phase which indicates the sudden
change in group delay at resonance. There is still a reasonable amount of ripple in S21 that could clearly lead to
incorrect interpretations of the group delay of the ring, these could be removed by running a longer simulation.
2D Approximation to 3D Geometries
3D simulations are much more CPU-time and memory intensive than 2D simulations. The ring resonator example we
reference using MODE Solutions collapses the z dimension in a physically meaningful way and is then able to run a
2D FDTD simulation much more quickly, while still maintaining the accuracy of important results like the filter FSR.
It is also possible run a 2D simulation in FDTD, using a material with the effective index of the slab modes supported
in the Si layer. However, using a constant effective index will not give the correct FSR for the device, which depends
on the group index of the waveguide modes. Therefore, we recommend doing the initial design and optimization in
MODE Solutions, then moving to 3D FDTD for final optimization and accurate parameter extraction.
Problem definition
The design of the spot-size converter is based on reference [1]. The goal of this design is to efficiently couple light
from a strongly confined high index contrast silicon waveguide into an optical fiber, which has a much larger mode
field size. In this design, the spot-size conversion is achieved by using an Si adiabatic taper covered by a low-index
waveguide. Once the mode is converted from the silicon waveguide to that of the larger low-index waveguide, it can
be coupled much more efficiently into the optical fiber.
The EME method is ideal for taper designs because one can sweep the taper lengths quickly without having to
calculate any additional modes. In this case, FDTD-based methods are not as efficient because not only does the
simulation time increase with taper length exponentially, separate simulations are required for each taper length.
Solvers 101
EME
Associated files
spot_size_converter.lms
spot_size_converter.lsf
In this topic
Discussion and results 2054
Modeling instructions 2059
See also
EME Solver Analysis 1611
References
[1] T. Tsuchizawa et al, Microphotonics
devices based on silicon microfabrication
technology, IEEE J. Select. Topics Quantum
Electron., 11, 2005, 232-240
Learning objectives
In this example, we show how MODE Solutions' eigenmode expansion (EME) solver 114 can be used to design a
spot size converter. The user will learn to:
Set up an EME simulation
Quickly scan the length of the spot size converter to find the optimal design
Compare results with 3D FDTD results
Simulation setup
The EME solver in MODE Solutions is a fully vectorial bi-directional Maxwell's equations solver. The solver relies on
modal decomposition of electromagnetic fields into a basis set of eigenmodes, which are computed by dividing the
geometry into multiple cells and solving for the modes at the interface between adjacent cells. This method accounts
for multiple-reflection events, and only one simulation is needed for all input/output modes and polarization so it is
ideal for simulating tapers and performing length scanning.
In the EME solver setup, we define the cross sections where the modes are solved by defining cell groups. For
uniform regions where the cross section of the structure does not change in the propagation direction (ex. cell group
1 and 3, or the input/output waveguide regions), only one cell is necessary in the cell group since using additional
cells will not affect the results.
For regions such as a taper where the cross section of the device varies, you can specify a number of cells within
the cell group where the modes of the structure will be calculated, and in these regions we want to set the subcell
method to CVCS which reduce the staircasing effect due to the discrete changes in cross section of the structure
between each adjacent cell. The number of basis modes to use for the calculation can also be set in the EME solver
object. It is recommended to start with a small number of modes for the initial calculation. Once everything is
working as expected, one can increase the number of modes until the result converges 857 .
The cell boundaries of the structure can be seen in the CAD view below.
The modes at the center each cell are calculated on a finite mesh transverse mesh. Mesh override regions can be
added to force a finer mesh where necessary. For this spot size converter, we add a mesh override region over the
tapered silicon waveguide to better resolve the geometry. The view mesh button displays the transverse mesh in the
CAD view as shown below.
We can select the mode (or a set of modes by multi-selecting) of interest by editing the ports and choosing the
desired modes. The user s-matrix result that is calculated by the EME solver will return the results for the selected
mode(s) only. For this device we are interested in the fraction of power transmitted from the fundamental mode of the
silicon waveguide at port 1 to the fundamental polymer mode at port 2 which is given by |S21|^2 with port 1 at the
input side, and port 2 at the output. However, since the device behaves symmetrically, we can get the same result
by looking at |S12|^2. For more information about the S-matrix index mapping see EME solver analysis 774 .
visualize.
To see the final field profile of the device as well as the S-matrix results, press the EME PROPAGATE button in the
EME analysis window. Once the propagation is complete, profile monitor results and S-matrix results will be
available, and can be visualized by right-clicking on the objects in the Objects Tree. The results for different
propagation lengths can also be changed without having to re-calculate any modes. The field profile for a tapered
region of length 10 um and 100 um are shown below.
Scattering parameters relate the transmission and reflection coefficients for each port and input/output modes of the
device. This is automatically calculated by the EME solver, and returned as the result of an EME solver region. The
internal s-matrix includes all of the s-parameters for all the modes of all the ports, whereas the user s-matrix will
contain only the s-parameters for the modes selected in the ports. Since we have 2 ports, and we are only interested
in the fundamental mode at each port, the user s-matrix will be a 2 by 2 matrix, with elements S11, S12, S21 and
S22.
Length scanning
The propagation sweep widget allows you to scan the length of any cell group and calculate s-matrix results
automatically. The S-matrix index mapping table allows you to quickly identify which s-matrix components
correspond to which port and mode.
Below, the transmission through the taper is plotted over taper lengths from 10 um to 200 um.
EME vs 3D FDTD
We also compare the EME results with 3D FDTD. The results between two solvers agree reasonably well, however
they are done with completely different time scale. The EME simulation takes 3 minutes to simulate 101 different
taper lengths (blue squares), whereas 3D FDTD takes 6 hours to simulate 11 different taper lengths (green squares).
One can see that when the CVCS subcell method is not used for the tapered portion of the structure in cell group 2,
the staircasing effect will result in a transmission curve that is much less smooth than before.
Begin by starting MODE Solutions. You can save the MODE Simulation Project file (.lms) at any point in this
process. To do so, choose SAVE in the FILE menu.
Press on arrow on the STRUCTURES button and select a RECTANGLE from the drop-down menu.
Set the properties of the substrate rectangle according to the following table. To open the edit properties window
for an object, click on the edit tool button on the side toolbar, or right click on the object in the Objects Tree
and select EDIT OBJECT from the right-click menu.
tab property value
name substrate
Geometry x ( m) 0
x span ( m) 20
y ( m) 0
y span ( m) 10
z ( m) -2.5
z span ( m) 5
Material index 1.465
Graphical rendering override colour opacity from material database selected
alpha 0.3
Press on arrow on the STRUCTURES button and select a RECTANGLE from the drop-down menu.
Set the properties of the rectangle according to the following table.
tab property value
name input
Geometry x ( m) -7.5
x span ( m) 5
y ( m) 0
y span ( m) 0.4
z ( m) 0.1
z span ( m) 0.2
Material material Si (Silicon) - Palik
Press on arrow on the COMPONENTS button and select EXTRUDED POLYGONS from the pull-
down menu. This will open the object library window.
Select ISOSCELES TRAPEZOID from the list and press the INSERT button.
Set the properties of the isosceles trapezoid according to the following table.
tab property value
name taper
Properties x, y ( m) 0
z ( m) 0.1
material Si (Silicon) - Palik
z span ( m) 0.2
y span ( m) 10
lx top ( m) 0.4
lx base ( m) 0.08
Rotations first axis z
rotation 1 (degrees) 90
Press on arrow on the STRUCTURES button and select a RECTANGLE from the drop-down menu.
Set the properties of the rectangle according to the following table.
tab property value
name SiON
Geometry x ( m) 2
x span ( m) 16
y ( m) 0
y span ( m) 3
z ( m) 1.5
z span ( m) 3
Material index 1.5
override mesh order from material database selected
mesh order 3
Graphical rendering override colour opacity from material database selected
alpha 0.3
By setting the mesh order of one material to be larger than that of another material, the material will have lower mesh
priority in the regions where objects overlap.
Select the model analysis group in the Objects Tree. Click on the zoom extent button on the side view
Press on the arrow on the on the SIMULATION button and select the EME SOLVER from the drop-
down menu. Set the properties according to the following table.
tab property value
General background index 1.465
wavelength ( m) 1.5
EME setup x min ( m) -8
number of cell groups 3
cell group definition See table below
display cells selected
y ( m) 0
y span ( m) 5.5
z ( m) 0.5
z span ( m) 7
Set the properties of the table in the CELL GROUP DEFINITION section of the EME setup tab of the simulation
region object according to the following table.
group spans ( m) cells subcell method
1 3 1 none
2 10 19 CVCS
3 3 1 none
The number of cell groups is set to 3 for the three distinct regions of the structure, the input waveguide, the tapered
region, and the output waveguide. In each cell group we can specify the span of the region the cell group will cover,
and the number of cells to use in the cell group. The number of cells corresponds to the number of locations where
the modes of the device will be solved.
In the cell group regions where the cross section of the device does not change (ex. the input/output waveguide
regions), it is not necessary to use more than 1 cell, and the subcell method should be set to "none". In regions
where the cross section of the structure changes, more cells are required to resolve the change in the geometry. In
cases where the cross section is changing continuously over the region, the CVCS subcell method is recommended
since it will give better results by reducing the staircasing effect from using a finite number of cells.
The DISPLAY CELLS option in the EME setup tab shows the cell boundaries in the CAD view. We can ignore the
section in the EME setup tab for periodicity since this structure does not include any periodic regions.
Set up Ports
Expand the EME object in the Objects Tree by clicking on the triangle symbol next to the object name. Then
expand the Ports group under the EME object. Edit the properties of both port_1 and port_2 according to the
following table.
tab property value
Geometry use full simulation span selected
y ( m) 0
y span ( m) 5.5
z ( m) 0
z span ( m) 7
EME port mode selection fundamental mode
The selected modes will be the ones the user S-matrix will return results for.
button and select MESH from the drop-down menu to add a mesh override region. Set the
properties of the mesh override region according to the following table.
tab property value
General Set mesh multiplier selected
y mesh multiplier 5
z mesh multiplier 5
Geometry x ( m) 0
x span ( m) 20
y ( m) 0
y span ( m) 0.45
z ( m) 0.1
z span ( m) 0.2
Press the VIEW MESH button in the side toolbar to display the transverse mesh in the CAD.
Add Monitors
Press on the arrow on Monitors button and select EME INDEX from the drop-down menu. Set the
properties according to the following table.
tab property value
name index
Geometry x ( m) 0
x span ( m) 20
y ( m) 0
y span ( m) 6
z (um) 0.1
Press on the arrow on Monitors button and select EME PROFILE from the drop-down menu. Set the
properties according to the following table.
Press on the RUN button . This will calculate the supported modes in each cell and switch the simulation
from the layout to analysis mode. When the simulation finishes running, the EME Analysis window will be opened.
Propagate fields
In the EME Analysis window, set the SOURCE PORT setting to PORT 1. This will use the fundamental mode from
PORT 1 as the source when generating profile monitor results.
Note that since we are not using periodicity we can ignore the warning in the CELL GROUP SEQUENCE section
of the EME Analysis window.
Press the EME PROPAGATE button.
stop 200
number of points 191
Press the EME SWEEP button to run the sweep over taper lengths.
Solvers 101
FDE
Associated files
waveguide_dispersion.lms
See also
Passive components 2018
Simulation setup
The file waveguide_dispersion.lms contains a simple silicon on SiO2 ridge waveguide with a ridge width of 500 nm
and a ridge height of 180 nm. The simulation area is defined in the XY plane with perfectly matched boundary
conditions. The eigensolver is used to solve for the modes of this waveguide. The refractive index values of Si and
SiO2 are sampled data that have been entered in the materials library.
Problem
however, if this data is used directly to sweep over a range of frequencies for calculations that involve the derivative of
the refractive index function with respect to wavelength, such as dispersion, any discontinuities from the
experimental data will lead to artificial peaks in the resulting plots as seen in the figure below:
Solution
To overcome this problem, the index data can be modeled using Lumerical's Multi Coefficient Model feature. The
screenshot shows the Material Explorer 272 to modify the fit. This tells the software to fit and use the smooth curve
for simulation. Make sure you save the parameters and setting before closing the Material Explorer.
Results
This fit will generate smooth dispersion curves. Using the eigen solver frequency sweep tab, several mode properties
such as loss, effective index, group velocity and dispersion curves can be calculated for a specified range of
frequencies.
Solvers 101
varFDTD
FDTD
In this topic
Introduction 2067
Simulation setup 2068
Results 2068
Improvements 2069
Associated files
ring_group_delay_fdt
d.fsp
ring_group_delay_fdt
d.lsf
ring_group_delay_mod
e.lms
ring_group_delay_mod
e.lsf
See also
Ring resonator MODE
(design and initial
simulation) 2021
Ring resonator FDTD (final
parameter extraction) 2039
Passive components 2018
Dispersion Analysis 2064
Simulation time and
Frequency domain monitors
668
Simulation setup
The ring_group_delay_fdtd.fsp and ring_group_delay_mode.lms files are for simulation using FDTD
and MODE Solutions respectively. Each file contains a single straight silicon waveguide coupled to a ring resonator.
These examples are based on the ring resonator in the FDTD and MODE getting started example section except
that there is only a single waveguide, making it a 2-port rather than a 4-port device. The gap between waveguides,
simulation time and source bandwidth have also been modified to work for this example.
This example is particularly interesting for an analysis of group delay because this ring modulator is an all-pass filter.
In the ideal device, without any loss or reflection mechanisms, there should be 100% transmission of the incident
power. The effect of the wavelength dependent ring resonances will therefore be seen in the group delay. Indeed, we
can expect to see peaks in the group delay for resonant wavelengths of the ring, since the light will stay trapped in
the ring for a long time.
Results
In the examples below, the Hz-field data is extracted from a time monitor and a Fourier transform is performed. This
approach is valid for single mode waveguides and the H field was selected because we are using a TE-like mode.
For multi-mode waveguides, modal decomposition would be necessary. The phase information is extracted after the
Fourier transform and subsequently the derivative is taken to generate the group delay plot. The plots below are
obtained from the above associated files with FDTD and MODE separately. 3D FDTD has more accurate results but
slower in simulation speeds than 2.5D Propagator. Therefore, MODE allows a longer simulation time and a broader
bandwidth with a faster simulation speed in this comparison. The FDTD plots are based on a higher loss (reduced
gap distance) configuration just to increase simulation speed for demonstration purposes.
H
z
vs
ti
m
e
ph
as
e
vs
w
av
el
en
gt
h
gr
ou
p
de
la
y
vs
w
av
el
en
gt
h
* note that the X axis of the left/right hand figures is different
The resonant wavelengths can stay in the ring for many cycles, compared to those wavelengths that do not resonate
in the ring. The group delay plots show this feature and indicate the position of the peaks. There are some losses in
the system, especially at the coupling point. In each cycle, light from the ring can be scattered at the coupling point
either in a backwards direction or into radiation modes. This explains why the transmission is less than 100% at
resonant wavelengths at the "through" port.
The simulation time is an important factor for these simulations, especially for shorter wavelengths. This is because
shorter wavelengths experience less attenuation for a given bend radius and have lower coupling for a given gap
distance, resulting in higher Q factors and consequently longer simulation times. When the simulation time is too
short, the time signal is truncated which leads to errors in the frequency domain results after Fourier transform and
incorrect results such as negative group delay may be seen (see more information Simulation time and Frequency
domain monitors 668 ). If the simulation time is too long in MODE, the simulation can diverge due to numerical
instabilities created by the PML boundaries.
Improvements
The above results can be generated quickly and are useful for demonstration purposes. If the settings below are
used instead, the accuracy is significantly improved. However, this increases the required simulation times by 10-
100 times, which is particularly noticeable in the 3D FDTD simulations.
3D FDTD Simulation:
Gap: 0.1 um
Simulation time: 30 ps
wavelength range: 1.5 - 1.6 um
Mesh accuracy: 3
Solvers 101
FDTD
In this topic
Introduction 2071
Simulation setup 2071
Results 2072
Associated files
waveguide_facet.fsp
See also
Mode Expansion Monitors 649
Simulation setup
We will consider a high index contrast waveguide on Silicon-on-insulator (SOI) at a wavelength of 1.55 microns. It is
instructive to use a high index contrast waveguide since it is one of the cases where many assumptions commonly
used by mode solvers, such as scalar fields or effective index models, break down. We will consider a waveguide
that supports several modes. The waveguide is 200 nm in height and 800 nm wide.
The file waveguide_facet.fsp has the structure drawn and the fundamental mode is already selected. The
mode profile can be seen by editing the source properties, as shown below. The mode expansion monitor must be
placed over the cross section of the waveguide/fiber that supports the modal fields as shown in the simulation file.
Please refer to the page Mode Expansion Monitors 649 for more information.
Result
After the simulation has finished, using the Mode Expansion Monitor, a set of expansion results can be obtained.
Right click on the Mode expansion monitor object and visualize the expansion data. The collected results include
the forward transmission of the selected mode, the reflected power of the mode selected, and the net power of the
selected power. The following is the result obtained from the monitor.
y1 = getresult("y1","T");
y2 = getresult("y2","T");
z1 = getresult("z1","T");
z2 = getresult("z2","T");
gIncidence = -y1.T + y2.T - z1.T + z2.T;
Solvers 101
FDE
In this topic
Introduction 2073
Simulation setup 2073
Loss Analysis 2073
Associated files
waveguide_bend.lms
Related publications
1). A. Sakai, G. Hara, and
Toshihiko Baba, "Sharply
bent optical waveguide on
silicon-on-insulator
substrate", Proc. SPIE
physics simulation of
optoelectronic devices,
OE09-562 (2001)
Simulation setup
The SOI waveguide in the previous example can be further analyzed using MODE eigensolver. Under the modal
analysis tab, there is the option to analyze the modes of a bent waveguide for user defined radius of curvature and
bend orientation. The results are those of a doughnut shaped waveguide and can be incorporated in the analysis of a
bent waveguide. In this example, losses in a waveguide with one 90 degree bend are analyzed and the bend position
is optimized for minimal losses.
Loss Analysis
Since the propagation loss in the straight SOI waveguide is negligible, there are two major sources that contribute to
the losses of a waveguide depicted in Fig.1 above:
By checking the "Bent waveguide" option in the modal analysis tab, we can locate the same TE mode we found for a
straight waveguide previously. The propagation losses of this mode in the bent waveguide are much greater and
about dB/um.
In order to calculate the overlap mismatch losses between the two modes in the straight and bent sections of the
waveguide, we need to first calculate the modes for the straight waveguide by unchecking the bent waveguide option,
locating the desired mode, right clicking on the mode and selecting " Add selected mode to global D-card". Doing so
will add the selected mode to the table on the right where the mode can be used later on for overlap analysis with
another mode.
Next, we can check the "bent waveguide" option, and calculate the mode in the bent section of the waveguide. For
this example, the bent radius is chosen to be 1.5 um and since the bend is in the same plane as the straight
section, the orientation angle is zero. The propagation loss of this mode in this case is about 0.0012 dB/um .
Once this mode is located, we can switch to the overlap analysis tab. In order to compare the profile of this mode to
that of the straight waveguide, we can click on the Deck window and to pick the d-card we had previously added to
the deck. Finally we can calculate the overlap between the two modes to be about 98.8%.
Therefore the total loss of the structure is obtained by adding the contributions of the overlap mismatch at the two
interfaces between the quarter ring and the two straight waveguides with the propagation loss of the mode in the
curved section:
p
Loss = 2interfaces 10 log( 0.988)[ dB ] + (1.5[um] )(0.009[dB / um]) = 0.126dB
2
Since the mode mismatch loss is the more prominent cause of the total loss, optimizing the structure to lead to
higher overlap between the two modes can drastically improve the losses. By checking the shift d-card center, one
can new position values for the straight waveguide. Alternatively, we can check the optimize position option to let
MODE calculate and optimize the position that leads to maximum overlap.
In doing so, we find that if we shift the straight waveguide section by 0.02 um in the x-direction, power overlap
increases to 99.7%. The leads to a total loss of :
p
Loss = 2interfaces 10 log( 0.998)[ dB ] + (1.5[um] )(0.0009[dB / um]) = 0.039dB
2
Hence, optimizing the positions of the end waveguides can give about an order of magnitude improvement in the
overall loss.
Relevant video(s)
Grating couplers design and optimization
References
"Silicon Photonics Design", Lukas Chrostowski, Michael Hochberg, 2013.
Introduction
In this example, the grating coupler component of a silicon photonics system will be studied to demonstrate how
FDTD Solutions can be used to optimize the coupling efficiency via adjusting the grating parameters.
Solvers 101
FDTD
In this topic
Introduction 2076
Simulation setup 2077
Simulation results 2079
Optimization results 2083
S-Parameters 2084
Associated files
grating_coupler_2D.f
sp
parameter_extraction
_2D.lsf
See Also
S Parameter extraction 1987
Mode Expansion Monitors
649
Related publications
1). D. Vermeulen, S.
Selvaraja, P. Verheyen, G.
Lepage, W. Bogaerts, P.
Absil, D. Van Thourhout,
and G. Roelkens, "High-
efficiency fiber-to-chip
grating couplers realized
using an advanced CMOS-
compatible Silicon-On-
Insulator platform," Opt.
Express 18, 18278-18283
(2010). See also
http://www.imec.be/
ScientificReport/
SR2010/2010/1159336.html
2). S. K. Selvaraja, D.
Vermeulen, M. Schaekers,
E. Sleeckx, W. Bogaerts,
G. Roelkens, P. Dumon, D.
Van Thourhout, and R.
Baets, "Highly Efficient
Grating Coupler between
Optical Fiber and Silicon
Photonic Circuit," in
Conference on Lasers and
Electro-Optics/International
Quantum Electronics
Conference, OSA (2009).
Simulation setup
The file grating_coupler_2D.fsp contains a grating coupler consisting of an SOI waveguide structure with a
220 nm thick silicon layer and a 2um thick oxide layer. The grating has a period of 630 nm, an etch depth of 100 nm
and a fill factor of 0.508.
The multiple sources in the file can be enabled/disabled for the following cases:
For the case of the structure used as an output grating, mode source located on the output side of the coupler as
shown in figure 2 is used. Maximum output coupling can be achieve by optimizing the etch depth and the period of
the grating.
For the case of the structure used as an input grating, the source is at a 13 degree angle with respect to the y-axis
in order to avoid second order reflections as shown in figure 3. The horizontal position of the source can be adjusted
for optimized transmission through the grating. Similarly, the grating period and fill parameters can be swept to
maximize transmission.
Figure 3: Screenshot of layout editor of the grating coupler structure utilized as input grating
For the case of the structure used as an input grating, simulating fiber coupling is shown in figure 4. The horizontal
position of the source can be adjusted for optimized transmission through the grating. Similarly, the grating period
and fill parameters can be swept to maximize transmission.
Figure 4: Screenshot of layout editor of the grating coupler structure utilized as input grating
Simulation results
Output grating
In order to get better insight of the propagation of light in the structure, a movie monitor can be placed around the
structure to monitor the behaviour of the light. It is better to disable this monitor once the movie has been recorded in
order to prevent slowing down of the rest of the simulations.
The transmitted field intensity exiting the top of the structure can be plotted using a frequency domain field and
power monitor placed just above the grating (right-click on the "above" monitor and select Visualize -> E). Both 1D
and 2D plots can be obtained, as shown. The transmission out of the coupler can also be plotted (Visualize -> T).
The far field profile of the propagating mode is also of interest. In FDTD Solutions, the data recorded by a frequency
monitor can be used to plot the far field intensity. In this case, the monitor placed just above the grating that records
the data for the light exiting the grating will be used for the far field projection. Right-click on the "above" monitor,
select Visualize -> farfield, and then select all. From the 1D and 2D plots that have been generated, we note that the
peak emission angle changes nearly linearly with wavelength, as expected, which makes the collection of broadband
light more challenging.
Alternatively, if you wish to generate the above far field plots using script commands, the following scripts can be
used. The following script commands can be executed in the script prompt window. The commands generate a plot
of several far field intensity profiles of different frequencies on the same plot as well as a 2D image plot of the
intensities for a range of wavelengths.
m_name = "above";
f = getdata(m_name,"f");
phi = farfieldangle(m_name,1,500);
E_farfield = matrix(500,length(f));
for(i=1:length(f)) {
E_farfield(1:500,i) = farfield2d(m_name,i,500);
}
Input grating
A similar movie can be generated to get a better insight of the mode coupling into the structure. Alternatively, a
frequency monitor can be placed to provide an image plot of the field profile superimposed on the structure.
Using a frequency domain field and power monitor placed at the end of the grating section and perpendicular to the
direction of propagation, the transmission along the y-axis can be plotted.
In addition to the frequency domain field and power monitor, a mode expansion monitor can be used to analyze how
much of the power is forward or backward propagating, in the fundamental or higher order modes. The monitor can
be used to expand the fields to see the fraction of power propagating in the fundamental mode. The image below
shows that almost all are propagating in the fundamental mode.
Optimization results
Fiber coupling
Using a fibre source, as shown in the figure above, first the optimal beam position is found through the usage of the
sweep task, then the optimal pitch and duty cycle for a fixed beam position (that maximizes the figure of merit) are
found using the optimization object. The figure of merit used is the average transmission over the wavelength range.
From the sweep and optimization results, we see that the maximum average transmission is achieved at around the
source position of 1 um, pitch of 660 nm, and duty cycle of 0.66. Average transmission of 39% can be achieved in
this case.
Having calculated the optimum grating parameters, we can rerun the simulation to observe the new optimized
transmission values:
S-Parameters
S-parameters tell us how much of the light is coupled into and reflected in both the input and output modes. Treating
this grating coupler as a black box component with s-parameters, the complex s-parameters will be extracted
(complex s-parameters will give the phase of coupling, in addition to the power coupling efficiency). The extraction
involves two simulations, as the structure is not a symmetric device in the input and the output. The fibre source will
be used for the input mode and the mode source will be used for the output mode. This calculation is done in
parameter_extraction_2D.lsf, where the s-parameter data is collected and exported into a file, should we
need to use the data for further post processing (in the 3D example, the exported file gets used for the
INTERCONNECT simulation).
Introduction
In this example, we will demonstrate how MATLAB can be used to drive a multi-variable nonlinear optimization of a
grating coupler in FDTD Solutions via Lumerical's Automation API. In addition, we will demonstrate how to setup a
MATLAB function based on arbitrary simulation parameters to specify a nonlinear constraint for the optimization.
While we focus on a specific example of a grating coupler in FDTD, the target audience includes anyone who is
interested in driving and controlling Lumerical applications directly from MATLAB.
Solvers 101
FDTD
In this topic
MATLAB API Setup and Workflow 2085
See Also
Interoperability Commands 1635
Grating Coupler 2D-FDTD 2076
Particle Swarm Optimization 727
Grating Coupler 3D-FDTD 2091
The second step required for smooth functionality involves telling MATLAB where to look for the API before using any
interoperability related commands. The MATLAB API is located in the Lumerical installation folder. In our example
when we use FDTD Solutions on a Windows machine this would be typically under the following location:
C:\Program Files\Lumerical\FDTD\api\matlab
One option is to run the following command every time after MATLAB is launched and prior to using API related
commands:
path(path,'C:\Program Files\Lumerical\FDTD\api\matlab');
The other, more convenient option is to add the path permanently to the startup.m file that is loaded every time
MATLAB is launched.
Once the MATLAB API setup is completed we can use the related interoperability commands referenced in the "See
Also" section. The basic API workflow is depicted in figure 1 and it consists of four operations:
1. Open one or more Lumerical session
2. Send and execute Lumerical script commands to one of the active sessions
3. Transfer variables from the Lumerical workspace to the MATLAB workspace via an active session
4. Close Lumerical session
Note that operations 2,3 and 4 can be executed only by referencing to an active session otherwise they will result in
an error. The session referencing is done by using an unique ID that is assigned to each session during its initiation.
This ID system allows the users to open and control multiple sessions at the same time.
For this example, the following four parameters are chosen as the optimization variables:
Angle theta representing the source injection angle in respect to y axis
Source position in respect to the grating in x direction
Grating pitch
Grating duty cycle
In addition, this example demonstrates how to use a nonlinear constraint function that requires a specific FDTD
simulation parameter as an input in addition to the variables used for optimization. To do this, we will constrain the x
position of the source (x s ) so the beam axis at the surface of the grating does not extend beyond the end of the
grating itself (x 0). This cannot be handled by a simple boundary condition since both angle theta and x position of
the source are changing during the optimization. Moreover, we will use the MATLAB API to obtain the information
about the distance between the source and the surface of the grating, both being inputs to the constraint function as
follows:
x s tan (q ) * gap
Figure 3: Visualization of the nonlinear constraint related to the source position and angle theta.
To run the example, download all three MATLAB files and the FDTD simulation file into the same folder. Open
Coupler_Optimization_Main_Script.m and modify the path in line 9 to the folder containing all downloaded simulation
files to specify the location of the FDTD simulation file. Once the path is updated, simply run the simulation file and
wait until MATLAB runs multiple optimization iterations. The final values of the optimized parameters and average
transmission will be displayed in the MATLAB command window. The MATLAB script files are commented for clarity
and can be reviewed in the section below:
Coupler_Optimization_Main_Script.m
clear;
%Add Lumerical Matlab API path
path(path,'C:\Program Files\Lumerical\FDTD\api\matlab');
'load("grating_coupler_2D_Matlab_Optimization.fsp");',...
'select("grating_coupler_2D");',...
'coupler_y_pos=get("y");',...
'coupler_thickness=get("h total");',...
'select("fiber::source");',...
'source_y_pos=get("y");',...
'select("fiber");',...
'fiber_y_pos=get("y");',...
'gap=abs(fiber_y_pos+source_y_pos-coupler_y_pos-coupler_thickness);',...
'select("FDTD");',...
'FDTD_span=get("x span");');
%send the script in 'code' to Lumerical FDTD Solutions
appevalscript(h,code);
%Optimization settings
options = optimoptions('fmincon');
options = optimoptions(options,'FiniteDifferenceStepSize',1e-3);
options = optimoptions(options,'Algorithm','sqp'); %alt: interior-point
options = optimoptions(options,'MaxIter', 100);
options = optimoptions(options,'PlotFcns', { @optimplotfval });
options = optimoptions(options,'Display','iter-detailed');
options = optimoptions(options,'StepTolerance',1e-3);
%Run optimization
[x,fval]=fmincon(f,x0,A,b,Aeq,beq,lb,ub,nonlcon,options);
T_avg=1-fval;
%Close session
appclose(h);
Coupler_Optimization.m
function y=Coupler_Optimization(x_position,theta,pitch,dc,h)
%Modify fiber position, theta, duty cycle, pitch and run the
%simulation
code=strcat('switchtolayout;',...
'select("grating_coupler_2D");',...
'set("pitch",',num2str(pitch*1e-6,16),');',...
'set("duty cycle",',num2str(dc,16),');',...
'select("fiber");',...
'set("x",',num2str(x_position*1e-5,16),');',...
'set("theta0",',num2str(theta*10,16),');',...
'run;');
appevalscript(h,code);
confun.m
function [c, ceq] = confun(x)
Optimization Results
The maximum average transmission achieved with the MATLAB driven optimization is ~40%, which is in good
agreement with the value obtained using the Lumerical built-in parameter sweep/particle swarm optimization
routines. The optimized values for all parameters shown in table 1 are close to the reference example demonstrating
that we are able to reliably find the optimal parameters using this methodology. Note that the exact values might
slightly change in each optimization run as the function minimum can be achieved with a range of parameter values
rather than with one exact set of values.
Parameter MATLAB Reference
optimization example value
value
The time required for the four-variable optimization is comparable to the time required for the two-variable optimization
with the particle swarm method, and it can be considerably influenced by setting the starting points, boundaries and
the optimization parameters. Figure 4 shows comparison of two identical optimization setups that differ only in the
finite difference step size (FDSS). It is clear that smaller step takes longer to estimate the trends and close in on the
optimal values. As a result, we were able to achieve the optimized transmission within 8 iterations with FDSS=1e-3,
while 14 iterations were required with FDSS=1e-4.
Figure 4: Tracking of the figure of m erit(fval=1-Average Transm ission) for different finite difference step size (left show s
1e-3 and right show s 1e-4)
Optimization tips
If the finite difference step size is too small, the simulation result might not change significantly and the
optimization algorithm might terminate prematurely. For example, in our 2D FDTD simulation, moving the source
by 1nm in x direction will have minimal to no impact on the resulting average transmission.
It is a good idea to run the optimization multiple times with slightly different starting points and boundaries to verify
that the results are comparable.
If the optimization ends with one or more parameters having the boundary value, it is likely that the minimum is
artificial and the boundary should be moved.
Sometimes it can be useful to have the optimization parameters within the same order of magnitude.
Introduction
In this 3D example, we use the optimized grating parameters including pitch and duty cycle from the 2D grating
coupler simulation 2076 , use the circular etch lines to focus the light down into the waveguide and optimize the shape
of the tapering section.
We then obtain and compare the S-parameters for the coupler.
Solvers 101
FDTD
In this topic
Introduction 2091
Taper Optimization 2092
S-Parameters 2092
Associated files
taper_design.lms
grating_coupler_3D_i
nput.fsp
grating_coupler_3D_o
utput.fsp
parameter_extraction
_3D.lsf
See Also
S Parameter extraction 1987
Mode Expansion Monitors
649
Particle Swarm
Optimization 727
Grating Coupler 2D-FDTD
2076
Grating Coupler
INTERCONNECT 2318
Related Video
Grating coupler
Taper Optimization
The tapering section has a fixed width at the input and output, where the waveguide connected to the tapering
section has a width of 500 nm. Open the file taper_design.lms and use the sweep object to optimize the
tapering section. Using the sweep object, the value of m (the key variable that will determine the shape of the
tapering section, determined and found in the script of the taper structure group object) is optimized to be around
1.15. From the figure below, it appears that the beam is being clipped by the simulation boundary; however, if the
precise fields of the beam out to the simulation boundary are plotted (disable all the objects and monitors other than
the full profile monitor and enable the slab object and run the simulation), we see that the value of |E| is below 1e-3
at the edge of the simulation and we can ignore the small amount of diffraction that will occur due to this clipping.
S-Parameters
S-parameters tell us how much of the light is coupled into and reflected in both the input and output modes. Treating
this grating coupler as a black box component with s-parameters, the complex s-parameters will be extracted
(complex s-parameters will give the phase of coupling, in addition to the power coupling efficiency). The extraction
involves two simulations, as the structure is not a symmetric device in the input and the output. The fibre source will
be used for the input mode and the mode source will be used for the output mode. This calculation is done in
parameter_extraction_3D.lsf. Open the script file and run, as the script file loads the simulation files
grating_coupler_3D_input.fsp and grating_coupler_3D_output.fsp, then collects the s-parameter
data, and exports the data into INTERCONNECT files to be used for further post processing. Below figures show the
comparison between 2D and 3D results. The two results agree well. The 3D results appear to be lower; one of the
possible sources of the difference is the fact that the taper section is included with coupling efficiency of ~90%.
Introduction
This 2D FDTD example shows how to obtain broadband characteristics of a grating coupler and compares the
results to experimental data. Furthermore, this application example demonstrates correct use and benefits of the
multi-frequency beam calculation and compares the results with standard single frequency beam calculation. To
better understand the differences between single and multi-frequency beam calculation visit this page 543 .
Solvers 101
FDTD
MODE
In this topic
Introduction 2093
Setup 2094
Results and Discussion 2096
Associated files
Broadband Grating
Coupler.fsp
Broadband Grating
Coupler.lms
Broadband Grating
Coupler.lsf
Broadband Grating
Coupler Injection
Angle Sweep.lsf
See Also
Grating Coupler 2D-FDTD 2076
Grating Coupler 3D-FDTD 2091 Figure 1: Schem atic of the sim ulation setup
Multifrequency Beam
Calculation 543
Related Publications
Vivien et al., Light injection
in SOI microwaveguides
using high-efficiency grating
couplers, Journal of
Lightwave Technology, Vol.
24, No. 10, 2006
Setup
Grating coupler structure
The simulated SOI structure is optimized for maximum coupling efficiency at 1310nm and it consists of a 200nm
thick Si waveguide that is placed on 700nm thick SiO2 layer. The waveguide is then covered by a 700nm thick SiO2
cladding as depicted on figure 2. The grating itself has duty cycle of 50%, grating period of 500nm and the etching
depth of the groves is 30nm as shown on figure 3.
The optimal incident angle can be obtained by sweeping a range of angles and recording the power coupled into the
waveguide at the optimized single frequency of 1310nm. To do this, open the Broadband Grating
Coupler.fsp and launch the "Sweep Injection Angle" sweep. Once the sweep is finished, you can visualize the
"Coupled power" sweep result and observe that the maximum coupled power is achieved around 13.9 degrees, which
is well aligned with the experimental results from the paper.
The optimal beam waist diameter can be calculated by the following equation:
w 0 = 1.37 Lc cos( q in )
where Lc is grating characteristic length. Lc calculated in the paper is 13 +/-1um, which gives us optimal beam waist
radius between 16 and 18.6 um. Alternative method how to estimate the optimal beam waist is to use MODE
solutions, specifically the FDE solver. To do this, simply copy the simulated structure to MODE or use the
associated file Broadband Grating Coupler.lms and search for modes around effective index of 2.86 obtained
by the following equation:
p2p
k sin( q ) +
in in L
n =
eff k
in
where
p is the diffraction order
L is the grating period
k in is the module of the incident wave vector
The Finite-Difference Eigenmode solver finds and calculates the spatial profile of the grating coupler mode(Figure 4)
at 1310nm and gives us better understanding of the optimal beam profile. This information is helpful during the FDTD
simulation setup when we need to determine the Gaussian beam properties. Note that since we are using fully
vectorial beam profile(thin lens option), the beam waist is determined by the Numerical Aperture. The beam profile
related to specific beam NA can be shown by the "Visualize beam data" button(Figure 5). Additionally, the beam
options tab allows us to define the distance from focus and position the beam waist near the grating coupler plane
rather than at the source injection plane.
The last missing parameter that is needed to build the FDTD simulation is the optimal distance between the center
of the beam and the end of the grating d. This distance is given by a simple relationship d=Lc, which is between 12
and 14um. This property is in our simulation defined by the source position relative to the grating couple structure.
Monitor setup
In the paper, the coupled power is measured indirectly as:
P
coupled
=P
injected
(
- Preflected + Ptransmitted )
We reproduced this approach by placing power transmission monitors below and above the grating coupler to
measure the reflection and transmission that is later subtracted from the injected power during post processing. In
addition to this approach, we used also a direct measurement method when we placed a power transmission
monitor at the end of the waveguide in order to directly measure the power coupled into the waveguide. Note that the
modal fields extend beyond the waveguide interface and therefore the monitor must be extended as well in order to
measure 100% of the coupled power. The extend of the modal fields can be obtained by the mode expansion
monitor.
Figure 6: Sim ulated coupled pow er as function of w avelength betw een 1280 - 1340 nm
The maximum simulated coupled power at =13.9 degrees is 55.7%, which is well aligned with the measured
maximum of 56%. Moreover, the multifrequency beam calculation delivered better accuracy when compared to the
results obtained with beam source calculated at single frequency, which showed 10% narrower bandwidth at FWHM.
Notice that the results are nearly identical at 1310nm. This is a result of the single frequency simulation being
centered at 1310nm and therefore, the calculated beam is accurate at this specific wavelength.
The comparison of direct measurement of power coupled into the waveguide and the indirect calculation using
reflected and transmitted power shows nearly identical results. Hence, using the direct method seems to be more
convenient since it requires only one monitor and no post processing.
Figure 7: Sim ulated coupled pow er as function of injection angle betw een 11 - 18 degrees at 1310nm
Relevant video(s)
Edge Coupler Optimization (Optimization using eigenmodes and eigenmode expansion chapter)
References
Fiber-chip edge coupler with large mode size for silicon photonic wire waveguides, Martin Papes, Pavel Cheben,
Winnie N. Ye, Jens H. Schmid, Dan-Xia Xu, et al., Proc. SPIE 9516, Integrated Optics: Physics and Simulations II,
95160K (2015)
Fiber-Chip Edge Coupler with Large Mode Size for Silicon Photonic Wire Waveguides, Martin Papes, Daniel
Benedikovic, Pavel Cheben, Jens H. Schmid, James Pond, Winnie N. Ye, Dan-Xia Xu, Siegfried Janz, Robert Halir,
Alejandro Ortega-Moux and Vladimir Vasinek, Optics Express, Vol. 24, 5026-5038 (2016)
Introduction
In this example, we will demonstrate how to optimize the taper length of the edge coupler with MODE Solutions'
eigenmode expansion (EME) method. It is recommended that you to go over the spot size converter 2053 getting
started example before proceeding with this example. To optimize the location of the input fiber, see Optimization of
SMF-28 Fiber 2103 .
For this initial simulation, we will ignore the lower silicon substrate in order to reduce the simulation time. The final
simulation 2103 will include the lower silicon substrate, and a relatively large number of modes will be required.
Solvers 101
EME
In this topic
Introduction 2098
Simulation setup 2099
Simulation results 2100
Convergence testing 2101
Associated files
Edge_coupler_EME.lms
L_total_sweep_eme.lsf
See Also
Optimization of SMF-Fiber Position 2103
Simulation setup
The corss-section and schematic of the edge coupler is shown below (taken from reference [1]).
The EME simulation setup is in Edge_coupler_EME.lms, and the "taper" structure has the following parameters:
Taper Parameters
L1, L2, L_buffer refer to the different portions of the Si waveguide and are the lengths of the untapered input
section, the tapered section, and the untapered end section, respectively
L_lower_nitride_L_upper_nitride are the lengths of the 2 silicon nitride layers
W is the width of ridge waveguide
Wwindow is the width of the entire slab should be larger than simulation region
d is the etch depth
fine_dx is the finer mesh size (used in key regions). It controls dy and dz around the silicon waveguide, and
dz in the nitride layers. It should never be larger than the thickness of the nitride layers or the conformal
meshing will not work.
height is the height of the silicon waveguide
include_input_buffer: if 1 (true), it will add an input waveguide of silicon of length L_buffer. This is useful to
study the taper without the fiber. If the full design is desired, the fiber should be enabled and this should be
set to 0 (false).
nSi, nSi3N4, nSiO2 are the refractive indices used for Si, Si3N4 and SiO2 (note that these could be
changed to use a model from the database, but it does speed up the calculation to use a lossless dielectric
and these materials have negligible loss at 1550nm)
tBOX is the thickness of the bottom oxide
tSi3N4 is the thickness of the silicon nitride layers (20nm in publications)
tSiO2_1,tSiO2_2,tSiO2_3 are the thicknesses of the SiO2 layers from the top of the BOX to the bottom of
the first nitride layer, between the 2 nitride layers, and from the upper nitride layer to the top of the
waveguide.
tw1 and tw2 are the widths of the input and output silicon waveguides, respectively
Note that at this stage, we do not simulate the subwavelength grating (SWG) for Si3N4 directly and assume that the
desired graded index has been achieved with a SWG. The spatially graded index from nSi3N4 to nSiO2 can be set
by using a formula for the refractive index of the form nSi3N4-(nSi3N4-nSiO2)*(x+L/2)/L where L is the length of the
nitride layer.
Simulation results
Once the simulation finishes running, in the EME analysis window, make sure that include fast diagnostics and
update monitors are checked and press eme propagate. Once the propagation is complete, you can visualize the
fields from the monitors.
To sweep the length of the taper, set "group_span_1" of in the "Propagation sweep" portion of the EME analysis
window to be from 10 to 1000 microns with 100 points. Once the propagation sweep is complete, visualize abs(S21)
^2 as shown below. This is the basic result and can be obtained in a few seconds. The remaining work is essentially
convergence testing and adding in the effects of the substrate, which will shift these results by a few percent.
Convergence testing
For EME simulations, there are several factors that can affect convergence:
Ideally, we can get to the point where increasing any of these properties has a negligible impact on results. For
example, the figure below shows several results for different numbers of modes and cells. Clearly, using 10 modes
and 21 cells is sufficient at this point, and even 5 modes with 21 cells could be used for optimization.
The script file L_total_sweep_eme.lsf will reproduce the same length sweep from the previous step, but it can
be used even when more than 1 cell group is included. This script can be useful for convergence testing as it is
possible to loop over different numbers of modes, cells or transverse mesh settings in an automated way. Also, with
the nominal length, it can be useful to look at the coefficients of forward propagating modes. This shows which
higher order modes are used when propagating. Note that the colorbar is oversaturated since the majority of the light
travels in the fundamental mode.
Solvers 101
FDE
Associated files
Edge_coupler_EME.lms
See Also
Overlap analysis 763
Initial EME simulation 2098
Final EME simulation 2103
3D FDTD simulation 2107
Related publications
1) Fiber-Chip Edge Coupler with Large Mode
Size for Silicon Photonic Wire Waveguides,
Martin Papes, Daniel Benedikovic, Pavel
Cheben, Jens H. Schmid, James Pond,
Winnie N. Ye, Dan-Xia Xu, Siegfried Janz,
Figure1: Schem atic of a grating coupler
Robert Halir, Alejandro Ortega-Moux and
Vladimir Vasinek, Optics Express, Vol. 24,
5026-5038 (2016)
The overlap analysis 763 utility in MODE Solutions' FDE solver can be used to optimize the position of the fiber with
respect to the taper. In Edge_coupler_EME.lms, set the include_input_buffer to 0 (false) for the edge coupler
and follow the instructions described here (go to "Optimization using eigenmodes and eigenmode expansion"
chapter).
Solvers 101
EME
In this topic
Simulation setup 2104
Simulation results 2105
Convergence testing 2105
Associated files
Edge_coupler_EME_final.lms
See Also
Initial EME simulation 2098
Optimization of SMF-Fiber Position 2103
Simulation setup
The key difference between the initial EME simulation 2098 and the final EME simulation is the following:
Silicon substrate. The majority of the loss in this device will come from leakage into the silicon substrate when the
mode is very large, near the edge of the chip. It is therefore necessary to include the silicon substrate to optimize
the device. Including the substrate makes the EME simulation much more complicated. The reason is that the
modes with the highest refractive index found by the eigenmode solver will be the modes fully confined to the
silicon substrate. For this reason, we can no longer identify the modes of interest based on those with the highest
refractive index. We therefore have to explicitly choose the effective index region of interest. We find that if we look
for modes around neff=1.6 we find the desired modes. In addition, we have to explicitly choose the the intput and
output modes at the ports because we can no longer simply ask for the fundamental mode.
PML typically for tapers we simply use metal boundary conditions. This is counter-intuitive as it is possible for
light to reflect from the metal and then recouple back into the fundamental mode of a waveguide. In practice
however, there is generally negligible light that recouples back into the fundamental mode and it propagates in
higher order, unbound modes outside of the structure. Furthermore, once we have achieved the adiabatic limit,
there is very little light that is scattered from the structure because the transmission is close to 100%. The PML
does add additional computation complexity, takes longer to run simulations, and can lead to problems with some
of the unphysical modes that are supported in the PML. However, it can be worthwhile at a final stage to include
PML in the simulation but it should be done only after all optimization steps are completed. Typically, the
inclusion of PML might reduce the transmission by a few percent.
In order include these effects, we need to make the following changes to the initial simulation (you can also start
directly with the file Edge_coupler_EME_final.lms):
Change all boundaries to PML except for the y-min boundary which should stay anti-symmetric
Set the tBOX in the taper structure to the correct 3 micron value.
Use the user select mode for BOTH ports (Edit EME port->EME port->mode selection), and search for the
correct fundamental mode. This is most easily accomplished by unchecking use max index and setting n to 1.6.
This will search for modes around n=1.6.
In the EME setup tab of the EME solver region, check allow custom eigensolver settings. Then select the first
cell group and click the Custom settings for cell group 1.
In the eigensolver analysis window that appears, uncheck use max index and set n to 1.6. Also, set the number
of trial modes to 10. This will now search near neff=1.6. You can click calculate modes and ensure that you find
many of the desired modes. Click "Take settings".
Simulation results
After running the simulation, plot the taper transmission as a function of length as described in the initial EME
simulation - simulation results 2100 .
Now it is clear that a shorter device is more optimal because of the substrate leakage.
Convergence testing
As in the initial EME simulation, here will will follow the same steps to test the convergence properties. A few curves
are shown below.
We can use 10 modes and 21 cells for devices longer than 100 microns. The results published in reference [1] were
calculated with 30 modes, PML boundaries, the Si substrate and 42 total cells however, the cells were not
uniformly distributed over the entire taper region in that case. It is clear that 30 modes is required for the very short
devices, but beyond 100 microns in total length 10 modes is sufficient. The higher order modes become less
important as we approach the adiabatic limit.
We can again look at the image of forward propagating modal coefficient amplitudes as a function of length to gain
insight into where the taper could be improved to preserve the adiabatic limit. Again, the colorbar is overstaturated.
Solvers 101
FDTD
Associated files
Edge_coupler_FDTD.fsp
Edge_coupler_FDTD_results.ldf
See Also
Initial EME simulation 2098
Related publications
1) Fiber-Chip Edge Coupler with Large Mode
Size for Silicon Photonic Wire Waveguides,
Martin Papes, Daniel Benedikovic, Pavel
Cheben, Jens H. Schmid, James Pond,
Winnie N. Ye, Dan-Xia Xu, Siegfried Janz,
Robert Halir, Alejandro Ortega-Moux and
Vladimir Vasinek, Optics Express, Vol. 24, Figure1: Schem atic of a grating coupler
5026-5038 (2016)
The file Edge_coupler_FDTD.fsp is set up to scan the length of the edge coupler. The taper structure is the
same as in the EME simulations except that it has one additional property which is called the Length_scale_factor.
This factor will scale L1, L2, L_upper_nitride and L_lower nitride. This allows us to easily stretch or compress the
entire device from the nominal 255 microns in length.
In the Model structure, we have a property called L_total. Changing this will automatically calculate the scale factor
for the taper and set it. It will also adjust the size of the FDTD simulation region and the position of the output
monitor.
The parameter sweep object sweep_length will sweep the length and calculate the transmission to the fundamental
mode. Currently it is set for only 3 points at 20, 30 and 40 microns but this could be easily changed.
Some of the simulation results are stored in Edge_coupler_FDTD_results.ldf and the results are published
in reference [1].
Evanescent
waveguide
couplers 2108
Introduction
One method to make waveguide or fiber couplers is to use straight sections of the guides where the evanescent
modes of one guide overlap with the modes of a second guide. The light from one guide slowly transfers back and
forth between the guides. By choosing the distance between the guides and the length of the coupling region, it is
possible to couple any desired fraction of the light from one waveguide to the other. The coupling strength can be
very sensitive to the distance between the guides and it is important to ultimately choose a design that can function
acceptably given the types of imperfections that are expected for your manufacturing process.
Solvers 101
FDE
varFDTD
In this topic
Simulation setup 2109
Results: Eigenmode solver and analytical formula 2109
See also
Ring resonator MODE (design and initial simulation) 2021
Simulation setup
The file waveguide_coupler.lms has two Silicon on Insulator (SOI) waveguides that are 500nm wide and 200nm
thick. The space between the waveguides is 50nm. There are two mesh override regions used:
1. One region covers both guides and extends about 100nm outside them, that reduces the size of the mesh by a
factor of 4 in order to accurately resolve the modes inside the guides and in the evanescent field; and
2. A second region that sets the values of dy between the guides to 2nm. This is important because the coupling of
the guides can be quite sensitive to the space between them.
pLDn
P2 ( L) = P0 sin 2
l0
where L is the length of the coupling region, P0 is the input power, and l0 is the free space wavelength. It is easy, for
example, to calculate the coupling length to achieve any desired power coupling to waveguide 2 by solving for L:
l0 P
L= sin -1 2
pDn P0
For example, the length required to couple 100% of the light from waveguide 1 to waveguide 2 is simply
l0 1.55 mm
L100% = = = 12.8827 mm
2Dn 2 0.0601584
Consider the situation where light is propagating in waveguide 1 and we introduce a second waveguide abruptly, as
shown in the left image below. The Ey component of the mode propagating in waveguide 1 initially is shown in the
plot on the right. The effective index of the initial mode is n0 = 2.329497.
Once the second waveguide is introduced, we now have 2 modes, which are approximately given by the sum and
difference of the modes of the original waveguides, and have effective indices n1 = n0 + Dn/2 and n2 = n0 - Dn/2. If we
consider the sum of these modes we have
+ =
so we see that the original waveguide mode matches well with the sum of the 2 modes that exist when both
waveguides are present. The original waveguide mode therefore excites both of these modes equally, but they
propagate with different phase velocities. The E field at a distance L from the point where the second waveguide is
introduced is given by
r r 2 pin1 r 2 pin2
E ( L) = E1 exp L + E2 exp L
l0 l0
r r 2 pin1 r 0 r 0 2 pin2
( )
E 10 + E20 exp ( )
L + E 1 - E2 exp L
l0 l0
r 2 pin0 pDn r 2 pin0 pDn
= 2 E 10 exp L cos L + 2iE20 exp L sin L
l0 l0 l0 l0
where E1 and E2 are the modes of the coupled waveguide system, and E10 and E20 are the unperturbed modes of the
single waveguide positioned at location 1 or location 2 respectively. We see that the light propagates like the
unperturbed waveguide system, but the oscillates back and forth between the 2 guides periodically due to the sine
and cosine terms.
In reality, we rarely introduce a second waveguide abruptly and we generally don't remove it abruptly. A real device
might look something like this
In many cases, the effect of the bent region can be ignored. The effect of the bent region can be investigated in detail
either using the propagator in MODE Solutions, or if the waveguide is small enough, it may be possible to run a 3D
FDTD simulation.
It may be useful to reconstruct the image of the field as it propagates over large distances. The script file
waveguide_couplers.lsf can be used to do this after opening the file waveguide_couplers.lms. It first
deletes the right waveguide and calculates the field of the input guide which is copied to a global dcard called "E0",
and looks like the mode below.
The right waveguide is then re-introduced by the script and the modes of the coupled waveguide system are
calculated. The mode "E0" is then decomposed onto the 2 modes of the coupled system and propagated an
arbitrary distance using the propagate command. This is repeated for 100 different lengths from 0 to 40 microns,
and the final figure is created which shows the electric field intensity vs x and L at y=0.1 microns.
We can see that the length for 100% coupling is indeed the 12.552 microns expected.
Propagator simulation
Note: Accuracy
The eigenmode solver gives a more accurate result because it calculates full 2D mode profiles, whereas the
varFDTD solver is less accurate since it neglects the coupling in the z dimension.
It is also possible to simulate the same structure using the propagator. The simulation file
waveguide_coupler.lms also contains a propagator region which can be activated by right clicking on the
propagator region on the object tree.
The propagator simulation contains a mode source. If you choose to user select a mode, you will get the mode
solver shown below. As shown in the eigenmode solver example above, the propagation length is related to the
effective index.
From the screen shot below you can see that the index difference is
Dn = n1 - n2 = 2.475423 - 2.391182 = 0.084241
Notice that this effective index difference is slightly higher than when we used the eigenmode solver. Clearly the
eigenmode solver gives a more accurate effective index difference for this structure because it calculates full 2D
mode profiles. In contrast, the propagator first compresses the z dimension and then calculates the modes using the
compressed data.
We can slightly modify the spacing between the two waveguides in order to get the correct effective index difference
and propagation length. A index difference of 0.0626 can be attained by setting the waveguide spacing to 70nm.
Then, we can set the x max of the right waveguide to 20 microns, and set the integrated mode source so that it
selects the fundamental mode. If we run the simulation, and send the monitor1 data to the frequency monitor, we
can see that the coupling length is approximately 13 microns, as expected.
The oscillations seen in the electric field intensity above are due to the fact that there is an additional mode excited.
The Effective Index tab for the propagator contains an option to clamp the effective index values to the physical
material properties. The extra mode which is excited in the image above can be removed by unchecking this option.
Since removing the material clamping changes the variational effective index method, the difference between the real
part of the effective indices of the modes changes again. Therefore, in order to obtain the image below, the mode
solver was used to find the correct spacing between the waveguides. After removing the clamping a spacing of 90nm
gave a refractive index difference of 0.063.
Introduction
In this example, we will demonstrate how to simulate a multi-mode interference (MMI) coupler with the bi-direction
EME solver, the omni-directional 2.5D varFDTD solver, as well the uni-directional eigenmode expansion 114 method
Solvers 101
EME
FDE
varFDTD
In this topic
EME solver simulation 2115
Discussion 2118
Associated files
MMI_simple.lms
MMI_expansion_results.ls
f
MMI_propagate.lsf
See also
Ring Resonator Getting Started
Example 2039
MMI coupler with tapered
waveguides 2118
The file MMI_simple.lms contains a SOI MMI structure, as well as an EME solver, FDE solver and Propagator
simulation region.
The transmission and reflection of the fundamental mode can be determined from the user s-matrix result from the
EME solver region object. The following image shows the absolute value squared of the user s-matrix. The total
transmission through port 2 from port 1 is the S21 element. Since the device is symmetric, the amount of power
through each output waveguide is half the amount of the total transmission, or about 31.6%.
The simulation file MMI_simple.lms also contains a 2.5D varFDTD solver region, which can be activated by right
clicking on the 2.5D varFDTD region on the object tree. The simulation contains a mode source, as well as different
monitors for obtaining different simulation results. Once the simulation finishes running, one can plot the electric field
intensity vs x from the profile monitor:
With the mode expansion monitors, we can calculate the forward/backward transmission into the fundamental
waveguide mode of the input waveguide, as well as the two output waveguides. The script
MMI_expansion_results.lsf will output the results from the mode expansion monitors in the script prompt.
> MMI_expansion_results;
Reflection into the fundamental mode of input waveguide is 6.03694 %
Transmission into the fundamental mode of output waveguide 1 is 31.7867 %
Transmission into the fundamental mode of output waveguide 2 is 31.7877 %
For more information on how to use mode expansion monitors for this analysis, please see Using Mode Expansion
Monitors 649 in the User Guide.
We can see that the field profile inside the coupling region is different then the profile from the EME and 2.5D
varFDTD solver simulations. The reason for this discrepancy is due to the interference caused by the reflected fields,
which are not account for by the Eigenmode solver simulation.
Discussion
Both the EME solver method and 2.5D varFDTD method give good results for the transmission, taking less than a
minute to run on a standard 4 core workstation. The field profile using the 2.5D varFDTD method may be less
accurate since it does not calculate the full 2D mode profiles, whereas the EME solver simulates the full 3D
structure. Since the simulation can be completed in a comparable amount of time the EME method is preferable.
The FDE solver method is not suitable for simulating the MMI coupler device as it is a uni-directional technique
which does not account for reflected fields, and there is a non-trivial amount of reflection at the interfaces (between
the waveguides of different widths).
Introduction
In this example we calculate the optical loss through a 1x2 port multi-mode interference (MMI) coupler for different
linear taper widths at the input and output ports of the device.
Solvers 101
EME
Associated files
MMI_tapered.lms
MMI_tapered.lsf
Related publication
D.J. Thomson et al, Low
Loss MMI Couplers for High
Performance MZI
Modulators, IEEE
Photonics Technology
Letters, Vol. 22, No. 20,
October 2010.
See also
Simple MMI coupler 2114
Background
Optical loss through MMI coupler devices can occur due to mismatch between the input waveguide mode and the
modes supported in the interference region. Based on the design in the publication listed above by Thomson et al,
linear tapers are introduced at the input and output ports of the device to reduce the mode mismatch and reduce
loss. We analyze the loss for a range of taper widths.
Setup
Structure
The MMI structure with 10 micron long linear tapers between the input and output waveguides and the interference
region is set up automatically using a structure group.
Simulation region
Since were interested in collecting the transmission of the fundamental mode, the fundamental mode is selected in
the EME solver region's ports. Here, since the structure and has symmetry across the y-direction, the y min
boundary condition is set to anti-symmetric to reduce the simulation time and memory. Since only positive y half of
the structure is simulated due to the symmetry condition, only 1 of the 2 output ports is included in the simulation
region, so there are only 2 ports set up in the EME solver (the input port and one of the output ports). The total
transmission is calculated after running the simulations by doubling the transmission through the output port that is
simulated.
In the EME setup tab, 5 cell group regions are set up. In the cell group regions that contain the tapers, 10 cells are
used in the x-direction to resolve the tapers, and mesh override regions are used to increase the resolution of the
transverse mesh over the tapers. The CVCS subcell method is also used in the taper regions to avoid artifacts due to
discretization of the structure in the x-direction. The CVCS method is recommended in cell group regions where the
structure cross section is continuously varying.
Because the interference region supports many modes compared to the input and output waveguides, we use an
increased number of modes to represent the propagation in this region.
Parameter sweep
In the "Optimizations and Sweeps" window, a parameter sweep task is set up to sweep the taper width property of
the structure group between 0.4 microns and 1.1 microns and collect the user s-matrix.
Results
The script file is used to run the parameter sweep and collect the user s-matrix results. The transmission in the
fundamental mode through port 2 from port 1 is then calculated from the S21 element from the user s-matrix, and the
value is doubled to give the transmission through both output ports. The result is plotted below.
Introduction
Arrayed waveguide gratings (AWGs) are essential for dense wavelength division multiplexing/de-multiplexing in
optical networks. The sensitivity of these devices to phase errors means that a rigorous design process and
simulation tool is required. However, the size and complexity of AWGs make them very challenging for most
simulation tools. In this example, we will provide a basic template for a typical AWGs simulation, where the size of
the full device can be on the order of 10s of millimeters (or larger).
If you are not familiar with Propagator simulations, you may want to go through the Ring Resonator Getting Started
Solvers 101
varFDTD
In this topic
Introduction 2119
Associated files
input_star.lms
expansion_results.ls
f
output_star.lms
set_source_star.lsf
plot_profile.lsf
See also
Ring Resonator Getting
Started Example 2021
Due to the size of AWGs, it is often not possible to model this device using 3D finite-difference time-domain (FDTD).
Some common alternatives for simulating wave propagation at large distances include the Beam Propagation
Method (BPM), the Eigenmode Expansion Method and 2D FDTD. However, the approximations required for these
methods make them ill-suited for treating AWGs devices. For these devices, the variational FDTD technique used by
the Propagator can take into account the important dispersion effects, while only requiring the simulation time and
memory of a 2D FDTD simulation.
Simulation setup
Very often, AWGs designs are on the order of 10s of millimeters, which make them too large to be simulated as a
whole even in a 2.5D calculation method. The recommended approach is to break the device into 3 different
sections:
distribution.
The light then propagates
along each arrayed waveguide
over a large distance. The
length of each waveguide is
designed such that they have
a constant length increment
L, resulting in a constant
phase change across
each successive channel.
Once the light reaches the
output star coupler, it will
enter another FSP region,
where it refocuses at one of
the output waveguides.
Depending on the wavelength,
the light will be focused on to
the different output channels.
We can see how the input waveguide mode spreads out in the FSP region, and distributes among the different
output array waveguides. In the Visualizer, it is very easy to plot a slice of this image along the x direction. However,
this image alone does not give us enough information about how much power is actually transmitted into the output
waveguides.Mode expansion monitors are ideal for this calculation. In the same file, the mode expansion monitors
and transmission monitors have been set up at each output waveguide (rotated at the same angle). This will allow us
to determine how much power is transmitted into the fundamental mode of each output waveguide. For more
information on how to use mode expansion monitors for this analysis, please see Using Mode Expansion Monitors
649 in the User Guide.
The script expansion_results.lsf will plot the transmission into the fundamental mode of each output
waveguide, as well as the total transmission into each waveguide.
Since the total transmission is calculated by simply integrating the Poynting vector along the monitor plane, we can
see that it is very easy to over-estimate how much light is actually transmitted into the arrayed waveguides. This is
why it is very important to carry out mode expansion calculations, instead of simply looking at the total
transmission.
Arrayed waveguides
The propagation in the arrayed waveguide can be treated analytically. The AWGs are designed such that the length
DL = m l0 / neff
difference between successive channels is (where m is an integer).
D j = bDL = m l0 w / c
The phase difference between each channel is , which corresponds to a time delay of
Dt = m l0 / c
between each channel. This means that in order to get the correct phase difference in a time domain
simulation, we will need to set this time delay for each input mode of the output star coupler.
We can see that, at wavelengths near the center wavelength, the light is mostly coupled into the center output
waveguide . As we change the wavelength of the sources from shorter to longer wavelengths, we can see the
position where the light focuses move along the right edge of the output star coupler, coupling into different channels
depending on the wavelength. This de-multiplexing functionality is the result of the phase difference from the time
delay that we specified.
Even though this is a very simple example. One can easily extend this basic template to more complex designs. If
you would like to discuss how to approach your AWGs design with Lumerical's technical support team, please
email support@lumerical.com.
8.3.1.9 Tapers
For planar tapers where there is negligible coupling between the different slab modes supported by the vertical
waveguide structure (ex. SOI taper), the 2.5D variational FDTD solver 107 can be used. For an example, see
For tapers where there is coupling between the different slab modes modes, or if the geometry is not planar (ex.
tapered fiber), the eigenmode expansion (EME) solver 114 should be used. For an example, see
Polarization converter
2130
Solvers 101
varFDTD
Associated files
taper_design.lms
See also
Tapered waveguides 2124
Grating Coupler Design and
Optimization video
w( x) = a ( L - x) m + w2
w(0) = w1
w( L) = w2
a = ( w1 - w2 ) / Lm
The taper design in this case will be proportional to x to the power of exponent m . At the two ends of the taper,
m = 0.5 corresponds to a square root shaped taper. m = 2 corresponds to a parabolic shaped taper.
The file taper_design.lms contains a 2.5D propagator simulation region with a slab gaussian beam as the
source. The slab gaussian beam is set up to focus at a distance 25um away from the source position.
A parameter sweep project has been set up to track the transmission into the output waveguide as a function of the
exponent m. You can use the animate function to see how the shape of the taper changes as a function of m.
The result of the parameter sweep for the exponent m from 0.1 to 4 is shown below. One can see that the
transmission changes quite significantly as m changes from 0.1 to 4. The peak value is close to 1 (corresponding to
a linear taper), but if we run the parameter sweep project again, which sweeps m over a much narrower range from
0.8 to 1.7, we find that the optimal value is at around 1.15.
We can also look at the propagation of light in this taper (form=1.15) with the movie monitor.
It is important to note that this simulation (~30um by 30um by 2um) would have taken a very long time to run with 3D
FDTD. The 2.5D Propagator is ideal here in that it allows us to find the optimal shape of this SOI taper very quickly.
On the next page, we will calculate the transmission into individual modes of the output waveguide and show that the
results are very close to the 3D FDTD results.
Solvers 101
varFDTD
FDTD
Associated files
taper.lms
taper.fsp
See also
SOI taper design 2125
We will use the same taper with the optimal value m = 1.15 found in the previous page. Here, we will inject the mode
source from the left waveguide "w1", and measure the transmission into the TE modes of the right waveguide "w2".
The figure below shows the simulation model and resultant field profile.
To measure the transmission into the modes of the output waveguide, we added a transmission monitor and a Mode
Expansion Monitor at w2. The mode expansion monitor allows one to select an arbitrary number of modal fields with
the "user select" mode selection option. One can then shift-select the desired modes from the mode list. For this
example, we will select the first 5 even TE modes for the expansion, which are modes #2, 6, 10, 14, 18.
Once the simulation finishes running, right-click on the expansion monitor to visualize the results. The Visualizer
screen shot below shows the forward transmission into the first 5 even TE modes of the output waveguide.
Because collapsing the vertical structure into an effective slab works very well in a wide region like that of the taper,
no approximations are made for light propagation in the waveguide slab and one can get results very close to 3D
FDTD with this 2.5D FDTD treatment. The figure below compares the results between 2.5D FDTD and 3D FDTD
(using taper.fsp), and you can see that the results are almost identical to 3D FDTD.
Solvers 101
FDE
EME
Associated files
taper_width_sweep.lm
s
taper_width_sweep.ls
f
pol_converter.lms
See also
Spot size converter (getting
started) 2053
Related publications
[1] D. Dai et al, Mode
conversion in tapered
submicron silicon ridge
optical waveguides, Optics
Express. Vol. 20, No. 12,
2012.
Open taper_width_sweep.lms and run taper_width_sweep.lsf. The script will run a number of FDE
simulations, varying the waveguide width from 3um to 0.5um. At each step, the effective index (neff) for the first 5
modes will be stored. The neffs are subtracted by the neff of the slab mode (without the ridge). When the simulations
are finished, the script will create the following figure, which can be used to identify the regions where mode-
crossings occur and which waveguide widths are required to achieve polarization conversion. For the subsequent
simulation using the EME solver, we will use an input and output waveguide width of 1.5um and 0.8um respectively.
pol_converter.lms contains the input and output ridge waveguides, connected by a taper with 1.5um and 0.8um
as the waveguide input and output respectively. We track 3 modes and note that the modes are listed based on their
neff, i.e., (TE0, TE1, TM0) at 1.5um waveguide width and (TE0, TM0, TE1) at 0.8um waveguide width. The order can
be visualized by drawing a vertical line on the above figure at the particular waveguide width. We will scan the length
of this taper and track how efficiently the TE1 mode can be converted into the fundamental TM mode. Run the
simulation to calculate the modes at each cell. Once the simulation is complete, use the "Propagation sweep"
widget in the EME analysis window to scan the taper length (group span 2) from 5um to 500um and then click on
the eme sweep button.
Clicking on visualize eme sweep will display the results of all the S parameter elements (6x6) in the visualizer.
The S matrix index mapping table can be used to see which S element maps to which port. Since there are 2 ports
(with 3 modes each), S42, S52, S62 will give us the conversion efficiency from TE1 to TE0, TE1 to TM0 and TE1 to
TE1 respectively. One can click on the Remove button to reserve the Attribute of interest. Then select Abs^2 in the
"Scalar operation" drop-down list. In the plot below, one can see that there is no energy transferred from TE1 to TE0.
At the taper length of around 250um, the TE1 mode is almost completely transferred to the TM0 mode.
The EME method is ideal for taper designs because one can scan the taper lengths very quickly without having to
recalculate any modes. Not only does the simulation time required for FDTD-based methods increase with the taper
length squared, the accuracy also decreases due to numerical grid dispersion.
Full device
simulation with
EME 2135
Phase-shifted
Bragg grating 2138
Introduction
In this example, we will use 3D FDTD simulations to access how the performance of the Bragg grating is affected by
geometric parameters such as the corrugation depth and misalignment.
Solvers 101
FDTD
Associated files
Bragg_FDTD_unit_cell.fsp
See also
Full device simulation with EME 2135
Background
A waveguide Bragg grating is an example of a 1D photonic bandgap structure where periodic perturbations to the
straight waveguide forms a wavelength specific dielectric mirror. These devices are often used as optical filters for
achieving wavelength selective functions.
Simulation Setup
For this example, we will use a 3D FDTD simulation of a single unit cell of the grating to find the center wavelength
and bandwidth of the infinitely periodic device. In Bragg_FDTD_unit_cell.fsp, the simulation region contains
exactly 1 unit cell of the grating. Bloch boundaries are used for the x min/max boundaries, which allows us to set
the kx value for the infinitely periodic device. A mode source is used as the excitation, and the bandstructure
analysis group 806 is used to calculate the spectrum. For this simulation, we are interested in the spectrum at the
p
kx =
band edge a , which will give us the size and location of the band gap of the grating.
Simulation Results
p
kx =
Once the simulation finishes running, the spectrum at a is returned by the bandstructure analysis group and
is shown below. The two peaks in the spectrum gives the size and location of the band gap, which corresponds to
the bandwidth and center wavelength of the Bragg grating.
Introduction
In this example, we will use the eigenmode expansion (EME) solver in MODE Solutions to calculate the full
transmission spectrum of the waveguide Bragg grating with an arbitrary number of periods. Note that in many cases,
the center wavelength and bandwidth of the grating will give enough information about the performance of the grating,
and a full transmission spectrum is not always necessary. In that case, it is recommended to use the much simpler
FDTD approach shown in the previous example 2133 .
It is also recommended to go through the Eigenmode expansion solver introduction video and the spot size converter
2053 getting started example to familiarize yourself with the EME solver before proceeding with the rest of this
example.
Solvers 101
EME
Associated files
Bragg_EME.lms
period_sweep.lsf
See also
Initial design with FDTD 2133
Phase-shifted Bragg grating
774
Background
A waveguide Bragg grating is an example of a 1D photonic bandgap structure where periodic perturbations to the
straight waveguide forms a wavelength specific dielectric mirror. These devices are often used as optical filters for
achieving wavelength selective functions.
Simulation Setup
When simulating periodic structures using EME, only 1 unit cell of the geometry needs to be defined. In
Bragg_EME.lms, the EME solver covers a single unit cell of the grating as shown below.
1 port is set up at each end of the solver to calculate the transmission and reflection into the fundamental TE mode.
Under the EME setup tab, we define 2 cell groups for the EME solver, one for the region with the larger waveguide
width and one for the smaller waveguide width. Since the refractive index and geometry is uniform within each cell
group, we only need to use 1 cell for each cell group. For the initial simulation, we will use 10 modes for each cell
group in the EME calculation. Note that symmetry is used here to reduce the number of modes required for this
calculation.
To set the periodicity of the grating, we will define 1 periodic group under the "periodic group definition" table on the
right side of the EME setup tab. The start and end cell groups are set to 1 and 2 respectively, and the number of
periods is set to 500. This means that the unit cell (composed of 2 cell groups) will be propagated 500 times, and
the final length of the device will be 160um.
Since EME is a frequency-domain method, we will need to run 1 simulation for each wavelength of interest. This can
be very time consuming since all the modes need to be re-calculated for each wavelength, and a large number of
simulations are often required to accurately describe the full transmission spectrum. A useful trick to avoid re-
calculating the modes is to scan the length of the period instead of the wavelength, since scanning the length of the
period does not require re-calculating the modes. To do this, we need to be able to relate the grating period to the
wavelength. This relation can be obtained with a Taylor series expansion for
a( l )
l0 n
a = a0 + a0 ( - 1) g
l neff
Explanation
Note that this equation is different from taking the derivative of the Bragg wavelength equation (see Eq. 2.1 in
[1]).
However, this means that each grating period corresponds to one peak Bragg wavelength. In EME simulation,
this could be time consuming. What we want is the phase change for different wavelengths, and convert the
phase change to an effective period change. The phase for one grating period ( ) at different wavelengths:
If we want to get the same phase change by changing the grating period at the original wavelength:
Notes:
and are the effective indices ( ) at wavelength and
Simulation Results
The transmission spectrum of the waveguide Bragg grating with 500 periods is shown below. Alternatively, the same
transmission/reflection spectrum can also be obtained by using a parameter sweep 699 to scan the wavelength
directly. This approach is much more time consuming than scanning the length of the period, and should only be
used when the number of wavelengths is small.
The EME method is ideal for simulating the transmission spectrum of a finite-length waveguide Bragg grating since
the full device can be challenging for FDTD-based methods due to the amount of computational time and memory
required.
Introduction
In this example, we will use MODE Solutions' EME solver to study the effect of adding a phase shift to the Bragg
grating to create a resonance peak within the stop band. This design can be used as a filter in an integrated optics
circuit, as well as a sensor for biological sensing applications.
It is recommended to go through the Eigenmode expansion solver introduction video and the spot size converter 2053
getting started example to familiarize yourself with the EME solver before proceeding with the rest of this example.
Solvers 101
EME
Associated files
shift_Bragg_eme.lms
shift_period_sweep.l
sf
See also
Initial design with FDTD 2133
Full device simulation with
EME 2135
Spot size converter 2053
Eigenmode expansion
solver introduction
Related publication
1. P. Prabhathan, et al.,
Compact SOI nanowire
refractive index sensor using
phase shifted Bragg
grating", Optics Express,
Vol. 17, No. 17, 2009
Background
In this Bragg grating design, a phase shift is introduced at the center of the device to create a Fabry-Perot cavity
with mirrors formed by the gratings on each side. This phase shift will lead to a sharp resonance peak within the
Simulation Setup
The setup for the phase-shifted Bragg grating in shift_Bragg_eme.lms is similar to that of the waveguide Bragg
grating example 2135 , with a few modifications required to accommodate the cavity region at the center of the grating,
Under the EME setup tab, we define 5 cell groups for the EME solver, 2 for the input and output waveguides, 1 for
the center phase shift region and 2 for the gratings on each side. Note that 2 cells are used for cell groups 2 and 4, 1
for each waveguide width. For the initial simulation, we will use 10 modes for each cell group in the EME calculation.
Symmetry is used here to reduce the number of modes required for this calculation.
To set the periodicity of the grating, we will define 2 periodic groups under the "periodic group definition" table, 1 for
the gratings on each side of the cavity. This means that cell groups 2 and 4 will be propagated 100 times, and the
final length of the device will be 66.32um.
Since EME is a frequency-domain method, we will need to run 1 simulation for each wavelength of interest. The
script shift_period_sweep.lsf will calculate the results at each wavelength and plot the transmission
spectrum of the phase-shifted Bragg grating.
Simulation Results
The transmission spectrum of the phase-shifted Bragg grating with 100 pairs of gratings on each side of the cavity is
shown below. One can see the sharp resonance peak in the middle of the stop band, which is consistent with the
experimental results in [1].
The script shift_period_sweep.lsf can also calculate the spectrum for a different number of grating periods.
Since scanning the number of periods does not require re-calculating the modes, one can obtain the transmission
spectrum for an arbitrary number of grating periods with very little additional computation time. The figure below
shows the transmission for the same Bragg grating with different numbers of grating periods. One can see that the
resonance peak becomes sharper as the number of periods increases, but eventually disappears when the number
of periods is very large.
Stripline 2142
Microstrip 2146
8.3.1.11.1 Stripline
Introduction
A stripline is formed by a conducting strip in a substrate sandwiched by ground planes above and below the strip.
The characteristic impedance of a mode supported by a stripline can be calculated using the built-in Power and
impedance integration tool in MODE Solutions FDE solver. In this example, we consider a device with an inner strip
of perfect electrical conductor with a finite thickness, as well as a 2D strip which can be more easily compared with
analytic results where the strip is assumed to have zero thickness.
Solvers 101
FDE
Associated files
stripline_3D.lms
stripline_2D.lms
stripline_Z0.lsf
See also
Power and Impedance Integration 755
Impedance 2141
Co-axial cable 2160
Microstrip 2146
Coplanar Waveguide 2154
Coupled Microstrip 2156
Related references
[1] D.M. Pozar, Microwave
Engineering, Fourth Edition. John
Wiley & Sons (2012).
Background
The characteristic impedance is calculated in the FDE solver by using a surface integral to calculate the power
carried by the mode, and loop integral to calculate the current flow through the loop.
P = P dS
S
I = H dl
c
This calculation method requires the user to specify the integration region. You can specify the integration region
before you run the simulation from the FDE solvers Impedance calculation tab.
Or, the FDE solver also includes a built-in Power and impedance integration tool which allows you to specify the
integration region after solving for the modes and selecting the desired mode from the mode list. When the
integration quantity is set to current, the tool will calculate the characteristic impedance using the specified
integration region.
Simulation Setup
Comparing with analytic results
We can verify the calculated characteristic impedance returned using the Power and impedance integration tool by
comparing it against the characteristic impedance of an infinitely thin conductor calculated from equation 3.179 from
the text by Pozar [1].
Run the stripline_Z0.lsf script file which prints out expected characteristic impedance of approximately 51.63
ohms for the given strip width, relative permittivity of the substrate, and substrate thickness. Note that the equation
from Pozar which is used is not an exact solution, but it is quoted as being accurate to about 1% of the exact
results.
Next, run the stripline_2D.lms file. After calculating the modes, select the first mode in the mode list, and from
the options drop down menu select Power and Impedance Integration. Then under the integrate drop down
menu, select current to perform the characteristic impedance calculation. You can specify the integration region by
setting the x1, x2, y1, and y2 parameters, or you can also use your mouse to click and drag on the plot on the right-
hand side to select the integration region from the plot.
The size of the integration region should be set so that it fully encloses the central strip which carries the current.
The calculated characteristic impedance returned by the tool is approximately 51.1 ohms. You can get an even more
accurate result by using a finer mesh over the structure, and this particular structure can require a relatively fine
mesh to get an accurate field profile because the fields are strongly concentrated at the points on the left and right
edges of the strip.
8.3.1.11.2 Microstrip
Introduction
A microstrip is a type of transmission line which uses a conducting metal strip on top of a substrate with a ground
plane below the substrate. The characteristic impedance of the supported mode is calculated using the FDE solver
in MODE Solutions. In this example, we perform convergence testing of the mesh step size and extrapolate the data
to get an accurate value of the characteristic impedance.
Solvers 101
FDE
Associated files
microstrip.lms
microstrip_Z0.lsf
microstrip_convergence.lsf
See also
Power and Impedance Integration 755
Impedance 2141
Co-axial cable 2160
Stripline 2142
Coplanar Waveguide 2154
Coupled Microstrip 2156
Related references
[1] D.M. Pozar, Microwave
Engineering, Fourth Edition. John
Wiley & Sons (2012).
Background
Using the FDE solver of MODE Solutions, we can find the Eigenmodes supported by a microstrip transmission line.
The characteristic impedance of a microstrip mode can be calculated using the equation Z0=P/(I*conj(I). P is the
power carried by the mode which can be calculated by integrating the normal component of the Poynting vector over
the area of the mode,
P = P dS
S
And I is the current carried by the strip which can be calculated by integrating the H fields around a loop around the
conductor
I = H dl
c
The characteristic impedance calculated using this method is returned as a result from the FDE solver. For
comparison, an approximate characteristic impedance can be calculated for this structure using an equation from
Pozar [1].
Simulation setup
The stripline structure in this example is composed of a copper strip with thickness of 34.1 um. This is modeled
using a 2D rectangle, and the material of the rectangle is specified using the 2D conductive material model given a
surface conductivity for copper of 5.8e7 S/m at RF frequencies [1]. The substrate is a dielectric material with
permittivity 4.34001 and a thickness of 0.5 mm, with metal below the substrate.
We can use a metal boundary condition for y max boundary which is in the air above the structure. This gives a good
result as long as the position of the boundary is far enough above the structure that the modal fields dont reach the
boundary. However, it is also possible to use the PML boundary condition to obtain the same result.
To enable the calculation of Z0 characteristic impedance result by the FDE solver, the calculate characteristic
impedance option has been selected and the integration region is specified under the Impedance tab of the FDE
solver object. The integration region x1, x2, y1 and y2 settings are set so that the region encloses the copper strip.
A mesh override region is placed over the copper strip both to resolve the width of the strip, and to resolve the modal
fields since the intensity of the fields have a sharp feature near the left and right edges of the strip.
To perform convergence testing of the mesh, a parameter sweep task in the Optimizations and Sweeps 699 window
has been set up to collect the Z0 result from the first mode in the mode list as the dx and dy mesh step size is
reduced.
Open the microstrip.lms simulation file. Run the simulation and calculate modes to view the field profile of the
mode supported by the microstrip. The mode profile is plotted below in linear and log scale.
Next, run the microstrip_convergence.lsf script file with the microstrip.lms simulation file. The script
file will run the parameter sweep which records the characteristic impedance of the microstrip mode as the mesh is
made finer. The dx and dy for each point in the sweep, the ratio of the mesh step size in the x and y directions are
constant, and the results appear to converge linearly towards an answer.
By fitting a line to the results using the polyfit script function, we can get the intercept position for a mesh step size
of 0 in order to find an accurate final result for the characteristic impedance and loss. This technique of extrapolating
the results is called Richardson extrapolation and gives a higher order accuracy.
Note that when there are singularities in the mode profile, the results may not always converge linearly.
The final characteristic impedance is approximately 76.9 ohms which is less than 1% different from the approximate
result calculated using an analytic equation.
Introduction
In this example we study a microstrip transmission line with a lumped RLC element in the middle. We calculate the
reflected power for different settings of the RLC element 241 in a 3D FDTD simulation and we compare with analytical
results. We also show how the results can be visualized in a Smith chart.
Solvers 101
FDE
FDTD
Associated files
microstrip_rlc_Z0.lms
microstrip_rlc.fsp
microstrip_rlc.lsf
See also
Power and Impedance
Integration 755
Impedance 2141
Co-axial cable 2160
Stripline 2142
Microstrip 2146
Coplanar Waveguide 2154
Coupled Microstrip 2156
Related references
[1] D.M. Pozar, Microwave
Engineering, Fourth Edition.
John Wiley & Sons (2012).
Background
For a transmission line terminated in a load impedance ZL, the reflection coefficient at the position of the load is
Z L - Z0
GL =
Z L + Z0
where Z0 is the characteristic impedance of the transmission line. The lumped RLC element is formed by a sum in
parallel of a resistance (R), an inductance (L) and a capacitance (C); therefore, the load impedance is given by
-1
1 1
Z L= Z 0 + + + j wC
R j wL
where is the angular frequency of the incident wave. For a lossless transmission line the reflected power at any
position along the line is given by ||2 = |L|2.
The characteristic impedance Z0 can be found using a FDE simulation as explained in the microstrip example 2146 , so
it is possible to calculate the power reflected by the load analytically and compare it with the results from a FDTD
simulation.
FDE results
The fundamental mode of the transmission line at 1GHz is shown in Fig.1. This is a quasi-TEM mode (waveguide
TE/TM fraction = 100/99.7%) with no loss (since the strip material is PEC). The characteristic impedance can be
calculated with the rectangular box shown in Fig.1. The value Z0 = 41.1 will be used in the analysis of the FDTD
results discussed in the next sections.
Fig.1 Screenshot of Eigenm ode solver show ing the transm ission line m ode and its characteristic im pedance.
Fig.2 Snapshot of the Material tab for 2D rectangle show ing the RLC settings.
.
We use PML boundary conditions for the propagation direction (z axis) and metal boundaries everywhere else. In the
PML settings we increase the number of layers of the standard profile to 28 in order to improve the absorption of the
reflected waves at the PML. We use the mesh override regions "trace mesh" and "load mesh" in order to control the
mesh for the cross section of the transmission line and the 2mm gap where the RLC element is located. For
consistency of the characteristic impedance, the mesh of the cross section should be the same as the one used in
the FDE simulation. The simulation region is shown in Fig. 3.
The desired mode is injected with a mode source. We use a mode expansion monitor 651 to collect the backward
transmission at the monitor "R" behind the source and the forward transmission at the monitor "T_in" in front of the
source. The reflected power is the ratio between these two transmission values.
Fig.4 Reflected pow er calculated in FDTD and com parison w ith analytical results (left colum n). The im pedance values in
each case at 1GHz are also plotted (right colum n).
Note that the slope of the numerical results agrees well with that of the analytical results, which shows that the
resistive, capacitive and inductive behaviors are correctly reproduced; furthermore, the numerical results are within
+/-10% of the analytical ones. The agreement can be improved by reducing the mesh steps in the mesh override
regions and increasing the number of PML layers; the latter improves the slope of the results.
The Smiths charts shown in Fig.4 can be obtained by opening the Visualizer for the variable Zcent in the Script
workspace. It is important to set the normalizing impedance in the visualizer settings 741 to be the characteristic
impedance Z0.
Introduction
In this example, the impedance a coplanar conductor-backed waveguide is calculated using the FDE solvers Power
and Impedance Integration 755 tool, and the result is compared with the approximate analytic result from an online
impedance calculator [1].
Solvers 101
FDE
Associated files
coplanar.lms
See also
Power and Impedance Integration 755
Impedance 2141
Co-axial cable 2160
Stripline 2142
Microstrip 2146
Coupled Microstrip 2156
Related references
[1] http://chemandy.com/calculators/
coplanar-waveguide-with-ground-
calculator.htm
Simulation Setup
The cross section of the coplanar waveguide is illustrated in the image above.
In this simulation, we use 2D PEC rectangles for the central microstrip and left and right ground planes. The central
strip has a width of 2.5 mm with a gap of 1.5 mm between the strip and ground planes on either side.
The dielectric substrate has a thickness of 0.5 mm and permittivity of 4.34001, and the y min boundary condition is
set to metal to represent the lower ground plane. A metal boundary is also used for the y max boundary condition
and this is possible since the boundary is placed far enough from the structure that there is no coupling between the
mode and the y max boundary. PML can also be used for the y max boundary.
A mesh override region is used to make sure that the width of the central strip and the width of the gaps between the
central strip and ground planes are accurately resolved.
Then under the integrate drop down menu, select current to perform the characteristic impedance calculation. You
can specify the region to integrate over by setting the x1, x2, y1, and y2 parameters, or you can also use your
mouse to click and drag on the plot on the right-hand side to select the integration region from the plot.
The integration region should be chosen to fully enclose the central conducting strip but not include the ground
planes. Since the fields change sharply near the left and right sides of the central conductor, to avoid interpolation
error of the fields, its best to make sure that the edges of the integration region is a few mesh cells away from the
hot spots of the fields. Using the integration region settings shown on the following image, the calculated
characteristic impedance is approximately 26.6 ohms. This result is consistent with the results calculated using an
online calculator [1] of about 26.7 ohms.
Introduction
In this example, the impedance of both odd and even mode of a coupled microstrip is calculated and compared with
published results from Collin [1].
Solvers 101
FDE
Associated files
coupled_microstrip.lms
See also
Power and Impedance Integration 755
Impedance 2141
Co-axial cable 2160
Stripline 2142
Microstrip 2146
Coplanar Waveguide 2154
Related references
[1] Robert E. Collin, Foundations for
Microwave Engineering, Second
Edition. Wiley-Interscience (2001).
Simulation Setup
The cross section of the coupled microstrip waveguide is illustrated in the image above. This structure supports both
an even and an odd mode.
The structure is composed of 2D PEC microstrips on a 1 mm thick substrate. The substrate has a relative
permittivity of 9.7, and a metal boundary condition is used to simulate the ground plane below the substrate. The
microstrips have a width of 4 mm and a gap of 0.25 mm between them.
A mesh override region is placed over the microstrip structures to ensure that the width of microstrips and the width
of the gap are accurately resolved.
No symmetry 466 is enforced across the x=0 plane, however the even or odd modes of the coupled waveguide could
be selectively found by the solver if symmetric or anti-symmetric boundaries are used for the x min boundary
condition.
The following image shows how to generate a vector plot of the E fields from the visualizer.
Select the even or odd mode in the mode list and calculate the characteristic impedance of the mode by choosing
the Power and Impedance Integration option and integrating the current term.
For this device, the integration region should be chosen to fully enclose only one of the microstrips. There can be
some field interpolation errors if the edges of the integration region is too close to the microstrip since there are
singularities in the modal fields at the edges of the microstrips, so using a larger integration region where the edges
of the integration region are further from the singularities can help avoid the errors.
The calculated characteristic impedance agrees with the reported characteristic impedance for the even mode of 47
ohms and for the odd mode of 33 ohms from figure 3.31 of the text by Collin [1].
Introduction
This topic describes a technique for calculating the impedance of a waveguide. The example structure is a standard
RG6 coaxial cable.
To calculate impedance, we first calculate the voltage between conductors and the current flowing in the inner
conductor. V is calculated by integrating the electric field along a path from the inner conductor to the outer
conductor. I is calculated by integrating H around the inner conductor. Once V and I are known, it is trivial to
calculate the impedance.
Note:
It is also possible to calculate the characteristic impedance using the built-in Power and Impedance Integration
755 tool. For an example which uses this method, see Stripline 2142 .
Solvers 101
FDE
In this topic
Introduction 2160
Simulation setup 2161
Analysis 2162
Results 2162
Associated files
coaxial_RG6.lms
coaxial_impedance.ls
f
See also
Impedance 2141
Stripline 2142
Microstrip 2146
Coplanar Waveguide 2154
Coupled Microstrip 2156
Simulation setup
Cable dimensions
RG6 coaxial cable datasheets typically state following information:
For the insulator, we use Semi-Solid PE with a relative permittivity of 1.29. Note that in the simulation setup, the
background index is specified, not the background permittivity so we use a value of sqrt(1.29). The outer conductor
radius can be calculated with the second formula below and we set the value to 2.23039 mm.
into the copper is on the order of 10s of microns, so we would need to use a mesh size of smaller than 10 microns
to accurately measure the loss.
Symmetry
The TEM mode of this waveguide is circularly symmetric. Therefore, we can use symmetric boundary conditions in
the X and Y directions. Using symmetric boundary conditions will make the simulation faster.
Analysis
Impedance is defined as Z=V/I. The voltage can be calculated by integrating E between the two conductors.
Similarly, the current can be calculated by integrating H around the inner conductor. These integrals are shown in
the following figures.
Note that the following figures were created with a finer mesh than in the associated file. As a result, the E and H
fields are smoother.
R
V = E dr I= H dS
r loop
Results
Impedance
After calculating the modes of this structure, run the analysis script. It will calculate the impedance by integrating
the electric and magnetic fields, as described above. The theoretical impedance for this device is 75 ohms, the
phase velocity is 0.85 c and the cutoff frequency is 29.5775 GHz. The script gives a calculated impedance of 75.9
ohms, a phase velocity of 0.88c and a cutoff frequency of 30.637 GHz.
Cutoff frequency
The fundamental TEM mode of a coaxial cable does not have a cutoff frequency, unlike all other modes. The TE
mode has the lowest cutoff frequency. Below this frequency, the waveguide will be single mode. The theoretical
cutoff frequency of the TE mode in this structure is 38GHz.
8.3.1.12 Waveguides
MODE Solutions' Eigenmode Solver can be used to obtain accurate results for a wide range of problems. The
following examples show the comparison between known analytic solutions and the simulated results for a series of
reference test structures.
ARROW slab
waveguide 2164
Asymmetric slab
dielectric waveguide
2166
Exponential index
profile slab waveguide
2168
Hollow metal
waveguide 2169
Introduction
This topic compares the analytical solutions and results simulated with MODE Solutions for a ARROW slab
waveguide at a wavelength of 632.8nm.
Solvers 101
FDE
Associated files
arrow_waveguide.lms
arrow_waveguide.lsf
arrow_waveguide.ldf
See also
Matlab Script Integration 1642
Related publications
E. Anemogiannis et al.,
"Determination of Guided
and Leaky Modes in
Lossless and Lossy Planar
Multilayer Optical
Waveguides: Reflection Pole
Method and Wavevector
Density Method" IEEE
Journal of Quantum
Electronics, vol. 17, pp. 929-
941, 1999
Simulation setup
The figure above shows the geometry and refractive indices of the multilayer dielectric ARROW slab waveguide at a
wavelength of 632.8nm.
Analysis
Analytical Solutions
Comparison results are taken from E. Anemogiannis et al.
Results
The script arrow_waveguide.lsf finds effective index and propagation loss corresponding to the TE1 mode and
plots the results and the corresponding % errors as a function of the number of grid points.
(Left) Effective index (red) and loss (blue) calculations for TE mode of ARROW waveguide at 632.8nm. The symbols
(o) denote MODE Solutions calculations, and the lines show the comparison results. (Middle/Right) The same
figures (effective index/propagation loss) generated using only built-in MODE functions (no Matlab interface).
(Left) Error amplitude of MODE Solutions calculation for ARROW waveguide TE mode at a wavelength of 632.8 nm.
The x-axis is the number of grid points in the calculation region. (Right) The same figure generated using only built-in
MODE functions (no Matlab interface).
Introduction
This topic compares the analytical solutions and results simulated with MODE Solutions for a asymmetric dielectric
slab waveguide at wavelength1.55m.
Solvers 101
FDE
Associated files
slab_wg.lms
slab_wg.lsf
slab_wg.ldf
slab_wg.m
See also
Matlab Script Integration 1642
Simulation setup
The figure above shows the dimensions and refractive indices of the three-layer asymmetric dielectric slab
waveguide. This can be constructed using 3 contiguous rectangular structures representing the air(etch), core(silica)
and substrate(dielectric defined with an index of 1.33) layers.
Analysis
Analytical Solutions
The analytical solution for the effective index of the slab waveguide can be calculated using the MATLAB script
slab_wg.m, and is used in the evaluation of the MODE Solutions results.
Results
The script slab_wg.lsf finds the effective indices of the TE1 and TM1 modes for wavelength1.55m and plots the
results and the corresponding % errors as a function of the number of grid points.
(Left) Effective index values for TE (red) and TM (blue) modes as calculated via MODE Solutions (o) and via analytic
relations (lines) for three-layer, asymmetric slab waveguide. The x-axis shows the convergence of MODE Solutions
on the correct answer as the number of grid points is increased. (Right) The same figure generated using only built-in
MODE functions (no Matlab interface).
(Left) Magnitude of error of MODE Solutions calculation for three-layer asymmetric slab waveguide at a wavelength of
1.55m. The x-axis shows the number of grid points in the one-dimensional calculation region. (Right) The same
figure generated using only built-in MODE functions (no Matlab interface).
Introduction
This topic compares the analytical solutions and results simulated with MODE Solutions for a exponential index
profile slab waveguide at wavelength 633nm.
Solvers 101
FDE
Associated files
exp_wg.lms
exp_wg.lsf
exp_wg.ldf
exp_wg.m
See also
Matlab Script Integration 1642
Simulation setup
The figure above shows the dimensions and permittivity as a