Hi, Steven and all.

I make a simulation for photonic crystal, thus I need to use periodic border 
conditions. I have a Gaussian source and the wave is spreading under some 
angle. However there are two intersting things observed:
1) the wave is not unifor it is splited. It is not a plane as it should be, 
some kind of smaller waves of different signs can be seen. This can be easily 
observed on slices.
2) There is some kind of refraction from the borders which should not be at 
all. May be I misunderstand the meaning of k-point.

I wonder what can be wrong here. Ctl is included.

Thanks in advance,
Anton

=======================
(reset-meep)

;---variables area---
;time of simulation
(define-param tt 300
)

;unit cells
(define-param cell_numX 2.35
)

(define-param cell_numY 10
)

(define-param cell_numZ 30
)

;resolution
(define-param res 30 )

(define-param pml_width 1
)

;---geometry---
(define-param Rad 0.75
)

(define-param BSTHeight 0.4
)

(define-param MgOHeight 5
)

(define-param CuHeight 1.25
)

(define-param Dcilin 2.35
)

(define-param CuGap 4
)

(define-param shiftZ 0
)
;---end geometry---


;---materials---

;material 
(define Cu   
 (make dielectric 
  (epsilon 1)
  (polarizations
   (make polarizability
        (omega 6.63125e-10) (gamma 0.00105) (delta-epsilon 1.6786e+016)
    )
  )

 ) 
)

(define MgO   
 (make dielectric 
  (epsilon 2.975)
 ) 
)

(define BST   
 (make dielectric 
  (epsilon 5.8)
 ) 
)

;---end materials---


;source parameters
(define-param fcen 0.25)
(define-param df 0.25)
(define-param nfreq 200)
(define wl (/ 1 fcen))

(define angle 30) 
(define kangz (* (- (sin (/ (* angle pi) 180))) wl) )
(define kangy (* (- (cos (/ (* angle pi) 180))) wl) )
(define  kang  (vector3  0 kangy kangz))

(define ((amp kq) x)
 (exp(- (* 0+i (vector3-dot kq x))))
)

;eviroment area
(set! filename-prefix false
)
;----------------------------------------------
;functions defined

;----------------------------------------------
;Main 
;----------------------------------------------

;dimensions of this simulation
(set! dimensions 3
)

(set! eps-averaging? false); 

(set! Courant 0.4 ; 
)

;default material definition
(set! default-material air
)

;now I set the GRID
(set! geometry-lattice 
 (make lattice 
  (size cell_numX cell_numY cell_numZ)
 )
)

;geometrical objects 
(set! geometry

 (list
    
  (make block ; MgO substrate
   (size infinity infinity MgOHeight)
   (center 0 0 shiftZ)
   (material MgO) 
  )

  (make block ; BST film
   (size infinity infinity BSTHeight)
   (center 0 0 (+ shiftZ (/ MgOHeight 2) (/ BSTHeight 2))  )
   (material BST)
  )

  (make cylinder ; hole in BST
   (height BSTHeight)
   (radius Rad)
   (center 0 (/ Dcilin 2) (+ shiftZ (/ MgOHeight 2) (/ BSTHeight 2))  )
   (material air)
  )

  (make cylinder ; hole in BST
   (height BSTHeight)
   (radius Rad)
   (center 0 (- (/ Dcilin 2)) (+ shiftZ (/ MgOHeight 2) (/ BSTHeight 2))  )
   (material air)
  )

  (make block 
   (size infinity infinity CuHeight)
   (center 0 0 (+ shiftZ (/ MgOHeight 2) BSTHeight (/ CuHeight 2))  )
   (material Cu)
  )
  
  (make block 
   (size infinity CuGap CuHeight)
   (center 0 0 (+ shiftZ (/ MgOHeight 2) BSTHeight (/ CuHeight 2))  )
   (material air)
  )
 

 )
)

;fields
(set! sources
 (list
  (make source
   (src (make gaussian-src
    (frequency fcen)
    (fwidth df)
        )
   )
   (amp-func (amp kang))
   (start-time 0)
   (component Ey)
   (center 0 0 (- (/ cell_numZ 2) pml_width) )
   (size cell_numX cell_numY 0)
  )
 )
)

(define trans ; transmitted flux                                          
        (add-flux fcen df nfreq
                  (make flux-region
                    (center 0 0 (- pml_width (/ cell_numZ 2)) ) 
      (size cell_numX cell_numY 0 )
    )
 )
)

(set! k-point (vector3 0 0 0))
(set! ensure-periodicity true)

;pml, hope that will be enough 
(set! pml-layers (list (make pml (direction Z) (thickness pml_width)))
)

;seting the resolution
(set! resolution res
)

(run-sources+ tt
 (at-beginning output-epsilon)
 ;(at-every 0.1 E-outer)
 (at-every 4 output-efield-y)
)

(display-fluxes) ; print out the flux spectrum
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to