Week 4: S4
April 4, 2025
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).
Leave a Reply
You must be logged in to post a comment.