What is it about?

When a volcano erupts near a town, like the recent events near Grindavík, Iceland, emergency responders need to know where the lava will go—and they need to know fast. Scientists use computer simulations for this, but the most trusted method, called MrLavaLoba, was incredibly slow. A single simulation could take nearly half an hour to run, making it impossible to get timely answers during a crisis. We created Flowy, a complete, ground-up rewrite of the trusted MrLavaLoba method. By replacing the original slow code with highly efficient algorithms written in modern C++, we achieved a massive performance boost. Flowy produces the exact same accurate results as the original tool but is up to 400 times faster. In our tests, a simulation that took the old tool 23 minutes was completed by Flowy in just 10 seconds.

Featured Image

Why is it important?

The slowness of the old tool was more than an inconvenience; it was a direct risk to safety. A single simulation is not enough for a reliable forecast. Scientists must run thousands of them to account for all possibilities and create a statistically sound hazard map. With the old tool, this was practically impossible during a live eruption, forcing decisions to be made based on dangerously incomplete data. Flowy solves this critical bottleneck. It allows scientists to run huge ensembles of simulations in minutes instead of days. This means that for the first time, they can provide emergency responders with fast, statistically robust, and reliable forecasts during an active crisis. This massive leap in speed directly translates into better-informed, life-saving decisions about evacuations, infrastructure protection, and barrier placement.

Perspectives

When we started this project, we saw that the fundamental statistics needed for reliable forecasting couldn't be gathered with the existing slow tool, posing a direct risk to public safety. Our core belief was that this was a software engineering problem, not a hardware one. Simply throwing more computing power at the inefficient legacy code was a dead-end strategy. This led to a fundamental disagreement on the path forward. When it became clear that a ground-up rewrite in a high-performance language was the only way to solve the problem. We re-implemented the entire method from scratch in modern C++ using more robust algorithms and design paradigms. Flowy is the result. Its performance vindicates that difficult decision, proving that to solve the most critical scientific problems, you cannot let inefficient code hold progress hostage. Sometimes, the only way forward is to build it right yourself.

Rohit Goswami
University of Iceland

Read the Original

This page is a summary of: Flowy: High performance probabilistic lava emplacement prediction, Computer Physics Communications, October 2025, Elsevier,
DOI: 10.1016/j.cpc.2025.109745.
You can read the full text:

Read

Resources

Contributors

The following have contributed to this page