Whoops, better revise that source declaration as:

(set! sources
        (list
                (make source
                        (src
                                (make gaussian-src
                                        (width df)
                                        (frequency fcen)))
                        (component Ex)
                        (amplitude 2)
                        (center 0 0 (- (/ sz 2) dmpl))
                        (size sx sy 0))))

We don't want the source sitting completely inside the PML!

Regards,
Alex
____________________________________________________________________

Alexander S. McLeod
B.A. Physics and Astrophysics - University of California at Berkeley
Simulation Engineer - Theory Group, Molecular Foundry (LBNL)
Site Lead - Network for Computational Nanotechnology at Berkeley / MIT
[email protected]    707-853-0716
____________________________________________________________________

On Dec 2, 2009, at 3:54 PM, [email protected] wrote:

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. Re: plane wave sources in meep (Alex McLeod)

From: Alex McLeod <[email protected]>
Date: December 2, 2009 3:54:43 PM PST
To: [email protected]
Subject: Re: [Meep-discuss] plane wave sources in meep


Hi Philip,

In my experience, the best way to get an ideal plane wave source in MEEP for simulations like scattering off a nanoparticle is the following: Place PML layers around the entire computational cell, and place a plane source along one of the inner PML boundaries. Make sure the size of the source is the same as that of the ENTIRE simulation cell (including the PML thicknesses) along its planar dimensions. For example:

(set! (geometry-lattice (make lattice (size sx sy sz)))
(set! pml-layers (list (make pml (thickness dpml))))
(set! sources
        (list
                (make source
                        (src
                                (make gaussian-src
                                        (width df)
                                        (frequency fcen)))
                        (component Ex)
                        (amplitude 2)
                        (center 0 0 (/ sz 2))
                        (size sx sy 0))))

When I've instead used "(size (- sx (* 2 dpml)) (- sy (* 2 dpml)) 0)" for the source, the results have less than ideal due to discrete dipole effects at the source edges propagating into the simulation cell. This even seems to be an issue when periodic boundaries are used. That said, my prescription is not perfect - there is a gradual decrease in source intensity as the wavefront moves down the simulation cell due to PML absorption at the boundaries, but the effect is typically small, especially when sx ~ sz and sy ~ sz. Give that setup a whirl and let me know if you notice problems with it.

Cheers,
Alex

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to