If you are reading this blog, I am sure, at the very least, you are interested in computer aided engineering (CAE) workflows whether open source or not. If you like open source (like me) or you do not want to spend so much money on CAD geometry preparation for your CFD or FEM simulations, let me introduce you to the best (FreeCAD fans will get angry at me but let me say this!) open source software out there and it is SALOME.
SALOME is a CAD/Meshing/CAE package created in early 2000’s with the intention of efficient pre and post processing for industrial CAE problems. For the details, you can look up their home page here.
And SALOME is completely free, at least most of its modules including CAD and meshing ones. You can easily download the SALOME package here.
The download process is simple. You need to choose SALOME version and your Operation System. Then, you need to fill 3 or 4 lines about you and your organization. Or you can avoid flling the data by choosing “I wish to stay anonmymous/I have previously communicated this”.
When you finish downloading and installing, you can open and run it. The following is the initial SALOME platform view. From the dropdown menu, you can choose the module you want to work with.
SALOME is not just a CAD software. It is a complete software package that includes
- CAD geometry creation, cleaning, and modification
- Mesh generation
- Pre-processing
- Solver integration
- Post-processing
- Scripting and Automation
Let me guide you through the most important of these topics by looking at the SALOME user interface, namely Shaper (the CAD module) and SMESH (the mesh generation module).
Here is the screenshot of my SALOME 9.9.0 initial window. It has Shaper and Geometry modules which are CAD modules you can use separately or together as a workflow.
Shaper and Geometry modules (CAD geometry creation, cleaning, and modification)
Firstly, we have two CAD modules Shaper and Geometry. Why? Shaper is mainly for creating parametric geometries similar to most commercial CAD software packages like Solidworks. You can start off by creating the sketch of the shape and parameterize the edges, curves, etc. Then you can Extrude the sketch to create 3D geometry. Below is a sample of Shaper module. As an Ansys DesignModeler veteran, I have never faced any difficulties using Shaper module since all the tools DesignModeler provides are available in Shaper!
Shaper module
One thing we like Salome over FreeCAD is the sketch functionality in Shaper is much more forgiving than FreeCAD. In FreeCAD, you need to resolve every degree of freedom in your sketch. If you forgot to assign one length dimension or constraint, FreeCAD would not allow you to extrude the sketch. In Shaper, this degree of freedom rule is much more forgiving like Ansys DesignModeler. Of course, it is the best to assign the constraints properly without any mistakes but most of the time, you want to extrude/revolve your sketch and confirm what the outcome looks like.
Geometry module
Then we have the Geometry module. Although I use Shaper as my goto CAD creation tool, I rely on Geometry module for advanced geometry cleaning/repair tools. Geometry module provides tools to explode, clean, remove silver edges or stich your geometry to make it water tight and for easy meshing.
Geometry module has an edge ove Shaper when coming to geometry cleaning and repair! You can explode your geometry into more primitive types such as faces, wires and edges and edit each part easily. Then you just combine these parts again to rebuild the correct geometry or the solid volume.
Moreover, it also provides several tools to clean and fix your geometry easily. You can remove smalledges and solids and split closed faces or you can sew separate geometries as a single shell. However, you need experience to properly use these tools to get excellent results. Here is one of the best tutorials provided by CFD Support team.
Mesh module (SMESH module for generation of CFD/FEA mesh)
The SMESH module provides several meshing algorithms as for creating 1D, 2D and 3D meshes. Among these, NETGEN tetrahedral mesh generator is an easy automatic mesh generation for complex geometries, especially for finite element and finite volume methods. And, it has advanced tools for refining your mesh and creating prism layers for your CFD simulation. Moreover, you can use sub-meshing tools if you want to create cell zones or refine certain parts of your mesh.
You can generate tetrahedral mesh or hexahedral dominated mesh using default NETGEN algorithms. You have control on global mesh size as well as local mesh sizes. For local refinements, you need to name the face or edge you want to refine before setting up the refinement. However, I personally found that the hex dominant meshing in SMESH is not as powerful as its tetrahedral counterpart.
For CFD, you can create inflation layer meshes for your boundary layer. In SALOME meshing, you can add Viscous Layers as a hypothesis and you have full control over the number of layers, total thickness and stretch factor as in the following. And of course, you can assign these layers to your desired faces! However, you need to make adjustments between the layer thickness and cell size. If you are not very careful, the boundary layer creation step may stop mesh generation process because the boundary layer cells become too thick and the inside mesh cannot adjust anymore!
After generating the mesh, you can check wither your mesh is good or not as well as the mesh statistics as below.
Although the de facto mesh generation module is NETGEN, you can use other open source versions such as Gmsh or commercial meshing algorithms inside SALOME meshing like MG-Tetra and MG-Hexa. But you need to buy the licenses separately from the vendor.
According to my experience, Netgen is very stable for your own geometries created in Shaper or Geometry modules. However, it may struggle sometimes when triangulating CAD geometries generated by other software which are not very clean.
For complex and dirty geometries created in other CAD software, Gmsh or Triangle:Mefisto algorithms showed more stable and reliable performance than Netgen. You may need to play around a bit with these.
Strengths
- Easy to obtain, no license costs.
- Very powerful solid modeling tools and geometry cleaning tools
- Can generate simulation ready meshes for your FEA analysis very easily
- Can generate CFD meshes with a bit of work.
- Can be used to created very high quality STL files for snappyHexMesh (Here is our tips and tricks for snappyHexMesh)
Weaknesses
- Shaper and Geometry modules do not contain support for NURBS surfaces (I had difficulties with my ship hull geometries)
- Geometry cleaning and fluid volume creation may be time-consuming. (There is no one-click magic trick like in commercial softwares like Ansys DesignModeler or SpaceClaim)
- Creating boundary layer mesh may be sometimes tricky.
My takes on SALOME
SALOME provides two most important modules for CFD/CAE users who want to use open source CFD/CAE technologies, namely CAD creation and meshing. Personally, Shaper is one of the most advanced CAD module available for free (the only other is FreeCAD). On the other hand, Geometry module can be used to repair and clean the industry level dirty CAD geometries. SMESH is a powerful tool for creating FEA meshes and also nice for CFD meshes although it has some limitations you need to compromise. Anyway, SALOME is the most powerful CFD/FEA/CAE software package available without a huge budget if you want to start a CFD business or if your lab has no commercial alternatives.
5 comments
Can you clarify how SALOME compares to other open-source tools like FreeCAD in terms of meshing capabilities and ease of use? Additionally, what are your recommendations for optimizing the boundary layer mesh process in SALOME?
I have not much experience with FreeCAD, so I cannot comment on it. But since FreeCAD also uses Netgen and Gmsh meshers, these should show similar mesh results.
For boundary layer mesh, it needs a bit or work. For example, you need to separate certain patches and create groups. Then you can define mesh size for these. Otherwise, your boundary layer may be much thinner than nearest tetrahedral cells which is not good for convergence.
Can you clarify how SALOME compares to other open-source tools like FreeCAD in terms of meshing capabilities and ease of use? Additionally, what are your recommendations for optimizing the boundary layer mesh process in SALOME?
Confused here, what do you use for CFD Meshing for OpenFOAM? Salome mesher or SnappyHexMesh?
Thank you for your interest. I mainly use snappyHexMesh for OpenFOAM because OpenFOAM shows easier convergence with hex dominant meshes. But of course, Salome meshes can be used, too.