Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

PyMoosh: a comprehensive numerical toolkit for computing the optical properties of multilayered structures

Open Access Open Access

Abstract

We present PyMoosh, a Python-based simulation library designed to provide a comprehensive set of numerical tools allowing the computation of essentially all optical characteristics of multilayered structures, ranging from reflectance and transmittance to guided modes and photovoltaic efficiency. PyMoosh is designed not just for research purposes, but also for use cases in education. To this end, we have invested significant effort in ensuring the user-friendliness and simplicity of the interface. PyMoosh has been developed in line with the principles of open science and considering the fact that multilayered structures are increasingly being used as a testing ground for optimization and deep learning approaches. We provide in this paper the theoretical basis at the core of PyMoosh, an overview of its capabilities, as well as a comparison between the different numerical methods implemented in terms of speed and stability. We are convinced such a versatile tool will be useful for the community in many ways.

© 2024 Optica Publishing Group

Full Article  |  PDF Article
More Like This
Illustrated tutorial on global optimization in nanophotonics

Pauline Bennet, Denis Langevin, Chaymae Essoual, Abdourahman Khaireh-Walieh, Olivier Teytaud, Peter Wiecha, and Antoine Moreau
J. Opt. Soc. Am. B 41(2) A126-A145 (2024)

TMM-Fast, a transfer matrix computation package for multilayer thin-film optimization: tutorial

Alexander Luce, Ali Mahdavi, Florian Marquardt, and Heribert Wankerl
J. Opt. Soc. Am. A 39(6) 1007-1013 (2022)

Canonical and Poynting currents in propagation and diffraction of structured light: tutorial

Bohnishikha Ghosh, Anat Daniel, Bernard Gorzkowski, Aleksandr Y. Bekshaev, Radek Lapkiewicz, and Konstantin Y. Bliokh
J. Opt. Soc. Am. B 41(6) 1276-1289 (2024)

Data availability

Data underlying the results presented in this paper are available in [42]. The full code related to this paper is available in [43].

42. A. Moreau, “PyMoosh,” GitHub, 2023, https://github.com/AnMoreau/PyMoosh.

43. A. Moreau, “PyMoosh,” Zenodo, 2023, https://doi.org/10.5281/zenodo.10261964.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (9)

Fig. 1.
Fig. 1. Multilayer structure and definition of important variables. We consider the light coming from the top of the image. ${\epsilon _i}$ and ${\mu _i}$ are, respectively, the permittivity and the permeability of layer $i$. ${A_i}$ (resp. ${B_i}$) are defined as the amplitude of the upward propagating (resp. downward propagating) field in layer $i$, and the ${+}$ (resp. ${-}$) superscript indicates that the field value is taken at the top (resp. bottom) of layer $i$.
Fig. 2.
Fig. 2. Computation time of the $r$ and $t$ coefficients for all methods as a function of the number of layers in a stack, averaged over 500 runs. As exact computation times are heavily influenced by hardware capabilities, it remains important to prioritize the relative comparison between formalisms over these precise times.
Fig. 3.
Fig. 3. (a) Absolute error between S-matrix (considered as our reference) and other formalisms. Transmission coefficient for a quarter-wave stack of materials $n = 1.2$ and $n = 1.5$ as a function of the total number of layers of the stack. (b) Schematic representation of the structure.
Fig. 4.
Fig. 4. (a) Absolute error between the $S$-matrix (considered as our reference) and other formalisms. Transmission coefficient in a frustrated total internal reflection situation for a layer of air of width $D$ between materials of index $n = 1.5$. (b) Schematic representation of the structure.
Fig. 5.
Fig. 5. (a) Absolute error between the $S$-matrix (considered as our reference) and other formalisms. Surface plasmon resonance coupler in the Kretschmann–Raether configuration with a prism of index $n = 1.5$ coupling to air through a silver layer of width $D$. (b) Schematic representation of the structure.
Fig. 6.
Fig. 6. (a) Photon spectral density (photons per wavelength unit) of the AM1.5 visible solar spectrum. (b) Absorptance in the active layers of two different basic solar cells ($S$-matrix). 1 µm of SiA bulk with or without adding a layer of optical index $n = 1.5$ and thickness $\lambda /4n$ with $\lambda = 600\,{\rm nm}$.
Fig. 7.
Fig. 7. Schematic representation of the field values surrounding the source.
Fig. 8.
Fig. 8. (a) Dispersion of the guided modes of a 2000 nm thick slab of dielectric with a refractive index $n = 1.5$ in air, plotted as the effective wavelength of the mode as a function of the wavelength in vacuum in a manner similar to [59]. (b) Corresponding field profiles of the six modes with lowest effective index.
Fig. 9.
Fig. 9. PyMoosh use case examples. (a) and (b) Ellipsometry results $\frac{{{r_p}}}{{{r_s}}} = \tan (\phi){e^{{i\Delta}}}$ for a layer of $n = 1.33$ and width 400 nm on top of a gold substrate. (c) Mode profiles for two coupled waveguides of index $n = 1.5$, width 1.2 µm and separated by 300 nm of air. (d) Bulk 1 µm aSi cell absorbance in two cases. Simple anti-reflective coating (ARC): 100 nm layer of $n = 1.5$ as shown in Fig. 6(b). Complex ARC: optimized six-layer Bragg mirror and impedance matching layers above and below (see notebook). (e) Surface plasmon resonance excitation with a prism in Kretschmann configuration: Prism is made out of BK7 on top of a 55 nm layer of gold illuminated at 45.5° and $\lambda = 600\,{\rm nm}$. (f) Electric field intensity of a current source encased in a layer of width 1 µm and $\epsilon = 1.4 + 0.1i$ at $\lambda = 600\,{\rm nm}$.

Equations (51)

Equations on this page are rendered with MathJax. Learn more.

z 2 E y + ( μ r ϵ r ω 2 c 2 k x 2 ) E y = 0
γ i = μ i ϵ i k 0 2 k x 2 ,
{ E y , i ( z ) = A i + e i γ i ( z z i ) + B i + e i γ i ( z z i ) , E y , i ( z ) = A i e i γ i ( z z i + 1 ) + B i e i γ i ( z z i + 1 ) ,
A i + B i = A i + 1 + + B i + 1 + ,
γ i μ i ( A i B i ) = γ i + 1 μ i ( A i + 1 + B i + 1 + ) .
( A i + 1 + B i + 1 + ) = T i , i + 1 ( A i B i ) = 1 2 ψ i + 1 ( ψ i + ψ i + 1 ψ i ψ i + 1 ψ i ψ i + 1 ψ i + ψ i + 1 ) ( A i B i ) ,
( A i B i ) = C i ( T ) ( A i + B i + ) = ( e i γ i h i 0 0 e i γ i h i ) ( A i + B i + ) ,
( A N + 1 + B N + 1 + ) = T N , N + 1 i = 0 N 1 ( C i ( T ) T i , i + 1 ) ( A 0 B 0 ) .
T = T N , N + 1 i = 0 N 1 ( C i ( T ) T i , i + 1 ) ,
( A i B i + 1 + ) = I i , i + 1 ( B i A i + 1 + ) = 1 ψ i + ψ i + 1 ( ψ i ψ i + 1 2 ψ i + 1 2 ψ i ψ i + 1 ψ i ) ( B i A i + 1 + ) .
( A i + B i ) = C i ( S ) ( B i + A i ) = ( 0 e i γ i h i e i γ i h i 0 ) ( B i + A i ) .
( A B ) = ( U 00 U 01 U 10 U 11 ) ( C D ) , a n d ( D E ) = ( V 00 V 01 V 10 V 11 ) ( B F ) ,
( A E ) = ( S 00 S 01 S 10 S 11 ) ( C F ) .
S = ( U 00 + U 01 V 00 U 10 1 V 00 U 11 U 01 V 01 1 V 00 U 11 U 10 V 10 1 V 00 U 11 V 11 + V 10 U 11 V 01 1 V 00 U 11 ) .
( A 0 B N + 1 + ) = S ( B 0 A N + 1 + ) .
{ E y , i ( z i ) = A i + + B i + , z E y , i ( z i ) = i γ i ( A i + B i + ) , E y , i + 1 ( z i + 1 ) = A i + e i γ i h i + B i + e i γ i h i , z E y , i + 1 ( z i + 1 ) = i γ i ( A i + e i γ i h i B i + e i γ i h i ) .
( E y , i + 1 z E y , i + 1 ) = M i ( E y , i z E y , i ) = ( cos ( γ i h i ) sin ( γ i h i ) γ i γ i sin ( γ i h i ) cos ( γ i h i ) ) ( E y , i z E y , i ) .
E y , N + 1 = t ,
E y , 0 = r + 1 ,
z E y , N + 1 = i γ N + 1 t ,
z E y , 0 = i γ 0 ( r + 1 ) .
( z E y , i z E y , i + 1 ) = N i , i + 1 ( E y , i E y , i + 1 ) = ( γ i cos ( γ i h i ) sin ( γ i h i ) γ i sin ( γ i h i ) γ i sin ( γ i h i ) γ i cos ( γ i h i ) sin ( γ i h i ) ) ( E y , i E y , i + 1 ) .
D i , i + 2 = ( A 00 A 01 A 10 A 11 B 00 A 01 B 01 A 11 B 00 B 10 A 10 A 11 B 00 B 11 + B 10 B 01 A 11 B 00 ) .
δ i = γ i h i = 2 π λ n e f f , i h i ,
( E y , i z E y , i ) = ( cos δ i sin δ i γ i γ i sin δ i cos δ i ) ( E y , i + 1 Z E y , i + 1 ) .
( E y , i E y , i + 1 z E y , i E y , i + 1 ) = ( cos δ i sin δ i γ i γ i sin δ i cos δ i ) ( 1 X i + 1 ) .
X i = X i + 1 γ i tan δ i 1 + X i + 1 γ i tan δ i .
Y i = Y i + 1 i n e f f , i tan δ i 1 i Y i + 1 n e f f , i tan δ i .
r T E = n e f f , 0 Y 0 n e f f , 0 + Y 0 .
r T M = n e f f , 0 ( T M ) Y 0 n e f f , 0 ( T M ) + Y 0 .
( E y , k z E y , k ) = M t o t ( k ) ( E y , 0 z E y , 0 ) = M t o t ( k ) ( r + 1 i ( r 1 ) γ 0 μ 0 ) .
N i =  Re ( i E y , i z E y , i μ 0 γ 0 )
{ U ( 2 i ) = C 0 ( S ) C 1 ( S ) I 12 C 2 ( S ) I i , i + 1 , U ( 2 i + 1 ) = C 0 ( S ) C 1 ( S ) I 12 C 2 ( S ) C i + 1 ( S ) , D ( 2 i ) = C N i ( S ) I N i , N i + 1 C N ( S ) , D ( 2 i + 1 ) = I N i 1 , N i C N i ( S ) C N ( S ) .
( A 0 B i + ) = U ( 2 i ) ( B 0 A i + ) ,
( A i + B N + ) = D ( 2 N 2 i ) ( B i + A N + ) .
( A i + B i + ) = 1 1 U 11 ( 2 i ) D 00 ( 2 N 2 i ) × ( U 10 ( 2 i ) U 11 ( 2 i ) D 01 ( 2 N 2 i ) U 10 ( 2 i ) D 00 ( 2 N 2 i ) D 01 ( 2 N 2 i ) ) ( B 0 A N + ) .
N i =  Re ( γ i μ 0 μ i γ 0 ( A i + B i + ) ( A i + + B i + ) ) ,
j s c = A a c t i v e ( λ ) d I d λ e λ h c d λ ,
E y , i ( x = 0 , z ) = A i e i γ i ( z z i + 1 ) + B i + e i γ i ( z z i ) .
E y , i ( x , z ) = 1 2 π E 0 ( k x ) × ( A i e i γ i ( z z i + 1 ) + B i + e i γ i ( z z i ) ) e i k x x d k x ,
E 0 ( k x ) = w 2 π e w 2 4 ( k x n k 0 sin θ 0 ) 2 e i k x x 0 ,
H x ( x = 0 , z ) = γ i ω μ i ( A i e i γ i ( z z i + 1 ) B i + e i γ i ( z z i ) ) ,
H z ( x = 0 , z ) = k x ω μ i ( A i e i γ i ( z z i + 1 ) + B i + e i γ i ( z z i ) ) ,
2 E y z 2 + 2 E y x 2 + ϵ i μ i k 0 2 E y = i ω μ 0 μ i I δ ( x x s , z ) ,
2 E ~ y z 2 + ( ϵ i μ i k 0 2 k x 2 ) E ~ y = i ω μ 0 μ i I δ ( z ) e i k x x s .
E ~ y , i s ( z ) = A i s + e i γ i s z + B i s + e i γ i s z ;
E ~ y , i s ( z ) = A i s e i γ i s z + B i s e i γ i s z ,
A i s + + B i s + = A i s + B i s ,
A i s + B i s + = A i s B i s i ω μ 0 μ i s γ i s I e i k x x s .
A i s + = i e i k x x s 1 r u + ( 1 + r u ) 1 r d 1 + r d 1 γ ,
B i s = i e i k x x s 1 r d + ( 1 + r d ) 1 r u 1 + r u 1 γ .
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.