Steven G. Johnson <stevenj.mit@...> writes:

> 
> What you are seeing is not what you think.  With the code modified as  
> you have done, Meep evaluates the dielectric function on the Yee  
> lattice without any averaging, just as you want, and the dielectric  
> constants will only be 1 and 9.
> 
> However, when Meep outputs an HDF5 file, it linearly interpolates from  
> the Yee lattice onto a single grid centered at the middle of each  
> pixel.  This interpolation is what is creating the intermediate  
> epsilon values you are seeing.  So, the only averaging is in the  
> output, not internally.
> 
> Meep doesn't contain any facility for outputting the internal Yee grid  
> directly; in general, to do that it would have to output three  
> epsilon .h5 files (or a single .h5 file with three datasets), since  
> the Yee grid is really multiple interleaved grids.
> 
> Steven



Dear Steven and Meep users
 
When I run meep, the epsilon output confused me. So I made a simple test
about it. My ctl is as follows:
 
(set! geometry-lattice (make lattice (size 16 16 no-size)))
 
(set! geometry (list
                (make block (center 0 0) (size 16 16 infinity)
                      (material (make dielectric (epsilon 12))))))
(set! sources (list
               (make source
                 (src (make continuous-src (frequency 0.15)))
                 (component Ez)
                 (center 0 0))))
(set! resolution 10)
 
(run-until 200
           (at-beginning output-epsilon)
           (to-appended "ez" (at-every 0.6 output-efield-z)))

The result shows that epsilon at the most outer girds are 9.36 instead of 12
while epsilon at four corners are 7.4701.
Here are my questions.
(1) Is the result just the averaging in the output, not internally? If it is
just the averaging, how to explain it since the block size is as the same as
lattice size? 
(2) As mentioned above, one should output three epsilon .h5 files to get
internal Yee grid. What are the three epsilon .h5 files? How should I do it
specifically?
 
Thanks a lot.
 
Best Regards,
 
William



_______________________________________________
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