Dear Chen, I think you have to run the program with different frequencies separately. And about writing the flux into a file, when you run the program, you could 'tee' all results displayed on the screen into a file, then 'grep'.
best wishes Yiling -----Original Message----- From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Mon 18/08/2008 17:00 To: [email protected] Subject: meep-discuss Digest, Vol 30, Issue 19 Send meep-discuss mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of meep-discuss digest..." Today's Topics: 1. how to write a loop to update the frequency and write the flux into a file? (Chen) ---------------------------------------------------------------------- Message: 1 Date: Mon, 18 Aug 2008 05:37:15 +0000 (UTC) From: Chen <[EMAIL PROTECTED]> Subject: [Meep-discuss] how to write a loop to update the frequency and write the flux into a file? To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii Dear Steven and Meep users, I wanna obtain a normalized transmission curves of a periodic geometry. Therefore, I have to do multiple simulations for each frequency. My question is how to write a loop to update the frequency and write the flux into a file. I wrote the loop according to the meep wiki, but it did not work. Would you like give me some comments? Thanks a lot. ... ... (define-param a (/ unit 7.0e-007)) (define-param b (/ unit 8.0e-007)) (define-param dx (/ unit 0.1e-007)) (define-param fcen 0) (define trans 0) (do ((fcen a (+ fcen dx))) ((> fcen b)) (set! sources (list (make source (src (make continuous-src (frequency fcen))) (component Ex) (center 0 0 (+ (/ sz -2) dpml pad)) (size sx sy 0) (amplitude amp) ))) (set! symmetries (list (make mirror-sym (direction Y) (phase 1)) )) (Set! trans (add-flux fcen 0 1 (make flux-region (center 0.1 0.2 (- (/ sz 2) dpml pad)) (size 0 0 0) (direction Z)) )) (run-until 100) (print "flux:, "amp", "(first (get-fluxes trans))"\n") ) Best, Chen ------------------------------ _______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss End of meep-discuss Digest, Vol 30, Issue 19 ********************************************
_______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

