# Introduction to model partitioning

For CFD analysis, we should be able to produce high-quality computational grids. The geometry of turbine components, for instance, is frequently highly complex, necessitating the usage of specialized software to generate well-shaped meshes. One way to attack this problem with open source tools is via using Salome platform offering a good deal of geometry preparation methods together with meshing techniques, such as Hexahedron (i,j,k) or xBlock (not released yet).

During the development of structured hexahedral meshers in Salome, many problems with the input geometries (e.g., created in Catia) popped up. It shortly became evident that mesh preparation frequently necessitates a thorough reengineering of the input geometry, up to remodeling the entire thing from scratch. *We have to clean up composite surfaces and edges as well as remove tiny features in the model whenever possible.*

Hexahedral mesh prepared in Salome. |

Another aspect of mesh preparation is the necessity of switching to a cellular (non-manifold) topology. A structured hexahedral mesh requires that the input geometry is decomposed onto a set of topologically cuboid subdomains. While advanced meshers can do this job more or less automatically, in Salome you have to be explicit about partitioning your model. This is exactly why the OpenCascade's Partition operation was developed in the first place and this is exactly where non-manifold capacities of the kernel are of critical importance.

A model before partitioning. |

A model after partitioning. |

To partition a model, we have to prepare a set of sectioning surfaces. It should be noted that sectioning is necessary not only to hexahedrize the domain prior to meshing, but also to prevent potential skewed and tall elements. It's worth mentioning that to avoid extra partitioning while maintaining nice element quality a somewhat different layout of meshes might be used (O-grids, C-grids, etc.).

Section surfaces. |

Once the model has been partitioned, it's time to define the faces to attach boundary conditions (e.g., inlet vs outlet) and the faces dividing boundary layers. Having these geometries defined, we can proceed with meshing. The constructed meshes can then be passed to numerical simulation software, such as ANSYS CFX or OpenFoam.

Mesh quality control in Salome. |

We will come back to the problem of constructing section surfaces in the future series. Still, the workflow outlined above is kinda common for numerical simulation engineers, and we can already guess that a great deal of their time is devoted to working with geometry. From this perspective, Analysis Situs is going to become an accompanying open-source addendum to Salome with the primary objective to heal, simplify, and prepare geometries for simulation. Stay tuned for more.

*Want to discuss this? Jump in to our forum.*