Looking for literature explaining the implementation of simulation software (plus if its about Lattice Boltzmann Methods)

Hello,

I’m currently working at my master thesis and I implement a Lattice Boltzmann Method for Solids. The project I’m working on is already in an advanced state and my main task is to parallelise the necessary calculations (Which is usually quite straight forward for LBM). At the moment I struggle quite a lot with the architecture design of the software. In the past for simpler problems I usually came up with my own ides which weren’t ideal by any means but worked. In this project I want to program it more efficiently so I need to do some research about proper software design.

So my question would me if you know any literature about (object oriented) software design specifically for engineering related problems. In general I always found a lot of good books about numerical procedures explaining the foundational principles. Furhtermore, there are a lot of good physics books explaining the physical concepts (FEM, LBM etc.). However, I need some advice on the implementation especially if it get’s more complicated than just a regular, rectangular mesh.

Would really appreciate if anyone got some experience or ideas.

TLDR: I’m looking for books/literature explaining the implementation part of mechanical problems instead of just the physics.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/CrownUpKid
πŸ“…︎ Oct 21 2021
🚨︎ report
Lattice Boltzmann Method on a Sphere?

I recently learned of the incredibly powerful Lattice Boltzmann Method and how easy it is to write an implementation in something like Python or C# (see https://medium.com/swlh/create-your-own-lattice-boltzmann-simulation-with-python-8759e8b53b1c) and I was wandering if anybody knows how this could be extended to flows on the surface of a sphere? The idea being to implement a dry dynamical core circulation model. How would you represent the grid, a cube sphere, polar coordinates, modified equations?

πŸ‘︎ 8
πŸ’¬︎
πŸ“…︎ Sep 02 2021
🚨︎ report
Fluid Simulation with Lattice Boltzmann Method

Karman Vortex. A symmetric flow passing a circular object.

LBM is a method to simulate fluids and it is really easy to implement it in Python.

https://github.com/goktug97/LatticeBoltzmannSimulation

Call it with

PYTHONPATH="$(pwd)/:$PYTHONPATH" python3 simulations/karman_vortex.py  --text Python

and it will simulate a fluid around "Python" text

πŸ‘︎ 28
πŸ’¬︎
πŸ‘€︎ u/goktugkt
πŸ“…︎ Aug 18 2021
🚨︎ report
Cubed Sphere Curvilinear Lattice Boltzmann Method, how to stitch faces together?

Having found a number of papers on the curvilinear Lattice Boltzmann Method, such as

https://www.sciencedirect.com/science/article/abs/pii/S0045793014001066?via%3Dihub

I’ve been trying to apply the maths to curvilinear cubed sphere grids such as those described by

https://iopscience.iop.org/article/10.1088/1755-1315/19/1/012012/pdf

Ignoring the elliptic method as it requires an iterative solution, I would like to use the Equiangular Gnomonic mapping, but this is defined per face rather than for the inscribed cube as a whole so there would be seams between each face.

This means the metric for the curvilinear transformation would be piecewise, but symmetrical. As the curvilinear derivatives are solved with finite difference before the LBE is run the maths should be fine for each individual face, but I’m not sure how to stitch the faces together when running the LBE.

I’ll write the code in Python when I get round to it, but would each face have its own set of np arrays? How would I connect them for flow between faces? Could I fit into 1 array somehow?

Any help is appreciated.

P.S. I have a copy of β€œThe Lattice Boltzmann Method: Principles and Practice” so I can refer to that for anything regarding the standard Cartesian LBM.

πŸ‘︎ 5
πŸ’¬︎
πŸ“…︎ Sep 11 2021
🚨︎ report
Lattice-Boltzmann Method

I want learn all about lattice Boltzmann methods, but irony is I am not from fluid mechanics background. So can anyone suggest me what course of learning should I follow ?

Perhaps suggest me a textbook that takes me through the basics of fluid mechanics to fluid dynamics to CFD and finally I would have enough background to start with lattice-Boltzmann method.

I have around 2.5 months for this.

Any help would be appreciated. Thanks.

πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/curious_994
πŸ“…︎ May 24 2021
🚨︎ report
Experiments with LBM (Lattice Boltzmann method) to modeling gas planet, some border highlighting and general corner problem v.redd.it/456m8zb19rb61
πŸ‘︎ 237
πŸ’¬︎
πŸ‘€︎ u/DigitCell
πŸ“…︎ Jan 16 2021
🚨︎ report
Looks like child game kaleidoscope/ experiments with Lattice Boltzmann method on Cubemap v.redd.it/treceyyao2b61
πŸ‘︎ 143
πŸ’¬︎
πŸ‘€︎ u/DigitCell
πŸ“…︎ Jan 13 2021
🚨︎ report
Experiments with Lattice-Boltzmann method of liquid simulation. Program on c++ and use CUDA acceleration. Looks like liquid planet. v.redd.it/o8acb08297w51
πŸ‘︎ 273
πŸ’¬︎
πŸ‘€︎ u/DigitCell
πŸ“…︎ Oct 30 2020
🚨︎ report
[December] Lattice Boltzmann method

As per the discussion topic vote, December's monthly topic is the Lattice Boltzmann method.

πŸ‘︎ 23
πŸ’¬︎
πŸ‘€︎ u/Rodbourn
πŸ“…︎ Nov 30 2017
🚨︎ report
Approximation in lattice Boltzmann method

Hi everyone,

I am currently learning LBM. I have derived the approximated distribution formula from scratch, this:

f_i=w_i rho (1+x_j u_j+1/2(u_j u_k+(sigma^2-1)d_ij)(x_i x_j-d_ij)

During the derivation, the first step is to approximate a Gaussian distribution with Hermite polynomials. The formula above, uses Hermite polynomials up to degree 2.

One question is, is this a good approximation? I plotted the original function and the function approximated by 2 degree of Hermite polynomials. This is what it looks like:

https://preview.redd.it/ccsf3swtyxr11.png?width=360&format=png&auto=webp&s=a7e51643f1124f4d43c69c5ed3b523923497c289

From my perspective, this is a really poor approximation. The value is so wrong at x=0.

Sure we can approximate it with more terms, but given the formula derived from it is widely used, I have doubt on the accuracy of this formula.

Anyone familiar with LBM can help me?

EDIT:

Please confirm my expansion is done correctly:

Gaussian: Exp(-x^2/2)/Sqrt(2 Pi)

Approximated 2nd order: Exp(-x^2) (1+2x^2)/(2 Sqrt(Pi))

(Original function have miu and sigma which are substituted with 0 and 1 respectively)

EDIT 2:

u/wstrncdn ask me to provide image of higher order approximations, here is the result:

https://preview.redd.it/wyb7ndwml2s11.png?width=660&format=png&auto=webp&s=0888344acd3feaee6104ac113d8a770e5c6dacee

It looks like even 3rd order approximation wasn't that good, but it's better with 6th and 9th terms added.

9th Appro: exp(-x^2) (321-312x^2+552x^4-160x^6+16x^8)/(384 sqrt(Pi))

EDIT 3:

Some people pointed out that it's the moment integral that's important. So let's see how accurate it is:

(Ordered from 1st to 9th approximation)

0th moment: {1., 1., 1., 1., 1., 1., 1., 1., 1.}

2nd moment: {0.5, 1., 1., 1., 1., 1., 1., 1., 1.}

4th moment: {0.75, 2.25, 2.25, 3., 3., 3., 3., 3., 3.}

1st, 3rd moments are all zero (obviously because of symmetry)

So 2nd order approximation will get the wrong 4th moment, but the 0th and 2nd are correct. Not sure about asymmetric distributions though.

EDIT 4:

The discussion have went a long way but I think we can conclude now: 2nd order approximation LBM is actually accurate up to 2nd moments for integrals only, and that's all we want so nothing to be surprised here.

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/redditNewUser2017
πŸ“…︎ Oct 13 2018
🚨︎ report
[OC] 4K Lattice Boltzmann Method 2D Fluid Simulations youtu.be/pBKZnqhhs28
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/SoftologyComAu
πŸ“…︎ Oct 05 2018
🚨︎ report
Non isothermal lattice boltzmann method

I have been working on multiphase LBM for quite a few months. Now, I want to get into multiphase non isothermal but I'm struggling. Can anyone suggest me how to start either by journals or any basic code from which I can start working on. Thank you.

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/_debashis_1999
πŸ“…︎ Oct 26 2018
🚨︎ report
Lattice Boltzmann Methods AMA

Hello All,

I was perusing past posts and questions on LBM here (and some other subreddits) and noticed some misconceptions and false statements.

If there is any interest I am here to answer any questions I can about LBM, its limitations, its pros, and where the method is going.

πŸ‘︎ 14
πŸ’¬︎
πŸ“…︎ Jun 09 2015
🚨︎ report
Groundbreaking GPU-based Solver Using the Lattice-Boltzmann Method (LBM) (Free Webinar)

Hi guys! We wanted to share our new webinar with you, as we've released a groundbreaking GPU-based solver using the Lattice Boltzmann method with an unparalleled combination of accuracy and speed. Our free webinar will teach you how you can now run transient simulations in hours instead of days, all in a web browser.

Feel free to register here, we look forward to seeing you!

https://www.simscale.com/webinars-workshops/lbm-flow-solver/

Results of a CFD simulation of LOHAS Park being post-processed in a web browser on SimScale

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/SimScale_GmbH
πŸ“…︎ Dec 07 2018
🚨︎ report
AMA! Statistical Fluid Dynamics (Lattice Boltzmann and Lattice Gas Cellular Automata Methods)

Hello All,

I hope I can generate some interest in this niche topic, and answer any questions if you've heard of the method before!

I am a PhD Candidate working primarily on the theory, but also computational implementation of the lattice Boltzmann method and lattice gas cellular automata. This is an alternative approach to solving the Navier-Stokes equations, and beyond, as it does not rely on the continuum assumption. There is quite a laundry list of pros that have been developed over the past 18 years of this approaches existence.

πŸ‘︎ 7
πŸ’¬︎
πŸ“…︎ Jan 29 2016
🚨︎ report
Learning Lattice Boltzmann Methods

I'm in my final year of Automobile Engineering (undergrad). I wanted to start a project on fuel injection modeling using the Lattice Boltzmann method. I plan to work my way up to multi-phase modeling over a period of time. Are there any tutorials on the net for a beginner like me?

I'm reasonably experienced in modeling multi-phase flows in fluent and my concepts of FEM and FVM are good, though I'm guessing they won't matter once I get involved in LBM. I've downloaded a software called Palabos, and I've also heard that you can write the code for such a problem in MATLAB. Any help would be appreciated.

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/vikramsngh
πŸ“…︎ Jun 14 2013
🚨︎ report
Lattice Boltzmann Cellular Automata Method (LBCA method) - KuanWei Lee youtube.com/watch?v=HOueR…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/slackermanz
πŸ“…︎ Nov 01 2014
🚨︎ report
Introduction into simulations using Lattice Boltzmann

Hey Everyone!

For everyone starting out with simulations, I created a tutorial on the Lattice Boltzmann method with code and example simulations. It is quite an easy method with can simulate quite complex stuff in 2D.

Here is the link: https://minttube.net/topic/5/3/9/

I will also add videos in the future!

Thank in advance!

πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/TheBenimeni
πŸ“…︎ Sep 17 2021
🚨︎ report
Lattice Boltzmann implementation not conserving mass, Is there something wrong with my boundary conditions?

I've initialized an D2Q9 LBM simulation with the following parameters.

size = 32 x 32 initial state, set to BGK equilibrium with density of 1 (zero quantized velocity density = 4/9, cardinal velocities = 1/9, ordinal velocities 1/36). tau = 0.6, assuming unit dt (1) and unit dx (1).

Then before I run the simulation, I modify the initial state so that the north quantized velocity has + .01 added to it for every cell.

When running the simulation I get odd results. I get a increase in velocity (and density) over time with no other changes put into the system and eventually it appears to break the simulation. I would have expected the velocity to dissipate overtime as the system reaches total equilibrium. The simulation appears to do strange things when I add velocity to the initial state (or really add any velocity at all). With out changing velocity during the simulation, there seems to be some sort of run-away effect causing an increase in density overtime, I'm unsure however if this is actually due to the boundaries or not.

Here are example videos, https://imgur.com/a/qc0lbrg

  • the red one shows density over time (brighter red = more dense, black = negative density, grey = + or -infinity).
  • Jet color mapped one shows curl, though the absolute value of curl. purple = low curl, red = high curl. grey means the same thing as before
  • the dark green one shows velocity, green is vertical velocity, red is horizontal velocity, yellow is a mix of both. grey means the same as above.

My streaming code basically is this:

  • for each LBM cell
  • check the cell where the quantized density should be streaming from if the location exists.
  • If the location is in bounds, copy the value from the streaming cell in the same direction.
  • Else instead check the current cell index, and take the value corresponding to the opposite direction and set it to the current direction

My collision code uses the BGK operator, and basically is this:

  • Sum up all the values from the previous streaming step, this is the density
  • Sum up all the values multiplied with the corresponding direction, this is the momentum
  • Divide momentum by density, this is the velocity
  • w_i = wieght for ith quantized velocity
  • c_i = ith quantized velocity
  • u = bulk velocity calculated earlier
  • f equilibrium (f_eq) = w_i * density * ( 1 + 3 * (dot(c_i,u)) + (9/2) * (dot(c_i,u)^2) - 3/2 * (dot(u,u))^2);
  • apply BGK collision operator to get result:
  • `streamed[i] = (streamed[i
... keep reading on reddit ➑

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/Plazmatic
πŸ“…︎ Sep 12 2021
🚨︎ report
Experiments with Lattice-Boltzmann simulation of liquid. Program write on c++ and use CUDA library for acceleration. On video opposite pulse flows. Colorized by dvy/dx - dvx/dy. If someone interesting can share code. v.redd.it/y8f02k9f37w51
πŸ‘︎ 1k
πŸ’¬︎
πŸ‘€︎ u/DigitCell
πŸ“…︎ Oct 30 2020
🚨︎ report
Anyone use Fluent Lattice-Boltzmann (beta) feature?

Not explicitly CFD but I figured someone here might be able to answer my question.

I would like to run some isothermal and non-isothermal simulations using Lattice-Boltzmann and I'm looking into using the beta feature in ANSYS Fluent 2021 R1. I took a look at the Beta Manual but I'm looking for a more theoretical guide to help me troubleshoot and assess the quality of my simulation.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Perottina
πŸ“…︎ Jun 25 2021
🚨︎ report
As a weekend project, I tried to write a simple to understand Lattice Boltzmann solver (D2Q9, BGK collision) and learn how to write more efficient Julia code in the process.

I uploaded it in the following repository: https://github.com/Nappael/JuliaLatticeBoltzmann

The included code runs a simple wave propagation problem with an initial density perturbation, but it's the same streaming -> BGK collision algorithm that is often used in fluid flow problems and should be very easy to modify for such a purpose. I tried to make it run as fast as possible, and the main loop is totally allocation free, but more advice would definitely be appreciated as I'm still learning.

Hopefully this ends up being useful to someone. It's only 80 lines and hopefully easy to understand and learn from.

Some things I learnt:

- Julia has some really helpful libraries for Tensor arithmetic that are really efficient, create easy to read code, and are well suited to calculate the macroscopic fluid properties (density, velocity) in the LB method. This code uses Einsum to calculate the velocities as well as the Feq term in the BGK collision equation. There's also TensorOperations.jl which I'm yet to test but has CUDA support, so maybe could be useful to get this code running efficiently on GPU's.

- In 2D at least, the streaming step can be made extremely efficient using the in-place circshift! into a placeholder array, then circshift! again into the final F array. This wouldn't work quite so cleanly in 3D but I'm sure something can be done there.

πŸ‘︎ 51
πŸ’¬︎
πŸ‘€︎ u/gngf123
πŸ“…︎ May 24 2021
🚨︎ report
Fluent Lattice Boltzmann turns Contact Region from Interface to Wall

I import a mesh (.msh) into Fluent LBM (see attachment). The mesh contains four contact regions. In ANSYS Meshing, I model all four as interface zones but Fluent changes them to walls:

Zone not slit.

Warning:Thread type of contact_region-src has been changed from interface to wall.

Zone not slit.

Warning:Thread type of contact_region-trg has been changed from interface to wall.

Zone not slit.

Warning:Thread type of contact_region_2-src has been changed from interface to wall.

Zone not slit.

Warning:Thread type of contact_region_2-trg has been changed from interface to wall.

--------------------------------------------------------------------------------------------------------------------------------------

The boundary types included in Fluent LBM are inlet, outlet, wall and symmetry.

Thus, I suspect that the problem should be resolved during the meshing stage. Does anyone know how I could approach meshing to make it LBM-proof?

--------------------------------------------------------------------------------------------------------------------------------------

EDIT [SOLVED]: I remodelled the geometry as one body instead of three, eliminating the need for contact regions.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Perottina
πŸ“…︎ May 31 2021
🚨︎ report
[Programming side-project] Porting Lattice Boltzmann onto graphic card v.redd.it/oax9nnsii1q61
πŸ‘︎ 22
πŸ’¬︎
πŸ‘€︎ u/longuyen2306
πŸ“…︎ Mar 29 2021
🚨︎ report
As a weekend project, I tried to write a simple to understand Lattice Boltzmann solver (D2Q9, BGK collision) and learn how to write more efficient Julia code in the process. /r/Julia/comments/nk4zlj/…
πŸ‘︎ 20
πŸ’¬︎
πŸ‘€︎ u/gngf123
πŸ“…︎ May 24 2021
🚨︎ report
Interactive Lattice Boltzmann
πŸ‘︎ 44
πŸ’¬︎
πŸ‘€︎ u/banalusername
πŸ“…︎ Oct 08 2019
🚨︎ report
There may be some stability issues in my Lattice Boltzmann implementation, but they sure are pretty gfycat.com/idlebowedindoc…
πŸ‘︎ 59
πŸ’¬︎
πŸ‘€︎ u/taktoa
πŸ“…︎ Apr 15 2019
🚨︎ report
Lattice Boltzmann implementation with futhark: palathark (or futharkalabos?)

Hello,

edit: after editing a link I managed to somehow delete half of the text I wrote so I will try to rewrite it....

After asking several questions in this subreddit let me share with you the results we (a student of mine and me) obtained by implementing a lattice Boltzmann (LB) toy 2d code in futhark. The reason I chose the LB method is because it is a highly parallel algorithm and that I know it well (I am one of the main developers of the Palabos library).

The code can be found there:

https://githepia.hesge.ch/orestis.malaspin/palathark

Disclaimer: the code is certainly not very idiomatic futhark, it is very (very very) experimental.

By changing the makefile you can also see an output image with the SDL2 library but it's not required.

The results

This post is quite lengthy so I give first the results. If you are interested in the algorithm I expand a bit below. The LB method performance is measured in MSUPS (Mega Sites Updates per Second). I will refer to the performance of each branch which of the repo to differentiate them. The tests are performed on a GPU: nvidia RTX 2080 ti with the opencl backend. The major difference between the different is the memory layout used (and in the fastest case single precision floats are used). This is still ongoing experiment, but I thought sharing it here at this point could be a good idea for maybe some feedback.

three_dim                  670
one_dim                    670
one_dim_t                  860
one_dim_t_tuples          1300
one_dim_t_tuples_floats   3200

These results are quite impressive IMO. Let us discuss now briefly the differences between the branches. The major difference is the memory layout of the principal data structure of the LB method. In the three_dim branch we used the memory layout usually used for C/C++ codes with the multi-dimensional array being of type f: [nx][ny][9]f64. In the one_dim branch the two fused dimensions are flattened, and one sees no difference in performance, f:[n][9]f64 with n=nx*ny. In the one_dim_t branch we simply take the transpose of f:[9][n]f64. Here we see an increase in performance of about 40%. Finally, in one_dim_t_tuples we express the first dimension of the f data structure by using a 9-components tuples.

f: ([n]f64, [n]f64, [n]f64, [n]f64, [n]f64, [n]f64, [n]f64, [n]f64, [n]f64).

We see a quite important increase in perform

... keep reading on reddit ➑

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/karlmarx80
πŸ“…︎ Jul 28 2019
🚨︎ report
Lattice Boltzmann & Grid Refinement with waLBerla: A Study of the Vocal Fold youtube.com/watch?v=kUPf_…
πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/redditNewUser2017
πŸ“…︎ Mar 05 2020
🚨︎ report
ELI5 - Lattice- Boltzmann CFD.. What is it and how is it different from RANS CFD modeling?

Hello my numerical simulation friends! I am trying to get in touch with Lattice-Boltzmann for CFD applications. I am knowledgeable with RANS CFD modeling in a number of software like Fluent and STAR-CCM+. I wanted to know how it can be applicable to an example such as external aerodynamic flows over cars. Also, how complex is the need for meshing and solution setup for LB CFD?

πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/gvprvn89
πŸ“…︎ Feb 06 2016
🚨︎ report
A two-dimensional lattice-Boltzmann "wind tunnel" in your web browser physics.weber.edu/schroed…
πŸ‘︎ 21
πŸ’¬︎
πŸ‘€︎ u/jadelord
πŸ“…︎ Apr 09 2018
🚨︎ report
Lattice-Boltzmann Method

I want learn all about lattice Boltzmann methods, but irony is I am not from fluid mechanics background. So can anyone suggest me what course of learning should I follow ?

Perhaps suggest me a textbook that takes me through the basics of fluid mechanics to fluid dynamics to CFD and finally I would have enough background to start with lattice-Boltzmann method.

I have around 2.5 months for this.

Any help would be appreciated. Thanks.

πŸ‘︎ 15
πŸ’¬︎
πŸ‘€︎ u/curious_994
πŸ“…︎ May 24 2021
🚨︎ report
Introduction into Simulations using 2D Lattice Boltzmann!

Hey Everyone!

For everyone starting out with simulations, I created a tutorial on the Lattice Boltzmann method with code and example simulations. It is quite an easy method with can simulate quite complex stuff in 2D.

Here is the link: https://minttube.net/topic/5/3/9/

I will also add videos in the future!

Thank in advance!

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/TheBenimeni
πŸ“…︎ Sep 17 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.