Skip to content

Tools for the simulation and study of metamaterials using MEEP (FTDT).

License

Notifications You must be signed in to change notification settings

marcdmc/meep-metamaterials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tools for the simulation and study of metamaterials using MEEP (FTDT).

Features

  • MEEP simulation wrapper for easy simulation of metamaterials and effective parameter retrieval.
  • Lithography printing translation of metamaterials defined from MEEP geometry.

Installation and usage

$ git clone https://github.com/marcdmc/metamaterials.git
$ cd metamaterials
$ pip install .

Serial run

$ conda create -n mp -c conda-forge pymeep pymeep-extras
$ conda activate mp

In Python:

import meep_retrieval as mr

MPI

$ conda create -n pmp -c conda-forge pymeep=*=mpi_mpich_*
$ conda activate pmp

Running an example with MPI

$ mpirun -n 4 python example.py

Documentation

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()

About

Tools for the simulation and study of metamaterials using MEEP (FTDT).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages