Table of Contents
This study focuses on an automated removal of skewed surface mesh elements using Python scripts which utilize modules and functions available within the ANSA environment. The primary objectives of this study are -
- To evaluate the usage of this Python scripting using the criterias of geometry distortion (accurace and reliabality) and the time taken for code completion
- General comparison of the same with the default in-built functions within the ANSA GUI
The Scope of this study involves only removal of skewed elements and not warpage, Jacobian etc criterias as they are not usually considered for an all-tria mesh, which are generally used in CFD Surface Meshes. Nevertheless, it is quite easy to extend this quality criteria of skew to the others within the Python script.
In ANSA, there are two primary classes of in-built functions used to rectify the skewed elements
- Manual removal (using Cut, Join, Paste etc)
- Reconstruction, Fix Quality, Remeshing etc. methods which resolve at bulk
The developed script focuses on an intelligent combination of the methods present in the latter class. For example, the combination can comprise a simple logic of an arrangement of the Fix Quality and Reconstruct methods in an order of ascending risk of geometry modification (the characteristics of the same two functions can be studied in the ANSA documentations), which ensures a minimal modification of the geometrical topology while maintaining a good degree of accuracy for skewed element removal.
Hence, it is to be noted that, the script is not absolute and various other methods (developed for various other combinations of the ANSA functions) can be developed for quality removal. For demonstration, the aforestated example shall be utilized.
- Three test-models were utilized for executing this script. There's a significant improvement in time, as well as removal of all skewed elements.
- Nevertheless, there are places where the Fix Quality method performed poorly compared to Reconstruct method. No pattern could be discerned as to where all this method works worse, hence could not implement it in the script.
Metric | Model 1 | Model 2 | Model 3 |
---|---|---|---|
Total initial skewness | 335 | 225 | 903 |
Total element count in model | 216626 | 30564 | 2716478 |
Total skewness after executing script | 0 | 0 | 0 |
Total skewness after Improve Algorithm (Expand Level 1) | 1 | 0 | 20 |
Total time taken for running script | 1.4s | 0.3s | 12.7s |
Approx. time for manual removal of skewness | 30min | 20min | 60min |
- Much faster, more efficient solutions
- Requires an FE model input for quality execution of the script
- Currently run only for FLUENT solver deck, and only removes skewness. Can be extended to include various other criteria.
- One major disadvantage is the script cannot identify areas of crucial importance, and hence naturally treats all skewed elements liberally and equally. Some areas may require less or no feature distortion, and these need to be handled manually.