Hi all,
  I'm trying to calculate a 2D case of photonic crystals with 3rd nonlinear 
material on meep. The control file is given below, the structure is simply a 
trianglular lattice with line defect, and the nonlinear material is located in 
and near the defect. The source is a continuous source, and I examine the flux 
in frequency domain near the source at the input and output port of the device.
When I test it with resolution 32 and 36, I get similar results that at the 
output port, there is only  one dominant peak at the source frequency. But when 
I increase the resolution to be 40, there is a very high peak quite near the 
source frequency at the ouput port and thus there would be two peak aroud that 
frequency. I would like to know which result is correct? And what is reason for 
the error of the other. Whether it is because that the resolution is not enough 
for convergence or do any one have some other suggestion to solve the problem?
   
  my control file is:
(define-param pi 3.1416)
(define-param eps 12.25)
(define-param a 1)
(define-param r 0.3)
(define-param dpml 1)
(define-param sx 42)
(define-param sy 11)
  (set! eps-averaging? false)
  (define-param amp 57.5)
(define-param fcen 0.23865)
  (define-param k 5e-4)
(define nonmaterial (make dielectric (epsilon eps) (chi3 k)))
  (define Si (make dielectric (epsilon eps)))
  (set! default-material Si)
(define-param d (* (/ (sqrt 3) 2) a))  ; define d cell size
(define-param sy_l (* sy d))
(define-param sx_l (* sx a))
  (set-param! resolution 40)
  (define-param df 0.005)      ; pulse width (in frequency) - .01 runs for 1000 
units
  (set! geometry-lattice (make lattice (size sx sy no-size)))
  (set! pml-layers (list (make pml (direction X) (direction Y) (thickness dpml))
  ))
  (set! geometry
 (append
  (list (make block (center 0 0 0) (size sx_l sy_l no-size) (material Si))
  (make block (center 0 0 0) (size (* 32 a) (* 5 d) no-size) (material 
nonmaterial))
  )
    (geometric-objects-lattice-duplicates
  (list
            (make cylinder (center 0 0 0) (radius r) (height infinity) 
(material air))
     (make cylinder (center (* .5 a) (* -1 d) 0) (radius r) 
     (height infinity) (material air)))
     1 (* a (sqrt 3) a))
 
 (list (make block (center 0 0 0) (size sx_l d no-size) (material Si))
  (make block (center 0 0 0) (size (* 32 a) (* 1 d) no-size) (material 
nonmaterial))
   )
  
  ))
  (set! sources (list
              (make source
                 (src (make continuous-src (frequency fcen)))
                 (component Hz)
                 (center (* -19 a) 0 0)
   (size 0 d no-size)
   (amplitude amp))))
  
 (set! symmetries (list (make mirror-sym (direction Y) (phase -1))))
   (define-param nfreq 2000)
   (define trans1
 (add-flux fcen df nfreq
     (make flux-region (center (* -17 a) 0 0) (size 0 (* 5 d) no-size))))
   
  
 (define trans2
 (add-flux fcen df nfreq
     (make flux-region (center (* 17 a) 0 0) (size 0 (* 5 d) no-size))))
   
   
   (run-until 20000 ;(at-beginning output-epsilon) 
;  (at-every 50 (output-png Hz "-Zc bluered"))
  
)
 
 (display-fluxes trans1)
 (display-fluxes trans2)
erpolate k-interp (list (vector3 0 0) (vector3 0 0.5))))

  Best regards
   
  John

       
---------------------------------
Pinpoint customers who are looking for what you sell. 
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to