Hybrid Atomistic-Continuum Simulations of Boiling Across Scales

ARCHER2-eCSE06-01


image

**Figure 1:** Coupled simulation of pool boiling of Argon; the left-hand side displays the CS density field, the right-hand side the MD density field. The unit length is 0.34nm; a MD density of 0.7 corresponds to 1160 kg/m3.

Many fluidic processes in science and engineering are underpinned by the two-way interactions between the physics happening at the micro-scale and the boundary conditions set by the outer system.

One such example is the flow of a fluid over a rough surface, where the bulk fluid motion is set by an external force while the microscale surface topography determines the local shear stress; another is boiling over typical metallic surfaces, where the boiling dynamics depend on near-surface molecular interactions that trigger nucleation, but also on external forces such as buoyancy and drag/lift forces determining the thickness of thermal boundary layers and the bubble detachment and departure from the heated surface.

Multiscale problems such as these are very difficult to study at a fundamental level due to the separation of scales. In this eCSE project, we have coupled two popular open-source simulation codes – LAMMPS for Molecular Dynamics (MD) and OpenFOAM for continuum-scale computational fluid dynamics (CFD) simulations – into a domain decomposition framework where MD resolves the near-wall region where molecular interactions are important and CFD resolves the bulk flow.

To showcase the capabilities of the coupled framework, we have studied two traditional benchmark cases, a Couette flow and a pool boiling case. Although our focus is on two-phase fluid dynamics processes, the coupling and the software base can be applied to study many diverse multiscale problems, for example near-wall turbulence in fluid mechanics, droplet nucleation in cooling processes, the wear of interacting surfaces in tribology.

Work carried out. The main aim of the project was to enable LAMMPS and OpenFOAM to run concurrently with a single job submission in ARCHER2, while each software code sends and receives information from its counterparts. For example, LAMMPS must run for a pre-defined number of time steps and then receive CFD data to update constraints on the MD forces; on the other hand, at every CFD time step OpenFOAM must receive updated boundary conditions opportunely averaged in time and space from LAMMPS. The coupling is achieved by using Dr Edward Smith’s CPLibrary [1].

The CPLibrary and all associated application codes (LAMMPS, OpenFOAM) are accessible to all ARCHER2 users via centrally installed third-party modules; note that the modules utilise versions of OpenFOAM (ESI-v2106) and LAMMPS already available on ARCHER2. The associated modules will be maintained by Edward Smith and Gavin Pringle, with instructions in the hpc-uk github. Detailed instructions on how to employ these modules can be found in Ref. [2]. Figure 1 below shows an example of an MD-CFD simulation of a nucleating bubble performed with the coupled software and available on the GitHub repository at Ref. [3]. The bubble nucleates in the MD domain and is then passed to the CFD domain; the results will be included in a manuscript that is being prepared for submission in a peer-reviewed journal [4].

References:

  • [1] E. R. Smith et al., CPL library - A minimal framework for coupled particle and continuum simulation, Comput. Phys. Commun. 250 (2020) 107068.
  • [2] Running on ARCHER2.
  • [3] CPL_APP_OPENFOAM
  • [4] G. Gennari, E. R. Smith, G. J. Pringle, Coupled atomistic-continuum simulations of nucleate boiling, Int. J. Therm. Sci. 200 (2024) 108954

Information about the code

The CPLibrary and all associated application codes are accessible to all ARCHER2 users via centrally installed third-party modules. The associated modules will be maintained by Edward Smith and Gavin Pringle, with instructions in the hpc-uk github.

Detailed instructions on how to employ these modules can be found via: https://www.cpl-library.org/docs/Running_on_ARCHER2.pdf. Moreover, this document also details how expert users can install their own CPLibrary, along with their own extended versions of both LAMMPS and OpenFOAM, to create their own coupled CFD/MD simulations.

OpenFOAM and LAMMPS may be coupled using either shared or distinct MPI Communicators on ARCHER2. The project website (www.cpl-library.org) along with Github pages (https://github.com/Crompulence) are also available for users to build the code locally or run in Docker containers.

Technical Report

Download as PDF

DOI

https://doi.org/10.5281/zenodo.10148718

Related publication: Coupled atomistic–continuum simulations of nucleate boiling, Gabriele Gennari, Edward R. Smith, Gavin J. Pringle, Mirco Magnini, International Journal of Thermal Sciences, Volume 200, 2024, 108954, ISSN 1290-0729
DOI