~ Octave
~ Meep
~ MPB



Meep Intro
Meep Kit
Kit Examples
Kit Download


Meep Intro

Here are a few concepts I hope will help get the new user started. If you feel an additional topic would be helpful, feel free to let me know.

The following website is the best reference, if not the only reference I have found. This is where I learned almost everything I know about Meep. The authors Ardavan F. Oskooi, David Roundy, Mihai Ibanescu, Peter Bermel, J. D. Joannopoulos, and Steven G. Johnson have everything organized by topics, making it an easy and quick reference. This is also where I found out how to create the cool looking boxes that I put code and links in. It's the simply things in life, thanks guys!



Ubuntu is the easiest version of linux to use. Meep will run on other Unix based operating systems but I will focus on Ubuntu here, simply because it's easy and I use it personally.

Installation -

Open up the Ubuntu Software Center. It may have a different name depending on your version of Ubuntu. Search for Meep and install it. If you want to manually install it, the wiki has some pointers in the installation section.



Meep requires other programs or packages to properly function. You will also need some software to manipulate and plot the data Meep produces. Here is a list of programs I recommend downloading. Some of these are not required for Meep to function, but they are required if you want to use the kit on this site. Just search for each of these in the software center and make sure they're installed. Whenever you see a "-dev" option, install that too. For example, there might be a "guile" and "guile-dev".

blas
lapack
guile
harminv
libctl
hdf5
meep
h5utils
imagemagick
octave
gnuplot


Test the installation -

Make sure Meep is alive and well by viewing the manual and asking for a version number, as follows. If Meep talks back, you're on the right track. One step at a time buddy. Hit "q" to quit the manual when you're done reading it.

user@comp:~$ man meep
user@comp:~$ meep --version
Meep 1.1.1, Copyright (C) 2005-2009 Massachusetts Insitute of Technology.
Using libctl 3.1 and Guile 1.8.7.

Elapsed run time = 0.37574 s
user@comp:~$


Control Files -

A control file is used to tell Meep what to do. It is nothing more than a text file, with a .ctl extension, and some Scheme code inside. Here is an example control file I snagged from the wiki.

---------------------- simulation1.ctl ------------------------
(set! geometry-lattice (make lattice (size 16 5 no-size)))
(set! geometry (list
(make block (center 0 0) (size 14 1 infinity)
(material (make dielectric (epsilon 3))))))
(set! pml-layers (list (make pml (thickness 1.0))))
(set! sources (list
(make source (src (make continuous-src (wavelength 2)))
(component Ez) (center -7 0))))
(set! resolution 10)
(run-until 200
(at-beginning output-epsilon)
(to-appended "ez" (at-every 1 output-efield-z)))
----------------------------------------------------------------------

I'm not going to explain how to write a control file because the wiki does a better job than I probably could. An explaination of each line can be found here....



Run a Simulation -

Lets say you have Meep installed and a control file ready and waiting. To run the simulation, open a terminal and navigate to the control file using your dandy Unix commands (cd folder, cd .., and ls). Once you find your control file, type "meep filename.ctl" and there you go.

user@comp:~$ ls
simulation1.ctl
user@comp:~$ meep simulation1.ctl


That's it for a very basic introduction to Meep. Create your control file and run it in a terminal. See, not having a GUI really isn't that bad. Although, to run practical simulations, there are a few more tricks you will want to know. Just read through the wiki tutorial and you'll be ready to go. The tutorial is good at explaining what you need to know and leaves details for the Meep manual or reference section.

Alternative Terminal Options -

You will probably spend an excessive amount of time using the terminal from here on. For some additional functionality, try downloading Guake Terminal. Guake can be opened and closed quickly using F12, supports multiple tabs, and has a bunch of other fun hot keys. Another cool terminal is called byobu. Byobu can display all kinds of nifty info about your computer or a custom script. I haven't found a real good use for it, but it's still entertaining to watch the memory, processing power, and temperature change while running scripts.



Questions/comments:
CREATINGRF [at] GMAIL.COM