[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.11 CAMFR 3D

The following pages illustrate how to use CAMFR to find modes of waveguides with an arbitrary 2D cross-section. These 2D waveguides can subsequently be stacked together in Stack, BlochStack, or Cavity objects. Since this code is still in development, some of the things mentioned here are subject to change.

The following code looks for the ground mode of a (quarter) of a square waveguide, exploiting symmetry:

 
from camfr import *

set_lambda(1.0)
set_N(1)

core = Material(1.5)
clad = Material(1.0)

set_section_solver(L)
set_mode_correction(full)

set_left_wall(H_wall)
set_right_wall(H_wall)
set_right_PML(-0.05)

set_lower_wall(slab_E_wall)
set_upper_wall(slab_E_wall)
set_upper_PML(-0.05)

wg = Slab(core(0.25) + clad(1))
air = Slab(clad(wg.width()))
        
all = wg(0.25) + air(1)

s = Section(all, 10, 40)
s.calc()

print s

In order to explain all the options, some insight into the nature of the 3D model is needed.

As a first step of the model, a coarse estimate of all the modes of a Section (a waveguide with a 2D cross section) is created using a plane-wave model. In a second step, these estimates (or a subset of them) are refined using an expansion based on modes of the 1D waveguides making up the Section. Since these can better satisfy the boundary conditions, more accurate results can be obtained.

The line s = Section(all, 10, 40) means we use (2*10+1)^2 plane waves in the first stage, and refine it using 40 1D modes in each Slab during the second stage. all can be any 2D stack, including those fabricated with the Geometry function. Note: currently the 100 is a rough estimate: the software will print out how many modes were actually used.

The user has the option of choosing which modes get refined during the second stage:

When you're only interested in the modes of a Section, and not putting Sections together is a Stack, set_mode_correction(full) is the way to go, as it is more accurate. For a full 3D model with different Sections however, such an approach can be very time-consuming, especially in the calculation of the overlap integrals, which are much quicker in a plane wave basis. In that case, it's better to use guided_only or none. none is the fastest, but can sometimes require a lot of plane waves to get accurate results. guided_only is a hybrid approach, which is more accurate, but can sometimes miss a mode. When using guided_only, it's adviseable to use set_orthogonal(False) as well, as using a mixture of two expansion sets somewhat distorts the mode orthogonality.

Some loose remarks:

Some interface quirks which are due to the development nature of the model and will probably change in the final version :


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by root on August, 27 2008 using texi2html 1.76.