taichi-dev / taichi_elements

High-performance multi-material continuum physics engine in Taichi
MIT License
483 stars 69 forks source link

Visual view of the fluid #27

Closed PavelBlend closed 4 years ago

PavelBlend commented 4 years ago

Hello, @yuanming-hu

I have never programmed programs for physical simulations. But I have some questions:

What affects the appearance of the fluid? Simulation method (MPM, PBD, SPH, FLIP, PIC, APIC, PolyPIC)? Or is the reason still different?

I know two FLIP simulators. The first is the FLIP Fluids addon for Blender, and the second is Mantaflow. It seems to me that the liquid in the mantaflow looks more realistic, despite the fact that the simulation method is the same.

Can you say what makes the behavior and dynamics of the fluid more realistic? Looking at this video (0:00-0:02), can you tell how you can write a fluid simulator so that the fluid behaves the same and looks just as realistic?: https://vimeo.com/295491505

In this video, the number of particles is quite small, but the liquid looks realistic.

Here is another example of realistic simulation (Blender Elbeem, Lattice Boltzmann Method, Level Set Fluid): https://youtu.be/-IiRzmfs5aw

I would like taichi elements to have the same realistic water. Will it be difficult to implement? It doesn’t matter to me what method the water will be sold, the main thing is that the result is realistic.

yuanming-hu commented 4 years ago

Thanks for the question.

I think you are talking about surface tension in https://vimeo.com/295491505. Currently, that's not implemented in taichi_elements, but we can do that sometime in the future.

The look of your fluid depends on many factors - surface tension, viscosity, density, surface reconstruction, and even how you render it. I agree it's important to be realistic in the long run - I know how to achieve these, but that won't be an easy job to do that within one week. However, I'm confident that given time we will achieve pretty high realism.

PavelBlend commented 4 years ago

I got it.

And how do you write code to simulate various things? Reading papers and presentations from scientific researchers? Or are you creating new methods yourself? For example, if you want to implement a new function for liquids, will you depend on the availability of ready-made solutions or can you independently develop a solution?

I'm just interested in the topic of programming physical phenomena.

yuanming-hu commented 4 years ago

I do both - I adopt a lot of prior work, as well as invent new simulation schemes: http://taichi.graphics/me/

For example, we have a paper on a new MPM simulator: http://taichi.graphics/wp-content/uploads/2019/03/mls-mpm-cpic.pdf

PavelBlend commented 4 years ago

Thank you for answering my questions. I am closing this issue.

I would also like to learn how to write simulations. For me, this topic is interesting. But at the moment, my knowledge of mathematics is scarce.