Hi Gerardo,

the output seems to be truncated, is it that what you are also seeing when
> you refer as "funny effect"?
>
Maybe, I am not sure what you mean by truncated.  What I see wrong in the
output is that transmission seems to have a decaying exponential factor, and
also goes greater than 1 at some points.  I expect to see just a sinusoidal
shape with the consistent peak/trough magnitudes.


(define-param kdir (vector3 (cos theta_rad) (sin theta_rad)))
> (define k (vector3-scale (* 2 pi fcen) kdir))
>
> (define ((pw-amp k) y) (exp (* 0+1i (vector3-dot k y))) )
>
> Why do you define k using (* 2 pi fcen) and do not use kdir directly? As
> far as I understand in meep one uses the vector directly, without scales.
> And, what about the vector3-dot with the imaginary part. What literature are
> you using?
>
> I'll try to explain these lines:

kdir is the direction of the wavevector.
k is the wavevector itself, which is the direction scaled by the
wavenumber.  In this case, I don't think we can use kdir directly.
pw-amp is function to be multiplied with the source.  It only modulates the
phase of the source to produce the desired angle, which is why is has the
vector3-dot 0+1i.

Hm, I think I am beginning to see the, or at least a problem.  This code was
originally written for single frequency sources; with a gaussian source, I
don't think the pw-amp function will work as desired.  Is there a way to
make oblique incidence gaussian sources?  One idea that comes to mind is to
make the pw-amp function vary in time as the source is produced, but I don't
know if that is even possible.

Also, as for the source, I got this code from a post I found on the
meep-discuss archives by searching "oblique".

Thanks for the reply, I think you got me on the right track,
Matt

On Fri, Jun 18, 2010 at 2:22 PM, G S <[email protected]> wrote:

> Hello Matt,
>
> the output seems to be truncated, is it that what you are also seeing when
> you refer as "funny effect"?
>
> I want to help, but I don't understand very clearly the following lines of
> your program:
>
> (define-param kdir (vector3 (cos theta_rad) (sin theta_rad)))
> (define k (vector3-scale (* 2 pi fcen) kdir))
>
> (define ((pw-amp k) y) (exp (* 0+1i (vector3-dot k y))) )
>
> Why do you define k using (* 2 pi fcen) and do not use kdir directly? As
> far as I understand in meep one uses the vector directly, without scales.
> And, what about the vector3-dot with the imaginary part. What literature are
> you using?
>
> Hope it helps,
> Gerardo.
>
>
>
> 2010/6/18 <[email protected]>
>
>> Send meep-discuss mailing list submissions to
>>        [email protected]
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>        http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>> or, via email, send a message with subject or body 'help' to
>>        [email protected]
>>
>> You can reach the person managing the list at
>>        [email protected]
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of meep-discuss digest..."
>>
>>
>> Today's Topics:
>>
>>   1. Oblique Incience (Matthew Miskiewicz)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 17 Jun 2010 12:57:26 -0400
>> From: Matthew Miskiewicz <[email protected]>
>> Subject: [Meep-discuss] Oblique Incience
>> To: [email protected]
>> Message-ID:
>>        <[email protected]>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi,
>>
>> I'm learning to use meep and am attempting some simple simulations.  I'm
>> getting a weird result when calculating the wideband transmission of a
>> plane
>> wave at oblique incidence on a thin dielectric slab.  When I use normal
>> incidence, I get a perfect result.  For oblique incidence, the
>> oscillations
>> in the transmission look correct, but something else funny is happening.
>>  Any ideas on how to fix this?  Is something set up wrong in the ctl file?
>>
>> Picture of transmission:
>>
>> http://picasaweb.google.com/lh/photo/wxSYCr_M9_PsHYS_Klllzr00Wanc329Uua6LuGynryc?feat=directlink
>>
>> Thanks!
>> Matt Miskiewicz
>>
>> Research Assistant, Optoelectronics and Lightwave Engineering Group
>> North Carolina State University
>>
>>
>>
>> Here is the ctl file:
>>
>> (define-param pmlthick 2)
>> (define-param sy .5)
>> (define-param sx 10)
>> (define-param ref true)
>>
>>
>> (set! geometry-lattice (make lattice (size (+ sx (* pmlthick 2)) sy
>> no-size)))
>> (set! geometry (list
>>               (make block (center 0 0) (size (- sx 5) sy)
>>                     (material (make dielectric (index (if ref 1 1.5)))))))
>>
>>
>> (set! resolution 30)
>>
>> (set! pml-layers (list (make pml (thickness pmlthick) (direction X))))
>>
>> (define-param theta_deg 0)         ; angle in degrees.
>> (define theta_rad (/ (* pi theta_deg) 180))
>> (define-param fcen 0.75) ; pulse center frequency
>> (define-param df 0.5) ; pulse bandwidth
>> (define-param dfe 0.5) ; data extraction bandwidth
>> (define wlength (/ 1 fcen)) ; pulse wavelength
>> (define-param kdir (vector3 (cos theta_rad) (sin theta_rad)))
>> (define k (vector3-scale (* 2 pi fcen) kdir))
>>
>> (define ((pw-amp k) y)
>>  (exp (* 0+1i (vector3-dot k y))))
>>
>> (set-param! k-point (vector3 0 (* fcen (sin theta_rad)) 0))
>>
>> (set! sources (list
>>              (make source
>>                (src (make gaussian-src (frequency fcen) (fwidth df)))
>>                (component Ez)
>>                (center (+(/ sx -2) 1) 0)
>>                (size 0 sy 0)
>>                (amp-func (pw-amp k)))))
>>
>> (define-param nfreq 200) ; number of frequencies at which to compute flux
>> (define trans ; transmitted flux
>>     (add-flux fcen dfe nfreq
>>                (make flux-region
>>                (center (- (/ sx 2) 1)  0) (size 0 sy))))
>>
>> (run-until 10000)
>>
>> (display-fluxes trans)
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://ab-initio.mit.edu/pipermail/meep-discuss/attachments/20100617/bc919741/attachment.html
>> >
>>
>> ------------------------------
>>
>> _______________________________________________
>> meep-discuss mailing list
>> [email protected]
>> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>>
>> End of meep-discuss Digest, Vol 52, Issue 15
>> ********************************************
>>
>
>
> _______________________________________________
> meep-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to