Jump to content
  • Advertisement
Sign in to follow this  
coderchris

introduction to fluid simulation?

This topic is 3603 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im interested in learning about fluid simulation. I have done a little bit of reading already, and I know about some of the different ways you can simulate fluid (eg navier-stokes, shallow-water, ect..). But, all the places I read about this stuff assumes the reader knows alot about fluid simulation already, and is an expert with solving complex differential equations and such. I dont exactly have any kind of degree in mathematics (yet), and havent taken a differential equations class. So, Im wondering if anybody knows of any online resources I can look at as very shallow introduction to this kind of stuff, that explains how it works, for example how to numerically solve some of the equations involved in fluid simulation? Actually, I think thats the main part im confused on; how exactly does one go about solving these equations? i know that they cannot be solved in closed form and must be evaluated numerically, but how is this done? Alot of the code I have looked at has to use some form of iteration, and they use terms like "advection", ect... but none of the papers i have looked at actually define what that means at a high level. Thanks, Chris

Share this post


Link to post
Share on other sites
Advertisement
Fluid dynamics is a very low-level subject if you want to go into any detail. We only covered it at fourth-year in my physics degree because the maths is quite tortuous, and it's pretty much impossible to get anywhere without some quite nasty-looking PDEs. Saying that, you could look out for a book called "Physical Fluid Dynamics" by Tritton, which is quite experimental i.e. explains some down-to-earth examples of real-life fluid flows without dwelling too much on the maths. Having said that, it's still not exatly entry-level I'm afraid, so depends how brave you're feeling!

Share this post


Link to post
Share on other sites
The name for what you're interested in is "Computational Fluid Dynamics" (maybe you already know this). As far as I know, there is no simple explanation without a lot of math background, and the reason for this is probably because even mathematicians don't fully understand it.

Im glossing over a lot of details here, but basically the idea is that if you use physical principles of liquids like conservation of mass, F=ma for infintessimal small volumes or liquid, and so on, then you get the Navier-stokes equations. The Navier-stokes are nonlinear PDE, and they are really really hard to solve.

They are so hard that if you make "substantial progress" towards a mathematical theory to fully understand them, then you can win 1 million dollars and be considered one of the greatest mathematicians of the century.

So basically what people do is take special cases. For example, if the water is shallow, or if the dimension is 2, or if the viscosity is zero, or if the fluid is incompressible, or if there are other properties of the liquid that restrict it, etc, then the Navier-stokes equations become simpler, but still very hard to solve. Then they do approximations such as chopping the space into discrete pieces, and at this point numerical solutions can be found, but the math is still at the graduate level.

I think you'd need the following math to be able to read papers on the subject and understand wtf they are talking about:
Multivariable Calculus
Linear Algebra
Differential Equations
Complex Analysis (just the basics)
Numerical Analysis
Partial Differential Equations

Share this post


Link to post
Share on other sites
To piggy back on what has been said, I know a guy that was hired by an oil company in his graduate program to develop mathematical equations for the flow of crude through their pipelines, with the purpose of optimizing flow which cuts costs. One *single equation* in the analysis was roughly four pages long. This is not trivial stuff.

Share this post


Link to post
Share on other sites
I took a class on the Navier-Stokes equation where we used it to create the Burgers-Rott Tornado Model. In my experience Maze Master has listed all of the subjects you need to be familiar with. I don't agree with only needing to know the basics of complex analysis though. As far as I know there is no way to ease yourself into fluid flow. Its going to hurt every step of the way. That said its pretty awesome stuff and I hope you stick with it.

Share this post


Link to post
Share on other sites
The Bridson/Müller-Fischer course notes immediately sprang to my mind too, but without a solid grasp of linear algebra and differential equations the average tyro stands very little chance of getting much out of them. IMHO, however, there's pretty much no way around this. If you want to do grown-up simulation, you have to use grown-up math. Intuitions on what real-world processes the math represent are all but nonexistent. Hell, much of the math involved in CFD was developed because it was needed for physics! Coderchris, if you feel like getting your feet wet (no pun intended), check out Stam's CFD stuff. Don't count on understanding more than half of it yet, though.

Share this post


Link to post
Share on other sites
A very simple introduction can be found here:
http://www.gamasutra.com/view/feature/1549/practical_fluid_dynamics_part_1.php

Share this post


Link to post
Share on other sites
Jos Stam has written a few relatively simple articles on this topic. You can find them all in PDF format here:

http://www.dgp.toronto.edu/~stam/

They include an article on how to make a real-time fluid simulation for games.

cheers,
Michael

Share this post


Link to post
Share on other sites
Thank you all for being so helpful

I guess the basic conclusion here is that I'm in for quite a ride :O

I've heard about the one million dollars for solving the equations, so I never really planed on trying to do that :P
I just want to understand how to simulate numerically (Which I guess is the only way it can actually be done at the time).

I have take all the undergrad calculus classes my university has to offer (including multi-var), and I'm not too shabby with it; Iv also got some linear algebra under my belt, but differential equations...they are still alien to me.

I guess the first place for me to start is learning about diffy-q's and how to solve them, how hard could it be?

Again thanks for all the nice references and info
-Chris

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!