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

2.4 1D planar structures

The following Python code shows how to model a purely 1D Bragg stack, where all the layers extend infinitely in the transverse direction.

 
#!/usr/bin/env python

####################################################################
#
# planar 1D DBR
#
####################################################################

from camfr import *

# Define structure.

set_lambda(1)

GaAs_m = Material(3.5)
AlAs_m = Material(2.9)

GaAs = Planar(GaAs_m)
AlAs = Planar(AlAs_m)

d_GaAs = get_lambda()/4./GaAs_m.n().real
d_AlAs = get_lambda()/4./AlAs_m.n().real

s = Stack(GaAs(0) + 10*(GaAs(d_GaAs) + AlAs(d_AlAs)) + GaAs(0))

# Loop over incidence angles.

for theta in arange(0, 90, 0.5):

  GaAs.set_theta(theta * pi / 180.)
  print theta,
  
  set_polarisation(TE)
  s.calc()
  print abs(s.R12(0,0))**2 ,

  set_polarisation(TM)
  s.calc()
  print abs(s.R12(0,0))**2

Planar takes a material as argument to create an infinitely extended planar layer, which can be used in Stack to create a layered 1D structure.

The stack is calculated for one angle at a time, which can be set in radians using set_theta on a given material. Note that you should set the wavelength before setting the angle, as set_theta effectively sets the transverse part of the wavevector, which is dependent on the wavelength.

Because only one mode (or plane wave in this case) is needed at any time for a calculation, the reflection and transmission matrices have only one element.


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

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