Using a linear array of point sources in 2D, the results can look pretty good:
; ====================================================================== ; ====================================================================== ; Directional source array ; ; Paul Kinsler / Imperial College London, Sept 2010 ; ; based on the directional fields construction described in ; ; Phys. Rev. A72, 063807 (2005) doi:10.1103/PhysRevA.72.063807 ; or the newer ; Phys. Rev. A81, 023808 (2010) doi:10.1103/PhysRevA.81.023808 ; ; ====================================================================== ; Computational resolutions etc ; (set-param! resolution 10) ; cells per unit size (define-param pad 2) ; padding between waveguide and edge of PML (define-param dpml 2) ; thickness of PML (define sx 30) (define sy 30) (set! geometry-lattice (make lattice (size sx sy no-size))) ; ====================================================================== ; Refractive index profile functions ; to calculate the local refractive index as it varies with position. ; ; ====================================================================== ; ; Create the structure ; (define-param gx (* sx 0.8)) (define-param ffref (/ 2 gx)) (define-param ffcontrol (/ 1 10)) ; 10um, scaled 1/wavelength (define-param ffcontro3 (* 3 ffcontrol)) ; THG freq (define-param ffillumin (/ 2 10)) ; (set! geometry (list (make block (center 0.0 0.0) (size sx sy infinity) (material (make dielectric (epsilon 1) ) ) ) ) ) ; ====================================================================== ; Set up the PML at the simulation boundaries ; (set! pml-layers (list (make pml (thickness dpml)))) ; ====================================================================== ; ; SOURCES: ; ; (define-param ffq 1) (define-param sangle 0.35) (define-param dx (* 0.250 (cos sangle))) (define-param dy (* 0.250 (sin sangle))) (define-param nsources 50); actually you get 2n+1 sources (set! sources (list)) ; a null list to start ; (print sources) (do ((ii (- 0 nsources) (+ ii 1))) ((> ii nsources)) ;(print (* ii dx)) ;(print (* ii dy)) (set! sources (append sources (list (make source (src (make continuous-src (frequency ffq))) (amplitude 1) (component Ez) (center (* ii dx) (* ii dy) 0.00) ) (make source (src (make continuous-src (frequency ffq))) (amplitude (sin sangle)) (component Hy) (center (* ii dx) (* ii dy) 0.00) ) (make source (src (make continuous-src (frequency ffq))) (amplitude (cos sangle)) (component Hx) (center (* ii dx) (* ii dy) 0.00) ) ) )) ) ; (print sources) ; ====================================================================== ; ; Run the simulation ; ; (run-until 60 (to-appended "ez" (at-every 0.25 output-efield-z)) ) ; ====================================================================== ; ====================================================================== -- ---------------------------------+--------------------------------- Dr. Paul Kinsler Blackett Laboratory (Photonics) (ph) +44-20-759-47734 (fax) 47714 Imperial College London, dr.paul.kins...@physics.org SW7 2AZ, United Kingdom. http://www.qols.ph.ic.ac.uk/~kinsle/ _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss