♯SHAARP.ml is an open-source package for modeling reflected and transmitted optical second harmonic generation (SHG) of slab and multilayer structures of nonlinear optical materials.
This package builds upon a general approach to solve the Maxwell equations under proper boundary conditions to obtain the SHG responses of various materials systems. The package is designed to handle arbitrary number of layers, number of SHG active media, crystal symmetry, crystal orientations, complex refractive indices, and polarized incident lights. 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 of a single-interface system.
You can find detailed documentation of ♯SHAARP.ml here.
♯SHAARP.ml exhibits unique features for modeling the SHG responses with flexibility, high-fidelity, high accuracy, high efficiency, user-friendliness, and extensibility.
Key features of ♯SHAARP.ml include:
- Flexibility 🌈: User have freedom in defining the multilayer structure, materials properties, incident lights, and assumptions for the SHG polarization.
- High-fidelity ✔: The calculation results of ♯SHAARP.ml have been verified by benchmarking with established analytical theories in literature and experimental validation of more than eight material systems
- High accuracy🎯: The solutions are all semi-analytical with minimal numerical approximations.
- High efficiency 🚀: It typically takes just a few seconds to calculate the result for a single incidence and a few minutes for a parametric study such as Maker fringes simulation.
- User-friendliness 👍: With well-designed GUI and documentations, more than ten preset cases studies and tutorials videos
- Extensibility💻: Beside the GUI, it is programmable with modularized functions.
♯SHAARP.ml is designed for two types of studies:
- To numerically simulate SHG responses of nonlinear optical materials and heterostructures
- To obtain analytical expressions of SHG responses and fit experimental measurements to determine the nonlinear optical properties of materials
- ♯SHAARP.ml is written as a notebook using Wolfram Language and the access to Mathematica® or Wolfram Player is required to run ♯SHAARP.ml on PC/Mac. Please refer to the Installing Mathematica.
- Download SHAARP.ml_V#.zip in the latest release from here.
- Unzip the file and you will obtain two Mathematica® notebooks:
- SHAARP.ml.nb
- setup.nb
- Open SHAARP.ml.nb
- Make sure that Dynamic Evaluation is enabled, evaluate the notebook by clicking
Evaluation > Evaluate Notebook
from the menu bar. Note that this process clears all the definitions from the other currently open notebooks. - You will get the welcome page as:
- There is a default single slab system (1
$\mu m$ -thick Z-cut LiNbO3 slab, incident wavelength = 1.064$\mu m$ ) for quick test calculation. - To visualize the setup of the system, click
Set Material Properties
in theFunctionality
subpanel, and then clickUpdate
. You will get: - To simulation the SHG response of the system, click
SHG Simulation
in theFunctionality
subpanel, and then clickUpdate
. You will get: - To obtain the partial analytical expressions of the SHG responses, click
Partial Analytical Expressions
, and then clickUpdate
. You will get: - For advanced usage such as Maker fringes simulation, please refer to the documentation.
- Arbitrary number of layers with a mixture of linear and SHG active materials
- Full SHG simulation results of a 100
$\mu m$ -thick Z-cut LiNbO3 slab (with JK assumptions), including - 3D schematics of polarizer and analyzer and ellipticity of waves
- Partial analytical solutions of a 300
$\mu m$ -thick Z-cut Quartz slab
- Please refer to the documentation to learn more advanced topics and tips about ♯SHAARP.ml.
- For theoretical detail and experimental validation of ♯SHAARP.ml approach, please refer to our publications:
- 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
- Zu, R., Wang, B., He, J. et al. Optical second harmonic generation in anisotropic multilayers with complete multireflection of linear and nonlinear waves using ♯SHAARP.ml package of Linear and Nonlinear Waves using ♯SHAARP.ml Package. npj Comput Mater 10, 64 (2023), https://www.nature.com/articles/s41524-024-01229-2
- 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
If you've used ♯SHAARP.ml in any publication of you, please cite the references:
- Zu, R., Wang, B., He, J. et al. Optical second harmonic generation in anisotropic multilayers with complete multireflection of linear and nonlinear waves using ♯SHAARP.ml package of Linear and Nonlinear Waves using ♯SHAARP.ml Package. npj Comput Mater 10, 64 (2023), https://www.nature.com/articles/s41524-024-01229-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
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.