https://github.com/sp94/peacock.jl
Photonic crystals in Julia 🦚
https://github.com/sp94/peacock.jl
electromagnetic-simulation electromagnetics electromagnetism maxwell-equations maxwell-equations-solver photonic-crystals photonics physics plane-wave-expansion
Last synced: 4 months ago
JSON representation
Photonic crystals in Julia 🦚
- Host: GitHub
- URL: https://github.com/sp94/peacock.jl
- Owner: sp94
- License: mit
- Created: 2020-01-17T14:20:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-19T22:22:31.000Z (about 1 year ago)
- Last Synced: 2026-02-14T13:51:32.062Z (4 months ago)
- Topics: electromagnetic-simulation, electromagnetics, electromagnetism, maxwell-equations, maxwell-equations-solver, photonic-crystals, photonics, physics, plane-wave-expansion
- Language: Julia
- Homepage:
- Size: 3.49 MB
- Stars: 41
- Watchers: 2
- Forks: 10
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.bib
Awesome Lists containing this project
README
---
[](https://sp94.github.io/Peacock.jl/stable)
[](https://sp94.github.io/Peacock.jl/dev)
[](https://codecov.io/gh/sp94/Peacock.jl)
[](https://doi.org/10.21105/joss.02678)
## Introduction
`Peacock.jl` - or the **P**lane-wave **E**xpansion **A**pproach to **C**haracterising **O**ptical **C**rystals in **k**-space - is a Julia package for studying photonic crystals using the Plane Wave Expansion Method.
Photonic crystals are materials whose optical properties arise from the structuring of the material when the size of the structures are comparable to the wavelengths of light. `Peacock.jl` is named for the irridescent colours of peacock feathers which arise not from pigmentation but from their photonic crystal structure, as shown below.
> 
> Peacock by allanlau2000 from pixabay. Feather by suju from pixabay. Electron microscope image of photonic crystal structure from Zi, Jian, et al. "Coloration strategies in peacock feathers.", *Proceedings of the National Academy of Sciences* 100.22 (2003): 12576-12578. Copyright (2003) National Academy of Sciences.
As well as occuring naturally as in animals such as peacocks, advances in nanofabrication mean that 'designer' photonic crystals can now be manufactured for unprecedented control over the flow of light, with applications ranging from optical fibers to photonic circuitry. Photonic crystals are also a promising platform for more exotic materials like topological insulators.
## Installation
```julia
julia> ]
pkg> add Peacock
```
For more info on the package and usage instructions, see the [documentation](https://sp94.github.io/Peacock.jl/stable).
## Features
Solve for...
* Transverse electric (TE) and transverse magnetic (TM) modes of 2D photonic crystals:
* Non-orthogonal unit cells
* Inhomogeneous permittivity and/or permeability
* Chern numbers of topological photonic crystals using [built-in Wilson loop methods](https://sp94.github.io/Peacock.jl/dev/how-tos/wilson_loops).
Focused on ease of use
* [Install](https://sp94.github.io/Peacock.jl/dev/tutorials/getting_started/#getting_started_installation-1) with one line in Julia's package manager.
* Simple visualisation of [geometry](https://sp94.github.io/Peacock.jl/dev/tutorials/getting_started/#getting_started_geometry-1), [fields](https://sp94.github.io/Peacock.jl/dev/tutorials/getting_started/#getting_started_modes-1), and [fully labelled band diagrams](https://sp94.github.io/Peacock.jl/dev/tutorials/getting_started/#getting_started_bands-1).
* Reproduce and extend existing photonic crystals in the [`Peacock.Zoo`](https://sp94.github.io/Peacock.jl/dev/how-tos/zoo/#how_to_zoo-1) submodule.
* Easily [accelerate calculations on CUDA-compatible GPUs](https://sp94.github.io/Peacock.jl/dev/how-tos/gpu/).
## Limitations
* Currently only implemented for 2D photonic crystals.
* Like all methods that solve Maxwell's equations in Fourier space, the Plane Wave Expansion Method converges slowly for high contrast materials such as metals (ϵ < 0).
## Contributors
* @sp94 (core)
* @kabume (GPU support)
## Referencing
If you use `Peacock.jl` in your work, please consider citing us as
```bib
@article{palmer2020peacock,
title={Peacock.jl: Photonic crystals in {Julia}},
author={Palmer, Samuel J and Giannini, Vincenzo},
journal={Journal of Open Source Software},
volume={5},
number={54},
pages={2678},
year={2020}
}
```