Open-source project
NanoComp/meep avatar
NanoComp/meep

Meep FDTD simulations: capabilities, setup, and limits

free finite-difference time-domain (FDTD) software for electromagnetic simulations

1,823 stars821 forksC++GPL-2.0

At a glance

What is it?
Meep is a GPL-2.0 electromagnetic simulation package for FDTD research in Python, Scheme, or C++, with support for 1d through 3d, cylindrical coordinates, MPI parallelism, materials analysis, and inverse design. Its documented breadth is substantial, but the README does not provide a self-contained installation command or a minimal runnable example.
Who is it for?
Researchers who need programmable FDTD modeling, broad material support, and Python, Scheme, or C++ access should evaluate Meep, while users seeking a documented one-command installation or a tiny introductory script should look elsewhere first. Before adoption, verify the installation procedure in the current Meep manual, confirm that the documented APIs match your chosen language, and reproduce the closest official tutorial for your geometry and analysis.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Meep's FDTD problem space and intended users

Meep addresses a specific computational problem: simulating the time evolution of electromagnetic fields with the finite-difference time-domain method. It is aimed at engineers, physicists, materials researchers, photonics researchers, and users who need to define an electromagnetic geometry and examine its field response. The README describes simulations in 1d, 2d, 3d, and cylindrical coordinates, so domain choice can reflect the symmetry of the physical problem.

The package covers several research workflows. Its documented features include waveguide mode analysis, planewave and Gaussian-beam sources, resonant-mode calculations, continuous-wave responses, scattering calculations, inverse design, and topology optimization. It also supports absorbing boundaries, periodic boundaries, perfect conductors, geometry imports, and field output through HDF5. The scope is therefore broader than a single optical benchmark or a fixed geometry format. The simulation model, sources, materials, monitors, and analyses can be expressed through the supported interfaces.

Meep is a programmable research package rather than only a graphical application. The README names Python, Scheme, and C++ APIs and describes simulation control as scriptable. Distributed-memory parallelism is available on systems supporting MPI. This makes the project relevant to both local exploratory simulations and larger computational environments, although the README does not state hardware requirements or provide performance figures.

Meep's FDTD architecture and data flow

Based on the repository layout and README, the implementation is organized across `src/`, `python/`, `scheme/`, and `tests/`, with documentation under `doc/`. The listed interfaces expose a general simulation model from C++, Python, and Scheme. A model is assembled from a computational domain, material properties, geometric structure, boundary conditions, sources, and monitoring or analysis functions. The README does not document one mandatory class hierarchy or a universal configuration file, so construction details depend on the selected interface.

The electromagnetic state advances through FDTD time steps. Sources inject electromagnetic fields according to spatial and temporal profiles. Meep supports custom current sources, mode launchers, planewaves, and Gaussian beams. Monitor and field functions can then analyze the resulting state. The documented analyses include discrete-time Fourier transforms, Poynting flux, mode decomposition, energy density spectra, near-to-far transformation, frequency extraction, local density of states, modal volume, scattering cross section, Maxwell stress, and absorbed power density.

The package also models boundaries and material structure directly. Perfectly matched layers absorb outgoing waves, while Bloch-periodic and perfect-conductor boundaries support different domain assumptions. Symmetry reduction can limit computation size, and subpixel smoothing is documented for improving accuracy and shape optimization. For planar geometry, the README identifies GDS import as a supported route. This combination makes Meep suitable for workflows in which the geometry or material model changes during the design process, not merely for replaying a fixed structure.

Materials, symmetry, and boundary constraints in Meep

Meep's material model is one of its clearest differentiators. The README lists anisotropic electric permittivity and magnetic permeability, dispersive epsilon and mu, loss and gain, nonlinear Kerr and Pockels dielectric behavior, nonlinear magnetic materials, conductivities, saturable gain or absorption, and gyrotropic media. It also identifies a materials library with predefined broadband, complex refractive indices.

That flexibility comes with modeling obligations. A dispersive, nonlinear, lossy, or gyrotropic problem requires the user to select the material representation and parameters that correspond to the intended physical model. The README names the supported categories but does not provide a parameter-selection guide, convergence criteria, or a universal procedure for deciding which material model is appropriate. The documentation must therefore be consulted for the exact API and inputs of each material class.

Meep also reduces unnecessary computation when a structure has symmetry. The documented options include even and odd mirror planes and 90-degree and 180-degree rotations. Symmetry can be useful for periodic or mirror-symmetric devices, but it changes the effective domain and can exclude configurations that do not possess the stated symmetry. Likewise, PMLs, Bloch-periodic boundaries, and perfect conductors are different physical assumptions. They should not be treated as interchangeable output settings. The README confirms that these boundaries exist, but it does not explain their convergence behavior or numerical limitations.

Installing Meep and completing a first documented use

The README points users to the online manual for installation and directs users to the Conda package documentation for precompiled binary packages of official releases. It does not give an exact `conda` command, package specification, environment name, or version command, so this article cannot provide a reproducible installation block without inventing details. The repository README also does not include a complete first-run script. The correct first step is to follow the current Installation section in the Meep manual, then select the interface intended for the project.

The documentation lists Python 3.9 and 3.11 in its Python compatibility badge. It also states that Meep is portable to Unix-like operating systems such as Linux, macOS, and FreeBSD. For distributed-memory simulations, the system must support MPI according to the README. These are documented platform and compatibility statements, not a guarantee that every dependency is preinstalled.

A first real use should begin with an official Python, Scheme, or C++ tutorial from the linked manual. The README links basic tutorials for Python and Scheme, a C++ tutorial, custom-source documentation, eigenmode-source documentation, GDS import, and the adjoint solver. The tutorial choice should follow the intended analysis. Use a source example only after the build has been completed, then confirm that the documented simulation and output calls are available in the installed API. The README does not document expected console output, file names, or numerical values for a first run, so there is no justified success output to quote here.

What Meep does not document for adoption decisions

The README is strong on feature inventory but thin on operational boundaries. It does not state memory requirements, supported compiler ranges, installation failure modes, expected run times, or the numerical convergence criteria for a particular material and mesh. It also does not provide a single example that demonstrates the complete path from source definition through output analysis. Those omissions matter for an FDTD package, where discretization, domain size, time step, boundary conditions, and source design can affect whether a result is meaningful.

The package is also not a universal choice. Meep is specifically an FDTD simulator. If the required electromagnetic problem is better represented by a frequency-domain formulation with no time-domain propagation requirement, the FDTD workflow may add simulation steps that are not needed. The README does not document a built-in path for rotating between simulation methods, so users whose existing workflow depends on another solver should verify interface and data compatibility before migrating.

A second boundary is the distinction between documented capability and production validation. The repository advertises many analyses and material types, but the README does not identify which examples are recommended as validation cases for a particular result. A team should not infer from the feature list that a given advanced material or solver mode will be suitable for a specific device. The closest official tutorial and the current API documentation are the concrete sources to check first.

Meep's GPL-2.0 license and release maintenance

Meep is released under the GNU GPL, identified in the repository metadata as GPL-2.0. That license governs use and distribution of the software, subject to its terms. Users who need exact obligations for a commercial workflow, derivative work, or redistribution should review the repository `LICENSE` and consult appropriate legal guidance. This article does not interpret those obligations.

The repository is not archived, and its last push was on 2026-10-16. The recent releases listed are `v1.35.0` on 2026-10-09, `v1.34.0` on 2026-07-09, and `v1.33.0` on 2026-04-25. The project therefore has recent repository activity and recent releases, but this does not by itself establish that every API or platform configuration is stable. Upgrade cost remains tied to changes between releases, dependency requirements, and differences between the Python, Scheme, and C++ interfaces. The README does not provide a migration guide or compatibility matrix for those versions.

Meep compared with a conventional electromagnetic solver

A conventional frequency-domain solver generally focuses on solving for fields at selected frequencies rather than advancing the entire electromagnetic system through FDTD time steps. Meep takes the time-domain route, but it adds frequency-domain analysis as a layer over that evolution. Its frequency-domain solver can find the response to a continuous-wave source, while its frequency-domain eigensolver can find resonant modes. Mode decomposition can support S-parameter analysis for directional couplers, and the adjoint solver supports inverse design and topology optimization.

This difference affects workflow selection. A project centered on pulse propagation, time-varying sources, broadband response, or optimization over a time-domain simulation is a stronger fit for Meep than for a solver designed only around a fixed-frequency boundary-value problem. A project that needs a direct frequency-domain calculation and does not need time stepping may find Meep more elaborate than necessary. The choice should be based on the required physics and analysis rather than on the number of features.

Editorial conclusion

Researchers who need programmable FDTD modeling, broad material support, and Python, Scheme, or C++ access should evaluate Meep, while users seeking a documented one-command installation or a tiny introductory script should look elsewhere first. Before adoption, verify the installation procedure in the current Meep manual, confirm that the documented APIs match your chosen language, and reproduce the closest official tutorial for your geometry and analysis.

Frequently asked questions

How do I install Meep?

The README says to consult the online manual for installation and links to documentation for precompiled official-release packages through Conda. It does not provide an exact Conda command or package specification.

Which programming interfaces does Meep support?

The README identifies Python, Scheme, and C++ APIs. It links to basic tutorials for Python and Scheme and to a C++ tutorial.

Can Meep run in parallel?

Yes. The README documents distributed-memory parallelism on systems supporting MPI. It does not specify a particular MPI implementation or report parallel performance figures.

What materials can Meep model?

The README lists anisotropic, dispersive, nonlinear, conductive, saturable, lossy or gain-bearing, and gyrotropic materials. It also mentions a materials library with predefined broadband, complex refractive indices.

Does Meep support inverse design?

Yes. The README identifies an adjoint solver for inverse design and topology optimization. It does not provide a complete optimization example.

Official sources

  1. Issues
  2. License: GPL-2.0
  3. NanoComp/meep on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/nanocomp-meep.svg)](https://hysenlabs.com/projects/nanocomp-meep)

Was this useful?