Hi, 
         your error is:
            you define (myoutput) and u want to run-until 200 my-output, so u 
have to conserve the same definition, define myoutput, run-until 200 myoutput, 
or define (my-output) and run-until 200 my-output)

           Best regards

--- On Wed, 4/28/10, Marko <mr.ma...@gmail.com> wrote:


From: Marko <mr.ma...@gmail.com>
Subject: Re: [Meep-discuss] Fw: Re: How to get the transmitted power for a 
fixed frequency (Continuous wave source)
To: "Sanchit Khatavkar" <ksanc...@yahoo.com>
Cc: meep-discuss@ab-initio.mit.edu
Date: Wednesday, April 28, 2010, 4:16 AM


Hi Sanchit,

This works fine for me:
"
(define (my-func)
  (print (meep-time) "\t" (get-field-point Ez (vector3 1.0 0 0)) "\n")
)
(run-until 200 my-func)
"





On Wed, Apr 28, 2010 at 1:08 PM, Sanchit Khatavkar <ksanc...@yahoo.com> wrote:





Hello again,

Do I need to write a step function of my own to get the values?

I tried the following:

(define (myoutput)
         (print "myoutput:, " (meep-time) ", "
         (get-field-point Ez (vector3 0 0)) "\n"))

(run-until 200 my-output)

Simulation did not run due to the following error
ERROR: Unbound variable: my-output

Regards,
Sanchit



--- On Tue, 4/27/10, Sanchit Khatavkar <ksanc...@yahoo.com> wrote:



From: Sanchit Khatavkar <ksanc...@yahoo.com>
Subject: Re: [Meep-discuss] How to get the transmitted power for a fixed 
frequency (Continuous wave source)
To: "Mischa Megens" <mischameg...@hotmail.com>
Date: Tuesday, April 27, 2010, 9:58 PM






Hello Mischa,

Thanks for your reply.

I tried to remove the add-flux, did not define any flux region. I got the 
snapshots of the fields at the end of the time-stepping. The only hitch is that 
I am not able to get the exact values of the transmitted power and the incident 
power.

It will be really helpful if you can tell me how I get those values.

Regards,
Sanchit

--- On Tue, 4/27/10, Mischa Megens <mischameg...@hotmail.com> wrote:


From: Mischa Megens <mischameg...@hotmail.com>

Subject: Re: [Meep-discuss] How to get the transmitted power for a fixed 
frequency (Continuous wave source)
To: "Sanchit Khatavkar" <ksanc...@yahoo.com>
Date: Tuesday, April 27, 2010, 9:58 AM


Hi Sanchit,

The add-flux is intended for use with pulsed sources only.  It will accumulate 
a fourier transform to detect the energy at various frequencies you specify.
If you have a continuous source and you run it long enough for the transients 
to disappear, then you already know the frequency, and there is no need for 
Fourier transforming or (add-flux ...).  You can just take a snapshot of the 
fields (you could run meep with complex fields if you want complex fields; or 
you could take two snapshots 90 degrees in phase apart).
Indeed add-flux will give you the wrong answer with a continuous source (it is 
not intended for running when sources are still on)

Good luck,
m.



Sanchit Khatavkar wrote: 






Dear Alexandr, 
Thanks for your reply. You are right. The CW source has only one frequency in 
the flux spectrum. I am attaching my ctl file for your reference.
"add-flux" needs 3 parameters, namely "fcen" "df" "nfreq" alongwith the 
flux-regions... (Quoting from Meep Reference) 
Since a continuous source sends out light of a single frequency, what do we 
specify for "df" and "nfreq". As a trial, I gave the fixed frequency as "fcen", 
0 as "df" and 1 as "nfreq". I am not sure whether if this is the right 
approach. Kindly advise. 

Regards,
 Sanchit

_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss



_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss



-- 
Lp, Marko

-----Inline Attachment Follows-----


_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


      
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to