(Oct 2016) Electromagnetic Simulation With COMSOL
(Oct 2016) Electromagnetic Simulation With COMSOL
(Oct 2016) Electromagnetic Simulation With COMSOL
Definitions
Each parameter has a name and an expression. Names can be freely defined except for some
reserved names, e.g. freq for frequency and c_const for speed of light.
The expression can be a simple value with units in square brackets e.g. 200[nm], or a simple
algebraic expression e.g. 2*pi*radius.
Functions are used to tabulate imported data. Each function has a name and carries the argument t,
and the value f(t)
Components
Local Definitions
Under the local definitions, you can define variables and functions which are specific to the
highlighted component. Special definitions can also be used, like probes and component couplings:
they are special markings to allow for post-processing data in the later stage.
For example, you are able to perform volume/surface integration over the defined region in your
optical structure. After simulation, you can integrate the electric-fields, magnetic-fields, optical
power etc.
Geometry
COMSOL geometry drawings adopt the wysiwyg system; however, the material properties have to
be applied after the geometry is complete. Simple primitives like squares and circles, as well as
advanced parametric curve are available. There are also Boolean functions (intersection, difference),
and transforms (arrays, mirror, scale) to help you customize the structure.
Material
The material property editor enables you to input the material data. Material data comes in many
forms: constants, analytical equations, defined functions, etc. The available type of material data
depends on the physics you select in the next section.
You will be able to input a custom material data into the definitions section, and link it back to the
material property editor using the called function.
After that, you can apply each material to a different section of your optical structure. If there are
overlaps, the bottom material in the list will take precedence.
Physics
In the physics section, you can define one or multiple wave equation models to fit your material
data. Models to choose from include Drude, Sellmeier, Refractive index, Permittivity, etc.
Here you can set the boundary conditions for your simulation, commonly used ones include PEC,
PMC, SBC and Ports. The ports are usually used as the source excitation as well as the probe to
measure the output.
Mesh
COMSOL will automatically generate a reasonable mesh size for your optical structure. You can also
define your own mesh and they can be different for each region of your optical structure. By default,
COMSOL uses the triangular mesh (FEM). You can also change to the square mesh (FDTD).
Study
This is where you choose your final simulation settings. The most commonly used is the Frequency
Domain simulation, which assumes the electromagnetic fields in the optical structure is in a steady
state. Mode analysis is a 2D simulation tool to calculate the mode of waveguides. Finally, parameter
sweep allows you to perform sequential simulations of a changing variable, e.g. dimension of the
waveguide or refractive index change.
Results
The dataset section stores all the raw simulation results. For electromagnetic simulations, this will
contain the electric and magnetic fields of the entire simulation domain.
Under the derived values section, we can perform post-processing of the raw simulation results: e.g.
finding the effective waveguide index, loss, pointing vector etc. If there are multiple results from
parameter sweep, they will be tabulated in the Tables section.
There are 3D, 2D and 1D plots to help you visualise the data. The auto-generated plot is usually the
electric-field plot.
Right click the mesh and add a +size to add Size 1 under the mesh section.
On Size 1, select domain for geometric entity, and select Domain 2.
Select custom mesh, activate Maximum element size and input 50.
Right click on Mesh and add Free triangular. Click Build All.
Study
1.
2.
3.
4.
Section 2: computation of the effective mode area. The effective mode area of a waveguide is given
by the following expression:
Aeff
E(x, y)
E( x, y)
dxdy
dxdy
We will make use of the area integration function in Comsol to directly integrate the electric fields in
the simulation
Initialization
1.
2.
3.
4.
5.
Calculating EMA
1. Under Results section, right click Derived values and add Global Evaluation 1.
2. In the expression, type int_1^2/int_2.
3. Click Evaluate. The EMA for both modes will be tabulated.
Section3: Advanced simulation settings. In this section you will learn how to customize your
simulation settings for greater accuracy.
Materials
In the last section, we defined the material index as a constant, which is only true at single
wavelengths. Here we learn how to import raw refractive index data from experimental results, or
using analytical forms (e.g. Sellmeier equations).
Fitting from external data
1. Prepare a refractive index data in txt format. In this case, go to
http://refractiveindex.info/?shelf=main&book=Si&page=Edwards for a generic Silicon data,
download the .txt file. (Note, convert the wavelength to frequency since comsol only accepts
frequency variable).
2. Go to global definitions, add Functions -> Interpolation.
3. Choose data source from file, browse for the prepared txt file and import.
4. Rename the Interpolation to Silicon
5. Go to the Materials section, Under the Silicon created earlier, replace Silicon(freq) for the
value of the refractive index.
Fitting from Sellmeier equation
1. Go to the Physics section, Electromagnetic Waves, Frequency Domain. Right click to add
Wave Equation, Electric 2.
2. Under the newly created Wave Equation, select Domain 2. Choose Sellmeier Equation Model
for the Electric Displacement Field.
3. Retrieve the Sellmeier coefficients from
http://refractiveindex.info/?shelf=main&book=Si&page=Salzberg and enter them into the
table provided.
Custom Mesh
Here we learn how to replace the default FEM mesh with a rectangular FDTD mesh.
1. Go to Mesh, right click and select More Operations -> Edge. Select the top edge of the
waveguide.
2. Right click Edge 1 and choose Size. Input the maximum element size as 50nm.
3. Repeat the steps above for the side edge of the waveguide with maximum element size of
20nm.
4. Right click on Mesh and choose Mapped. Choose Domain for Geometric Entity and select
Domain 2. Then click Build. (Note that the Free Triangular has to be dragged to the bottom
of the list).
Initialization
1. Open a new comsol file, add a 3D component.
2. Under the Global Definitions, add parameters. Define width as 500[nm] and height as
200[nm].
3. Define f as 1.9355e14[Hz].
4. Right click component and add Physics -> Optics -> Electromagnetic waves, Frequency
Domain.
Drawing a 10000nm waveguide
1. On the Geometry tab, change the length units to nm.
2. Right click geometry and add a block 1.
3. Define the Height and Depth as 2500[nm] each. Define Width as 10000[nm]. Select the base
as center. Then click Build.
4. Add another block 2.
5. Define Depth as 500[nm] and Height as 250[nm]. Define Width as 1000[nm]. Select the base
as center and click Build.
Defining the material
1. Under the materials section, right click and add a new material. Rename the material to
SiO2.
2. Select Domain 1 only for SiO2 and input refractive index as 1.44.
3. Add a new material and rename as Silicon.
4. Select Domain 2 only for Silicon and input refractive index as 3.48
2. Go to Definitions under the Component 1. Right Click and select Perfectly Matched Layers.
List the PML domains created. Use PML scaling factor of 0.01.
3. Go to Physics and set up 2 ports, one for the input and the other the output. The ports
should cover the silicon core and silica background but not the PML layers
4. Under Port 1, choose numeric type and turn on the wave excitation. Do the same for Port 2
but turn off the wave excitation.
Building the mesh
1. Right click the mesh and add a +size to add Size 1 under the mesh section.
2. On Size 1, select domain for geometric entity, and select Domain 2.
3. Select custom mesh, activate Maximum element size and input 100.
Study
1. Add a study, under preset studies, choose Boundary Mode Analysis for Port 1. Make another
copy of the study for Port 2.
2. Input 1 Desired number of mode, and search for modes around: 4. Port name is 1. Input f for
mode analysis frequency. Do the same for the other Boundary Mode Analysis for Port 2, only
changing the Port name to 2.
3. Add a frequency domain study if it is not already there. Under study settings, input f as the
Frequency. You may input a range of frequencies too.
4. Click compute
Results
1. The default visualization is the Electric Field (normalized), with 3 cutplanes. You can visualize
the mode from the z-y plane, and the propagation from the y-x plane.
2. To visualise the wave oscillation, we have to select the individual electric-field components.
Since we are simulating the TE fundamental mode, we can choose the y-direction Electric
fields. Under the Multislice results, change ewfd.normE to ewfd.Ey.
3. Parameters that can be extracted from the simulation include the transmission and
reflection, called-out by ewfd.s21 and ewfd.s11 respectively.