English 中文(简体)
iPhone fluid simulation
原标题:

Somebody know fluid engine for iphone?I need water and gases simulation.

问题回答

Simulating fluids is a tremendous challenge for modern desktop computers, so I would not expect the greatest performance when trying to get this working on a mobile device. Running full Navier-Stokes calculations on the iPhone is probably going to chug pretty badly.

However, in the past I was able to perform 2-D fluid modeling simulations on limited hardware using lattice gas automata. With lattice gas automata, you approximate a fluid as a fine hexagonal grid, where particles can travel in one of six directions and obey specific collision rules. There are some limitations to this approach (addressed by the Lattice Boltzmann Method), but it can do a very good job of simulating fluids, even including compressible ones like air. Why this works well on limited hardware is that these calculations can be done using bitwise operators and simple lookup tables, without the need for any floating point calculations. You might be able to make something like this work on the iPhone s processor. For more on this technique, you can consult Appendix A of my Ph.D. dissertation, where I explain the process and have source code for a fluid modeler I wrote.

That said, if all you want to do is mimic the appearance of water in your application, the answers to the following questions provide some good suggestions:

I have just released an iPhone fluid simulator that uses a compressible particle in cell method. I have a video here: http://www.youtube.com/watch?v=-CCeeh8EzuA

An incompressible fluid simulator requires many iterations, so I use a compressible simulator. The good thing is if you can make a compressible simulator stable enough, it usually looks incompressible enough.

My app is called GFlow on the app store if you want to see it in action.

I have release two iPhone apps. One app solves the Navier Stokes equations:

http://itunes.apple.com/us/app/fluid-dynamics/id382274493?mt=8

and the other one uses a compressible particle in cell method:

http://itunes.apple.com/us/app/liquid-dynamics/id417814216?mt=8&ls=1

A description of the methods used is founde here:

http://www.infi.nl/blog/view/id/71/Navier_Stokes_iPhone_vs_iPad

and here:

http://www.infi.nl/blog/view/id/98/Liquid_on_iPhone_and_iPad





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签