Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.47 KB

README.md

File metadata and controls

43 lines (30 loc) · 1.47 KB

pyMPB

This is a Python package for running bandstructure simulations of photonic crystals (PhCs) with MIT Photonic-Bands (MPB, http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands). It creates a .ctl file, runs it, and does some postprocessing and plotting.

Features:

  • supports 2D and 3D simulations
  • works with anisotropic dielectric materials
  • supports MPB's cylinder and block objects (but easily extendable)
  • rectangular and triangular lattices
  • uses mpb-data (from MPB) and h5topng (from h5utils) to export PNG-Images of calculated fields
  • exports simulation results (frequencies, group velocities) to .csv files
  • plots band structure diagrams with matplotlib
  • predefined simulations for 2D triangular lattice of holes and 3D triangular PhC slab

Dependencies:

Usage:

  1. Add your material's refractive indices to data.py
  2. Update defaults (programm calls etc.) in defaults.py
  3. Start with predefined PhC simulations in phc_simulations.py
  4. See examples in examples folder

"Disclaimer"

I am in a hurry - I need to finish my thesis. So my code is neither nice nor clean. Meanwhile, I hope somebody finds this useful!