Wimbledon, Numerical methods: Perfectly Matched Layer, and the Ashes

So the summer (or what passes for it in Britain) is here. The only way to tell is that Wimbledon has started and the Ashes are round the corner. Since the lack of sunshine and reasonable summer temperatures are not reliable I find these sport events a more fun way to tell the seasons.

Now the problem is that all I want to do is watch the tennis and then cricket when it starts. How am I supposed to get any work done? Is it really fair to ask a body to be chained to their desk when there is some glorious serve and volley on at SW19?

So here is my compromise: I’ll write a blogpost instead of reading papers or running simulations. My excuse is this is closer to work than the sport and is as enjoyable.

And so, today I want to talk about the Perfectly Matched Layer or PML boundary condition.

The PML boundary was proposed by Berenger in 1990s as a way to terminate meshes in Finite Difference Time Domain (FDTD) method and has since become the most popular boundary condition in numerical methods.  But lets take a step back: what is a boundary condition and why do we need them?

Numerical methods such as FDTD and Finite Element method (FEM) create a mesh of points or nodes that represents the optical structure of interest. In the real world each structure has a finite extent and optical fields in these structures slowly die out once they leave the structure (due to leakage, or as radiation modes etc.). However, with the numerical mesh, when an optical wave hits the edge of the finite mesh (or the numerical boundary) it gets reflected back into the main domain. This reflection is unphysical and contaminates the solution. Hence boundary condition operators are used to suppress such reflections.

The PML is an example of the physical absorber approach in which a layer of an artificial medium is placed adjacent to the boundary to absorb all outgoing waves from the structure of interest. The name PML derives from its properties: the ability to absorb waves incident at any angle and frequency. The concept is that a medium with permittivity matching that of the main computational domain material is placed at the end of the domain. Since the impedance of the two media are identical, there is no reflection at the interface, even for change in angle of incidence.

There are two distinct ways to formulate the PML: the anisotropic medium formulation or uniaxial PML, and the complex coordinate stretching approach. The latter regards the PML as a mapping onto complex coordinates. When the transverse variable is a complex number, the wave travelling in the transverse direction gets attenuated. The PML width and absorption profile are calculated to absorb the field and reduce reflection into the domain to the tolerance required.

Some key things to consider when using PML in simulations is to work out the width of the PML region, how far to keep the PML from the structure of interest, and the profile that describes the PML absorptivity. PML width, it’s distance from the structure and number of mesh points to place inside the PML can usually be optimized by some trial and error, and thereafter experience. For example, I usually keep PML width for passive devices to be 10% of the full window.

The PML absorptivity profile is usually taken as a square dependence, though other profiles may give better performance. In a paper that is what I worked on with my colleagues. We found that PML with sin hyperbolic profiles were more efficient than the usual power law profile.

Have a read and let me know what you think!

Advertisements

What do we know?

Today the Beeb website carried an article on how plants may be using quantum coherence to improve light harvesting in photosynthesis. You can read it here.

So what do we know?

From our understanding of Physics and the conditions we think determine whether an object operates in the classical/quantum regime, it had been assumed that plants could not sustain quantum states. And so the existence of quantum states/behaviour in plants is big deal. The Science article that the Beeb picks up on is of course not the first to delve into this matter. There has been other research in this area, see refs 1-8 in the Science article. Also you may recall that in my post Monday at Laser world of Photonics I had heard a talk by Nick van Hulst on this very topic!

But why should we care?

Well apart from these findings making us question our understanding of the natural world yet again and opening exciting new investigative journeys, there are huge applications for this in photovoltaics (PV). Renewable energy through solar cells has been a massively important for a number of years and still offers great potential for grid parity and satisfying some of our thirst for electricity. Amongst the issues that dog improvement in PV performance, is how we can cut down on the reflection of sunlight from the solar cell surface, and increase the quantum efficiency or conversion of this energy into electricity.

If we can understand how the absorbed sunlight in plants is transferred to a reaction centre with lower loss and in less time than through classical transport, we may be able to mimic such mechanisms in our solar cells. That would hopefully increase efficiency far beyond what we can achieve today.
Now we may well wonder how easy it would be to transfer such a mechanism of quantum energy transport observed in plants to inorganic structures in say Si solar cells? The answer is I don’t know. But its worth finding out!! And, also if it is more feasible to look to recreate this in organic solar cells though they don’t have proteins like the plants!

Either way I think its tremendously exciting.

Numerical methods: what is dispersion?

Its been a while since I posted so feeling a bit rusty… I thought it might be nice to post about some aspects of my area that are not well understood. So, here goes!

Numerical modelling and simulation are well established as valuable tools in the Photonics community (you can see my post Photonics and numerical modelling on the OSA blog and others on my own blog). To use these tools people do not have to be experts, especially with the commercial GUI software packages. For the most part this works well except for cases where nuances that effect the results/device design may not be known to all. 

Numerical dispersion is one such factor that effects all modelling methods. The root cause of numerical dispersion is this: In numerical methods the electric and magnetic fields are approximated in some way which does not exactly match the variation of the actual field. Even by decreasing the spacing between mesh points to zero (basically reaching the continuous limit) the interpolation error is not zero. For example, in the Finite Element (FE) based methods, shape or interpolation functions are used to approximate the field. Since the shape functions (usually polynomials) cannot capture the field variation exactly, the resulting interpolation error (in both the field and the gradient of the field), leads to dispersion. That is, as we vary the direction of propagation of the field, the wavelength/frequency of the wave, and/or the mesh (explained below) the accuracy of the numerical solution (and the numerically computed field) varies.

Additional factors that effect dispersion:

Space discretization: Many numerical methods require some sort of grid/mesh/discretization to represent the physical domain. The device/structure is then defined in this mesh which has both a finite physical extent and finite number of mesh points. It is possible to change the location of (and spacing between) mesh points, thus having a fine or coarse mesh. If mesh is not isotropic, that is, the number of points per unit wavelength that the approximated field encounters is not the same in every direction, it adds to the dispersion. Therefore, arrangement of the mesh is another way to control the dispersion.

Time discretization: for time dependent methods the time stepping scheme also leads to dispersion. However, the contribution of time stepping is to introducing phase lag/error in propagation of fields, which is independent of the direction the waves travel in.

Why should dispersion bother us?

So when using a software package or even our own code, we may not realise how the choice of mesh, FE shape functions etc. is introducing error in our solutions. Waves travelling at different angles (and thus different modes) have different accuracy. There can be error in the velocity of the wave! So device design can be effected especially at the nanoscale where tolerances in device dimension is critical.

Dealing with numerical dispersion: for each method, ways have been devised to reduce dispersion to below tolerable levels. In a recent paper with my colleagues, I discuss the improvements in FE based time domain method to reduce dispersion while also reducing computational costs. You can find it here! I would love to hear your comments!