-
Hi, I would like to repeat the following example as given in the discussion and the tutorial. Here is my ctl file, (define-param r 0.025) ;; radius of sphere (define wvl-min (* 2 pi r 2)) (define frq-min (/ wvl-max)) ;; at least 8 pixels per smallest wavelength, i.e. (floor (/ 8 wvl-min)) (define dpml (* 0.25 wvl-min)) (define boundary-layers (list (make pml (thickness dpml)))) ;;(define symm (list (make mirror-sym (direction Y)) (define s (* 2 (+ dpml dair r))) ;; (is-integrated? true) necessary for any planewave source extending into PML (set! k-point (vector3 0 0 0)) (define dpad (* 0.5 dair)) (define box-x1 (add-flux frq-cen dfrq nfrq (run-sources+ 100) (display-fluxes box-x1) (save-flux "box-x1-flux" box-x1) (reset-meep) (set! geometry (list (set! geometry-lattice cell) (set! pml-layers boundary-layers) ;;(set! symmetries symm) (set! sources (list pw-src)) (set! k-point (vector3 0)) (define box-x1 (add-flux frq-cen dfrq nfrq (load-minus-flux "box-x1-flux" box-x1) (run-sources+ 1000) (display-fluxes box-x1 box-x2 box-y1 box-y2 box-z1 box-z2) The result is reasonable with a peak at 0.3 which is 530nm. However, if I change the propagation direction to the Z direction, that is I have incorrect flux1, which is the empty geometry without the Au nanosphere, and these are the few lines of my flux1, Correct reading with component Ez: Incorrect reading with component Ey: But, my flux2 seems correct in both cases? So It seems changing the direction will have impact on the empty case reading only? What did I miss in my code? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Just realized that this line has to be adjusted to save the Z direction flux. (display-fluxes box-z1) Problem solved and thanks for your attention! |
Beta Was this translation helpful? Give feedback.
Just realized that this line has to be adjusted to save the Z direction flux.
(display-fluxes box-z1)
Problem solved and thanks for your attention!