Skip to content

Commit

Permalink
Updated some Jupyter tutorials (NanoComp#937)
Browse files Browse the repository at this point in the history
* visualization bug fixes

* cosmetic changes

* first round

* upload older tutorials

* more tutorials
  • Loading branch information
smartalecH authored and stevengj committed Jun 28, 2019
1 parent 6f0059c commit 3b77663
Show file tree
Hide file tree
Showing 28 changed files with 4,682 additions and 236 deletions.
931 changes: 931 additions & 0 deletions python/examples/3rd-harm-1d.ipynb

Large diffs are not rendered by default.

65 changes: 59 additions & 6 deletions python/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,70 @@ GitHub is able to render some of the smaller notebooks as plain text. However, t

Below are summaries for each tutorial, along with the features the tutorials highlight. While there is no particular order to the tutorials, they progressively incorporate more complicated features.

1. __`straight-waveguide.ipynb`__ -
#### Basics

* __`straight-waveguide.ipynb`__ -
A simple 2D straight waveguide tutorial that explores basic meep features like `geometry`, `sources`, and `PML` layers. The tutorial also explores basic visualization and animation features.

2. __`bent-waveguide.ipynb`__-
* __`bent-waveguide.ipynb`__-
A followup to the 2D straight waveguide tutorial by adding a bend.

3. __`bend-flux.ipynb`__-
* __`bend-flux.ipynb`__-
Using the previous bent waveguide example, this tutorial calculates the loss, transmission, and reflection that the bent waveguide undergoes.

4. __`ring.ipynb`__ -
* __`ring.ipynb`__ -
Computes the resonant mode frequencies of a 2D ring resonator using `harminv`.

5. __`visualization.ipynb`__ -
Demonstrates various visualization and animation features.
#### Ring Resonator in Cylindrical Coordinates

#### Band Diagram, Resonant Modes, and Transmission of a Waveguide Cavity

* __`holey-wg-cavity.ipynb`__ -
Calculates the transmission and resonant modes of a waveguide photonic crystal cavity. Demonstrates the `harminv` routines and how to estimate the $Q$ of cavities.

* __`holey-wg-bands.ipynb`__ -
Computes the band diagram of the infinite periodic waveguide by itself with no defects in the time domain. Explores the `k_point`, `run_k_point`, and periodic boundary conditions features.

#### MPB and Band diagrams

#### Material Dispersion

* __`refl-quartz.ipynb`__ -

#### Nonlinear Optics

* __`3rd-harm-1d.ipynb`__ -
Examines 3rd harmonic generation in a $\chi^{(3)}$ material. Explores the proper way to do 1d simulations, how to include nonlinearities in materials, and compares experimental results to theory.

#### Near to Far Field Spectra

We demonstrate Meep's near-to-far field transformation feature using four different examples. There are three steps involved in this type of calculation. First, we need to define the "near" surface(s) as a set of surfaces capturing all outgoing radiation in the desired direction(s). Second, we run the simulation using a pulsed source (or alternatively, a CW source via the frequency-domain solver) to allow Meep to accumulate the Fourier transforms on the near surface(s). Third, we have Meep compute the far fields at any desired points with the option to save the far fields to an HDF5 file.

* __`antenna-radiation.ipynb`__ -
Computes the radiation pattern of a simple point source "antenna". Explores `add_near2far`, `add_flux`, `get_fluxes`, and `get_farfield` features.

* __`metasurface_lens.ipynb`__ -

* __`binary_grating_n2f.ipynb`__ -

* __`cavity-farfield.ipynb`__ -

#### Local Density of States

#### Optical Forces

#### Gyrotropic Media

#### Multilevel-Atomic Susceptibility

#### Frequency Domain Solver

* __`solve-cw.ipynb`__ -

#### Eigenmode Source

#### Mode Decomposition

#### GDSII Import

#### Adjoint Solver
187 changes: 169 additions & 18 deletions python/examples/antenna-radiation.ipynb

Large diffs are not rendered by default.

350 changes: 279 additions & 71 deletions python/examples/bend-flux.ipynb

Large diffs are not rendered by default.

315 changes: 284 additions & 31 deletions python/examples/bent-waveguide.ipynb

Large diffs are not rendered by default.

599 changes: 599 additions & 0 deletions python/examples/holey-wvg-bands.ipynb

Large diffs are not rendered by default.

1,325 changes: 1,325 additions & 0 deletions python/examples/holey-wvg-cavity.ipynb

Large diffs are not rendered by default.

Binary file added python/examples/media/bent_waveguide.mp4
Binary file not shown.
Binary file added python/examples/media/hole-wvg-cavity-res.mp4
Binary file not shown.
Binary file added python/examples/media/hole-wvg-cavity.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added python/examples/media/ring_large.mp4
Binary file not shown.
Binary file added python/examples/media/ring_mid.mp4
Binary file not shown.
Binary file added python/examples/media/ring_simple.mp4
Binary file not shown.
Binary file added python/examples/media/straight_waveguide.mp4
Binary file not shown.
Binary file added python/examples/media/visualization_demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added python/examples/media/visualization_demo.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 3b77663

Please sign in to comment.