The properties of multicomponent fluids are governed by the interplay of phase behavior, fluid dynamics, and interfacial thermodynamics. A mixture formulation that leverages this interplay is an important aspect in many fabrication processes based on emulsion templating. The lattice Boltzmann method (LBM) has become a popular approach for simulating hydrodynamic effects in complex fluids and soft matter. Here we present an implementation of a ternary lattice Boltzmann model that allows to simulate a mixture of three immiscible fluids. We build on the LATBOLTZ extension of the open-source package LAMMPS and implement a ternary free energy model recently introduced by Semprebon et al. [Phys. Rev. E 93, 033305 (2016)]. We validate the static and dynamic properties by simulating liquid lenses, double emulsions, and ternary mixtures. From the simulations, we obtain the complete morphology diagram of the ternary mixture in composition space. We further discuss an application of the method to phase segregation of ternary films. The implementation of the ternary LBM in LAMMPS opens vast opportunities for mesoscale simulations of interfacial phenomena and non-equilibrium transport processes in multicomponent fluid mixtures.
more »
« less
A concise python implementation of the lattice Boltzmann method on HPC for geo-fluid flow
SUMMARY The lattice Boltzmann method (LBM) is a method to simulate fluid dynamics based on modelling distributions of particles moving and colliding on a lattice. The Python scripting language provides a clean programming paradigm to develop codes based on the LBM, however in order to reach performance comparable to compiled languages, it needs to be carefully implemented, maximizing its vectorized tools, mostly integrated in the NumPy module. We present here the details of a Python implementation of a concise LBM code, with the purpose of offering a pedagogical tool for students and professionals in the geosciences who are approaching this technique for the first time. The first half of the paper focuses on how to vectorize a 2-D LBM code and show how if carefully done, this allows performance close to a compiled code. In the second part of the paper, we use the vectorization described earlier to naturally write a parallel implementation using MPI and test both weak and hard scaling up to 1280 cores. One benchmark, Poiseuille flow and two applications, one on sound wave propagation and another on fluid-flow through a simplified model of a rock matrix are finally shown.
more »
« less
- Award ID(s):
- 1918126
- PAR ID:
- 10253868
- Date Published:
- Journal Name:
- Geophysical Journal International
- Volume:
- 220
- Issue:
- 1
- ISSN:
- 0956-540X
- Page Range / eLocation ID:
- 682 to 702
- Format(s):
- Medium: X
- Sponsoring Org:
- National Science Foundation
More Like this
-
-
Scour of rock in unlined rock spillway channels is a critical issue facing many of the world’s dams. From a modeling point of view this poses a challenging and interesting problem that combines rock mechanics and hydraulics of turbulent flow. We analyze this interaction between the blocky rock mass and water by directly modeling the solid and fluid phases—the individual polyhedral blocks are modeled using the Discrete Element Method (DEM) while the water is modeled using the Lattice Boltzmann Method (LBM). The LBM mesh is entirely independent of the DEM discretization, making it possible to refine the LBM mesh such that transient and varied fluid pressures acting of the rock surface are directly modeled. This provides the capability to investigate the effect of water pressure inside the fractured rock mass, along potential sliding planes, and can be extended to rock falls and slides into standing bodies of water such as lakes and reservoirs. Herein we present preliminary results to demonstrate the capabilities of the methodology.more » « less
-
Abstract Fish adaption behaviors in complex environments are of great importance in improving the performance of underwater vehicles. This work presents a numerical study of the adaption behaviors of self-propelled fish in complex environments by developing a numerical framework of deep learning and immersed boundary–lattice Boltzmann method (IB–LBM). In this framework, the fish swimming in a viscous incompressible flow is simulated with an IB–LBM which is validated by conducting two benchmark problems including a uniform flow over a stationary cylinder and a self-propelled anguilliform swimming in a quiescent flow. Furthermore, a deep recurrent Q-network (DRQN) is incorporated with the IB–LBM to train the fish model to adapt its motion to optimally achieve a specific task, such as prey capture, rheotaxis and Kármán gaiting. Compared to existing learning models for fish, this work incorporates the fish position, velocity and acceleration into the state space in the DRQN; and it considers the amplitude and frequency action spaces as well as the historical effects. This framework makes use of the high computational efficiency of the IB–LBM which is of crucial importance for the effective coupling with learning algorithms. Applications of the proposed numerical framework in point-to-point swimming in quiescent flow and position holding both in a uniform stream and a Kármán vortex street demonstrate the strategies used to adapt to different situations.more » « less
-
Exploratory graph analytics helps maximize the informational value for a graph. However, the increasing graph size makes it impossible for existing popular exploratory data analysis tools to handle dozens-of-terabytes or even larger data sets in the memory of a common laptop/personal computer. Arkouda is a framework under early-development that brings together the productivity of Python at the user side with the high-performance of Chapel at the server side. In this paper, the preliminary work on overcoming the memory limit and high performance computing coding roadblock for high level Python users to perform large graph analysis is presented. A simple and succinct graph data structure design and implementation at both the Python front-end and the Chapel back-end in the Arkouda framework are provided. A typical graph algorithm, Breadth-First Search (BFS), is used to show how we can use Chapel to develop high performance parallel graph algorithm productively. Two Chapel based parallel Breadth-First Search (BFS) algorithms, one high level version and one corresponding low level version, have been implemented in Arkouda to support analyzing large graphs. Multiple graph benchmarks are used to evaluate the performance of the provided graph algorithms. Experimental results show that we can optimize the performance by tuning the selection of different Chapel high level data structures and parallel constructs. Our code is open source and available from GitHub (https://github.com/Bader-Research/arkouda).more » « less
-
Exploratory graph analytics helps maximize the informational value from a graph. However, the increasing graph size makes it impossible for existing popular exploratory data analysis tools to handle dozens-of-terabytes or even larger data sets in the memory of a common laptop/personal computer. Arkouda is a framework under early-development that brings together the productivity of Python at the user side with the high-performance of Chapel at the server side. In this paper, we present preliminary work on overcoming the memory limit and high performance computing coding roadblock for high level Python users to perform large graph analysis. A simple and succinct graph data structure design and implementation at both the Python front-end and the Chapel back-end in the Arkouda framework are provided. A typical graph algorithm, Breadth-First Search (BFS), is used to show how we can use Chapel to develop high performance parallel graph algorithm productively. Two Chapel-based parallel Breadth-First Search (BFS) algorithms, one high level version and one corresponding low level version, have been implemented in Arkouda to support analyzing large graphs. Multiple graph benchmarks are used to evaluate the performance of the provided graph algorithms. Ex- perimental results show that we can optimize the performance by tuning the selection of different Chapel high level data structures and parallel constructs. Our code is open source and available from GitHub (https://github.com/Bader-Research/arkouda).more » « less
An official website of the United States government

