Smoke simulation in Blender

I need help for fluid and smoke simulation.

At the school place in Milan, where I teach Blender, engineer students asked me to show them how to do the fluid or smoke simulation in the turbo machine.

The result they want to get is similar to this: https://www.youtube.com/watch?v=leos...ature=youtu.be

From 1.40 minute

So, the problem is I usually use Blender for Architectural Visualization and I don't know to do that.

Is There someone to tell me where I can find some resource explain me how to do that?

Many thanks.

Umberto

  • Thibaut Bourbon(tbrbn) replied

    Hello @gasteropode ,

    I would recommend your students to first use actual CFD (Computational Fluid Dynamics) results of turbocompressor simulation. Blender's flow solver is very limited and intended to use for cosmetic purpose. There's open source reliable solvers like OpenFOAM, and companies like SimScale also offer computing ressources for such simulations. That should first be the first step, get an actual flow solution.

    Once you get an actual solution, I would recommend to first download Paraview and load the solution into it to extract flow structures named Streamlines. These can be imported in blender as curves, which you can use to guide particles and smoke.


    That is a very condensed solution, and the first step (simulation of turbomachine) is quite challenging if you have no experience in CFD. Being a CFD engineer myself I can help you a bit more, but maybe your students already have their own solution.

    Hope that helps,


    /Thibaut.

  • Umberto Oldani(umberto) replied

    Thank you very much tbrbn for your answer.

    In the next days me and my students will try to solve this problem and if I will need help I'll contact you again...

    Thank you very much

  • Thibaut Bourbon(tbrbn) replied

    @gasteropode no problem, keep me updated ! Since you're teaching Architecture Visualization I'll probably request feedback for some of my renders then as well :D 

  • Umberto Oldani(umberto) replied

    tbrbn OK!

  • Umberto Oldani(umberto) replied

    Hi tbrbn, today I spoke with my student and He told me He already use OpenFoam for CFD but it cannot achieve the smoke animation.

    So He asked me how it possibile to get this animation type with Blender: https://www.youtube.com/watch?v=leosVYDGb-Q&feature=youtu.be

  • Thibaut Bourbon(tbrbn) replied

    @gasteropode Hi Umberto, I'm working on a similar case right now and should be able to give you a detailled process very soon, stay tuned!


    Cheers,


    /Thibaut.

  • Thibaut Bourbon(tbrbn) replied

    @gasteropode Hi again Umberto, sorry for the delayed answer!

    So in this post I will try to describe as thoroughly as possible two methods that could be used in order to get similar visualization.

    Method one - using only Paraview

    Basically, what your student is trying to obtain from the flow visualization is usually called volume rendering in the computational fluid dynamics field. If he/she uses Paraview, there's actually a tool to obtain the volume rendering directly from the simulation results, and in addition get the proper scalar colors range, which is in few words the scale used to show for exemple the flow's speed. There's a good tutorial in this video:

    https://www.youtube.com/watch?v=UwKFg0yOlCA

    Pros: you have the actual simulation results, with correct scalar ranges

    Cons: Paraview's rendering capacities are limited and if the purpose is to get a nice looking animation like you showed, it will be difficult. You cannot handle shaders, lighting and so on as well as in a CG software.

    Method two - using Paraview AND Blender

    Step one - in paraview:

    Once the simulation result is loaded in Paraview, there's the possibility to create flow structure named streamlines. It represents the path that a given flow particle would follow. Here's how to generate them:

    https://www.youtube.com/watch?v=BwPwPVy93oM

    The streamline can be turned into a tube or ribbon, but leave it as is (a line). Then, you can export the said streamline(s) from paraview, by going in File > Export Scene and choosing either .vrml or .x3d format. That will export the whole scene, geometry included.

    Step two - in blender:

    Start by importing the previously generated files ( in blender it's in import > X3D extensible). Note that the streamline is treated as a curve. If note, convert it as a curve. For the sake of it, I downloaded a compressor model from GrabCad , and made up a curve that represent the streamline. (DISCLAIMER: it's not a computed streamline so not physically realistic). I used a boolean to show the inside of the compressor (with bool-tool).

    Then, apply a force field to it, and set it to Curve Guide. You should see a circle at both curve's extremities. If not, go in the curve setting and toggle Path Animation.

    Next step: create a particle emitter. In this case I used a ring, you can do anything you like. Then create a particle system (amount of particles is up to you). If you animate it (ctrl+a) you should see the particles following the curve!

    The step after is to generate a smoke simulation. For that I select the emitter, hit space and search for "quick smoke", and use the following setting. You can of course fiddle around to get another style.

    For the simulation domain I used a rather low resolution for the sake of speed. I suggest to crank up to 128 at least:

    You can verify that all works by baking and animating the simulation. You can see that I added some rotation key to the rotor so it looks nicer

    For the shading, with a simple smoke shader (using volumetrics) you can get something like the image bellow. There's room for improvement and if you have some tips and tricks for  smoke shader I'll be  interested. 

    PROS: better sgeometry haders, more flexibility with light etc.

    CONS: cumbersome to set up, tricky to get a descent smoke shaders that respect the scalar range (when needed).


    That's it for now, I'm still under investigation for better handling of volume rendering in blender. It unfortunately cannot be exported from paraview to blender directly, since it requires the data for each cell that was computed. I have some ideas to get it done but that takes time :) 

    Anyhow, I hope  this can be of help, I tried to be as clear as possible which is quite difficult simply by writing. Don't hesitate to ask for more details and CFD questions !


    Cheers,


    /Thibaut,

  • Umberto Oldani(umberto) replied

    Hi tbrbn,

    Thank you very very much for the moment!

    Now I can try to create the animation using a true turbo-ventilator model.

    When I will finish maybe I upload the result. Thank you again.

    Cheers

    Umberto

  • Thibaut Bourbon(tbrbn) replied

    @gasteropode my pleasure! Please share when done, I'll be curious to see :)