No description, website, or topics provided.
Python Scheme
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
tests
.gitignore
COPYING
README.md
__init__.py
axis_formatter.py
bandplotter.py
data.py
defaults.py
dosv2.scm
geometry.py
graphics.py
kspace.py
log.py
matplotlibrc
objects.py
phc_simulations.py
pyMPB.kdev4
simulation.py
utility.py

README.md

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!