(NOTE: This article is a reprint from the final PDF version of The Focus, Issue 74. We used it to prove out the new blog format.)
We have all been there before. You are poised in front of your computer, you just read in your geometry and you throw on a quick mesh to see what you have and how much effort this will take. Next thing you know you are getting errors or red lines are showing up on your geometry. You got bad geometry and now you need to clean it up.
There are a lot of options available including: 1) going back to the original CAD and fixing that, 2) using a repair tool like CADFix, 3) using some intermediate geometry tool that is good at repair like SpaceClaim or IronCAE, or 4) meshing in ICEM CFD which is much more forgiving with bad geometry. All of these work and may be the way you have dealt with this situation in the past. But you should also be aware that ANSYS DesignModeler has an array of tools purpose build to help you solve this problem.
The first things to try are the options when you read your geometry in to DesignModeler. Figure 1 shows the appropriate details view.
Figure 1: Import Options
You can have the program simplify geometry, simplify topology, heal the body or clean the body. It can also try and replace any missing geometry. By the way, the options available change based upon where your geometry came from so if you do not see all of them, that is normal. Heal geometry is on by default, as is clean. Sometimes you may not want them on. Play with simplifying as well. Sometimes modifying these options can clean everything up.
If the automatic stuff does not work , it is time to look at the tools available to you in DM. The first to look at is the “Small Entity Search” Just as the name implies, it goes out and identifies where you have small entities and gives you their size. You access the command a little differently in that it is not something you insert into the tree. Go to Tools > Analysis Tools > Small Entity Search. This will bring up the Details View shown in Figure 2.
Figure 2: Small Entities
Pick one or more bodies you want checked and set the options, although the defaults are usually good. Then, this is the strange part, change the option next to “Go!” to “Yes” It will do the search and present the results down below. Click on any item listed and you will be able to see it on the screen. This should help you understand where you might have problems before you go in and start fixing things.
Our favorite repair tool in DM is the Merge tool. It takes edges or surfaces that are connected without any sharp corners and merges them into new smooth entities. Figure 3 shows a typical example for edges and Figure 4 shows the same for surfaces.
Figure 3: Merge Edges
Figure 4: Merge Faces
You can do an automatic merge or pick entities that you want merged. The automatic is a great way to get rid of small slivers without having to hunt them down. This tool is also useful for simplifying your geometry in order to get a better mesh. Figure 5 shows how you can really clean up a fillet and the suction side of a turbine blade.
Figure 5: Merge Faces Ceanup
Sometimes you just want to de-feature your model by deleting holes, fillets, bosses, etc… You can do most of that with the Edge and Face Delete commands. They can be found under Tools and they work as you would expect. You simple identify the face or edge you want removed and the program takes it out and heals the solid. Figures 6 through 8 show examples. We find that this is the most efficient and controlled way to disfeature a model and get rid of tiny geometry that is causing issues.
Figure 6: Delete Faces to Remove Fillets
Figure 7: Remove Edges
Figure 8: Remove Faces to Remove Features
If, after using the tools mentioned above, you still have the bad geometry blues you can get down and dirty with a set of repair tools that address the most common issues. They can all be found under Tools-> Repair. The names are pretty self-explanatory. There are tools for removing slivers, spikes, small edges, small faces, seams, holes, and sharp angled surfaces. Most of them work the same way – you can specify a size and any features under that size get cleaned, or you can pick on geometry. The remaining figures show examples of the various options.
Figure 9: Repair Tools
One small side note before we finish, most of the options available in the menu can be displayed as icons in the tool bars if you go to Tools->Options->Toolbars. If you are doing a lot of repairs, we recommend that you add the tools you are using to the toolbars. Another important thing that users should know is that you can repair geometry and save it as an ANSYS ANF file, the native file format for ANSYS Mechanical APDL. So even if you are not meshing and pre-processing in Workbench, you can still use this tool to clean up your geometry.
After spending years repairing bad geometry we are thrilled to have these tools in our main software product, removing the need to jump out to other programs. Taking the time to learn these tools, when they work and when they don’t and understanding their options has paid off in chasing away our bad geometry blues.