On Mon, 28 Jan 2008, Federica Fiorese wrote:
> To see time development I made a for cycle as follow:
>
> (do ((i 0 (+ i 1)))
>        ((= i 100) (display "end"))
>
>        (run-until 1)


An explicit loop of "run" calls will work, but the Meep style is to pass a 
step function to "run" that does whatever you want.   e.g.

        (define (my-stuff)
           ... display, calculate whatever you want to do ...)

        (run-until 100 (at-every 1 my-stuff))

will run for 100 time units and call my-stuff every time unit.

Also, I would use "print" instead of "display".  print is a libctl 
function that will take multiple arguments, e.g. you can do
        (print "hello world at time " (meep-time) "\n")
and "print" will also do the right thing on multiprocessor systems (only 
printing from one processor).

> If I right understand, if my lenght scale is, for
> example, a = 1mm, the computational cell dimension
> would have size (Xmm,Ymm, Zmm) , the antenna
> dimensions expressed in mm, and the time unit should
> be a/c = ms.
> So in my For cycle run for 100 means run for 100unit
> of time, so 100ms.

If your length scale is 1mm, then the time unit is a/c = 3.33 ps.

I'm not sure where you got ms from; arithmetic error?

> Well, but if I have a width pulse of about 50ps...can

In that case the pulse width is 15 in Meep units (well, depending on how 
exactly you define "width" and how it relates to Meep's definition of a 
Gaussian pulse).

Steven

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

Reply via email to