python-meep team mailing list archive
-
python-meep team
-
Mailing list archive
-
Message #00034
Re: How to define a complex epsilon using the material stack
Hi Givonda!
Please note that Meep does not support complex frequency-independent
epsilon, as written here :
http://ab-initio.mit.edu/wiki/index.php/Meep_Reference
I quote :
"Complex ε and μ: you cannot specify a frequency-independent complex ε
or μ in Meep (where the imaginary part is a frequency-independent loss),
but there is an alternative. That is because there are only two
important physical situations. First, if you only care about the loss in
a narrow bandwidth around some frequency, you can set the loss at that
frequency via the conductivity (see Conductivity in Meep). Second, if
you care about a broad bandwidth, then all physical materials have a
frequency-dependent imaginary (and real) ε (and/or μ), and you need to
specify that frequency dependence by fitting to Lorentzian resonances
via the polarizability below."
So Python-Meep doesn't support it either, simply because the Meep core
doesn't.
Using the conductivity work-around should be possible with Python-Meep
but the polygon approach has not yet been implemented for callback of
conductivity. This should be rather straightforward to do, but would
still require some work. If you're interested, I can give you
information on how to do it: we could set up a Skype chat for example.
It would be a valuable addition to Python-Meep.
with kind regards,
Emmanuel
-----------------------------------------------------
Hi,
I've been trying to write some code to simulate metalic nano structures
with python-meep. However, I could find no clue how use a complex
permittivity in the material stack. If I use a complex array as a
parameter for add_material_stacks_from_numpy_matrix() I get the
following error.
Traceback (most recent call last):
File "<pyshell#33>", line 1, in <module>
mat=epsilon()
File "<pyshell#32>", line 16, in __init__
self.add_material_stacks_from_numpy_matrix(ms, 2)
File "/usr/local/lib/python2.6/dist-packages/meep.py", line 4337, in
add_material_stacks_from_numpy_matrix
return
_meep.PolygonCallback3D_add_material_stacks_from_numpy_matrix(self,
*args)
TypeError: array cannot be safely cast to required type
I have tried using the NUMPY matrix metod too with the same result. I
am
not sure how to proceed from here or where to look.
Best regards,
Govinda
References