From OpenFOAMWiki
Revision as of 09:05, 10 November 2023 by Tkeskita (Talk | contribs)

1 Introduction

Blender is the free open source 3D content creation suite, available for all major operating systems under the GNU General Public License. This page lists links for using Blender with/for OpenFOAM.

Most of Blender features are targeted for 3D artists. For OpenFOAM users, the most interesting Blender features include polygon surface mesh modelling, photo-realistic visualization, animation, and Python programming interface (for automation and creating add-ons that extend the software). Pros of Blender include a large on-line community, lot of on-line material, and add-ons. Cons of Blender include a steep learning curve, and fast changing / evolving software (tutorials get outdated quickly). The current Blender LTS version has a GUI which is easy to learn.

2 Learning Blender

Links for OpenFOAM users to get familiar with Blender:

3 List of links

Wiki pages for using Blender with OpenFOAM:

  • Unstructured Grids Addon for Blender
  • SnappyHexMesh GUI Addon for Blender
  • SwiftBlock - An addon for Blender acting as a GUI for creating the dictionary blockMeshDict, that lets the user create the desired hexahedral block structure as a mesh object within Blender 3D.
  • SwiftSnap - Another addon for Blender that acts as a GUI for creating the dictionary snappyHexMeshDict, that lets the user have full control over how and which feature lines are provided to snappyHexMesh. Further, the addon utilises Blender materials to let the user specify patches' names, resolution settings and mesh wall layers.

Blender related links outside wiki which OpenFOAM users may find useful:

4 Old information

Here is a complete reference list of wiki pages that describe how to use Blender with/for OpenFOAM:

4.1 Render OpenFOAM solutions with Blender

All who are interested for rendering numerical solutions using Blender can start with the following scripts build by T. Holzmann: Blender Scripts You will find two python scripts. One is for Paraview (export x3d scenes) that is not complicated. The other one is used by Blender. You have to modify the Blender script in a way that it fit to your simulation and exported x3d scene. Good luck and have fun.

4.1.1 General proceeding

  • Run your simulation
  • Open Paraview and create your scene (save view)
  • Modify the python script
  • Run the script to export all timesteps (or only one time step) as *.x3d file(s)
  • Modify the python script that it fit to your simulation
    • Tipp: Start without the loop (500 replaced with 1) and see how the script works
    • Tipp: Uncomment the last lines in the script (remove files and rendering)
    • Take a half day and watch tutorials for Blender (to get a bit more familiar), I recommend Jacob Lewis
  • After the python script works well and like you want, take a rest and render the guys