Hi all,

I have encountered some problems with my meep program.
I want to simulate the electric field distribution in the holey core of a
photonic crystal fiber. I put the source in the center of the core. When I
run my program, I got the following error information:
ERROR: In procedure cdr:
ERROR: Wrong type argument in position 1: #<unspecified>

My program codes are as follows:

; Some parameters to describe the geometry:
(define-param eps 2.1025) ; the dielectric constant of the background
(define-param d 2.55) ; core radius
(define-param r 0.78) ; radius of cladding holes
(define-param df 3.42) ; distance between core center and center of the
first level cladding holes
(define-param p 1.77) ; pitch-distance between cladding holes
(define-param fststep 30) ; The angle interval between the first level
cladding holes around the core
(define-param secstep 20) ; The angle interval between the second level
cladding holes around the core

; The cell dimensions
(define-param sx 40) ; size of cell in x direction
(define-param sy 40) ; size of cell in y direction
(define-param sz 40) ; size of cell in z direction
(define-param dpml 1) ; PML thickness
(set! geometry-lattice (make lattice (size sx sy no-size)))

(set! geometry
      (append ; combine lists of objects:
       (list (make block (center 0 0) (size infinity infinity infinity) ;
background
                   (material (make dielectric (epsilon eps)))))
                   (list (make cylinder (center 0 0) (radius d) (height 
infinity) ; core
hole
              (material air)))
                                (list (do ((x 0 (+ x fststep))) ((> x (- 360 
fststep)));cladding holes
          (make cylinder (center (* df (cos (/ (* x pi) 180))) (* df (sin
(/ (* x pi) 180)))) (radius r) (height infinity)
                 (material air))
                                ))
))

(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution 10)

(set! sources (list
               (make source
                 (src (make continuous-src (frequency (/ 1 0.633))))
                 (component Ez)
                 (center 0 0))))

(run-until 200
           (at-beginning output-epsilon)
           (at-end output-efield-z))

If I comment the 'do' loop, there isn't any error input. So I guess there
is sth wrong with the 'do' loop. But I don't know what's wrong with it?
Could you please help me to find it? Thanks a lot.

Best Regards,

Jianhua


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

Reply via email to