# Plasmonic Materials in MEEP > 1.2

Here is how I was implementing plasmonic materials in meep1.1 scheme code. Unlike Meep 1. 1, Meep >= 1. 2 changed the way materials are defined. Here I will describe how to change the material definition code from meep1.1 to meep 1.2 . Please note that one can still use the material definition written from Read More …

# Parallelization in Octave using parcellfun/pararrayfun

My computer has many processors and I would like to run some octave scripts so that all the processors are being used. One can use octave function called “pararrayfun” for this purpose. This function is part of “general” package on octave-forge. On my ubuntu 11.10, I used “sudo apt-get install octave-general” to install this package Read More …

# Spaces in strings in matlab/octave

To get spaces in the strings to work in matlab or octave, use t1={‘test test’} Result is t1 = { [1,1] = test test } t2=strcat({‘test test ‘},{‘blah blah’}) Result is t2 = { [1,1] = test test blah blah } you can use this string in your figures by plot([1:4]) title(t2{})

# van der Pauw correction factor

The van der Pauw Method is a technique commonly used to measure the Resistivity and the Hall Coefficient of a sample. A correction factor goes into calculating the resistivity as described in van der Pauw paper. A iterative method is generally used to calculate the correction factor and this correction factor is plotted in Figure Read More …

# Surface plasmon dispersion relation for thin metal films

A thin metal film in dielectric (also known as dielectric-metal-dielectric configuration) can support surface plasmons that are different in nature to the ones observed in thick metal-dielectric interfaces. Unlike, a single mode that is observed in thick metal film, thin metal films exhibit two types of modes for the same wavevector due to excitation and Read More …

# All entries of array except certain indices in octave/matlab

In Octave or Matlab, some times one needs to eliminate certain elements in an array. For example, if a=[10,20,30,40,50,60]; and suppose I want to create a matrix “b” such that it has all the elements of “a” except 20 and 40. This can be achieved by: b=a(1:end~=2&1:end~=4); The result is: b =    10   Read More …

# Arbitrary 2d shapes in MEEP

In MEEP (1.1.1), dielectric structures are often created by constructive geometry (adding and subtracting primitive shapes). The primitive shapes that are allowed are blocks, cylinders, ellipsoids and cones. To create a complex shape, one has to decompose the geometry into these primitive shapes. Over the weekend, I was wondering if it was possible to somehow Read More …

# Plasmonic materials in MEEP

The aim of this post is to share my experience in incorporating dielectric function of metals such as gold and silver into MEEP (a free finite difference time domain package) code. The incorporation is not an easy task and can be daunting for the first time user. Metals such as gold and silver have Read More …