could you send me you ctl file of 2D system,because i have similar problem is 
2D,thanks

在2013-07-10 13:35:36,<nw...@mail.sim.ac.cn>写道:
> Dear meep users,
> I am trying to use periodic boundary conditions in 3D.
> In 2D it works perfectly, however when I extend the code to 3D the results 
> are incorrect. I have attached the code to this massage. The simulation is 
> very simple just a plane of source on a glass block, to measure the 
> reflection from the glass. 
> Anyone knows what exactly is wrong with this code?
> 
> ####################################################################### 
> (define-param a 0.1);
> 
> (define-param sy 80) ; size of cell in y direction 
> (define-param dpml 25) ; PML thickness (y direction only!)
> (set! pml-layers (list (make pml (direction Y) (thickness dpml))))
> (set! geometry-lattice (make lattice (size 10 sy 10)))
> 
> (set-param! resolution 20)
> 
> (define-param reference? false)
> 
> (if reference?
> 
>     (begin
> (set! geometry (list
>                 (make block (center 0 0) (size infinity sy infinity)
>                       (material air))
> ))
>     )
> 
>    (begin
> 
> (set! geometry
>       (append ; combine lists of objects:                                     
>   
>        (list 
> 
>           (make block (center 0 -20) (size infinity 40 infinity)
>                     (material (make dielectric (epsilon 2.25))) )
> 
>              
> )
>        
>      
>   
>       
>       ))
>        ));
> 
> 
> ; Define frequency range:
> ; -----------------------
> 
> (define-param fcen 0.18665) ; pulse center frequency
> (define-param df 0.2933) ; pulse width
> 
> ; Define source:
> ; --------------
> (set! sources (list
>                (make source
>                  (src (make gaussian-src (frequency fcen) (fwidth df)))
>                  (component Hz) (center 0 5 0) (size 10 0 10))))
> 
> (set! symmetries (list 
>                        (make mirror-sym (direction X) (phase  -1))
>                        
> 
> 
>  ))
> 
> 
> ; Fluxes:
> ; -------
> (define-param nfreq 500) ; number of frequencies at which to compute flux
> 
> (define trans_X ; transmitted flux
>       (add-flux fcen df nfreq
>                 (make flux-region
>                   (center 0 -5 0) (size 10 0 10) (direction X))
> ))
> 
> (define trans_Y ; transmitted flux
>       (add-flux fcen df nfreq
>                 (make flux-region
>                   (center 0 -5 0) (size 10 0 10) (direction Y))
> ))
> 
> (define refl_X ; reflected flux
>       (add-flux fcen df nfreq
>                  (make flux-region
>                    (center 0 1 0) (size 10 0 10) (direction X))
> ))
> 
> (define refl_Y ; reflected flux
>       (add-flux fcen df nfreq
>                  (make flux-region
>                    (center 0 1 0) (size 10 0 10) (direction Y))
> ))
> 
> 
> ; Run simulation:
> ; ---------------
> (set-param! k-point (vector3 0 0 0))
> (run-sources+ 500
>              (at-beginning output-epsilon)
> )
> 
> 
> (display-fluxes trans_X trans_Y refl_X refl_Y)
> 
> 
> 
> _______________________________________________
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss






_______________________________________________
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