SnappyHexMesh GUI Addon for Blender

tkeskita, updated 🕥 2023-03-18 06:58:19

SnappyHexMesh GUI add-on for Blender

Introduction

This add-on turns Blender into a GUI for SnappyHexMesh, a volume mesh generation tool for OpenFOAM®, the open source CFD (computational fluid dynamics) toolbox. The add-on exports a complete OpenFOAM case folder structure, with geometry and dictionary files, ready to run OpenFOAM commands including snappyHexMesh. The aim of the add-on is to

  • Ease the workflow for importing, updating, modifying and exporting 3D surface meshes to OpenFOAM.
  • Allow definition of most common SnappyHexMesh settings via Blender GUI, to reduce need for manual modification of OpenFOAM dictionary definitions.
  • Require minimal Blender skills. Geometry can be modelled in any 3D modelling / CAD program which exports a surface mesh format that can be imported to Blender, such as STL or Wavefront OBJ.

The add-on generates OpenFOAM dictionary files for the surface mesh objects in Blender. Dictionary creation is based on string replacements using template files located in the add-on's skel directory. The add-on is meant to work with latest LTS version of Blender and latest stable OpenFOAM Foundation version of OpenFOAM. Tested with Blender 3.3 LTS and OpenFOAM 10.

Documentation

Documentation is located in docs directory of the sources and is viewable online at https://snappyhexmesh-gui.readthedocs.io. Please view the documentation for installation and usage instructions.

Feedback

If you use this add-on, please star the project in GitHub!

OpenFOAM Trade Mark Notice

This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks.

Issues

Export only exports a single "world" Patch

opened on 2023-03-16 21:06:18 by c4tachan

When I intially started with snapyhexmesh_gui, I was able to get what looked like a low resolution mesh of my model into ParaView. In an attempt to improve the resolution, I modified some settings, but now the only mesh I'm getting is the world mesh "patch0"

I don't know what I've done wrong, and I have been unable to figure out how to fix it. I've attempted to use other models, like creating a new blender project and adding only the Monkey, then trying to export that, but I still only get the world mesh.

If I try to export a pair of cubes, I also still only get the world mesh.

What am I doing wrong? I have multiple STL files in the constant/trisurface/ directory.

Changed "do_add_layers" icon

opened on 2022-06-15 16:41:59 by Ikkesett

Changed "do_add_layers" icon from 'hair' to 'mod_wave' because 'hair' is no longer a valid Blender icon as of Blender version 3.2.0

Tuomo Keskitalo
GitHub Repository