On 09/10/2011 03:50 AM, Dave Meidlinger wrote:
I am trying to create a moving source for my simulation. Where cam I find an example ctl file for the Cerenkov radiation simulation?
Here is an example of a Scheme control file that implements a moving source to generate Cerenkov radiation in vacuum. This source code was used to produce figure 5 of the Meep paper. The trick to producing a moving point charge is to use an instantaneous continuous wave source with large wavelength (DC current) whose center position is time dependent. The color scale of the HDF5 field output is intentionally saturated to better demonstrate the effect.
(define-param sx 60) (define-param sy 60) (set! geometry-lattice (make lattice (size sx sy no-size))) (define-param dpml 1.0) (set! pml-layers (list (make pml (thickness dpml)))) (define-param eps 2.25) (set! default-material (make dielectric (epsilon eps))) (set-param! resolution 10) (define-param v 0.7) ; point charge velocity (set! symmetries (list (make mirror-sym (direction Y)))) (define-param endt (/ sx v)) (run-until endt (at-beginning output-epsilon) (lambda () (change-sources! (list (make source (src (make continuous-src (frequency 1e-10))) (component Ex) (center (+ (* -0.5 sx) dpml (* v (meep-time)))))))) (at-every 2 (output-png Hz "-vZc dkbluered -M 1"))) _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss