Dear All,
      I'm a mpb user. I want to do some calculations about photonic crystal 
fibers recently, especially the gap map and guided modes of pcfs.
     I have searched a mpb code in this link:
http://www.mail-archive.com/mpb-discuss@ab-initio.mit.edu/msg00018.html
      In this link, Steven metioned that "I've attached a couple of files I 
used to compute gap maps for holey fibers. See in particular the use of the 
"poly-grid" routine that I wrote as a quick hack for this purpose." There is an 
attached file "tri-holes.ctl" for PCFs. I attache it in this letter again.
      However, In this file, it includes a file "poly.scm",which I think is the 
routine that metioned above. I have searched for this file, but have no any 
results. Does anyone have this file and be so kind to send me a copy? Or can 
anybody give me a sample code to compute gap maps and guided modes for pcfs?

Many thanks!

-- 
Best wishes,
Sincerely,

Z.H.Woo

; 2d system: triangular lattice of air holes in dielectric
; This structure has a complete band gap (i.e. a gap in both TE and TM
; simultaneously) for a hole radius of 0.45a and a dielectric constant of
; 12.   (See, e.g., the book "Photonic Crystals" by Joannopoulos et al.)

; first, define the lattice vectors and k-points for a triangular lattice:

(set! geometry-lattice (make lattice (size 1 1 no-size)
                         (basis1 (/ (sqrt 3) 2) 0.5)
                         (basis2 (/ (sqrt 3) 2) -0.5)))

(define-param kz-min 0.2)
(define-param kz-max 2)
(define-param kxy-interp 7)
(define-param kz-interp 25)

(define Gamma (vector3 0 0 0))
(define M (vector3 0 0.5 0))
(define K (vector3 (/ -3) (/ 3) 0))

(define IBZ (list Gamma M K))
(include "poly.scm")
(define IBZ-grid (poly-grid IBZ kxy-interp kxy-interp 1 1))

(define-param boundaries-only? true)
(define-param gamma-only? false)

(if boundaries-only?
    (set! k-points 
          (fold-left
           append '()
           (map
            (lambda (kz)
              (interpolate kxy-interp
                           (list (vector3 0 0 kz)          ; Gamma
                                 (vector3 0 0.5 kz)        ; M
                                 (vector3 (/ -3) (/ 3) kz) ; K
                                 (vector3 0 0 kz)          ; Gamma
                                 )))
            (interpolate kz-interp (list kz-min kz-max)))))
    (set! k-points
          (fold-left
           append '()
           (map
            (lambda (kz)
              (map (lambda (k) (vector3+ k (vector3 0 0 kz))) IBZ-grid))
            (interpolate kz-interp (list kz-min kz-max))))))
(if gamma-only?
    (set! k-points (interpolate kz-interp (list (vector3 0 0 kz-min)
                                                (vector3 0 0 kz-max)))))
      
; Now, define the geometry, etcetera:

(define-param n 1.46) ; dielectric constant of silica
(define-param r 0.47) ; the hole radius

; hollow cylinder outer radius (can overlap) (defaults to no corner voids)
(define-param r-outer infinity)

(define C->L (compose cartesian->lattice vector3))
(define (hexagon r c m)
  (list
   (make block (center c) (material m) (size (* r (sqrt 4/3)) (* 2 r))
         (e1 (C->L 1 0)) (e2 (C->L 0 1)))
   (make block (center c) (material m) (size (* r (sqrt 4/3)) (* 2 r))
         (e2 (C->L (/ (sqrt 3) 2) 0.5)) (e1 (C->L -0.5 (/ (sqrt 3) 2))))
   (make block (center c) (material m) (size (* r (sqrt 4/3)) (* 2 r))
         (e2 (C->L (/ (sqrt 3) 2) -0.5)) (e1 (C->L 0.5 (/ (sqrt 3) 2))))
   ))

(define-param hex? false)

(define diel (make dielectric (index n)))
(if hex?
    (begin
      (set! default-material diel)
      (set! geometry (hexagon r (vector3 0) air)))
    (set! geometry (list (make cylinder (center 0) (material diel)
                               (radius r-outer)
                               (height infinity))
                         (make cylinder (center 0) (material air)
                               (radius r) (height infinity)))))

(set-param! resolution 64)
(set-param! num-bands 50)

(run)

_______________________________________________
mpb-discuss mailing list
mpb-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss

Reply via email to