Dear meep users and Prof. Steven Johnson,
I want to incident a planar source at an angle theta from normal incidence
to a 3D opal phc. The K-vector is in zx-plane at an angle theta to
Z-direction and no component of K-vector along Y-axis.
I have doubt regarding the direction of electric polarization vector. It
can have two fundamental directions, one perpendicular to zx-plane (s) and
the other in the zx-plane (p) but both being perpendicular to K-vector.
The ctl file i have used for s-polarization works OK. But how to set the
source for p-polarized wave.

The ctl file that i wrote for the p-polarized wave is given below. I have
used two sources with Ex and Ez components with proper amplitudes so that
it will give the correct resultant p-polarized wave. Is that correct?? How
to specify the field component (Ex) or (Ez) in the stop-when-fields-decayed
... command?

(set-param! k-point (vector3 0))
(set! pml-layers (list (make pml (direction Z) (thickness pml))))

(define-param fcen 0.55)
(define-param df 0.2)
(define-param nfreq 601)compute flux
(define theta (* 1 (/ pi 12)))
(define kx (* fcen (sin theta)))
(set-param! k-point (vector3 kx 0 0))
(define (my-amp-func p) (exp (* 0+2i pi kx (vector3-x p))))

(set! resolution 20)

(set! sources
         (list
            (make source
               (src (make gaussian-src (frequency fcen)
               (fwidth df)))
               (component Ex)
               (center 0 0 (+ pmlt (* -0.5 sz)))
               (size sx sy 0)
               (amplitude ( * 1 (cos theta)))
               (amp-func my-amp-func))
            (make source
               (src (make gaussian-src (frequency fcen)
               (fwidth df)))
               (component Ez)
               (center 0 0 (+ pmlt (* -0.5 sz)))
               (size sx sy 0)
               (amplitude ( * -1 (sin theta)))
               (amp-func my-amp-func))
)
)

(define trans ; transmitted flux
      (add-flux fcen df nfreq (make flux-region (center 0 0 (- (/ sz 2) 0.5
pmlt)) (size sx sy 0))))

(define refl ; reflected flux
      (add-flux fcen df nfreq (make flux-region (center 0 0 (+ 0.5 pmlt (*
-0.5 sz))) (size sx sy 0))))

(use-output-directory)
(run-sources+ (stop-when-fields-decayed 50 Ex (vector3 0 0 (- (/ sz 2) 0.5
pmlt)) 1e-3)
       (at-beginning output-epsilon)
       (at-every 1 (output-png Ex "-0 -y 0 -Zc bluered")))
(display-fluxes trans refl)


Regards
Pankaj Kumar Sahoo
IIT Delhi
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to