I've had this problem before. Instead of using the "metal" material, make a material with your own epsilon value. Start out at something like 10^-6, and make it larger or smaller until the black demon doesn't appear.

Aaron Webster

On Fri, 4 Jan 2008, Francisco Cordobés wrote:

Thanks for your answer Steven.

"Perfect metal" is implemented in Meep as a very large negative epsilon.
This will cause your h5topng plots to be saturated if you plot epsilon,
for example.

If you want to plot the dielectric function, for example, you would want
to tell h5topng to truncate the lower end of the color scale using the -m
option (man h5topng for more info).  For example:

        h5topng -m 0 epsilon.h5

will plot the dielectric function in the epsilon.h5 file, while truncating
the lower end of the color scale at zero (-m 0).


That's not my problem. h5topng always works with the epsilon h5 file. And
with whatever file I have used until now except with those where I used a
metal. When there is a metal in the simulation I get a black edge around it.
This black edge grows in size until it "eats" the hole thing.

(material metal) or (material perfect-metal) are correct; I assume you
mistyped the above code?


Yes, I apologize for the error.

As I may mistype anything in the big ctl file I have modified the waveguide
tutorial ctl file to see if I get the same problem with the metal. I have
just changed the size of the dielectric(now metal) slab to get the source
out of it and change the total time to be run(to do it faster). The ctl file
I have been running is:

###
###
; This file is the tutorial for Meep waveguide example.

(set! geometry-lattice (make lattice (size 20 10 no-size)))

(set! geometry (list
               (make block (center 0 0) (size 6 2 infinity)
                     (material metal))))

(set! sources (list
              (make source
                (src (make continuous-src (frequency 0.15)))
                (component Ez)
                (center -7 0))))

(set! pml-layers (list (make pml (thickness 1.0))))

(set! resolution 10)

(run-until 10
          (at-beginning output-epsilon)
          (to-appended "ez" (at-every 1.0 output-efield-z)))
###
###

The run and output was:

###
###
$ meep waveguide.tuto.ctl
-----------
Initializing structure...
Working in 2D dimensions.
    block, center = (0,0,0)
         size (6,2,1e+20)
         axes (1,0,0), (0,1,0), (0,0,1)
time for set_epsilon = 0.230626 s
-----------
creating output file "./waveguide.tuto-ez.h5"...
creating output file "./waveguide.tuto-eps-000000.00.h5"...
Meep progress: 6.5/10.0 = 65.0% done in 4.0s, 2.2s to go
on time step 130 (time=6.5), 0.0308232 s/step
run 0 finished at t = 10.0 (200 timesteps)

Elapsed run time = 7.67487 s
###
###

And finally I converted to png the output with:

###
###
$h5topng -v -t 0:9 -Zc dkbluered waveguide.tuto-ez.h5
###
###


The first time slices seem normal from the output of h5topng but the actual
png files have the black growing edge too.

###
###
reading from "waveguide.tuto-ez.h5", slice at 1 in t dimension.
data ranges from -0.373318 to 0.446139.
writing "waveguide.tuto-ez.t1.png" from 200x100 input data.
------
###
###


And when the hole png image gets black is when h5topng says that data ranges
goes from nan to nan.

###
###
reading from "waveguide.tuto-ez.h5", slice at 5 in t dimension.
data ranges from nan to nan.
writing "waveguide.tuto-ez.t5.png" from 200x100 input data.
------
###
###

I have given so much detail so whoever wants to test what I'm getting can do
that by just copy&paste. I'm sorry If I miss explained in the first e-mail.
Using the -m, -M options the same problem persists.

($ h5topng -v -t 0:9 -m -0.6 -M 0.4 -Zc dkbluered waveguide.tuto-ez.h5)
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to