New method cracks simulation of foam formation

Whether on top of a cappuccino or in the wake of waterfalls, foam is omnipresent. Until now, simulating foams realistically with a supercomputer has been almost impossible, but a method further developed by the research group of ETH and Harvard professor Petros Koumoutsakos has overcome the hurdles.
Realistic simulation of a foaming waterfall. (Illustration: ETH Zurich / Harvard University / CSCS)

When enjoying a cappuccino, hardly anyone thinks about how or why the bubbles created in the foamed milk would be simulated with a supercomputer. Nor are coffee lovers likely to be aware that this complex problem has troubled researchers and engineers for years. Until now, it has only been possible to simulate a limited number of a few dozen flowing drops and bubbles, because realistic simulations would be too computationally and cost intensive. However, realistic predictive simulations could greatly facilitate the production of emulsions and foams with desired properties — for example in food or cosmetics production.

Petros Koumoutsakos, Professor of Computational Science at ETH Zurich and Harvard University, together with his PhD student Petr Karnakov and postdoctoral researcher Sergey Litvinov, have taken on this challenge of simulating flowing foams and droplets realistically. Based on an existing method, the researchers have developed an efficient procedure that can simulate foams — from tiny microfluidic devices to roaring waterfalls — including the physical processes that involve bubbles interacting with each other. The newly refined method was presented recently in the journal Science Advances.

Foams are omnipresent

Foams, which consist of countless bubbles that are separated from each other by a fine liquid film, are all around us. They occur even in the smallest amounts of liquids or as a structural element in nature. For example, insects such as spittlebugs embed their eggs in a foam envelope on plant stems and leaves for protection; artificially produced foams are used in medicine to apply pharmaceutical agents to the skin or mucosa; and industrial manufacturers foam plastics to make cleaning sponges or insulation materials.

The classic method to simulate such processes is the so-called volume-of-fluid (VOF) method. For this method, the individual foam bubbles are calculated using a grid. However, this requires a special procedure to prevent two bubbles that are in the same grid cell from being mistakenly regarded as connected. For this purpose, researchers use individual volume fraction fields to calculate the individual bubbles. However, the computational demand involved is proportional to the number of bubbles in the simulation and is therefore already so high — even for small systems consisting of only a few hundred bubbles — that it cannot be solved with today's supercomputer architectures, write the researchers led by Koumoutsakos.

Video: CSCS

Simulation with thousands of bubbles possible

Fortunately, the team’s newly refined method has succeeded in combining several of these volume fraction fields, which means that the number of fields to be calculated remains constant — regardless of the number of bubbles. This means that the cost of the simulation no longer depends on the number of bubbles to be simulated.

The new method — called Multi-VOF — takes into account not just single but multiple layers of volume fraction fields and labels the bubbles with colours to distinguish them. In this way, the researchers reduce the complexity of the calculations. "If I have four partial bubbles in a cell, the rest of the bubbles must be in the neighbouring cells," says Karnakov, first author of the study. "So, we developed an algorithm that can go into other cells and find the remaining parts of the bubbles by comparing green with green, blue with blue, and so on. So instead of millions of colours for each bubble, you only need four." As a result, the new multilayer VOF method overcomes previous obstacles. "The new clever algorithm allows us to perform simulations with industrial relevance using thousands of bubbles," says Koumoutsakos.

Using this method on "Piz Daint", the flagship supercomputer of the Swiss National Supercomputing Centre (CSCS), the researchers succeeded in realistically simulating an unprecedented 20,000 interacting bubbles that do not coalesce. They performed simulations of foam generation in different arrangements and validated them using available experimental data: bubble formation in microfluidic devices, clustering of bubbles floating in water, and bubble formation in a miniature waterfall.

According to the researchers, the new algorithm is easy to implement in existing software, and its efficiency enables extensive studies on the control and optimisation of flows with bubbles. In addition, the new method is compatible with existing methods and captures complex processes such as breakup and coalescence of bubbles without additional effort. The scientists are convinced that the multi-VOF method can be used in the future to realistically simulate a large variety of flows.

This article by Simone Ulmer has been published first on the website of CSCS.

Reference

Karnakov P, Litvinov S, Koumoutsakos P: Computing foaming flows across scales: From breaking waves to microfluidics, Science Advances 2022, published 2 February 2022 doi: 10.1126/sciadv.abm0590