Showing posts with label scheme. Show all posts
Showing posts with label scheme. Show all posts

Thursday, March 15, 2012

Task 5: Sim for Parallel Plates

Now I'm just going to see if I can capture near-field enhancement between two plates. I'm going to set up simulations where I vary the distance between the two plates and get the flux between them. I'm just looking for trends here; I don't know how to work out the units yet.
Results:
I implemented SiC plates. One plate has the noisy polarizations. The other doesn't. In 1D there is no enhancement. There is a ~10x enhancement in 2D as can be seen in the figure. 1 unit on the abscissa is 1 micron.
BUT, after careful examination, this result comes from the flux captured from the gaussian pulse that I had put in (The random current function didn't start with exactly zero initial fields). Also, I'm getting some reflections which can be seen from the negative parts of spectrum. Now when thinking about heat transfer, the other side should be 0K and be totally absorbing. The reflections can be explained as follows in heat transfer terms: the other side is gaining energy and re-emitting back to the source.
I'm going to reduce the amplitude of the noise to see if the reflections are reduced relative to the flux of the source.

Monday, February 20, 2012

Task 2: Surface Plasmon Dispersion

Dispersion curves are useful to understand transport. I set up a MEEP simulation of two surfaces of Ag separated by a 100e-9m gap. You can see 3 modes: surface plasmons, gap propagation, and bulk plasmons. ~0.7 is omega_p the plasma frequency.

(set! geometry-lattice (make lattice (size 20 no-size no-size)))
(set! pml-layers (list (make pml (thickness 1))))
(set-param! resolution 30)

(define myAg (make dielectric (epsilon 1)
(polarizations
(make polarizability
(omega 1e-20) (gamma 0.0038715) (sigma 4.4625e+39))
; (make polarizability
; (omega 0.065815) (gamma 0.31343) (sigma 7.9247))
; (make polarizability
; (omega 0.36142) (gamma 0.036456) (sigma 0.50133))
; (make polarizability
; (omega 0.66017) (gamma 0.0052426) (sigma 0.013329))
; (make polarizability
; (omega 0.73259) (gamma 0.07388) (sigma 0.82655))
; (make polarizability
; (omega 1.6365) (gamma 0.19511) (sigma 1.1133))
)))

(set! geometry (list
                (make block (center -3 0 0 0.0) (size 5 infinity infinity)
                      (material myAg ))
    (make block (center 3 0 0 0.0) (size 5 infinity infinity)
                      (material myAg ))
      ))

(set! sources (list
               (make source
                 (src (make gaussian-src (frequency 2.5) (fwidth 5)))
                 (component Ex)
                 (center 0 0 0))
    (make source
                 (src (make gaussian-src (frequency 2.5) (fwidth 5)))
                 (component Ex)
                 (center -.5 0 0))
    (make source
                 (src (make gaussian-src (frequency 2.5) (fwidth 5)))
                 (component Ex)
                 (center .5 0 0)) 
     ))

(define-param kmin 0.0)
(define-param kmax 4.0)
(define-param k-interp 50)
(define kpts (interpolate k-interp (list (vector3 0 kmin 0) (vector3 0 kmax 0))))
(define all-freqs (run-k-points 200 kpts)) ; a list of lists of frequencies  

And here's a python snippet that gives a list of k-vectors their frequencies by giving it the MEEP output as a file object
def getfreqs(meepoutfileobj):
    fd=[]
    for aline in meepoutfileobj:
        if 'freqs:' in aline:
            ld=aline.split(',')
            kpt=ld[2:5];freqs=ld[5:]
            pts=[( [float(an) for an in kpt]  ,float(afreq)) for afreq in freqs]
            fd.extend(pts)
    if fd==[]:return None
    return fd