Getting Started with MEEP FDTD Part 1

MEEP FDTD is an amazing open source software to simulate electromagnetic systems. However many including me, found it difficult to get started with MEEP. This blog post is will describe in detail step by step how to get started and work on MEEP.

Advice on Operating system:

MEEP is designed to work in UNIX devices. It can work in MAC OS also. But after wasting a lot of time installing and configuring in MAC OS , I won't advice you to work in MAC to use MEEP FDTD. For both windows and MAC users I would advice you to install and work in Linux.

Installation :

In your terminal enter the following code and enter your system password when prompted.

$sudo apt-get install meep h5utils

This will install all the packages and dependencies of MEEP.

Brief Intro about MEEP execution:

MEEP files use the extension ".ctl" . In UNIX platform all the open source packages are executed in the Terminal. For example, running a Python script is done as follows: (In your terminal)

 $ python

Similarly MEEP files are executed as

$ meep file_name.ctl

MEEP can also be executed in interpreter scheme.

In your terminal start the interpreter by typing meep :

 $ meep

now you can type MEEP commands and it would be executed.


 $ meep 
> (set! resolution 10) 

The above is line is a MEEP command to set resolution to 10.

In my next article I would describe how to analyze the output data in Matlab and Python.

10 thoughts on “Getting Started with MEEP FDTD Part 1

  1. I was going through the first meep tutorial? Typing the command on the text file. I am not sure whether I run it from the Linux command prompt or save the text file to get a visual out put. Isn't it clear? Am only just starting

  2. i did what u said and this is what i got, it's a step in the right direction but i still need to be able to generate an output image . I think it has something to do with HDF5 , or png, together with h5utils

    1. After you run the meep script it will generate data in HD5 format. This file contains the value of Ez. In order to convert into png , you'll have to run command in the terminal "h5topng -S3 eps-000000.00.h5" . Make sure your working directory contains the .h5 files

  3. I am looking through the meep tutorial , the geometry object section. I would like to be able to contruct a hexagon by manipulating these shapes, parallelograms or triangles inorder to be able to get a hexagon from which i can get resonant modes. Been struggling with it to be honest. Thanks a lot for your help by the way. have made loads of progress with your support

  4. Hey, i hope you are very busy ( not too busy perhaps) . You have been very helpful by allowing me to have a bit of a soft landing in Meep. Thinks are going really well. I was very excited to make modes of ring resonator in a cylinder. I am not trying to do the same in a hexagon. The modification of the codes to get a hexagon is what's killing me. Any ideas?
    Was thinking of making a block and then translating it round, but it seems rather difficult. Then the next thought is to make a cone into a Triangle and then translate it round. Still am getting too many error messages , errors i find difficult to trace inorder to be able to fix. Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *