Hi Randy,
the attached ctl works fine. 
(define-param h 0.9) ; the thickness of the slab
(define-param eps 5.76) ; the dielectric constant of the slab
(define-param loweps 1.77) ; the dielectric constant of the water
(define-param r 0.28) ; the radius of the holes
(define-param R 0.15) ; the radius of the defect
(define-param supercell-h 6) ; height of the supercell
(define-param supercell-y 7) ; the (odd) number of lateral supercell periods
; triangular lattice with vertical supercell:
(set! geometry-lattice (make lattice (size 1  supercell-y supercell-h)
                         (basis1 (/ (sqrt 3) 2) 0.5)
                         (basis2 (/ (sqrt 3) 2) -0.5)))

(set! geometry
      (list (make block (material (make dielectric (epsilon loweps)))
            (center 0 0 0) (size infinity infinity supercell-h)) 
            (make block (material (make dielectric (epsilon eps)))
            (center 0 0 0) (size infinity infinity h)) 
        (make cylinder (material air)
          (center 0) (radius r) (height supercell-h))))
(set! geometry 
      (append
       ; duplicate the bulk crystal rods over the supercell:
       (geometric-objects-lattice-duplicates geometry 1 1 supercell-h)

       ; add a rod of air, to erase a row of rods and form a waveguide:
       (list 
    (make cylinder (center 0) (radius r) (height supercell-h)
          (material (make dielectric (epsilon eps)))))
      ; add a rod of air, to erase a row of rods and form a defect:
       (list 
    (make cylinder (center 0) (radius R) (height supercell-h)
          (material air)))))


; 1st Brillouin zone of a triangular lattice:
(define Gamma (vector3 0 0 0))
(define K' (lattice->reciprocal (vector3 0.5 0 0))) ; edge of Brillouin zone.

(define-param only-K false) ; run with only-K=true to only do this k-point
(define-param k-interp 9)   ; the number of k points to interpolate
(if only-K
    (set! k-points (list K))
    (set! k-points (interpolate k-interp (list Gamma K'))))

(set-param! resolution (vector3 32 32 16))
(set-param! mesh-size 7)
(set-param! num-bands 11)

; Run even bands, outputting fields only at the K-point:
(run-zeven)
(run-zodd)
(display-eigensolver-stats)

Best regards

--- On Fri, 7/10/09, Randy Tompkins <rand...@hotmail.com> wrote:

From: Randy Tompkins <rand...@hotmail.com>
Subject: [MPB-discuss] help
To: "MIT photonic bands" <mpb-discuss@ab-initio.mit.edu>
Date: Friday, July 10, 2009, 7:44 AM




#yiv463325316 .hmmessage P
{
margin:0px;padding:0px;}
#yiv463325316 {
font-size:10pt;font-family:Verdana;}

MPB users:

I am trying to model a photonic crystal slab structure (air in dielectric) with 
one defect (circular hole of different size) in the center.  Slab is surrounded 
by water cladding regions on top and bottom.  I am having a hard time adding a 
single defect in the center of the lattice pattern.  Perhaps I am missing a 
command or I have something incorrect.  The code that I have does work, however 
I have looked at the geometry of the structure and it does not appear to have a 
defect in the center.  Another concern is I do not want the defect to extend 
into the water clad regions.  The defect could be filled with water or air 
either one.   I am new to MPB and would greatly appreciate any help you experts 
could provide.  I have attached my code below.

Thank You

(define-param h 0.9)
(define-param eps 5.76)
(define-param loweps 1.77)
(define-param r 0.28)
(define-param supercell-h 12)
(set! geometry-lattice (make lattice (size 1 1 supercell-h)
(basis1 (/ (sqrt 3) 2) 0.5)
(basis2 (/ (sqrt 3) 2) -0.5)))
(set! geometry
(list (make block (material (make dielectric (epsilon loweps)))
(center 0 0 (* 0.25 supercell-h))
(size infinity infinity (* 0.5 supercell-h)))
(make block (material (make dielectric (epsilon loweps)))
(center 0 0 (* -0.25 supercell-h))
(size infinity infinity (* 0.5 supercell-h)))
(make block (material (make dielectric (epsilon eps)))
(center 0) (size infinity infinity h))
(make cylinder (material air) (center 0) (radius r) (height h))))
(set! geometry (append geometry
                (list (make cylinder (center 0 0 0)
                (radius 0.15) (height h) 
                (material air)))))
(define Gamma (vector3 0 0 0))
(define M (vector3 0 0.5 0))
(define K (vector3 (/ -3) (/ 3) 0))
(define-param k-interp 4)
(set! k-points (interpolate k-interp (list Gamma M K Gamma)))
(set-param! resolution (vector3 24 24 24))
(set-param! num-bands 9)
(run-zeven)
(run-zodd)
(display-eigensolver-stats)


Randy Tompkins

Graduate Research Assistant

West Virginia University
Physics Dept.

Phone:  (304)293-3422 x1436

Home:  (304)-906-9821

Fax: (304)-293-5732


Insert movie times and more without leaving Hotmail®.  See how. 

-----Inline Attachment Follows-----

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


      
_______________________________________________
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