I wrote the numerical simulation code for my physics research into the interaction between light and liquid crystals. The method itself is completely new, although it combines two known numerical methods with some additional custom code.
Liquid crystals are optically anisotropic materials, which means they change the polarization of light passing through them. At the same time, strong light beams reorient the molecules in the liquid crystal, which in turn changes their optical properties. In reality, these two processes occur simultaneously, and are mutually coupled, which means that they affect each other in real time. However, computational research typically focuses on one of these two interactions. So I needed to develop and implement a method which handles both effects simultaneously.
The basic idea is simple: Calculate the equilibrium orientation of the liquid crystal, then propagate light through it, then repeat until the result stops changing with each iteration. For both of the two components, I used existing and known numerical methods. Unfortunately, when trying to model comelex structures or large system, each of these two parts can take a very long time, and the combined method repeats each of them multiple times. To achieve acceptable run times, I implemented everything in OpenCL to run on multiple GPUs. The calculations are massively parallel, as each point is larely independent from other points except its nearest neightbors, which particularly suits the GPU architecture. Even with some copying of data to and from the GPU, I was able to achieve an approximately 10x speedup over the CPU version. For large systems, this reduced the comutation time from two weeks to about a day.