4
$\begingroup$

For research purpose, I need to implement the interaction between fluid and object. And I found that Blender is able to do this interaction (as shown in the picture).

My questions are:

  1. What algorithm does Blender use to implement this interaction?
  2. Can I add some additional force terms into the equations of this interaction in Blender, so I can change the behaviour of the fluid? (Not just change the parameters in the panels, but add some new force terms)

enter image description here

$\endgroup$
12
  • $\begingroup$ Blender's fluid sim is made to look realistic, not to be realistic. You are far better off using a different program than blender. $\endgroup$
    – Ezra
    Aug 14 '16 at 12:10
  • $\begingroup$ @Ezra Since I have tried almost a month, but my program didn't work. Then I found Blender's, and I think it may be a good start point for me. $\endgroup$
    – Jiang
    Aug 14 '16 at 12:32
  • 1
    $\begingroup$ Blender is open source $\endgroup$
    – lemon
    Aug 14 '16 at 13:01
  • $\begingroup$ I think it's 'simple' bullet physics $\endgroup$
    – Bert VdB
    Aug 14 '16 at 13:14
  • $\begingroup$ @lemon Yes, I know that. And I'm searching for the fluid part and the interaction part in its source code. But I also want to know what algorithm or which papers does Blender refer to. BTW, could you tell me where is the fluid and interaction part if you know? $\endgroup$
    – Jiang
    Aug 14 '16 at 13:19
5
$\begingroup$

The wanted information were found by both googling the keywords "blender fluid simulation" which leads to this page of the 2.4 documentation and some grep in the source code of Blender.

In this doc page, you can see a "technical details" chapter which indicates three algorithms :

  • Lattice Boltzmann Method (LBM)
  • Navier-Stokes (NS)
  • Smoothed Particle Hydrodynamics (SPH). SPH seems to be approximations to the Lagrangian formulation of the Navier-Stokes equations

From that, I did only grep in the Visual Studio solution (don't imagine a minute I know anything more about all that...). For instance :

enter image description here

To summarize :

  • LBM is in simulation_object.cpp
  • SPH is in particle_system.c
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.