GitHub release version License GitHub Size HitCount HitCount

Welcome to ♯SHAARP.ml

♯SHAARP.ml is an open-source package for modeling reflected and transmitted optical second harmonic generation (SHG) of a single-layer slab and multi-layer heterostructure of nonlinear optical materials.

This package builds in the most general approach to both analytically and numerically solving the SHG response of various materials systems. The package is designed to handle arbitrary number of layers, number of SHG active mediums, crystal symmetry, arbitrary orientation, complex refractive indices, and arbitrary polarization state of light (e.g., linearly, circularly, elliptically polarized). The two most common SHG characterization approaches, Maker fringes and polarimetry, are integrated into the package.

♯SHAARP.ml is also a successor of the ♯SHAARP.si, which was designed for modeling the reflected SHG responses for an single interface.

Note

The single interface package (♯SHAARP.si) can be accessed using links: GitHub, Manual and Tutorial Videos

A primer of the theoretical background

As a very brief primer, Optical SHG describes the process where two photons of frequency \omega interact with a nonlinear medium to create a photon at 2\omega, so called the SHG process.

The SHG is induced by a quadratic dielectric response, given by P_i^{2\omega} = d_{ijk}E_j^{\omega}E_k^{\omega}, where E is the fundamental electrical field of the fundamental wave at \omega frequency, P^{2\omega} is the nonlinear polarization at 2\omega frequency created inside the crystal, and d_{ijk} is a third rank polar tensor describing the nonlinear optical property of the crystal. The subscripts i, j, k are dummy subscripts running from 1 to 3. The SHG tensor, d_{ijk}, has 3x6=18 independent non-zero components in general considering the interchangeable indices of the electric field term E_j^{\omega} and E_k^{\omega} . The crystal symmetry can further reduce the number.

There are four sets of coordinate systems used in ♯SHAARP.ml. Namely, the crystallographic, the crystal physics, the principal, and the lab coordinate systems. The crystallographic coordinate refers to the the crystallographic axes (a,b,c) for a unit cell which does not necessarily to be orthogonal to each other depending on the crystal system. The crystal physics coordinate system is orthogonal with three axes denoted as (Z_1,Z_2,Z_3) in ♯SHAARP.ml. The principal coordinate system contain three axes (Z_1^{principal},Z_2^{principal},Z_3^{principal}) and is extensively used to describe the optical properties of crystals such as optical axis and refractive indices. They are similar but not identical to the crystal physics coordinate system. The lab coordinate system with the axes (L_1,L_2,L_3) determine the set up the model. We adopt the convention that the plane of incidence coincides with the L_1-L_2 plane, and the incident light is propagating toward the positive direction of L_3.

Beside the three 3D coordinate systems, another 2D coordinate system is useful to describe the polarization state of a wave, namely, the polarizer/analyzer coordinate system (?). The two axes (s, p) are orthogonal, with s axis is perpendicular to the plane of incidence and p axis is within the plane of incidence. The plane expanded by s and p axes is perpendicular to the wavevector of the wave entering the polarizer/analyzer.

A clear understanding of the relationships between these concepts is highly recommended to successfully employ ♯SHAARP.ml to obtain reasonable results and draw reliable comparison with experiments. We have tried to make it clear for new users by incorporating several interactive 2D and 3D illustrations in the GUI.

Links

  • Code repository of ♯SHAARP.ml: https://github.com/bzw133/SHAARP.ml
  • Documentation of ♯SHAARP.ml: https://shaarpml.readthedocs.io/en/latest/
  • Tutorial videos ♯SHAARP.ml: https://youtu.be/YiKRm6i7kNs
  • The ♯SHAARP package for single interface (♯SHAARP.si):
    • Code repository: https://github.com/Rui-Zu/SHAARP
    • Documentation: https://shaarp.readthedocs.io/en/latest/
    • Tutorial videos: https://www.youtube.com/watch?v=fr0RirVHXVc

Referencing

If you've used ♯SHAARP.ml in any publication of you, please cite the references: 1. Zu, R., Wang, B., He, J. et al. Optical Second Harmonic Generation in Anisotropic Multilayers with Complete Multireflection Analysis of Linear and Nonlinear Waves using ♯SHAARP.ml Package, (2023), arXiv:2307.01368. [https://doi.org/10.48550/arXiv.2307.01368] 2. Zu, R., Wang, B., He, J. et al. Analytical and numerical modeling of optical second harmonic generation in anisotropic crystals using ♯SHAARP package. npj Comput Mater 8, 246 (2022). https://doi.org/10.1038/s41524-022-00930-4

Acknowledgement

This development of the software was supported as part of the Computational Materials Sciences Program funded by the U.S. Department of Energy, Office of Science, Basic Energy Sciences, under Award No. DE-SC0020145.

Project outline

Install

Getting Started with ♯SHAARP.ml

Methods

Inputs

Outputs

Examples

Frequently Asked Questions