*Hi *Viktoriia Babicheva

i did your hint in my program but i found an error that i dont know why it
happend

a part of my program lines is as follow and the error is :

*meep: Cannot split -551078392 grid points into 1 parts*


It will be great if you or someone else can help me .
Sincerely yours.

Mehdi Kamali

; base unit is micro-meter
(define-param r 45)
(define-param dpml 1.0)
(define-param nx 100)
(define-param ny 7)
(define-param nxi (- nx 1))
(define-param nyi (- ny 1))
(define-param Period (* 150 (sqrt 2)))
(define-param periodx Period)
(define-param periody Period)
(define-param Ax (* (- nx 1) periodx))
(define-param Ay (* (- ny 1) periody))
(define-param startxo (* -0.5 Ax))
(define-param startyo (* -0.5 Ay))
(define-param startxi (+ startxo (/ Period 2)))
(define-param startyi (+ startyo (/ Period 2)))
(define-param pad 6.0)
(define-param lx (+ Ax (* 4 r)))
(define-param ly (+ Ay (* 4 r)))
(define-param sx (+ lx (* 2 dpml) (* 2 pad)))
(define-param sy (+ ly (* 2 dpml)))
(define-param xsource (+ (* -0.5 sx) dpml 1))
(define-param xmonitor (+ (* -0.5 sx) dpml 0.5))
(define-param rn 2.2321)
(define-param second_susept 25.2e-6)
(define-param lam 1.064)
(define-param fcen (/ 1 lam))
(define-param df (/ fcen 20) )
(define-param amp 1)
(set! geometry-lattice (make lattice (center 0) (size sx sy no-size)))

;*********************************
(define nonlinear-mat (make dielectric
                (index rn)
                (chi2 second_susept)))
;*********************************
(set! geometry (list
            (make block
                     (center 0)
                     (size lx ly infinity)
                  (material air))))
;*********outsid latice
(map (lambda (xc)
        (map (lambda (yc)
            (set! geometry (append geometry (list
                            (make cylinder
                                (center (+ startxo (* xc Period)) (+ startyo
(* yc Period)))
                                (radius r)
                                (height infinity)
                                (material nonlinear-mat))))))
            (arith-sequence 0 1 ny)))
(arith-sequence 0 1 nx))

;********** insid lattice
(map (lambda (xc)
        (map (lambda (yc)
            (set! geometry (append geometry (list
                            (make cylinder
                                (center (+ startxi (* xc Period)) (+ startyi
(* yc Period)))
                                (radius r)
                                (height infinity)
                                (material nonlinear-mat))))))
            (arith-sequence 0 1 nyi)))
(arith-sequence 0 1 nxi))

;*********************************
(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution 20)
;*********************************
(set! sources (list
               (make source
         (src (make continuous-src (frequency fcen) (fwidth df)))
                 (component Ez)
                 (center xsource 0)
         (size 0 periody)
         (amplitude amp))))
;*********************************


Message: 1
Date: Sun, 17 Jan 2010 19:43:04 +0000 (UTC)
From: Viktoriia Babicheva <[email protected]>
Subject: Re: [Meep-discuss] Meep Units
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

mehdi kamali <m.kamali4...@...> writes:

>
> Hi Dear Steven and Meep usersI am trying to simulate the example that
there is
on the book of " Optical properties of photonic crystals, Sakoda" about
second
harmonic generation through the 2D square lattice nonlinear photonic
crystal.
lattice constant is a=0.15 mm ,r/a=0.3 and the fundamental wavelenght is
1.064
micron.the problem i have is that i am a bit confiused about dimensionless
units
and i dont know how to convert these in meep.It will be great if someone
help me
.Sincerely yours.Mehdi Kamali
>
> ______________________________
_________________
> meep-discuss mailing list
> meep-disc...@...
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Dear Mehdi Kamali,
You should to choose unit, seems in your case 1 micron.
Then you write
(define-param a 150)
(define-param r 45)
(define-param lam 1.064)
? (src (make continuous-src (wavelength lam) ) )
Note that in case
(define-param ttime 1064)
and then (run-until ttime)
simulation time is equals to 1000 periods.


Sincerely yours
Viktoriia Babicheva
student of Moscow Institute of Physics and Technology, Russia
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to