As Filip and Mehdi said, the pml-layers is a single list variable, when you
set the PML with the following lines.
(set! pml-layers (list (make pml (direction X) (thickness pmlthick))))
> (set! pml-layers (list (make pml (direction Y) (thickness pmlthick))))
> (set! pml-layers (list (make pml (direction Z) (thickness pmlthick))))
They are equal to the following single line:
>
> (set! pml-layers (list (make pml (direction Z) (thickness pmlthick))))
Therefore, use the way Mehdi suggested:
(set! plm-layers (list
> (make pml (direction X) (thickness pmlthick))
>
(make pml (direction X) (thickness
pmlthick))
> (make pml (direction Z) (thickness pmlthick))
> )
> )
Regards,
Simon
On Tue, Sep 4, 2012 at 7:22 PM, huang bo <[email protected]> wrote:
hi! everybody
> when using meep, I fount a problem
>
> when setting the PML absorbing boundary whth the below lines
>
> (set! pml-layers (list (make pml (direction X) (thickness pmlthick))))
> (set! pml-layers (list (make pml (direction Y) (thickness pmlthick))))
> (set! pml-layers (list (make pml (direction Z) (thickness pmlthick))))
>
> the simulation result is different with the below lines
> (set! pml-layers (list (make pml (thickness pmlthick))))
>
> According the reference of MEEP, Default is putting PML layers on the
> boundaries in all directions.
>
> can anyone can explain this
>
> for example, I simulate the transmission using the below ctl file,
> anyone can check the problem easy, when using different pml the transmission
> is different.
>
>
> (define-param sx 3) ; size of cell in X direction
>
>
>
>
> (define-param sy 3) ; size of cell in Y direction
>
> (define-param sz 6)
> (set! geometry-lattice (make lattice (size sx sy sz)))
> (define-param w 1)
> (define-param pmlthick 1.0)
> (define-param fcen 0.15) ; pulse center frequency
> (define-param df 0.1) ; pulse width (in frequency)
>
>
>
>
>
> (set! sources (list
> (make source
> (src (make gaussian-src (frequency fcen) (fwidth df)))
> (component Ez)
> (center 0 0 (+ 1 (* -0.5 sz)) )
> (size w w 0))))
>
>
>
>
>
> ; set pml with differnt lines
>
> (set! pml-layers (list (make pml (direction X) (thickness pmlthick))))
> (set! pml-layers (list (make pml (direction Y) (thickness pmlthick))))
> (set! pml-layers (list (make pml (direction Z) (thickness pmlthick))))
>
>
>
>
>
> ;(set! pml-layers (list (make pml (thickness pmlthick))))
> (set-param! resolution 10)
>
> (define-param nfreq 100) ;
> (define trans ; transmitted flux
> (add-flux fcen df nfreq
> (make flux-region
>
>
>
>
>
> (center 0 0 (- (/ sz 2) 1.5) ) (size w w 0))))
>
> (run-sources+
> (stop-when-fields-decayed 50 Ez
> (vector3 0 0 (- (/ sz 2) 1.5) )
> 1e-3)
>
>
>
>
>
> (at-beginning output-epsilon))
>
> (display-fluxes trans)
>
> Thank !!
>
>
> _______________________________________________
> 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