Tools for the simulation and study of metamaterials using MEEP (FTDT).
- MEEP simulation wrapper for easy simulation of metamaterials and effective parameter retrieval.
- Lithography printing translation of metamaterials defined from MEEP geometry.
$ git clone https://github.com/marcdmc/metamaterials.git
$ cd metamaterials
$ pip install .
$ conda create -n mp -c conda-forge pymeep pymeep-extras
$ conda activate mp
In Python:
import meep_retrieval as mr
$ conda create -n pmp -c conda-forge pymeep=*=mpi_mpich_*
$ conda activate pmp
Running an example with MPI
$ mpirun -n 4 python example.py
Basic example: how to get the S-parameters from a square grating.
import meep as mp
import numpy as np
from meep_metamaterials import metamaterials as mm
geometry = [mp.Block(mp.Vector3(.6, .2), center=mp.Vector3(), material=mp.Medium(epsilon=12))]
freq_range = np.linspace(0.5, 1.8, 200)
sim = mm.MetamaterialSimulation(period=1.2, geometry=geometry, freq_range=freq_range, dimensions=2)
sim.run()
[S11, S21] = sim.get_s_params()