Dear Meep Users, I have been trying to do a negative refractive index simulation . So, what I’d like to do is to get an output similar to this paper here (http://aip.scitation.org/doi/abs/10.1063/1.3562033) in Figure 4.
I looked into the archives and found this thread (https://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg00699.html), where it explained on how to create an oblique plane wave at a certain angle. Trouble is, I have difficulty understanding the functions and how to set it. This is my input file: ———————————————————————————— ; Code for Hyperbolic Metamaterial with Negative Refractive Index ; Based on meep-discussion archive ; Create by S.G. Johnson, modified by A. Gogo and Markus Testorf (2007) ; Create TM planewave in vacuum, propagating at an angle between 0-90 ; Put output in a new directory (use-output-directory) (define-param source-component Ez) (define-param theta_deg 45) (define-param fcen 0.2) (define-param df 0.02) (define-param wlength (/ 1 fcen)) (define-param sx 16) (define-param dpml 1) (set! k-point (vector3 0 0 0)) (set! ensure-periodicity true) (define sy (* sx 2)) (set! geometry-lattice (make lattice (size sx sy no-size))) (set! pml-layers (list (make pml (thickness dpml) ))) (set-param! resolution 10) ; defining function for exp(ik dot x+x0) ; x0 is needed because we want a fixed origin while creating amplitude (define ((pw-amp k x0) x) (exp (* 0+1i (vector3-dot k (vector3+ x x0))))) (define theta_rad (/ (* pi theta_deg) 180)) ; direction of k (length is irrelevant (x,y,z=0) (define-param kdir (vector3 (sin theta_rad) (cos theta_rad))) ; k with correct length (define k (vector3-scale (* 2 pi fcen) (unit-vector3 kdir))) (set! geometry (list (make block (center 0 0 0) (size infinity sy infinity) (material air)) (make block (center 0 (/ sy -4) 0) (size infinity (/ sy 2) infinity) (material (make dielectric (epsilon-diag -9 9 9)))) )) (set! sources (list (make source (src (make continuous-src (frequency fcen) (fwidth df))) (component source-component) (center 0 (* sx 0.5)) (size sx 0) (amp-func (pw-amp k (vector3 0 (* 0.5 sx)))) ) ) ) (run-until 40 (at-beginning output-epsilon) (at-every 1 output-efield-z) ) ———————————————————————————— I’m not sure how to modify the code, so that it will look like something this simulation https://youtu.be/Ocne0qgCIC4. So far I’ve managed to move the source above the material, but I’m not sure how to make it just a ray of plane waves going into the material (so that I can see the reflected ray). Any help is appreciated, thank you. Best, Cenna
_______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss