Git Product home page Git Product logo

hwode / inkstone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexysong/inkstone

0.0 0.0 0.0 312 KB

Efficient electromagnetic solver based on rigorous coupled-wave analysis for 3D and 2D multi-layered structures with in-plane periodicity, such as gratings, photonic-crystal slabs, metasurfaces, surface-emitting lasers, nano-antennas, and more.

License: GNU Affero General Public License v3.0

Python 100.00%

inkstone's Introduction

logo

Inkstone simulates the electromagnetic properties of 3D and 2D multi-layered structures with in-plane periodicity, such as gratings, photonic-crystal slabs, metasurfaces, vertical-cavity or photonic-crystal surface-emitting lasers (VCSEL, PCSEL), (patterned) solar cells, nano-antennas, and more.

Internally, Inkstone implements rigorous coupled-wave analysis (RCWA), a. k. a. Fourier Modal Method (FMM).

Inkstone can calculate:

  • the reflection, transmission, and absorption of the structure
  • the total and by-order power fluxes of the propagating and the evanescent waves in each layer
  • electric and magnetic field amplitudes at any locations in the structure,
  • band-structures based on the determinant of the scattering matrix of the structure.

Features of Inkstone:

  • It supports efficient and flexible parameter-scanning. You can change part of your structure such as the shapes and sizes of some patterns, or some material parameters. Inkstone only recalculates the modified parts and produces the final results efficiently.
  • It allows both tensorial permittivities and tensorial permeabilities, such as in anisotropic, magneto-optical, or gyromagnetic materials.
  • It can calculate the determinant of the scattering matrix on the complex frequency plane.
  • Pre-defined shapes of patterns can be used, including rectangular, parallelogram, disk, ellipse, 1D, and polygons. Closed-form Fourier transforms and corrections for Gibbs phenomena are implemented.
  • It is fully 3D.
  • It is written in pure python, with heavy-lifting done in numpy and scipy.

Quick Start

Installation:

$ pip install inkstone

Or,

$ git clone git://github.com/alexysong/inkstone
$ pip install .

Usage

The examples folder contains various self-explaining examples to get you started.

Dependencies

  • python 3.6+
  • numpy
  • scipy

Units, conventions, and definitions

Unit system

We adopt a natural unit system, where vacuum permittivity, permeability, and light speed are $\varepsilon_0=\mu_0=c_0=1$.

Sign convention

Sign conventions in electromagnetic waves:

$$e^{i(kx-\omega t)}$$

where $k$ is the wavevector, $x$ is spatial location, $\omega$ is frequency, $t$ is time.

By this convention, a permittivity of $\varepsilon_r + i\varepsilon_i$ with $\varepsilon_i>0$ means material loss, and $\varepsilon_i<0$ means material gain.

Coordinates and incident angles

drawing

(Inkstone, Incident $\bm{k}$ on stacked periodic nano electromagnetic structures.)

Citing

If you find Inkstone useful for your research, we would apprecite you citing our paper. For your convenience, you can use the following BibTex entry:

@article{song2018broadband,
  title={Broadband Control of Topological Nodes in Electromagnetic Fields},
  author={Song, Alex Y and Catrysse, Peter B and Fan, Shanhui},
  journal={Physical review letters},
  volume={120},
  number={19},
  pages={193903},
  year={2018},
  publisher={American Physical Society}
}

inkstone's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.