Lettuce: PyTorch-based Lattice Boltzmann Framework

The lattice Boltzmann method (LBM) is an efficient simulation technique for computational fluid mechanics and beyond. It is based on a simple stream-and-collide algorithm on Cartesian grids, which is easily compatible with modern machine learning architectures. While it is becoming increasingly clear that deep learning can provide a decisive stimulus for classical simulation techniques, recent studies have not addressed possible connections between machine learning and LBM. Here, we introduce Lettuce, a PyTorch-based LBM code with a threefold aim. Lettuce enables GPU accelerated calculations with minimal source code, facilitates rapid prototyping of LBM models, and enables integrating LBM simulations with PyTorch's deep learning and automatic differentiation facility. As a proof of concept for combining machine learning with the LBM, a neural collision model is developed, trained on a doubly periodic shear layer and then transferred to a different flow, a decaying turbulence. We also exemplify the added benefit of PyTorch's automatic differentiation framework in flow control and optimization. To this end, the spectrum of a forced isotropic turbulence is maintained without further constraining the velocity field. The source code is freely available from https://github.com/lettucecfd/lettuce.

READ FULL TEXT

page 5

page 11

page 12

research
05/25/2017

Lat-Net: Compressing Lattice Boltzmann Flow Simulations using Deep Neural Networks

Computational Fluid Dynamics (CFD) is a hugely important subject with ap...
research
02/08/2019

Macroscopic Lattice Boltzmann Method for Shallow Water Equations (MacLABSWE)

It is well known that there are two integral steps of streaming and coll...
research
07/06/2018

The CodRep Machine Learning on Source Code Competition

CodRep is a machine learning competition on source code data. It is care...
research
05/25/2019

EPCI: A New Tool for Predicting Absolute Permeability from CT images

A new and fast Matlab algorithm for predicting absolute permeability is ...
research
05/17/2023

ACRoBat: Optimizing Auto-batching of Dynamic Deep Learning at Compile Time

Dynamic control flow is an important technique often used to design expr...
research
10/23/2022

Accelerated Linearized Laplace Approximation for Bayesian Deep Learning

Laplace approximation (LA) and its linearized variant (LLA) enable effor...
research
12/12/2019

Automatic Layout Generation with Applications in Machine Learning Engine Evaluation

Machine learning-based lithography hotspot detection has been deeply stu...

Please sign up or login with your details

Forgot password? Click here to reset