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]
 
Share



You might also like...


US Military Scientists Solve the Fundamental Problem of Viral Marketing [News]

Why is sea salty but rivers are not? [Random Knowledge #21]

Liar Numbers [Science]

How to Make a Corona or Electrostatic motor [Project]

Google was originally named BackRub [Random Knowledge #42]

Raspberry Pi: the Perfect Home Server [How to]

The Picdump of the day #8 [5 Photos]

A Beginner's Introduction to Overclocking Your Intel Processor [Tutorial]


<< Back to INDEX



Comments

  Name

  Email (shall not be published)

  Website

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