Dear MEEP user,

I have a short question. I've been trying to get the focal length of a len. So, 
I calculate the intensity along the particular line (e.g., (0,sy,0)), and then 
I use h5totxt to convert .h5 file to .dat file.  I want the converged solution 
of the intensity along this line, so I change the resolution and then obtain 
the intensity of each resolution.  I use gnuplot to plot the intensity and I 
found that the distance of this line increases(x-axis) by increasing the 
resolution even the computational cell is fixed. The intensity curved is 
shifted to the right according to the increase of the distance. The distance 
should be constant. Do you know how to fix this problem and what is its origin. 
I give you the ctl file as follows: 


;length scale a = 100 nm 
(define pi 3.141593)
(define-param lam 3.0) 

;lens geometry
(define-param lenlen (* 2 lam))
(define-param lenwidth (* 2 lam))

;lens slab geometry
(define-param dlenslab (* 1.0 lam))

;define the computational cell
(define-param dpml lam) ; thickness of PML layers/shold be larger than 
wavelength
(define-param pad lam)
(define-param sx (* 2 (+ lam pad)))
(define-param sy (* 2 (+ lam pad)))
(define-param sx0 (+ sx (* 2 dpml)))
(define-param sy0 (+ sy (* 2 dpml)))
(set! geometry-lattice (make lattice (size sx0 sy0 no-size)))   ;2D 
computational cell

;line source parameters
(define-param llen (* 1.0 lenlen))                ;distance between point 
sources
(define-param lx 0)
(define-param ly (- (- (* 0.5 sy) pad)))
(define e0 1e+5)

(define epsquartz (make dielectric (epsilon 2.174)))

(set! eps-averaging? true)
(set! output-single-precision? true)
(set! force-complex-fields? true)
(set! Courant 0.6)

(set! geometry
  (if structure?
    (list
       ;cell
       (make block (center 0 0 0) (size sx sy infinity) (material air))

       ;lens
       (make ellipsoid (center 0 0 0) (size lenlen lenwidth infinity) (e1 1 0 
0) (e2 0 1 0) (e3 0 0 1) (material epsquartz))

       ;lens mask 
       (make block (center 0 (* 0.25 sy) 0) (size sx (* 0.5 sy) infinity) 
(material air))

       ;lens slab
       (make block (center 0 (* 0.25 dlenslab) 0) (size lenlen (* 0.5 dlenslab) 
infinity) (material epsquartz))

    )

    (list
      (make block (center 0 0 0) (size infinity infinity infinity) (material 
air))  
    )
  )
)

;define PML layers in all directions
(set! pml-layers (list (make pml (thickness dpml) )))  


;set symmetry associated with the source
(set! symmetries 
      (list 
              (make mirror-sym (direction X) (phase -1))                    
;odd along x-axis
      )
)

(set! sources
  (list
    (make source (src (make continuous-src (wavelength lam))) 
                 (component Ex)
                 (amplitude e0)
                 (center lx ly 0)
                 (size llen 0 0)      
     )
  ) 
)

;define the resolution
(set! resolution resl)


(define (esq) 
  (output-real-field-function "esq" (list Ex Ey Ez) 
    (lambda (r ex ey ez) (expt (/ (sqrt (+ (* ex (conj ex)) (* ey (conj ey)) (* 
ez (conj ez)) )) e0) 2) )
  ) 
)


(run-until 200
  (at-beginning
    (in-volume (volume (center 0 0 0) (size sx sy 0)) output-epsilon)
  )

  ;fiels distribution 
  (at-end
    (to-appended "esq-line-vertical" 
      (in-volume (volume (center 0 (* 0.25 sy) 0) (size 0 (* 0.5 sy) 0) ) esq)
    )
)  


Best regard,
P. Tapsanit
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to