Coupling an MD and a CFD package to enable multi-scale simulations of boiling

4 June 2024

Embedded CSE (eCSE) support provides funding to the ARCHER2 user community to develop software in a sustainable manner to run on this UK National HPC system and also to prepare for a future Exascale successor. Here Gavin Pringle describes an eCSE project he recently worked on.

Last year we had a successful collaboration within an ARCHER2 embedded CSE programme, between myself, Mirco Magnini and Gabriele Gennari (University of Nottingham), and Edward Smith (Brunel University London).

The work was entitled “Hybrid Atomistic–Continuum Simulations of Boiling Across Scales”, which related to the simulation of boiling water; however, as you may imagine, the associated processes are more complex than the term “boiling water” might suggest.

Bubbles in boiling water don't appear at random but are actually more likely to appear at tiny imperfections on the container's surface, and simulations of so-called nucleate boiling are useful in many areas of science and engineering. These areas include power plants, where steam spins turbines to generate electricity; water treatment plants, where boiling kills bacteria; and electronics cooling, where a particular liquid can boil thereby removing heat from electronics.

A full molecular dynamics (MD) simulation of nucleate boiling is expensive. In this project we therefore replaced an MD simulation of the body of the fluid, where the bubbles have started to migrate away from the heated surface, with a continuum Navier-Stokes solver to capture the bulk flow effects. With this in mind, we coupled the MD package LAMMPS with the CFD package OpenFOAM (v2106) using the coupling library CPL Library.

Outcomes

This eCSE project generated two significant outcomes. The first is the general availability, for all ARCHER2 users, of the resultant coupled applications plus the coupler library itself. Last year we gave a tutorial on how to use the package on ARCHER2, along with the science behind it, and both the video and slides are available online [1].

The numerical framework developed in this work, together with installation, use, and tutorial guides (also including the setup files utilised to perform the simulations whose results are presented in this article), are publicly available on Github [2]. 

Finally, follow this link to watch a video showing the growth of the bubble via the density field obtained for MD only (on the right-hand side) and coupled MD-CFD simulation (on the left-hand side). The hybrid simulation is run with 𝑇𝑠𝑎𝑡=0.9 and 𝛾=0.2.
https://edin.ac/4bzzDJR

ARCHER2 

The ARCHER2 Service is a world-class advanced computing resource for UK researchers. ARCHER2 is provided by UKRI, EPCC, the University of Edinburgh and Cray, a Hewlett Packard Enterprise company.

Links

[1] https://www.archer2.ac.uk/training/courses/230719-openfoam-lammps-vt
[2]https://github.com/Crompulence/CPL_APP_OPENFOAM
[3] https://www.sciencedirect.com/science/article/pii/S1290072924000760

ARCHER2 website: https://www.archer2.ac.uk

Author

Dr Gavin J Pringle
Dr Gavin Pringle