Speedup of software for ship design
Software for ship design
Marin is a globally acknowledged top institute for hydrodynamic and nautical research. It aims to make ships cleaner, faster and safer. Its research facilities and tools are well known both in the Netherlands and abroad. The most striking are probably the basins, where scale models of ships and offshore structures can be tested. Less visible, but certainly as important, is the software that Marin develops and uses.
One of the most important software packages is ReFRESCO. It is central to many of the simulations that are needed to design a ship. In essence, it calculates the ship’s movement in complex flow situations. The code is based on the Navier-Stokes equations with many additional equations for things like turbulence. ReFRESCO is a multiphase code: it not only computes the water flow but also models the bubbles in the flow. In short: it models all the processes that occur around a ship and its propulsion.
Obviously, these models lead to very long computing times. Therefore, the code has been parallelised and is mostly run on a serious computational cluster. Even so, there is a constant need for additional speedup. The fact that new functionality is constantly added doesn’t help either, sometimes also reducing the effectiveness of the parallelisation. VORtechs knowledge and experience have shown to be very helpful to speed up ReFRESCO.
Often, VORtech guarantees a speedup by at least a factor of two without ever having seen the code; we almost always find optimization potential in a computational code. But ReFRESCO was already optimized by very capable people. So, in this case it was a challenge to come up with further improvements.
Fortunately, after a first analysis, we did find room for improvement. VORtech employees Bas van ‘t Hof and Werner Kramer did a fairly complete study of the current performance and the bottlenecks in just a few weeks. Bas: “we used our own tools to analyse the performance of the code. These provide far more insight than standard analysis tools. This quickly gave us a good picture of the potential improvements.” Our suggestions were delivered in the form of a report. VORtech being VORtech, we also included some recommendations to improve the code management. In this case, we only had a few comments as things were already quite properly organised. We have often seen far worse.
Based on the report, Marin asked VORtech to implement a first batch of improvements. And the results are convincing. Major parts of the code got faster by a factor of two. To achieve this, we did both improvements on the programming and used more efficient algorithms. But Bas van ‘t Hof still sees more potential: “we have made proposals for further optimization, so if Marin wants, we can certainly get more out of it.”