-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
matt wrote:
> > I think what you want is possible with the ctl interface.
You are absolutely right.
The key, for posterity's sake, is to first generate a polarizability with the
desired omega, gamma, and delta-epsilon, and an arbitrary sigma. Once this
polarizability has been assigned to any object, even an invisible one, you are
then free to generate an "infinite" number of polarizabilities with different
sigmas but matching omega, gamma, and delta-epsilon. Thus, you may generate a
different polarizability for each sample point.
For those who work at a single fixed frequency, it is sometimes easiest to
describe materials by their epsilon and sigma (relative permittivity and
conductivity) as functions of position. I attach a .ctl file that facilitates
this approach.
- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHEr9qUJT6e6HFtqQRAtMtAJ96zNTi4r8SGkXe9S1PqbDFfyuZGgCfX+LY
0aQXpF+Gspzf3mowyd9ykhM=
=dA/9
-----END PGP SIGNATURE-----
(set! eps-averaging? false)
(define my_freq 1)
(set! geometry (list))
(define (initialize-polarizability p)
(set! geometry (cons
(make block (center infinity)
(size 0 0 0)
(material (make dielectric (epsilon 1)
(polarizations p)))
)
geometry
))
)
(define (make-polarizability-from-conductivity sigma_in omega_in)
(make polarizability
(omega omega_in)
(gamma omega_in)
(delta-epsilon (/ 1 omega_in))
(sigma sigma_in)
)
)
(define (make-mat-from-eps-and-sigma eps_func sigma_func omega_in)
(initialize-polarizability
(make-polarizability-from-conductivity 1.0 omega_in)
)
(make material-function (material-func (lambda (v)
(make dielectric
(epsilon (eps_func v))
(polarizations (make-polarizability-from-conductivity
(sigma_func v) omega_in))
)
)))
)
(define my-mat (make-mat-from-eps-and-sigma
(lambda (v) 1)
(lambda (v) (* 5 (+ 1 (sin (* 40 (vector3-y v))))))
my_freq
))
(set! geometry-lattice (make lattice (size 2 2 no-size)))
(set! geometry (cons
(make block (center 0 0) (size 1 1 infinity) (material my-mat))
geometry
))
(set! sources (list
(make source
(src (make continuous-src (frequency my_freq) (start-time 0)
(end-time infinity) (width (/ 10 my_freq))))
(component Ez)
(center -0.6 -0.2))))
(set! pml-layers (list (make pml (thickness 0.25))))
(set! resolution 256)
(define my_endtime 20)
(run-until my_endtime
(at-beginning output-epsilon)
(at-time (- my_endtime (/ 1 my_freq)) output-hfield)
(at-time (- my_endtime (/ 0.75 my_freq)) output-hfield)
(at-time (- my_endtime (/ 0.5 my_freq)) output-hfield)
(at-time (- my_endtime (/ 0.25 my_freq)) output-hfield)
(at-time my_endtime output-hfield))
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss