On Oct 30, 2009, at 12:53 AM, Liu Yan wrote:
When I compile the silver dispersion material with my own epsilon- function using meep, the result shows that there is an error:

"ERROR: In procedure *:
ERROR: Wrong type: #<procedure frequency (x)>"

I specified the epsilon-function as below
"(material-function
(make epsilon-func (- 5 (/ 7.66 (- (* 2 pi frequency 2 pi frequency) (* i 0.0796 2 pi frequency)))))
  )"

What is wrong with this problem? Anyone can help me?

The syntax is

(make material-function (epsilon-func myfunc))

where myfunc is a function of position p that returns the dielectric constant at that point:

(define (myfunc p)   ....do something with p and return epsilon...)

In your code, you aren't using the right syntax in several ways (you don't use "make" properly, the argument to epsilon-func isn't a function, etcetera)....but more seriously, it looks like you somehow got the impression (where?) that epsilon-func allows you to pass an arbitrary function of *frequency*. This is totally wrong.

Nothing in Meep allows you to specify epsilon as an arbitrary function of frequency; Meep is a time-domain program, so it can only represent material dispersion by fitting it to certain forms (Lorentzians etcetera) that can be implemented as an auxiliary differential equation (or an IIR filter, for DSP people). See the section of the manual on materials in Meep.

Steven

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to