Home     Contact     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
 Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

<< Back to INDEX

ASCII fluid dynamics [Science]
posted December 16 2013 13:18.16 by spic0m

This program is a fluid simulator using "Smoothed-particle hydrodynamics (SPH)" method.

The SPH particles represent the fluid flow. Particles have information about the position, density, and velocity. In every simulation step, they are changed by pressure force, viscosity force, and external force (i.e., gravity).

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.
"Marching square"-like algorithm is used to render the particles.

The Program received a honorable mention in The International Obfuscated C Code Contest.

[Link: IOCCC]

You might also like...

Larry, Sergey and the Stuff of Searching Genius

An hour of spectacular chemistry experiments [Chemistry]

Kids React to Old Computers [Entertainment]

Raspberri Personal Assistant [Project]

10 questions that keep puzzling scientists [Science]

YouTube Secrets You Need To See [Web Tricks]

Fission And Fusion

Temperature Controlled DC Fan [Project]

<< Back to INDEX



  Email (shall not be published)


Notify me of new posts via email

Write your comments below:
BEFORE you post a comment:You are welcome to comment for corrections and suggestions on this page. But if you have questions please use the forum instead to post it. Thank you.


No comment yet...

Be the first to comment on this page!

 Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS   

Site design: Giorgos Lazaridis
© Copyright 2008
Please read the Terms of services and the Privacy policy