Nonlinear optics and mathematical modeling of the Kerr effect for periodic structures
Advisor: Jon Noble
Internship Location: SLAC National Accelerator Laboratory
Onsite Mentor: Juhao Wu
I develop a mathematical model of light incident on a periodic grating structure that can effectively model the Kerr effect—third order susceptibility effects where the intensity affects the medium's index of refraction. This model has applications in fiber optics, and I’ll expand the model to that beyond just periodic structures. Typically, most structures are rectangular gratings, but I’ll consider structures similar to that of sawtooth or sinusoidal gratings in this research. I’d also like to see if I can find data that can replicate findings for different tuned parameters for my model. This computational model examines the properties of light through time evolution, considering any diffractive/interference effects.
Project Blog
Week 1: Introduction to Optics and the Kerr Effect
Welcome to my blog! For the first few posts, I'll introduce the background and significance of this project before delving into the project itself. Later, I'll discuss the implementation of a computational model.
Background: Optics
Typically, the thought of optics brings up lenses and mirrors, ray tracing, and diffraction—this is but a small subset of a larger field dealing with the intricacies of light! My project primarily deals with the microscopic interactions of light with matter—physical optics. More specifically, how does an electric field affect a material's index of refraction? This is the Kerr Effect that I seek to model. But first, what is an index of refraction and how can we quantify this effect?
In AP Physics 2, the refractive index is first introduced in the context of "slowing down light" and calculations of refracting angles with Snell's Law. Now imagine the following setup: we shine a light through an isolated cube of some translucent substance, for simplicity it's water. If we shine this light at varying points and angles on the cube, we expect symmetrical responses—this is the isotropic nature of the refractive index. Now suppose we apply an external electric field on this cube, the Kerr Effect claims the refractory index becomes anisotropic—symmetry is broken! A light will exhibit different behavior dependent of the propagation direction to the direction of the applied electric field.
So why does this occur? The subatomic reason lies in the polarization of molecules, but that's better suited to a blog of its own. To build up there, I'll introduce the idea of non-linear susceptibilities—non-linear optics. When an electric field is applied to material, its molecules are polarized. This is quantified by a polarization vector whose constant of proportionality to the electric field is the first order susceptibility. Most models suffice with just a linear, first-order term (an idea applicable to most of physics), but the Kerr effect relies on the non-linear, third order term. The weirdness stems from this third-order term!
Significance
My goal is to develop a model of the Kerr effect first for the problem of periodic, crossed gratings before extending it to generalized structures. A model for the Kerr effect can accurately predict responses of light on crystalline/colloidal structures—resolving problems in the field of material science. Over the next few blogs, I'll talk about the cogs of this model. This is not limited to the Fourier Modal Method and hopefully some cool images of the crossed gratings that I'll be modeling. Thanks for reading!
Week 2: Light Scattering
Welcome back to my blog! Today I'll ramble about the theory behind how exactly I plan to program my model. Prepare yourself for the Fourier Modal Method! This method enables us to model periodic gratings incident with light, but first, I'll build up there with the idea of scattering—the interaction of light with matter.
Scattering
Billiard balls on a table, particle collisions: what exactly is scattering? The 8-ball break is a classic example: seemingly chaotic motion of the balls. If we knew every minute detail of the system; sure, we could accurately predict how the billiard balls would move. However, at the length scale of light, we begin dealing with probabilities—uncertainty. This is where the S-matrix method comes in.
When light—an electromagnetic (EM) wave—meets an interface, part of it is transmitted while the rest is reflected. Light also needs to satisfy a set of boundary conditions, given by Maxwell's equations for matter. With a boundary condition, we can calculate values of the reflection and transmission coefficient, quantifying the effect of a medium on light. The compact way to describe a medium is to write it in an S-matrix (scattering matrix), whose elements are the reflection and transmission coefficients.
S-matrix method
Okay, what I described above was very general and mainly used to develop intuition for what the S-matrix actually describes. Additionally, the following only applies to linear medium, but I think a discussion is necessary to understand the general methodology.
Now for a finite single-block structure, we can compute the S-matrix following the general idea above, just with a lot more math (see [1]). With the S-matrix, we can now visualize how an EM wave propagates through a medium through plots of field distribution. For multiple co-linear blocks, we can now utilize an algorithm starting with two blocks, building up to an arbitrary number of blocks.
Fourier Modal Method
The S-matrix method dealt with mediums of constant permeability and permittivity (yes, they're difference and correspond to magnetic and electric fields respectively). FMM now analyzes how light interacts with a material of periodic permeability and permittivity. I think the details of FMM are best left to the next blog, where I'll include illustrations of field distribution. Next up, I'll use the FMM to model light in nonlinear media. Stay tuned!
[1] Hwi, K.; Junghyun, P.; Byoungho, L. Fourier Modal Method and Its Applications in Computational Nanophotonics, 1st ed.; CRC Press, 2017. https://doi.org/10.1201/b11710.
Week 3: Fourier Modal Method
Now it's time to modal! In today's blog, I'll describe a basic model for light through 1D multiblock structures. This involves solving a series of boundary conditions, and a lot of messy math. Following that, I'll briefly cover the extension to 3D structures: this is the Fourier Modal Method (FMM).
Eigenmode Expansion
There are three important cases to consider: the region behind (left/negative), ahead (right/positive), and within the block. It turns out the most general S-matrix is the superposition of left-to-right and right-to-left characterizations. I'll mainly be focusing on the left-to-right characterization, but rest assured, the right-to-left characterization is pretty much the same mathematically (with a couple sign flips). Now consider the singular block below with an isotropic (symmetric) permittivity and permeability tensor. (we'll vary the permittivity and permeability when we analyze FMM, harmonic permittivity and permeability is how we define gratings and what we see in crystalline structures).
U is the incident light vector, and it's described by a polarization angle (orientation) and its incident angle to the block. Now we refer back to Maxwell's equations. I'll spare the lengthy algebra and jump right to the results (Refer to [1] if interested). Ultimately, we find that an internal EM wave has four eigenmodes, each represented by a Bloch plane wave. The internal EM wave is a linear combination of these eigenmodes indexed by g, whose coefficients are described by coupling coefficients, C.
The coupling coefficients are found through matrix manipulation from the boundary conditions.
Boundary Conditions
I've mentioned "boundary conditions" for a while already, but what really are they? Imagine you're holding a taught string on one end. When you jerk your hand, you send a wave pulse, because that's the solution to the string's equation of motion. What happens at the very end of the string? Depending on whether the other end of the string is fixed or allowed to move up and down along a pole, we get a different reflected wave form. In the same way, EM waves must satisfy a boundary condition between the left and right interface of the structure. This allows us to see the full picture! We obtain a transmission, reflection, and coupling coefficient operator from the boundary condition; this allows us to analyze EM wave before, during, and after propagation through the material.
Colinear Blocks
Crystalline structures are usually lattices. To construct a lattice, stack a series of colinear block structures, separated by an infinitesimally small distance. From the method above, we can find individual transmission, reflection, and coupling coefficient operators for each block. Now the problem is to find the effective S-matrix. I'll only describe the method for two interconnected blocks, since the algorithm is pretty much the same for an arbitrary number of blocks.
So, what's the algorithm for two blocks? We need to carefully consider what happens between the two blocks. Consider the figure below.
When U1 is incident on the right block, part of it is transmitted while part of it is reflected back into the direction of U2. Do you see the problem? There's an infinite number of reflections! In computing the effective left-right block operators, we get an infinite series. Luckily, as we'd expect, the series converges (otherwise, we'd have a blowup of energy!) We find the two-block transmission, reflection, and coefficient operators expressed as a function of the single-block operators. The same process applies to an arbitrary number of blocks.
In detailing FMM, permittivity (ε) and permeability (µ) become periodic. I haven't really defined these yet though. Essentially, they're a measure of how well a material responds to an external electric/magnetic field. Now we follow a similar algorithm to compute the S-matrix and the operators.
I think I've pretty much covered the basics of FMM. In the next blog, I'll showcase a rough FMM model. It'll compute the S-matrix, generating visuals of field distributions. Afterwards, it'll be time to attack the nonlinear Kerr effect by expanding FMM. Stay tuned!
Week 4: S4
Welcome back to my blog! Today, I'll be introducing S4: Stanford Stratified Structure Solver.
Since it's been a while, here's a quick recap of last week: FMM. Essentially, FMM calculates an S-matrix after solving for eigenmodes and boundary conditions. S4 implements FMM computationally, allowing for simulations of light through periodic structures [1]. This blog will go over S4's functionality with the following blogs directed towards modifying S4 for nonlinear material if possible.
S4
For now, I'll be using nanohub's S4 tool embedded on their website [2]. First, I'll demonstrate its functionality with a few examples. Nanohub's S4 has a default output of computing the transmission and reflectance flux. The more general implementation of S4 is flexible, allowing for the computation of each mode. However, this modification will be left for another blog.
Example: Air-Water Interface
For the first example, let's look at something simple and testable—an air-water interface.
The diagram above is an air-water interface. Light travels through air and meets a boundary of water. On the left, light is s-polarized (electric field is perpendicular to plane of incidence). On the right, light is p-polarized (electric field is parallel to plane of incidence).
In particular, I'll take a look at Brewster's angle for this interface. If the angle of incidence equals Brester's angle and light is p-polarized, it will perfectly transmit through the interface. Brewster's angle is arctan(n(water)/n(air)) equaling 53 degrees. For p-polarized light, we expect a transmission flux of 1 and reflective flux of 0.
Let's now plug into S4. I use two semi-infinite boundaries, setting water as a material with relative permeability of 1.33^2 = 1.7869. The angle of incidence (phi) is 53 degrees, and the s-polarization is set to 0.
This is what we predicted! S4 accurately computed the transmission and reflective flux for this simple case.
Next blog, I'll continue to present potential examples as I research S4s source code. Since nonlinear optics can be modeled by an "effective linear susceptibility," it's possible that S4 can be modified for the nonlinear regime. This is what I'll spend the next week researching. Look forward to my findings!
[1] Victor Liu and Shanhui Fan, "S4: A free electromagnetic solver for layered periodic structures," Computer Physics Communications 183, 2233-2244 (2012) http://dx.doi.org/10.1016/j.cpc.2012.04.026. 2. Michael Ghebrebrhan, Peter Bermel, Yehuda Avniel, John D. Joannopoulos, Steven G. Johnson, "Global optimization of silicon photovoltaic cell front coatings", Optics Express 17, 7505 (2009).
[2] Jiarui Kang, Xufeng Wang, Peter Bermel, Chang Liu (2014), "S4: Stanford Stratified Structure Solver," https://nanohub.org/resources/s4sim. (DOI: 10.4231/D35T3G11T).
Week 5: Modeling Framework
Welcome back to my blog! Last blog, I used S4 to analyze the transmission and reflection at an air-water interface. I confirmed that S4 matched with what we’d expect from p-polarized light incident at Brewster’s angle. With a general idea of what S4 does, I needed to understand why.
For the past week or so, I’ve been analyzing the S4 framework. S4 is quite flexible, allowing the modeling of diffraction gratings and crystalline structures. I’ll leave that experiment to another blog. For now, let’s just dive right into the documentation.
The Simulation Object
Most of the following information is found on S4 documentation, please refer there for more details [1].
The bulk of functions are run through a Simulation Object. Each simulation object contains information on every layer, its lattice geometry, material, and thickness. S4 offers a very flexible range of possible structures, including periodic patterns. After specifying the geometry, I send an excited plane-wave with a specified polarization through S4, and S4 produces a graph of transmission and reflective flux.
So that’s how to run S4 on the surface level. What really goes on internally? Remember, S4 uses FMM. Generally, the first step is to solve the eigenmode problem followed by a set of linearized Maxwell’s equations for a single layer. This involves solving a series of boundary conditions. Next, S4 continues to solve the other layers with the S-matrix method.
For the purposes of nonlinear optics, I’ll need to eventually figure out the relation between the effective linear susceptibility with a materials permittivity/permeability. For now, this blog will be relatively short as I continue to dig into S4s sourcecode.
[1] Victor Liu and Shanhui Fan, "S4: A free electromagnetic solver for layered periodic structures," Computer Physics Communications 183, 2233-2244 (2012) http://dx.doi.org/10.1016/j.cpc.2012.04.026. 2. Michael Ghebrebrhan, Peter Bermel, Yehuda Avniel, John D. Joannopoulos, Steven G. Johnson, "Global optimization of silicon photovoltaic cell front coatings", Optics Express 17, 7505 (2009).
Week 6: Implementation
Welcome back to my blog! Today, I'll describe the installation process for S4 (and a number of other setbacks). First, let's take a look at S4's dependancies sourced from its main page.
S4 (again)
Refer to [1] for S4s homepage. Immediately, I ran into my first issue. I couldn't run S4s binary package (outdated links/unsupported versions)! For this, I resorted to cloning S4s repo and building from source.
I quickly ran into my next obstacle—a missing 'lua.h' file. It turned out my version of Lua (the language and interpreter for S4) was too recent! You can tell by now S4 is a pretty old program. Installing lua5.2.4 resolved this error.
By now, I prayed things would be smooth sailing. Turns out, S4 threw another error in my face. A function called getAmplitude had an error with one of its parameters. The file with the error 'main_lua.c,' had a daunting amount of 3300+ lines of C, a language I was completely unfamiliar with. Thankfully, GitHub had already encountered this issue. A quick fix resolved all the errors, and S4 successfully compiled! So that documents my journey in implementing S4.
Dependancies
S4 recommends the installation of five packages: OpenBLAS, FFTW3, CHOLMOD, POSIX Threads, and MPI. The latter two were not manually installed for my build. OpenBLAS is a basic linear algebra subprogram that enables speedier operations. FFTW3 reduces fast Fourier transform times by half. CHOLMOD or suite-sparse provides algorithms for sparse matrices, reduces computational time for the Fourier modal method.
My S4 build installed every dependancy. Each could be installed through home-brew, except Lua. As mentioned above, the acceptable versions of Lua were 5.2.x. This required me to build that specific version of Lua directly from source. That concludes the introduction to S4.
In the next blog, I'll describe specific examples within the S4 directory before my modification to nonlinear regimes.
See you next blog!
[1] https://web.stanford.edu/group/fan/S4/
Week 7: Running Examples
Welcome back to my blog! Today I'll began playing around with S4. Recall Week 4, where I demonstrated S4 using an external extension on nano hub [1]. In the previous blog, I successfully built S4 from source, and today I'll present its flexibility with some given examples.
Setting Up
Last blog, I compiled S4; now, I needed to setup some scripts to run. S4 has an easy to understand documentation page [2], requiring a minimal background of Lua. Within my project folder, I created a test folder called "scripts," and within it I created my first script "firstTest.lua". To run this script, I used "% ./S4 ../scripts/firstTest.lua." Soon, I realized I needed a way to interpret the huge columns of numeric data.
I decided to implement a python script that would be capable of handling the data. Using matplotlib, I could generate images of my data. To streamline the process, I saved the printed output to a text file that could be immediately accessed by my Python script. With everything set up, now I can now demonstrate S4.
Examples
Within S4s GitHub, navigating to the "examples" folder reveals finished scripts that resemble already published results. I'll take a look at a single example [3].
Since the code is already provided, I'll just demonstrate S4s functionality without getting too technical.
For Liu (2009), I'll run fig3c.lua and fig3d.lua. For the former, I copied and pasted the contents into firstTest.lua and ran the command "%./S4 ../scripts/firstTest.lua > /Users/aliu3203/PyCharmMiscProject/data.txt." The code is already fully commented, so I won't be going over each line. The plot of fig3c and fig3d generated by S4 looks like this.
Referring to the paper, only fig3c seems to *kind of* resemble its original counterpart. It replicates the peak and valley behavior at around the same values of frequency. However, fig3d appears to be a little off. There's a periodic pattern which is nice, but it isn't the same as the paper.
Next blog, I'll construct my own examples, and afterwards, I'll attempt to construct a structure that behaves nonlinearly.
[1] Jiarui Kang, Xufeng Wang, Peter Bermel, Chang Liu (2014), "S4: Stanford Stratified Structure Solver," https://nanohub.org/resources/s4sim. (DOI: 10.4231/D35T3G11T).
[2] Victor Liu and Shanhui Fan, "S4: A free electromagnetic solver for layered periodic structures," Computer Physics Communications 183, 2233-2244 (2012) http://dx.doi.org/10.1016/j.cpc.2012.04.026. 2. Michael Ghebrebrhan, Peter Bermel, Yehuda Avniel, John D. Joannopoulos, Steven G. Johnson, "Global optimization of silicon photovoltaic cell front coatings", Optics Express 17, 7505 (2009).
[3] Victor Liu, Michelle Povinelli, and Shanhui Fan, "Resonance-enhanced optical forces between coupled photonic crystal slabs," Opt. Express 17, 21897-21909 (2009)
Week 8: Nonlinearity
Welcome back to my blog! Previously, I used S4 to replicate a photonic slab structure with relative success. Today, I'll return to the idea of nonlinear optics
Introducing Nonlinearity
Consider your everyday atomic structure. After applying an electric field, there'll be an induced polarization, quantified by the "polarization vector" P. Normally, this quantity is directly proportional or linear to the magnitude of applied electric field. A stronger electric field will induce a stronger dipole, which is proportional to the polarization vector. In nonlinear optics, this gives the constitutive relation of:
The "exponents" of the chi terms actually denote an index, not an exponent. These are the susceptibility tensors. Linear optics considers only the chi (1) term; all higher order terms are eliminated. This is the region of geometric optics, ray tracing, and the sort. Nonlinear optics considers the higher order chi terms. For example, second harmonic generation occurs after including second order terms. The Kerr effect occurs after including the third order terms.
Kerr Effect
The Kerr effect states the index of refraction grows linearly with the intensity of light.
According to [1], third order effects can be modeled by an effective linear permittivity tensor. With this simplification, it suffices to run linear FMM. This will be exactly what I'll try to do in the next blog. See you then!
[1] Subhajit Bej, Jani Tervo, Yuri P. Svirko, and Jari Turunen, "Modeling the optical Kerr effect in periodic structures by the linear Fourier modal method," J. Opt. Soc. Am. B 31, 2371-2378 (2014)
Week 9: Introducing a Model
Welcome back! In this blog, I attempt to introduce nonlinearity into the grating described by Bonod et al. [1]
The Structure
The following is replica of the image used in [1].
Here we're modeling gratings that stretch off to infinity in both directions. The distance between the gratings is 1000 nm, with each grating modeled by a rectangle of height 494 nm that extends into the page. There are three materials in play here: the vacuum, substrate, and groove material. These materials are described by the permittivity, each subscripted with the letter 0, s, and g respectively. Each of these values can be found in [1]. There are three regions: a semi-infinite layer of vacuum, a layer of groove material with thickness 494 nm, and a semi-infinite bottom layer of substrate material. The groove layer contains the rectangles made of substrate material. We use p-polarized light (refer to Week 4 for definition of p-polarization).
In the next blog, I'll demonstrate how I used S4 to construct this system and how the results compared with those on the paper. Look forward to it!
[1] N. Bonod, E. Popov, M. Nevière. Fourier factorization of nonlinear Maxwell equations in periodic media: application to the optical Kerr effect. Optics Communications, 2005, 244, pp.389-398. ⟨hal-00015523⟩
Week 10: Results and Conclusions from S4
Welcome back to my final blog! Today I'll present the code I used to replicate results from the graph from Bonod et al. [1].
The Script
S4 uses a lua script to run the model. In this section, I'll go over what every line of my script does. Refer to Week 9 or [1] for the model.
Line 1 creates the simulation object, defining the lattice distance (distance between grooves) as 1000. The BasisSize refers to the number of Fourier expansions S4 will perform.
Lines 4-6 define the materials and their corresponding permittivities. The left number and right numbers are the real and imaginary components respectively.
Lines 8-12 add each of the layers, with names "Above," "Middle," and "Bottom." Line 10 defines the rectangular grating made of substrate material within the "Middle" layer. The second argument of this function corresponds with the thickness of this layer with 0 as the semi-infinite layer.
Line 15 sets the initial incident light wave. Both incident angles are zero, since the light is normal to the substrate plane. We are solely looking at p-polarized light, so the p-polarized amplitude is normalized to 1.
These lines run the model through different values of wavelength, calculating a 0th order diffraction efficiency (defined as the reflected power over incident power).
Plotting the printed columns of wavelength vs diffraction efficiency gives us the following,
This matches the same resonance behavior as in [1], but not so much the values of efficiency. My theory is that the function called did not return the same reflected power flux as [1] calculated. However, it's promising that they produced the same resonance behavior using the effective permittivity values.
[1] N. Bonod, E. Popov, M. Nevière. Fourier factorization of nonlinear Maxwell equations in periodic media: application to the optical Kerr effect. Optics Communications, 2005, 244, pp.389-398. ⟨hal-00015523⟩