0% found this document useful (0 votes)
1K views249 pages

Full Wave

Uploaded by

Zhechao Wang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views249 pages

Full Wave

Uploaded by

Zhechao Wang
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 249

FullWAVE 6.

0
User Guide

RSoft Design Group, Inc. 400 Executive Blvd. Suite 100 Ossining, NY 10562 Phone: 19149232164 Fax: 19149232169 info@rsoftdesign.com www.rsoftdesign.com Copyright 1999-2007 All Rights Reserved.

Contents
Preface 1
Whats new in Version 6.0 ........................................................................................................ 3 Notices ....................................................................................................................................... 3 Limited Warranty ........................................................................................................ 3 Copyright Notice ......................................................................................................... 3 RSoft Design Group Trademarks ............................................................................ 3 Acknowledgments ....................................................................................................... 4 System Requirements ................................................................................................................ 4 How to read this manual ............................................................................................................ 5 What should I read and when? .................................................................................... 5 Where can I find the documentation for .................................................................. 5 Conventions ............................................................................................................................... 6 Physics Conventions.................................................................................................... 6

Chapter 1: Installation

1.A. Main Program Installation ................................................................................................. 9 1.A.1. Installation Overview ....................................................................................... 9 1.A.2. Backing up the Examples ................................................................................. 9 1.B. Testing the FullWAVE installation ................................................................................... 10 1.B.1. Testing a Stand-Alone Version:...................................................................... 10 1.B.2. Testing a Cluster ............................................................................................. 12 1.C. What Next? ..................................................................................................................... 12 README File........................................................................................................... 12 Technical Support & Software Upgrades .................................................................. 12

Chapter 2: Background

15

2.A. The FDTD Algorithm ...................................................................................................... 15 2.B. The FullWAVE FDTD implementation............................................................................ 16 2.B.1. Physical Parameters ........................................................................................ 16 2.B.2. Numerical Parameters..................................................................................... 17 2.C. Additional Comments ...................................................................................................... 18 2.D. References........................................................................................................................ 19

Chapter 3: A First Tour of FullWAVE

21

3.A. Component Programs and Files ....................................................................................... 21 3.A.1. Component Executables ................................................................................. 21 3.A.2. Example Files ................................................................................................. 22 3.B. Program Operation ........................................................................................................... 22 3.B.1 GUI Program Operation................................................................................... 22 3.B.2. CLI Operation ................................................................................................. 25

Chapter 4: Using FullWAVE

27

FullWAVE 6.0 User Guide

Contents iii

4.A. Spatial Domain, Grid, and FDTD Options....................................................................... 27 4.A.1. Domain & Grids ............................................................................................. 27 4.A.2. FDTD Options ................................................................................................ 28 4.B. Default Boundary Conditions........................................................................................... 28 4.C. Time Domain & Grid ....................................................................................................... 29 4.D. Choosing an Excitation .................................................................................................... 30 4.E. Saving Data From a Simulation ....................................................................................... 30 4.E.1. Time Monitor Options .................................................................................... 31 4.E.2. Additional Output Options.............................................................................. 32 4.F. Displaying Data During a Simulation............................................................................... 33

Chapter 5: Excitation Types

37

5.A. Basic Excitation Definition.............................................................................................. 37 Field Sources ............................................................................................................. 37 Current Sources ......................................................................................................... 37 5.B. The Launch Parameters Dialog ........................................................................................ 38 5.C. Spatial Excitation ............................................................................................................. 38 5.C.1. Choosing a Source Type ................................................................................. 39 5.C.2. Defining the Field Profile Type ...................................................................... 39 5.C.3. Using Optional Field Profile Data .................................................................. 42 5.C.4. Launching at an Angle .................................................................................... 44 5.D. Temporal Excitation Types.............................................................................................. 45 5.D.1. Supported Excitation Types............................................................................45 5.D.2. Setting Optional Temporal Options................................................................ 47 5.E. Polarization Manipulation ................................................................................................ 48 5.E.1. Default Behavior ............................................................................................. 48 5.E.2. Overriding the Defaults................................................................................... 48 5.F. Launching Multiple Fields................................................................................................ 51 5.G. Special Source Properties ................................................................................................ 51 5.H. Launching a Plane Wave ................................................................................................. 51 5.H.1. Using Periodic Boundary Conditions ............................................................. 52 5.H.2. Using PML Boundary Conditions .................................................................. 52 5.H.3 Other Options .................................................................................................. 52

Chapter 6: Monitoring and Analysis of Simulation Results

55

6.A. Types of Output ............................................................................................................... 55 Temporal Output ....................................................................................................... 55 Spatial Output............................................................................................................ 55 Frequency Output ...................................................................................................... 56 6.B. Creating Time Monitors................................................................................................... 56 6.B.1. Geometric Properties ...................................................................................... 56 6.B.2. Temporal Output Types .................................................................................. 60 6.B.3. Spatial Output Types ...................................................................................... 63 6.B.4. Frequency Output ........................................................................................... 65 6.B.5. Storage Parameters ......................................................................................... 65 6.B.6. Additional Settings ......................................................................................... 65 6.C. Frequency Analysis.......................................................................................................... 65 6.C.1. FFT Output ..................................................................................................... 66 6.C.2. DFT Output..................................................................................................... 67 6.C.3. Fourier Sampling Concerns ........................................................................... 69 6.D. Enabling Monitor Output................................................................................................. 70 6.E. Typical Monitor Configurations....................................................................................... 70 Specific Field Component .........................................................................................71 Measuring Backward Reflections.............................................................................. 71

iv Contents

FullWAVE 6.0 User Guide

Power Flux through Specified Surface ...................................................................... 71 Power Spectrum ........................................................................................................ 71 Steady-State Field/Energy/Power Distribution.......................................................... 71 Custom Post-Processing ............................................................................................ 72 Calculating Cavity Modes ......................................................................................... 72

Chapter 7: Advanced Features

73

7.A. Anisotropy ....................................................................................................................... 73 7.B. Non-Linearity, Dispersion, and Metals ............................................................................ 73 7.C. Boundary Conditions ....................................................................................................... 73 7.C.1. PML Boundaries ............................................................................................. 74 7.C.2. Periodic Boundaries........................................................................................ 75 7.C.3. Symmetric & Anti-Symmetric Boundaries..................................................... 75 7.D. Continuing a Completed Simulation................................................................................ 77 7.D.1. The Automatic Approach ............................................................................... 77 7.D.2. The Manual Approach .................................................................................... 78 7.D.3. Extracting Data From a State File................................................................... 78 7.E. Additional Simulation Algorithms ................................................................................... 78 7.E.1. Single vs. Double Precision ............................................................................ 78 7.E.2. Radial FDTD................................................................................................... 79 7.E.3. Complex FDTD.............................................................................................. 79 7.F Transverse Mode Calculations ......................................................................................... 80 7.F.1. BPM Algorithm Basics ................................................................................... 80 7.F.2. Mode Solving Methods ................................................................................... 80 7.F.3. Using the Mode Solvers .................................................................................. 82 7.F.4. Further Information ......................................................................................... 84 7.F.5. References ....................................................................................................... 84

Chapter 8: Clustering

85

8.A. Licensing, Installation, & Testing.................................................................................... 85 8.B. Cluster Settings ................................................................................................................ 85 8.C. Cluster Display Settings................................................................................................... 87 8.D. Additional Cluster Settings .............................................................................................. 87

Chapter 9: Computing Cavity Mode Profiles and Q Factors

89

9.A. Theoretical Background.................................................................................................. 89 9.A.1. Finding Cavity Resonances & Mode Profiles................................................ 89 9.A.2. Calculating Q................................................................................................. 90 9.B. Manually Calculating Cavity Modes and Q Factors ....................................................... 93 9.B.1. Manual Calculation of Cavity Resonances ..................................................... 93 9.B.2. Manual Calculation of Mode Profile .............................................................. 93 9.B.3. Manual Calculation of Q................................................................................. 94 9.C. Using Q-Finder to Calculate Cavity Modes & Q Factors ................................................ 94 9.C.1 Preparing an .ind File For Use With Q-Finder ............................................... 94 9.C.2. The Q-Finder dialog ...................................................................................... 95 9.C.3. Performing a Simulation ................................................................................ 99 9.C.4. Output Files ................................................................................................. 101 9.C.5. Advanced Q-Finder Techniques.................................................................. 101

Chapter 10: Basic Tutorials

105

Basic Tutorial 1: Basic 2D Simulation ................................................................................. 105 CAD Window Basics .............................................................................................. 105 Creating a New Circuit............................................................................................ 107

FullWAVE 6.0 User Guide

Contents v

Creating Variables via the Symbol Table................................................................ 109 Adding the Waveguide ............................................................................................ 110 Choosing the Excitation .......................................................................................... 112 Adding a Time Monitor........................................................................................... 115 Performing the Simulation ...................................................................................... 116 The Simulation Window.......................................................................................... 117 Accessing Saved Data ............................................................................................. 118 Areas for Further Exploration: ................................................................................ 120 Basic Tutorial 2: Basic 3D Simulation ................................................................................. 121 3D Specific CAD Options ....................................................................................... 121 Creating Variables ................................................................................................... 122 Adding the Fiber Segment....................................................................................... 123 Viewing the Structure in 3D.................................................................................... 124 Checking the Index Profile ...................................................................................... 125 Choosing the Excitation .......................................................................................... 127 Adding a Time Monitor........................................................................................... 127 Performing the Simulation ...................................................................................... 128 Accessing Saved Data ............................................................................................. 129 Areas for Further Exploration.................................................................................. 129

Chapter 11: Advanced Tutorials

131

Tutorial 1: Ring Resonator ................................................................................................... 131 Device Layout: ........................................................................................................ 131 Simulation: Pulsed Excitation ................................................................................. 138 Simulation: CW Excitation..................................................................................... 141 Tutorial 2: PBG Crystal: Square Lattice .............................................................................. 143 Lattice layout........................................................................................................... 143 Simulation ............................................................................................................... 149 Data Analysis .......................................................................................................... 151 Switching Polarization............................................................................................. 152 Periodic Boundary Condition Set Up ...................................................................... 153 Tutorial 3: PBG Crystal: Tee Structure ................................................................................ 157 Device Layout ......................................................................................................... 157 Simulation ............................................................................................................... 158 Tutorial 4: Manually Computing Cavity Modes and Q Factors of a PBG Cavity ................ 161 Structure Overview.................................................................................................. 161 Creating the Structure in the CAD Environment..................................................... 162 Computing the Cavity Resonances.......................................................................... 164 Computing a Cavity Mode Profile........................................................................... 166 Computing the Q Factor .......................................................................................... 168 Areas for Further Exploration.................................................................................. 171 Tutorial 5: Incorporating Material Dispersion for Dielectric and Metallic Materials........... 173 Dispersion via the Single Value Method ................................................................. 173 Dispersion via the Expression Method .................................................................... 174 Dispersion via the Data File Method ....................................................................... 177 Dispersion via the Material Editor........................................................................... 180 Summary ................................................................................................................. 184 Areas for Further Exploration.................................................................................. 184 Tutorial 6: Incorporating Non-Linearities............................................................................. 185 Device Layout ......................................................................................................... 185 Exploring the Effect of the Non-Linearity............................................................... 187 Tutorial 7: Using Q-Finder to Automate Cavity Mode and Q Calculations......................... 189 Structure and Simulation Overview ........................................................................ 189 Using Q-Finder........................................................................................................ 190 Basic Scanning and Optimization............................................................................ 192

vi Contents

FullWAVE 6.0 User Guide

Areas for Further Exploration.................................................................................. 193 Tutorial 8: Using a Non-uniform Grid.................................................................................. 195 Structure Overview.................................................................................................. 195 Advantages of Using a Non-Uniform Grid for this Structure.................................. 195 Using a Non-Uniform Grid ..................................................................................... 195 Simulating with a Non-Uniform Grid...................................................................... 197 Simulating with a Uniform Grid.............................................................................. 198 Comparing the Results ............................................................................................ 199 Areas for Further Exploration: ................................................................................ 199

Appendix A: Tips and Traps in FullWAVE

201

Common FullWAVE mistakes ............................................................................................... 201 Some Good FullWAVE habits to learn................................................................................... 202 Tips for Improving Simulation Speed.................................................................................... 203 Using the Command Line ...................................................................................................... 203

Appendix B: FullWAVE File Formats

205

Standard RSoft File Format ................................................................................................... 205 Supported Output Types.......................................................................................... 206 Examples Files ........................................................................................................ 207 Time Monitor File Formats.................................................................................................... 209 Time Monitor Output File ....................................................................................... 209 Spatial Output Files ................................................................................................. 210 DFT Output Files..................................................................................................... 210 FFT Output Files ..................................................................................................... 211

Appendix C: Symbol Table Variables

213

FDTD Simulation Parameters................................................................................................ 213 Advanced Grid Parameters .................................................................................................... 214 Launch Parameters................................................................................................................. 214 Display/Output Options ......................................................................................................... 215 Advanced Parameters ............................................................................................................ 216 Advanced Features................................................................................................................. 217

Appendix D: Field Normalization and Nonlinearity

219

Nonlinear Response and Units............................................................................................... 219 Calculations in 2D ................................................................................................... 220 The Nonlinear Polarization...................................................................................... 220 Dimensions of Electromagnetic Quantities in FullWAVE ..................................................... 222 Field Normalization Options ................................................................................................. 222 Setting FullWAVEs Nonlinear Parameters ........................................................................... 224 Method 1 ................................................................................................................. 224 Method 2 ................................................................................................................. 225 Method 3 ................................................................................................................. 225 Application Note 1: FullWAVE Field Normalization ........................................................... 226 Normalization = Unit Peak...................................................................................... 226 Normalization = None ............................................................................................. 227 Normalization = Unit Power ................................................................................... 228 Summary ................................................................................................................. 228

Appendix D: FullWAVE Release Notes

229

Changes from Version 5.0 to Version 6.0.............................................................................. 229

FullWAVE 6.0 User Guide

Contents vii

New Capabilities and Improvements to the Program .............................................. 229 Significant Changes in Program Behavior .............................................................. 229 Changes from Version 4.0 to Version 5.0.............................................................................. 229 New Capabilities and Improvements to the Program .............................................. 229 Significant Changes in Program Behavior .............................................................. 230 Changes from Version 3.0 to Version 4.0.............................................................................. 231 New Capabilities and Improvements to the Program .............................................. 231 Significant Changes in Program Behavior .............................................................. 232 Changes from Version 2.0 to Version 3.0.............................................................................. 232 New Capabilities and Improvements to the Program .............................................. 232 Significant Changes in Program Behavior .............................................................. 233 Changes from Version 1.0 to Version 2.0.............................................................................. 233 New Capabilities and Improvements to the Program .............................................. 234 Significant Changes in Program Behavior .............................................................. 234

Index

237

viii Contents

FullWAVE 6.0 User Guide

Preface

The FullWAVE simulation engine is a part of the RSoft Photonic Suite, and is based on the well-known finite-difference time-domain (FDTD) technique. It calculates the electromagnetic field as a function of time and space in a given index structure in response to a given electromagnetic excitation. FullWAVE is ideal for studying the propagation of light in a wide variety of photonic structures. FullWAVE is fully integrated into the RSoft CAD environment which allows the user to define the material properties and structural geometry of a photonic device. FullWAVE can accurately model both dielectric and magnetic materials, as well as anisotropic, dispersive, and non-linear materials. It also can utilize a computing cluster in order to achieve both larger and faster simulations. To use FullWAVE effectively, it is critical to have a working knowledge of the RSoft CAD interface. The CAD tool is described in full in the RSoft CAD manual, which is included in the FullWAVE package. The reader is strongly encouraged to study the CAD manual before reading beyond Chapter 3 of this manual. As a member of the RSoft Photonics Suite, FullWAVE is designed to work with RSofts other passive device simulation modules. This modular approach to the design and simulation of photonic devices is one of RSofts Photonic Suites greatest strengths. Each program in the suite is designed to play nice with the other programs, creating an environment in which data can be shared between the modules. Virtually all the input and output files are in a simple ASCII text format, which allows even greater user control over program operation as well as third-party programs to be integrated into the suite. While the RSoft Photonics Suite is designed to be used via the GUI (Graphical User Interface), command line operation is also possible. This, coupled with the modularity of the Suite, allows for complex scripting capability. The Suite is not limited to a single scripting language, but rather uses the native scripting language of your operating system. For example, Windows users can use DOS batch files, while Unix users can use bash scripts. Additionally, users familiar with languages such as Perl, Python, C, or C++ can create custom scripts in these languages. The RSoft Photonics Suite provides the best of both worlds: it allows for simulations to be performed via the GUI, and for complicated custom simulations to be performed via a script. New and advanced users alike are able to realize the full power of the Suite.

FullWAVE 6.0 User Guide

Preface 1

2 Preface

FullWAVE 6.0 User Guide

Whats new in Version 6.0


Version 6.0 of FullWAVE contains a large number of new features. These are the highlights: Updated CAD Interface The CAD interface has been updated! See the CAD manual for more details. New Non-Uniform Grid Options The CAD contains a major new feature for non-uniform grid simulation. See Chapter 9 in the CAD manual. Improved Grid Generation The index generation algorithms used by the CAD to compute the refractive index of a structure have been improved resulting in increased simulation accuracy. Grid points that lie at material interfaces are computed accurately, structure types can be freely mixed, and support for polygons has been improved. Improved Output Options FullWAVE has several new output options, including the ability to output 3D data files from 3D time monitors, a new Total Density monitor option, new arbitrary overlap monitor functions, a monitor to measure power flux through a volume. See Chapter 6 for details. Of course, a number of minor improvements have been added. For full details on all changes, please consult the complete changelog for FullWAVE which is available in the FullWAVE README file, readmefw.txt, in the main installation directory.

Notices
This section has a list of legal and other miscellaneous information pertaining to the software.

Limited Warranty
RSoft Design Group, Inc. warrants that under normal use, the physical media (diskette and documentation) will be free of material defects for a period of thirty days from the date of purchase. Upon written notice, RSoft Design Group, Inc. will replace any defective media. No other warranty of any sort, either expressed or implied, is provided with this software. No liability for damage to equipment or data, or any other liability, is assumed by RSoft Design Group, Inc.

Copyright Notice
Copyright 1999-2007 RSoft Design Group, Inc. All Rights Reserved. Copyright is claimed for both this manual and the software described in it.

RSoft Design Group Trademarks


RSoft Design Group, RSoft Inc., RSoft, The RSoft CAD Environment, BeamPROP, FullWAVE, BandSOLVE, GratingMOD, DiffractMOD, FemSIM, LaserMOD, OptSim, LinkSIM, EDFA for Vendors, ModeSYS, Artifex, MetroWAND, SWAT, WinPLOT, and RPlot are trademarks of RSoft Design Group, Inc.

FullWAVE 6.0 User Guide

Preface 3

Acknowledgments
IBM is a registered trademark and IBM PC, PS/2, and OS/2 are trademarks of International Business Machines Corporation. Intel is a trademark of Intel Corporation. Microsoft and MS- DOS are registered trademarks and Windows is a trademark of Microsoft Corporation. UNIX and Motif are registered trademarks and X Windows is a trademark of The Open Group. Linux is a registered trademark of Linus Torvolds. Xfree86 is a registered trademark of the The Xfree86 Project. All other product names referred to in this document are trademarks or registered trademarks of their respective manufacturers.

System Requirements
The RSoft Passive Device Suite will run on an IBM compatible personal computer with an Intel Pentium III or higher processor (or AMD equivalent), 256 MB RAM or higher depending on the application, and 250 MB of hard-disk space. Versions for 32-bit and 64-bit Windows and Linux are available. The Windows versions require Windows 2000/XP/Vista. Linux versions have been tested on the standard Red Hat configuration using X Windows or Xfree86 and Motif.

4 Preface

FullWAVE 6.0 User Guide

How to read this manual


The following are some guidelines on the contents of this manual and the conventions used within it.

What should I read and when?


You should begin by reading Chapters 1 and 2 to ensure that you are correctly installed FullWAVE and to gain some initial impressions of its capabilities. Chapter 3 gives an overview of the FullWAVE package and program operation. Before proceeding to Chapter 4 and further, it is recommended that you gain a working familiarity with the RSoft CAD tool. The CAD manual and exercises should be studied until the user is reasonably familiar with the CAD interface, and is comfortable laying out simple photonic structures in the CAD tool. All users should read the program usage description in Chapter 4. Chapter 5 and Chapter 6 discuss excitation types and data via time monitors output respectively, Chapter 7 describes advanced features, Chapter 8 describes clustering, and Chapter 9 describes the user of Q-Finder, an automated utility to calculate cavity modes and Q factors.. The next chapters contain tutorial examples: Chapter 10 has basic idea-driven tutorials that all users should work through in order; Chapter 11 has application-driven tutorials whose order is not important. Several Appendices then follow with additional information.

Where can I find the documentation for


The documentation for the RSoft Photonics Suite is divided into several manuals. The manuals are structured using a simple rule: Anything defining geometry and/or material parameters is in the CAD manual. Anything else is in an appropriate simulation manual. Using this rule, almost any topic can be found. As with any rule, there are a few exceptions. The major exceptions are: Installation The installation procedure for RSoft software, including the CAD and all simulation modules, is covered in the separate document entitled RSoft Installation Guide. Specific installation instructions for FullWAVE can be found in Chapter 1 of the FullWAVE manual (this document). Using a Non-Uniform Grid The creation of a non-uniform grid is covered in Chapter 9 of the CAD manual. Material Editor The definition of advanced materials via the Material Editor is covered in Chapter 8 of the CAD manual. Parameter Scanning/Scripting/Batch Operation These topics are very similar, and are shared by all the simulation modules. They are discussed in Chapter 8 of the CAD manual. Computing the Index Profile Computing the index profile is discussed in the CAD manual. Pathways Pathways define the location and geometry of launch, or initial fields in BeamPROP and FullWAVE. They are documented in the CAD manual. Command Line Utilities

FullWAVE 6.0 User Guide

Preface 5

The RSoft Photonics CAD Suite ships with several command line utilities which perform a variety of tasks. These utilities are documented in an Appendix in the CAD manual.. RSoft Expressions Virtually any numeric field in any RSoft product can accept an analytical expression involving pre-defined and user-defined variables. The form of these expressions, including valid arithmetic operators and functions can be found in an Appendix in the CAD manual. Anytime this rule is violated, a note will direct the reader to the proper section in the proper manual. The location of these manuals is described in the next section.

Where are these manuals located?


While each of the simulation modules are licensed separately, the documentation for each module is placed on your computer during installation. Online versions can be accessed through the RSoft CAD via the Help menu item, or the two help buttons on the right of the top toolbar. The actual files can be found in the subdirectory help in the installation directory. Additionally, PDF versions can be found in the subdirectory docs. These files require the Adobe Acrobat Reader, which can be obtained from Adobe (www.acrobat.com) at no charge.

Conventions
This section describes various conventions concerning the physics, the manual, and the product names.

Physics Conventions
As with any branch of science, there are a number of concepts in the study of photonic devices for which there exist several different definitions exist in the literature. There are the conventions adopted in FullWAVE.

Polarization
Polarization is defined, in terms of the E field, as follows in FullWAVE: Simulation Type TE TM 2D (in XZ plane) 3D Ey Ex Ex Ey

Additional details on the RSoft Polarization convention can be found in the CAD manual Appendices

Units
All units of length and time are measured in microns [m]. The units of time are therefore in units of cT, where c is the speed of light in a vacuum which is approximately 3e14 m/s. The angular unit used within FullWAVE is degrees. The units of imaginary refractive index are defined as:

nimag =

6 Preface

FullWAVE 6.0 User Guide

where

is the wavelength and


z

is the usual exponential loss coefficient defined such that the power

decays as e

, and is given in units of m-1.

Manual Conventions
A number of typeface and layout conventions are followed in this manual. Actions to be performed in the graphical interfaces are usually indented in bulleted or numbered lists. The names of fields and controls in the GUI dialogs are written in boldface Courier The values of pull-down menus and radio button controls are written in Roman italics. Symbol table variables and formulas, and expressions to be typed into the GUI edit fields are written in Courier. In referring to example CAD files, the installation directory for the CAD tool is specified as <rsoft_dir>, and should be replaced with the correct value for your installation. On Windows machines this is typically c:\Rsoft.

Product Name Conventions


The executable files for the various RSoft products have different names under Windows and Unix/Linux. In the manual, we normally use the Windows names. The following table shows the corresponding names that should be used under Linux: Product RSoft CAD tool BeamPROP simulation tool FullWAVE simulation tool WinPLOT graphing tool MOST Windows Name
bcadw32.exe bsimw32.exe fullwave.exe winplot.exe rsmost.exe

Linux Name
xbcad xbeam xfullwave xplot xrsmost

FullWAVE 6.0 User Guide

Preface 7

Chapter 1: Installation

This chapter explains the installation procedure for FullWAVE, and provides a quick example to test the installation.

1.A. Main Program Installation


This section details the installation of FullWAVE.

1.A.1. Installation Overview


Existing RSoft users
Provided you have purchased and installed a license for RSoft software such as BeamPROP, BandSOLVE, GratingMOD, DiffractMOD, or FemSIM, there is a minimal amount of additional installation required to use FullWAVE. This is because FullWAVE shares the same CAD interface with these products. You will have to replace the license file you are currently using with the one RSoft has sent you with your purchase. If your copy of RSoft software does not use a license file, please see the section under First-time RSoft users below for instructions on installing the license file. Note that if the existing version of BeamPROP, FullWAVE, BandSOLVE, GratingMOD, DiffractMOD and/or FemSIM that you have is not the current version, you may also have to upgrade to the new version.

First-time RSoft users


If you have not previously installed RSoft software, you should turn to the separate RSoft Installation Guide and follow the installation instructions there.

FullWAVE Cluster Users


If you are installing the clustering feature of FullWAVE, which is purchased separately, please make sure that you check the appropriate option during the installation and complete the additional required steps. See the RSoft Installation Guide for more information.

1.A.2. Backing up the Examples


FullWAVE comes with a large set of examples and tutorial files which we use extensively in this manual. Since it is easy to accidentally overwrite these files in the course of experimenting with the tool, we recommend copying the entire Examples directory in the install directory to another location, perhaps a subdirectory of your own home directory. Then you can perform the exercises and tutorials and retrieve the original versions when necessary. We suggest you do this now. Windows:

FullWAVE 6.0 User Guide

Chapter 1: Installation 9

Copy the directory <rsoft_dir>\Examples to a suitable location. Unix: Copy the directory /usr/local/rsoft/examples to a suitable subdirectory of your home directory.

1.B. Testing the FullWAVE installation


Once the installation instructions above are completed, the following steps can be used to check that FullWAVE has been correctly installed. Be sure to choose the correct type of installation, and note that all cluster options are licensed separately.

1.B.1. Testing a Stand-Alone Version:


Start the RSoft CAD tool. Windows: Use the Windows Start Menu to open RSoft CAD-Layout Tool. Unix: Enter xbcad at a command prompt. If an error message involving the hardlock key appears, please review the hardlock instructions found in the RSoft Installation Guide. Use the File/Open command in the CAD interface and choose the file c:\RSoft
\Examples\FullWAVE\wg.ind

The CAD window should appear as follows:

Click on the Perform Simulation button, which looks like a green traffic light. The FullWAVE Simulation Parameters dialog should appear as follows:

10 Chapter 1: Installation

FullWAVE 6.0 User Guide

Hit the OK button in the lower right corner of the dialog. The interface will launch the FullWAVE simulation, and a new FullWAVE simulation window will appear that contains the simulation results. As the simulation continues, the field should propagate up the domain. The simulation should shortly complete and the FullWAVE window should appear as:

FullWAVE 6.0 User Guide

Chapter 1: Installation 11

If so, the installation has been successful. If not, please review the installation instructions in the previous section and contact RSoft if the problem persists. If an error message similar to This hardlock key is not licensed for FullWAVE, please check that you have correctly installed the hardlock key or license file contained with your FullWAVE package.

1.B.2. Testing a Cluster


Additional steps are required to test a FullWAVE cluster installation. The steps describing this process can be found in the Installation Guide.

1.C. What Next?


At this point, you are ready to begin using FullWAVE.

README File
The file readmefw.txt, which is located in the installation directory, should be read. This file may be viewed in any text editor, such as Windows Notepad. The README file provides important last minute information about FullWAVE that is not contained in this manual, including new or improved features and options.

Technical Support & Software Upgrades


Finally, the FullWAVE software comes with one year of maintenance, including technical support and product updates. Updates are released on our web site www.rsoftdesign.com/support every one to three months, and include program corrections as well as new features. To access updates, you must contact RSoft after receiving the software to obtain a username and password. Information regarding each update is located in the README file, which can be accessed on

12 Chapter 1: Installation

FullWAVE 6.0 User Guide

the website to determine if you need or want to upgrade, and should be read thoroughly after downloading and installing any update. If you have any questions regarding your maintenance contract, or to renew your maintenance, please contact RSoft Design Group.

FullWAVE 6.0 User Guide

Chapter 1: Installation 13

Chapter 2: Background

This chapter provides technical information and references on the simulation methods used in FullWAVE. This material may be skipped initially; however it introduces terminology and notation which is important for understanding other discussions in the manual. The objective of FullWAVE is to provide a general simulation package for computing the propagation of light waves in arbitrary geometries. The simulation is based on the well-known finite-difference time-domain (FDTD) technique. The FDTD method is a rigorous solution to Maxwell's equations and does not have any approximations or theoretical restrictions. This method is widely used as a propagation solution technique in integrated optics, especially in situations where solutions obtained via other methods such as the Beam Propagation Method (BPM) cannot cope with the structure geometry or are not adequate solutions. Since FDTD is a direct solution of Maxwells curl equations, it therefore includes many more effects than other approximate methods.

2.A. The FDTD Algorithm


Imagine a region of space which contains no flowing currents or isolated charges. Maxwell's curl equations in can be written in Cartesian coordinates as six simple scalar equations. Two examples are:

H x 1 E y E z = t z y
E y 1 H x H z = t x z
(1) The other four are symmetric equivalents of the above and are obtained by cyclically exchanging the x, y, and z subscripts and derivatives. Maxwells equations describe a situation in which the temporal change in the E field is dependent upon the spatial variation of the H field, and vice versa. The FDTD method solves Maxwell's equations by first discretizing the equations via central differences in time and space and then numerically solving these equations in software.

FullWAVE 6.0 User Guide

Chapter 2: Background 15

Figure 2-1 - In a Yee cell of dimension Ax, Ay, Az, note how the H field is computed at points shifted one-half grid spacing from the E field grid points [3].

The most common method to solve these equations is based on Yee's mesh [3] and computes the E and H field components at points on a grid with grid points spaced x, y, and z apart. The E and the H field components are then interlaced in all three spatial dimensions as shown in Fig. 2-1. Furthermore, time is broken up into discrete steps of t. The E field components are then computed at times t = n t and the H fields at times t = (n+1/2) t, where n is an integer representing the compute step. For example, the E field at a time t = n t is equal to the E field at t = (n-1) t plus an additional term computed from the spatial variation, or curl, of the H field at time t. This method results in six equations that can be used to compute the field at a given mesh point, denoted by integers i, j, k. For example, two of the six are:
n H xn(+i1/j ,2k ) = H x (i1/j ,2k ) + , ,

t t n n E y ( i , j ,k ) E y ( i , j , k 1) E zn( i , j ,k ) E zn( i , j 1,k ) z y

)
)
(2)

E xn(+i1 j ,k ) = E xn( i , j ,k ) + ,

t t 2 n n H zn(+i1j/+1,k ) H zn(+1j/,2 ) H y (+i1 /j ,2k +1) H y (+i1 /j ,2k ) , i, k , , y z

These equations are iteratively solved in a leapfrog manner, alternating between computing the E and H fields at subsequent t/2 intervals.

2.B. The FullWAVE FDTD implementation


In order to utilize the FDTD implementation used in FullWAVE, both physical and numerical parameters are required. This section outlines the definition of these parameters.

2.B.1. Physical Parameters


Two physical parameters are required in order to perform a FullWAVE simulation The material parameters, including the relative permittivity as a function of space and/or frequency.

( r, )

and relative permeability

( r, )

16 Chapter 2: Background

FullWAVE 6.0 User Guide

The electromagnetic field excitation

From these parameters, the physics dictates the electromagnetic field as a function of (r,t), or space and time.

Material Parameters
In order to use the FDTD algorithm to study the propagation of light fields in a structure, the material parameters must be specified. FullWAVE utilizes the following formulas to specify the material properties of a waveguide:

D = 0E + P B = 0H + M
where

I 2 P = 0 ( ) E + 2 E 2 + 3 ( ) E E 1 + csat I I 2 2 3 M = 0 m ( ) H + m H 2 + m ( ) H H 1 + d sat I
(3) These equations have four terms, each of which corresponds to a different effect. The first term takes into account the linear index of the system. The second term takes into account material dispersion, or the change of index as a function of wavelength. The third and fourth terms in these equations are non-linear terms, and correspond to a second order nonlinearity and a frequency-dependent third-order non-linearity. It is also possible to define anisotropic effects. This information is specified through the use of the CAD interface. Information on the specification of both a linear and non-linear index can be found in the CAD manual, and information related to the use of anisotropic, dispersive, and nonlinear effects can be found in Sections 7.A and 7.B of this manual.

Electromagnetic field excitation


In order to perform a simulation, an initial launch condition

at time t=0 is needed, as well as a driving function in

time. This consists of both a spatial and temporal excitation, such as

L (r, t ) = f (r0 ) g (t )
(4) where f (r0 ) is the spatial excitation at the launch plane and g (t ) is the temporal excitation. The specification of these parameters is discussed in Chapter 5.

2.B.2. Numerical Parameters


Additionally, the solution algorithm requires additional input in the form of the numerical simulation parameters such as: A finite computational domain, {x (xmin,xmax)}, {y (ymin,ymax)}, and {z (zmin,zmax)}. The boundary condition(s) The spatial grid sizes, x, y, and z. The temporal grid, or time step, t, and the length of time for the simulation.

The software attempts to estimate appropriate values for these parameters, but allows the user to override them.

FullWAVE 6.0 User Guide

Chapter 2: Background 17

As with any simulation, confidence in the accuracy of the numerical solution requires experimentation to determine the sensitivity of results to the numerical parameters. These parameters are discussed below.

Computational Domain
The choice of the computational domain must include the portion of the structure to be simulated. The specification of the computational domain is discussed in Section 4.B.

Boundary Conditions
The boundary conditions at the spatial edges of the computational domain must be carefully considered. Many simulations employ an absorbing boundary condition that eliminates any outward propagating energy that impinges on the domain boundaries. One of the most effective is the perfectly matched layer (PML) [1], in which both electric and magnetic conductivities are introduced in such a way that the wave impedance remains constant, absorbing the energy without inducing reflections. Periodic boundary conditions (PBC) are also important because of their applicability to periodic structures such as PBGs. There are a number of variations on the PBC, but they all share the same common idea: the boundary condition is chosen such that the simulation is equivalent to an infinite structure composed of the basic computational domain repeated endlessly in all dimensions. The PML boundary condition is briefly discussed in Section 4.B; a more in-depth discussion of PML and PBC, as well as several others, can be found in Section 7.C.

The Spatial and Temporal Grid


FullWAVE supports both a uniform and non-uniform spatial grid. In order to produce an accurate simulation, the spatial grid must be small enough to resolve the smallest feature of the field to be simulated. Usually this is dictated by the wavelength in the material(s) to be simulated, but, in some cases, can be dictated by the geometry of the photonic device. Typically, the grid spacing must be able to resolve the wavelength in time, and therefore usually be less than /10 where is not the free space wavelength, but rather the wavelength in the material(s). FullWAVE will provide intelligent choices for these parameters, but the user is strongly encouraged to refine the grid sizes in order to produce an efficient and accurate simulation. Since the FDTD algorithm is based in the time domain, FullWAVE has several parameters which relate to the temporal grid. To obtain a stable simulation, one must adhere to the Courant condition which relates the spatial and temporal step size:

ct <

1 1 1 1 x 2 + y 2 + z 2
(3)

where c is the velocity of light and, for the case of a non-uniform grid, the grid sizes represent the smallest grid size in the simulation. FullWAVE will automatically enforce this condition. More information on the specification of the spatial grid can be found in Section 4.A, and information on the temporal grid can be found in Section 4.C.

2.C. Additional Comments


The computational steps in FDTD are relatively simple, using only addition, subtraction, and multiplication which improves the simulation speed. The technique is extremely versatile because it is inherently full-vectorial without limitations on optical effects such as direction of propagation, index contrast, or backward reflections.

18 Chapter 2: Background

FullWAVE 6.0 User Guide

The FDTD method is time-tested and stable, and can efficiently handle material dispersion and nonlinearities. Also, because it is based in the time-domain, it can cover a wide frequency range with a single simulation run. Furthermore, FDTD lends itself to cluster computing. This allows the computational demand for a single problem to be shared among several computers on a network, and permits researchers to simulate problems otherwise impossible on a single computer. The FDTD method is computationally demanding, requiring a fairly dense grid of points at which all three vector components of both the E and H fields must be maintained. A full three-dimensional simulation of some fairly mundane problems like a simple, planar, evanescent splitter can be near impossible. Such devices are usually long (20 to 30 mm) and would require a computer with terabytes of memory, notwithstanding an impossibly long simulation time. Fortunately, such devices are handled imminently well by a BPM simulation package such as BeamPROP.

2.D. References
[1] J.P. Berenger, J. Comput. Phys., 114, 185 (1994) [2] A. Tavlove, Computational Electrodynamics: The Finite-Difference Time-Domain Method, (Artech House, Norwood, MA, 1995) [3] K.S. Yee, Numerical solution of initial boundary value problems involving Maxwells equations in isotropic media IEEE Trans. Antennas Propagat., AP-14, 302 (1966)

FullWAVE 6.0 User Guide

Chapter 2: Background 19

Chapter 3: A First Tour of FullWAVE

This chapter provides a general overview of the FullWAVE software and its use. We will describe the various programs that make up the package, including their functions and how to run them through both the Graphical User Interface (GUI) and Command Line Interface (CLI). As noted earlier, FullWAVE employs the RSoft CAD Layout program for performing device layout and controlling the simulation. For information on the creation of design files in the CAD, please consult the CAD manual.

3.A. Component Programs and Files


After completing the installation procedures described in Chapter 1, the CAD package, the FullWAVE simulation module and examples, and the accompanying WinPLOT technical graphing package will have been placed on your hard disk. The installation directory (referred to as <rsoft_dir>) of the RSoft Photonics Suite contains several subdirectories. The two most important subdirectories will be described in this section; the other subdirectories are described in the RSoft Installation Guide.

3.A.1. Component Executables


The subdirectory <rsoft_dir>\bin contains the following executable files, among others. Linux users can find the corresponding executable names in the Preface. Executable
BCADW32.EXE

Description This is the Windows version of the RSoft CAD. It is the main control program for FullWAVE, and is usually started from the Start Menu on the taskbar. Please refer to your operating system manual for information on general procedures for starting programs. This is the Windows version of the FullWAVE Simulation Program and is launched automatically by the main program whenever you initiate a simulation. This is the Windows version of the WinPLOT technical graphing package. Please consult the WinPLOT manual for more information on its proper usage.

FULLWAVE.EXE WINPLOT.EXE

These programs can be run from the command line and used in batch or script files in order to initiate a series of simulations automatically; for more information, please consult the next section.

FullWAVE 6.0 User Guide

Chapter 3: A First Tour of FullWAVE 21

3.A.2. Example Files


The subdirectory <rsoft_dir>\examples\FullWAVE contains example device files for FullWAVE. These files have an extension .ind (named for the refractive index distribution which describes the device). A partial listing of these files is as follows:
WG.IND PBG-TEE.IND RING-RES.IND WG3D.IND

A simple waveguide example A photonic-bandgap "tee" structure A ring resonator structure A simple 3D channel waveguide example

In addition to these examples, there is a Tutorials subdirectory which contains the index files described in the Tutorial chapter of this manual.

Running an Example
The structures described by these files can be viewed by selecting File/Open from the RSoft CAD, and choosing the desired index file from the dialog that appears. A simulation can be initiated by clicking on the Perform Simulation (green light) icon, and pressing OK in the simulation parameters dialog. Alternatively, a simulation can be started from the command line by going into the examples directory, and typing fullwave followed by the name of the desired index file (the .ind extension is optional). If you would like an example for a specific problem, contact RSoft by faxing or e-mailing a complete description of the problem and we will create an appropriate example file to assist you if possible.

3.B. Program Operation


A FullWAVE Simulation can be started via either the Graphical User Interface (GUI) or a Command Line Interface (CLI). Both of these methods are equally powerful, and are useful in different circumstances. Beginning users are encouraged to use FullWAVE via the GUI interface in order to understand the usage of the program. Advanced users who wish to incorporate FullWAVE into scripts/batch operations are encouraged to use the scripting capabilities of FullWAVE.

3.B.1 GUI Program Operation


The GUI operation of FullWAVE is a very straightforward process, and can be broken down into 5 basic steps:

Step 1: Laying out the structure


We begin by assuming that the main CAD program has been started, and that a layout window has been opened which contains the circuit to be simulated; this could be a newly created circuit, or a previously saved circuit that was loaded via the File/Open menu item. The general operation of the CAD program is described in the CAD manual.

Step 2: Choosing the FullWAVE simulation engine


The first step in initiating a FullWAVE simulation is to ensure that the Simulation Tool has been set to FullWAVE/FDTD in the Global Settings dialog box. This indicates to the CAD program that a FullWAVE FDTD simulation is to be performed.

22 Chapter 3: A First Tour of FullWAVE

FullWAVE 6.0 User Guide

Figure 3-1: The Simulation Tool option as shown in the Global Settings dialog box.

Step 3: Setting the Simulation Parameters


The next step in initiating a simulation is to click on the Perform Simulation, or green light icon, in the left toolbar. This brings up the FullWAVE Simulation Parameters dialog as shown in Fig. 3- 2. This dialog allows the basic parameters required for a numerical simulation to be entered, and controls other important aspects of the simulation as well. For clarity in understanding the basic procedures, the detailed description of the input fields for this complex dialog is relegated to the next sections.

Figure 3-2: The FullWAVE Simulation Parameters window where basic numerical simulation parameters are entered.

FullWAVE 6.0 User Guide

Chapter 3: A First Tour of FullWAVE 23

After bringing up the simulation parameters dialog, the default values can be accepted as is, or a different value for any parameter can be entered by editing the current value. Note that to save the simulation results simply enter a prefix in the Output File Prefix field of the simulation parameters dialog, and select the desired data files via the Output button. FullWAVEs output options are discussed in more detail in Section 4.D and Chapter 6.

Step 4: Running the Simulation


Once the numerical parameters and other options are acceptable, click on OK to begin the simulation. Note that Cancel rejects any changes and returns to the CAD interface, and Save Settings saves any changes made. Once a simulation is initiated, the computation begins in a new window separate from the main program. Within this window, the field, as a function of time, and any time monitors (see Chapter 6) are displayed during the calculation. The simulation can be paused and restarted if needed. Different field components to be viewed, and, in 3D allows different cross-sections of the selected field component to be viewed via the buttons in the simulation toolbar and the View menu item.

Figure 3-3: The FullWAVE Simulation Window.

The simulation program runs as a background task, so that you can switch away to another program, or back to the main program to edit another circuit or begin another simulation. When the simulation is finished, the title bar of the simulation program indicates Computation Completed, and displays the coordinates of the cursor for reference. The current field view can be saved via the button in the simulation toolbar or via the File/Save-View menu item.

Step 5: Accessing Results


To view or print saved simulation results, click on the WinPLOT icon in the top toolbar of the CAD window (the yellow graph), and select the desired graph from the dialog that is presented. The graph types are listed in the Files of type field. Each output is contained in two ASCII files: one file contains the raw data, and the other contains WinPLOT plotting commands. The file chosen via the above method is the WinPLOT command file so as to correctly display the raw data. To access the raw data, the data file can be opened in any text editor.

24 Chapter 3: A First Tour of FullWAVE

FullWAVE 6.0 User Guide

3.B.2. CLI Operation


As an alternative to using the main CAD program to initiate a FullWAVE simulation, it can sometimes be useful to run the simulation program from the command line. This is particularly true when a series of simulations needs to be run in which some parameter is to be varied, or when incorporating FullWAVE into a larger scripting environment. In this case a batch file can be used to automatically initiate each simulation in turn, without user intervention, freeing the user to perform other tasks. When operating FullWAVE via the command line, it is important to note that the user can access the exact same feature set as if they were running FullWAVE though the GUI. All simulation options within the GUI are controlled by variables. A list of these variables can be found in Appendix C.

Program Syntax
The simulation program can be started from the command line with the same functionality as the GUI version.

Standard Syntax
The standard syntax is the program name, fullwave, followed by the index file name, and optionally by a series of variable assignments of the form name=value. The syntax is thus: fullwave index-file-name [name=value name=value ...] A simulation of the circuit is immediately initiated using any parameters stored in the index file, along with any additional parameters specified on the command line, which override those in the index file. The parameters are the same as those used in the main program, and correspond to the input fields documented in the next sections. The predefined variable names are documented in Appendix C. In addition, any user-defined variable names can also be used in a parameter specification.

Cluster Syntax
Clustered simulation require additional information such as a number of processes and a list of host machines. This information is provided to FullWAVE via the program fwmpirun. Clustering is licensed seperately. Information on its use can be found in Chapter 8. Its syntax is: fwmpirun [mpiopts] index-file-name [name=value where the available MPI options are: Option Description
-np -machine file file -hosts name,name, -show # -hide #

name=value

..]

number of processes machine file list of hosts (alternative to above) nodes to show (0=none,1=1st,2=all) nodes to hide (0=none,1=1st,2=all)

For example, to run a cluster simulation of a design file wg.ind with two processes on two nodes with names computerA and computerB the command would be: fwmpirun np2 hosts computerA,computerB wg.ind

Batch File Operation


As noted above, a benefit of command line usage is the ability to use batch files to automate a series of simulations. For example, assume a circuit has been stored in the file wg.ind, and that it is desired to initiate a series of simulations with

FullWAVE 6.0 User Guide

Chapter 3: A First Tour of FullWAVE 25

X grid sizes of 0.1, 0.05, and 0.025 m, storing the results in files beginning with the names myruna, myrunb, and myrunc, respectively. This might be done on a Windows-based system by creating a batch file called runall.bat, containing the lines: start /w fullwave wg prefix=myruna step_size=0.1 wait=0 start /w fullwave wg prefix=myrunb step_size=0.05 wait=0 start /w fullwave wg prefix=myrunc step_size=0.025 wait=0 In the above, the start /w command is used to start the program fullwave.exe and wait for it to complete before proceeding to the next line in the batch file. The word wg is the name of the index file (without the *.ind extension which is optional). The prefix parameter specifies the name to be used for any output files that may be generated, which will be differentiated by their extension, and is equivalent to entering an Output File Prefix in the GUI. Note the prefix must not include an extension. The step_size parameter sets the Step Size for the simulation to the indicated value. Finally, wait=0 causes the program to exit immediately after completing the simulation instead of waiting for the user to close the program. To execute the batch file, simply type runall at a DOS command prompt. The above example is intended to illustrate how to use the operating systems native batch capability for performing a series of simulations. Alternatively, FullWAVE provides its own built-in scripting capability to achieve this task which has several advantages, including platform-independence and the fact that the program does not have to be constantly reloaded into memory for each simulation. Furthermore, FullWAVE provides an automated approach for generating and running scripts for parameter scans. These capabilities are described in the CAD manual.

26 Chapter 3: A First Tour of FullWAVE

FullWAVE 6.0 User Guide

Chapter 4: Using FullWAVE

This chapter describes the key features of the FullWAVEs FDTD based simulation engine. It will walk through the contents of the FullWAVE Simulation Parameters dialog. Some familiarity with the CAD is assumed; for information on the creation of design files in the CAD, please consult the CAD manual.

4.A. Spatial Domain, Grid, and FDTD Options


FullWAVE solves for the electromagnetic fields within a given structure as a function of time in a finite domain on a spatial grid. It is therefore important to define this domain and grid correctly, so as to ensure correct simulation results. Furthermore, the FDTD algorithm has several options which allow for further control over the simulation. The upper portion of the FullWAVE Simulation Parameters dialog allows the user to specify this information.

Figure 4-1: The section of the FullWAVE Simulation Parameters window where spatial grid and PML information is set. The PML specifications are discussed in the next section. The non-uniform portion of this dialog is described in Chapter 9 of the CAD manual.

4.A.1. Domain & Grids


Each spatial direction can be defined separately, and the applicable options are (all units are in m):
Domain Min and Domain Max

FullWAVE 6.0 User Guide

Chapter 4: Using FullWAVE 27

This field sets the domain limits to be used during the simulation. For accurate results, the simulation domain must includes all parts of the structure that you want to simulate, including any evanescent fields outside of the structure. It shouldnt be excessively large as nothing can be gained by simulating parts of the domain where no field is present.
Grid Size

This field sets the grid size for each dimension. The grid size used for a simulation must be small enough to resolve the smallest feature in the fields and structure during a simulation. For most structures, this means that the grid size should be small enough to resolve in time the wavelength of the field in the material being simulated. It is recommended that you perform a convergence study with the grid size to ensure accurate results. FullWAVE supports the use of a non-uniform grid. For further details about this, please read through Chapter 9 in the CAD manual. When starting a design project, you can save time during initial exploratory studies by using a course grid (which of course satisfies the above condition) and sacrificing accuracy. General results for your structure can often be obtained with remarkably course grids. At the same time, when a structure includes fine features, the results can be quite inaccurate with an overly coarse grid. You have not completed your design project until you have confirmed the convergence of your results at a higher resolution.

4.A.2. FDTD Options


The FDTD algorithm has many additional options which further control a FDTD simulation. These options are set either in the FullWAVE Simulation Parameters dialog, or in the Advanced Parameters dialog. The Advanced Parameters dialog is described in Chapter 7. Only those options that are in the FullWAVE Simulation Parameters dialog are described here.
Polarization

The polarization definitions are slightly different for 2D and 3D simulations: 2D Simulations For 2D FDTD simulations, Maxwells equations are separable, and therefore each polarization can be modelled seperately. A TE simulation models the electric field along y, and includes the Ey, Hx, and Hz field components. A TM simulation models the magnetic field along y, and includes the Hy, Ex, and Ez components. 3D Simulations For 3D FDTD simulations, Maxwells equations are coupled and can not be seperated. It is best to set the polarization to the component in which the majority of the field resides: TE for Ex, and TM for Ey. For a more detailed look at polarization, see the appendix in the CAD manual.
Dispersion/Nonlinearity

This option enables the use of dispersive and/or nonlinear materials in a simulation. These types of materials can be defined in the Material Editor described in the CAD manual. It is important to enable this option when these material types are used; if it is not enabled, the simulation can be unstable. See Section 7.B for more details.

4.B. Default Boundary Conditions


In addition to a spatial grid, FullWAVE also needs to define how the fields behave at the boundaries of the selected domain. By default, FullWAVE uses Perfectly Matched Layer, or PML, boundary conditions.

28 Chapter 4: Using FullWAVE

FullWAVE 6.0 User Guide

A PML boundary, which consists of several points which are added to the edge of the domain, is designed to act as a highly lossy material which absorbs all incident energy without producing reflections. This allows field energy which is incident on the boundary to effectively leave the domain. These parameters control how the PML behaves during a FullWAVE simulation. FullWAVE supports other boundary conditions such as Periodic, Symmetric, and Anti-Symmetric boundaries. Please see Section 7.C for more details about both PML and these additional boundary condition types. The PML option shown in Fig. 4-1 is:
PML Width

This field sets the width of the PML (Perfectly Matched Layer) used as a boundary condition. This width is then added to the edge of the computational domain.

4.C. Time Domain & Grid


The FDTD algorithm is based in the time-domain, and so in addition to a spatial grid, a temporal grid is needed. The lower left portion of the FullWAVE Simulation Parameters dialog box shown in Fig. 4-2 specifies the key time-domain parameters of the program.

Fig 4-2: The section of the FullWAVE Simulation Parameters where temporal parameters are set.

All times must be specified as cT in units of m. While these are generally preferable units, note that the speed of light in m/sec is a built in constant c, so that an absolute time, such as 1 femtosecond, can be entered as "c*1e-15". These include:
Time Step

This field sets the grid size in the time dimension. The time step chosen must satisfy the Courant condition described in Section 2.B.2 which is shown in the Stability Limit field. It is not possible to perform a simulation unless this condition is met.
Stability Limit

This non-editable field displays the maximum time step possible given the spatial grid sizes chosen. This value is found via the Courant condition discussed in Section 2.B.2. When using non-uniform grid options, this field displays an estimate value based on the Grid Size (Edge) values. After a simulation has started, a warning will be issued if the value entered violates the stability limit. The user should then change the time step to a satisfactory value.
Stop Time

FullWAVE 6.0 User Guide

Chapter 4: Using FullWAVE 29

This field determines the length, in time, of the calculation. The simulation will run from t=0 to the time specified in this simulation.
Monitor Time

This field determines the interval at which FullWAVE time monitors save temporal output. For more information on temporal outpu, please see Section 6.B.2.
Update Time

This field determines the interval at which fields are displayed on screen during a simulation.

4.D. Choosing an Excitation


In order to perform a simulation, the initial field, or excitation of the system, needs to be defined. The excitation, also referred to as the launch field, is composed of both a spatial and temporal aspect and is defined via the Launch Parameters dialog. This dialog can be opened via the Launch button in the FullWAVE Simulation Parameters dialog. The specification of the excitation type can be found in Chapter 5.

4.E. Saving Data From a Simulation


FullWAVE contains a robust set of options to save data from a simulation. These options are controlled via time monitors and the settings in the FDTD Output Options dialog shown in Fig. 4- 3 which can be opened via the Options button in the FullWAVE Simulation Parameters dialog. A description of time monitors can be found in Chapter 6. An Output Prefix field must be specified in the FullWAVE Simulation Parameters dialog in order to enable the output of data.

30 Chapter 4: Using FullWAVE

FullWAVE 6.0 User Guide

Fig 4-3: The FDTD Output Options dialog box.

These options can broadly be divided into two groups: Time Monitor options and Additional Outputs:

4.E.1. Time Monitor Options


Time monitors record information from a simulation. A detailed description can be found in Chapter 6. These options globally control several time monitor options:

Temporal Output Options:


Temporal Output includes the options described in Section 6.B.2.
Monitor Time

This option sets the intervals at which temporal output measurements are made by time monitors, and is the same as the control found in the FullWAVE Simulation Parameters dialog.
Enable Temporal Output

This option selects whether or not to save the time monitor results. By default, when a Pulsed or Impulse excitation is used, the time monitor information is not saved. If this information is needed, this field should be manually enabled. For more details on the type of time monitor output, please see Secion 6.B.2.

FullWAVE 6.0 User Guide

Chapter 4: Using FullWAVE 31

Spatial Output Options:


Spatial Output includes the options described in Section 6.B.3.
Spatial Time Step

This option sets the intervals at which spatial output measurements are made by time monitors. By default, it is set equal to stop time.
3D Output Format

This sets the output format for the output of data from a 3D monitor. By default, data is output in a VTK format which can be opened with the MayaVI program. Alternatively, the data can be output in the RSoft format described in Appendix B which can be easier to use for custom post-processing.

FFT Frequency Analysis Options


As described in Section 6.C, FullWAVE can output FFT frequency analysis data.
Frequency Output

This global option enables the calculation of an FFT of the time response of a system and to save the results as a function of frequency. By default this output is not normalized to the source spectrum, but this behavior can be changed by selecting Source Norm. For more details on the use of FFT output, please see Section 6.C.
Wavelength Output

This global option enables the calculation of an FFT of the time response of a system and to save the results as a function of wavelength. This option is automatically selected for the pulsed and impulse excitation types. By default this output is normalized to the source spectrum, but this behavior can be changed by selecting Source Norm. For more details on the use of FFT output, please see Section 6.C.
Padding Factor (2^(N-1))

This factor attempts to increase the resolution of the FFT analysis by padding the time response with zeros. The factor is computed as 2^(N-1), where N is the value entered. This approach is appropriate only when the time response of the system has diminished to zero at the end of a simulation. By default, this option is not used. When this field is set to a value greater than 1, FullWAVE will extend the time window by factors of 2 up to the specified factor before performing the FFT. It will then generate a series of additional files. The <prefix>.wmn file will contain the normal graph obtained form the original time window. The <prefix>.wm2, <prefix>.wm4, files will be those obtained at 2, 4, times the original time window up to the specified factor. The <prefix>.pwn file will show the highest resolution file. For more details on the use of FFT output, please see Section 6.C.
Preliminary Output Factor (2^-N)

This factor allows for the output of preliminary FFT output during a simulation. FullWAVE will output FFT results at intermediate time windows, starting from the original window divided by the specified factor which much be a power of 2 greater than 1. The file prefixes for the intermediate results will have _1, _2, _3, appended to their names. For more details on the use of FFT output, please see Section 6.C.

4.E.2. Additional Output Options


Excitation Time Envelope

This option indicates that the excitation time envelope should be output.
Steady State Field (at Fixed Z)

32 Chapter 4: Using FullWAVE

FullWAVE 6.0 User Guide

This feature enables the output of steady-state field data which can be used, for example, as the input into a BeamPROP BPM simulation. When this option is enabled, FullWAVE will store the field at the output cross-section in standard RSoft field format. The Default option saves only the major component of the field, while the All Components saves all the field components in the simulation. The results will be stored in the files <prefix>_bpm.fld (actual field data) and <prefix>_bpm.pfd (corresponding graph). By default, the cross-section will be taken at the last Z position in the computational domain (not including the PML); however it is sometimes better to take the cross section somewhat in front of the PML. This position can be set via the Offset (from Z Max) option. This option only outputs steady-state field data at a fixed Z value; the output of such data on an arbitrary domain can be obtained through the use of a time monitors DFT output options. Please see Section 6.C.2 for more details.
Offset (from Z Max)

This field allows the user to specify an offset from the last Z position for the Steady State Field (at Fixed Z) output option. A negative value indicates a location less than the last Z position, putting it in front of the PML.
Far Field

This option enables the output of both the amplitude and phase of the far field pattern of the Steady State Field (at Fixed Z) output. The results will be stored in files with the extension .far (actual field data) and .pfr (corresponding graph). The results are shown as intensity as a function of angle. There are several additional options which control the far field calculations. First, the angular resolution can be controlled by setting the variable farfield_da to the required resolution in degrees. The resolution is normally set by the domain of the calculation, however this feature extends the domain during the far field calculation to attempt to achieve the requested resolution. Second, the far field is normally calculated by assuming the propagation is into air. To have the far field calculated assuming propagation into a different medium, set the farfield_index variable to the desired refractive index. Also, the variables farfield_axmin, farfieldax_max, farfield_axmin, and farfield_aymax allow user control over the angular range used in far-field plots. Far fields can be computed of any field data using the command line utility bdutil described in the RSoft CAD manual.
Final Field

This option indicates that the field should be output at the end of a simulation.
Intermediate Field Slices

This option indicates that fields should be output at every slice, set by the Slice Time during a simulation. To save data on arbitrary domains, use the spatial output options described in Section 6.B.3.
Slice Time

This option sets the interval at which Intermediate Field Slices are saved.
Output Radial Data in XY Format

This option instructs the program to save output from a radial computation in XY format in addition to radial format.

4.F. Displaying Data During a Simulation


During a FullWAVE simulation, a field cross-section as well as time monitor output are displayed and are updated during the simulation at intervals defined by the Update Time option described in Section 4.D. The data displayed can be controlled further by the options in the FDTD Display Options dialog shown in Fig. 4-4 which can be opened via the Display button in the FullWAVE Simulation Parameters dialog.

FullWAVE 6.0 User Guide

Chapter 4: Using FullWAVE 33

Fig 4-4 : The FDTD Display Options dialog box.

These options are as follows:


Field Component

This option selects the field component to be displayed during a simulation. Note that the field component can be changed during a simulation via the View/Field Component option in the FullWAVE simulation window. In addition, the field component can be set via the internal variable fdtd_view_component.
Cross Section

This option sets the cross section to be used for a 3D simulation. This option can also be set via the variable fdtd_cut_direction.
Slice Position X, Y, and Z

These options the slice position for the displayed field profile in a 3D simulation for a given Cross Section type. Note that the slice position can be changed during a simulation via the View/Cross Section option in the FullWAVE simulation window.
Outline Color

This option indicates whether or not to draw an outline of the structure on top of the field display, and if so, what color scheme to use.
Color Shades

This option indicates the number of color shades to be used render the displayed field can also be set.
Show Color Scale

This option indicates that the color scale should be displayed in the simulation window.
Color Scale

This option sets the color scale to be used when rendering the displayed field in the simulation window. Scale files can either be entered by name, or chosen via the Scale Files button.

34 Chapter 4: Using FullWAVE

FullWAVE 6.0 User Guide

Plot Aspect Ratio

Field plots do not normally display in a 1:1 aspect ratio, and this option sets the aspect ratio of the plot to 1 or any other desired aspect ratio. For stored plots generated with previous versions, or generated without having set this option, the aspect ratio can be changed in WinPLOT under Options/Axes/Aspect-Ratio or via the /aspect option. Please consult the WinPLOT manual for more information.

MPI Display Options


These options control display properties for use during a clustered simulation. Please see Chapter 8 for a description of these options.

FullWAVE 6.0 User Guide

Chapter 4: Using FullWAVE 35

Chapter 5: Excitation Types

A key part of a FullWAVE simulation is the launch field used to excite the structure. The excitation, also referred to as the launch field, should be chosen to correspond to the type of simulation results required. For example, a CW excitation should be used when the steady-state performance of a structure is desired and a Pulsed excitation can be used when the spectral characteristics of a structure are needed.

5.A. Basic Excitation Definition


The excitation is composed of both spatial and temporal components, and is represented as a sum of individual excitations and can be expressed by the following equation:

L (r, t ) = i (r, t )
i

The individual excitations

i (r, t )

are defined as:

i (r, t ) = Pi fi (r ) gi (t )ei t
i

where P and i

are the power and phase of the excitation, and f i (r ) and gi (t ) are the spatial and temporal

components of the excitation. The exact definition of these parameters and functions will be discussed in later sections. Each individual excitation in the above equation is defined in the same way, and is then combined to realize the final excitation function. Before the actual definition of the excitation functions is discussed, it will be beneficial to outline the available types of excitation.

Field Sources
Field sources can be thought of as an incident beam. They are defined along a specific plane, and radiate from that plane. These are the most common types of excitations used within FullWAVE.

Current Sources
Current sources are excitations due to currents present in the simulation domain. Both the spatial aspect of the field as well as the current direction can be specified.

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 37

5.B. The Launch Parameters Dialog


A launch field is defined via the Launch Parameters dialog box shown in Fig. 5-1 which can be accessed either via the Edit Launch Field button in the left menu in the CAD interface, or via the Launch button located in the FullWAVE Simulation Parameters dialog box discussed in Chapter 4. Several global launch options can be set via options in the FullWAVE Simulation Parameters dialog box as well as in the upper right corner of the Launch Parameters dialog. These options will be discussed in Section 5.D.

Figure 5-1. The Launch Parameters dialog which selects both the type and characteristics of the optical input field that will be launched into the circuit for the simulation.

This dialog allows the user to define multiple launch fields which can be linearly combined with different powers and phases to realize the function L (r , t ) . This multiple launch feature is controlled by several fields at the top of the dialog, and is discussed later in this section. We begin by describing the launch options for an individual launch field which are controlled by the remaining fields in the dialog.

5.C. Spatial Excitation


The function f i (r ) above represents the spatial component of the launch field. The spatial component can be divided into two main sections: the desired field profile type, and then optional launch data which describe the desired profile.

38 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

This section describes the definition of this function for both a field source and a current source, and then the field profile and its associated optional parameters.

5.C.1. Choosing a Source Type


FullWAVE supports two types of spatial excitations, or source types.

Figure 5-2: The portion of the Launch Parameters dialog where the Spatial Excitation Type is set.

Field As stated earlier, the field source is the most common used spatial excitation type in FullWAVE and can be thought of as an incident beam. To select a this type of spatial excitation, set the Spatial Excitation Type to Field. The beam profile can be selected from a built-in profile or a data file can be used. Additionally, the optional fields discussed below allow for further customization of the launch profile.

Current A current source is designed to produce fields through the introduction of a current with in the simulation domain by introducing the current term into Maxwells curl equations. To select this type of spatial excitation, set the Spatial Excitation Type to Current. Since current is a vector, the direction of the current needs to be set. By default, the direction is set along the major polarization direction. To use the default direction, set the Current Direction to Auto. In 2D, the source can be considered a wire along the Y direction. For 2D TE simulations, the wire contains an electrical current, while for 2D TM simulations, the wire contains a magnetic current. For 3D, a user defined direction can be used. To use a custom direction, uncheck the Auto box and manually set the Direction Vector. The field profile is assumed to be Gaussian in X, Y, and Z. The Gaussian width in each of these directions is defined by the values of the Width, Height, and Length fields discussed below. The other launch options are not applicable at this time.

5.C.2. Defining the Field Profile Type


A field source is defined along a plane in the simulation domain. To accomplish this, we need to define the function fi (r ) described above along that plane. The launch field profile is defined along a plane. For example, if we are going to launch from a constant Z position, we need to define the profile of the launch field given by the function f i ( x, y , z0 ) where z0 defines the incident plane. For more information on launching at a particular angle, see Section 5.C.4.

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 39

Figure 5-3: The portion of the Launch Parameters dialog where the Field Profile Type is chosen.

The options shown in Fig. 5-3 which control the field profile for a field source will be discussed in this section. The individual parameters for each profile type will be discussed in the next section.
Launch Type

This drop down box selects the type of input field. The available choices are: File The input field is obtained from an ASCII data file, which can be the result of a previous simulation, or a user-defined data set. The name of the data file is selected in the Input File fields described below. The file format is documented in Appendix B Computed Mode This option is not used by FullWAVE. Slab Mode or Fiber Mode For 2D simulations, the input field is a normal mode of a slab waveguide with characteristics matching those of the input waveguide, or as defined in the Optional Profile Data described in the next section. The mode number is selected in a separate field described below. For 3D simulations, this option yields an LPmn fiber mode instead of a slab waveguide mode. By default has characteristics matching the waveguide, not any specific commercial fiber. To launch the mode of a specific fiber, define the characteristics of that fiber in the Optional Launch Data. By default, the Launch Type is set to Slab Mode or Fiber Mode for 2D or 3D simulations respectively. Gaussian The input field is a Gaussian function, defined as

f ( x, y , z 0 ) = e

x2 a2

y2 b2

where a=w/2, b=h/2, and w and h are either the 1/e width/height of the guassian, which are set to the input waveguide or the values in the Width/Height fields described below. Rectangle The input field is a rectangular step function of unit value, and with a width and/or height of the input waveguide or the values in the Width/Height field described below. MultiMode This is a specialized option useful for studying highly multimode waveguides. The input field is a superposition of all slab (2D) or fiber (3D) waveguide modes supported by the input waveguide, with equal

40 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

power in each mode, and a random phase for each mode. The set of random phases is determined by a pseudo-random number generator, and does not vary from run to run; however, the user can select different sets of random phases through the Random Set field described below. The set of modes that is launched may be controlled through the Launch Mode field described below.
Tilt

This field selects whether or not the input optical field will be tilted so as to enter the circuit at an angle. By default, this option is set to No, and the optical field is launched along the Z axis with no angle. If this option is set to Yes, the optical wavefront is tilted to an angle equal to that of the input waveguide, unless it is overridden by the value in the Phi and Theta fields described in Section 5.C.4.
Mode

If the Launch Type is set to Slab Mode, this integer input field selects the mode number, counting from 0 which represents the fundamental mode and is the default. If the Launch Type is set to Multimode, this is a text input field which selects the mode set. The syntax is "low-high:step". The default is "*" which represents all modes. For example, "0-5" selects the first 6 modes, "*:2" selects all even modes, and "1-:2" selects all odd modes. In 3D, Slab Mode becomes Fiber Mode, and this field corresponds to the azimuthal mode number, m, of the corresponding LPmn fiber mode. Positive m corresponds to a cos(m)dependence and negative m corresponds to a sin(m) dependence.
Mode Radial

If the Launch Type is set to Fiber Mode, this integer input field selects the radial mode number, n, of the corresponding LPmn fiber mode.
Random Set

If the Launch Type is set to MultiMode, this integer input field selects the particular random set to be used for the random phases. The first set is numbered 0, and this is the default.
Input File (E-Major)

If the Launch Type is set to File, this text input field determines the file name for the input data corresponding to the major components of the electric field. The file format is described in Appendix B. If a 2D data file is launched into a 3D simulation it is interpreted as a radial profile (as might be obtained via the Radial FDTD option), and a corresponding 3D field distribution is automatically generated. The Mode field determines the azimuthal mode number as described above.
Input File (E-Minor)

If the Launch Type is set to File, this text input field determines the file name for the input data corresponding to the minor components of the electric field. The file format is described in Appendix B. If a 2D data file is launched into a 3D simulation it is interpreted as a radial profile (as might be obtained via the Radial FDTD option), and a corresponding 3D field distribution is automatically generated. The Mode field determines the azimuthal mode number as described above.
Normalization

This option selects how the input field is normalized. The default choice is None, which does not alter the normalization of the input field from the default values. If the Launch Type is File, FullWAVE takes the data from the file as is, otherwise FullWAVE normalizes the peak value of the field to 1. The second choice is Unit Peak, which normalizes the peak value of the field to 1 in all cases. The third choice is Unit Power, which normalizes the field such that the power in the input field is 1. This choice is useful when doing nonlinear calculations, as described in Section 7.B.
Align File

This option controls alignment of the launch field with the Pathway when the Launch Type is File (or Computed Mode). By default, when a Launch Type of File (or Computed Mode) is selected, the field represented by the file is not

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 41

automatically aligned with the Pathway, since it is assumed that the field data is coming from the result of a previous simulation, and that the coordinates should be left unchanged. This behavior can be overridden by setting the Align File field to Yes. This is useful, for example, if the data in the file is the result of a mode calculation and the launch position is not the same as the position of the waveguide used in calculating the mode. For this option to work properly, the waveguide used in calculating the mode must have its X and Y position set equal to 0.

5.C.3. Using Optional Field Profile Data


The launch data specified in Fig. 5-4 sets the parameters used to calculate the launch profile.

Figure 5-4: The portion of the Launch Parameters dialog where the Launch Data is set.

The launch data used to define the launch field such as width or index information for analytically calculated modes are defined by: Through the use of an input waveguide (or pathway) If optical pathways have been defined as described in the CAD manual, this field allows the user to select the pathway into which the optical input field will be launched. The field displays the number of the currently selected pathway, which is chosen by using the << and >> buttons to advance through the available pathways. Once a pathway has been selected, the first component in that pathway becomes what is termed the input waveguide. If no pathway is defined, the waveguide with the smallest starting Z value that lies within the simulation domain is used. If two or more waveguides fit this criteria, then the waveguide with the lowest segment number is used. In either case, several characteristics of the launch field, such as position, mode width, and input angle, are determined from the corresponding properties of the input waveguide. These characteristics may be overridden individually by entering explicit values into the Optional Launch Data portion of the dialog. By default, pathway #1 will be selected. Also, when a Launch Type of File (or Computed Mode) is selected, the field represented by the file is not automatically aligned with the Launch Pathway, but this behavior can be overridden by the Launch Align File option. Refer to that option for further discussion. By directly setting the launch data The relevant launch parameters can individually be specified so to override the default settings. These fields control optional aspects of the launch field. For all these fields, the keyword default indicates that the default value will be used. To use a custom value, simply enter the desired value in the appropriate box.
Background N

42 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

This numeric input field selects the background index for the slab waveguide mode(s) to be launched. The default value corresponds to the background index of the circuit.
Delta N

This numeric input field selects the index difference for the slab waveguide mode(s) to be launched. The default value corresponds to the global index difference of the circuit.
Phi

This numeric input field selects the input angle 5.C.4.


Theta

illustrated in Fig. 5-5, and is described in more detail in Section

This numeric input field selects the input angle illustrated in Fig. 5-5, and is described in more detail in Section 5.C.4.
Width

This numeric input field selects the lateral width along X of the optical input field to be launched. The default value corresponds to the global waveguide width.
Height

This numeric input field selects the vertical height along Y of the optical input field to be launched. The default value corresponds to the global waveguide height.
Length

This numeric input field selects the length along Z of the optical input field to be launched. This field can only be used with either an impulse or a current source, and its default value corresponds to 0.
Position X

This numeric input field selects the lateral (X) position at which the input optical field is launched. If the Launch Type is set to File, the interpretation of this field assumes that the mode in the data file is centered at 0. In effect, the value in this field corresponds to an offset of the launch file data. Please see comments under Pathway regarding the default value for this option.
Position Y

This numeric input field selects the vertical (Y) position at which the input optical field is launched (3D only). Note that if the Launch Type is set to File, the interpretation of the Position assumes that the mode in the data file is centered at 0. In effect, the value in this field corresponds to an offset of the launch file data. Please see the comments under Pathway regarding the default value for this option.
Position Z

This numeric input field selects the Z position at which the input optical field is launched. The default parameter corresponds to the Z Domain Min value.
Neff

This numeric input field selects the effective index corresponding to the propagation constant of the input light. This is required only when launching the field at an angle. The default corresponds to the actual propagation constant when the Launch Type is set to Slab Mode or Fiber Mode. When the Launch Type is File, and the data file is the result of a mode calculation, the default is to use the mode effective index stored in the file. Otherwise the default is the background index, and may need to be changed appropriately.

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 43

5.C.4. Launching at an Angle


By default, FullWAVE launches from a constant Z plane along the positive Z axis. The direction of the launch field, however, can be changed via the Phi and Theta fields in the Launch Options dialog.

Definition of Launch Angles


The launch angles are illustrated in Fig. 5-5.

Figure 5-5: Illustration of the launch angles

and .

The angle is defined as a rotation around the Y axis, and is measured from the Z axis. The angle is defined as a rotation around the X' axis and is measured from the XZ plane. oth angles are defined in degrees, default to a value of 0, and must be used with the Tilt option described in Section 5.C.2.

Possible Launch Angle Values


There is no limitation on the values of these angles. The angle Phi behaves as follows: If set to 0 the launch field will emanate from a constant Z plane along the positive Z axis If set to 90 degrees, the launch field will emanate from a constant X plane along the positive X axis, or to the right. If set to 180 degrees, the launch field will emanate from a constant Z plane along the negative Z axis, or down. If set to 270 degrees, the launch field will emanate from a constant X plane along the negative Z axis, or to the left.

For values of Phi that lie between these key values, the launch field will emanate from the plane described above closest to the actual value, and a phase front will be added to the launch field in order to achieve the desired launching angle. For example, if Phi is set to 60 degrees, the launch field will emanate from a constant X plane along the positive X axis with an appropriate phase front. The field Theta behaves in a similar fashion.

44 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

5.D. Temporal Excitation Types


In addition to the spatial excitation, a FullWAVE launch field requires a temporal excitation function gi (t ) . The type of temporal excitation that should be used will be determined by the desired results.

Fig 5-6: The portion of the Launch Parameters dialog box where temporal excitation settings are set.

5.D.1. Supported Excitation Types


FullWAVE currently supports three temporal excitation types: CW, or continuous wave, Pulse, and Impulse, and is controlled locally for each launch field by the Temporal Excitation Type field shown in Fig. 5-6. The keyword default corresponds to the global default set in the FullWAVE Simulation Parameters dialog box. For clarity, the default values of the additional temporal excitation options shown in Fig. 5-6 are discussed in the next section. These types, as well as guidelines to their appropriate use, are as follows:

CW
A CW excitation type is normally used when the steady state performance of the design. It consists of two envelope functions multiplying a sinusoidal carrier. This can be expressed as

2 g (t ) = up ( t ) down ( t ) sin ( t ) + At 2
where the wavelength is set by the Wavelength field and the factor A, which has units of m-2, produces a chirped excitation, and can be set by the field Chirp Coefficient.

Smoothly turning on a CW excitation


A CW excitation can be smoothly turned on to avoid numerical noise in a simulation. The envelope function defined as:

up ( t )

ramps up from 0 to 1 over the ramp up time, tu , set in units of cT in the Ramp/Pulse Time field. Specifically, it is

t up ( t ) = sin 2 tu
for 0 t < tr and is set to 1 for times after t r .

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 45

Smoothly shutting off a CW excitation


A CW excitation can be smoothly shut off using the envelope function the Shutoff Time t s specified. Specifically, it is defined as:

down ( t ) , This function ramps down from 1 to 0

over the ramp down time, td , set in units of cT in the Ramp Off Time field so that the source is completely shut off at

(t t ) up ( t ) = cos s 2 td
for ( t s td ) t < t s and is set to 1 for times prior to ( t s td ) .

Pulse
A Pulse excitation is normally used when the frequency response of the design is desired. It consists of a Gaussian envelope function multiplying a sinusoidal carrier. This can be expressed as
2 t 2 g (t ) = exp td sin ( t ) + At 2

where the wavelength

is set by the Wavelength field. The Gaussian envelope function is defined such that is the

pulse time in units of cT set in the Ramp/Pulse Time field, and t d is the Delay Time in units of , and therefore unitless. The factor A, which has units of m-2, produces a chirped excitation, and can be set by the field Chirp Coefficient. The excitation can be shut off at a desired time using the Shutoff Time, which represents the total time from t=0 that the excitation is active. To change the hyperbolic secant (sech) time envelope for the launch pulse which is useful for setting the launch field for nonlinear soliton-forming simulations. This can be done by setting the variable fdtd_excitation to TIME_ENVELOPE_SECH.

Impulse
An Impulse excitation is normally only used for a cavity mode calculation, and results in predominantly forward traveling waves. It has a different meaning than the other excitation types: It sets an initial field pattern at t=0, then lets it propagate for t>0 without any further driving of the field. This can be expressed as:

L (r, t ) = f ( x, y ) h ( z ) ( t0 )
The initial field pattern for Impulse excitation is determined as follows: Spatial Dependence in X and Y: The spatial distribution in X and Y, f ( x, y ) , is given by the normal spatial launch field as described in Section 5.C. Spatial Dependence in Z: The Z-dependence is given by the function h ( z ) , which is by default defined as the following deltafunction:

h ( z ) = ( z0 )

46 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

where z0 is the Z launch position. This default can be changed and given a Lorentzian profile by entering a non-zero value of the launch Length. In this case, h ( z ) is defined as:

h( z) = e
where l is the Length. Time Dependence:

z z0 l

The time dependence is given by a delta-function

( z0 )

centered at the Z launch position. An Impulse

excitation does not have a specific driving function g ( t ) in time, and is simply allowed to radiate/decay in time. The launch can be rotated through the use of the Phi and Theta fields described above. Also, for this to work properly, the Launch Neff in the Launch Parameters window must be set equal to the index at the center of the launch field. In most cases FullWAVE will be able to determine this, but in some it will not and so this parameters should be set explicitly. When using the Impulse option, the wavelength has no direct bearing on the excitation or the simulation. However, if any other settings, such as a Grid Size or Time Step for example, have been set to be a formula dependent on the global wavelength free_space_wavelength or lambda, then there will of course be an indirect effect on the simulation when changing the Free Space Wavelength setting in the Global Settings dialog.

Custom Time Envelopes


FullWAVE allows for a custom time envelope to be defined. The feature currently applies globally to all launch fields. To use this option, set fdtd_excitation_envelope to TIME_ENVELOPE_USER. The desired time envelope can then be specified by setting fdtd_user_envelope = <function of t>. Currently, the symbol t must be defined in the symbol table and not be otherwise used. Note that this option sets the specified time envelope on top of the normal carrier. For example, an unending ramp time envelope for the launch can be achieved by setting fdtd_user_envelope = t in the symbol table. Note that this feature can be applied to both CW and Pulsed excitation types, however even by setting the same envelope these two excitations differ in the choice of the phase of the sinusoidal carrier (CW phase is zero at t = 0, pulse is zero at t = fdtd_delay_time). In addition, CW and Pulse launch differ in the defaults for certain analysis options. It is recommended that this option be used with the option fdtd_stm_output = 1 which allows the time sequence of the launch source. The source will be output in a file <prefix>.stm.

5.D.2. Setting Optional Temporal Options


The additional temporal excitation settings shown in Fig. 5-5 allow control over the temporal excitation types. Their exact usage is described in the previous section, and they all are not enabled for each Temporal Excitation Type. Additionally, the global default value of several of these fields is set via the fields in the FullWAVE Simulation Parameters dialog box.
Wavelength

This field sets the wavelength at which the excitation is driven. Its default value corresponds to the Free Space Wavelength setting in the Global Settings dialog box, and is given in units of cT [m].
Ramp/Pulse Time

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 47

This field sets the ramp up time for a CW simulation or the pulse time for a Pulsed Simulation. It defaults to a value equal to the pre-defined variable lambda, which is set equal to the Free Space Wavelength, and is given in units of cT [m].
Ramp Off Time

This field sets the ramp off time for a CW simulation. This parameter has a default value of 0 and is defined in units of cT.
Delay Time

This field sets the delay time for both a Pulsed or Impulse excitation type. Its default value is 4, and is in units of the value given in the Ramp/Pulse Time field. This option has no effect for a CW or Impulse launch.
Shutoff Time

This field sets the time at which a CW or Pulsed excitation should be turned off. Its default value is infinite, therefore disabling the shutdown of the excitation. It is given in units cT, and, for the CW case, includes the time specified in the Ramp Off Time field.
Chirp Coefficient

This field sets the chirp coefficient for a CW or Pulsed simulation. Its units are m -2].

5.E. Polarization Manipulation


Once a launch field has been defined, it is possible to set the polarization of that launch field. First, we will discuss the default polarization behavior of a launch field. Then, we will discuss the available polarization manipulations through the use of Jones Matrices.

5.E.1. Default Behavior


By default, the polarization of the launch field is linear and is given by the Polarization and Waveguide Dimension selected in the Global Settings dialog. These defaults are: In 2D, TE is defined to be primarily along Y, and TM primarily along X. In 3D, this switches and so TE is defined to be primarily along X and TM is defined to be primarily along Y.

5.E.2. Overriding the Defaults


Assuming a Waveguide Dimension and Polarization option in the Global Settings dialog have been chosen, the default polarization can be manipulated. There are two polarization manipulation options: Transformer Mode This is the default polarization mode, which transforms the launch field via a Jones Matrix. The polarization of the unmodified launch field therefore affects the final polarization. It uses both built-in and custom Jones Matrices. Controller Mode This polarization mode forces the polarization to a set value while conserving the norm of the field values and therefore the input power. The polarization of the unmodified launch field does not effect the final polarization. The polarization mode is set via the Launch Polarizer dialog box shown in Fig. 5-7.

48 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

Figure 5-7: The Launch Polarizer dialog where the polarization settings of each launch field are set.

Transformer Mode
This default polarization mode allows the user to define a Jones Matrix to modify the polarization of the launch field. The transformation can be expressed as:

u x ' T11 T12 u x = u y ' T21 T22 u y


To place the Launch Polarizer in Transformer Mode, set the Polarizer Mode to Transformer. The type of polarization manipulation is set via the Launch Polarizer menu item: Its possible values are: None This choice disables the Launch Polarizer, and therefore results in the default behavior discussed above. Custom This choice allows the user to define a custom 2x2 complex-valued Jones Matrix in the appropriate fields. Linear This choice enables a linear polarization at a specified angle. The Jones Matrix is therefore real, and can be expressed as

cos 2 T= cos sin


where

cos sin sin 2

is the angle specified in the Angle field.

Circular Left

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 49

This choice enables a left circularly polarized field. The Jones Matrix is therefore

1 1 i T= 2i 1
Circular Right This choice enables a right circularly polarized field. The Jones Matrix is therefore

1 1 i T= 2 i 1
Rotation This choice performs a simple rotation based on the value specified in the Angle field. The Jones Matrix is therefore real valued and can be expressed as:

cos T= sin
Controller Mode

sin cos

This polarization mode allows the user to set the polarization of the launch field directly while preserving the input power. This is achieved mathematically as:

ux ' = uy '
where

1 keix 2 2 ux + u y kei (x + )

is the actual phase of the field u x , k is the power splitting parameter, and is the desired phase difference

between the fields u x and u y , The power splitting parameter k is defined as:

k=
where is the azimuth and

1 1 cos ( 2 ) cos ( 2 ) 2

is the ellipticity. The desired phase difference is defined as:

1 2 = arcsin 2 k (1 k )
Both the azimuth and ellipticity of the desired polarization of the launch field can be set. The type of polarization manipulation is set via the Launch Polarizer menu item. Its possible values are: None This choice disables the Launch Polarizer, and therefore results in the default behavior discussed above. Custom This choice allows the user to define arbitrary values of the Azimuth and Ellipticity in the appropriate fields. Linear

50 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

This choice sets the polarization to linear at an angle set by the Azimuth field. The ellipticity is forced to equal zero. Circular Left This choice sets the polarization to be left circular. The azimuth is forced to 45 degrees resulting in k =0.5 and =90. The azimuth setting has no effect and is disabled. Circular Right This choice sets the polarization to be right circular. The azimuth is forced to -45 degrees resulting in k =0.5 and =-90. The azimuth setting has no effect and is disabled.

5.F. Launching Multiple Fields


As noted above, the launch dialog shown in Fig. 5-1 allows the user to define multiple launch fields which can be linearly combined with different powers and phases. This multiple launch feature is controlled by several fields at the top of the dialog. The Launch Field field indicates the number of the individual launch field currently being edited, and initially shows the value 1, corresponding to the default single launch field. To add one or more additional launch fields, click on the New button, and select the characteristic of that individual field in the remaining fields of the launch dialog as documented above. Use the << and >> buttons below the Launch Field field to switch between different individual fields to change their characteristics. To delete an individual launch field, click on the Delete button. At least one launch field must be defined, so the program will not allow deletion of launch field #1 if it is the only launch field. When performing a simulation, the individual launch fields are calculated and linearly combined to create the actual launch field that is used to initialize the simulation as described in Section 5.A. The coefficients used in performing the linear combination, the power and the phase, are determined from the Power and Phase fields in the upper right of the dialog respectively. It is essential to note that when interpreting the power, the setting of the Normalization field plays a critical role. If two individual launch fields are combined without first being normalized to Unit Power, the values in the Power field will not in general reflect the actual relative power unless the individual fields have the same amplitude and shape.

5.G. Special Source Properties


BandSOLVE, RSofts design and simulation tool for photonic band structures, can use the FullWAVE simulation engine. To accommodate this, FullWAVE has a launch option that allows BandSOLVE to work correctly. This option is set in the FDTD Advanced Parameters dialog which can be accessed via the Advanced button in the FullWAVE Simulation Parameters dialog.
Repeat in Each Unit Cell (non-cubics)

This option periodically repeats the launch field within a structure. When BandSOLVE is used with a FullWAVE engine, a non-cubic domain must be made cubic by simulating more than one unit cell. Thus, the source must be repeated in order to preserve the periodicity. This option is automatically set when using BandSOLVE.

5.H. Launching a Plane Wave


Though it is possible to launch a plane wave in FullWAVE, there are several things to consider. Since FullWAVE uses a finite spatial domain, but plane waves are inherently infinite, it is important to understand how a launch plane behaves at the domain boundaries.

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 51

The basic way to launch a plane wave is to use a Rectangle launch type that is wider than the simulation domain. If the structure is periodic, then it is recommended that you use periodic boundary conditions. If not, then you should use PML, symmetric, or asymmetric boundaries.

5.H.1. Using Periodic Boundary Conditions


The structure must be periodic to use periodic boundary conditions as this type of excitation can excite transverse lattice modes. For a discussion of periodic boundary conditions, see Section 7.C.

Non-tilted
A non-tilted plane wave with periodic boundary conditions is the easiest to create. Simply enable periodic boundary conditions and create a Rectangle launch type that is wider than the simulation domain.

Tilted
To launch a plane wave at an angle, the appropriate launch angles will need to be set and a phase difference must be given across the periodic boundaries. Using the Auto option for ka/pi Value in the Advanced Parameters dialog will attempt to set the ka/pi values appropriately based on the following vector relation:

k = k0 n0 x ( Dx sin cos ) + y ( Dy sin ) + z ( Dz cos cos )


where k0 is the free space wavelength in units of k, n0 is the index at the launch plane, and Dx, Dy, and Dz are the domain sizes along each coordinate. To use this option, you must enables the Use Complex Implementation in the Advanced Parameters dialog to use the complex valued field in the simulation. See Section 7.E.3. for more details.

5.H.2. Using PML Boundary Conditions


For non-periodic structures, PML boundaries usually need to be used. The basic consideration for PML boundaries is that while the field is normally attenuated within the PML region, the plane wave should not be. In order to meet this requirement, the field is launched in the PML by default. This is controlled by the variable fdtd_launch_pml. Its values are: Value Description
0 1 2

Truncates the field and does not launch in the PML. This was the default in versions prior to 4.0. Launches the field unchanged in the PML, which results in a good nontilted plane wave. This is the default value for this parameter. Automatically calculates the required gain and attenuation in the PML for proper launching. Since this applies gain, this option is off by default for safety. The variable fdtd_launch_pml_factor adjusts the gain/loss by the specified factor (default=1), in case the predicted amount is not ideal.

5.H.3 Other Options


These two additional options allow for multiple planes at right angles to each other to be coupled together in phase to create a plane wave emanating from the interior of the domain: This behavior of these features are subject to change in future releases.

52 Chapter 5: Excitation Types

FullWAVE 6.0 User Guide

Setting the primary direction of a launch:


The primary direction of the launch plane can be set via the variables fdtd_launch_direction or fdtd_launch_direction_# for a specific launch field #. Normally, the launch angles determine the primary direction. For shallow angles, the primary direction is +Z. As the angles exceed +/- 45, 90, etc., the primary direction changes. The values +/- 1, 2, 3 correspond to +/- X,Y,Z. A value of 0 disables this feature and uses the default direction.

Setting the phase reference:


The variable launch_phase_ref is used to control the phase reference for the Rectangle launch type (e.g. a plane wave). The default value of 0 references the phase to the launch position. A value of 1 allows the phase to be referenced to the coordinate origin.

FullWAVE 6.0 User Guide

Chapter 5: Excitation Types 53

Chapter 6: Monitoring and Analysis of Simulation Results

The FullWAVE simulation program calculates the electromagnetic field as a function of time and space for a given index structure in response to a given excitation, and can display this field at selected time intervals as described in the previous chapter. However, it is frequently useful to record this field information as a function of time or frequency for post processing and analysis purposes. In order to meet this need, we will introduce the concept of time monitors in FullWAVE. For users who are familiar with BeamPROP, they are the time-domain analogy of BeamPROP monitors. A time monitor can record both field values and common electromagnetic quantities such as power or energy density as a function of time of frequency which can then be used for post-processing purposes. This chapter will first discuss the types of output that a FullWAVE time monitor can produce, then the steps for creating a time monitor, and finally a detailed description of the usage of time monitors. The last few sections will discuss several example monitor configurations.

6.A. Types of Output


A FullWAVE time monitor can produce two main types of output as well as perform a DFT/FFT analysis of these output types.

Temporal Output
The temporal output types are the most commonly used output types in FullWAVE. This type of output consists of a single value for a given quantity recorded as a function of time. This includes measurements of one or more field components at a single fixed point, power flow through the monitor domain, energy density in the monitor domain, or the result of an overlap integral. It can produce a basic summary of the simulation results as a function of time. In addition to being saved to disk, temporal output is displayed in the lower portion of the FullWAVE simulation window during a simulation.

Spatial Output
In addition to time monitor output, a FullWAVE time monitor can also produce spatial output. Spatial output consists of measurements which are recorded as a function of space at fixed values of time. This includes measurements of one or more field components, the amplitude of the pointing vector, energy density, or power flow along a specified axis, all as a function of space. Spatial output options require much more disk storage space than time monitor output, but are sometimes necessary in order to obtain desired data.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 55

Frequency Output
FullWAVE time monitors can perform a frequency analysis in order to obtain the spectral characteristics of a structure. Both DFT and FFT based algorithms can be used.

FFT Analysis
A FFT analysis can be performed on only temporal output, and is calculated at the end of a simulation. This also allows the user to study the spectral characteristics of the structure over a range of wavelength/frequency values.

DFT Analysis
A DFT analysis can be performed on both temporal output and spatial output at either one frequency or over a range of frequencies. The DFT is calculated as the simulation progresses. This allows the user to study the spectral characteristics of a structure at specific wavelength/frequency values.

6.B. Creating Time Monitors


Time monitors are added to a design file by selecting the Time Monitor drawing mode form the left toolbar in the CAD, or by selecting Options/Insert/Time Monitor from the menu bar in the CAD program. The Time Monitor Properties dialog box will appear as shown in Fig. 6-1.

Figure 6-1: The time monitor dialog which is used to define time monitors for analysis.

The time monitor properties window contains several regions, each of which will be discussed in more detail in the following sections.

6.B.1. Geometric Properties


A time monitor measures a quantity of interest at either a single point or over a specified domain as a function of time. The domain of the monitor is defined as the portion of space which the monitor occupies, and is important for some of

56 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

the time output options and all of the spatial output options. This section will cover the definition of a time monitor domain, or geometry.

Description of Time Monitor Geometry


The geometric parameters of a FullWAVE time monitor are defined by a center point (X0,Y0,Z0), values for the width w, height h, and length l, and two tilt angles and . These parameters control the position, size, orientation, and therefore the domain of a time monitor. Figure 6-2 shows the definition of the width, height, and length of a time monitor, and Fig. 6-3 shows the definition of the tilt angles and .

Figure 6-2: Illustration of how the time monitor width, height, and length are defined. Since this monitor is unrotated, the Z and Z' axes are the same.

Note that the width, height, and length of a monitor are always made relative to the normal Z' axis, even if the monitor is rotated as shown in Fig. 6-3.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 57

Figure 6-3: Illustration of how the monitor tilt angles

and . are defined. Though not necessary, it is easier to understand these

angles if the rotation is performed first, and then the rotation. Part a) illustrates shows the rotation angle , which is defined as a rotation around the Y axis and is measured from the Z axis. The temporary axis Ztemp is shown for illustration purposes. Part b) illustrates the rotation angle , which is defined as a rotation around the X' axis and is measured from the X'Z plane. Note that when

is 0, the X' axis is the same as the X axis, and when is 0, the temporary axis Ztemp is the same as the Z' axis.

As indicated by Fig. 6-2 and Fig. 6-3, each monitor has its own local coordinate system (X',Y',Z'). This local coordinate system is defined for the values:

w w X ' , 2 2 h h Y ' , 2 2 l l Z ' , 2 2


where w, h, and l are the width, height, and length of the monitor domain. These local coordinates are related to the global coordinate system for the design file by the following transformation:

0 X ' 1 Y ' = 0 cos Z ' 0 sin

cos sin 0 cos sin 0

0 sin X X 0 1 0 Y Y0 0 cos Z Z 0

In the 2D case, the above relation is only defined for (X,Z) and the value of is assumed to be 0.

Specifying Time Monitor Position


The region of the Time Monitor Properties dialog box shown in Fig. 6-4 defines the time monitors center point (X0,Y0,Z0). This is done by defining the center point in either actual coordinates, or in reference to other segments in the design file. This process is identical to the definition of waveguide segments. Please refer to Chapter 5 of the CAD manual for further information.

58 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

Figure 6-4: The portion of the Time Monitor Properties dialog box which controls the time monitor position, or center point.

Specifying Time Monitor Size & Orientation


The region of the Time Monitor Properties dialog box shown in Fig. 6-5 defines the size and orientation of the time monitor. The values entered in these fields correspond to the quantities labeled in Fig. 6-2 and Fig. 6-3.

Figure 6-5: The portion of the Time Monitor Properties dialog box which controls the time monitor size and orientation. Width

This field sets the width, or length along the X' axis of the monitor, and is in units of m. The width can be set to an infinite value via the keyword inf.
Height

This field sets the height, or length along the Y' axis, of the monitor, and is in units of m. The height can be set to an infinite value via the keyword inf.
Length

This field sets the length, or length along Z' axis, of the monitor, and is in units of m. The length can be set to an infinite value via the keyword inf.
CAD Display

These fields set the X and Z display sizes of the time monitor respectively. These display sizes are for display purposes only, and will not effect other monitor properties or the simulation results. The default values for these fields correspond to the values given in Width and/or Height, and are in units of m.
Phi

This field sets the angle illustrated in Fig. 6-3 and is defined as a rotation around the Y axis, and is measured from the Z axis. This parameters is defined in degrees.
Theta

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 59

This field sets the angle illustrated in Fig. 6-3 and is defined as a rotation around the X' axis, and is measured from the X'Z plane. Note that when Phi is 0, the X' axis is the same as the X axis. This parameter is defined in degrees, and is only used in 3D simulations.

6.B.2. Temporal Output Types


This region of the Time Monitor Properties dialog box defines the type of temporal output desired. The data output from these data types will be saved in a file <prefix>.tmn, with a corresponding WinPLOT file <prefix>.ptm. Also, the results from these output types will be displayed in the lower portion of the simulation window during a FullWAVE simulation. The time output is measured at time intervals given by the Monitor Time specified in the FullWAVE Simulation Parameters dialog box.

Figure 6-6: The portion of the Time Monitor Properties dialog box which sets the desired time output types.

The temporal output types shown in Fig. 6-6 can be divided into two main groups:

Field Values at a Single Point


These options can record any of the field components at the center of the time monitor as a function of time. For example, the option Ex will return Ex(X0,Y0,Z0,t) where (X0,Y0,Z0) is the center of the time monitor. The Default Field setting automatically chooses an appropriate field based on the number of dimensions and the polarization setting of the design file. In 2D, the default field is Ey for TE and Hy for TM. In 3D, the default field is Ex for TE and Ey for TM. In 2D, only 4 components of the field are simulated and so only these field components can be output. The 4 fields used depend on the polarization choice for the simulation.

Integral Results
These options can record several typical measurements as a function of time. These quantities are: Power This option records the power flow through the monitor domain as a function of time. The integral used to evaluate this quantity is

Re E ( t ) H* ( t ) dA A S (t ) = S0
where E and H are the electric and magnetic fields and S0 is the launch power. The integral is evaluated over an area A. This definition of this area depends on the monitor Length (measured along the Z' direction):

60 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

Value of Length
0 non-zero

Definition of area A
The monitor measures the power flow along the Z' direction at the plane (X',Y',Z'=0). The monitor measures the power flow through all surfaces of the monitor volume. This can be useful for measuring the power loss in optical cavities when solving for the quality factor Q.

By default, the launch power S0 is the power of the first launch field. To change the launch field used to compute S0, set the variable fdtd_p0_index to the number of the desired launch field. To effectively remove all normalization (i.e. set S0, to 1), set fdtd_p0_index = 0, but note that this is not recommended unless it is needed (i.e. during nonlinear calculations) since the monitor results cannot be interpreted in a standard way. E Density This option records the electric field energy density. The integral used to evaluate this quantity is

S (t ) =

2 1 ( r ') E ( t ) dV 2V

where E is the electric field, is the spatially dependent permittivity, and V is the volume of the time monitor. This result is normalized by the input power to enable use with symmetric boundary conditions. To disable this normalization, set fdtd_density_normalization to 0. H Density This option records the magnetic field energy density. The integral used to evaluate this quantity is

S (t ) =

2 1 H ( t ) dV 2V

where H is the magnetic field, is assumed to be 1, and V is the volume of the time monitor. This result is normalized by the input power to enable use with symmetric boundary conditions. To disable this normalization, set fdtd_density_normalization to 0. T Density This option records the total energy density, and is equivalent to the sum of a E Density and H Density monitor defined over the same volume. Overlap This time monitor option computes the overlap integral between the propagating field at the location of the monitor, P ( t ) , and a test field 0 ,. This test field can be either the Launch Field or Data Files for each component. The test field is set in the Overlap Field Data dialog shown in Fig. 6-7 which can be opened by clicking the Overlap Data button.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 61

Figure 6-7: The Overlap Field Data dialog.

The overlap integral is calculated by translating the test field to the center location of the monitor and rotating it so that it lies in the X'Y' plane of the local monitor coordinates described by the monitor tilt angles Phi and Theta and illustrated in Fig. 6-3 The formula for this overlap integral is
+

S (t ) =

( t ) ( t ) dA
P
* 0 0

2 0

dA

where P is the propagating field in the X'Y' plane of the time monitor, 0 is the test field, and the area A is defined as the entire X'Y' plane. The Width, Height, and Length settings have no effect for an Overlap monitor. Please note that when data files are used to define the test field, it is important to make sure that the correct components are defined. The components defined in the Overlap Field Data dialog are in the local monitor coordinates which do not account for monitor rotation and/or launch polarization options.

Additional Settings
Once the time monitor type has been chosen, there are two options which apply to all types of time output.
Time Average

This option indicates that results from the time monitor should be averaged over a moving window equal to one cycle of the excitation and multiplied by 2 to more easily compare with peak values. This is mathematically expressed as

Qavg (t ) =

2 T0

t T0

S (t ) dt

62 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

where S (t ) is the non-averaged monitor output as described above, and T0 is the period over which the average is taken, and is equal to the Free Space Wavelength specified in the Global Settings dialog box. Note that for power monitors, to account for power flow in opposite directions, the modulus of S (t ) is not taken. A time averaged response is useful when studying steady state output. It is particularly useful when the user performs a CW parameter scan (see BeamPROP manual), since the final time monitor values are plotted versus the scanned variable(s) and without time averaging the plot would show the monitor value at an arbitrary phase which generally would be useless. The Time Average field in the dialog has three settings: No, Yes, and Auto. The Yes/No settings enable/disable time averaging as expected, while the Auto option enables it for CW excitation and disables it for pulsed excitation. This feature is useful since pulsed excitation is usually used to obtain spectral information as discussed below, which requires time averaging to be disabled. The Auto option avoids the user from having to toggle the time averaging setting when switching between CW and pulsed excitation.
Monitor Format

This field sets the desired format of monitor output.

6.B.3. Spatial Output Types


This portion of the Time Monitor Properties dialog box defines the types of spatial output desired. The data output from these data types will be saved in an individual file for each output option selected as well as each slice in time. The spatial output is measured at time intervals given by the Slice Timespecified in the FullWAVE Simulation Parameters dialog box.

Figure 6-8: The portion of the Time Monitor Properties dialog box which sets the desired spatial output types.

The spatial output types shown in Fig. 6-8 can be divided into two main groups:

Field Output over Time Monitor Domain


These options can record any of the field components over the time monitor domain at specific points in time. For example, choosing the option Ex will return EX(r',tS). where r'=(X',Y',Z') varies over the entire time monitor domain as shown in Fig. 6-2 and the values of tS are fixed multiples of the Slice Time given in the FullWAVE Simulation Parameters window. The grid sizes used to store data can be increased in order to conserve system memory. More details on this can be found in Section 6.B.5. The Default Field setting automatically chooses an appropriate field based on the number of dimensions and the polarization setting of the design file. In 2D, the default field is Ey for TE and Hy for TM. In 3D, the default field is Ex for TE and Ey for TM. In 2D, only 4 components of the field are simulated and so only these field components can be output. The fields used depend on the polarization choice for the simulation. In 3D, the data is output in a VTK format which can be opened in RSofts DataBROWSER.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 63

Other Output
These options can record several electromagnetic quantities of interest as a function of space at specific points in time. These quantities are:
Power

This type of output records the power flow along the Z' direction as defined in Fig. 6-2. This is equivalent to the Z' component of the Poynting Vector. The expression used to evaluate this quantity is

S ( r ', ts ) = Re E ( r ', ts ) H* ( r ', ts )

z'

where E and H are the electric and magnetic fields and r' is the spatial coordinate.
E Density

This type of output records the electric field density as a function of space at specific times. The expression used to evaluate this quantity is

S ( r ', ts ) = ( r ' ) E ( r ', ts )

where E is the electric field, is the spatial dependent index, and r' is the spatial coordinate.
H Density

This type of output records the magnetic field density as a function of space at specific times. The expression used to evaluate this quantity is

S ( r ', ts ) = H ( r ', ts )

where H is the magnetic field, is assumed to be 1, and r' is the spatial coordinate.
T Density

This type of output records the total field density as a function of space at specific times. This is equivalent to the sum of a E Density and H Density spatial monitor.
Poynting Vector

This type of output records the amplitude of the Poynting Vector as a function of space at specific times. The formula for this quantity is

S ( r ', ts ) = Re [ S x ] + Re S y + Re [ S z ]
2 2

where S is the Poynting Vector defined by

S ( r ', ts ) = E ( r ', ts ) H* ( r ', ts )


and E and H are the electric and magnetic fields and r' is the spatial coordinate.

Additional Settings
Once the desired spatial output options have been set, there is one option which applies to all types of spatial output.
Spatial Format

This field sets the desired format of spatial output.

64 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

6.B.4. Frequency Output


FullWAVE time monitors can be used to obtain spectral information about a structure through the use of frequency output. A detailed discussion of these output options can be found in Section 6.C.

6.B.5. Storage Parameters


This region of the Time Monitor Properties dialog box controls several storage-related parameters.
Storage Grid

These three fields allow the user to specify an alternate grid to be used for spatial output in order to conserve the usage of system memory. The default values for these parameters correspond to the grid sizes set in the FullWAVE Simulation Parameters dialog box. These grid sizes are defined for the unprimed global coordinate system, not the primed local coordinate system.

Figure 6-9: The portion of the Time Monitor Properties dialog box which sets the desired storage parameters.

6.B.6. Additional Settings


A time monitor has the following additional settings:
Display Color

This sets the display color used to show the time monitor in the drawing window.
Global Monitor Settings

The Output button opens the Output Options dialog described in Section 4.E where global monitor output options can be set.

6.C. Frequency Analysis


FullWAVE time monitors measure certain electromagnetic parameters in the time domain; however, many useful measurements are based in the frequency domain. FullWAVE includes two types of frequency analysis in order to make these measurements. Both types of frequency analysis can both be expressed as a Fourier sum which is based on a discretized Fourier Transform evaluated over a finite domain. The main difference between the two methods is the way in which they are calculated. The Fourier sum evaluated is:

( r ', ) = ( r ', t ) ei t dt
t =0

ts

where

( r ',T ) is the data produced by the time monitor, ts is the simulation stop time, and is the frequency. The normalization factor is chosen such that the length of the time window will not change the value of the integral, and
depends on the Excitation type chosen.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 65

The frequency output options are: None This option disables any frequency output for the time monitor. FFT This is the default value for this parameter. The Fourier sum is calculated at the end of the simulation. The complete time response of the monitor is recorded, and the above sum can be regarded as post-processing. This type of frequency output is optimized for simulation speed.

An FFT is not always calculated even though this is the default value for frequency analysis. Please see the FFT Output section below for more information. DFT The Fourier sum is calculated during the simulation at selected frequency values. Each additional term in the sum is calculated at each time indicated by Monitor Time for time output and Slice Time for spatial output. This type of frequency output is optimized to minimize memory usage.

The names FFT and DFT are somewhat of misnomers, as both methods are in fact discrete. However, we have used these names in order to be consistent with existing nomenclature in FDTD literature.

Figure 6-10: The portion of the Time Monitor Properties dialog box which sets the desired frequency output.

The frequency output type for each monitor is controlled locally for each monitor, via the dialog shown in Fig. 6-10, as well as globally for FFT output via the Output Options discussed in Section 4.E. The following sections discuss the usage and associated options of the FFT/DFT selections above.

6.C.1. FFT Output


The FFT frequency analysis option in FullWAVE indicates that the Fourier sum should be evaluated on the time response of a system recorded by a time monitor after a simulation has completed. The options related to an FFT calculation are separately for each time monitor via the portion of the time monitor properties dialog box shown in Fig. 6-11.

Figure 6-11: The portion of the Time Monitor Properties dialog box which sets the desired FFT output options.

An FFT analysis can only be performed on temporal output. It is NOT possible to take the FFT of spatial output. One option controls the type of output created:
Enable for all types of monitors

This checkbox indicates whether FFT analysis should be performed on power and energy density monitors. This type of output is disabled by default to avoid a potentially memory intensive calculation. See the section Memory Intensive FFT Output below for more details.

66 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

How to enable FFT Output


The default behavior for FFT output is: FFT output is disabled for a CW Excitation type. FFT output is enabled for any other Excitation type.

This is accomplished by first setting the Frequency Analysis type to FFT as noted in the previous section. Then, the Wavelength Monitor option in the FDTD Output Options dialog box is set if a CW launch is not chosen as discussed in Section 4.E. Of course, the user can force a FFT calculation by manually setting the desired global FFT output option in the FDTD Output Options dialog, and making sure all desired monitors are set to produce FFT output. Likewise, the user can disable a FFT calculation locally for each monitor by setting the Frequency Analysis to None, or globally by setting the desired global FFT output options in the FDTD Output Options dialog box. The time response of the FFT monitor will be displayed in the simulation window during a simulation.

FFT Output Files


For most cases, frequency output will be contained in a data file named <prefix>.fmn, with a corresponding WinPLOT command file <prefix>.pfm. Wavelength output will be contained in a data file named <prefix>.wmn, with a corresponding WinPLOT command file <prefix>.pmn. For exceptions to this rule, please see Appendix B.

Memory Intensive FFT Output


The FFT analysis of a time monitor type of Power or Energy Density require additional memory in order to obtain a physical result. To avoid unneeded memory usage, these types of output are disabled by default. To enable this type of analysis, check the Enable for all monitor types box described above. This behavior has changed in version 2.0f; please contact RSoft with any questions. While a FFT analysis of these monitor types is possible, it may be more economical to use a DFT analysis for the frequency range of interest instead of using the memory intensive FFT analysis. These types of output require additional memory because the entire time response of the monitor is needed before the appropriate time monitor integral shown in Section 6.B.2. Additionally, the larger the time monitor domain or the larger the number of time steps in the simulation, the more memory will be required.

6.C.2. DFT Output


The DFT frequency analysis option in FullWAVE indicates that additional terms in the Fourier sum should be continuously evaluated based on the current time response of a system recorded by a time monitor during a simulation. This process is done for each requested frequency value. The options related to a DFT calculation are separately for each time monitor via the portion of the time monitor properties dialog box shown in Fig. 6-12.

Figure 6-12: The portion of the Time Monitor Properties dialog box which sets the desired DFT output options.

The time response of a DFT monitor will neither be displayed in the simulation window during a simulation or saved to file.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 67

Specifying Desired Frequencies


The DFT analysis is performed over a selected range of frequencies. The default value for this range depends on the Excitation type chosen: CW Launch The default range corresponds to a single frequency equal to the Free Space Wavelength set in the Global Settings dialog with a frequency spacing of 0. Please see the next section for more information on using a DFT with a CW launch. Other Launch Types The default range is defined to be centered at the value of the Free Space Wavelength, has a width equal to the width of the pulse width of the launch, and has a frequency spacing such that 32 points are used. For more information on the width of a launch pulse, please see Section 5.D.1. The default frequency range can be changed via the options shown in Fig. 6-10. All frequencies specified in these fields are given in units of m-1, or f/c where f is the frequency in Hertz and c is the speed of light in vacuum. The following are the DFT related fields shown in Fig. 6-12:
Starting Frequency

This sets the starting frequency if the user is interested in a range of frequencies. The default value is discussed above. Its units are in m-1.
Ending Frequency

This sets the ending frequency if the user is interested in a range of frequencies. The default value is discussed above. Its units are in m-1.
Frequency Spacing

This sets the frequency spacing used to determine the frequencies between the Starting Frequency and Ending Frequency at which a DFT will be calculated. The default value is discussed above.

Using DFT Output for Steady-State Analysis


It may not be readily apparent why frequency analysis can be used in a simulation where a CW excitation drives the fields at one frequency. However, a DFT calculated at the driving frequency is a very efficient way to measure field/power distribution in steady-state, and can be thought of as a type of time average. It can also be used to output data files to be used for a BeamPROP/BPM simulation. It is most efficient to start the DFT calculation after the system has reached steady-state, as it is not necessary to include the transient effects present before steady-state. To facilitate this for a CW Excitation type, a DFT analysis is automatically calculated over the last period of the simulation at the default frequency specified in the Free Space Wavelength field, and not the complete time window. This type of output is especially useful for FullWAVE users who own BeamPROP and wish to perform a hybrid simulation using both tools. DFT field output can be used as a FullWAVE output field along an arbitrary plane which can then be used as a BeamPROP launch field. This is very similar to the Steady State Field (at Fixed Z) option discussed in Section 4.E, but allows for more output options. See Section 6.E for an example of this type of calculation.

DFT Output Files


The DFT results for selected temporal output types will be saved in data files <prefix>_m#.dmn for each monitor, where m# is the monitor number, with accompanying plot file <prefix>.pdm. The DFT results for selected spatial output types will be saved in data files <prefix>_m#_f#_montype.dat for each monitor and frequency value, where _m# is the monitor number, _f# is the frequency at which the DFT was taken, and montype is the monitor type. For more information on the naming conventions and output file formats of DFT output, please see Appendix B.

68 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

6.C.3. Fourier Sampling Concerns


Understanding the effect simulation parameters have on frequency results is critical when performing a Fourier transform analysis of time based systems. Both the sampling rate and the total number of points sampled have an important effect on discrete Fourier transforms. This section outlines these consequences and will provide important guidelines when choosing these parameters.

Basic Fourier Transform Sampling Definitions


For purposes of this discussion, we will assume the following definitions: Parameter Definition t This is the sampling rate in time. It is important to note that t is set by the Monitor Time in the FullWAVE Simulation Parameters dialog, and not the Time Step. While these two parameters are equal by default, they can be defined separately. This is the total number of points sampled and is always an integer. This is the total length of time domain data, and is equal to N* t.

N T0

From these definitions, the frequency resolution f and maximum frequency bandwidth f are given by:

f =

1 1 = T0 N t 1 2 t

f =

where the factor of 2 is present because of the Nyquist Theorem. These results show that the greater the total length of time domain data T0, the smaller the frequency resolution, and the smaller the time sampling rate, the greater the frequency bandwidth.

FFT and DFT Usage Guidelines


This section provides useful tips when using FullWAVEs FFT and DFT frequency analysis options.

Using an FFT:
The fast Fourier transform, or FFT, is a simple and efficient Fourier transform algorithm. It computes the Fourier sum described in Section 6.C at the end of a simulation. When using an FFT, please note: It is important that N, the number of time domain points, be equal to a power of two. The easiest way to do this is to set the Stop Time equal to 2^P*fdtd_monitor_time where P is an integer and fdtd_monitor_time is the built-in variable for the Monitor Time. If N is not a power of two, the FFT will compute the frequency response for the closest power of two that is less than N, resulting in an inefficient calculation. Data will be output with a frequency resolution given by f defined above. To increase this resolution, the length of time data, T0, should be increased. This can simply be done by increasing the Stop Time by increasing the value of the integer P described above. In cases when the field has diminished to zero after a certain period of time, there will be no more information to be had by propagating further. The Padding Factor (2^(N-1)) option, which is documented in Section 4.E, combats this difficulty by padding the time monitor response with zeros before performing the FFT analysis to obtain higher resolution.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 69

FFTs are useful for frequency analysis of the entire frequency spectrum, and are usually less computationally intensive than a DFT for this task. However, some FFTs can be prohibitively memory intensive in which case a DFT is preferred see Section 6.C.1).

Using a DFT:
The DFT computes the Fourier sum described in Section 6.C at each simulation step at user-selected frequencies. When using a DFT, please note: Unlike an FFT, a DFT does not require that the number of time domain points N be a power of two. This allows for more flexibility in choosing a Stop Time. Since the DFT outputs data at a user-specified frequency resolution, data can be computed at a resolution finer than f. Frequencies that are between two points on the frequency grid defined by f do not contain any additional spectrum information and can be thought of as representing an averaged value of the two surrounding points on the grid defined by f. DFTs are useful for frequency analysis at a small number of frequencies, or as a replacement for memory intensive FFT-based frequency analysis of power monitors (see Section 6.C.1). DFTs can, however, be more computationally expensive than FFTs in other situations.

Important Notes About the Launch Field


It is important to note the frequencies that the temporal envelope of the excitation field excite. Only frequencies that the excitation field excites can be recorded by a time monitor. For example, a narrow pulse in the time domain will excite a larger frequency range. The excitation can also affect the simulation parameters described above. When using a narrow pulse, it may be necessary to use a smaller Time Step, which reduces the Monitor Step t, which changes the frequency resolution f and maximum frequency bandwidth &Df described above. Furthermore, it may require the grid sizes to be reduced in order to obtain accurate results. As always, a convergence study is recommended in order to ensure accurate results.

6.D. Enabling Monitor Output


When a design file that contains time monitors is run, any temporal output will be displayed in the bottom portion of the simulation window below the field display. The output will be automatically updated as the simulation progresses, and is updated at intervals defined by the Monitor
Time. The monitor update interval for display in the simulation window can be set directly via the variable fdtd_monitor_update_time. Setting this to a larger value can improve speed in some rare cases.

If an Output Prefix has been entered in the FullWAVE Simulation Parameters dialog box before running the simulation and the appropriate options are selected in the Output Options dialog box, the results from the time monitors will be saved. Depending on the type of time monitor or spatial output selected, as well as any frequency analysis options, different files will be created. See Appendix B for output file formats.

6.E. Typical Monitor Configurations


This section contains sample monitor configurations for common applications. Most users find these typical configurations and arrangements to be the most useful for most FullWAVE simulations. Of course, the user is not limited to these configurations.

70 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

Specific Field Component


This type of monitor is the simplest to create. In order to monitor the major field component during a simulation, the user need only to select a temporal output of Default Field. If a specific field component is required, simply select the desired component for temporal output. The field is measured at the center of the time monitor.

Measuring Backward Reflections


Many design problems call for an analysis of backward reflections. This may seem like impossibility at first, as the FDTD method can simulate reflections but cannot distinguish between a forward and backward traveling field. The trick to singling out only the backward traveling field is to move the launch position away from its default value of the Z Domain Min, and then place a time monitor behind the launch to measure the desired quantity. Since the launch is only forward traveling, this time monitor will then record only the backward traveling reflected field as desired.

Power Flux through Specified Surface


In order to measure the power flux through a specific area, we need to calculate the component of the Poynting Vector along a normal to the surface. To do this, utilize a time monitor type of Power. This type of monitor records the desired output. The surface is defined by the monitor position, width along X, and height along Y. The length along Z has no effect on the monitor output.

Power Spectrum
A power spectrum is nothing more than a frequency analysis of the time response of a system. There are two ways to calculate a power spectrum: With a FFT This method records the necessary time response of the system, and calculated the Fourier Sum described in Section 6.C at the end of the simulation. This results in a plot of the measured quantity versus frequency. Fourier sampling principles apply, and so the frequency resolution is inversely related to the length of the time window. This method is recommended for use when a quick overview of the frequency performance of a system is desired. With a DFT This method records the frequency output at selected frequencies, and calculates the Fourier Sum described in Section 6.C during the simulation. This results in values for power output at the selected frequencies. The frequency resolution of this method is not related to the length of the time window. This method is recommended for use when power output at specific frequencies is desired. To use both of these methods, simply create a time monitor with a Time Output Type of Power, and then selected the desired frequency analysis options.

Steady-State Field/Energy/Power Distribution


In order to analyze the steady-state properties of a structure, the structure needs to be driven at one wavelength/frequency. The DFT analysis options of a time monitor can then be used to measure the steady-state properties, and also to create data files to be used in a BeamPROP/BPM simulation. 1. 2. In order to drive the structure at one wavelength/frequency, set the desired wavelength in the Free Space Wavelength field in the Global Settings dialog box, and choosing an Excitation type of CW. The domain over which to solve for the field/energy/power distribution must be specified. This is done by creating a new time monitor, and then setting its domain as described in Section 6.B.1.

FullWAVE 6.0 User Guide

Chapter 6: Monitoring and Analysis of Simulation Results 71

3.

The type of spatial output must be specified. To measure a steady-state field/power distribution, choose the desired spatial output types as described in Section 6.B.3. Selecting the desired Spatial Format indicates whether or not to include phase information in addition to amplitude information. Lastly, the desired frequency range must be chosen. Set the Frequency Analysis for each time monitor to DFT, and then leave the DFT parameters for the time monitor to their default values as described in Section 6.C. Run the FDTD simulation with sufficient simulation time in order for the system to come to steady-state.

4.

5.

The time monitor will automatically calculate the DFT of the time response at the driving frequency over one period at the end of the simulation.

Custom Post-Processing
FullWAVE time monitors provide quick ways to measure typical electromagnetic properties such as field values, power, and energy density. However, it is possible that a particular design project calls for a measurement which is not one of the built-in output types. In this situation, it is still usually possible to measure the required parameter(s) since most electromagnetic properties are a function of index and field values. Time monitors which measure all necessary field components can be created, and index values can be measured and saved via the Compute Index Profile button. Once these values have been calculated and saved, the user can then calculate any desired parameter.

Calculating Cavity Modes


In order to calculate the cavity mode of a resonant structure, two measurements are needed: first, the resonant frequencies of the cavity are needed; second, the field profile of the cavity mode must be found. Both of these tasks can be accomplished through the use of a FullWAVE time monitor. Although this procedure is based on the usage of FullWAVE time monitors, a discussion of its use has been deferred to Chapter 9.

72 Chapter 6: Monitoring and Analysis of Simulation Results

FullWAVE 6.0 User Guide

Chapter 7: Advanced Features

FullWAVE has several advanced capabilities which extend the basic 2D and 3D FDTD algorithm, as well as several advanced simulation options to include material effects and decrease simulation time. These advanced features are described in this chapter.

7.A. Anisotropy
Anisotropy is defined in FullWAVE via a full 3x3 complex valued index tensor. Each segment can have a different index tensor, allowing for the possibility of customized design. To enable an anisotropic simulation, check Use Anisotropic Materials in the Advanced Parameters dialog box. Index tensors can be defined via the Edit Tensors button in the same dialog. Once defined, a tensor can be assigned to a segment via the Delta Tensor field in the Additional Segment Properties dialog box. The procedure for defining anisotropic materials is discussed in detail in section 5.G of the CAD manual. Note that any anisotropic tensors defined in the CAD interface are converted element by element into epsilon (permittivity), not by squaring the matrix via matrix multiplication. So, if entering a desired epsilon tensor, simply enter the square root of each element.

7.B. Non-Linearity, Dispersion, and Metals


FullWAVE supports a wide variety of material systems, including the linear and non-linear relative permittivity (epsilon) and permeability (mu) as a function of frequency. These types of materials are defined via the Material Editor described in Chapter 8 of the CAD manual. To utilize dispersive or non-linear materials with FullWAVE, it is necessary to enable the Dispersion/Nonlinearity option in the Global Settings dialog. This option is required when performing simulations with lossy materials, even though a single CW excitation is used. In this case, this option enables a simple Drude dispersion model that is necessary since other wavelengths are present in the simulation: though one wavelength is excited, other wavelengths are present in small amounts due to the finite ramp time of the CW launch. These wavelengths encounter random noise and gain and suffer from causality concerns which are not an issue when only dielectric materials are present.

7.C. Boundary Conditions


FullWAVE needs to define how the fields behave at the boundaries of the selected domain. FullWAVE uses PML (Perfectly Matched Layer) boundary conditions by default, but can also use Periodic, Symmetric, and Anti-Symmetric boundary conditions. These boundary conditions can be applied to each of the three coordinates separately, and in some

FullWAVE 6.0 User Guide

Chapter 7: Advanced Features 73

cases, to each of the six boundaries independently. The boundary condition type can be set in the FDTD Advanced Parameters dialog which is accessed via the Advanced button in the FullWAVE Simulation Parameters dialog box. FullWAVE supports PML, Periodic, Symmetric, and Anti-Symmetric boundary conditions, and are specified in the FDTD Advanced Parameters dialog which is accessed via Advanced button in the FullWAVE Simulation Parameters dialog.

Figure 7-4: The portion of the FDTD Advanced Parameters dialog where the boundary conditions are set.

The following two options allow the user to select the type of boundary conditions used. The rest of the options are described in the next boundary condition-specific sections.
Min

These fields control the boundary types of the negative side on the resepctive coordinates. Its choices are PML, Periodic, Symmetric, and Anti-Symmetric. Note that when set to Periodic, the Max boundary is automatically set to this value as well. These fields default to PML.
Max

These fields control the boundary types of the positive side on the resepctive coordinates. Its choices are PML, Periodic, Symmetric, and Anti-Symmetric. Note that when set to Periodic, the Min boundary is automatically set to this value as well. These fields default to PML.

7.C.1. PML Boundaries


By default, FullWAVE uses PML boundary conditions. A PML boundary, which consists of several points which are added to the edge of the domain, is designed to act as a highly lossy material which absorbs all incident energy without producing reflections. This allows field energy which is incident on the boundary to effectively leave the domain without reflection. PML boundary conditions can be applied to any combination of the three coordinates as well as each of the six boundaries individually. The options that control the PML boundaries are:
PML Width.

This is the basic control of the PML, and is located in the FullWAVE Simulation Parameters dialog discussed in Section 4.B. It sets the width of the PML (Perfectly Matched Layer) used as a boundary condition. This width is then added to the edge of the computational domain. Also, it is possible to create a perfect conductor boundary condition by setting the PML Width to 0, though careful attention should be paid to the polarization.
PML Refl.

This field sets the maximum desired reflectivity of the PML region. This optoin is set in the FDTD Advanced Parameters dialog which can be opened via Advanced button in the FullWAVE Simulation Parameters dialog.

74 Chapter 7: Advanced Features

FullWAVE 6.0 User Guide

PML Kappa

This field sets the kappa value to be used for the PML. It controls how the PML absorbs evanescent waves and can be useful in controlling unwanted reflections that occur from the PML. This option is only recommended to be used for cases where the problem being solved is going unstable in the PML region, and increasing the width of the PML doesnt help. This optoin is set in the FDTD Advanced Parameters dialog which can be opened via Advanced button in the FullWAVE Simulation Parameters dialog.

Other PML Options:


Further control of the PML is provided via the variable fdtd_pml_index. This variable controls how the refractive index is calculated within the PML region. Its possible values are: Value Description
-1 0 value

The structure at the edge of the simulation is artificially extended into the PML. This is the default value for this parameter. The PML region consists of the structure defined in the CAD for the PML region. The index in the PML region is set to the value given.

7.C.2. Periodic Boundaries


Periodic boundary conditions are quite useful when working with periodic structure types. A periodic boundary stipulates that any field which leaves the boundary on one side of the domain should reenter the domain on the opposite side. This can be expressed mathematically as

E( xi ) = E( xi + )eiki xi
where the structure is assumed to be periodic along the coordinate xi with period and a phase difference ki , defined by the ka/pi Value. The period is defined by the length of the domain along the specified coordinate xi . Periodic boundaries can only be applied to any combination of the three coordinates, but cannot be applied to each boundary individually. The option that controls the PML boundaries are:
ka/pi Value

These fields set the phase difference between the boundaries for periodic boundary conditions. Its units are such that a value of 1 corresponds to a pi phase shift. The use of this field requires that the boundary type for the desired coordinate be set to Periodic. The default value of this field is 0. To automatic set these options when launching a tilted plane wave and using periodic boundary conditions, enables the
Auto option. For more information about this option, see Section 5.H.1.

7.C.3. Symmetric & Anti-Symmetric Boundaries


Symmetric and anti-symmetric boundary conditions assume that one or more components of the field is symmetric or anti-symmetric about one or more planes of reflection, and are also known as even and odd boundary conditions respectively. These boundary types are useful when both the structure and simulated fields have symmetry about one or more planes of reflection. Symmetric and anti-symmetric boundaries can be expressed mathematically as:

u ( xi ) = u ( xi ) u ( xi ) = u ( xi )

FullWAVE 6.0 User Guide

Chapter 7: Advanced Features 75

respectively where xi is the specified coordinate about which the field is to be assumed symmetric. The position of the reflection plane is given by the domain definition. Note that for anti-symmetric boundaries, the field is set to 0 at the boundary. These boundary conditions types can be applied to any combination of the three coordinates as well as each of the six boundaries individually. The choice between symmetric and anti-symmetric boundaries is not intuative: consult the notes in the next section ot determine what condition to choose.

Symmetry Relations
The conditions implied by the Symmetric and Anti-Symmetric boundary conditions are quite complex. Because, as discussed in Section 2.A, the FDTD algorithm is implemented using a Yee mesh, the E field is computed at points shifted one-half the grid spacing from the H field. Therefore all field components are not calculated at the domain boundaries and cannot be set directly. However the curl terms in Maxwells equations cause the parities of the fields to be interrelated. Consequently, it is not true for example, that with a symmetric boundary condition all the fields are even functions about the symmetry axis. The actual symmetry properties implied by the boundary conditions are as follows.

3D simulations:
For 3D TE simulations, all field components are nonzero and are either even or odd functions at each boundary given any selected symmetric/anti-symmetric boundary types: X Sym. Ex Ey Ez Hx Hy Hz
even odd odd odd even even

X A-Sym.
odd even even even odd odd

Y Sym.
even odd even odd even odd

Y A-Sym.
odd even odd even odd even

Z Sym.
odd odd even even even odd

Z A-Sym.
even even odd odd odd even

So, for example, if an X boundary is set to Symmetric, then Ex, Hy, and Hz will be even functions (symmetric) at the boundary and Ey, Ez, and Hx will be odd functions (anti-symmetric) at the boundary. Thus Ex(x,y,z) = Ex(-x,y,z) but Ey(x,y,z) = -Ey(-x,y,z). This table is for 3D TE simulations only. 3D TM simulations have the opposite values. In practice, we choose the combination of symmetries that provide the desired parities for a particular field. Suppose for instance, that we seek to find a certain x-polarized dipole mode in a 3D photonic crystal slab defect cavity. In preliminary work, either using BandSOLVE to find the defect mode or by using FullWAVE with low resolution but no symmetry conditions, we establish that for this mode, the major component Ex is an even function of all 3 coordinates. Then the above table indicates that we could find this mode 8 times faster by using the 1st octant (X0, Y0, Z0) with symmetric boundary conditions along X and Y, but anti-symmetric conditions along Z. These rules can be quite counter-intuitive and it is best to use this table carefully rather than guess. For instance, in the x-dipole case just described, it would be very tempting to use symmetric boundary conditions along all axes.

76 Chapter 7: Advanced Features

FullWAVE 6.0 User Guide

2D Simulations:
In 2D, there is no Y-axis and certain components of the field are null, so the relations are somewhat different. For 2D TE simulations, the following relations apply: X Sym. Ey Hx Hz
even even odd

X A-Sym.
odd odd even

Z Sym.
even odd even

Z A-Sym.
odd even odd

For 2D TM simulations, the following relations apply: X Sym. Ex Ez Hy


even odd even

X A-Sym.
odd even odd

Z Sym.
odd even even

Z A-Sym.
even odd odd

7.D. Continuing a Completed Simulation


FullWAVE has several options that enable continuation of a completed simulation for both 2D and 3D simulations. In order to be able to continue a simulation, several variables have to be set before the simulation is started. These variables save the state of the simulation to a file for later restarting, load that state file when restarting a completed simulation, and append time monitor data to existing time monitor data. The state file (*.fst) has a binary format, and the format may change in future releases. There are two methods of setting these options: one method is to automatically set all appropriate variables, the other sets them manually. When performing a cavity mode computation, the Continue Simulation option behaves somewhat differently: the state file contains the computed mode profile instead of the final state.

7.D.1. The Automatic Approach


For convenience, the Continue Simulation option in the FDTD Advanced Parameters dialog enables a quick way to continue a simulation. This option is controlled by the variable fdtd_continue. The Continue Simulation option has three settings. They are: No This choice disables this feature and is equivalent to fdtd_continue = 0. Yes This choice, along with the definition of an Output Prefix, enables this feature and is equivalent to fdtd_continue = 1 On the first execution, when the state file does not exist, the initial field is determined based on other excitation/launch options as usual, and a new monitor file is created. On subsequent executions, the simulation will pick up where it left off and append additional data to the time monitor file.

FullWAVE 6.0 User Guide

Chapter 7: Advanced Features 77

To reset the calculation the user must either: Choose a new Output Prefix. Delete the state file associated with the current prefix (<prefix>.fst). Select Restart to force initialization, run the simulation, and then select Yes.

Restart This choice forces initialization and is equivalent to fdtd_continue = -1.

7.D.2. The Manual Approach


The manual approach accomplishes the same thing as the automatic approach, but without the use of the Continue Simulation option.

Saving a State File


Setting the variable fdtd_state_output to 1 will save the simulation state at the end of the simulation to the file <prefix>.fst, where <prefix> is the usual Output Prefix. This option works in conjunction with the fdtd_excitation_file option described below.

Loading a State File


Setting the variable fdtd_excitation_file to the name of a state file which was generated via the fdtd_state_output option described above will load the state file when the simulation is started. The field pattern and other variables will be set to allow a simulation to be continued in time exactly where it was left off. This assumes that certain other parameters, such as the grid, have not changed. The user can also select to append time monitor data to an existing monitor file by setting the variable fdtd_append_tmonitor to 1. This assumes that Output Prefix is the same. For reference, the automated approach above sets the following values for these variables:
fdtd_state_output = 1 fdtd_excitation_file = <prefix>.fst fdtd_append_tmonitor = 1

7.D.3. Extracting Data From a State File


It can be useful, such as when computing 3D cavity modes, to extract field data from a state file. The standard FullWAVE distribution includes fwmodekit, a command line utility that performs these types of calculations. A complete description of the fwmodekit utility can be found in the Utilities appendix of the CAD manual.

7.E. Additional Simulation Algorithms


FullWAVE offers additional simulation algorithms which allow it to better use system resources.

7.E.1. Single vs. Double Precision


FullWAVE uses single precision for all numerical bookkeeping during a simulation. This means that all field, index, and simulation coefficient values are stored as a single precision number. The user can, however, change this default to double precision either locally in each design file or globally for all design files on a particular computer. To change this setting locally, use the Single Precision setting in the FDTD Advanced Parameters dialog. By default, this option is selected enabling the use of single precision. To change this setting

78 Chapter 7: Advanced Features

FullWAVE 6.0 User Guide

globally, use the Use Single Precision setting in the CAD Preferences dialog. This dialog can be opened via the Options\Preferences menu item in the CAD. Single precision is the best choice as it requires roughly half the system memory when compared to a double precision simulation of the same problem size.

7.E.2. Radial FDTD


FullWAVE includes an option for Radial FDTD, which allows certain 3D problems with azimuthal symmetry to be simulated as 2D problems, such as fiber structures with circular symmetry. This creates a simulation with an efficiency close to a 2D problem since the azimuthal dependence is treated analytically and only the radial (R) and axial (Z) coordinates are treated numerically. To enable the Radial FDTD feature, either check Radial Calculation in the Global Settings dialog, or define the variable radial and set it to 1 in the symbol table.

Using Radial FDTD


To use this option, choose a 2D waveguide model and consider X=0 as the center of symmetry when defining the structure. When this scheme is selected, the transverse coordinate x is then interpreted as the radial coordinate R. Note that while the structure can be defined for X<0 and X >0, and this is in general the optimal things to do , the problem will only be solved in the half space X>0. The user need not select this the program will automatically enforce it. While it is implied that the structure is azimuthally symmetric, the field can have other implied azimuthal behavior. The variable azimuthal_mode controls the azimuthal dependence which is assumed to be e , where m is the value of azimuthal_mode and is the polar angle. The azimuthal_mode variable effects the radial propagation, mode shape, and propagation constants appropriately, so that, for example, antisymmetric modes with m=1 can be calculated by setting azimuthal_mode=1. The use of dispersive and/or non-linear materials as well as several monitor features are not currently enabled while using Radial FDTD. Also, note that when using a Launch Type of Fiber Mode for a radial calculation indicates that a LP mode should be used. It is not currently possible to launch a genuine TE or TM mode.
im

Displaying 3D Results
The azimuthal pattern is normally not displayed unless a result from a Radial FDTD calculation is launched into a 3D FDTD calculation. However, there is a feature which allows modes, output fields, and monitor output calculated using Radial FDTD to be automatically output as 3D data files and graphs. By setting output_as_3d=1 in the symbol table, in addition to any 2D radial files that are generated, corresponding 3D results will be generated whose file prefix will be the original file prefix with _3d appended. All six field components (Ex, Ey, Ez, Hx, Hy, Hz) can be generated. It is not necessary to use this option to generate results for input to a 3D calculation, as the 3D FDTD will automatically read the 2D radial files and generate the 3D field internally. The main purpose of this option is to allow visualization of the radial fields as contour plots. Also note that any azimuthal behavior that was implicit in the radial calculation is reflected in the 3D data file and graph.

7.E.3. Complex FDTD


Certain simulation configurations require the use of complex-valued fields, such as when applying a phase different across periodic boundary conditions. FullWAVE contains a complex formulation of FDTD which can be enabled by enabling the Use Complex Implementation in the FDTD Advanced Parameters dialog. While complex-valued FDTD has been tested for use in configurations that required it, it has not been fully tested with all other FullWAVE features. Also, since it requires twice as much memory as standard FDTD, it is therefore not recommended for use unless required.

FullWAVE 6.0 User Guide

Chapter 7: Advanced Features 79

7.F Transverse Mode Calculations


FullWAVE includes two fully functional transverse mode solvers: the iterative method and the correlation method. Both of these methods are based on the Beam Propagation Method, or BPM. This section briefly covers the BPM algorithm and the basic usage of the solvers; for a more complete discussion please consult the appropriate section in the BeamPROP manual. The mode solvers can be used to solve for the propagating modes of a structure with an arbitrary index cross section, which can then be used as a launch file. First, the BPM method is discussed, and then the basic formulation and usage of the two methods.

7.F.1. BPM Algorithm Basics


The BPM algorithm is an approximate numerical approach to solving the exact wave equation for monochromatic waves. This section will not discuss the algorithm in detail, but will hopefully provide enough background for an effective use of the mode solvers. More information on the BPM algorithm can be found in [1]. The scalar Helmholtz equation for monochromatic waves can be written as

2 + 2 + 2 + k(x, y, z ) = 0 2 x y z
2 2 2

where the time dependence has been removed and k(x, y , z) has been introduced as a spatially dependent wavenumber, and is a function of the refractive index distribution n( x, y , z ) . Most of the variation in the field is due to the phase variation along the propagation axis. This variation can be factored out of the equation by substituting a field which varies as

(x, y , z) = u(x, y, z) ei k z
where k is a constant number chosen to represent the average phase variation. This parameter is called the reference wavenumber. The basic BPM equation is then calculated via the slowly varying envelope approximation:

i 2u 2u u 2 2 = 2 + 2 + k k u z 2k x y

This equation is solved numerically by first specifying a launch field at z=0, and then integrating in z to obtain the field for z>0.

7.F.2. Mode Solving Methods


During a mode calculation, it should be assumed that the structure is uniform along z, and so the propagation can be described in terms of the modes of the structure and their propagation constants. Since we are only going to illustrate the concepts of mode solving, we will consider a 2D propagation. The concept is exactly the same in 3D. We can expand the incident field, in ( x ) , in terms of the modes of the structure as

in ( x) = c m m ( x)
m

Note that we have purposely left out the integration over radiation modes for simplicity. Propagation through the structure can then be expressed via a simple phase variation based on the propagation constants, m , of each mode.

80 Chapter 7: Advanced Features

FullWAVE 6.0 User Guide

( x , z ) = c m m ( x ) e i
m

mz

Both BPM-based mode solving methods included in the software equate the propagating field obtained from a conventional BPM propagation with the above expression to determine how to extract mode information from the BPM results.

Iterative Method
The iterative method is based on imaginary-distance BPM. This method is similar to the basic BPM algorithm defined above, except the propagation is done along an imaginary z axis. This is accomplished by replacing the longitudinal coordinate z is by z'=iz so that propagation along this imaginary axis introduces an artificial exponential increase of each mode as

( x, z ' ) = c m m ( x ) e
m

mz'

The above equation implies that each mode will exponentially grow with a growth rate equal to its real propagation constant. The mode with the highest propagation constant, which is conveniently the fundamental mode (m=0), will therefore grow faster than all other modes in the structure, and therefore the simulation results will converge to the field profile of the fundamental mode. The propagation constant can then be obtained by the following variational-type expression:
*

2 =

+ k 2 dx x * dx
2 2

Higher order modes can be obtained by using an orthogonalization procedure to subtract contributions from lower order modes while performing the propagation [2]. Of course, it is important to launch an arbitrary field which excites all the interesting modes in the structure. Issues such as optimal choice of launch field, reference wavenumber, and step size are discussed in [3,4].

Correlation Method
The correlation method launches an arbitrary field into the structure and propagates via normal BPM. During the propagation the following correlation function between the input field and the propagating field is computed:
* P ( z ) = in ( x) ( x, z )dx

Combining this equation with the mode expansion equations above results in the following expression of the correlation function:

P ( z ) = c m e i m z
2 m

This form of the correlation function implies that a Fourier transform of the computed correlation function will produce a spectrum with peaks at the modal propagation constants. To obtain the mode profiles, a second BPM propagation is performed in which the known propagating constants are beat against the propagating field via:

1 m ( x ) = ( x , z ) e i m z L0
Additional information on this technique can be found in [5]. While the correlation method is generally slower than imaginary-distance BPM, it can sometimes be advantageous because it can be applicable to problems that are difficult or impossible for imaginary distance BPM, such as leaky or radiating modes.

FullWAVE 6.0 User Guide

Chapter 7: Advanced Features 81

7.F.3. Using the Mode Solvers


Mode solving can be thought of as a five step process. These steps are:

Step 1: Create the index structure in the CAD.


In order to solve for the mode of a structure, the structure has to be created. The structure should be uniform in Z, and have the desired index profile. Be sure to use the Compute Index Profile option to check that the profile is indeed correct.

Step 2: Choose the appropriate mode solver and related options.


As discussed above, BeamPROP contains two mode solvers which can be accessed by clicking the Compute Modes icon in the left toolbar of the CAD. The one you choose depends on the type of modes you want to find. Generally: The iterative method is the default choice and is recommended for most standard waveguide problems. The calculation will stop when the desired modes are found. The correlation method can have advantages for problems such as antiguiding, leaky, lossy, or radiating modes, or when large numbers of modes need to be calculated. The calculation consists of two full BPM simulations. The desired mode solver, along with several related options, can be set in the Mode Options dialog which can be opened by clicking the Mode Options button in the Mode Calculation Parameters dialog.

Step 3: Decide which modes you want to solve for.


It is important to specify the modes which you want to solve for. This setting can be made in the Mode Options dialog.

Step 4: Choose the mode calculation parameters


Once the mode solver and related parameters have been chosen, the mode calculation parameters need to be chosen. The Mode Calculation Parameters dialog, shown in Fig. 7-6, allows the user to specify simulation domain and numerical grid values for the mode calculation.

82 Chapter 7: Advanced Features

FullWAVE 6.0 User Guide

Figure 7-6: The Compute Modes dialog box where the mode calculation parameters are set.

Generally, these parameters should be chosen such that The domain includes the entire structure The domain is large enough to let the mode field be sufficiently close enough to 0 at the boundaries. The transverse grid sizes need to be small enough to resolve the structure all fields.

The Z step size has a special meaning in the case of the iterative method. Please see the section below for more information. The launch field should be set up so that it excites all the modes you wish to find. Generally, a simple guassian launched off-axis will satisfy this need.

Step 5: Perform the mode calculation.


After the mode calculation parameters have been chosen, enter an Output Prefix and click the OK button. The mode files will be saved to the current working directory. Each mode found will have two files: the mode data is contained in the file <prefix>.m##, and has a corresponding WinPLOT command file <prefix>.p##, where ## is the mode number. The format of the mode data file is discussed further in Appendix B.

FullWAVE 6.0 User Guide

Chapter 7: Advanced Features 83

7.F.4. Further Information


The mode solvers are based on the BPM algorithm, and additional documentation can be found in the BeamPROP manual which can be accessed via the Help menu item in the CAD window. It can also be found in a pdf format in the <rsoft_dir>docs directory.

7.F.5. References
[1] R. Scarmozzino, A. Gopinath, R Pregla, and S Helfert. Numerical Techniques for Modeling Guided-Wave Photonic Devices. IEEE Journal of Selected Topics in Quantum Electronics 6, 150 (2000). [2] J.C. Chen and S. Jungling, Computation of Higher-Order Waveguide Modes by the Imaginary-Distance Beam Propagation Method, Optical and Quantum Electronics, 26, S119 (1994) [3] S. Jungling and J.C. Chen, A Study and Optimization of Eigenmode Calculations Using the Imaginary-Distance Beam Propagation Method. J. Quantum Electronics, 30, 2098 (1994) [4] G.R. Hadley and R.E. Smith, Full-Vector Waveguide Modeling Using an Iterative Finite Difference Method with Transparent Boundary Conditions, J. Quantum Electronics. (1995) [5] M.D. Feit and J.A. Fleck, Computation of Mode Properties in Optical Fiber Waveguides by a Propagating Beam Method, Applied Optics, 19, 1154 (1980)

84 Chapter 7: Advanced Features

FullWAVE 6.0 User Guide

Chapter 8: Clustering

The FDTD algorithm can easily be adapted for cluster computing. A clustered FullWAVE simulation employs multiple CPU's distributed over a network utilizing the message passing interface (MPI). FullWAVE simulation can therefore access additional system resources compared to running on a single machine, resulting in not only a faster simulation, but also the ability to work with larger problems. This chapter discusses guidelines for use of the clustering feature. It assumes that the user is familiar with the usage of FullWAVE on a single machine. Please contact RSoft if you have any additional questions.

8.A. Licensing, Installation, & Testing


The FullWAVE clustering feature is licensed separately, and is not included in the standard version of FullWAVE. Therefore users who are not licensed for this feature cannot use it. The installation procedure for a FullWAVE cluster is covered in the RSoft Installation Guide. If you have not already followed these instructions, please do so. The rest of this chapter will assume that the user has successfully installed and tested the standalone portion of the FullWAVE program and also performed any specific steps required to install the included MPI implantation. FullWAVE clustering supports both LAN-based networks and Myrinet networks. For more information about Myrinet support, please contact RSoft.

8.B. Cluster Settings


The lower left portion of the FullWAVE Simulation Parameters dialog contains the settings for clustered simulation.

Figure 8-1: The lower left portion of the FullWAVE Simulation Parameters dialog where cluster settings are made.

These settings are:


Enable

This option enables the use of clustering in a simulation. If this option is unchecked, a standard standalone simulation will be performed regardless of any of the other cluster settings. This is a local setting that can be set differently in each design file. If you are not licensed for a clustered simulation, this option will be unavailable to you.

FullWAVE 6.0 User Guide

Chapter 8: Clustering 85

# Processes

This field determines how many processes will be involved in the clustered simulation. This is a global setting that is the same for all design files on a particular computer. Changing this setting in one file changes all other files. This field controls the same parameter as the field in the Cluster Settings dialog. The number 0 indicates that clustering will not be used.

The Cluster Settings Dialog


The Cluster Settings dialog allows the user to control several aspects of a clustered simulation. It can be opened via the Settings button in the FullWAVE Simulation Properties dialog box or via the menu item Run/Cluster-Settings.

Figure 8-2: The Cluster Settings dialog box.

The fields shown, including the Test button, in the dialog in Fig. 8-2 are:
MPI Implementation

This field must be set to the version of MPI that you have installed. Users are encouraged to use the MPICH implementation that is included in the FullWAVE distribution.
Launcher

This field determines the program that launches the simulations on each machine. By default, the launcher that is native to the MPI Implementation is used.
Show Window

This field determines which simulation is shown on the master node.


Keep Window

This field determines whether or not the window remains active or is closed when the simulation is completed.

86 Chapter 8: Clustering

FullWAVE 6.0 User Guide

Number of Processes

This field determines how many processes will be involved in the clustered simulation. This is a global setting that is the same for all design files on a particular computer. Changing this setting in one file changes all other files. This field controls the same parameter as the field in the FullWAVE Simulation Parameters dialog. The number 0 indicates that clustering will not be used.
Host Machines

This field lists the names of the machines that will be involved in the clustered simulation. Each of these machines must have the MPI and FullWAVE software installed on them as noted earlier. The default list contains the name localhost, which refers to the local machine, whatever its name. If the number of processes is greater than the number of machines, the list is automatically repeated. It is also possible to assign a particular number of processes to a specific machine with the following syntax: computer_name:# where computer_name is the host name and # is the desired number of processes. For large clusters it can be beneficial to group several nodes together when defining a host list. To do this, create a text file that contains one node name on each line. To load this file, use the syntax @node_group_file in the Host Machines list.
Environment

This field allows the user to enter system variables and their values that will be passed to cluster nodes during a clustered simulation. The syntax is NAME=VALUE, NAME=VALUE,.
Test

This button will launch a series of tests to determine if the cluster has been set up correctly. It is useful for debugging purposes to ensure that the computers in the cluster are connected and can access each other.

8.C. Cluster Display Settings


Cluster display settings can be found in the Display Options dialog. See Section 4.F. These options are:
Display Whole Domain on Master Note

This option will enable the display of the entire domain during a FullWAVE simulation using clustering. Note that this option uses additional network resources, and its use will result in a decrease in simulation time. To reduce this effect, the following two options can be used.
Display Grid Factor

This option enables a courser grid when using the Display Whole Domain on Master Node option is enabled in order to speed up the simulation. For example, the default value of this parameter, 2, indicates that every other point should be displayed.
Display Height

This option sets the height along the Y coordinate for data to be transmitted to the master node when the Display Whole Domain on Master Node option is used. The default value of this field is 0, which corresponds to a single plane of data in the XZ plane.

8.D. Additional Cluster Settings


This section documents additional cluster settings that are controlled in the FDTD Advanced Parameters dialog which can be opened by clicking Advanced in the FullWAVE Simulation Parameters dialog.

FullWAVE 6.0 User Guide

Chapter 8: Clustering 87

Use Master Node

It can be advantageous to use the master node solely as a control node and not for simulation purposes. To do this, uncheck this option.
Domain Cut Direction

By default, FullWAVE will divide the simulation among the cluster nodes along the X axis. However, it can be advantageous to divide the problem along the Z axis. This is especially for structures where load balancing between cluster nodes is more uniform using a Z-cut rather than the default X-cut, such as structures that are primarily oriented along Z or for structures with complicated Z dependencies.

88 Chapter 8: Clustering

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE has several features that enable the calculation of cavity modes and Q factors for certain types of structures. In this chapter, we describe the manual procedure for cavity mode computation, and explain several methods for finding Q factors. We then explore the basic and advanced uses of Q-Finder, an automated tool for calculating the center frequency, quality factor Q, and spatial profiles of resonant modes. If you must, you can skip over the background and manual procedure sections and jump straight to the automated procedures in Section 9.C, but reading through these preliminary sections will provide a much deeper understanding of Q-Finder. Note that due to the nature of the technique, it may be difficult or impossible to obtain accurate modes and Q-factors for some very low or very high Q problems. Also, since cavity mode and Q calculations can be computationally expensive, it would be good to read through the hints on improving simulation speed in the Tips and Tricks section of Appendix A.

9.A. Theoretical Background


The study of leaky modes and cavity resonances is one of the most important applications of time-domain analysis in present-day electromagnetics. In many structures such as photonic crystal cavities or micro-ring resonators, light cannot be trapped indefinitely. Instead, it leaks away, either because the confinement is imperfect or through unavoidable scattering losses. In such systems, the states in which energy is stored in the cavity are not true modes of the system, but finite-lifetime resonances. In the event that a given spectral resonance is reasonably isolated from any others, the stored energy decays exponentially in time and exhibits a Lorentzian line profile. The mode profile itself can be found via a Fourier analysis during a FullWAVE simulation. The rate at which energy is lost is frequently characterized by the quality factor or simply Q, which can be defined and calculated in a number of ways.

9.A.1. Finding Cavity Resonances & Mode Profiles


The basic procedure for finding a cavity resonance is as follows: 1. 2. 3. Launch an arbitrary field into the cavity at t=0 to excite a superposition of resonant states and radiation states. Let the field decay for some time without further driving, and measure the time response at a random lowsymmetry point. Perform a frequency analysis operation, such as a Fourier transform, on this time-domain data to obtain the frequency response of the system.

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 89

4. 5.

Look for resonant peaks in the spectrum. If needed, the resonant field profile can be isolated through the Fourier analysis of an additional simulation and saved for later use.

This procedure is described in more detail in Section 9.B and illustrated in Tutorial 4 in Chapter 11. As usual, it is important to perform a convergence study with simulation parameters such as the grid sizes to determine if accurate results have been achieved.

Additional Comments
The following concepts are relevant for cavity mode calculations: Since most cavity modes exhibit some form of symmetry, it is usually possible to use symmetric boundary conditions to accelerate the simulations. See Section 7.C for more details on using symmetric boundary conditions efficiently and correctly. As with any spectral computation, an appropriate time window is required to get good results. However, if the mode is too leaky, a long time window will be useless: the mode will decay too quickly to get meaningful results. This difficultly can be overcome using the Continue Simulation option described in Section 7.D to successively refine the mode profile using a series of shorter simulations. A simple method to improve the precision of the center frequencies and corresponding accuracy of the mode profile is to perform a longer simulation. However, this approach can result in prohibitively long simulations. Section 9.A.2 describes some preferred techniques based on ideas from harmonic analysis.

9.A.2. Calculating Q
Once the resonance has been found, there are different methods to solve for Q. While all these methods would give the same results for very long simulations with very high spectral resolution, different approaches yield very different performance in terms of accuracy, speed and convergence.

Method 1: Measure Ratio of Stored Energy and Leaking Power


A common, very general definition for Q is:

Q = 2

Stored energy Energy lost per oscillation

To measure these quantities, a computed cavity mode would be launched into the structure using the FDTD Continue options (see Section 7.D), and then allowed to decay away. During the simulation, it is straightforward to use FullWAVE monitors to calculate the stored energy, which is the value of an energy density monitor, and the energy lost per oscillation, which is the value of a power monitor divided by the center frequency of the resonance. One drawback to this method is that both of the monitor results commonly exhibit periodic oscillations about their mean value. As a result, the ratio of the two quantities strongly oscillates making it difficult to extract a reliable Q value. One approach is to average time-averaged versions of these two quantities, which produces better results. An additional problem is that energy and power monitors measured over large domains can be quite computationally expensive especially when clustering. On the whole therefore, this is not the recommended approach, as the methods described next are faster, more accurate and easier to use. One application when this method must be used is in separating in-plane and out-of-plane losses in 3D photonic crystal slabs. In that case, we need to separately measure the energy leaving in different directions and the calculation of the power flux is central to this. This type of calculation is discussed in Section 9.C.5.

Method 2: Measure Energy Decay in Cavity


Since the stored energy of an isolated mode decays as

90 Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE 6.0 User Guide

U ( t ) = U 0 exp ( t ) ,
where >0 it is easy to show based on the definition given in the previous method that, for a resonance centered at a frequency , Q is simply

Q=

To use this method, the resonant mode is launched into the cavity via the FDTD Continue options (see Section 7.D), and a time-averaged energy density monitor can be used to calculate the stored energy in the cavity as the mode decays away. The decay rate can then be found by either measurements from the graph using the mouse coordinates, or by using WinPLOTs fitting features. Since this method relies on curve-fitting, the oscillations seen in Method 1 are less of a problem.

Method 3: Measure width of resonance


The Q factor can also be defined as the ratio of the center frequency and full-width at half-maximum of the resonant peak:

Q=

0 FWHM

(It is a worthwhile exercise to show that for a Lorentzian line, this definition and the other formulae above are equivalent.) The best way to find the FWHM of the peak is to fit a Lorentzian to the spectral line of the resonance. After fitting the Lorentzian to the spectral power, the expression takes the form:

P ( ) = 1+

( Q /(2 0 ) )

( 0 )

P0

2 2

The value of Q can either be extracted from this fit, or if the peak is sufficiently well resolved, by directly measuring the FWHM. The critical drawback to this method is the frequency resolution for high-Q structures. Consider a structure where Q>5500. This implies that the FWHM <1.1x10-4. Thus to resolve this peak well, a frequency resolution of about 10-5 would be needed. Using the basic time-frequency relation of the DFT used by the FullWAVE time monitors, the simulation would need approximately 100,000 time steps which might be computationally prohibitive depending on the particular structure. Therefore, this is not a practical approach for high-Q structures and it is not used directly. However, the next section describes how a modified version of this method can be very successful and efficient.

Method 4: Use Techniques of Advanced Harmonic Analysis


All the Q finding methods described so far rely strongly on the DFT of the field response. This is obviously true for Method 3, which attempts to measure the peak FWHM by fitting the spectrum, but is also true for the other methods since they rely on the accurate computation of a mode at the resonant frequency. The accuracy of the mode profile is itself limited by the DFT frequency resolution.

The Problem
While any procedure that improved the time-frequency limit would have obvious benefits, the usual tricks dont work. Running the simulations longer to improve the resolution is not an attractive option since in FDTD work we are almost always trying to reduce our simulation time. Zero-padding the time response is also impossible since it artificially broadens the resonance peaks. Another solution is needed.

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 91

The Solution
Naively, we might expect that the frequency resolution would be limited by the DFT time-frequency uncertainty relationfiner frequency resolution requires a longer time series. However, this is only true we have no knowledge of the form of the underlying signal. In this case, there is substantial knowledge: the field induced at a field measurement point x0 by the arbitrary initial field will behave roughly as a sum of complex exponentials

f ( x0 , t ) = ck exp (i 2 k t ) + c.c. ,
k

(1) where c.c. denotes the complex conjugate. The complex frequency, which can be represented as

k = k + i k
contains both the oscillation frequency k and the loss rate k . With FullWAVEs convention of positive frequencies, a positive value of k represents a decaying mode. Each mode excited by the initial field is represented by a different term in the sum (1). Even the portion of the field that radiates away quickly can be considered to behave like this but with a very high loss rate. The expression (1) allows us to tackle the problem with the tools of harmonic analysis or harmonic inversion. A number of such procedures exist with greater or lesser degrees of speed, accuracy, and robustness but all have the following ideas in common (ideas which date back to Baron de Prony in the late eighteenth century). We replace a linear operator, the DFT, by a nonlinear fit of the parameters ck and k . This immediately allows much higher precision in the extracted parameters than would be permitted by the DFT. As qualitative proof, consider for example that if Eq. (1) contains only one term, then with a couple of lines of algebra, we can extract the exact value of 1 from just two time points whereas a DFT applied to two points is essentially useless. However a nonlinear fit implemented poorly would be much slower than the FFT operation and potentially unstable. Modern techniques of harmonic analysis have revealed how to implement such fitting rapidly and reliably and recover the speed of the FFT by concentrating on narrow frequency bands of interest. As one example of these techniques, consider the approach known as Pad interpolation. This method works as follows: Take the DFT formula:
N 1 n=0

f ( ) = f ( t ) expi 2 n t .
By using the parameter substitution

z = exp ( i 2 t ) ,
it is apparent that the DFT is a polynomial of the parameter z, as is well known to all students of discrete signal processing. However, many functions are not well approximated by polynomials, particularly functions with zeros and poles. In the present case, the fact that the signal decays indicates that its spectrum features at least one pole in the complex plane. Such functions are typically much better approximated by rational functions, i.e. ratios of polynomials. In the technique of Pad approximation, we construct the unique rational function of two polynomials each of order N/2, such that the Taylor series of the Pad representation agrees with the original polynomial up to order N. Although there is little formal justification for the result, we frequently find that the Pad solution provides a much better approximation. Thus better frequency resolution can be obtained without using longer simulation times. RSofts Q-Finder tool incorporates a number of such ideas under the general label of Fast Harmonic Analysis or FHA. With these techniques, Q-Finder is able to extract accurate complex frequencies from relatively short propagation lengths. Moreover, the FHA algorithms are available in a standalone command line tool called fhakit described in the Utilties Appendix of the CAD manual.

92 Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE 6.0 User Guide

9.B. Manually Calculating Cavity Modes and Q Factors


This section outlines the manual calculation of cavity modes and Q factors. It is only included so that you can understand the operations performed automatically by Q-Finder. You should work through this exercise and the calculation described in Tutorial 4 in Chapter 11. However, for real work, always use Q-Finder which is fast, convenient and less prone to accidental mistakes in setting up the problem.

9.B.1. Manual Calculation of Cavity Resonances


The procedure for the calculation of cavity resonances is a straightforward process, and can be outlined with the following steps: Draw the desired structure in the CAD. Set the Excitation to Impulse as described in Section 5.D. Launch an appropriate field shape in the center of the cavity. Use a time monitor to measure the field within the cavity structure. Create a time monitor and set the Time Monitor Type to Default Field. Try to avoid points of symmetry and/or nodes to ensure a good time response. Make sure the Wavelength Monitor output option in the FDTD Output Options dialog box is set to Yes. This option is set by default when using an impulse excitation unless set otherwise by the user. Set an Output Prefix and run the FDTD simulation. Determine the resonant frequencies from the wavelength spectrum contained in the plot file <prefix>.pwn. The raw spectrum data is contained in the file <prefix>.wmn. Alternatively, the frequency spectrum, using the files <prefix>.pfn and <prefix>.fmn, can be used.

In general, it is a good idea to perform a convergence study on the spectrum to ensure that accurate results are found. This is especially important if the spectral resolution is not adequate when a longer simulation might be needed.

9.B.2. Manual Calculation of Mode Profile


Once the resonant frequency is known, the mode profile can be computed by enabling the Compute Mode option in the FDTD Advanced Parameters dialog. This option computes the cavity mode profile at the wavelength given by the value of Free Space Wavelength. This procedure will result in the calculation of the major field component of a cavity mode of the whole simulation domain: Ensure that the Excitation is still set to Impulse. Enable the Compute Mode option in the FDTD Advanced Parameters dialog. If multiple field components of the mode are needed, if the mode found is to be refined in later simulations, or if the mode is to be used to calculate a Q factor, enable the Continue Simulation option in the FDTD Advanced Parameters dialog. This option outputs a binary state file which can be used as an initial field for later simulations, or provide the raw data out of which to extract field data using the utility fwmodekit. See Section 7.D.3 for more details on the use of this option. Set the Free Space Wavelength value in the Global Settings dialog to the desired resonant wavelength. Note that when using an impulse excitation, this value has no effect on the launch. Note that this can be overridden by setting the variable fdtd_modefrequency_real to the desired frequency. The imaginary part of the mode frequency (for mode attenuation) can be specified by setting fdtd_modefrequency_imag to the desired value.

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 93

Rerun the FDTD simulation. The major component of the mode will be saved in the file <prefix>.m00, with accompanying plot file <prefix>.p00.

In general, it is a good idea to perform a convergence study on the mode profile to ensure that accurate results are found.

9.B.3. Manual Calculation of Q


The preferred method for manually calculating Q Factors is Method 2 described in Section 9.A.2: Perform a cavity mode computation as described above to find the mode resonance and field profile. Repeat this step until a good solution is found. Be sure to save the computed mode profile using the Continue Simulation option. Add a power monitor that encompasses a majority of the cavity region. Launch the computed mode profile and run for a certain time while the power monitor measures the power flow from the cavity. The exponential decay of this monitor can be used to calculate Q. Repeat with a longer simulation time as necessary to ensure that an accurate Q was found.

For more details on how these steps can be performed, please turn to Tutorial 4 in Chapter 11. You should work through this tutorial now, before reading on to learn about Q-Finder.

9.C. Using Q-Finder to Calculate Cavity Modes & Q Factors


We now turn to use of the automated Q-Finder tool. Make sure you have read sections 9.A, 9.B and Tutorial 4 (in Chapter 11) before reading this section. Despite the name, Q-Finder is designed to automate both the calculation of Q and the extraction of mode profiles, whether or not the Q is desired. The Q is always returned since its calculation is cheap compared to that of the mode profile. Q-Finder automates several of the methods described above and possesses some intelligence in order to reliably locate peaks given an initial rough guess as to the peak location. The Q-Finder dialog can be opened via the CAD menu option Utility/Q-Finder. Tutorial 7 in Chapter 11 explores the use of Q-Finder.

9.C.1 Preparing an .ind File For Use With Q-Finder


In order to use Q-Finder, you must first define the geometry in the RSoft CAD Environment. This section describes several suggestions and requirements.

CAD File Prerequisites


The technique for finding modes and Qs places certain requirements on a CAD *.ind file. For example, there must always be a plain field time monitor present, and, if measuring Q by energy decay, an energy density monitor that samples at least a large portion of the resonance is required. When a simulation is initiated, Q-Finder tries to determine that these prerequisites are satisfied, and displays an error if it finds a problem. The following discussion on the use of Q-Finder assumes that these prerequisites have been met.

94 Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE 6.0 User Guide

Speed Issues
In some cases, the speed of a Q calculation can be greatly increased by slightly changing the display and output options. For example, updating the graphical field display every 1000 time steps might reduce the simulation time by one-third. Similarly, increasing the update time for the monitors can have a small but noticeable effect. A good general rule is that, unless you are specifically interested in watching the field evolve, you should always set these update rates so that the simulation is not drawing too frequently. Appendix A contains tips and tricks for increasing simulation speed, but several items bear repeating here: Set fdtd_update_time such that a refresh of the field display only happens every second or less. Set fdtd_monitor_update_monitor such that a refresh of the monitor display only happens every second or less. Deactivate the wavelength monitor. The frequency monitor is more fundamental. Take advantage of symmetry conditions whenever possible. Disable energy density and power monitors when their results are not specifically needed. This is possible using the fdtd_monitor_tmask and fdtd_monitor_smask variables. (Q-Finder always applies these settings automatically.) If outputting spatial field slices, keep fdtd_slice_time as large as possible. Output spatial fields on a coarser grid than the simulation grid if at all possible.

The first two of these items are performed automatically if the option SpeedOptimizations=1 is set in the [QFINDER] section of your .ini file.

Using Symmetry Conditions


Since cavity-mode solving is a numerically intensive problem, it is important to exploit FullWAVEs symmetry conditions whenever possible. For a 3D problem with full symmetry, this can cut simulation times by a factor of eight. However, it is very important to select the symmetry conditions carefully. Remember that when some field components are symmetric, others are anti-symmetric. When trying to excite a particular cavity mode and when reproducing literature results, check carefully that you are applying the correct conditions and consult the tables in Section 7.C.3 frequently. You may also wish to find your resonance using BandSOLVE, if you own it, on a coarse grid to check that the symmetry conditions are correct. When comparing to results in the published literature, remember that most authors use Z to refer to the vertical axis, whereas for most designs in the RSoft CAD, Y is the natural vertical axis. Therefore when copying symmetry conditions from papers, check carefully that you are considering the correct field component and the correct symmetry direction. Our own experience is that it is easy to make mistakes on this point. Check everything at least twice!

9.C.2. The Q-Finder dialog


Once the CAD file is prepared, a Q-Finder calculation is initiated by opening the Q-Finder dialog using the Utility/QFinder menu item. The following dialog appears:

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 95

Figure 9-1: The Q-Finder dialog.

Frequency Controls
Since any given cavity may support many resonances, Q-Finder needs hints about where to look for resonances. QFinder looks for resonances around a center frequency within defined tolerances. These settings are set by the controls in the top left of the dialog. All these controls are defined in terms of frequency [m-1], rather than wavelength, since frequency is the more fundamental quantity.
Center

This is the initial guess for the peak of the desired resonance in m-1. By default, this value is internally updated as additional simulations are performed to refine the frequency spectrum unless the Lock for first N syms option described below is used. Q-Finder can calculate Q-factors for more than one resonance at a time. To calculate results for several modes, simply enter a list of several starting frequencies separated by commas. Each member of the list may be an arbitrary symbol table expression.
Lock for first N syms

96 Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE 6.0 User Guide

This value controls the number of simulations for which the user-supplied center frequency is applied as the current center frequency. By default, it is only applied for the first simulation, and then Q-Finder uses the location of the peak in the most recently acquired Fourier spectrum to obtain the new estimate for the center frequency. On some occasions however, you may have accurate knowledge of the peak location from earlier work. This means that you may know the peak location more accurately than Q-Finder can determine from an early simulation of relatively short duration and coarse frequency resolution. In such a case, it is beneficial to apply the accurate value for several simulations until the frequency resolution of the later simulations exceeds that of your knowledge. Another situation where this option is useful is if the cavity supports two or more closely spaced resonances. In that case, the early short simulations may fail to resolve the resonances and Q-Finder could lock on to the incorrect resonance. Imagine for instance that the sought-after resonance with higher Q happened to be more weakly excited by the launch field than the adjacent lower-Q resonance. Then Q-Finder may incorrectly lock on to the stronger but lossier second resonance and the potential Q of the cavity will be under-reported.
Frac. tolerance and Max. tolerance

These two tolerance settings control how Q-Finder searches for a resonance peak in the spectrum of the device. Initially, Q-Finder will look for a peak within the frequency band

0 (1 ,1 + ) ,
where 0 is the current center frequency and

is the value of the Frac. freq. tolerance. If any peak is found within

that range, it is selected as the peak of interest. If however, the spectrum is monotonic in the search window, the window is increased in size and the search is continued. This continues until the tolerance has reached the value Max. tolerance. If a peak has not been located at this stage, QFinder terminates with an error. (However, if a peak is not found after the first propagation, Q-Finder performs a second simulation with the original frequency guess, since the spectrum of the first propagation is often very noisy, and improves on subsequent runs.) In this way, it is relatively easy to isolate the mode of interest, even if our initial knowledge of its frequency is not very precise. At the same time, by keeping the Max. tolerance relatively small, we can avoid Q-Finder locking on to the wrong mode. The setting Frac. tolerance corresponds to the symbol table variable qfind_freq_tol, and has a default value of 0.01. It is convenient to specify the Max. tolerance in terms of that parameter. The default value is five times qfind_freq_tol.
FFT Resolution

These non-editable fields display the frequency resolution for the current values of the Propagation lengthsdescribed in the next section.
Seed center frequency values in scans

This option enables the seeding of the center frequency values during a MOST scan. This is useful when the center frequencies shift during a scan. When this option is set, the user-defined center frequencies are used for the first point of the scan, while subsequent points use the center frequencies found for the previous point.

Propagation and output


The settings in the top-right panel control the sequence of propagations and various output options.

Propagation lengths
As seen in the discussion of the manual method of mode computation in section 9.B and Tutorial 4, finding resonant modes and Q values typically involves a sequence of calculations. This is always the case for finding a mode profile or a Q by energy decay: there must be at least one propagation to determine the resonant frequency, a second to construct the mode profile at the desired frequency and a third to monitor the energy decay. If only the Q is required, the FHA method is often able to extract accurate results from just a single propagation, however, it can also benefit from using a series of runs of increasing length that progressively clean-up the spectrum as the resonant state is isolated.

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 97

Thus Q-Finder is built around the idea of specifying a sequence of (usually increasing) propagation lengths. The idea is that short initial calculations allow most of the extraneous components of the initial launch field to be radiated away and the peak frequency to be determined roughly. Typically, three or four propagations are sufficient for finding resonant modes. For the FHA method without a resonant profile, you may settle on two propagations or even just one if experience has shown that it is giving reliable answers for your structure. On the other hand, for some very low-Q structures, it may be necessary to use quite a number of relatively short propagations. After many multiples of the characteristic decay time

d = Q / 2 0 , essentially all the mode energy will have decayed

away and there is little point in simulating for additional time. However, it may be necessary to use longer simulation times for structures that support a number of closely spaced resonances. In this case, the initial simulation needs to resolve each of these peaks properly and you need to specify the center frequency of the desired resonance accurately enough to isolate it from the neighboring ones. It is important to appreciate that the appropriate number and length of propagations varies considerably from structure to structure. It can even vary strongly from mode to mode for a single structure, if the modes have highly different Qs, a not-uncommon situation. As always, some initial investment in experimenting with parameters will pay off and cut your overall project time. The simulation lengths are specified as time exponents or powers of two times the FullWAVE Time Step value given by the built-in symbol fdtd_time_step. Thus a time exponent of 10 would cause the FullWAVE simulation to perform 2^10, or 1024, time steps. The sequence of lengths is set by the field:
Propagation lengths (2^N*dt)

This field provides the time-exponents for the length of these simulations, and should contain a comma-separated list of increasingly larger exponents. For most purposes, three simulations are sufficient, with the last one possibly being much longer than the first two.

Choosing the Q Calculation Method


As we have seen, Q-Finder can calculate the Q-factor using two methods. Fast Harmonic Analysis (FHA) This is the standard method, which is always performed, uses the FHA techniques discussed in Section 9.A.2. If using this method and a mode profile is not needed, a little time can be saved by selecting the option Skip final mode profile calculation. This prevents calculation of the mode profile on the final simulation run only. Energy Decay This method measures the rate of decay of an energy monitor (Method 2 in Section 9.A.2). This is usually slower and less accurate than the FHA techniques but has two possible uses. Firstly, it can be used as a check on the FHA results. Secondly, by introducing multiple energy and power monitors, it can be used to separate the energy loss into contributions in different directions. For instance, the partial-Qs for in-plane and out-of-plane loss from a photonic crystal slab can be obtained in this way. The FHA method can only generate an overall decay rate for the whole mode. The energy decay method is activated by selection the Measure Q by energy decay option (see below). If the energy decay option is selected, the Decay Length field sets the length of the decay propagation as a time exponent. Usually this value can be set considerably smaller than the longest propagation length. You should aim to have a decay length so that the energy falls by a factor of 1/e or so though reasonable results can be obtained with somewhat shorter propagation times.

Other options
Find Mode Volume

98 Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE 6.0 User Guide

This option is not compatible with the Skip final mode profile calculation option. This option enables the computation of the mode volume, which is defined as:

Volume =
where

max U E ( r )

U E (r )

dV ,

2 1 U E (r ) = (r ) E (r ) 2

is the electric energy density, E is the electric field, is the spatial dependent index, r is the spatial coordinate, and V is the whole simulation domain. Since this function oscillates as a function of time, it is evaluated at the point of the optical cycle where the electric energy reaches its maximum. This gives consistent answers for the mode volume. Note that the mode volume is defined in terms of the electric energy density, rather than the magnetic or total densities. The electric definition is most useful since the volume is usually used in calculations involving electric dipole radiation. The mode volume calculation is actually performed by the tool fwmodekit, which can also be called from the command line on an existing .fst file.
Spectral analysis method

This option determines whether the estimate of the resonant frequency obtained after each propagation is determined by an FFT or by the FHA method. The default is to use the FHA, but in rare circumstances the FFT method may be slightly more robust if less precise. You should only ever change this option if Q-Finder is having trouble locating a resonance.

Initial Launch
The initial launch used can be set by the user.
Ignore old .fst files

Q-Finder uses FullWAVE .fst files to store intermediate results. If any of the simulation domain, grid resolution or time step are changed in the CAD, this may cause the .fst files on disk to become mismatched with the new simulation. This is indicated by a FullWAVE error. In such cases, activating this option ensures that any old files are ignored.

9.C.3. Performing a Simulation


The bottom of the Q-Finder dialog controls allows the user to perform simulations, and controls how they are performed.

Figure 9-2: The bottom portion of the Q-Finder dialog where simulations options are set.

Running the Simulation


To run a calculation, enter an Output Prefix and click OK to initiate the calculation. The Q-Finder status window opens itself, and then it opens the window for the first FullWAVE simulation.

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 99

As the calculation proceeds, the Q-Finder status window will show the calculation progress in its log window. Information such as the current center frequency as well a Purity parameter are displayed. The Purity parameter is a measure of how much the field within current mode profile estimate is associated with the desired frequency; a value near 100% indicates that the mode is just about perfect, while a much lower value indicates there is substantial energy from another peak. The Q-Finder status bar indicates the total number of simulations performed so far, as well as the progress and duration of the current FullWAVE simulation. This is especially useful when the FullWAVE window has been hidden. At the end of the Q calculation, the Q-Finder status window will display the computed Q value, as well as any other requested output, such as mode volume.

FullWAVE Window Control


The FullWAVE Window controls shown in Fig. 9-2 set how the FullWAVE simulation window will appear during a simulation. There are three settings: Normal A graphical FullWAVE window will be displayed as the simulation progresses. Minimize The graphical FullWAVE window will be opened in the task bar. Hide The FullWAVE simulations will be performed entirely in the background. We suggest using the Normal setting when first experimenting with calculations, and then the Hide setting when performing long or routine runs to reduce your desktop clutter. This is particularly important when using MOST to perform scans or optimizations with Q-Finder since there are then potentially three different windows associated with the calculation the governing MOST window, the Q-Finder window controlled by MOST and the FullWAVE simulations launched by Q-Finder.

Clustering Controls
The Cluster Options shown in Fig. 9-2 allow Q-Finder to use the clustered version of FullWAVE if you own a cluster license. Since dealing with clustering is a complex operation you should be sure that you fully understand the procedures for running plain FullWAVE cluster calculations on your system, before you attempt to combine clustering with Q-Finder. The clustering options are as follows:
Enable clustering

This checkbox enables the use of clustering.


No processes

This sets the number of processes to use for the clustered simulation.
Skip Master

This checkbox indicates that the master node should be excluded from the simulation, and corresponds to the variable fdtd_nx_master.
Settings

This button opens the Cluster Settings dialog described in Chapter 8.

100 Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE 6.0 User Guide

Post processing
This feature attempts to rerun the calculation but without repeating simulations. It can be useful if making slight adjustments to frequency tolerance settings to isolate a peak.

9.C.4. Output Files


Q-Finder produces a number of output files.

Main Output
The principal file is <prefix>_qvs.dat. It contains the values of the center frequency, Q , and the mode volume. Depending on the settings and algorithm used, not all of these values may be meaningful. For example, the mode volume is always zero unless the Find mode volume option is active.

Intermediate Output
In trying to understand the behavior of resonances it can also be useful to examine several intermediate files, typically .tmn (time monitors), .fmn (frequency monitors) and .p00/.m00 (mode profiles) files. Time and frequency monitors are stored at the end of each FullWAVE simulation. They are named as follows: <prefix>_m<j>_<stage>.tmn or <prefix>_m<j>_<stage>.fmn, where <j> is an index over the number of center frequencies starting from 0, and <stage> is an index over the sequence of time exponents starting from 1. So the time monitors for the third simulation for the second resonance would be stored in the file <prefix>_m1_3.tmn. Note that for the purposes of increased speed, energy density and power monitors are disabled except during the final decay stage of the energy decay method, which is normally the only time they are useful. Spatial monitors, which are very expensive, are always disabled by the Q-Finder. To override this behavior, set qfind_monitor_tall=1 (calculate all temporal monitors including energy and power) or qfind_monitor_sall=1 (calculate all spatial monitors), but only do so if you absolutely must obtain intermediate energy or spatial data. Remember also that FullWAVEs .tmn and .fmn files always contain the signed square roots of the data displayed by the corresponding .ptm of .pfm file. You must add /powy2 to a WinPLOT file in order to graph the squared data. The standard FullWAVE output files include this option. A convenient way to examine the intermediate output is using DataBROWSER. The DataBROWSER button on the QFinder toolbar opens DataBROWSER in regex mode with a prefix that extracts just the final data: <prefix>_m[09]+.p. To examine intermediate data, just remove the last 2 characters to obtain <prefix>_m[0-9]+ and hit the return key. You can adjust the regular expression to concentrate on the files of interest. The most important are usually the .tmn and .fmn files discussed above. See the DataBROWSER manual if you need to learn about regular expressions and DataBROWSERs regex mode. A small investment in learning about the regex mode will increase enormously your ability to quickly explore and understand large numbers of data files.

9.C.5. Advanced Q-Finder Techniques


In this section, we look at some of the more complicated operations that can be performed with Q-Finder.

Command-line interface
Q-Finder can be run as a command line tool like other RSoft simulators by passing the option -c: Windows:
qfinder.exe c <indfile> [name=value [,]]

Linux:

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 101

xqfinder c <indfile> [name=value] [name=value] []

or
qfinder c <indfile> [name=value] [name=value] []

When using Q-Finder in this mode it supports some special symbol table variables to control the behavior of the FullWAVE simulations spawned by Q-Finder. These symbols and their possible values are Variable
qfind_child_simwin qfind_cluster_np

Description Controls the style of the FullWAVE simulation windows. Possible values are: 0 (normal), 1 (minimized), or 2 (hidden). Sets the number of processes to be used in a clustered simulation. This setting is required if clustering is to be used. Without it, the calculation will revert to a non-clustered configuration. A value of 0 or 1 indicates a normal nonclustered calculation. Sets the name of the machine file that contains the list of cluster hosts to be used. This setting is optional, and if not used, the standard list of machines from the Cluster Settings dialog will be used.

qfind_cluster_machinefile

As an example, to start a Q-Finder calculation with four processes on the two dual-core machines scylla and
charibdis, type the following: qfinder.exe qfind_cluster_np=4 qfind_cluster_machinefile=mymachines.txt

where the contents of the file mymachines.txt is:


scylla charibdis

Calculating Power Fluxes and Partial Qs


To this point, we have concentrated solely on the total Q describing the total loss rate of energy from the cavity. In some applications, it can be useful to separately evaluate the energy lost through different channels. For example, for cavities in photonic crystal slabs, it is common to separately consider the in-plane losses due to leakage through the crystal, and the out-of-plane losses due to wave-vector components of the field that lie above the light line of the slab. The energy lost through each channel can be associated with its own Q. We will term such a quantity a partial Q with

Qpartial,i = 2

Total stored energy Energy lost per oscillation through channel i 1 1 1 1 = + + + Qtotal Q1 Q2 Q3

Partial Qs add up like resistors in parallel:

Q-Finder is able to calculate partial Qs. The idea is to identify a single energy density monitor as the dominant or representative energy. If there is more than one energy monitor present, the one that samples the largest fraction of the simulation domain is considered the dominant monitor. All power monitors in the domain are then considered to measure energy leaking away from the dominant energy monitor. Q-Finder automatically calculates a partial Q for each power monitor it finds. For example, for a 3D calculation of a PC slab membrane, it would be appropriate to define a 3D energy density monitor that matches the membrane region. Power monitors can be placed along each face of the membrane.

102 Chapter 9: Computing Cavity Mode Profiles and Q Factors

FullWAVE 6.0 User Guide

Note that these calculations can only be performed in the energy-decay configuration, since they require the launch of a resonant field profile. It should also be noted that for high Q cavities, the calculation of partial Qs is often quite susceptible to cancellation problems, and it can be challenging to obtain good results.

Scanning and Convergence


Like all tools in RSofts Photonic Component Design Suite, the Q-Finder can be operated from within MOST to perform scanning and optimization. To activate Q-Finder within MOST, select the entry FullWAVE Q-Finder for the simulation tool. There are a number of standard measurements for quantities such as the complex, real and imaginary resonant frequency, the Q as calculated by FHA or energy decay, and the mode volume.

FullWAVE 6.0 User Guide

Chapter 9: Computing Cavity Mode Profiles and Q Factors 103

Chapter 10: Basic Tutorials

This chapter contains several basic tutorial examples which illustrate the basic use of the FullWAVE simulation engine. These tutorials are increasingly complex and many of them build on concepts established in earlier tutorials, it is important to perform them in order, even if a particular topic is of most interest to you. It is also recommended that users work through the basic tutorials provided in this chapter before moving to the advanced tutorials in Chapter 11. These tutorials do not have associated *.ind files.

Basic Tutorial 1: Basic 2D Simulation


This tutorial illustrates basic CAD layout features by creating a new circuit and demonstrates a sample workflow to perform a simulation and obtain simulation results. Our goal will be to layout and simulate the propagation of a mode at 1.55 m along a single 2D slab waveguide with a cladding index of 1, a core index of 1.5, and a width of 1 m. We will calculate the transmitted power along 10 m of this waveguide. This tutorial will introduce basic concepts about the RSoft CAD interface and the FullWAVE simulation engine that are critical for every user to understand; it is recommended that every new user work through this tutorial. For additional information about the RSoft CAD, please consult the CAD manual.

CAD Window Basics


We begin by opening up the RSoft CAD window. Windows users can do this via the Start menu and Linux users can issue the command xbcad at a command prompt. The CAD window, shown in Fig. 1, contains the following elements: A menubar near the top of the window The menubar allows access to various standard file and editing operations such as opening and saving index files and cutting and pasting waveguide components in a circuit. Two toolbars with icons just below the menubar The top two toolbars contains icons for these standard file and editing operations, viewing options, as well as other common functions.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 105

A toolbar along the left edge of the window The left toolbar contains icons for standard CAD operations such as selection and zooming, as well as icons for choosing the different waveguide components that can be added to the circuit. Additional icons control the simulation and related aspects of the program. A status line at the bottom of the window The status line provides information on the current layout mode, along with coordinate display during drawing. For a complete description of the functionality of the RSoft CAD interface, please consult the CAD manual.

Figure 1: The RSoft CAD program window, showing the menubar at the top, the top and left toolbars, and the status line at the bottom.

106 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Creating a New Circuit


To create a new circuit, click on the New Circuit icon in the top toolbar (the leftmost icon on the top toolbar). Alternatively, choose File/New from the menu. The startup dialog appears, as shown in Fig. 2. This dialog requests basic information about the circuit to be modeled, including the wavelength of the light, the background refractive index, the default index change between the background material and the structure, and the approximate overall dimensions of the device. It should be noted that this dialog is also used for RSofts other packages and so all fields are not applicable to a FullWAVE simulation.

Choosing Initial Settings:


For this simulation, we will use the following settings: Parameter Value
Simulation Tool Model Dimension Free Space Wavelength

Description Indicates that the FullWAVE simulation engine should be used for this simulation. Indicates that a 2D simulation should be performed. This is the global wavelength (in m) to be used for the simulation. For a CW simulation, this represents the driving wavelength, and for a Pulsed simulation this represents the center wavelength. This represents the real refractive index of the background material where no structure has been defined. This represents the default difference between a component and the background material. In this case this means that the structure will have an index of 1.5. This is simply the default value to be used for a component; each component can have a unique value if desired. This represents the default width of a component in m. This is simply the default value to be used for a component; each component can have a unique value if desired.

FullWAVE 2D
1.55

Background Index Index Difference

1.0 0.5

Component Width

1.0

Once these settings are made, click OK to continue. Note that changes can be made to these settings via the Global Settings dialog box which can be opened by clicking the Globe icon in the left toolbar.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 107

Figure 2: The startup dialog which appears whenever a new circuit is created, and requests basic information about the circuit to be modeled.

The Layout Window:


A layout window is created within the main CAD program window, as shown in Fig. 3. A coarse coordinate grid is indicated by dots, and the X and Z axes are indicated by light gray lines. When the mouse is moved into the layout window, the cursor becomes a cross-hair, and the coordinate display in the status line indicates the mouse position in real coordinates [m].

108 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Figure 3:

The layout window where waveguide components are added to the circuit.

Creating Variables via the Symbol Table


An important concept in the RSoft CAD is the Symbol Table. The Symbol Table allows the user to create/modify both built-in and user-defined variables. These variables can be used to define virtually any parameter within the CAD. Each symbol can be a function of any other symbol, creating a parametric design environment. The Symbol Table can be opened via the Edit Symbols icon in the CAD window. Figure 4 shows the symbol table for this design file which contains several symbols already defined that correspond to the settings made in the New Circuit dialog box above.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 109

Figure 4: The Symbol Table Editor. The variable Length has been defined with a value of 10.

In this tutorial, we are going to create a variable which will be used to set the length of our slab waveguide. Define a symbol Length, and set it equal to 10. To do this, click New Symbol, enter the symbol Name (Length) and Value (10), and then click Accept Symbol. The variable Length should now appear in the symbol table. The names of symbols in the symbol table are case-sensitive. Also, symbols which begin with a capital letter are displayed at the top of the list, and so it is recommended that any user-created variables start with a capital letter so that they will be easier to find in the symbol table.

Adding the Waveguide


We can now add the waveguide structure to the CAD layout window.

Drawing the Waveguide:


The CAD has several convenient ways to add a component. For this tutorial we choose the straight waveguide component, or Segment Mode, which has already been selected on the left toolbar by default. To draw the waveguide, move the cross-hair cursor to the beginning of the straight waveguide section, which we will conveniently locate at coordinates (X=0, Z=0). After positioning the cursor, press but do not release the left mouse button. Now move the cursor to the end of the straight waveguide section, located around the coordinates (X=0, Z=10). We will fix the length of this waveguide segment using the variable we defined previously. As you move the cursor, the center line of the waveguide is repeatedly drawn in blue and erased (this process is termed rubberbanding), and the status line coordinate display is continuously updated. When the cursor is positioned at the desired end point, release the mouse button. The waveguide segment is drawn as shown in Fig. 5, with the center line displayed in black, the left and right edges in dark red, and the interior in light red. If a mistake is made when adding any waveguide component, simply click on the Undo Last Change icon in the top toolbar (the reversing arrow), and the waveguide circuit will be restored to its previous state.

110 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Figure 5: A straight waveguide segment as it appears after drawing, with the center line drawn in black, the left and right edges in dark red, and the interior in light red. The simulation domain and launch field are also shown.

Setting the Length of the Waveguide:


For this example, we are going to set the length of the waveguide to 10 m. Open the Segment Properties box for this waveguide by right clicking on the segment in the CAD window. The dialog box shown in Fig. 6 will appear. This dialog box enables the user to set the waveguide properties such as refractive index and waveguide geometry for the waveguide we have drawn. The CAD is an object oriented design environment which so each segment can has a different Segment Properties dialog box, and therefore a different set of parameters. For the purposes of this example, we will not explore each the use of all the fields in this dialog. A detailed description of this dialog can be found in Chapter 5 of the CAD manual.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 111

Figure 6: The Segment Properties dialog box for the waveguide segment in this design.

In order to set the length of this segment, make sure the Reference Type of the Z coordinate of the Ending Vertex to be Offset, and Relative To: the starting vertex of Component 1. This tells the software that the Z coordinate of the ending vertex of this segment, or Segment #1, should be computed as an offset from the starting vertex, or vertex 0, of this segment, or component 1. This offset will therefore equal the length of the segment. To set the offset, which is the length in this case, set the Offset Value equal to the variable Length we previously defined. The dialog box should now appear as in Fig 6. You may notice that the waveguide you have drawn does not have the same shape as the waveguide shown in Fig. 5. This is most likely due to the aspect ratio and viewing window of the CAD display, To set the aspect ratio to 1:1, use the pulldown menu on the view toolbar. To view the entire structure, click the View/Full button in the view toolbar. In general, the next step would be to continue to add elements to the CAD layout in order to create the desired device. This process is described further in the CAD manual. For the purposes of this example, there are no more elements to add.

Choosing the Excitation


The excitation, or launch field, has two main aspects: a temporal aspect and a spatial aspect. The properties of the launch field are controlled via the Launch Parameters dialog (opened via the Edit Launch Field button on the left toolbar in the CAD). Several aspects of the launch field can also be set via the FullWAVE Simulation Parameters window (opened via the Perform Simulation button on the left toolbar) as a convenience. In this tutorial, we will launch the fundamental mode of this waveguide at 1.55 m. with a CW modulation. We will set the spatial aspects of the field in the Launch Parameters dialog, and the temporal aspects in the FullWAVE Simulation Parameters dialog.

112 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

The Spatial Aspect:


This spatial aspect of our launch field should be the fundamental mode of the waveguide component we have created. Since this a simple 2D slab structure, FullWAVE can calculate an analytical mode solution. Had this been a more complicated structure, we would have to either calculate the mode using the built-in mode solvers or another software package, and then launched the mode as a data file. To set the launch field to the analytically calculated mode profile, click the Edit Launch Field button on the left toolbar in the CAD to open the Launch Parameters dialog.

Figure 7: The Launch Parameters dialog.

In this case, the default launch settings are correct. However, it is useful to point out the pertinent settings: Option Value Description
Type Mode Pathway Slab Mode 0 0 (unset)

This indicates that an analytical slab mode should be launched. This indicates that the fundamental mode should be used. The pathway used to compute the properties of the launch field, including effective index, width, and position of the slab mode to be launched. By default, FullWAVE will choose the waveguide with the lowest Z position in the design for the launch position. This behavior can be changed by defining a pathway for the launch, or by directly setting the field parameters (such as index, width, and position) listed. More information can be found in the CAD manual.

A complete description of the options in this dialog can be found in Chapter 5.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 113

The Temporal Aspect:


The temporal aspect of the launch field describes how the field varies in time. For purposes of this tutorial, we will use a Continuous Wave, or CW, excitation. To set this, we will use the global setting in the FullWAVE Simulation Parameters dialog. This dialog can be opened by clicking the Perform Simulation button on the left toolbar in the CAD. The excitation could also be set locally in the FDTD Options section of the Launch Parameters dialog, but it is better to use the global definition provided in the FullWAVE Simulation Parameters dialog. The local setting should only be used when multiple launch fields are present with different excitations.

Figure 8: The FullWAVE Simulation Parameters dialog where the Default Launch settings are located. This dialog also controls the numeric simulation options discussed below.

Again the default setting of CW for Excitation is correct. Even though the setup is not complete, click OK to run the simulation. The FullWAVE simulation window will open showing the field propagating in the waveguide created. When the simulation is complete, close the window and return to the CAD window. Once the setup is complete the simulation will be performed again and the results saved.

114 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Alternatively, you could also click the Save Settings button and then the Cancel button to return the CAD window without performing the simulation. This is useful when setting up the default launch settings or numeric simulation parameters without performing a simulation.

Adding a Time Monitor


FullWAVE time monitors allow measurements to be made during a simulation for later viewing or processing. To add a time monitor to the layout, use the Time Monitor drawing mode in the left CAD toolbar. After drawing the monitor, right click on the monitor to open its properties dialog as shown in Fig. 9.

Figure 9: The properties dialog for a time monitor.

This dialog allows for many different types of data to be saved, as well as frequency analysis to be performed. More information on time monitors can be found in Chapter 6 and the next tutorials. For purposes of this tutorial, we will calculate the power in the waveguide slab mode at a specific position as a function of time. To do this, set the Temporal Output to Overlap. This will calculate the overlap of the propagating field with the launch field. We will measure the transmitted power at 1 m before the end of the waveguide. To do this, set the Z Reference Type to Offset, the Z Offset Value to -1, and the Relative To the ending vertex of Component 1, as shown in Fig. 6. Click OK to return to the CAD window. The time monitor will appear as a green line at the end of the waveguide as shown in Fig. 10.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 115

Figure 10: The completed structure in the CAD with the time monitor created.

Performing the Simulation


Once the layout and analysis setup is complete, we can initiate a simulation by clicking the Perform Simulation button on the left toolbar to open the FullWAVE Simulation Parameters dialog. This is the same dialog that was used to set the default launch parameters. This dialog allows the basic parameters required for a numerical simulation such as the spatial and temporal grid to be entered, and controls other important aspects of the simulation as well. Intelligent values for parameters such as grid sizes are automatically computed by the program based on the device being modeled, and are entered as defaults. When performing an actual design, it is important to perform a convergence study with the numerical parameters to ensure that accurate results are obtained.

116 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

At this point you can choose to use the default values, or enter a different value for any parameter. For this tutorial, we will change the Grid Size values from their default of 0.02 m to a slightly larger value of 0.05 m so that the simulation will run faster. To do this, first locate the entry field corresponding to the current value of the grid size along X. Next, move the mouse cursor into this field and click on it in order to make it active. Now edit the field by deleting the value 0.02 and entering the value 0.05. Repeat this for the grid size along Z. In order to calculate the guided power, we need to run the simulation long enough so that the field reaches steady-state at the time monitor. Set the Stop Time to 20. Also, to save simulation results, enter a prefix such as test in the Output Prefix field of the simulation parameters dialog and select the desired data files via the Outputbutton. This will save results to disk in files whose names start with the prefix entered. We will open the saved results later in the tutorial. The default values for the rest of the settings are sufficient for this tutorial. Once the numerical parameters are set, click the OK button to begin the simulation.

The Simulation Window


After a simulation is initiated, the computation begins in a new window separate from the main program, as shown in Fig. 8. The graphical display shows a color-coded contour plot of the optical field which is updated at the time interval specified in the Update Time field of the FullWAVE Simulation Parameters dialog as well as the time domain results of the time monitors. The simulation program runs as a background task, so that you can switch away to another program, or back to the main program to edit another structure or begin another simulation. When the simulation is finished, the titlebar of the simulation program indicates Computation Completed, and displays the coordinates of the cursor for reference.

Figure 11: The separate simulation program, after simulating the waveguide structure. The graphical display shows a color-coded contour plot of the optical field.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 117

Accessing Saved Data


All data saved by FullWAVE is in ASCII format, and so it is easy to access. For most output, two files are created: a raw data file, and a plotting command file that instructs the WinPLOT plotting program how to display the data. Generally, plotting command files have an extension that starts with the character p.

Opening Plots:
To view or print the saved simulation results, click on the View Graphs icon in the top toolbar of the CAD window (the yellow graph), and select the desired graph from the dialog that is presented. In this case, several plotting files with the Output Prefix entered should be present, including test.ptm. This file contains the output from the time monitor that we created. Choose this file and click OK to open it. A WinPLOT window which will show the time monitor data. The mouse can be used to zoom in the graph to areas of interest. To zoom out again, simply right-click.

Figure 12: A WinPLOT window which shows the time monitor result for this simulation. Note that the data saved is normalized to the input power, and so a value of 1 corresponds to perfect transmission. Furthermore, the stored data is in field unit; however, the data is squared before display. See the next sections for more details.

Viewing the Plotting Commands:


The plotting command file test.ptm that was opened in WinPLOT is actually just a text file that contains plotting commands. To view this file, either open it in a text editor, or click the View Editor button in the WinPLOT window. The contents of this file are shown in Fig. 13. These commands indicate the axis labels to use, the legend text, as well as the raw data file test.tmn. The command /powy2 squares the date before display. Clicking the View Plot button returns the view to the plot.

118 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Figure 13: The plotting commands contained in the file test.ptm used to display the time monitor data stored in the file test.tmn.

Descriptions for these and other plotting commands can be found in the WinPLOT manual.

Viewing the Raw Data:


The raw data file test.tmn can be opened in any text editor, and contains two columns: the first shows the time coordinate in units of m (cT); the second shows the time monitor result.

Figure 14: The raw data produced by this simulation.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 119

Viewing other Types of Output:


Most other types of output produced by FullWAVE are parallel to the time monitor output discussed in this section. A detailed description of a FullWAVE time monitor can be found in Chapter 6, and examples of several output types are given in the next tutorials.

Areas for Further Exploration:


Several areas to explore include: Viewing Different Field Components Different field components can be viewed by using the buttons in the simulation toolbar. Note that since this is a 2D simulation, not all components will be available. Producing Time-Averaged Output: In the above example we used an instantaneous time monitor. To see a time averaged result, go to the time monitor properties box and set Time Average to Yes. A moving-window average over the last period is used will be averaged over the last period. This is useful when studying the steady-state performance of a system as the monitor results If you want both averaged and non-averaged data saved, then you will need to create two monitors at the same location. Showing the Structure Outline: It can be useful to display the structure outline in the simulation window. To do this, open the FullWAVE Simulation Parameters dialog and click the Display button. Set the Outline Color to Default and click OK twice to perform the simulation. The structure outline will now be displayed in the simulation window. Changing the Display Aspect Ratio During a Simulation: To change the display aspect ration during a simulation, open the FullWAVE Simulation Parameters dialog and click the Display button. Set the Plot Aspect Ratio to the desired value. The value of default corresponds to a value which maximizes the size of the simulation display. Changing the Color Scale A color scale is used to map the field values displayed during a simulation to particular colors for display. To change the color scale used, open the FullWAVE Simulation Parameters dialog and set the Color Scale field to the desired file. The Scale Files button can be used to locate the color scale needed. For information regarding the use and creation of color scale files can be found in an Appendix in the CAD manual.

120 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Basic Tutorial 2: Basic 3D Simulation


This tutorial illustrates a basic 3D FullWAVE simulation. Our goal will be to layout and simulate the propagation of a mode at 1.55 m along a fiber with a cladding index of 1.0, a core index of 1.5, and a diameter of 1 m. We will calculate the transmitted power along 2 m of this fiber. This tutorial will introduce basic concepts for a 3D simulation. Familiarity with the concepts presented in Basic Tutorial 1 are assumed. If you have not already read through Basic utorial 1, please do so now.

3D Specific CAD Options


We begin by opening up the RSoft CAD window. A 3D simulation not only requires the settings for a 2D simulation as well as several new settings such as 3D Structure Type and Component Height. Also, note that the definition of polarization is different. Click the New Circuit icon in the top toolbar and make the following settings: Parameter
Simulation Tool Model Dimension Free Space Wavelength

Value FullWAVE 3D
1.55

Description Indicates that the FullWAVE simulation engine should be used for this simulation. Indicates that a 3D simulation should be performed. This is the global wavelength (in m) to be used for the simulation. For a CW simulation, this represents the driving wavelength, and for a Pulsed simulation this represents the center wavelength. This represents the real refractive index of the background material where no structure has been defined. This represents the default difference between a component and the background material. In this case this means that the structure will have an index of 1.5. This is simply the default value to be used for a component; each component can have a unique value if desired. This option sets the profile to be used for 3D components. The choice Fiber indicates that, by default, a component should have a circular cross section with a horizontal and vertical diameter given by the Component Width and Component Height fields respectively. By setting these fields equal, a circular cross-section is achieved. This represents the default width of a component in m. This is simply the default value to be used for a component; each component can have a unique value if desired. This represents the default height of a component in

Background Index

1.0

Index Difference

0.5

3D Structure Type

Fiber

Component Width

1.0

Component Height

width

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 121

m. This is simply the default value to be used for a component; each component can have a unique value if desired. The variable width is the built-in variable which corresponds to the value of the Component Width field. Once these settings are made, click OK to continue.

Figure 1: The Startup Window where which appears whenever a new circuit is created, and requests basic information about the circuit to be modeled. This information can be modified later through the Global Settings dialog.

Creating Variables
For this design we will create a variable which sets the length of our fiber segment. Click the Edit Symbols button on the left toolbar and create a symbol Length with a value of 2 m. The symbol table should appear as shown in Fig. 2.

122 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Figure 2: The Symbol Table Editor. The variable Length has been created with a value of 2 m.

Any variable in the symbol table can be set to be a function of any other variable. For example, the variable k0 is set to a value of (2*pi)*free_space_wavelength corresponding to the magnitude of the wavenumber k in free space at the wavelength value chosen. A complete list of built-in functions and constants for the CAD can be found in an Appendix in the CAD manual, and built-in constants for FullWAVE can be found in Appendix C of this manual.

Adding the Fiber Segment


To add the fiber segment, make sure you are in Segment Mode. The waveguide is drawn in the same way as a 2D simulation. This segment will have a circular cross-section because the 3D Structure Type is set to Fiber. More information about selecting a segments profile, including creating a user-defined profile, can be found in the CAD manual. Once the fiber segment has been created, we can set its length to the symbol Length (2 m) as desired. Right click on the segment to access its Segment Properties dialog, and set the starting vertex coordinates to (0,0) and the ending vertex to be Offset from the starting vertex by a value of (0, Length). When done, the dialog should appear as shown in Fig. 3.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 123

Figure 3: The Segment Properties dialog box for the fiber segment in this design.

Viewing the Structure in 3D


The default view of the structure in the CAD is along the Y axis (the XZ plane). However, the structure can be viewed along the X and Z axes individually, as well as along all three axes. To change this view, click the X, Y, and/or Z buttons in the view toolbar in the CAD. To enter multi-pane mode, click the 4P button; to return to single-pane mode, click the 1P button. More information about these views can be found in the CAD manual.

124 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Figure 4: The CAD window in multi-pane mode.

Checking the Index Profile


A good habit to learn is to check the index profile of your design in order to ensure that no mistakes have been made defining the geometry and refractive index. If any mistakes have been made, the results of any simulations cannot be trusted. The index profile can be calculated via the Compute Index Profile dialog shown in Fig. 5.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 125

Figure 5: The Compute Index Profile dialog.

To open this dialog, click the Compute Index Profile button on the left toolbar in the CAD. A complete description of this dialog can be found in the CAD manual. For purposes of this tutorial, the default settings are sufficient. However, note the following settings: Parameter Description
Grid Size

These fields set the calculation grid used for the simulation. These fields set the grid on which the index information is saved and displayed. For most calculations, it is best to set the slice grid sizes equal to the calculation grid sizes in order to best see the index stricture. This field sets the display type to be used for the index calculation. Setting this to Fixed at Z-Min computes the cross-sectional index profile at the Z value specified in the Z Domain Min field. This sets the output prefix to be used when saving data. The index profile is saved in simple ASCII format and can be opened with any text editor.

Slice Step

Display Mode

Output Prefix

Click OK to start the computation. When completed, the index profile will be displayed as shown in Fig. 6.

126 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Figure 6: The computed index profile. The fiber cross-section appears elliptical because the aspect ratio of the plot is not set to 1. This can be changed via the Plot Aspect Ratio option in the Display Options dialog.

Choosing the Excitation


The launch settings for this simulation are similar to those described in Tutorial 1 with one change: instead of an analytical slab mode we will launch an analytical fiber mode. This change is automatically made when the Model Dimension is changed from 2D to 3D, but if you want to open the Launch Parameters dialog and see this change, you may.

Adding a Time Monitor


In order to calculate the transmitted power along this fiber, we will use an overlap time monitor that takes measures the overlap between the propagating field and the analytical fiber mode that we are using as a launch field. The creation and setup of this time monitor is very similar to the time monitor used in Tutorial 1. Add a time monitor to the layout and set the Temporal Output to Overlap and set its position will be 0.1 m before the end of the fiber.

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 127

Figure 7: The properties dialog box for the time monitor.

Performing the Simulation


To initiate a simulation, click the Perform Simulation icon in the left toolbar. Like Tutorial 1, we are going to change the default Grid Size of 0.02 m to 0.05 m so the simulation will run faster. This should be done for the X, Y, and Z coordinates. When performing an actual design, it is important to perform a convergence study with the numerical parameters to ensure that accurate results are obtained. The rest of the parameters are fine left to their default values.

128 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Figure 8: The FullWAVE Simulation Parameters dialog where numeric simulation parameters are set.

Once the numerical parameters are set, enter an Output Prefix of test and click OK to begin the simulation.

Accessing Saved Data


The data saved from this simulation can be opened and viewed as described in Tutorial 1.

Areas for Further Exploration


Several areas to explore further include: Experiment with Different Index Profile Output Options: This tutorial used a Display Type of Fixed at Z-Min for the index computation. Other display types such as different cross-sections at arbitrary positions and 3D models can be used as well. Try computing the

FullWAVE 6.0 User Guide

Chapter 10: Basic Tutorials 129

index with different modes and see what type of output is created. The CAD manual details outlines the use of these modes. Change Field Component and Cross-Section Displayed During a Simulation The default field component displayed during a simulation and the type and position of the cross-section shown can be changed either via the controls in the Display Options dialog, or via the toolbar in the simulation window. Use the DataBROWSER to Quickly View All Output Data The RSoft DataBROWSER allows the user to quickly sort through the output files from a simulation. It can be accessed via the Launch DataBROWSER button on the top toolbar in the CAD. Please consult the DataBROWSER manual for more information.

130 Chapter 10: Basic Tutorials

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials

This chapter contains several advanced tutorial examples which illustrate the use of the FullWAVE simulation engine. Corresponding to each example there is one or more .ind and/or data files, which are located in the <rsoft_dir>\examples\FullWAVE\tutorial\ subdirectory. Unlike the basic tutorials in Chapter 10, these tutorials, except where noted, do not need to be performed in any order. However, it is recommended that you perform the basic tutorials in Chapter 10 before attempting to work through these tutorials as they explain basic concepts in more detail. While the following examples attempt to cover the key aspects of the software, the breadth of the package allows enormous flexibility in both the number of applications that can be covered as well as the approach used to tackle a given application. If you do not find your application adequately addressed by the following examples, please contact RSoft by emailing (info@rsoftdesign.com) or faxing (914-923-2169) a sketch of the problem and we will assist you in finding a solution if possible.

Tutorial 1: Ring Resonator


This tutorial discusses the creation and analysis of a ring resonator. A ring resonator is a very useful device that acts as a high Q filter for wavelength filtering applications. This type of device has many resonances which make it very useful to filer out many different wavelengths. In this tutorial, the steps needed to analyze a ring resonator are gone through step by step. First, the setup and layout of the device will be discussed. Then the beginning steps of a pulse analysis will be shown. Throughout this tutorial, special attention will be given to the simulation techniques and methods used, especially those associated with a pulsed simulation. A pulsed calculation is very useful for these types of devices as it can produce a spectral response and allows us to circumvent the lengthy process of running a parameter scan over the wavelength for CW cases. After the pulsed simulation is run, a CW simulation will be done at one resonant wavelength.

Device Layout:
The ring resonator we are going to study will consist of waveguides 0.2 m in width with and index of 3. We will be looking in detail at resonances around a wavelength of 2 m. To create this structure, open the CAD interface. Click on the New Circuit icon in the top toolbar. Make sure that the Simulation Tool is set to FullWAVE to perform a FullWAVE simulation. This dialog box sets the default information for the structure. Set the Free Space Wavelength to 2, the Component Width to 0.2, the Background Index to 1, and the Index Difference to 2 as shown below, and then press OK. These settings correspond to the waveguide properties that we want. Note that the default refractive index of the waveguides will equal the background index plus the index difference.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 131

Figure 1: The Startup Window where the default waveguide parameters such as refractive index and width are set.

Defining Variables
Before we start to draw the ring resonator, we are going to create several variables which will be used later to define various geometries of the structure. Click on the Edit Symbols icon and define the following variables: Gap = 0.2, L = 0.5, R = 1.7, R1 = R-width/2, and R2 = R+width/2. Once we draw the structure, we will be able to easily change important parts of the design, such as the ring radius and the gap between the bus waveguides and ring.

132 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 2: The Symbol Table Editor with the new variables defined. Note that variable names are case-sensitive.

Drawing the Structure


Next we will draw the segments. We will start by drawing a circular waveguide for the ring. We will first draw a disc and then put a hole in it. Select the Lens Mode from the left CAD toolbar, and draw a lens around (X,Z) = (0,0). Right click on the lens object to open the lens properties dialog. Change the Component Widthto 2*R2, Front Radius to R2 and Back Radius to R2. This will create a circular disc with a radius of R2. When this is done, press OK.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 133

Figure 3: Properties for Lens #1. This lens will form the outer portion of the circular waveguide in the ring resonator.

After clicking OK, the circular lens will be displayed in the CAD window as shown in Fig 4. You mave have to click the View/Full button in the view toolbar so that the display is the same.

Figure 4: The lens as seen in the CAD window.

We will now place a smaller concentric disc, with the index of the background, or air, on top of this one. Select the lens and make a copy of it. Do this by clicking on the Select Mode icon, and then left-clicking on the lens. Next, left-click on the Duplicate Selection icon in the top toolbar. Right click on the lens, and since this is a new second lens, the dialog box should be entitled Properties for Lens #2. Change the Component Width to 2*R1, Front Radius to R1, Back Radius to R1, the Index Difference to be 0, and the Display Color to Yellow. Also set the Merge Priorityto 1 which indicates that the index of the smaller circle will have priority over the index of the larger circle. The default behavior for overlapping segments is that the segment with the higher index will be chosen. However, since want the initial lens to have a hole in the middle of it, we want the second lens, which has the lower index, to be used. To force the program to do this, we give this lens a higher Priority Level.

134 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Click OK in this window and the next to return to the CAD window. We will now draw the bus waveguides. Click on the Segment Mode icon and draw a segment to the right by holding down the left mouse button while dragging the mouse. Right-click on the segment to access its Segment Properties dialog box in order to define its geometry. Set the Starting Vertex X to R2+Gap+width/2, set the Starting Vertex Z to -R2-L and set the Ending Vertex Z to be Offset from the starting vertex of Component 3with an Offset Value equal to 2*(R2+L) to set the length of the segment. Press OK. These values set the location of this waveguide offset from the ring by the distance specified by Gap in the symbol table.

Figure 5: The geometry settings for the first bus waveguide.

Now select the segment and make a copy of it. Do this by going to Select Mode and left- clicking on the straight segment. Next left-click on the Duplicate Segment icon. Right mouse click on the segment, and change the Starting Vertex X to -R2-Gap-width/2. This moves the second waveguide to the other side of the ring. Press OK in this window to see the completed structure.

Checking the Index Profile


To see the index profile of the ring, and what effect the priority level had on our structure, click on the Display Index Profile icon and pick the Display Mode to be ContourMap(XZ). Set the remaining parameters to the values shown in Fig. 6.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 135

Figure 6: The Compute Index Profile dialog box where the numerical parameters used to display the index profile are set.

Note that the Domain Min/Max and Grid Size values have been changed to better display the structure. The Slice Step allows the user to display only a subset of all the index information, and can be useful for large structures. In this case, we want to see the actual structure, so the Slice Grid is set to equal the Grid Size. Press OK to compute the index profile.

Figure 8: The computed index profile. The effect of the second rings higher priority is plainly visible.

136 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Adding Time Monitors


The next step is to insert time monitors into the design which will be useful later for our analysis purposes. We are going use two time monitors to measure the field which is transmitted and dropped. Select the Time Monitor mode from the left toolbar in the CAD, and add a monitor near the top of the left waveguide. Right click on the time monitor to open its properties dialog and change the X and Z vertex Reference Type to Offset, Z Offset Value to -0.5, X and Z vertex Relative To: to the ending vertex of Component 4. Finally, change the Temporal Output to Overlap, the Time Average to Auto, and the Frequency Analysis to FFT. This monitor is placed on the top of the leftmost waveguide, and will measure the field which exits the simulation domain in this waveguide. Also, by setting the time average to Auto and selecting FFT output, the time monitor will automatically switch between time averaging and no FFT output for a CW excitation, and not time averaged with FFT output for a pulsed excitation.

Figure 9: The settings for the first time monitor.

Now select the time monitor and make a copy of it. Do this by left clicking on the time monitor and pressing the Duplicate Selection icon. Next, right-click on the time monitor to access its properties window. Change the vertex paramters such that it is offset from the starting vertex of component 3 by a value of (X,Z) = (0, 0.5). This monitor is placed on the bottom of the rightmost waveguide, and will measure the field which exits the simulation domain in this waveguide. Press OK to return to the CAD window. In the CAD, the final layout of the ring resonator with two time monitors is displayed. The analysis of this ring resonator can now be undertaken. The two time monitors, ones at the top of the left segment and the other at the bottom of the right segment, will be able to output an analyisis at both outputs.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 137

Figure 10: The completed ring resonator structure with time monitors.

Simulation: Pulsed Excitation


The rest of this tutorial will discuss the simulation and analysis of the ring resonator. We will first calculate a wavelength/frequency spectrum for the ring resonator, and then simulate the operation of the ring resonator at a resonant wavelength.

Launch Field
Before we can perform a simulation, we have to specify the spatial and temporal aspects of the launch field. We will set the spatial aspects now, and the temporal aspects later on. For this example, we want to launch a slab mode of the input port into the left waveguide. To indicate that we want this launch field to be input into the left waveguide, we need to define a pathway. Do this by clicking on the Edit Pathways icon and press New Pathway. Left click on the left segment and it will turn bright green. Then click OK. Noting that

138 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

we created Pathway #1, click the Edit Launch Field button and note that the Launch Pathway is set to 1. The Launch Typeis set to Slab Mode as we want, and so click OK to return to the CAD window.

Wavelength/Frequency Spectrum
Click on the Perform Simulation icon to set the simulation specific parameters. The Time Step has to be small enough to satisfy the Courant stability condition, and given the Grid Size values of 0.02 m we are going to use, set the Time Step to 0.0135. The Stop Time should be long enough to record the full time response of the system, as well as a multiple of 2 times the Time Step. This maximizes the efficiency of the FFT used to calculate the wavelength/frequency response. In this case, set the Stop Time to 2^13*fdtd_time_step. To decrease the simulation time, set the field Update Time to 10*fdtd_time_step so that graphical simulation window will only update every 10 time steps. Also, since we want to record the time response of the system at each time step, set the Monitor Time to fdtd_time_step. Finally, set the Excitation to Pulsed and enter an Output Prefix like ring_pulse1.

Figure 11: The FullWAVE Simulation Parameters dialog box.

Next, click the Output button. In the FDTD Output Options box, you can edit the output options. This box selects what files will be output if an Output Prefix is entered. Make sure that Temporal Output, Wavelength Output, and Frequency Output are set to Yes. Press OK to close this window.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 139

Next, press the Display button. Set the Outline Color to Black so that we can easily see the circuit outline in the simulation window. Press OK in this window and the next to run the simulation. The simulation will then run until the Stop Time is reached. When the simulation is complete, the pulse will have almost completely left the simulation domain, and you will see what is shown in Fig. 12. The lower plot shown in Fig. 12 shows the results from the time monitors.

Figure 12: The completed FDTD simulation window. The bottom graphs represent the information from the time monitors, and the pulse has almost completely left the simulation domain.

To view the wavelength spectrum, click on the View Graphs icon and select ring_pulse1.pwm.

Figure 13: The wavelength spectrum from the pulsed simulation of the ring resonator. The green line represents the through port, and the blue line represents the drop port.

140 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 14 shows the Fourier transform of the time response of this system, which is the wavelength response of the circuit. Note that the frequency spectrum can be found in the file ring_pulse1.pfm. However, the above graph has a very poor resolution, and in order to correct this, the Stop Time needs to be increased. This is because increasing the number of sample points increases the resolution of the Fourier transform.

Increasing the Resolution of the FFT


To increase the resolution of the FFT, we need to increase the number of sample points. Press the Perform Simulation icon and set the Stop Time to be 2^15*fdtd_time_step. Enter an Output Prefix like ring_pulse2 and then press OK. The graph ring_pulse2.pwm will have a better resolution as shown in Fig.15.

Figure 15: The wavelength spectrum of the ring resonator found by using a longer stop time contained in the file ring_pulse2.pwm.

Simulation: CW Excitation
In the pulsed simulation, we found the wavelength spectrum of the ring resonator (Fig. 15). For the CW excitation, we are going to focus on the resonance around 1.977 m.. To do this, we are going to set the central wavelength to this value and then run a CW simulation. In order to set the wavelength, press the Edit Global Settings icon and change the Free Space Wavelength to 1.977. Click on the Perform Simulation icon and change Excitation to CW. Also, change the Stop Time to 2^14*fdtd_time_step and enter a new Output Prefix, such as ring_cw. We will now look at the CW analysis of this system at this resonant wavelength. Press OK in the FDTD Simulation Parameters window to run the simulation and the CW analysis of the system.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 141

Figure 16: The CW time evolution of the ring resonator.

This CW simulation results shown above show that we are at a resonance of the system as the pulsed calculation predicted. We can see that the energy in the waveguide is building up and almost the entire field is propagating in the output waveguide. Thus, by utilizing both the pulsed and CW calculations, we have calculated the spectral response of this device and illustrated the CW operation of the device at a resonance.

142 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Tutorial 2: PBG Crystal: Square Lattice


This tutorial discusses the creation of photonic crystal lattices in the CAD interface, and then the analysis of these lattices using the FDTD method in FullWAVE. For this tutorial, a square photonic crystal lattice will be utilized. We will calculate the spectral response of this square lattice, and therefore reveal the presence of a band gap. This will be accomplished by taking the Fourier transform of the time response to obtain the frequency response of the system. This calculation will be performed twice, once with each of two boundary conditions: the PML and periodic boundary conditions. The use of both boundary conditions will be discussed. Familiarity with RSoft CAD tools is assumed throughout this tutorial.

Lattice layout
There are several ways to create a lattice structure in the CAD interface. The easiest way is to use one of the several layout utilities are included with FullWAVE in order to expedite the creation of these lattices. However, an arbitrary user-defined lattice can be created from scratch using the wide variety of CAD options. For this tutorial, we will create the square lattice using the Array Layout utility. For more information about this and the other layout utilities included, please consult the CAD manual.

Base Lattice Generation


For the first step, we will set up a square lattice using the array layout utility in the CAD window. In the CAD interface, choose Utility/Array Layout from the CAD menu and set the parameters as shown in Fig. 1.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 143

Figure 1: Array XZ layout settings.

This will create a 11 x 7 cubic array of circular objects. Press the OK button to generate the layout file named square_pbg.ind. You should be able to see the layout as in Fig. 2.

144 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 2: Array layout in the CAD window.

Lattice Customization
Press the Edit Global Settings button to define the properties of the lattice. In this example, we are going to assume that the circular rods are GaAs (n=3.4) and the background index to be air (n=1). Hence, we set the Background Index to 1 and the Index Difference to 2.4. Also, set the Free Space Wavelength to a value of Period/0.45 (the variable Period has been already created by the array generator utility, and equals the distance between two adjacent rods). By using these values, the wavelength of the launch field will be at the center of the band gap of the lattice when the pitch of the crystal is 0.6 m and the rod radius equals 0.18 m (to be set later). This corresponds to the known band gap for this type of lattice. This value is chosen to best illustrate the band gap. The Global Setting Window should appear as in Fig. 3. Press OK to accept and confirm the settings.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 145

Figure 3: Global Settings

Open the symbol table and set the variable Period to 0.6 and Radius to 0.18. This sets the crystal pitch and the rod radius as discussed before.

Checking the Index Profile


During the design process, it is a good habit to check the index distribution of the structure you are creating. In order to do this, press the Display Index Profile button and then set the Display Mode to ContourMap (XZ).

146 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 4: Index Profile computation settings.

Click OK to see the index profile as shown in Fig. 5.

Figure 5: Index distribution for lattice layout.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 147

Inserting Time Monitors


We will now insert a time monitor which will collect the time data necessary to obtain the frequency analysis. Choose Options/Insert/Time Monitors from the CAD menu. Set the position as shown in Fig. 6 and set the Temporal Outputto Default Field and Time Average to No. In addition, set Frequency Analysis to FFT.

Figure 6: Time Monitor Properties dialog box.

The time monitor is shifted from its original position to avoid picking up some of the incident energy from the origin of the field.

Launch Set Up
Particular attention must be paid to the launch settings. One should try to avoid launching the field at the symmetry points of the crystal. Press the Edit Launch Field icon and enter the values shown in Fig. 7.

148 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 7: Launch Setup window.

The Type has been selected as Gaussian, the Width to 0.2*PeriodX, the Position X to 0.34*PeriodX, and Position Z to domain_min+0.234*PeriodZ which places the launch just in front of the Z domain minimum. We will set up the position along the Z axis later.

Simulation
At this point everything is ready to perform the simulation. Press the Perform Simulation icon and the simulation parameter window will come up. Next, set up the following variables in the simulation window:
Grid Size in X Grid Size in Z Time Step Stop Time Update Time Polarization Excitation Pulse Time 0.02 0.02 0.01 2^16*fdtd_time_step 100*fdtd_time_step

TE Pulsed
lambda/2

Note that the stop time is set to a power of 2 of the time step. This is because the Fourier transform that is to be performed for the spectral response is more efficient if a power of two number of step is calculated. The most efficient

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 149

way to set up this case is to simply make the stop time a power of 2 multiplied by the time step. In this way, there is a power of two time steps. The Update Time has been set to 100 multiplied by the Time Step. This indicates that the graphical display of the fields will be updated every 100 time steps, and will speed up the simulation. The Excitation has been set to Pulsed in order to obtain the spectral response. The Pulse Time has also been set to lambda/2. When a Fourier transform is performed, the bandwidth is increased in the frequency domain if the pulse is narrowed in the time domain. Thus, by reducing this parameter, we increase the width of the spectral response we can obtain in the frequency domain. Once everything has been set up properly, the simulation window will appear as in Fig. 8

Figure 8: The FullWAVE Simulation Parameters dialog box.

We must select now what kind of output files we want to save. Since we are interested in the spectrum analysis, we will select to generate the Frequency Output. Click on the Output button to open the FDTD Output Options window (Fig. 9) where it is possible to select the desired output. This setting indicates that the Fourier transform of the time response will be taken and saved. Press OK.

150 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 9: FDTD Output Option window.

Once back in the main simulation window, enter an Output Prefix such as square_pbg_te and press OK. FullWAVE opens a simulation window and will propagate the field. At the end of the simulation, the spectrum analysis will be performed on the time response and the appropriate data files will be saved. While the simulation is running, it will be a good idea to save the current design file as square_pbg.ind. It is not only a good habit to save your work to prevent a loss of data, but this file will be used in the next tutorial.

Data Analysis
When the simulation has been completed, press the WinPLOT button in the CAD window and open the file square_pbg_te.pfm. At this point we need to change some commands in the plot edit window because we want to plot the data normalize the abscissa as a/2c. To do this, we need to change the axis label and then renormalize the data. To do this, press the View Editor button and replace this line
/xl"Frequency"

with:
/xl"&wa/2&pc" (This will rename the abscissa axis label).

Since the data is in units of f/c, we need to rescale the abscissa to get the right plot. We need to scale by a, where a is the lattice pitch that is equal to the variable we defined (Period=0.6). The follow command performs the scaling:
/u1 (hide launch FFT plot)

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 151

/sx0.6 (scale the abscissa)

At this point we can zoom in manually or input the following command in the edit window (just before the data file name):
/w0.2,0.85,0,.1

When these changes have been made, press the View Plot icon to bring up the rescaled plot shown in Fig. 10.

Figure 10: a) Frequency response for the PBG lattice. b) plot commands used to create a).

From Fig. 10, we notice a band gap between the normalized frequency values 0.42 and 0.52. We have now found one of several band gaps in which frequencies cannot be supported in this lattice structure.

Switching Polarization
It is interesting to repeat the simulation by changing polarization from TE to TM. To change the polarization of the launched field, press the Perform Simulation button and change Polarization to TM and change the Output Prefix to square_pbg_tm and press OK. Using WinPLOT, open the file square_pbg_tm.pfm and make the same changes as seen above for the file square_pbg_te.pfm we made above. You should be able to see the following plot (Fig. 11):

152 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 11: Frequency analysis of TM launched radiation.

As one can see from Fig. 12, there is no band-gap for TM radiation in correspondence to the previous range of frequencies.

Periodic Boundary Condition Set Up


Since the structure is periodic in both the X and Z directions, it is useful to use one powerful feature incorporated into FullWAVE: the Periodic Boundary Condition (PBC). This will get us the same results but will use less memory and time. The use of the PBC implies the existence of a unit cell that will be repeated infinitely in the direction of the periodicity. In our case the periodicity exist in both X and Z direction. This method is useful when simulating crystals that extend out into infinity. The boundary condition type is set via the Advanced button located in the FullWAVE Simulation Parameters dialog. Once this is done, we can set up the unit cell that will define the boundaries of our computational domain.

Setting the Boundary Type and Location


Click the Perform Simulation icon, then click the Advanced button to open the FDTD Advanced Parameters dialog. Set the Boundary Conditions to Periodic as shown in Fig. 12.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 153

Figure 12: The FDTD Advanced Parameters dialog where the boundary conditions are set.

Next we have to define the unit cell. Since we have used the Array Layout generator to create the layout, all of the variables used to define the unit cell have been defined. Open the Symbol Table editor and modify the following variables:

Variable
NX NZ

Value
5 5

Description
Number of unit cells in X Number of unit cells in Z

The above values of NX and NZ, along with the Domain values pre-defined by the Array Layout Utility, provide the correct boundary positions such that the domain can be extended periodically via periodic boundary conditions to recapture the original lattice structure. Save these changes by clicking the Save Settings button, and then click Cancel to return to the CAD window. To be sure that the our unit cell has been set up properly, hit the Compute Index Profile button and press OK.

154 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 13: The unit cell after setting the PBC.


The reason because we are choosing a 6x6 unit cell is that by doing this, we can excite more frequencies in the periodic lattice. We will now perform the simulation for both TE and TM polarizations.

Setting the Launch Condition


Next, we have to define the launch condition to be used with periodic boundary conditions. We will use a current source, which will simulate a point source. Click the Launch Parameters button, and change the Spatial Excitation Type to Current. Click OK to return to the CAD interface. Next, click the Perform Simulation icon and change the Excitation to Impulse.

Running the Simulation


Change the polarization to TE and rerun the simulation with an Output Prefix of square_pbg_pbc_te and then press OK. At the end of the simulation we need to make the same changes to the edit window of the generated plot as in Fig. 10 to realize the plot shown in Fig. 14.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 155

Figure 14: Band Gap calculated using PBCs.

Change the polarization to TM rerun the simulation with an Output Prefix of square_pbg_pbc_tm and then press OK. At the end of the simulation we need to make the same normalization changes to the edit window of the generated plot as in Fig. 10 to realize the plot shown in Fig. 15.

Figure 15: Frequency analysis of TM launched field using the PBC.

156 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Tutorial 3: PBG Crystal: Tee Structure


In the previous tutorial, we found that there is a band gap between 0.4 to 0.5 in the normalized frequency range for the square lattice used. Light which is in the frequency range of a bandgap can therefore be guided along defects in that lattice. This tutorial will go through the process of creating a photonic bandgap T structure and the associated analysis. We are going to use the same lattice we used in the previous tutorial to illustrate this principle.

Device Layout
This tutorial will utilize the same basic 2D square lattice of rods used in the previous tutorial. Please consult the previous tutorial for instructions on creating such a lattice, and then continue with this tutorial. Open the file square_pbg.ind created in the last tutorial, and save it as pbg-tee.ind. Click the Select Mode icon on the left side of the CAD interface and select and delete rods until the structure appears as shown in Fig. 1.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 157

Figure 1: The finished pbg T-structure.

Simulation
Before running a simulation, we need to change some settings in this ind file.

Choosing the Wavelength


Go to the Global Setting window to set Free Space Wavelength to be 1.33 m. As we saw, the bandgap lies between 0.4 and 0.5 a/2c where a is the pitch between cells and equals 0.6 m for the TE polarization. If we choose the 0.45 point, the corresponding wavelength will be 1.33 m. Also, make sure the Polarization in the Global Settings window is set to TE.

Setting the Launch Condition


In the Launch Parameters window, set the Width to be PeriodX, Position X to be 0, and Position Z to be default. Tis will position the launch at the defect.

Choosing the Simulation Parameters


Click on the Perform Simulation icon and set the following parameters as: Field Value Description
Excitation Time Step Stop Time Update Time Grid Size in X Grid Size in Z

CW
grid_size/2 25 10*fdtd_time_step PeriodX/16

The time step has to satisfy the Courant Condition for a stable simulation. This is one acceptable value. The stop time has to be long enough to allow the field to completely traverse the structure. Update the simulation window every 10 time steps. Set 16 mesh points in one pitch (period) in X axis.

grid_size*PeriodZ/Perio Set 16 mesh points in one pitch (period) in Z axis. dX

Note that the domain parameters have already been set up in the previous tutorial, and so are not redefined here.

158 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 4: The FullWAVE Simulation Parameters dialog box.

Finally, click the Display button and set the Outline Color to Default. This setting will superimpose an outline of the structure over the fields during the simulation. Once there parameters are set, press the OK button in the simulation window to run the simulation. It is easy to see that the field is guided along the defect. This is because the frequency that is launched lies within the bandgap found in the previous tutorial. Finally, change the polarization to TM and rerun the simulation. For the TM mode, we find that the field is not confined to the defect area. This is because there is no bandgap at 1.33 m for the TM polarization of this PBG structure.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 159

Figure 5: The simulation window for the a) TE simulation and b) TM simulation.

160 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Tutorial 4: Manually Computing Cavity Modes and Q Factors of a PBG Cavity


This tutorial illustrates the computation of a cavity mode of a PBG lattice with a defect using FullWAVE, as well as its Q. It will cover the calculation of the cavity spectrum to determine the resonant frequencies, then determine the field profile at one resonant frequency, and then calculate its Q factor. This Q factor portion of this tutorial uses the manual method for computing Q with FullWAVE. Tutorial 7 illustrates the use of Q-Finder, an automated utility for computing Q factors. While it may be tempting to use the automated approach at first, it is recommended that you work through the manual method first in order to understand how the automated approach works.

Structure Overview
This structure is composed of a hexagonal array of air holes in a silica slab (n=3.37). The lattice constant a used is 0.4 m and a hole diameter of 0.65a. To create the defect, the center hole is removed. Defect modes will be looked for around a wavelength of 1.5 m.

Figure 1: The PBG structure with defect used in this tutorial. The lattice constant a is 0.4 m, and consists of a hexagonal array of air holes in a silica slab with index of 3.37.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 161

Creating the Structure in the CAD Environment


This structure will be created in the CAD by modifying the output of the Array Layout Utility. The utility can be opened via Utility/Array Layout in the CAD menu. A base 2D hexagonal array in the XZ plane can be created with the following settings: Parameter Value
Dimensions Lattice Type Lattice Size Unit Cell Contents

2D XZ Hexagonal L = 11, M = 11 Circle

Enter a Output Prefix of defect and click OK to create the file.

Defining Symbols
Next, press the Edit Symbols icon in the left toolbar and set/modify the following variables: Variable Value Description
Period Radius Nslab Nhole background_index delta polarization sim_tool 0.4 0.325*Period 3.37 1 Nslab Nhole-background_index 1 ST_FULLWAVE

Sets the period of the lattice. This variable was created by the Array Layout Utility. Sets the radius of the holes in the lattice. This variable was created by the Array Layout Utility. Sets the index of the slab. Sets the index of the holes Index of background material, which in this case is the slab. Index difference of hole objects. Sets the polarization of the simulation to TM. This sets FullWAVE as the simulation engine to be used. The Array Layout Utility automatically sets BandSOLVE. This is equivalent to setting this parameter in the Global Settings dialog.

To create the structure, delete objects until it appears as shown in Fig. 1.

Adding a Time Monitor


A time monitor will be used to record the time response of the system. Insert a time monitor to record the field with the following settings: Parameter Value Description
X Position Z Position Width 0.234*Period 0.411*Period Period

Sets the X position of the monitor Sets the Z position of the monitor Sets the width of the monitor. This option is not necessary, but it makes the layout window neater and avoids potential confusion.

These semi-random position values help avoid potentially placing the monitor at highly symmetric positions where nodes of defect modes are generally located. Once these settings have been made, the structure will appear as shown in Fig. 2.

162 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 2: The completed structure with time monitor seen in the CAD window.

Checking the Index Profile


Click the Compute Index Profile icon on the left toolbar and make the following changes: Parameter Value Description
Display Mode

Contour Map (XZ)


PeriodX/16

Sets the type of display used to show data. This choice corresponds to a contour plot of the index in the XZ plane. This sets the grid size along X used for computation so that each period along X has 16 grid points. The variable PeriodX was automatically created by the Array Layout Utility. This sets the display grid along X used for index calculations equal to the computation grid defined by the X Grid Size. This sets the grid size along Z used for computation so that each period along Z has 16 grid points. The variable PeriodZ was automatically created by the Array Layout Utility. This sets the display grid along Z used for index calculations equal to the computation grid defined by the Z Grid Size. Sets the X and Z domain minimum Sets the X and Z domain maximum

X Grid Step

X Slice Grid Z Grid Step

grid_size PeriodZ/16

Z Slice Grid X/Z Domain Min X/Z Domain Max

step_size -2.2 2.2

Next, click the Display button and set the following parameters: Parameter Value Description
Outline Color Aspect Ratio

Default
1

Displays the outline of the structure over the index profile. Sets the aspect ratio of displayed results. A setting of 1 is useful for square structures such as this.

Press OK twice to compute the index profile.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 163

Figure 3: The computed index profile of the defect structure.

Computing the Cavity Resonances


The calculation of a cavity mode can be broken into two main steps: finding the resonant frequency and then solving for the mode profile at this frequency. This section will discuss the computation of the cavity resonances; the next will discuss the computation of the mode profile. In order to find the resonances that a cavity supports, a wide range of frequencies must be excited and the frequency response of the cavity computed. The peaks in this response will represent frequencies at which the cavity supports modes.

Setting the Excitation


In order to excite a wide range of frequencies, an impulse excitation should be used. This type of excitation is a delta function in time, and therefore excites a large frequency range. Click the Perform Simulation icon on the left toolbar to open the FullWAVE Simulation Parameters dialog and set Excitation to Impulse. Like the position of the time monitor, the launch field should be placed at a position with low symmetry unless a certain symmetry is desired. Click the Launch button and set the following parameters:

164 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Parameter
Position X

Value
0

Description Sets the X position of the launch. Even though this value has high symmetry, it is used because the mode we will find is degenerate, and this value chooses the mode with desired symmetry. Sets the Z position of the launch. This sets the width of the launch field.

Position Z Width

0.2 Period

Performing the Simulation


In order to perform a mode computation, click the Advanced button in the FullWAVE Simulation Parameters dialog and enable the Compute Mode option. This indicates that the wavelength spectrum of the monitor results will be calculated, as well as the mode profile found at the Free Space Wavelength specified in the Global Settings dialog. Since we dont know the exact resonant frequency, we will not set the wavelength until we have examined the spectrum. Open the FullWAVE Simulation Parametsrs dialog and set the following parameters: Parameter
Stop Time Value (2^14)*fdtd_time_step

Description Sets the stop time. The stop time is defined to be a power of two multiplied by the Time Step, and therefore results a total number of time steps that is equal to the power of two. This will maximize the efficiency of the FFT used to calculate the wavelength spectrum. Sets the X PML width. Sets the Z PML width.

X PML Width Z PML Width

8*grid_size 8*step_size

The rest of the settings are correct for this simulation; enter an Output Prefix of mode and click OK to perform the simulation. Even though it looks like there is no activity in the simulation window beyond cT = 50 m, a longer stop time is needed to get better wavelength/frequency resolution in the Fourier transformation. The Free Space Wavelength setting in the Global Settings dialog was not a resonance of the structure, and so the mode calculated will not be an interesting mode. To find the resonances, we need to look at the wavelength spectrum.

Picking a Resonance
To view the frequency spectrum, click on the View Graphs icon on the top toolbar and select the file mode.pfm. Each of the peaks in this graph represent a resonance of the structure.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 165

Figure 4: a) The frequency spectrum found from the impulse simulation of the defect structure. The peak at 0.63479 m-1 represents a wavelength of 1.575 m

Computing a Cavity Mode Profile


For this example, we will compute the cavity mode profile for the resonance at 1.575 &mu; shown in Fig. 4. In order to calcualte the mode profile at this wavelength, change the Free Space Wavelength in the Global Settings dialog to 1.575. Also, enable the output of a FullWAVE state file by using the FDTD Continue option in the FDTD Advaned Parameters dialog. Though not necessary for the cavity mode compuation, it can be useful to save the computed mode in a FullWAVE state file for later use using the FDTD Continue option. This can be useful for measuing the Q of the mode as will be done later in this tutorial, or for other reasons. To compute the cavity mode, rerun the calculation with the same Output Prefix. At the end of the simulation, the mode plot is saved in the file mode.p00, the raw data for this component is contained in mode.m00, and the entire mode, including all field components, is contained in the state file mode.fst.

166 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 5: The Hy component of the computed cavity mode for this defect structure at the chosen resonance. The color scale used here is called fireice_white.scl and is included with the standard RSoft distribution.

Using Symmetric Boundary Conditions


The mode shown in Fig. 5 has even symmetry along the X axis and odd symmetry along the Z axis of the Hy field component. We can take advantage of this knowledge and accelerate subsequent calculations: we can obtain the same results on a domain of a quarter of the size resulting in a four-fold increase of effective simulation speed. Using the symmetry conditions chart for 2D TM polarization in Section 7.C.3, the symmetry properties of this mode require symmetric boundary conditions along X, and anti-symmetric boundary conditions along Z. As usual, PML conditions will be used on the outer edges of the domain. The choice of boundary symmetry is not intuitive; though this example requires symmetric boundary conditions for a symmetric field, this is not always the case. Always be sure to check the tables in Section 7.C.3. To implement these boundary conditions, open the FDTD Advanced Parameters dialog and set the X Min boundary setting to Symmetric, and the Z Min boundary setting to Anti-Symmetric. Also, set the X and Z Domain Min in the FullWAVE Simulation Parameters dialog to 0 since we will only simulate half the domain along both axes. The position of the time monitor and launch field were purposely chosen so that they would lie within the first quadrant (X > 0, Z > 0). If, for some reason, you placed them elsewhere, you will have to move them so that they lie within the reduced simulation domain. Re-calculating the mode on the reduced domain gives the same resonance in the wavelength spectrum, though some peaks may be missing if the modes they represent do not have the symmetry enforced by the boundary conditions.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 167

Figure 6: a) The frequency spectrum, and b) Hy component of the cavity mode found on the reduced domain. Note the same resonance at 0.63479 m-1 (1.575 m), and the similarity of the computed mode profile to the previous results.

Since the FDTD Continue option is enabled, the computed mode will be saved in a binary state file, mode.fst, assuming an Output Prefix of mode was used. This file contains all field information from the simulation, and can be relaunched into the simulation in order to measure its decay, and therefore the Q of the mode.

Computing the Q Factor


The calculation of Q is done by performing one final simulation which monitors the energy density inside the cavity as the mode decays in time. This section describes a manual method for Q computation; Chapter 9 describes several methods, and Tutorial 7 describes an automated method using the Q-Finder utility.

Letting the Resonance Decay


In order to measure the total energy within a volume, add a total energy density time monitor to the domain. The monitor should have the following parameters set: Parameter Value Description
Width inf

Sets the width (measured along X) of the monitor to infinity so that it effectively measures the entire simulation domain. Sets the length (measured along Z) of the monitor to infinity so that it measures the entire simulation domain. Sets the display width and length of the monitor to a finite value so that the CAD file is easier to manipulate. Enables the output of the total energy density. Enables the output of time average data for

Length

inf

CAD Display (Width & Length)

Time Monitor Type Time Average

T Density Yes

The position of the time monitor is not critical since it has an infinite size. Place it so that the majority of it lies within the simulation domain. Also, enable the Time Monitor output in the FDTD Output Options dialog since, by default, the time domain data is not output when using the Impulse excitation type.

168 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 7: The total energy density time monitor as seen in the CAD window.

Next, the mode we computed previously needs to be used as the initial field at t=0, and let to decay in time via the impulse excitation type. To do this, set the variable fdtd_excitation_file to mode.fst, our state file, and note that an excitation type of Impulse is already set. Also, since we do not want to compute the cavity mode, deactivate the Compute Mode setting in the FDTD Advanced Parameters dialog. Rerun the simulation with an Output Prefix of decay. The initial field profile should be the computed mode, and decay as the simulation progresses.

Measuring Energy Decay Constant


The simplest way to calculate Q is to measure the rate at which the energy decays. This can easily be accomplished by fitting the energy density monitor results to a decaying exponential ( >0) as described in Section 9.A.2:

U ( t ) = U 0 exp ( t )
The raw output data from the previous simulation is located in the file decay.tmn, and can be viewed by opening the file decay.ptm in WinPLOT. The decay constant can be measured by one of the following methods: Directly form the graph using the mouse Open the file decay.ptm with WinPLOT, and move the mouse over two points along the curve to measure the quantities U1 , U 2 , and t as illustrated in Fig. 8a. The decay constant can then given by the following:

=
From the raw data file decay.tmn

1 U 2 ln t U 1

The file decay.tmn contains the raw simulation output data. The values of U1 , U 2 , and t can be

directly measured from this file and used to calculate the decay constant . For this example, the first column contains the time, and the second data column (third column in the file) contains the energy monitor result. Also, note that a .tmn file actually records the square root of the energy and power, and so

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 169

these values should be squared before the calculation. The /powy2 command is used in the file decay.ptm to automatically to this when using WinPLOT to view the data. Using WinPLOTs curve fitting features WinPLOT can automatically fit an exponential curve to the data using built-in curve fitting features. The easiest way to use these features is via the command prompt. Open a command prompt in the current directory by selecting Utility/Terminal from the CAD menu, and issue the following command:
winplot /powy2 /u2 /fexp /foutcoeffs.fit decay.tmn

The command /powy2 is used for the same reason described in the previous method, and the command /u2 was used because the energy data is in the second column of decay.tmn. The constant 8b.

equals the value on the P1 line in the newly-created file coeffs.fit as shown in Fig.

These methods give a value of

= 0.001405.

Figure 8: Illustration of different methods described above for calculating the decay constant

a) Using the mouse or the raw

data in file decay.tmn. Note that only the total energy density monitor is shown here; the field monitor has been removed for clarity. b) The WinPLOT curve-fitting results in the file coeffs.fit.

Calculating the Q Value


As shown in Section 9.A.2, the Q value is given by

Q=
Given a value of

= 0.001405, the resonant frequency

= 1/ = 0.635, a value of Q = 2840 is obtained.

Note that a convergence study has not been performed, and so the value obtained may not be accurate. Also, since this is not a converged value, the Q value found here might differ from values you find due to improvements made to the FullWAVE algorithm. This underscores the importance of always performing a convergence study, as descrined below, to ensure accurate results.

170 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Areas for Further Exploration


There are several areas that can be explored further in this case. They are: Convergence study using a larger structure and/or finer Grid Sizes As always, the effect of grid sizes on the simulation results should be studied. The above computations, especially when finding the resonances, should be repeated for smaller grid sizes, and the accuracy compared: if comparable accuracy is obtained, the results are accurate; if there is a large difference, then successively smaller grids should be used until accurate results are found. Similarly, the size of the structure should be studied: a larger supercell that contains more periods of the lattice should be used: if the results are similar, then the smaller structure is adequate; if not, larger structures should be used until accurate results are found. Longer simulations for better frequency resolution The frequency resolution is directly related to the length, or number of time steps, in the simulation. Try rerunning the mode computation with a greater stop time and explore this relationship. A good way to do this is to increase the exponent for the power of 2 used to define the stop time: try (2^14)*fdtd_time_step, then (2^15)*fdtd_time_step, etc. Using Q-Finder This tutorial described the manual approach to solving for mode profiles and Q values. RSofts Q-Finder utility can automate much of this process. Q-Finder is described in Chapter 9, and Tutorial 7 gives examples of its use.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 171

Tutorial 5: Incorporating Material Dispersion for Dielectric and Metallic Materials


FullWAVE simulations with dispersion materials can be broadly broken into two main categories: simulations with only a single wavelength, and simulations with multiple wavelengths. Using a Single Wavelength When using a single wavelength, such as most simulations with a CW excitation, it is usually only necessary to define material properties at this wavelength. However, as we will see in the next section, it may still be necessary to enable some of FullWAVEs dispersion options to ensure accurate results. Also, note that this category includes parameter scans over wavelength since each step of the scan is at a single wavelength. Using Multiple Wavelengths When using multiple wavelengths, such as simulation with a pulsed or impulse simulation, or CW simulations with non-linear effects such as four-wave mixing, it is necessary to define material properties over the wavelength range used in the simulation. This tutorial assumes that the user is familiar with the methods outlined in Chapter 8 of the CAD manual used to define material dispersion in the CAD, and will give examples of each. The dispersive method used will depend on what type of FullWAVE simulation being performed, as well as the format of the material data available to the user. Examples and guidelines for each method will be given. Example files for this tutorial are located in the directory <rsoft_dir>\examples\FullWAVE\Tut5\.

Dispersion via the Single Value Method


The single value method simply defines the refractive index of a material to a single value that is valid for the simulation wavelength. This method is valid for simulations with one wavelength, and is not valid for parameter scans over wavelength with a CW excitation. Open the file single_value_method.ind. This file contains a waveguide with a refractive index equal to 1.5+2i. We will perform a simulation with a CW excitation.

Setting the Waveguide Parameters


Open the Symbol Table and note the following variables: Variable Value
Index alpha delta 1.5 2 Index-background_index

Description Real part of the imaginary index. Imaginary part of the refractive index. Index delta of waveguide.

Performing the Simulation


Click the Perform Simulation icon, and note the following settings: Option Value Description

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 173

Grid Size

0.05

This value, which is larger than the default, is chosen to result in a faster simulation. This sets the time at which the simulation stops. It was chosen so that the simulation will come to steady state. This places the Z domain minimum so that the launch field and the lower time monitor are included in the simulation. This places the Z domain maximum so that the upper time monitor is included in the simulation.

Stop Time

30

Z Domain Min

-1

Z Domain Max

Click OK to start the simulation. Note how the field is reflected from the waveguide like the example shown in Fig. 1b. It is important to note that for this specific example, it was necessary to enable the Dispersion/Non-Linearity option in the FullWAVE Simulation Parameters dialog since the material is lossy. Had it not been enabled, the simulation would have appeared as shown in Fig. 1.

Figure 1: An illustration of the effect of FullWAVEs built-in Drude dispersion model. These two simulations windows show the same structure with the model a) off and b) on.

Dispersion via the Expression Method


The expression method defines the refractive index of a material by a mathematical expression in the Symbol Table. This method is valid for simulations with one wavelength as well as parameter scans over wavelength since the wavelength with a CW excitation. Open the file expression_method.ind. This file contains a waveguide that is surrounded by air. The launch field is below the waveguide, and the monitor is above the waveguide. Because of this configuration, the waveguide will act as a resonant cavity. In this example, the waveguides refractive index as a function of wavelength via a mathematical expression. We will perform a series of simulations with a CW excitation with different excitation wavelengths to determine the frequency response of the system. While this could be accomplished by manually entering a different value of the index and performing a simulation via the single value method, the use of an expression and RSofts MOST scanning tool is a much more efficient approach.

174 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

For this example, we will use a waveguide composed of borosilicate crown glass (BK7). The Sellmeier Equation, which can be used to represent the dispersive properties of the material, is given by the following formula:

n 2 ( ) = 1 +
i

Bi 2 2 C i

This formula can be expressed in the symbol table as:


Index = sqrt(1+S1+S2+S3)

where S1, the first resonance, is equal to:


(B1*lambda^2)/(lambda^2-C1)

where B1 and C1 are the coefficients of the first resonance and lambda is the built-in variable that is equal to the simulation wavelength free_space_wavelength. The second and third resonances, S2 and S3, are similarly defined.

Creating the Expression in the Symbol Table


To view this model which has already been created in the Symbol Table. Open the Symbol Table and note the following variables: Variable Value Description
B1 B2 B3 C1 C2 C3 S1 S2 S3 Index alpha delta 1.03961212 0.231792344 1.01046945 0.00600069867 0.0200179144 103.560653 (B1*lambda^2)/(lambda^2-C1) (B2*lambda^2)/(lambda^2-C2) (B3*lambda^2)/(lambda^2-C3) sqrt(1+S1+S2+S3) 0 Index-background_index

Strength of first resonance. Strength of second resonance. Strength of third resonance. Location of first resonance. Location of second resonance. Location of third resonance. First resonance. Second resonance Third resonance. Index of material Loss coefficient. Index delta of waveguide.

The variable delta is used by default to describe the Index Difference of the waveguide. Also, note that this material only has a real refractive index; there is no loss coefficient. For other material systems, an expression can be used to define the loss as well.

Using a Time Monitor and the Simulation Properties


A time monitor is necessary to record simulation data. Note the time monitor in the simulation. It has been set up to record the time-averaged value of the field. Click the Perform Simulation icon, and note the following settings: Option Value Description
Grid Size0.05

This value, which is larger than the default, is chosen to result in a faster simulation. This sets the time at which the simulation stops. It was chosen so that the

Stop Time

30

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 175

simulation will come to steady state.


Update Time 1000*fdtd_time_step

This sets the time intervals at which the field display is updated during a simulation. This large value was chosen to result in a faster simulation. This places the Z domain minimum so that the launch field and the lower time monitor are included in the simulation. This places the Z domain maximum so that the upper time monitor is included in the simulation.

Z Domain Min

-1

Z Domain Max

Since we are going to us MOST to perform the wavelength scan, it is not necessary to run the simulation. Click Cancel to return to the CAD.

Using MOST to Scan Over the Wavelength


Press the Launch MOST icon to view the settings for this scan. The variable free_space_wavelength, which sets the simulation wavelength, will be scanned from 1.o to 2.0 m with 51 steps.

176 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 2: MOST scanning setup.

Press OK to start the scan. The program will proceed to iterate through each value of the wavelength. The refractive index of the waveguide will change for each simulation according to the function that is in the symbol table. By default MOST will produce a plot of the last monitor results vs. the scanned parameter. When the scan has completed, press the Open DataBROWSER icon in the MOST simulation window and open the results:.

Figure 3: MOST scan results from scan with index changing as a function described by an equation.

The oscillations of the resonant cavity can clearly be seen in Fig. 3. Also, since the refractive index of the cavity changes as a function of wavelength, the resonance response changes as well. It is important to note that for this specific example, it was not necessary to enable the Dispersion/Non-Linearity option since only one wavelength was simulated and the material was not lossy. Had the material been lossy, this option would have been needed.

Dispersion via the Data File Method


The data file method defines the refractive index of a material by a data file. This method is valid for simulations with one wavelength as well as parameter scans over wavelength since the wavelength with a CW excitation. Open the file data_file_method.ind. This file contains a waveguide composed of silicon that is surrounded by air. This structure is similar to the one used to illustrate the expression method, and will act as a resonant cavity. The waveguide has a width of 0.2 m and a length of 2 m. Two monitors are also present, one located at -0.75 m and the other at 2.2m. The launch field has a Launch Position Z of -0.5m so that the lower monitor it lies between the lower monitor and the waveguide so that the lower monitor only records the reflected field.

The Data File


The data file used in this example is silicon.txt, and is located in the same directory as the ind file for this design. This file contains the real refractive index of silicon between a wavelength of 1 and 2 m in a format described in Appendix B of the CAD manual.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 177

Figure 4: Data file with the real index of silicon.

This file can be incorporated into the CAD through the use of the userdata() function which is described in Appendix C of the CAD manual. Open the Symbol Table and note the definition of the variable delta as
delta = Index-background_index

where
Index = userdata(silicon.txt, lambda)

Simulation Parameters
Click the Perform Simulation icon, and note the following settings: Option Value Description
Grid Size0.02

This value, which is larger than the default, is chosen to result in a faster simulation. This sets the time at which the simulation stops. It was chosen so that the simulation will come to steady state. This sets the time intervals at which the field display is updated during a simulation. This large value was chosen to result in a faster simulation. This places the Z domain minimum so that the launch field and the lower time monitor are included in the simulation. This places the Z domain maximum so that the upper time monitor is included in the simulation.

Stop Time

100

Update Time

1000*fdtd_time_step

Z Domain Min

-1

Z Domain Max

2.5

178 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Since we are going to us MOST to perform the wavelength scan, it is not necessary to run the simulation. Click Cancel to return to the CAD.

Using MOST to Scan Over the Wavelength


Press the Launch MOST icon to view the settings for this scan. The variable free_space_wavelength, which sets the simulation wavelength, will be scanned from 1.o to 2.0 m with 101 steps.

Figure 5: MOST scanning setup.

Press OK to start the scan. The program will proceed to iterate through each value of the wavelength. The refractive index of the waveguide will change for each simulation according to the function that is in the symbol table. By default MOST will produce a plot of the last monitor results vs. the scanned parameter. When the scan has completed, press the Open DataBROWSER icon in the MOST simulation window and open the results:.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 179

Figure 6: MOST scan results from scan with index changing as a function described by a data file. The plot shows the reflected field from the waveguide.

The oscillations of the resonant cavity can clearly be seen in Fig. 3. Also, since the refractive index of the cavity changes as a function of wavelength, the resonance response changes as well. It is important to note that for this specific example, it was not necessary to enable the Dispersion/Non-Linearity option since only one wavelength was simulated and the material was not lossy. Had the material been lossy, this option would have been needed.

Dispersion via the Material Editor


RSofts Material Editor allows the user to create materials with complicated dispersive and non-linear properties. This method is valid for any type of simulation, including CW, pulsed, and Impulse excitations. When used in simulations of one wavelength, the waveguide will have the refractive index defined for that wavelength; when used in simulations of multiple wavelengths, the each wavelength in the simulation will see the appropriate refractive index. Open the file material_editor_method.ind. This file contains a waveguide that uses the Material Editor to define the dispersive properties of a waveguide. This material properties of the waveguide is based on the following reference: Aleksandar D. Rakic, Aleksandra B. Djurisic, Jovan M. Elazar, and Marian L. Majewski, Optical properties of metallic films for vertical-cavity optoelectronic devices, Applied Optics, 37, 5271 (1998). The waveguide will be excited with a pulse, and the transmitted and reflected field will be measured as a function of wavelength.

The Waveguide, Time Monitor, and Launch Field


The waveguide in this design file has a width of 10 m and a length of 0.2 m. Note that its Material Properties are set to Ag, and the Index Difference and Index (imag part) cannot be edited. This is because the properties of the waveguide are defined via the Material Editor.

180 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

This design contains two time monitors, one at a Z position of 0.1 and the other at 1.0, both positions outside of the waveguide. Both monitors have a Temporal Outputof Overlap, Time Average set to No, and Frequency Analysis set to FFT. These settings indicate that the FFT of the time response recorded by the monitor will be produced. The launch field has a Launch Type of Gaussian, aPosition X of 0.3, and a Launch Width to 4. This places the launch field between the lower monitor and the waveguide so that the lower monitor only records the reflected field.

Understanding the Dispersion Parameters in the Material Editor


To open the Material Editor either use the button in the left toolbar of the CAD or right click on the segment and then choose New Material under Material Properties. The Material Editor allows both the dispersive and non-linear characteristics of a material to be defined. The dispersive properties are defined as a sum of Lorenzian functions such as:

( ) = +
k

ak ( i ) bk ( i ) + ck
2

where

is the value of epsilon in the limit of infinite frequency,

k is the strength of each resonance, and ak, bk, and ck are fitting coefficients. The choice of these parameters sets the
type of resonance used. A detailed description of the Material Editor can be found in Chapter 8 of the CAD manual. Its use requires the Dispersion/Non-Linearity option to be enabled. In this case a silver material has been defined based on the parameters found in the reference above. Note that during the conversion, the parameters in the reference, which are given in units of electron-volts, need to be converted into radians/m.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 181

Figure 7: Dispersive Parameters of silver as seen in the Material Editor.

The refractive index can be viewed by clicking the Display button.

182 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 8: The complex valued refractive index as a function of frequency. Note that the x-axis is in inverse frequency, m-1.

Performing the Simulation


Click the Perform Simulation icon and note the following simulation parameters: Option Value Description
Grid Size 0.01

This value, which is larger than the default, is chosen to result in a faster simulation. This sets the time at which the simulation stops. It was chosen so that the number of time steps is a power of two. This maximizes the efficiency of the FFT used during the frequency analysis. This places the Z domain minimum so that the launch field and the lower time monitor are included in the simulation. This places the Z domain maximum so that the upper time monitor is included in the simulation.

Stop Time

2^12*fdtd_time_step

Z Domain Min

Z Domain Max

1.5

Enter an Output File Prefix such as pulse and press OK to start the simulation. During the simulation the time monitors will record the time response of the simulation, and, when the simulation is completed, the frequency response will be computed. Click the View Graphs button and open the file pulse.pfm.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 183

Figure 9: Frequency response of the dispersive system. The blue line corresponds to the transmitted field, the green line to the reflected field, and the red line to the source spectrum.

The frequency results, shown in Fig. ???, show that there is a peak transmission at 10m-1, or a wavelength of 0.1 m. The peak reflection occurs at 7.5 m -1, or a wavelength of 0.133 m.

Summary
This tutorial has gone through the process of setting up dispersive situations when using the FDTD algorithm. The internal Dipserion/Nonlinearity feature must be turned on when doing either a CW case where the device is highly lossy or a pulsed/impulse case where dispersion needs to be included. In addition, we have found that for the CW case, dispersion can be implement through an equation, datafile, or via the material editor. However, in the pulsed case, dispersion can only be implemented via the material editor.

Areas for Further Exploration


There are several areas that can be explored further in this case. They are: Try using a frequency-dependent imaginary index with the expression and data file methods The examples used in this tutorial used only a real-valued refractive index. Rerun the examples with a complex valued index and see how the results change. Look at other frequency ranges when using a pulsed excitation and the material editor method Because we used a pulsed excitation in this example we were only able to study the narrow portion of the frequency spectrum that the pulse excited. By changing the central wavelength and size of the pulse in time, we can look at different frequencies of the response of this material. Also, by using an impulse excitation properly, we can look at a very large range of frequencies. Explore Other Material Systems In addition to this, please note that the file material_editor_method.ind that comes with this tutorial has all of the material properties that are contained in the reference. Thus, there are 11 metals that can be found in the material editor that have already been converted from the reference.

184 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Tutorial 6: Incorporating Non-Linearities


Non-linearities, the change of index as a function of the intensity of the field, are not intrinsically included in a FDTD simulation. FullWAVE has a feature that can automatically include non-linear material in a simulation. This nonlinearity is a third order, or

3 , non-linearity based on a Kerr model.

This tutorial will go through the setup of a dispersive and non-linear calculation for FullWAVE and one way to analyze the results. A temporal soliton system will be created, simulated, and analyzed. User familiarity with the CAD interface is assumed. This discussion will reproduce the results from P. Goorjian, A. Taflove, R. Joseph, S. Hagness, Computational Modeling of Femtosecond Optical Solitons from Maxwells Equations, IEEE J. of Quan. Ele., Vol. 28, No 10., 2416 (1992). Example files for this tutorial are located in the directory <rsoft_dir>\Examples\FullWAVE\Tutorial\Tut6\.

Device Layout
Open the file nl_waveguide.ind. This file contains a single waveguide, the properties of which are defined via the Material Editor.

Converting Parameters
In order to illustrate the conversion of the parameters from the units described in the reference to the units that need to be input into the CAD, one set of symbols represent the values given in the reference, and another set of symbols represents the same parameters with the necessary unit conversions. Open the symbol table and note the following symbols which correspond to the units defined in the reference:

Symbol
Freq_ref Eps_inf_ref Eps_s_ref W0_ref Delta_ref Chi3_ref

Value
1.37e14 2.25 5.25 4.0e14 2.0e9 0.085

Description
The driving frequency given in the reference (in s-1). The epsilon value at infinite frequency given in the reference. The epsilon value at zero frequency given in the reference. The resonant frequency given in the reference (in s-1). The damping factor given in the reference (in s-1). A modified value from the reference since we will not consider a dispersive nonlinearity in this example. This quantity is assumed to be dimensionless since a Launch Normalization of Unit Peak will be used. More details about this can be found in the notes at the end of Chapter 8 of the CAD manual.
3

Also note the following symbols which were created to represent the necessary unit conversions:

Symbol
Freq

Value
Freq_ref/c

Description
The driving frequency to be used in the simulation (in m-1)

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 185

W0 DeltaEps1 B1 C1 free_space_wavelength

W0_ref/c (Eps_s_refEps_inf_ref)*W0^2 2*Delta_ref/c W0^2 1/Freq

The resonant frequency to be used in the simulation (in m-1). A quantity that will be used to define the materials dispersive properties. A quantity that will be used to define the materials dispersive properties. A quantity that will be used to define the materials dispersive properties. Sets the driving wavelength for the simulation in m.

In addition to unit conversion, several symbols represent quantities that are used to define the materials dispersive properties.

The Material Properties


Next, open the Segment Properties dialog for this segment, and select New Material under Material Properties to open the Material Editor and view the settings for this material:

Option
Epsilon at Infinity delta (#1) a (#1) b (#1) c (#1) Chi3

Value
Eps_inf_ref DeltaEps1 1 B1 C1 Chi3_ref

Description
Sets the epsilon at infinite frequency. Sets the strength of the first dispersive resonance. Sets the fitting coefficient a1. Sets the fitting coefficient b1. Sets the fitting coefficient c1. Sets the non-linear term

Click the Display button to see the resulting dispersion curve. The exact formulation of the dispersive and non-linear parameters set here is described in detail in Chapter 8 of the CAD manual.

The Launch Parameters


The reference describes a 1D simulation of a pulse with a hyperbolic secant envelope function with a characteristic time constant of 14.6 fs propagating along a waveguide segment. To emulate this type of simulation, we will perform a 2D simulation, launch a plane wave along Z, and utilize periodic boundary conditions at the X boundaries. Therefore it is not be necessary to define a specific background index, nor a width for the waveguide. Open the Launch Parameters dialog and note that the Type is set to Rectangle, Width to inf, and Normalization to Unit Peak. The selection of the launch normalization plays an important role in non-linear calculations, and is outlined in the notes at the end of Chapter 8 of the CAD manual in more detail. Next, open the Simulation Parameters dialog and note that the Excitation is set to Pulse, and, in the symbol table, the symbol fdtd_excitation has been set to TIME_ENVELOPE_SECH. This indicates that a pulse with a hyperbolic secant envelope function should be used. The Ramp/Pulse Time is set to Pulse_width_ref/c which is the value from the reference in the correct units for FullWAVE.

The Time Monitors


Two time monitors are used to record field values as the pulse propagates down the waveguide. One monitor is located at Z=Z1, and the other at Z=Z2.

186 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

The Simulation Parameters


Since we are emulating a 1D simulation, there is little need to simulate a large region along the X axis. Therefore, the X Domain Min and X Domain Max have been set to grid_size and grid_size respectively so that a minimal number of points are used along X.

Exploring the Effect of the Non-Linearity


In order to explore the effects of the non-linearity, we will perform two simulations: one with dispersion only, and another with dispersion and non-linearity. The results from the first will show the pulse broadening due to the dispersion; the results from the second will show the effect of the non-linearity.

The Linear Waveguide


To disable the non-linearity, temporarily set the variable Chi3_ref to 0.085*0. Run the simulation with an Output Prefix of linear. Once the simulation has completed, open the file linear.ptm to see the time response of the linear system.

Figure 1: The time monitor response of the linear waveguide. Note that the pulse width changes as the pulse propagates down the waveguide.

The Non-Linear Waveguide


Next, reset the value of the variable Chi3_ref to 0.085. Run the simulation with an Output Prefix of nonlinear. Once the simulation has completed, open the file nonlinear.ptm to see the time response of the non-linear system.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 187

Figure 2: The time response of the nonlinear waveguide. Note that the pulse width stays constant as the pulse propagates down the waveguide.

The non-linear case pulse is more narrow and does not disperse as the linear case does, which is consistent with a soliton system and agrees with the reference. Due to the non-linearity, the pulse is not dispersing in time.

188 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Tutorial 7: Using Q-Finder to Automate Cavity Mode and Q Calculations


This advanced tutorial illustrates the use of Q-Finder, an automated utility for computing cavity modes and Q factors, through several examples. A basic straightforward example will be given to illustrate the use of Q-Finder, and then a simple scanning example will be performed This example uses the same structure as Tutorial 4, but will use Q-Finder to calculate the mode resonance, profile, and Q. The files associated with this tutorial can be found in <rsoft_dir>\examples\FullWAVE\Tutorial7. Though not necessary, it is recommended that you read through Tutorial 4 before proceeding with this tutorial in order to better understand the Q computation process. Also, a detailed description of Q calculations and the use of Q-Finder can be found in Chapter 9.

Structure and Simulation Overview


This structure is composed of a hexagonal array of air holes in a silica slab (n=3.37). The lattice constant a used is 0.4 m and a hole diameter of 0.65a. To create the defect, the center hole is removed. Defect modes will be looked for around a wavelength of 1.5 m.

Figure 1: The PBG structure with defect shown. This is the same structure used in Tutorial 4.

The procedure to create this structure is given in Tutorial 4 and will not be repeated here. Open the file defect.ind and note the following: Field time monitor

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 189

A field monitor has been placed within the defect region of the crystal at a position with low symmetry. This field monitor will be used by Q-Finder to compute the spectral response of the cavity. Energy density monitor Unlike the structure created in Tutorial 4, this structure does not have an energy density monitor. This is because the FHA method is sufficient to find the Q value for this application, and the energy decay method is not needed. Were the energy decay method to be used, an energy density monitor would be needed. See Section 9.C.2 for more details. Launch settings An impulse excitation type has been set up at a position of low symmetry. Boundary settings In Tutorial 4, it was found that the TM mode of interest at 1.575 m exhibited even symmetry along the X axis and odd symmetry along the Z axis. The boundary conditions in this file have been set accordingly in order to speed up the computations. Q-Finder automates the procedure of finding the resonance, mode profile (if applicable), and Q value.

Using Q-Finder
Open Q-Finder via the CAD menu (Utilities/Q-Finder). The default settings in the Q-Finder dialog will be used in this simulation, but note the following settings: Parameter
Center

Value
1.0/1.5

Description This sets the initial frequency to begin looking for resonant modes in m-1. This is equivilent to a wavelength of 1.5 m. This sets the length of the series of simulations used to find the resonant frequency and mode profile. The three values set here indicate that three simulations will be performed with stop times of 2^12 and 2^15, times the Time Step. This indicates that the mode volume shoul dbe computed. Indicates that the FHA method will be used to compute the Q factor.

Propagation lengths

12,15

Find Mode Volume Spectral analysis method

enabled

FHA if possible

190 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 2: The Q-Finder dialog.

To start the simulation, enter an Output Prefix of qfact and click OK. The Q-Finder simulation window will open and display the progress of the simulation. During the computation, a series of FullWAVE processes will open and close as the simulation progresses. The basic process is as follows: Several FullWAVE simulations of increasing length are performed in order to determine the resonant frequency and mode profile of the cavity mode of interest. The number and length of the simulations are set by the Propagation lengths setting. The simulations use the FDTD Continue option to launch the mode found in one step into the next simulation in order to produce a clean mode profile. Once the simulations are completed, the final spectrum is analyized using the FHA method to determine the Q value. During this last step, the mode profile is calculated (this can be disabled by selecting the Skip final mode profile calculation option), and, as requested, the mode volume will be computed. A parameter called Mode Purity is also computed. This parameter is described below.

This method finds a Q value of 3363 at a resonant frequency of 0.63497 m-1, and a mode volume of 0.12. Note that a convergence study has not been performed, and so the value obtained may not be accurate. Also, since this is not a converged value, the Q value found here might differ from values you find due to improvements made to the FullWAVE and Q-Finder algorithms. This underscores the importance of always performing a convergence study, as descrined below, to ensure accurate results.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 191

Mode Purity
Q-Finder ouptuts a mode purity which is a measure of how much of the field within the current mode profile is associated with the desired frequency. A value near 100% indicates that the mode is near perfect; a much lower value indicates that there is substantial energy from another peaks present in the mode profile.

Using the Energy Decay Method


The above calculation did not use the energy decay method to compute the Q value. This method is only necessary when performing a partial Q calculation, or when checking the FHA results. This method will not be illustrated here.

Basic Scanning and Optimization


Like all tools in RSofts Photonic Component Design Suite, Q-Finder can be operated from with in MOST to perform scanning and optimization. This example will use the same structure as above, but adds a central hole to the defect region. The size of this hole will be scanned using MOST and the Q will be calculated. Users not familiar with MOST can find additional details on scanning in the MOST manual.

Structure and Simulation Overview


Open the file defect_scan.ind and note that an additional blue hole is located in the defect region with a radius defined by the variable RadDef. Also, the mode profile and mode volume output have been disabled in the Q-Finder dialog to speed up the simulation. Finally, the option to Seed center frequencies in scan is enabled.

Using MOST
Click the MOST button on the left toolbar to open the MOST dialog, and note the following: Simulation Tool The simulation tool is set to FullWAVE Q-Finder. Variables One variable, RadDef, has been defined and will scan from a value of 0 to 0.2 in 11 steps. Measurements Under the measurements tab, the measurements that Q-Finder supports can be seen. Here two of the most important have been selected: qfind_nu_c and qfind_q_fha which return the complex resonant frequency and Q value of the mode (found via the FHA method) respectively. Click OK to start the scan. By default MOST opens a Q-Finder window which will in turn open several FullWAVE windows. Since multiple windows can be distracting when running long calculations, it can be beneficial to suppress them. The Q-Finder window can be suppressed by selecting Window = Hide in the MOST dialog, while the FullWAVE windows can be suppressed using the corresponding setting in the Q-Finder dialog. If needed, the information which would have appeared in the QFinder window can always be found in the log files which will appear in the <prefix>_work/raw directory where <prefix> is the Output Prefix set for the scan. When the scan has finished, the results can be examined using the DataBROWSER. An interesting note is that the Q reaches a minimum at RadDef = 0.13 which is when the defect radius matches the lattice radius effectively removing the defect and resulting in a very lossy system.

192 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Figure 3: The results of the scan overRadDef. a) the resonant frequency of the cavity mode b) the calculated Q values.

Areas for Further Exploration


There are several areas that can be explored further in this case. They are: Perform a Convergence Study As always, the effect of grid sizes on the simulation results should be studied. The above computations, especially when finding the resonances, should be repeated for smaller grid sizes, and the accuracy compared: if comparable accuracy is obtained, the results are accurate; if there is a large difference, then successively smaller grids should be used until accurate results are found. Similarly, the size of the structure should be studied: a larger supercell that contains more periods of the lattice should be used: if the results are similar, then the smaller structure is adequate; if not, larger structures should be used until accurate results are found. Longer simulations for better frequency resolution The frequency resolution is directly related to the length, or number of time steps, in the simulation. Try rerunning the mode computation with a greater stop time and explore this relationship. A good way to do this is to increase the exponent for the power of 2 used to define the stop time: try (2^14)*fdtd_time_step, then (2^15)*fdtd_time_step, . Try the energy decay method Though not necessary, it is possible to use the energy decay method for this structure. Enable the Measure Q by energy decay option and rerun the simulation. This method requires the use of an energy density monitor that samples a large portion of the simulation domain. Though this method is slower, it should give similar results.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 193

Tutorial 8: Using a Non-uniform Grid


This tutorial describes the use of a non-uniform grid with FullWAVE, and illustrates the computational benefits it can offer over standard uniform grid simulations. This tutorial will cover the settings for various advanced grid control options required to correctly setup the non-uniform simulation grid for the problem. It also presents a comparison between the results obtained with uniform and non-uniform grid and shows the advantages that non-uniform grid can offer in most problems. User familiarity with the CAD interface is assumed. The files associated with this tutorial can be found in <rsoft_dir>\examples\FullWAVE\Tutorial8.

Structure Overview
Open the file nonuniform.ind. If you cannot see the whole structure, use the View/Full option in the CAD menu. This structure is a slit (gray segment) in a gold (Au) metal slab (yellow segment). The parameters which define the material properties of the gold segment are defined in the material table. The thickness of the metal slab is 0.1 m and the slit diameter is 0.4 m. The variables for the metal slab thickness have been defined to be T_metal and W_slit respectively.

Figure 1: The metal slab with a slit used in this tutorial. The black region represents the metal.

Advantages of Using a Non-Uniform Grid for this Structure


The benefits of using a non-uniform grid for this structure are due to the vastly different length scales present: an ultra thin (sub-wavelength) metal slab in a relatively large computational domain. In order to correctly resolve the field in the smallest structure, the thin slab, a minimum of 10 grid points would be needed in the thickness of the slab, resulting in a required Z grid size of 0.1/10 = 0.01 m. When using a uniform grid, this fine grid size would have to be used throughout the simulation domain, even in the air regions above and below the slab. This would be an unnecessary waste of computational resources as this empty space region can be resolved with a much coarser grid size of /15 = 0.1m. If a non-uniform simulation grid were to be used, this extra computational burden could be avoided by creating an efficient grid which is fine where essential and much coarser in other areas. While this tutorial presents one typical example of a situation where a non-uniform grid can offer large computational benefits; however, there is a wide range of applications where the use of a non-uniform grid can be useful.

Using a Non-Uniform Grid


To enable the use of a non-uniform grid, select the Enable Nonuniform option in the FullWAVE Simulation Parameters dialog.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 195

Choosing Non-Uniform Grid Parameters


It is very important to use the correct simulation grid for any problem. When using a uniform grid, this means that the grid size needs to accurately resolve the finest field structure in the problem, which might be the wavelength if there are no sub-wavelength structures. When using a non-uniform grid, there are many more parameters to be set. The non-uniform grid options are set in the Advanced Grid Options dialog which can be opened via the Grid Options button in the FullWAVE Simulation Parameters dialog.

Figure 2: The Advanced Grid Controls dialog where the options that control a non-uniform grid are set.

This dialog allows the grid options to be set for each coordinate direction. The first three fields, Domain Min, Domain Max, and Grid Size (Bulk) are equivilent to the options located in the FullWAVE Simulation Parameters Dialog. The Grid Size (Bulk) option has been renamed since it represents an average grid size to be used in the bulk regions that are sufficiently far from material interfaces. The options are set as follows:
Grid Size (Bulk)

These fields are set to the relatively coarse values of 0.1 and 0.15 respectively, which roughly correspond to /10.
Grid Size (Edge)

These fields specify the grid size to be used near material interfaces, and should therefore be set to the resolves the finest structural feature along each coordinate. Along Z it is set to a value that accurately resolves the metal slab thickness, and along X it is set to a value that accurately resolves the slit width.
Minimum Divisions

This field defines the minimum number of grid cells to place within a material region. In this case it is set as a function of the Grid Size (Edge) values such that there are 10 cells across the metal slab thickness and 40 cells across the slit. These settings ensure that a fine grid size of 0.01 m where required and a coarser grid size of 0.1 m elsewhere.

196 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Since abrupt grid size transitions between adjacent cells can create inaccuracies in the simulation results, the Grid Grading options have been enabled. This option enables a gradual transition from the fine grid size at interfaces to the coarse grid size in bulk regions. This transition is controlled by the Grid Ratio option which sets the smoothness of the transition. Here we have chosen a value of 1.2, though any number between 1 and 1.5 should work. Note, however, that small values of Grid Ratio will increases computational burden outweighing the benefits of the non-uniform grid, and large values (>2) might create inaccuracies in the simulation.

Viewing the Non-Uniform Grid


It is recommended that the user view the simulation grid before performing a simulation to ensure that the grid accurately represents the structure. If any potential problems in the grid are seen, the user should modify the grid settings as necessary and recheck the grid. To view the grid, click the View Grid button in the FullWAVE Simulation Parameters dialog.

Figure 3: The non-uniform grid for the metal slit structure. Note the increased density of grid points for better resolution along the slab and in the slit region.

Simulating with a Non-Uniform Grid


In this simulation, the power transmission through the metal slit will be measured. A plane wave source has been created, as well as a time monitor to record the time-averaged power. To run the simulation, enter an Output File Prefix of nonuniform and click OK. After the simulation has completed, open the file log.txt in the working directory (this can easily be done via the View\Open Log CAD menu option) and note the simulation time and memory used. The computer used to create this example took ~0.2 minutes to complete this simulation and used about ~1 MB of simulation memory (not including base memory which will be the same for most simulations). Users will obviously obtain different results depending on the computer system used. The comparison between the uniform and non-uniform simulations performed on the same computer should, however, be similar.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 197

The results output by the time monitor show a transmitted power of around 0.0164.

Figure 4: The time monitor output when using the non-uniform grid.

Simulating with a Uniform Grid


Next we will perform the same simulation on a uniform grid so that we can compare the results. To do this, the Enable Nonuniform option in the FullWAVE Simulation Parameters dialog needs to be disabled. Also, since a the uniform grid needs to resolve the complete structure, a fine grid needs to be used. Change the Grid Size to 0.01 for both X and Z. To run the simulation, enter an Output File Prefix of uniform and click OK. The simulation will run, though much slower than the non-uniform case. When the simulation completes, open the log file again and note the simulation time and memory used. The computer used to create this example took ~4 minutes to complete this simulation and used about ~18 MB of simulation memory (not including base memory which will be the same for most simulations). Users will obviously obtain different results depending on the computer system used. The comparison between the uniform and non-uniform simulations performed on the same computer should, however, be similar. The results output by the time monitor show a transmitted power of around 0.017.

Figure 5: The time monitor output when using a uniform grid.

198 Chapter 11: Advanced Tutorials

FullWAVE 6.0 User Guide

Comparing the Results


The results can easily be compared: Total Simulation Time: The use of a non-uniform grid decreased the total simulation time from about 4 minutes to 0.2 minutes, resulting in a simulation that is about 20 times faster. Remember that results may vary depending on the computer system used. but a similar speedup should be seen. Required Simulation Memory: The use of a non-uniform grid decreased the required simulation memory from about 18 MB to 1 MB. This is because the non-uniform grid uses less grid points than a uniform grid. Accuracy of the result: The steady-state results from the time monitors shows that the result from the non-uniform grid is only 3% different than the result found with the uniform grid, even though the non-uniform grid was coarse in the bulk regions. Note that the comparison of a non-uniform and uniform grid are highly problem dependent. Some problems will see a dramatic increase in speed and memory usage, while others might only see marginal improvements.

Areas for Further Exploration:


Experiment with the grid options Try changing the grid options to see how the resulting grid changes. Perform a convergence study with the grid options While the simulation results found above were close, it is possible to make them closer by tweaking the grid options. Try to improve the accuracy of the non-uniform grid without substantially increasing the simulation time.

FullWAVE 6.0 User Guide

Chapter 11: Advanced Tutorials 199

Appendix A: Tips and Traps in FullWAVE

This appendix contains some advice on good habits and sources of confusion for novices and experienced FullWAVE users alike.

Common FullWAVE mistakes


Choosing an unphysically large time step results in an unstable simulation. In order to satisfy the Courant condition given the desired grid sizes, the time step must be below a certain threshold. If the time step chosen is larger than this threshold, FullWAVE will return an error and return the threshold value. Simply change the time step to be equal or less than this value in order to ensure a stable simulation. Of course, you may have to reduce the time step further in order to achieve accurate results. Attempting to perform a simulation in FullWAVE which exceeds the computational resources of your computer system. The FDTD algorithm is quite rigorous, and solves for all six field components at all positions in space at all values of time. This is obviously advantageous as this information is usually interesting to the user, and also results in accurate simulations. However, it can result in a large drain on computational resources, as especially for 3D simulations. It is important to keep the computation limits of your computer system in mind when performing FullWAVE simulations. FullWAVE will prompt the user when a simulation is started if the simulation will require more system memory than is present on your system. Misuse of the dispersion feature. The dispersion feature in FullWAVE must be used properly in order to achieve correct results. A haphazard choice of the dispersion parameters can result in an unphysical material definition, and therefore an unstable simulation. Careful attention should be made to the choice of these parameters in order to ensure the material being simulation corresponds to the actual material. Misunderstanding the output units. It is important to keep in mind the units used by FullWAVE to store simulation data. This is important to keep in mind, especially when using power monitors. In this case, the displayed data is in units of power, but the stored data is the square root of this quantity. The data needs to be squared before using it in other calculations.

FullWAVE 6.0 User Guide

Appendix A: Tips and Traps in FullWAVE 201

Some Good FullWAVE habits to learn


Developing the following habits will save you trouble and time in the long run. Use the Compute Index Profile option frequently. When setting up a structure, it is easy to make mistakes with geometry and refractive index information. Many apparently bizarre results are simply the result of simulating the wrong structure. Check the launch condition and excitation type. In order to obtain the desired results from a simulation, it is important to use the correct launch condition and excitation type. Use enough grid points to resolve the smallest feature in the fields. In order to effectively simulate the propagation of electromagnetic fields in your structure, you must choose grid sizes such that the smallest features in the fields. For most structures, this simply means that you must choose a grid size such that the wavelength of the field in the structure is resolved. However, if the structure has relatively small features, such as curved waveguides or thin films, you may have to reduce the grid sizes even further in order to resolves these features. Use too few grid points at first; use too many at the end. General results for your structure can often be obtained with remarkably coarse grids (which of course satisfy the above condition). You can save time when doing initial exploratory studies by not worrying too much about accuracy. At the same time, when a structure includes fine features, the results can be quite inaccurate with an overly coarse grid. You have not completed your design project until you have confirmed the convergence of your results at a higher grid resolution. Learn how to use the command line utilities included with FullWAVE Since post-processing with these tools can be automated, you can achieve a lot of tedious work by writing a single command. You may even find uses for these utilities in your other work. These utilities are documented in the BeamPROP manual. Learn the scripting capabilities of FullWAVE While FullWAVE is designed to be used via a graphical interface (GUI), a long series of simulations can be tedious to perform through the GUI. These types of calculations can easily be automated through the use of a script. FullWAVEs scripting capabilities are based on the fact that simulations can be run from the command line. Because of this unique capability, FullWAVE can utilize the any native scripting language within the OS you are using. For instance, Windows users can use simple DOS batch files to run FullWAVE, while advanced users who may have standard scripting languages installed on their system such as PERL can write powerful scripts in these languages. Read the WinPLOT manual. WinPLOTs rather terse command syntax can be daunting at first but allows complex plotting features to be described quickly in just a few lines. Being able to quickly launch plots with old command files from the command line can be a huge time saver. Use color scales to produce attractive plots. WinPLOT is capable of producing many types of plots beyond the standard output usually displayed. Color scale files can be found in the installation directory, and are used to change the default scale used when displaying contour plots. These files are easy to create, and provide a quick way to customize the display of data for presentation purposes.

202 Appendix A: Tips and Traps in FullWAVE

FullWAVE 6.0 User Guide

Tips for Improving Simulation Speed


These tips can, in some cases, considerably improve FullWAVE simulation speed. They can loosely be divided into two categories: using optimal simulation parameters such as grid sizes and domain settings and reducing the refresh and output rate of simulation data. Use the single precision for numerical bookkeeping. By default, FullWAVE uses single precision for all numerical bookkeeping during a simulation. While it is also possible to use double precision, which might be necessary in some cases, the default choice of single precision is recommended and will result in a reduction of memory used and therefore an increase in simulation speed. Dont use an excessively large computational domain. Nothing can be gained by simulating a part of your structure where no field is present. You can cut down on simulation time by making an intelligent choice for your computational domain. Also, make full use of the different boundary conditions in FullWAVE in order to maximize computational efficiency. For instance, you might be able to reduce the size of the computational domain through the use of periodic boundary conditions. Use symmetric boundary conditions when possible. Closely related to the above tip, it is highly beneficial to use symmetric boundary conditions when possible to reduce the size of the simulation domain. See Section 7.C.3 for more information about choosing the correct symmetric boundary conditions. Use optimal values for the simulation grid steps.. While it is absolutely necessary to validate your results using a fine grid, it is not necessary to use an even finer grid for simulation. The largest grids that produce accurate results should be used. Using fine grid sizes that do not result in higher accuracy only create longer simulations. Increase the update time for long simulations. It is usually unnecessary to have FullWAVE update the graphical display of the fields during a long simulation. While it can be beneficial to watch the fields evolve in time for short simulations, the continual update of the simulation window steals valuable CPU time from the actual simulation. Increase the value of the Update Time in order to avoid making a long simulation even longer. Disable Energy Density and Power Monitors When Not Needed These types of monitors require post-processing of field information for each point output. If these results are not specifically needed, dont output them to save computation time. Output Spatial Field Slices Sparingly Output only the spatial field slices that you need. Saving slices that you dont need results in a slower simulation. Output spatial fields on a coarser grid than the simulation grid if possible. When saving spatial field slices, the simulation grid may provide more resolution than necessary. Depending on the intended use of the data, it may be possible to use a coarser grid which will increase the simulation speed.

Using the Command Line


FullWAVE, as well as all other RSoft products, are designed to be used graphically. Most of the time, all work can be done inside the graphical interface making the tools easy to learn and use. Nevertheless, in any serious numerical work, there comes a time when there is no substitute for access to a command line or DOS prompt. For example, we can

FullWAVE 6.0 User Guide

Appendix A: Tips and Traps in FullWAVE 203

usually gain a quick initial view at a data file can be found by typing a simple WinPLOT command from the command line. Typing a single command can be faster than using the mouse-based interface for WinPLOT. Other uses for the command line may include the utilities described in the BeamPROP manual, or examining the actual values of a data file in a simple text editor as opposed to a full spreadsheet program which may be slower or inconvenient, or absent. In addition, as described in Section 4.A of this manual, FullWAVE can be run completely from the command prompt. On UNIX and Linux systems, the use of the command line is second nature, but it can be less familiar under Windowsbased systems. Unfortunately, the standard command prompt command.com provided with Windows operating systems is poor in both commands and editing features. It is sufficient to carry out all the commands described in this manual, but after working on your own projects for awhile, you may find its shortcomings irritating. Another solution to this problem is the Cygwin package. This is a replacement command line for Windows containing a full set of UNIX utilities and more powerful editing facilities. Cygwin is free to download and use, and is relatively easy to install, though we would only recommend its use for advanced computer users. It is available at www.cygwin.com. As always, software you obtain from sources other than RSoft are installed and used at your own risk.

204 Appendix A: Tips and Traps in FullWAVE

FullWAVE 6.0 User Guide

Appendix B: FullWAVE File Formats

This appendix documents the file formats used in FullWAVE that are specific to this package. Files that FullWAVE may use or generate that are common to BeamPROP are described in the BeamPROP manual. Except where noted, all files are in ASCII text format. For further information, contact RSoft.

Standard RSoft File Format


This is the main file format which is used to represent functions of one or two variables, including field profiles, index profiles, and other output types. This section describes data files with a uniform grid. Specific notes about data files with a non-uniform grid are described below. The correct syntax for this file format is: /rn,a,b/nx0/ls1 /r,qa,qb Nx Xmin Xmax Zpos Output_Type Optional_Data Ny Ymin Ymax Data1(Xmin, Ymin) Data(Xmax, Ymin) Data(Xmin, Ymax) Data(Xmax, Ymax)

The first several lines of the field file are WinPLOT directives, and though required for WinPLOT use, can be considered as comments and ignored for all other uses. They begin with a slash (/) character and can be identified and parsed by that characteristic. Also, note that this format describes a function as (x,y,z0). However, note that these coordinates do not have to correspond to the coordinates actually used in a simulation, and are only local to the data file. The parameters shown above are:

Parameter
Nx Xmin

Description
Number of data points in the X direction. The X coordinate of the first data point.

FullWAVE 6.0 User Guide

Appendix B: FullWAVE File Formats 205

Xmax Zpos Output_Type Ny Ymin Ymax Optional_Data

The X coordinate of the last data point. The Z coordinate where the function was calculated. The sub format of the data. This field can be one of the values discussed below. Number of data points in the Y direction. This line is only required for a 3D Output_Type. The Y coordinate of the first data point. This line is only required for a 3D Output_Type. The Y coordinate of the last data point. This line is only required for a 3D Output_Type. These parameters are not required, but are used in special cases. For instance, if the field is a result of a mode calculation, there are two optional fields containing the real and imaginary parts of the mode effective index.

Supported Output Types


The supported output types can be divided into two main groups: those that are a function of one coordinate, and those that are a function of two coordinates.

Functions of one coordinate (X)


These values of Output _Type correspond to functions of one variable, and therefore the second non-directive line which contains information about the Y coordinate is not needed. In addition, only one column of data is present, except for the special cases noted below. OUTPUT_AMPLITUDE This output type indicates that the data contained in the file corresponds to the amplitude of a field. OUTPUT_REAL This output type indicates that the data contained in the file corresponds to the real part of a field. OUTPUT_IMAG This output type indicates that the data contained in the file corresponds to the imaginary part of a field. OUTPUT_REAL_IMAG This output type indicates that the data contained in the file corresponds to both the real and imaginary parts of a field. The data is presented in two columns; the first contains the real part of the field, and the second the imaginary part of the field. OUTPUT_AMP_PHASE This output type indicates that the data contained in the file corresponds to both the amplitude and phase of a field. The data is presented in two columns; the first contains the amplitude of the field, and the second the phase.

Function of two coordinates (X,Y)


These values of Output _Type correspond to functions of two variables, and therefore the second non-directive line which contains information about the Y coordinate is needed. In addition, only one column of data is present per Y value, except for the special cases noted below. OUTPUT_AMPLITUDE_3D

206 Appendix B: FullWAVE File Formats

FullWAVE 6.0 User Guide

This output type indicates that the data contained in the file corresponds to the amplitude of a field. OUTPUT_REAL_3D This output type indicates that the data contained in the file corresponds to the real part of a field. OUTPUT_IMAG_3D This output type indicates that the data contained in the file corresponds to the imaginary part of a field. OUTPUT_REAL_IMAG_3D This output type indicates that the data contained in the file corresponds to both the real and imaginary parts of a field. The data is presented in two columns per Y value; the first contains the real part of the field, and the second the imaginary part of the field. OUTPUT_AMP_PHASE_3D This output type indicates that the data contained in the file corresponds to both the amplitude and phase of a field. The data is presented in two columns per Y value; the first contains the amplitude of the field, and the second the phase.

Function of three coordinates (X,Y,Z)


Functions of three coordinates are similar to the functions of two coordinates. The differences are:

The keyword Z_DEPENDENT in the typical Z position field. An additional header line that defines the range of z data and the number of z slices is required (Nz Zmin Zmax) The data is given in matrices one after another corresponding to the multiple Z cross-sections. The actual user profile will interpolate between cross-sections in Z as it does between data points in X or XY.

See the example field below for the header/data structure.

Data Files with a Non-Uniform Grid


The format described above describes a data file with a uniform grid. Data files with a non-uniform grid, such as index profiles produced using the CADs non-uniform grid options, have the same header lines described above, but the data has the following format: 0 Xmin Xmax Ymin Data1(Xmin, Ymin) Data(Xmax, Ymin) Ymax Data(Xmin, Ymax) Data(Xmax, Ymax)

where the first column contains the X coordinates of each row of data, and the first line has the Y cooridnates of each column of data. The value 0 in the upper right corner is necessary as a spacer, though the value doesnt necessarily have to be 0.

Examples Files
In order to better illustrate the field file format, several examples are given. In each case, a function will be given, and then a corresponding data file.

Example 1:
The following file contains the real-valued function f ( x ) = x over the domain x [0,1] with x=0.1:
2

FullWAVE 6.0 User Guide

Appendix B: FullWAVE File Formats 207

/rn,a,b/nx0/ls1 11 0 1 0 OUTPUT_REAL 0.00 0.01 0.04 0.09 0.16 0.25 0.36 0.49 0.64 0.89 1.00

Example 2:
The following file contains the complex-valued funciton f ( x ) = x + ix over the domain x [0,1] with x=0.1:
2 3

/rn,a,b/nx0/ls1 11 0 1 0 OUTPUT_REAL_IMAG 0.00 0.000 0.01 0.001 0.04 0.008 0.09 0.027 0.16 0.064 0.25 0.125 0.36 0.216 0.49 0.343 0.64 0.512 0.89 0.729 1.00 1.000

Example 3:
The following file contains the real-valued function f ( x, y ) = xy over the domain x [1,2] with x=0.25 and y [0,1] with x=0.5 /rn,a,b/nx0/ls1 /r,qa,qb 5 1 2 0 OUTPUT_REAL_3D 301 0.000 0.500 1.000 0.000 0.625 1.250 0.000 0.750 1.500 0.000 0.875 1.750 0.000 1.000 2.000

Example 4:
The following file contains the complex-valued function f ( x, y ) = x + iy over the domain x [1,2] with x=0.25 and y [0,1] with x=0.5 /rn,a,b/nx0/ls1 /r,qa,qb

208 Appendix B: FullWAVE File Formats

FullWAVE 6.0 User Guide

5 1 2 0 OUTPUT_REAL_IMAG_3D 301 1.00 0.0 1.00 0.5 1.00 1.25 0.0 1.25 0.5 1.25 1.50 0.0 1.50 0.5 1.50 1.75 0.0 1.75 0.5 1.75 2.00 0.0 2.00 0.5 2.00

1.0 1.0 1.0 1.0 1.0

Note that every other column contains imaginary data.

Example 5:
The following file contains the real-valued function f ( x, y , z ) = x + y + z over the domain x [-1,1] with x=1, y [-1,1] with y=1, and z [0,1] with z=0.5 This file contains three slices, each 3x3, which contain the field data at each Z point. /rn,a,b/nx0/ls1 /r,qa,qb 3 -1 1 Z_DEPENDENT OUTPUT_REAL_3D 3 -1 1 301 -2.000 1.000 0.000 -1.000 0.000 1.000 0.000 1.000 2.000 -2.500 1.500 0.500 -1.500 0.500 1.500 0.500 1.500 2.500 -1.000 2.000 1.000 0.000 1.000 2.000 1.000 2.000 3.000

Time Monitor File Formats


If a design file contains one or more time monitors, and an Output File Prefix has been specified, and the appropriate output type has been enabled, FullWAVE will generate one or more data files and graphs. These files can be split into two groups: time monitor output and spatial output.

Time Monitor Output File


Any time monitor output selected will be displayed during a simulation in the simulation window below the fields, and if an Output File Prefix is selected, will also be saved to disk. The file <prefix>.tmn will contain the monitor data, and the file <prefix>.ptm is a WinPLOT file which contains appropriate plotting commands in order to view the .tmn file. The .tmn file is organized into several columns. The first column contains the time in units of cT in FullWAVEs standard unit of m. Each subsequent column contains a monitor value corresponding to a time monitor in the CAD layout. There is one column for each time output type enabled.

Units
The units of field time monitor output are arbitrary, and are directly set by whatever field is used to excite the structure. The units of the Overlap and Power time monitors are dimensionless, as they are normalized to the power in the input field. The units of the E and H Density time monitors can be derived via their definitions. Note that the monitor values in the data file correspond to a field quantity, even for the power and energy density monitors which are stored in the file as the square root of the power or energy density. This convention allows any sign

FullWAVE 6.0 User Guide

Appendix B: FullWAVE File Formats 209

information to be retained. The graph, however, normally displays the monitors as a power by squaring the data in the file, as indicated by the legend in the graph.

Spatial Output Files


Any spatial output selected will be saved directly to disk during a FullWAVE simulation in an Output File Prefix is selected. Two files for each spatial output type selected will be produced: A data file, and a corresponding WinPLOT command file. The data files are in the standard field format discussed in the previous section. Note that the coordinate system used within the output file is the time monitors local coordinate system described in Section 6.B.1.

Output File Naming Convention


The output files are saved with names in the form <prefix>_m#_t#_montype.dat where _m# is the monitor number, _t# is the value of the simulation time at which the output was saved in units of cT, and montype indicates the type of spatial output contained in the file. The monitor types are

Value
ex ey ez hz hy hz pow eden hden poy

Spatial Output Type


Ex Ey Ez Hx Hy Hz Power E Density H Density Poynting Vector

For example, the file run1_m3_t10_pow.dat contains spatial output of type Power from monitor #3 at t=10 cT from a simulation that was run with an Output File Prefix of run1. The corresponding WinPLOT command file for this example data file will be named run1_m3_t10_pow.pcs.

Units
The units of field spatial output are arbitrary, being directly set by whatever field is used to excite the structure. The units of the Power, E and H Density, and Poynting Vector spatial output can then be derived via their definitions. The values displayed in the graphs are exactly the same as the data saved in the output files.

DFT Output Files


If the DFT output option has been selected, and an Output File Prefix has been specified, the time monitor output and/or spatial output will, in addition to being output in the time domain, be output in the selected frequency domain as well. Two files for each spatial output type selected will be produced: A data file, and a corresponding WinPLOT command file. The data files are in the standard field format discussed in the previous section.

Output File Naming Convention


The DFT results for selected time monitor output types will be saved in data files <prefix>_m#.dmn for each monitor, where _m# is the monitor number, with accompanying plot file <prefix>.pdm. The DFT results for selected spatial

210 Appendix B: FullWAVE File Formats

FullWAVE 6.0 User Guide

output types will be saved in data files <prefix>_m#_f#_montype.dat for each monitor and frequency value, where _m# is the monitor number, _f# is the frequency at which the DFT was taken, and montype is the monitor type. For a list of the supported spatial output types, please see the previous section. The simulation time at which the DFT is taken is not included in the file name if the Slice Time is set equal to the Stop
Time. If this is not the case, it is included after the frequency.

For example, the file run1_m3_f064516_pow.dat contains spatial output of type Power from monitor #3 at a frequency of 0.64516 -1 from a simulation that was run with an Output File Prefix of run1. The corresponding WinPLOT command file for this example data file will be named run1_m3_f064516_pow.pcs.

Units
The units of field spatial output are arbitrary, and are directly set by whatever field is used to excite the structure. The units of the Power, E and H Density, and Poynting Vector spatial output can then be derived via their defitions. The values displayed in the graphs are exactly the same as the data saved in the output files.

FFT Output Files


FFT output is enabled by selecting the appropriate output types in the FDTD Output Options dialog box. Section 4.E.2 contains more information on this procedure. Note that an FFT analysis is only possible for the selected time monitor output types. It is not possible to take the FFT of the selected spatial output types. FullWAVE can produce FFT results as either a function of wavelength, or a function of frequency.

Frequency Analysis
FFT results can be saved as a function of frequency via the appropriate option in the FDTD Output Options dialog box. The frequency results consist of two files: a data file <prefix>.fmn, and a WinPLOT command file <prefix>.pfm. Note that if the Padding Factor (2^(N-1)) option is used, the data files will have extensions .fm2, .fm4, etc, and if the Preliminary Output Factor (2^-N) option is used, the data files will have extensions .fmn_1, .fmn_2, etc. In both of these special cases, only one plot file is produced which corresponds to the final results. The data file contains the Fourier transform of the time monitor values, as a function of frequency, and is derived from the raw time monitor data collected during the simulation. The first column contains the frequency, in m-1. Each subsequent column contains the Fourier transform of a time monitor in the CAD layout. Other than taking the Fourier transform, the data is not otherwise processed or normalized, and has the same units as the time monitor data. As is the case for time monitor output, the transformed monitor values in the data file have units corresponding to field values, while the displayed graph normally displays the transformed monitor values in units of power by squaring the data in the file. In addition to the transformed monitor data, another file is produced which contains the Fourier transform of the source time wave form, which is useful for normalizing the other spectra, as well as the transform of the square of the source waveform, which, again, has no consistently useful physical meaning.

Wavelength Analysis
FFT results can be saved as a function of wavelength via the appropriate option in the FDTD Output Options dialog box. The frequency results consist of two files: a data file <prefix>.wmn, and a WinPLOT command file <prefix>.pwm. Note that if the Padding Factor (2^N-1)) option is used, the data files will have extensions .wm2, .wm4, etc, and if the Preliminary Output Factor (2^-N) option is used, the data files will have extensions .wmn_1, .wmn_2, etc. In both of these special cases, only one plot file is produced which corresponds to the final results. The data file contains the Fourier transform of the time monitor values normalized to the Fourier transform of the source time waveform, as a function of wavelength, and is derived from the raw time monitor data collected during the simulation. The first column contains the wavelength, in microns. Each subsequent column contains the normalized

FullWAVE 6.0 User Guide

Appendix B: FullWAVE File Formats 211

Fourier transform of a time monitor in the CAD layout. Other than taking the Fourier transform and dividing by the source spectrum, the data is not otherwise processed or normalized, and has the same units as the time monitor data. As is the case for time monitor output, the transformed monitor values in the data file have units corresponding to field values, while the displayed graph normally displays the transformed monitor values in units of power by squaring the data in the file.

212 Appendix B: FullWAVE File Formats

FullWAVE 6.0 User Guide

Appendix C: Symbol Table Variables

In this appendix we document the symbol table variable names which control the internal operation of FullWAVE. Most of these variables correspond to dialog fields which have already been documented. Note that some of these options are shared with RSofts BPM based simulation engine BeamPROP, but are repeated here for completeness. The following table lists the variable names corresponding to these dialog fields:

FDTD Simulation Parameters


The following variables correspond to the fields found in the FDTD Simulation Parameters dialog box: Field Name X Domain Min X Domain Max X Compute Step X PML Width Y Domain Min Y Domain Max Y Compute Step Y PML Width Y PML Reflectivity Z Domain Min Z Domain Max Z Compute Step Z PML Width Z PML Reflectivity Time Step Stop Time Slice Time Variable Name
boundary_min boundary_max grid_size fdtd_pml_width_x boundary_min_y boundary_max_y grid_size_y fdtd_pml_width_y fdtd_pml_refl_y domain_min domain_max step_size fdtd_pml_width_z fdtd_pml_refl_z fdtd_time_step fdtd_stop_time fdtd_slice_time

FullWAVE 6.0 User Guide

Appendix C: Symbol Table Variables 213

Update Time Monitor Time Excitation Type Ramp/Pulse Time Output File Prefix

fdtd_update_time fdts_monitor_time fdtd_excitation_type fdtd_ramp_time prefix

Advanced Grid Parameters


The following variables correspond to the fields found in the Advanced Grid Parameters dialog box that have not documented in the last section: Field Name X Grid Size (Bulk) X Grid Size (Edge) X Griding Ratio X Minimum Divisions X Grid Grading X Interface Alignment Y Grid Size (Bulk) Y Grid Size (Edge) Y Griding Ratio Y Minimum Divisions Y Grid Grading Y Interface Alignment Z Grid Size (Bulk) Z Grid Size (Edge) Z Griding Ratio Z Minimum Divisions Z Grid Grading Z Interface Alignment Variable Name
grid_size grid_edge_x grid_ratio_x grid_mindiv_x grid_bulk_nonuniform_x grid_align_x grid_size_y grid_edge_y grid_ratio_y grid_mindiv_y grid_bulk_nonuniform_y grid_align_y step_size grid_edge_z grid_ratio_z grid_mindiv_z grid_bulk_nonuniform_z grid_align_z

Launch Parameters
The following variables correspond to the fields found in the Launch Parameters dialog. Note that this is only valid for the specification of one launch field. Multiple launch fields are specified directly in the *.ind file. Field Name Variable Power Phase Launch Type
launch_power launch_phase launch_type

214 Appendix C: Symbol Table Variables

FullWAVE 6.0 User Guide

Tilt Mode Mode Radial Random Set Input File (E-Major) Input File (E-Minor) Align File Normalization Pathway Background N Delta N Phi Width Height Length Position X Position Y Position Z Neff Temporal Excitation Type Wavelength Ramp/Pulse Time Delay Time Shutoff Time Chirp Coefficient Spatial Excitation Type Current Direction Direction Vector (X) Direction Vector (y) Direction Vector (Z)

launch_tilt launch_mode launch_mode_radial random_set launch_file launch_file_minor launch_align_file launch_normalization launch_pathway launch_background_index launch_delta launch_angle launch_width launch_height launch_length launch_position launch_position_y launch_position_z launch_neff fdtd_excitation_type fdtd_wavelength fdtd_ramp_time fdtd_delay_time fdtd_shutoff_time fdtd_chirp_coef fdtd_excitation_spatial

fdtd_currentdirection_auto fdtd_currentdirection_x fdtd_currentdirection_y fdtd_currentdirection_z

Display/Output Options
The following variables correspond to the fields found in the Display and Output Options dialog boxes: Field Name Slice Output Field Output Variable Name
fdtd_slice_output fdtd_field_output

FullWAVE 6.0 User Guide

Appendix C: Symbol Table Variables 215

BPM Field Output BPM Field Offset Far Field Output Time Monitor Frequency Monitor Wavelength Monitor Padding Factor (2^(N-1)) Preliminary Output Factor (2^-N) Field Component Cross Section Slice Position X Slice Position Y Slice Position Z Outline Color Color Shades Color Scale Show Color Scale Plot Aspect Ratio Display Whole Domain on Master Node Display Grid Factor Display Height

bpm_field_output bpm_field_offset farfield_output fdtd_tmonitor_output fdtd_fmonitor_output fdtd_wmonitor_output fdtd_fft_maxpow2f fdtd_fft_minpow2f fdtd_view_component fdtd_cut_direction slice_position_x slice_position_y slice_position_z color_outline color_scale color_shades color_scale_display plot_aspectratio fdtd_mpi_wholedisplay fdtd_mpi_wholedisplay_grid fdtd)mpi_wholedisplay_height

Advanced Parameters
The following variables correspond to the FDTD Advanced Parameters dialog: Field Name X Boundary Y Boundary Z Boundary Boundary type at minimum X Boundary type at maximum X Boundary type at minimum Y Boundary type at maximum Y Boundary type at minimum Z Boundary type at maximum Z X ka/pi Value Y ka/pi Value Variable Name
fdtd_bc_x fdtd_bc_y fdtd_bc_z fdtd_bc_left fdtd_bc_right fdtd_bc_bottom fdtd_bc_top fdtd_bc_front fdtd_bc_back fdtd_bc_kax fdtd_bc_kay

216 Appendix C: Symbol Table Variables

FullWAVE 6.0 User Guide

Z ka/pi Value X PML Refl. Y PML Refl. Z PML Refl. X PML Kappa Y PML Kappa Z PML Kappa
Repeat Source Use Single Precision Compute Mode Continue Simulation

fdtd_bc_kaz fdtd_pml_refl_x fdtd_pml_refl_y fdtd_pml_refl_z fdtd_pml_kappa_x fdtd_pml_kappa_y fdtd_pml_kappa_z fdtd_source_repeat fdtd_float fdtd_compute_mode fdtd_continue

Advanced Features
The following variables correspond to the advanced features discussed mainly in Chapter 7, but also throughout other parts of the manual. Variable Name
radial azimuthal_mode output_as_3D fdtd_dispersion background_n2_index background_n2_alpha fdtd_dispersion_epsinf fdtd_continue fdtd_state_output fdtd_excitation_file fdtd_append_tmonitor fdtd_nx_master fdtd_magnetic fdtd_density_normalization fdtd_monitor_update_time fdtd_launch_pml fdtd_launch_pml_factor launch_phase_ref fdtd_launch_direction

Description Radial FDTD Sets the azimuthal mode number for a Radial FDTD calculation Produce 3D results from 2D radial simulation Enable Dispersion/Non-Linearity
Background Real N2 parameter Background Imag N2 parameter

Value of epsinf for dispersion model. Enable the continuation of a completed simulation Enable output of simulation state Set initial state in order to restart simulation Append time monitors when restarting a completed simulation Set to 0 to use master node during a cluster simulation for collecting and analyzing data, and not for simulation. Enables the use of magnetic materials. Toggles the normalization of E and H density monitors to the input power. Sets the update time for the monitor display in the simulation window. Sets the behavior of the launch field in the PML. Sets the gain/loss factor used when fdtd_launch_pml is set to 2. Controls the phase reference for the rectangular phase launch type. Sets the launch plane to be used for the primary launch field.

FullWAVE 6.0 User Guide

Appendix C: Symbol Table Variables 217

fdtd_launch_direction_# fdtd_bc_ka_auto fdtd_launch_power_unit fdtd_pml_index fdtd_complex

Same as fdtd_launch_direction, except for a specific launch field number (#). Automatically sets the phase differences across periodic boundary conditions for a tilted plane wave launch. Sets the unit for the launch power. Controls the scheme used to calculate the index in the PML region. Enables the use of a complex FDTD algorithm.

218 Appendix C: Symbol Table Variables

FullWAVE 6.0 User Guide

Appendix D: Field Normalization and Nonlinearity

In this appendix we explore the relation between real world SI units, and the units used within FullWAVE calculations. This is particularly important when doing nonlinear calculations.

Nonlinear Response and Units


This general section does not use FullWAVE-specific units. We begin by deriving some expressions for optical power, intensity and nonlinear coefficients. We assume harmonic time dependence and write the electric and magnetic fields as

E (x, t ) =

1 (E0eit + E0*eit ) , 2 1 H (x, t ) = (H 0 eit + H 0*eit ). 2


(1)

We take a mode polarized along the y axis and propagating along z:

E0 = f ( x, y ) eikz y
where k=nL/c, with nL the effective index of the mode. From Faradays law

E = 0
we find

H , t

n 1 f f ikz H 0 = L f ( x, y ) x + z e Z0 i0 x y
where the impedance of free space

Z 0 = 0 / 0 376.7
For the special case of a plane wave with f(x)=1,

FullWAVE 6.0 User Guide

Appendix D: Field Normalization and Nonlinearity 219

H0 =

nL ikz e x Z0

The intensity I, measured in Wm-2, is the time-averaged value of the z-component of the Poynting vector S:

I = S z = (E H)z 1 ( E 0 H 0 * + E 0 * H 0 )z 4 n 2 = L E0 z 2Z 0

nL 2 f ( x, y ) z , 2Z 0
(2)

which is equivalent to a form commonly found in textbooks:

I = 0 nL 2 v p E0 / 2
where vp is the phase velocity c/nL . Finally, the optical power is the integral of the intensity over the transverse plane of the waveguide:

P = dxdy I ( x, y ) = dxdy = dxdy nL 2 E0 2Z 0 nL 2 f ( x, y ) . 2Z 0

Calculations in 2D
The above analysis applies for 3D calculations where the incoming mode has a 2D profile f(x,y). For 2D calculations, where the mode profile is a function of one variable g(x), the analysis is identical except that the optical power is expressed as power per unit vertical length and measured in W/m:

P = P /(unit height) n 2 = dx L E 0 2Z 0

= dx

nL 2 g ( x) . 2Z 0

The Nonlinear Polarization


Neglecting dispersion and assuming linearly polarized fields, the dielectric polarization including second and third order nonlinearities is given by
1 2 3 Px = 0 1 + ( ) Ex + ( )ExEx + ( )ExExEx

220 Appendix D: Field Normalization and Nonlinearity

FullWAVE 6.0 User Guide

Here

= nL 2 = 1 + (1)
( 2) (3)

is the dielectric constant and and are the quadratic and cubic susceptibilities, with units of m/V and m2/V2 respectively. Technically, the susceptibilities are tensor quantities, but we assume isotropic materials here. The issues of field normalization do not change significantly when dealing with anisotropic materials. Considering only the cubic nonlinearity, the nonlinear refractive index or Kerr effect is associated with the part of the polarization that oscillates at the driving frequency . From Eq. (1), this is found to be

3 2 3 PNL = 0 ( ) E 0 E 0 e-it x . 8
The total polarization is thus

Pall =

0 2 0 2

(3) n 2 + 3 E 2 E eit x, 0 0 L 4

=
where the nonlinear coefficient

n 2 + n(2) E 2 E eit x, 0 0 L

3 3 2 n( ) = ( ) . 4
It is very important that the nonlinear coefficient n(2) is not confused with the nonlinear refractive index n2, which is defined in terms of the intensity as

nNL = n2 I
(3) This value of n2 is determined by writing
2

tot ( E0 ) = (nL + nNL )


so that we find

nL 2 + 2nLnNL ,

3( ) 2 E0 nNL = 8nL
3

and finally

3( ) n2 = Z0 4nL 2
3

(4) where it is easily checked that n2 has the units m2/W. Experimental reports almost always quote values for either or n2, but rarely n(2). The latter may be encountered in theoretical works, and in particular n(2) is the quantity used in the popular texts by G. P. Agrawal (as n2), so it is critical to check the definitions carefully and make any necessary conversions to
(3) (3)

before attempting simulation.

FullWAVE 6.0 User Guide

Appendix D: Field Normalization and Nonlinearity 221

Dimensions of Electromagnetic Quantities in FullWAVE


In SI units, the Maxwell curl equations (in the absence of free currents) take the form

E = 0

H , t H = 0 E. t

The free space permittivity 0=8.854 x 10-12 [Fm-1] and permeability 0=4 x 10-7 [NA-2] are both very small quantities in SI, which is inconvenient for numerical simulation. Hence FullWAVE works in a set of normalized units in which both quantities are set to 1 and the unit of time is the same as length (cT). For linear calculations, we normally work without worrying about the units of the field since all results can be scaled to match the power in experiments. However, in nonlinear work we need to know how to convert back to standard SI quantities. This is conceptually straight-forward but must be done carefully to avoid scaling errors. First, we note that the unit of length in FullWAVE is 1m. FullWAVEs electric field quantity E can then be naturally interpreted in units of V/m. However in the normalized units, the magnetic field H in FullWAVE is also expressed in V/m rather than the standard units of A/m3. This means that any derived quantity that depends on H must be scaled appropriately to recover values in SI. The simplest way to accomplish this is to divide each appearance of H by the impedance of free space Z0. For example, for the magnetic field, optical power, and magnetic energy density, we have

H SI =
PSI =

1 H FW , Z0

1 PFW , Z0 1 m U FW . Z02

U mSI =

In particular, the optical power monitor in FullWAVE is interpreted in units of W2 or simply V2.

Field Normalization Options


The absolute intensity of a launch field in FullWAVE is influenced by the following fields and options in the launch dialog The Launch power[launch_power] field at the top of the dialog. The choice of normalization of any mode files if the launched field is from a file. The Launch Normalization option [launch_normalization] at the bottom left of the dialog. The value of the symbol fdtd_launch_power_units if Launch Normalization=Unit Power.

The resultant field also depends on whether the launch source is of Field or Current type. The following analysis is for Field launch types exclusively. The total propagating power is of course a combination of the peak intensity and the transverse mode profile. In the following, we use the symbol P0 for the value of the Launch power dialog field and we write the real transverse mode

222 Appendix D: Field Normalization and Nonlinearity

FullWAVE 6.0 User Guide

profile as f(x,y). This is an arbitrary function with no particular normalization specified. In addition, we define the

scaled profile f ( x, y ) by

f ( x, y ) = A f ( x, y ) where A = max f ( x, y ) , so that f ( x, y ) has the maximum value of unity. We also define a normalized mode
area we define as

= dxdy f ( x, y )

When the spatial profile f(x,y) is one of the standard built-in types such as Slab Mode or Gaussian, then FullWAVE uses the convention A=1 and the value of depends on the function. However, if the launched mode is from a file, these quantities may have arbitrary positive values. For instance, a common alternative would be to have a launch file normalized to unit area, so that =1. There are four schemes for field normalization in FullWAVE, as follows, remembering that P0 is the value of the Launch power field in the launch dialog.
Launch Normalization = Unit Peak

The peak electric field in the launched field is given by E0 = mode profile.
Launch Normalization = None

P0 regardless of the normalization of the

The peak electric field in the launched field is given by E0 = A P0


Launch Normalization = Unit Power with fdtd_launch_power_unit=0 The maximum instantaneous power of the launch field (equal to the intensity integrated over the launch profile) is given by P0 measured in units of V2. The time-averaged power is given by P0/2. Launch Normalization = Unit Power with fdtd_launch_power_unit=1 The maximum instantaneous power of the launch field (equal to the intensity integrated over the launch profile) is given by P0 measured in units of W. The time-averaged power is given by P0/2.

Note that the power flowing through a cross-sectional plane varies over an optical cycle, and for a mode, the average power is half the peak power. It is very important to remember this when using a time-averaged power monitor in FullWAVE. In time-averaged mode, the power monitor compensates for this factor of one-half by doubling the true time-averaged power. Thus if you use a time-averaged power monitor and need to know the physical average power, you must remultiply the monitor value by 0.5. Note that no such scaling is applied for a power monitor that is not in time-averaged mode. As a result, when Launch Normalization = Unit Power, it is convenient to specify a launch power of 2P0, so that P0 represents the average power, which is usually the quantity of interest. The following table shows the relations between all the important quantities for a launched mode

E (x, t ) =
in the four different unit schemes. Launch normalization None

1 i kz t ) A f ( x, y ) e ( y + c.c. 2

)
Unit power units=W

Unit peak

Unit power units=V2

FullWAVE 6.0 User Guide

Appendix D: Field Normalization and Nonlinearity 223

FW Launch power dialog value FW Launch power dialog units max[Ey] (V/ m) max[Hx] (V/ m) max[Intensity] (W/m2) Power (V2) Power (W)

P0

P0

2 P0 V2 2 P0 / neff 2neff P0 /
P0 / Z 0 P0 P0 / Z 0

2 P0
W

V 2 / m 2
P0 A neff P0 A neff P0 A2 / 2Z 0 neff P0 A2 / 2 neff P0 A2 / 2Z 0

V 2 / m 2
P0 neff P0 neff P0 / 2 Z 0 neff P0 / 2 neff P0 / 2 Z 0

2 P0 Z 0 / neff 2neff P0 Z 0 /
P0 / P0 Z 0 P0

Note that while we have a choice of unit schemes for the launched field, the monitors always use the same set of rationalized units: ie the measured E and H are in V/m and the measured power is in V2. The last section in this appendix discusses examples of each of the different field normalizations and demonstrates the consistency of the various field quantities.

Setting FullWAVEs Nonlinear Parameters


Understanding how to convert the nonlinear response coefficients nonlinear calculations that can be directly compared to experiment. the material properties are known as the value of either
( 2) ( 2)

, n(2) or

(3)

is the trickiest part of performing

We now proceed to calculating the values for the nonlinear parameters in FullWAVEs Material Editor. We assume that for quadratic nonlinearities, or n(2) or
( 2)
(3) (3)
2

for cubic

nonlinearities. The first step is to find the physical susceptibility or in units of m/V or m /V2 respectively, using Eq. (4) if necessary. Using Eq. (4) requires a knowledge of the effective index nL of the incoming waveguide mode, which can be found by modal solution with BeamPROP or FemSIM or simply by estimation. In this case, comparison with experiement might require a fitting paramter associated with factors such as the fraction of power coupled in to the waveguide or the mode profile. The relation between the physical susceptibility and the quantities entered as FullWAVEs chi2 or chi3 settings, denoted here as FW and FW , and launch power setting, denoted PFW, depends on the choice of field normalization. There are several equivalent choices. The one chosen is a matter of personal preference and convenience depending on which physical quantities are best known for your system.
( 2) (3)

Method 1
Launch normalization=Power, fdtd_launch_power_unit=1 (Power measured in Watts)

With this normalization, we need to know the required input power P. We may know this directly. Commonly however, we instead know the required peak intensity or the required peak nonlinear phase shift. In such cases, we can find P by calculating or estimating the mode area and using relations in the field normalization section above. There are then two choices: Fix the nonlinear coefficients and vary the launch power:

224 Appendix D: Field Normalization and Nonlinearity

FullWAVE 6.0 User Guide

PFW = 2 P[W]
(3) FW = (3) m 2 /V 2 (2) FW = (2) [m/V ]

Fix the launch power and vary the nonlinear coefficients:

PFW = 2
(3) FW = P [ W ] (3) m 2 /V 2 (2) FW = P [ W ] (2) [m/V ]

The first approach is the most direct, but the second has the advantage that the field amplitudes remain of order unity and are better displayed by the graphics system. The factor of 2 in the launch power accounts for the fact that the FullWAVE quantity corresponds to the peak instantaneous power rather than the average power.

Method 2
Launch normalization=Power, fdtd_launch_power_unit=0 (Power measured in V2)

This method is essentially the same as Method 1, except that a factor Z0 must be included in the nonlinear coefficients to account for the scaled units of power. Using this normalization means that the fields are smaller by

Z 0 than in

Method 1, and so perhaps better displayed by the graphics, but there is no advantage over the second scheme of Method 1, which is normally the preferred approach. The two scaling choices are Fix the nonlinear coefficients and vary the launch power:

PFW = 2 P[V 2 ]
(3) FW = Z 0 (3) m 2 /V 2 (2) FW = Z 0 (2) [m/V ]

Fix the launch power and vary the nonlinear coefficients:

PFW = 2
(3) FW = Z 0 P V 2 (3) m 2 /V 2 (2) FW = Z 0 P V 2 (2) [m/V ]

Method 3
Launch normalization=Unit Peak

This method is useful if the maximum desired electric field is known. This might be known directly or might be obtained from knowing the desired peak nonlinear index change, and thus peak intensity, giving the peak electric field by Eqs. (2) and (3). The two scaling options are then: Fix the nonlinear coefficients and vary the launch power:

FullWAVE 6.0 User Guide

Appendix D: Field Normalization and Nonlinearity 225

PFW = ( E0 [V/m])
(2) FW = (2) [m/V ]

(3) FW = (3) m 2 /V 2

Fix the launch power and vary the nonlinear coefficients:

PFW = 1
(3) FW = ( E0 [ V/m ]) (3) m 2 /V 2 (2) FW = E0 [ V/m ] (2) [m/V ] 2

Note that the factor of 2 in the launch power is not required in this mode of operation, since the specified quantity, the maximum electric field is the peak instantaneous value rather than an averaged value. One could also perform nonlinear calculations using Launch normalization=None in a similar fashion to Method 3, but we recommend against this since the dependence of the field strength on the amplitude of the mode profile introduces a likely source of scaling errors. Method 3 is a safer scheme and no less convenient.

Application Note 1: FullWAVE Field Normalization


This note quantitatively explores the field normalization issues discussed in above. You should thoroughly review the material in that section before proceeding with the following. The commands to run the examples in this note are quite complicated and to save typing they have been expressed in Unix bash files. On Unix/Linux they can be run directly at the command line. Under Windows, a Unix interpreter is required. The free Cygwin environment provides a convenient, professional and comprehensive Unix command line under Windows. It is easy to install and may be downloaded from http://www.cygwin.com/. Independent of these examples, a powerful command line is indispensible in advanced simulation work, and we encourage users to consider obtaining Cygwin. However, RSoft can not provide support for installing or using Cygwin and is not responsible for any damage or data loss due to its use. Alternatively, Windows users can simply open the Unix scripts in a text editor and copy the individual lines to a Windows command terminal. This will work but is rather less convenient. The example files for this note are contained in
<rsoft_dir>/examples/FullWAVE/ApplicationNotes/Normalization and subdirectories.

Please note that these example files have the option fdtd_p0_index = 0 so that the power monitor data is unscaled and absolute. We explore the three different forms of launch field normalization: Unit Peak, Unit Power and None.

Normalization = Unit Peak


Open and examine norm_unit_peak/fwnorm_unit_peak.ind.

226 Appendix D: Field Normalization and Nonlinearity

FullWAVE 6.0 User Guide

The structure is a 2D slab waveguide of width 1 m, background index 1, index contrast 0.5 and wavelength 1.55 m. The fundamental mode of this waveguide has an effective index of 1.4029. The file is configured to launch the slab mode in CW mode. A number of monitors are configured. In order they are time monitors of Ey, Hx, Hz, power, time-averaged power and the spatial profile of Ey. All the monitors are located at the center of the slab waveguide. In the following, all of these settings remain the same. The only changes are to the normalization of the launch field and the resolution of the simulation grid. Open the launch dialog and observe that Launch power=E0*E0, and Normalization=Unit Peak. Now run the calculations in runner.sh. Under Unix or Cygwin, this can be done simply by typing sh runner.sh at a command line. To use the MS-DOS command line, the commands must be copied and entered line by line. The script runs four FullWAVE simulations with different grid resolution and settings for the launch field amplitude E0. After each simulation, a Python program get_power.pyc calculates a number of quantities from the monitor output created by FullWAVE. The calculated quantities have the following meanings:
E 0: Launch field amplitude in Unit Peak and None modes. P 0: Launch field power in Unit Power modes. Ey_max_theory: The peak amplitude of the electric field according to the table above. Ey_max_mon: The peak amplitude of the electric field measured by the Ey monitor. Hx_max_theory: The peak amplitude of the magnetic field according to the table above. Hx_max_mon: The peak amplitude of the magnetic field measured by the Hx monitor. Error_Hx: The percentage error in the theoretical and measured values of Hx. P[fw_mon]: The time-averaged power in V2/m measured by the power monitor. P[\int I(x,y)]: The time-averaged power in V2/m according to the table above. P[\int I(x,y)]: The time-averaged power in W according to the table above.

The power values are quoted in V2/m and W/m because for 2D calculations, the power is normalized per unit vertical length out of the screen. Note that the theoretical values taken from the None column of the table above agree well with the measured values and that the agreement improves as the grid resolution increases. Secondly, when the launch amplitude E0 increases by a factor of 2, the power is increased by a factor 4 as expected.

Normalization = None
Change to the directory norm_none and open fwnorm_none.ind. This file is identical to the previous one except that the normalization setting is changed to None and the launch profile is taken from a file rather than a pre-calculated slab mode. Run the script file runner.sh. This script first solves for the mode profile using BeamPROP to obtain the profile bpmode.m00. By default this file is normalized to have a peak amplitude of unity. This file is then manipulated to create bpmode_bytwo.m00 which has the same profile with a peak amplitude of 2.0. These two files are then used as launch fields into the FullWAVE calculation. Observe from the results, that if bpmode_bytwo.m00 is launched, the peak electric field is twice that when bpmode.m00 is launched, and the power correspondingly changes by a factor 4. Also, the effect of doubling the dialog launch amplitude E0 is combined with the doubled amplitude of the launch file to increase the measured field by a factor of 4 and the power by a factor of 16. If the normalization mode is changed to Unit Peak, then the two launch files would produce identical results, because the increased amplitude in bpmode_bytwo.m00 is scaled away by FullWAVE before launching.

FullWAVE 6.0 User Guide

Appendix D: Field Normalization and Nonlinearity 227

Normalization = Unit Power


Change to the directory norm_unit_power and open fwnorm_unit_power.ind. In this version of the problem, we use the default slab launch profile, but change the normalization mode to Unit Power, and set the Launch power to 2*P0. Recall that the factor 2 here means that P0 then specifies the average rather than peak power. As discussed above, we also have to choose between power normalization in V2 (fdtd_launch_power_unit=0) or W (fdtd_launch_power_unit=1). Run the script file runner.sh. Two calculations are run, the first with the launch power express in W and the second with the launch power express in V2. Observe that the calculated power display the correct values in the two cases and that they differ by a ratio of Z0=376.7 . Similarly, between the two cases the fields change by a factor of

Summary
The above analysis is without doubt tedious. However, the calculations demonstrate how to check that the fields and powers are precisely as you expect. Getting these values correct is essential for nonlinear work, and the ideas above will help you to check quickly and efficiently that your configuration is correct.

228 Appendix D: Field Normalization and Nonlinearity

FullWAVE 6.0 User Guide

Appendix D: FullWAVE Release Notes

This appendix summarizes the changes from previous versions of FullWAVE. Within each section, the first subsection discusses new or improved features, and the second subsection covers compatibility issues.

Changes from Version 5.0 to Version 6.0


Note that the change log which details the history of changes from Version 5.0 to Version 6.0 is available in the file <rsoft_dir>/README/readme60.txt.

New Capabilities and Improvements to the Program


CAD:
Improved CAD interface. See CAD manual for more details.

Significant Changes in Program Behavior


The Slice Time control has been moved to the Output Options dialog. The Output Options dialog has been expanded with new options New options have been added to the Advanced Parameters dialog.

Changes from Version 4.0 to Version 5.0


Note that the change log which details the history of changes from Version 4.0 to Version 5.0 is available in the file <rsoft_dir>/README/readme50.txt.

New Capabilities and Improvements to the Program


CAD:
Introduction of an entirely new index/grid/mesh generation algorithm which improves accuracy and allows more flexible layout.

FullWAVE 6.0 User Guide

Appendix D: FullWAVE Release Notes 229

Added support for non-uniform grids. This can significantly improve accuracy while improving simulation speed.

Simulation:
An option has been introduced to smoothly ramp down CW excitations. A new feature allows a hyperbolic secant (sech) time envelope for the launch pulse which can be useful for nonlinear soliton-forming simulations. Linear anisotropic simulations can now be combined with chi2 nonlinearity simulations. While this might cause small changes in the results for linear anisotropic simulations, the new results are more accurate. Added option (fdtd_stm_output) to output the time sequence of the launch source. Added advanced option to improve the performance of the Perfectly Matched Layer (PML) boundary in certain cases by absorbing evanescent waves inn the PML. This option should only be used in cases where the simulation is unstable in the PML region and increasing the PML width doesnt help.

Analysis/Results:
Improved averaging of power monitors by enabling signed averaging. Added option (monitor_update_time) to control the redraw time for monitors. The use of this option can improve speed in rare cases. Added option to output 3D spatial field data for 3D time monitor spatial output. The output files are in a VTK format, and can be opened via the RSoft DataBROWSER. Introduced new utility Q-Finder which automates the calculation of cavity modes and Q-factors. Added new power monitor option (fdtd_total_power_monitor) to compute the total power flux through the a 3D power time monitor. This option is useful when using Q-Finder. Added a new total density (T Density) option which computes the sum of the E and H Density. This option is useful when using Q-Finder. Added ability to use arbitrary data files for overlap time monitors. Added option to control how time monitors are normalized. The variable fdtd_p0_index can be used to choose the launch field to use for the normalization. Added GUI for option to normalize frequency and wavelength output. The desired frequency for a cavity mode can now be set via the variable fdtd_modefrequency_real. The imaginary part of the mode frequency (for mode attenuation) can be set by the variable fdtd_modefrequency_imag.

Other:
Improved the output_as_3d option for radial simulations to output all six field components (Ex, Ey, Ez, Hx, Hy, and Hz). Additionally, this option now generates 3D plots of all field output, including monitor output.

Significant Changes in Program Behavior


The default implementation for clustering on Windows has been changed from MPICH to MPICH2 for improved stability/performance. The behavior of the Shutoff Time option has been changed to allow a more consistent meaning with other options. It now represents the total time from T=0 to the time the launch shuts off.

230 Appendix D: FullWAVE Release Notes

FullWAVE 6.0 User Guide

The behavior of the Launch Normalization option for Unit Power has been changed. Previously, this option normalized the integral of E^2 to be normalized to unity, but now it properly causes the integral of ExH to be unity. The interpretion of n2 values entered in the additional segment properties dialog now include the 4/3 factor resulting from the first Born approximation making the dialog consistent with BeamPROP. This will change power scales by the same factor, and can be disabled for compatibility with the old behavior by setting fdtd_n2_addbornfactor = 0, although this is not recommended.

Changes from Version 3.0 to Version 4.0


Note that the change log which details the history of changes from Version 3.0 to Version 4.0 is available in the file <rsoft_dir>/README/readme40.txt.

New Capabilities and Improvements to the Program


CAD:
General improvements to the CAD program which are useful for FullWAVE. See the CAD manual for more information.

Simulation:
A new command line utility fwmpirun for the simple execution of cluster calculations. A previously undocumented feature has been enabled which allows the linear anisotropic simulation to be combined with chi2 nonlinearity (isotropic or anisotropic). Added a new Material Editor which simplifies the definition of dispersive, non-linear, and magnetic materials. Added an option (fdtd_bc_ka_auto) to automatically set the periodic boundary condition ka/pi values appropriately when launching tilted plane waves. Note this option may not always be able to detect the correct parameters, and should be used with caution. Added an option in the simulation dialog to enable/disable cluster simulation on a per-file basis. In addition, for convenience, the global cluster setting for number of processes has been added to the main simulation dialog.

Analysis/Results:
Added a feature for the cluster version (fdtd_nx_master = 0) which enables the master node to be excluded from the calculation, and only used for collecting, analyzing, displaying, and storing monitor information. Extension of far field output option to include phase. A new implementation for overlap monitors which allows arbitrary rotation. The new implementation also provides better normalization, a more accurate vector calculation of the overlap, and a better correlation with other power calculations by combining overlap integrals with both the E and H fields. In some cases, the overlap may yield noticeable differences from prior versions, but in general the new method should give more meaningful results. If it is desired to match prior results, the combined E/H overlap may be disabled by setting fdtd_overlap_eh=0 in the *.ind file, or setting OverlapEH = 0 in the [FULLWAVE] section of BCADW32.INI to disable it by default, although neither is recommended. New options to assist in calculating Q for resonant cavities, as well as other problems.

FullWAVE 6.0 User Guide

Appendix D: FullWAVE Release Notes 231

Other:
Improved ability to shut down cluster simulations.

Significant Changes in Program Behavior


Improved handling of dispersive, non-linear, and magnetic materials. The default field components when launching in the y direction (e.g. phi around 0 and theta around +/- 90) have been changed to better match user expectations. If you have previously used this feature, please contact RSoft with questions. Improved accuracy for launching 3D fields into structures. The new option may be disabled by setting fdtd_etoh_vector = 0, although this is not recommended. Implementation of an important memory and time optimization option which uses "float" instead of "double" arithmetic. This option requires approximately half the memory, and is also significantly faster in many cases. Note that the use of this option may cause results to change slightly (e.g. in the sixth digit), but not significantly. This option can be switched off in the Advanced Parameters dialog if needed. Altered definition of E and H density monitors to be "normalized" by input power which is advantageous when using symmetric boundary conditions. The behavior can be turned off, and the old behavior recovered, by setting fdtd_density_normalization = 0. Altered behavior of symmetry boundary conditions in 3D/TE case to yield the expected behavior. The adjustment can be disabled, and the old behavior recovered, by setting fdtd_flipsym = 0. Added new options to improve the launching of plane waves directed along a primary axis. The launch field is no longer truncated in the PML by default. This option is controlled by fdtd_launch_pml. A value of 0 truncates the field and does not launch in the pml (the old behavior). Setting to 1 launches the field unchanged in the PML (the new default behavior). Changed the definition of the E and H Density monitors to include a factor of 1/2 in order to make them more directly interpretable in terms of Poynting's theorem.

Changes from Version 2.0 to Version 3.0


Note that the change log which details the history of changes from Version 2.0 to Version 3.0 is available in the file <rsoft_dir>/README/readme30.txt.

New Capabilities and Improvements to the Program


CAD:
As noted in the BeamPROP readme, several updates to the array generation utilities have been made. Added new functions which generate random sequences and lines.

Simulation:
Release of the clustering feature for FullWAVE, which allows FullWAVE simulations to employ multiple CPU's distributed over a network. Implemented the Drude dispersion model. Added support for anisotropic materials. Added support for periodic boundary conditions.

232 Appendix D: FullWAVE Release Notes

FullWAVE 6.0 User Guide

Enabled dispersion in the PML. Enabled Dispersion for the 2D TM case (previously it was only enabled for 2D TE or full 3D). Extended the cavity mode solver to 3D. Extended the continue simulation option to 3D. Extended the BPM Field Output option to operate with the clustering feature above, as well as additional settings to save all field components. Added limited support for the saturation coefficient and the imaginary part of the nonlinear index.

Analysis/Results:
Added major new analysis features for the time monitors which allow the output of all field components and other common electromagnetic quantities. Enabled output of data from a time monitor at arbitrary angles. Added DFT frequency analysis to the above time monitors. Enabled the output of field data from a clustered simulation to be consistent with the non-clustered case. Enabled the display of the whole field on the master node during a clustered simulation.

Other:
Introduced a new GUI interface for the FullWAVE simulation program which is common to both Windows and UNIX. The new interface has a new status line which is enabled under View/Settings/Enable-StatusLine. New organization of tools, documentation, etc. for the products in the RSoft Photonics CAD Suite. Please refer to README.TXT for information. Introduced new installation process.

Significant Changes in Program Behavior


Improved handling of interfaces in dispersion and 3D codes. This results in improved accuracy and stability. Automatic adjustment of the computational domain to match the grid has been made consistent with BeamPROP. Improvement to the PML algorithm in both 2D and 3D which improves both accuracy and stability. Improved the logic used when launching a field in a free space region. The field is now decomposed into a plane wave solution of Maxwells equations resulting in a realizable field. The FFT frequency output is now displayed versus a frequency scale in units of f/c to be consistent with the DFT output.

Changes from Version 1.0 to Version 2.0


Note that the change log which details the history of changes from Version 1.0 to Version 2.0 is available in the file READMEFW10.TXT.

FullWAVE 6.0 User Guide

Appendix D: FullWAVE Release Notes 233

New Capabilities and Improvements to the Program


CAD:
General improvements to the CAD program are described in the release notes section of the BeamPROP manual. Added improvements to the XZ array layout utility, particularly useful for PBG applications in FullWAVE Introduced a new XYZ array layout utility, particularly useful for PBG applications in FullWAVE Simulation: Added major new capabilities for dispersion and nonlinearity in both 2D and 3D. Added a capability to deal with metals with negative real part of the dielectric constant. Added a Radial FDTD option for structures with azimuthal symmetry. Added a feature which can improve the frequency resolution when generating a spectrum. Added a capability to calculate cavity modes (2D only). Improved control over the phase in time waveforms used in the excitation of the field. Added a new option to control the pulse delay. Added a new Impulse excitation type (2D only). Added new options to restart the simulation from a file (2D only). General speed and accuracy improvements.

Analysis/Results:
Added a new option for time averaging of monitors, useful for cw simulations, which is available in the time monitor properties dialog. The scan variable feature has been extended to show the final time monitor versus the scan parameter(s). Added a feature to save the current view after the simulation is completed. By switching field views under the view menu, different field components or cross-sections can be selected, and then saved via File/SaveView. Added additional options to allow export of FullWAVE results to BeamPROP, and calculation of farfield patterns from the exported results. Added options to extend the time window used for FFTs which can sometimes yield greater resolution. Added a fixed aspect ratio option to various plots. The option is available under the Display... button. The option is available under the Display... button. For stored plots generated with previous versions, or generated without having set this option, the aspect ratio can be changed in WinPlot under Options/Axes/Aspect-Ratio or via the /aspect option.

Other:
Updated and expanded the documentation, including a new chapter containing several tutorial examples. Included a new version of WinPLOT, as noted in the release notes section of the BeamPROP manual.

Significant Changes in Program Behavior


The log file has been renamed to log.txt for compatibility with other RSoft programs.

234 Appendix D: FullWAVE Release Notes

FullWAVE 6.0 User Guide

The location of the INI file holding the window size and other settings has been changed to the users home directory under Windows NT/2000/XP. This avoids permission problems that sometimes occurred with this file and also allows different users to have different preferences.

FullWAVE 6.0 User Guide

Appendix D: FullWAVE Release Notes 235

Aspect Ratio 165 Auto 39, 52, 63, 75, 138 Azimuth 50, 51

Index

B
b 188 Back Radius 133, 135 Background Index 107, 121, 131, 147 Background N 42 Black 141 boldface Courier 7 Boundary Conditions 155

C #
# Processes 86 c 188 CAD Display 59 CAD Display (Width & Length) 170 Cancel 24, 156, 178, 181 Center 96, 192 chi2 226 Chi3 188, 226 Chirp Coefficient 45, 46, 48 Circle 164 Circular Left 49, 51 Circular Right 50, 51 Cluster Options 100 Cluster Settings 102 Color Scale 34, 120 Color Shades 34 Component 112, 115, 136, 138 Component Height 121 Component Width 107, 121, 131, 133, 135 Compute Index Profile 72, 82, 126, 156, 165, 204 Compute Mode 93, 167, 171 Compute Modes 82 Computed Mode 40 Continue Simulation 77, 78, 90, 93, 94 Contour Map (XZ) 165 ContourMap (XZ) 148 ContourMap(XZ) 136 Cross Section 34 Current 39, 157 Current Direction 39 Custom 49, 50 CW 71, 115, 138, 143, 160

,
, 183

<
<< 42, 51

>
>> 42, 51

1
11 164

2
2D 107, 127 2D XZ 164

3
3D 121, 127 3D Output Format 32 3D Structure Type 121, 123

A
a 188 Accept Symbol 110 Advanced 51, 74, 75, 88, 155, 167 Ag 182 Align File 41, 42 All Components 33 Angle 49, 50 Anti-Symmetric 73, 74, 76, 169

D
Data Files 61 Decay length 98 Default 33, 120, 161, 165 Default Field 60, 63, 71, 93, 150 Delay Time 46, 48 Delete 51

FullWAVE 6.0 User Guide

Index 237

delta 188 Delta N 43 Delta Tensor 73 DFT 66, 72 Dimensions 164 Direction Vector 39 Dispersion/Nonlinearity 28, 73 Dispersion/Non-Linearity 176, 179, 182, 183 Display 184, 188 Display Color 65, 135 Display Grid Factor 87 Display Height 87 Display Index Profile 136, 148 Display Mode 126, 136, 148, 165 Display Type 129 Display Whole Domain on Master Node 87 Display Whole Domain on Master Note 87 Display 33, 120, 141, 161, 165 Domain Cut Direction 88 Domain Max 27, 165, 189, 198 Domain Min 27, 43, 71, 126, 165, 169, 189, 198 Domain Min/Max 137 Duplicate Segment 136 Duplicate Selection 135, 138

FDTD Continue 168, 170, 193 FDTD Options 114 FFT 66, 138, 150, 183 FFT Resolution 97 FHA if possible 192 Fiber 121, 123 Fiber Mode 40, 79 Field 39, 160 Field Component 34 File 40 Files of type 24 Final Field 33 Find Mode Volume 98, 101, 192 Fixed at Z-Min 126, 129 Frac. freq. tolerance 97 Frac. tolerance 97 Free Space Wavelength 47, 48, 63, 68, 71, 93, 107, 121, 131, 143, 147, 160, 167, 168 Frequency Analysis 67, 72, 138, 150, 183 Frequency Output 32, 141, 152 Frequency Spacing 68 Front Radius 133, 135 FullWAVE 107, 121, 131 FullWAVE Window 100 FullWAVE/FDTD 22

E
E Density 61, 64, 212 Edit Global Settings 143, 147 Edit Launch Field 38, 140, 150 Edit Launch Field 112, 113 Edit Pathways 139 Edit Symbols 109, 132 Edit Symbols 164 Edit Tensors 73 Ellipticity 50 Enable 85 Enable clustering 100 Enable for all monitor types 67 Enable for all types of monitors 66 Enable Nonuniform 200 Enable Temporal Output 31 Ending Frequency 68 Ending Vertex Z 136 Environment 87 Epsilon at Infinity 188 Ex 60, 63, 212 Excitation 65, 67, 68, 71, 93, 115, 140, 143, 151, 152, 157, 160, 166, 188 Excitation Time Envelope 32 Ey 60, 63, 212 Ez 212

G
Gaussian 40, 151 Gaussian, a 183 Global Monitor Settings 65 Grid Grading 199 Grid Options 198 Grid Ratio 199 Grid Size 28, 47, 117, 126, 128, 137, 140, 151, 160, 165, 176, 177, 180, 185, 200 Grid Size (Bulk) 198 Grid Size (Edge) 29, 198 Grid Step 165

H
H Density 61, 64, 212 Height 39, 40, 43, 59, 62 Hexagonal 164 Hide 100, 194 Host Machines 87 Hx 212 Hy 60, 63, 212 Hz 212

I
Ignore old .fst files 99 Impulse 47, 93, 157, 166, 170, 171 Index (imag part) 182

F
Far Field 33

238 Index

FullWAVE 6.0 User Guide

Index Difference 107, 121, 131, 135, 147, 177, 182 Input File 40 Input File (E-Major) 41 Input File (E-Minor) 41 Intermediate Field Slices 33

N
Name 110 Neff 43 New 51 New Circuit 107, 109, 121, 131 New Material 183, 188 New Pathway 139 New Symbol 110 No 63, 77, 150, 183 No processes 100 None 49, 50, 66 Normal 100 Normalization 41, 51, 188, 229 Number of Processes 87

K
ka/pi Value 52, 75 Keep Window 86

L
L 164 Lattice Size 164 Lattice Type 164 Launch Align File 42 Launch DataBROWSER 130 Launch Field 51, 61 Launch Mode 41 Launch MOST 178, 181 Launch Neff 47 Launch Normalization 187, 224, 225, 226, 227, 228 Launch Pathway 42, 140 Launch Polarizer 49, 50 Launch Position Z 179 Launch Power 224, 225, 229, 230 Launch Type 40, 41, 42, 43, 79, 140, 183 Launch Width 183 Launch 30, 38, 166 Launcher 86 Length 39, 43, 47, 59, 60, 62, 170 linear 49, 50 Lock for first N syms 96

O
Offset 112, 115, 123, 136 Offset (from Z Max) 33 Offset Value 112, 115, 136 OK 11, 22, 24, 83, 99, 107, 115, 117, 118, 120, 122, 126, 129, 131, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 146, 147, 149, 152, 153, 154, 156, 157, 158, 161, 164, 165, 167, 176, 179, 181, 185, 193, 194, 199, 200 Open DataBROWSER 179, 181 Options 30 Outline Color 34, 120, 141, 161, 165 Output File Prefix 24, 26, 185, 199, 200, 211, 212, 213 Output Prefix 30, 70, 77, 78, 83, 93, 99, 117, 118, 126, 129, 140, 141, 142, 143, 153, 154, 157, 158, 164, 167, 168, 170, 171, 189, 193, 194 Output Radial Data in XY Format 33 Output 24, 117, 141, 152 Overlap 61, 62, 115, 127, 138, 183 Overlap Data 61

M
M 164 Material Properties 182, 183, 188 Max 74 Max. 97 Max. tolerance 97 Measure Q by energy decay 98, 195 Merge Priority 135 Min 74 Minimize 100 Minimum Divisions 198 Mode 41, 113 Mode Options 82 Mode Radial 41 Model Dimension 107, 121, 127 Monitor Format 63 Monitor Step 70 Monitor Time 30, 31, 60, 66, 69, 70, 140 MPI Implementation 86 MultiMode 40

P
Padding Factor (2^(N-1)) 32, 69, 213 Padding Factor (2^N-1)) 213 Pathway 41, 42, 43, 113 Perform Simulation 10, 22, 23, 112, 114, 116, 128, 140, 142, 143, 151, 154, 155, 157, 160, 166, 175, 177, 180, 185 Periodic 73, 74, 75, 155 Phase 51 Phi 41, 43, 44, 47, 59, 60, 62 Plot Aspect Ratio 35, 120, 127 PML 73, 74 PML Kappa 75 PML Refl. 74 PML Width 29, 74, 167 PML Width. 74 Polarization 28, 48, 151, 154, 160

FullWAVE 6.0 User Guide

Index 239

Polarizer Mode 49 Position 43 Position X 43, 151, 160, 167, 183 Position Y 43 Position Z 43, 151, 160, 167 Power 51, 60, 64, 71, 212, 213 Poynting Vector 64, 212 Preliminary Output Factor (2^-N) 32, 213 Priority Level 135 Propagation lengths 97, 192, 193 Propagation lengths (2^N*dt) 98 Pulse 188 Pulse Time 151, 152 Pulsed 140, 151, 152

Starting Frequency 68 Starting Vertex X 136 Starting Vertex Z 136 Steady State Field (at Fixed Z) 32, 33, 68 step size 26 Stop Time 29, 69, 70, 117, 140, 141, 142, 143, 151, 160, 167, 176, 177, 180, 185, 213 Storage Grid 65 Symmetric 73, 74, 76, 169

T
T Density 61, 64, 170 TE 28, 151, 160 Temporal Excitation Type 45, 47 Temporal Output 115, 127, 138, 141, 150, 183 Test 86, 87 Theta 41, 43, 44, 47, 59, 62 Tilt 41, 44 Time Average 62, 63, 120, 138, 150, 170, 183 Time Monitor 56, 170 Time Monitor Type 93, 170 Time Step 29, 47, 69, 70, 98, 140, 151, 152, 160, 167, 192 TM 28, 154 tolerance 97 Transformer 49 Type 113, 151, 188

R
Radial Calculation 79 Ramp Off Time 46, 48 Ramp/Pulse Time 45, 46, 47, 48, 188 Random Set 41 Rectangle 40, 52, 53, 188 Reference Type 112, 115, 138 Relative To 115 Relative To: 112, 138 Repeat in Each Unit Cell (non-cubics) 51 Restart 78 Rotation 50

S
Save Settings 24, 115, 156 Scale Files 34, 120 Seed center frequencies in scan 194 Seed center frequency values in scans 97 Segment Mode 110, 123, 135 Select Mode 135, 136, 159 Settings 86, 100 Show Color Scale 34 Show Window 86 Shutoff Time 46, 48 Simulation Tool 22, 107, 121, 131 Single Precision 78 Skip final mode profile calculation 98, 99, 193 Skip Master 100 Slab Mode 40, 140 Slice Grid 137, 165 Slice Position X, Y, and Z 34 Slice Step 126, 137 Slice Time 33, 63, 66, 213 Source Norm 32 Spatial Excitation Type 39, 157 Spatial Format 64, 72 Spatial Time Step 32 Spectral analysis method 99, 192 Stability Limit 29

U
Undo Last Change 110 Unit Cell Contents 164 Unit Peak 187, 188 Unit Power 51 Update Time 30, 33, 117, 140, 151, 152, 160, 178, 180, 205 Use Anisotropic Materials 73 Use Complex Implementation 52, 79 Use Master Node 88 Utility/Terminal 172

V
Value 110, 160 View Editor 118, 153 View Graphs 118, 141, 167, 185 View Grid 199 View Plot 118, 154

W
Waveguide Dimension 48 Wavelength 45, 46, 47 Wavelength Monitor 67, 93 Wavelength Output 32, 141

240 Index

FullWAVE 6.0 User Guide

Width 39, 40, 43, 59, 62, 151, 160, 164, 167, 170, 188 Window 194

X
X 138 X Min 169 X Position 164

Y
Yellow 135 Yes 63, 77, 78, 93, 120, 141, 170

Z
Z 138 Z Domain Max 176, 178, 180, 185 Z Domain Min 176, 178, 180, 185 Z Min 169 Z Offset Value 138 Z Position 164

FullWAVE 6.0 User Guide

Index 241

You might also like