All Projects → jviquerat → lbm

jviquerat / lbm

Licence: MIT License
A simple full-python 2D lattice-Boltzmann code

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to lbm

jflowsim
Highly interactive, thread-parallel Lattice Boltzmann CFD solver
Stars: ✭ 18 (-28%)
Mutual labels:  lattice-boltzmann, lbm
LUMA
Public-facing repository for the open-source project Lattice-Boltzmann @ The University of Manchester (LUMA).
Stars: ✭ 38 (+52%)
Mutual labels:  lattice-boltzmann, lbm
CaNS
A code for fast, massively-parallel direct numerical simulations (DNS) of canonical flows
Stars: ✭ 144 (+476%)
Mutual labels:  computational-fluid-dynamics
TrainingTracks
Materials for training tracks for continua media - OpenFOAM, vortex method, and other
Stars: ✭ 59 (+136%)
Mutual labels:  computational-fluid-dynamics
CubbyFlow
Voxel-based fluid simulation engine for computer games
Stars: ✭ 215 (+760%)
Mutual labels:  computational-fluid-dynamics
UCNS3D
Unstructured Compressible Navier Stokes 3D code (UCNS3D)
Stars: ✭ 141 (+464%)
Mutual labels:  computational-fluid-dynamics
range3
Range Software - Finite Element Analysis
Stars: ✭ 31 (+24%)
Mutual labels:  computational-fluid-dynamics
magic
MagIC is a high-performance code that solves the magneto-hydrodynamics equations in rotating spherical shells
Stars: ✭ 67 (+168%)
Mutual labels:  computational-fluid-dynamics
CFD
Basic Computational Fluid Dynamics (CFD) schemes implemented in FORTRAN using Finite-Volume and Finite-Difference Methods. Sample simulations and figures are provided.
Stars: ✭ 89 (+256%)
Mutual labels:  computational-fluid-dynamics
exadg
ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
Stars: ✭ 62 (+148%)
Mutual labels:  computational-fluid-dynamics
hybridCentralSolvers
United collection of hybrid Central solvers - one-phase, two-phase and multicomponent versions
Stars: ✭ 42 (+68%)
Mutual labels:  computational-fluid-dynamics
Shizuku
Real time simulation and rendering of free surface fluid
Stars: ✭ 22 (-12%)
Mutual labels:  lbm
PetIBM
PetIBM - toolbox and applications of the immersed-boundary method on distributed-memory architectures
Stars: ✭ 80 (+220%)
Mutual labels:  computational-fluid-dynamics
sph opengl
SPH simulation in OpenGL compute shader.
Stars: ✭ 57 (+128%)
Mutual labels:  computational-fluid-dynamics
lettuce
Computational Fluid Dynamics based on PyTorch and the Lattice Boltzmann Method
Stars: ✭ 74 (+196%)
Mutual labels:  lattice-boltzmann
opensbli
A framework for the automated derivation and parallel execution of finite difference solvers on a range of computer architectures.
Stars: ✭ 56 (+124%)
Mutual labels:  computational-fluid-dynamics
PyVLM
Vortex Lattice Method library written in Python
Stars: ✭ 33 (+32%)
Mutual labels:  computational-fluid-dynamics
HAMeRS
Hydrodynamics Adaptive Mesh Refinement Simulator (HAMeRS) for compressible multi-species/multi-phase simulations
Stars: ✭ 43 (+72%)
Mutual labels:  computational-fluid-dynamics
hemelb
A high performance parallel lattice-Boltzmann code for large scale fluid flow in complex geometries
Stars: ✭ 13 (-48%)
Mutual labels:  lattice-boltzmann
shallow-water
Python model solving the shallow water equations (linear momentum, nonlinear continuity)
Stars: ✭ 78 (+212%)
Mutual labels:  computational-fluid-dynamics

lbm

master badge

A simple lattice-Boltzmann code for 2D flow resolutions.

Contents

This LBM code includes:

  • D2Q9 lattice
  • TRT collision operator
  • Zou-He on all boundary conditions
  • Drag/lift computation using interpolated bounce-back
  • Core routines are deferred to Numba

Running simulations

Cases are described in the lbm/src/app/ repository. To run a simulation, adjust the parameters in the related python file, then run python3 start.py <app_name>. A results folder will be generated in ./results/ with the current date and time. If you wish to add a new application, you must create a new app, and register it in the factory, located in lbm/src/app/app.py. Below are some examples and benchmarks that were ran with the code. The related cases are available in the repository. The computational times are obtained on a standard laptop.

Benchmarks

Lid-driven cavity

A simple driven cavity in unit square. Below are the computed time-domain velocity norms at Re=100 (left) and Re=1000 (right).

A comparison of u = f(y) and v = f(x) at the center of the domain with reference data from "U. Ghia, K. N. Ghia, C. T. Shin, High-Re solutions for incompressible flow using Navier-Stokes equations and multigrid method".

Turek benchmark

The Turek cylinder benchmark CFD case is described in "Schafer, M., Turek, S. Benchmark Computations of Laminar Flow Around a Cylinder". Here, we explore the accuracy of the drag and lift computation (using IBB). Note that for the 2D-2 case, the values correspond to the max drag and lift.

ny 2D-1 (Re=20) Cd, Cl, CPU 2D-2 (Re=100) Cd, Cl, CPU
Turek --- 5.5800 - 0.0107 - N/A 3.2300 - 1.0000 - N/A
lbm 100 5.7111 - 0.0285 - 236 s. 3.5409 - 1.0696 - 518 s.
lbm 200 5.6250 - 0.0212 - 1367 s. 3.2959 - 1.0253 - 2762 s.

Below is a video of the 2D-2 case:

Applications

Array of obstacles

An array of square obstacles at Re=2000, with ny=200. This computation took approx 20 minutes on my laptop, although the accuracy here is questionable.

Double step in channel

Two steps in a channel at Re=500, with ny=150. This computation took approx 15 minutes on my laptop.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].