Pre-processing or geometry and mesh preparation for the simulation is the most important part of the simulation setup, because it can strongly affect the results of the simulation.
Mesh creation for complex geometries can be challenging, which is why we need to understand how to properly prepare the geometry for meshing, troubleshoot the errors which can occur during the meshing and evaluate the quality of the mesh in case the solver refuses to compute the mesh.
Prepare the geometry
Before the meshing ensure that the geometry is simplified as much as possible. Overall geometry simplifications should be made to reduce the element count and decrease the calculation time, but it does not end there.
Fuse multi-block objects
If you have a geometry which consists of multiple separate blocks, they should be fused together to simplify the work with the geometry and to get rid of all the unnecessary edges and planes between the blocks, which can make meshing difficult later on.
To fuse blocks, click Operations → Boolean → Fuse, select the blocks of interest and click Apply.
Troubleshoot the errors
In order to understand how to correct a meshing error, we need to understand how to read the error and to what pay attention.
An error in Salome consists of 3 parts:
- Algorithm - defines which argument is associated with the error
- Sub-shape - defines which part of the geometry is associated with the error
- Error - gives written error description
Some errors are caused by the algorithm, some by the geometry, which is why it is important to understand which part - algorithm or geometry - is more likely to be causing the error.
The first thing to check is which part of the geometry is highlighted as the cause of the error. Click Show Sub-shape in the lower left corner of the Mesh Computation window - part of your geometry will be highlighted.
If a whole domain is highlighted, it is likely that the meshing algorithm for the domain is faulty defined.
If only a small part of the geometry is highlighted, examine it closely. Meshing algorithms can crash because of faulty details in geometry such as:
- Overlapping edges
- Narrow gaps between domains
- Small filets
- Unnecessary lines
- Holes in the surface
In this example an error occurs because of the unnecessary lines within the geometry.
If the geometry is not faulty, but error still appears, check what kind of algorithm - 1D, 2D or 3D - is causing the error.
IMPORTANT: After every sub-mesh algorithm modification it is advisable to clear the mesh data before recomputing the whole mesh, because otherwise an error may occur. To do that, right-click on Mesh_1 and click Clear Mesh Data.
If the error is cause by 1D algorithm:
- Adjust the 1D algorithm based on the error description - most likely you have left something blank, and the error description will give you the information of what it is.
If it is 2D algorithm:
Decrease the Max. Length value of the domain mesh. If you enter a Max. Length value which is relatively big compared to the size of the geometry, meshing algorithm will crash.
Change the faulty algorithm to an alternative (Triangle: Mefisto to NETGEN 2D and vice versa, for example).
If it is 3D algorithm:
- Check for meshing strategy conflicts. If you choose different meshing strategies for different domains, for example, Automatic Tetrahedralization for billet and NETGEN 1D-2D-3D for conductor, algorithms can interact with each other and cause error. The mentioned example is not the only one that could cause an error, so make sure to mesh all domains with the same algorithms, if it is possible.
Evaluate the quality
After the meshing you should evaluate the mesh element quality to make sure that the solver will be able to compute the mesh.
One of the best ways to evaluate the quality of the elements is through aspect ratio.
Aspect ratio is the measure of mesh element's deviation from having all sides of equal length. A high aspect ratio occurs within long, thin elements, which can cause the solver to crash in the computation part.
Aspect ratio usually is low within the mesh domain (around 1) and high in viscous layers (up to 1000). If the aspect ratio for some elements is higher than acceptable, it will cause computing errors.
You can visually check the aspect ratio of the elements within your mesh by selecting the mesh and clicking Controls → Volume Controls → Aspect Ratio 3D.
To plot the aspect ratio element quality, select the mesh, right-click on it and select Controls → Distribution → Plot.
If you have done everything mentioned above and still can't resolve the issue with meshing or mesh computing, contact CENOS support.
How to find elements with high aspect ratio
Sometimes the troublesome elements are small and hard to notice, therefore it is impossible to understand and fix the high aspect ratio problem. To separately visualize these elements, you need to create a separate group for them.
Select mesh and click Mesh → Create Group.
In Create Group window change Elements Type to Volume and Group type to Group on filter. Click *Set Filter.
- In Filter for Volumes window click Add. Change Compare to More than, and enter 10000 for Threshold value. Click Apply and Close.
IMPORTANT: When mesh is exported to CENOS, a quality check is carried out, and mesh is not exported if aspect ratio is larger than 10 000. This is due to problems in calculation for these elements, as they tend to create errors. Because of this we set the Treshold for 10 000.
- An additional group is created under Mesh_1 → Groups of Volumes → Group_1. Click the eye icon () to enable visibility for Group_1 and disable visibility for Mesh_1.
Mesh elements with high aspect ratio wil become visible.