Close
0%
0%

2D Flow simulations with Lattice Gas Automata

I'm using modern tools and methods to implement a very fast FHP3 binary model on your desktop

Similar projects worth following
The FHP3 model is outdated, from the physics point of view, and superseded by the Lattice Bolzmann models for to decades. However it remains a simple, powerful, accessible model for desktop simulations of subsonic turbulences.
At the turn of the millenium, I have thoroughly optimised the computations of the particles collisions using a large array of modern methods : SIMD, strip-mining, SMP, boolean reduction...
Using the fastest and latest P3@550MHz, I once reached a peak update speed of 150M sites/second, enough to see vortices develop in real time. More information is found (in french) in my Masters thesis :
http://ygdes.com/memoire/
More than 17 years later, computers have evolved to a point where this algorithm would totally scream, thanks to the ubiquitous 128/256-bits registers and on-die SMP. And I have since then learned a lot more about programming and architecture...

It'

Enjoy this project?

Share

Discussions

Yann Guidon / YGDES wrote 06/04/2022 at 20:17 point

Watching https://player.vimeo.com/video/450406346 , at about 32:00 I realise that AVX512 implements ROP3 ! Had I had this opcode back in 1999 I would have save SO MUCH DEVELOPMENT TIME !

  Are you sure? yes | no

Yann Guidon / YGDES wrote 06/05/2022 at 05:18 point

And I see that my best computer, a i7 10750H, does only support AVX2.

Worse : AVX512 is disabled on the 12th gen processors ! So either I'll have to get a 11th gen CPU, or wait until Intel gets its **** together.

SIGH

  Are you sure? yes | no

Thomas wrote 06/09/2022 at 05:40 point

It's disabled ... did you find out why? Process problems?
Edit: I've found this:
https://www.tomshardware.com/news/intel-nukes-alder-lake-avx-512-now-fuses-it-off-in-silicon
https://www.realmicentral.com/2021/08/18/amd-zen4-will-support-avx512/

  Are you sure? yes | no

Yann Guidon / YGDES wrote 06/09/2022 at 07:41 point

@Thomas  anyway I'm too broke to consider buying a brand new flagship-class computer for now...

  Are you sure? yes | no

Thomas wrote 06/09/2022 at 10:44 point

Buying the latest hardware for hobby purposes requires deep pockets. If the "ROI" is of a "non-material" kind having fun with slightly (or really) outdated stuff is just as good (and as the Finnish saying goes: reikä se on rumallakin!)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 06/09/2022 at 10:51 point

@Thomas  now you owe me Finnish lessons.

Anyway that project will wait a bit. I have bigger whales to hunt, #PEAC Pisano with End-Around Carry algorithm  is going full steam ahead.

But seriously, ROP3 should be a standard opcode for any serious processor architecture :-/

  Are you sure? yes | no

Thomas wrote 06/09/2022 at 16:00 point

Finnish lessons another day.

In chapter 2.4 you wrote "Les mesures effectuées au MIT en janvier 2000 montrent que les PC de bureau de dernière génération sont presque aussi rapides qu'un bloc CAM8 (8 cartes à 25MHz). Les tout derniers microprocesseurs généralistes permettent de rivaliser avec des ASIC créés il y a plusieurs années. En terme de génération équivalente, si l'on considère la règle de Moore, l'optimisation poussée du code a permis probablement de gagner trois ou quatre années par rapport à un code non optimisé. Le code est 4 fois plus rapide que le plus rapide des codes testés, ce qui permet d'affirmer que l'effort a permis de gagner 3 ans. Ce gain permet d'utiliser une machine plus vieille à vitesse égale (donc moins chère) ou bien de gagner 3 ans sur la machine la plus récente. Cet aspect d'économie est valable si le code original était "bâclé", mais reste dans le cadre de la démonstration du fait qu'un codage consciencieux n'est pas une perte de temps à longue échéance."

I wanted to add something smart but it turned out that in chapter 2.5 you already did that. Chapeau.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 06/09/2022 at 20:51 point

@Thomas To be fair, I spent more time overall than normal on this thesis. I played with the algorithms and prepared all the elements for maybe 2 years, before the masters year, which turned into two, for the bit-parallel version described. Thus it is quite thorough.

But what smart thing did you want to add ? :-D

  Are you sure? yes | no

Thomas wrote 06/09/2022 at 05:39 point

That's a great resource, especially from the "inside the design-process" perspective.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 06/11/2022 at 04:59 point

https://hothardware.com/news/amd-financial-analyst-day-2022-consumer-coverage

hmmm'OK.

  Are you sure? yes | no

starlord wrote 04/01/2018 at 05:33 point

trying to run these type  simulations has always been a pain for me maybe you could run my space plane fuselage and see what it does when I post it in a iges file soon on my entry

  Are you sure? yes | no

Yann Guidon / YGDES wrote 04/02/2018 at 04:34 point

The FHP3 model is not the most efficient "in practice" for your kind of design.

It's working up to Mach 0.3, maybe 0.4, at low Reynolds. Think : model RC planes...

Furthermore, FHP3 is 2D only :-/

I've seen that desktop 2D simulations (using Navier Stockes and others) have progressed a lot recently, I don't know for 3D.

However FHP3 has value in educational and gaming applications :-) It can usually run interactively with very rich interactions.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates