Making waves: TPLS code released as Open Source
Posted: 10 Jun 2013 | 12:26
TPLS (Two-Phase Level Set) is a Computational Fluid Dynamics code developed by Dr Prash Valluri of the University of Edinburgh's School of Engineering and Dr Lennon Ó Náraigh of University College Dublin. It simulates the interface between two fluid phases, a phenomenon with a number of industrial applications including oil and gas hydrate transport, cleaning processes, distillation/absorption, and evaporative cooling of microelectronics.
To do this, an ultra-high 3D Direct Numerical Simulation approach is used combined with the Level-Set method for tracking the developing interface between the phases. Simulations of this sort are highly computationally intensive, so HPC resources such as HECToR are required. TPLS employs a 2D MPI process decomposition coupled with a hybrid OpenMP parallelisation scheme to allow scaling to 1000s of CPU cores. The image on the right shows the detailed interface structure from a high flow-rate simulation showing both linear and non-linear features including 'pinch-off' of droplets.
Prash and I began collaborating after our success at the Heriot-Watt Crucible III research proposal competition, and since May 2012 have successfully applied for funding from the HECToR dCSE scheme and EPSRC to improve the performance and scalability of the code. The development work has been carried out since July 2012 by Dr David Scott of EPCC, and we have been able to achieve speedups of over 50% in the pressure solver (the most expensive part of the code) by replacing the bespoke Jacobi/SOR solver with Krylov Subspace methods from the PETSc library, and by optimising the existing use of MPI and OpenMP in the code.
To allow other research groups to benefit from our research and code development, we have just released the TPLS code on Sourceforge under the Open-Source BSD License. We are continuing to add new functionality into the code - the Diffuse Interface Method (DIM) to allow simulations of solid/liquid as well as liquid/liquid systems - and a parallel I/O scheme to overcome the bottleneck caused by the existing serial I/O approach when scaling up to larger simulations. These new features will also be added to the public release, and we hope that others will begin to make use of the code and ultimately contribute to future developments of TPLS.