ASCII fluid dynamics

I’ve been very busy of late and really want to keep this blog up and would like to do it in a serious manner. As I’m tied up for just a little bit longer I thought I’d make a fun post about an amazing command line program that I came across.

I’m in my final year of college and just a stones throw away from my degree, which is very exciting. I have an FYP just about finished, the idea is a peer to peer QR/NFC sales platform where credit cards/bank accounts are optional. I’m also starting a huge project with a friends I can’t get into right now but will be very excited and happy to announce it once I can. I’m working with ACI worldwide to create a hacking challenge that is going ahead this week. I’d love to share the link for sign ups but it’s closed after filling very fast, but they can be found on facebook for next year. Then finally I’m starting two jobs this week. One is back teaching kids how to build apps and the other is my regular job in Limerick’s University ICT centre and will take up time between my classes. On top of it all, as if I have time or money to spare, my wanderlust girlfriend will not stand for the fact I’ve never left the country and so has made it her mission to take me as many places as she can. Three times now in the last four months I’ve been out of Ireland and another to come at the end of this week.

So time to spare is non existent, but I did want to check in just to keep this blog looking a bit alive, so I’m sharing this amazing command line program I found that will take any text file and apply fluid dynamics. This video will demostrate everything this command has to offer.

The creators say the program is

This program is a fluid simulator using “Smoothed-particle hydrodynamics (SPH)” method.. This program reads a text from standard input, and uses it as an initial configuration of the particles. The character # represents “wall particle” (a particle with fixed position), and any other non-space characters represent free particles.

The compilation options -DG=1 -DP=4 -DV=8 represent, respectively, the factor of gravity, pressure, and viscosity. By changing their values, you can see different fluid behavior.

The code can be found here, just compile and have fun. It’s a great little idea and deserves a bit of credit so well done


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s