Objective :
- To Identifying & cleanup all the topological errors in the given Tesla Cyber Truck Car model.
- To create a surface mesh.
- To Create a wind tunnel around Tesla Cyber Truck Car .
- To create a volumetric mesh to perform an external flow CFD analysis simulation.
Introduction :
ANSA :
- ANSA is a Computer-aided engineering tool for Finite Element Analysis and CFD Analysis widely used in the automotive industry. It is developed by BETA CAE Systems. The software is distributed world wide by a number of BETA CAE Systems subsidiaries and business agents.
- ANSA maintains the association between CAD geometry and the FE mesh. This means that the FE meshes are better representations of their geometric parents. Also it is easy to maintain and update any changes in the geometry by simply reworking the updated area instead of recreating the FE from scratch.
- It carries several proprietary algorithms for meshing suitable for both CFD and structural models. ANSA was initially standing for 'Automatic net generation for structural analysis' , but the software has gone beyond that very quickly. ANSA has broadly six menus which are used to do various activities those are: TOPO MESH, VMESH ,DECK-SOLVER, MORPH ,HBLOCK.
Different type of modules in ANSA :
- TOPO - Set of tools for Geometry clean-up and for setting up of PIDs.
- MESH - Tools to generate Surface Mesh or 2D Mesh.
- VOLUME MESH - To generate solid or 3D Mesh.
- SOLVER DECKS - Tools based on different solvers such as ABAQUS, RADIOSS ,ANSYS etc.
- MORPH - Advanced tool to capture geometry more accurately while meshing.
Solution procedure :
- For solving we follow the below procedure ,
- Import the CAD model.
- Identifying & cleanup of the topological / geometry errors .
- Geometry check-up.
- Setting-up of relevant PIDs.
- Defining the element size or length.
- Setting the mesh parameters , selection of meshing type and generating surface mesh of the CAD model .
- Resolving the errors in the surface mesh.
- Creating the wind tunnel for external flow CFD analysis and surface mesh of wind tunnel.
- Generating volumetric mesh.
- Let us start solving one by one by following above steps :
1) Importing CAD the model :
- To import the CAD model we follow below steps,
Go to file -> open -> browse the location of the CAD model -> select it click on open.

- Here in the above image we can seeonly single cons , let us do topo for whole model , then we can get clear idea of model and actual single cons .In the below image you can see the model after performing topo .

- The model which we have imported opened in ENT mode , we can see the PID mode by selecting PID mode in the bottom layout.The below image is the PID mode of our BMW M6 Car model .

- Now lets see the wireframe mode of our model to see the topological errors more clearly .

- In the wireframe mode of our model model we can see the errors like single cons . Let us clear the topo errors one by one.
2) Identifying & cleanup of the topological / geometry errors :
- Before performing any topo clean up , you can observe that the resoution of compenents are not very much good . So to have a better resolution let us first go to mesh deck and decrease the mesh length by selecting the whole model and giving 1mm mesh length .Now you can observe that in the below image the resolution of car is pretty much good .

- As we seen that the given geometry has several topological errors, missing faces which are indicated by single cons & triple cons, but for the CFD analysis only the double cons are preferred not even the triple cons are acceptable because it may lead to forming a local volume over there.
- Here , the main aim is to create whole car inside part as one as one volume,here tyres are inserted into the body but not attached .Here we can go with two approches either we can delete the common extra part and perform topo and make the whole cars and tyres as one volume or we can delete the common part and close the the holes such that only car forms one volume and as tyres are not attached , then each of them forms one volume means 4 tyres 4 volumes . Here we follow the second approach it will be much better . And with these 5 volumes another volume forms between car and wind tunnel ,which is the volume we needed .So we delete all other volumes and keep the final volume as we ae doing external flow analysis .
- Initially, there were many errors , each of them should be rectified systematically by one after other. The errors are being corrected by selecting the individual features of the car like lights, wheels, windshield , body etc., seperately.
- Here, also we are much concerned about outside features of the car and not about inside features .We have to modify all the features such that we get whole car inside part as one volume .
- So to have the whole model as single volume we should have only double cons and even with double cons we should not have a feature closed on all sides ,it may lead to form a seperate local volume over there .
- Also when you find any small surface delete it and its neighbour surface and create a large surface such that we dont have any quality criteria error while meshing .
- So we will delete the surfaces which are not necessary and causing an error or leading to cause a local volume .
- If you are not clear about the selection always zoom in and select the right surface . Also use wireframe mode for proper selection (Cntrl + shift or directly turn off shadow mode ) .
- Here we always shift between PID and entity mode depending upon the suitability to solve particular problem .
- Here in all the cases , depending on the situation we use any one of the tools like project , extend ,cut , topo ,new coons etc. to clear topo errors .
- So by following above points , let us select one by one and clear topo errors .
- Let us first start cleaning topo errors for body part and then let us go with wheels .
a) Body part :
- Here For body part we start with patching the open surfaces .We use coons or fitted or fill hole to create new surface ,depending on that particular situation .
- If you delete any surface and want to create a new surface in place of old , you need cons .So , for that inorder to have inorder to have foot prints of deleted surface if in an empty space , we will use con2curve before deleting for this ,by selecting this and selecting con it creates a curve over there for reference .
- There are a lot of approaches to solve any error .The thing is we have to select upon our convenience .
- We have to follow any approach applicable , but final thing is to delete all the unnecessary cons and surfaces , such that it doesn't create any local extra volume over there .
Front left part before topo clean up :
- The below image is of the front left part of body part from outside before topo cleanup.

Front left part after topo clean up :
- The below image is of the front left part of body part from outside after topo cleanup.

Front right and top part of body before topo clean up:
- The below image is of the front right and top part of body part from outside before topo cleanup.

- Here also we close the open surfaces by using coons .
Front right and top part of body after topo clean up:
- The below image is of the front right and top part of body part from outside after topo cleanup.

Body component inside before topo clean up:
- Here tyres are inserted into the body but not attached to body part .
- As stated earlier we delete the common part of tyres and body and close the the holes such that only car forms one volume and as tyres are not attached , then each of them forms one volume.
- In the below image we can clearly see the extended part where wheels gets inserted.

- In the above part if wheels are made visible we can see glitches which means overlapped surfaces. We delete them and close the volume.In the below image we can clearly see the glitched extended part where wheels gets inserted .

- We deleted those extra part for both wheels and body as they are inside and closed volume we will delete them such that they don't form any local volume over there.
- In the below image we can see that glitched extended part where wheels gets inserted are deleted .Now we have to close the holes such that we don't have open surfaces.

- Now to patch the holes and also to have a clear geometry we delete old hole surface and created new surface for body part near all the four wheels .
Body component inside after topo clean up:
- The below image is of the body component inside after topo cleanup.We can observe that wehave a clear and neat surface after clean up.

- As we have completed cleaning topo errors of body part , let us go for wheels part .
Rims and Tyres :
- The below image is of the rims and tyres before topo cleanup.

- As we have deleted wheels attachment to have seperate volume we have open surface for wheel .
- Now to patch the holes and also to have a clear geometry we delete old hole surface and created new surface for all the four wheels .
- And also let us patch the open surfaces at other areas by using coons and fill hole .
- If you do't see any triple cons in your particular model , that means that model is hallow from inside i.e., it don't have any attached surfaces from inside , which means the model visible has only one common volume .
- The below image is of the rims and tyres after topo cleanup.
3) Geometry check-up :
- After cleaning-up all the topological errors , the geometry is checked using geometry checks under checks manager.
- The below image is of checks manager after performing geometry checks .We will see that no errors are present .

- So we can conclude that all the errors have been corrected & the model is ready to be meshed.
4) Setting-up of relevant PIDs :
- In this step we assign the PID for different parts and give a name and colour to differentiate between the components and ease up the working on the components individually.This is also done to specify names to different boundary conditions for various parts.We need to activate cross hatches before setting-up PIDs.
- If you open properties manager at the top , you will have some default PID's which are assigned. We have to create new PID's to assign for our components. Inorder to create new PID , right click on properties manager -> click new -> then select pshell -> then again select pshell -> then give name in the popup box -> then ok .You can change the colour by double clicking on the colour box -> then ok .
- In the similar way create PID for all the components.
- Let us also add transperancy for windows to be more realistic in the colour box .
- Then next thing is assign these PID's to the components of the geometry .
- To apply , we select /click on the PID to apply in the PID manager -> then right click on it -> then click on apply -> then in the geometry select the cross hatch of the surface you want to assign -> then middle click . In the similar way we have to apply PID's we have created . To give the PID we select with the different type of selection available to select the exact surface needed.
- Then after assigning the PID , delete the empty orginal PID's which has no components assigned by using compress .
- In the below image you can see that list of PID's that we have assigned.

- Now our model is ready to be meshed.
5) Defining the element size or length and setting the mesh parameters & creating the surface mesh and resolving the errors in the surface mesh :
- Here we perform all the three tasks ,defining the element size or length and setting the mesh parameters, selection of meshing type and generating surface mesh of the CAD model and resolving the errors in the surface mesh by selecting each PID one by one and perform above tasks .
- Before meshing we have to give quality criteria .Here we select openFoam solver deck,so that we get the quality criteria of that solver .
- Here as we have different surfaces , we will use different quality criteria for different surfaces , we will change mesh length as per our surface complexity and surface size . If surface is small we have to use smallest target length , if larger we use accordingly .We set the element lengths accordingly, as a fine mesh for every element would be time consuming & will be computationally Expensive.
- Here we give the below different quality criteria (min length and max lenth ) for different components as shown in figure .
- But before doing these tasks , we will follow following steps so that we don't have any off elements later in meshing stage . We will try to remove small surfaces that are smaller than our min mesh length , we will directly remove the cut ,which are unnecessary if found small. If that cut or feature line is necessary , if we remove that cut it may loose shape , in that type of scenario me make a cut at another location and remove the orginal cut causing problem , so that there is not much change in geometry .The new cut should also satisfy the minimum length criteria . If not able do cut or that feature line is very important to maintain shape of geometry ,then we will reduce the min length value so that ,our element length would not fail.By following these steps we will evaluate all the PID's / components .
- By following these processes we start evaluating our model .
- For body PID we found out that small unnecessary surfaces .
-
- We found two extra surfaces which are protruding inside .On the top side it is there two seperate lights .It may not form seperate volume but let us clear those extra surface and create new surface over there such that it don't create any minimum length error after meshing .In the below image we can see the extra surfaces .
-

- In the below image we can see that we have cleared that extra surfaces.Now it's looking pretty much good.
-

- Door handle and seperator not that much small than our minimum length and also they are open to other side so we confirm that they doesn't form local volume ,so there is no need to delete and create new surface for them .

- We start meshing from smallest component to larger component one by one .
- We mesh the body PID last because as it is attached to lot of other PID's if you mesh it first and mesh other PID attached to it later it may lead to erase of mesh of body at that location .For this reason we mesh the body PID last .
- We isolate each component/PID and give above quality criteria(target, min and max length ,skewess etc. ) in quaity criteria and then in mesh parameters .We also select skewness and give value as 0.5 for all the PID's and also min angle trias as 0.7 .You can see the quality criteria given in the below image , we change only min length and max length based on the PID.We give the values for quality criteria as in the above table .

- After meshing we remove the off elements of that particular PID byselecting the hidden mode .
- In the hidden mode you can see the off elements with the colour you have selected for that quality criteria in the quality criteria menu .
- After meshing we will see some off elements , we can remove most of them by using reconstruct under shell mesh ,and further if you have any off elements we have to go the location individually and clear that off element .
- When you have off elements , you can go to topo mode to see clearly. If possible to do it in mesh mode do it ,so that you will not loose mesh .
- If you want to remove any con it's better to remove it in the mesh mode ,so that mesh will not erase .If you go to topo mode and remove any con or surface or create a new surface the mesh will be erased .So if possible it's better to remove it in the mesh mode .
- We can remove the remaining off elements by removing mesh improvement tools . we can use split , smooth ,paste etc.We have to use mesh improvement tools depending on the situation .You can view better by using neighbour 1st level .
- We have to use move grid only if necessary , by using it may lead to change in shape of geometry as we move boundary grids.
- By following above steps start we start meshing with rearlights and then clear off elements ,such that the off element count goes to zero (0).
- In the below image we can see the lights PID with no off elements .So let us mesh another PID .

- In the below image we can see the front light PID with no off elements.

- In the below image we can see the bed roof PID with no off elements.The off elements will be cleared automatically after using reconstruct .

- In the below image we can see the sun roof PID with no off elements.The off elements will be cleared automatically after using reconstruct .

- In the below image we can see the windows PID with no off elements. Here we get some skewness error off elements .We removed them by deleting small surface and creating new surface .

- In the below image we can see the rims and tyres PID with no off elements. Here we got some skewness error and off elements .We removed them by using reconstruct and then by using mesh improvement tools .

- As there is one PID left i.e., body .As it attached to all other PID , there is possibility of erase of mesh at the interface .So to give length , we select length under the perimeters, and select all the perimeters or cons ,and then deselect all the cons that are at the interface of body and other PID .You can select clearly by using wireframe mode and then give the length.We give only in the perimeters . Even if you give length in macros , there is a chance of mesh to be erased .
- If you select the perimeters attached to other PID , it may lead to erase of mesh at that location .
- Here if you don't give length by selecting the required perimeters and mesh directly by giving 3 mm in the mesh parameters ,then whole model will be meshed with 1mm as element length, as we gave 1mm at the start for resolution .So it is necessary to give length in perimeters .
- We will give length by making all PID's visible , this is done to select properly the required perimeters such that the mesh of other PID's is not erased .
- All the visible errors of minimum length and maximum length can be overcome by reconstruct and then remaing errors can be corrected by a combination of mesh improvement tools .
- In the below image we can see the body PID with no off elements.All the off elements have been cleared.

- In the below image we can see the full meshed model after all the off elements have been cleared.

- Before creating wind tunnel we perform geometry checks for full model ,we find that there are no errors .We can observe the same in the below image .
- The below images are of the final view our model . Then next thing is to create wind tunnel and perform volumetric mesh .

7) Creating the wind tunnel for external flow CFD analysis and surface mesh of wind tunnel :
- To perform external flow CFD analysis a wind tunnel has to be created around the car. It is created in TOPO mode as a Rectangular box. The Dimensions of the wind tunnel is also important so as to capture the exact flow around car. The dimensions are as follows:

- Inorder to create a Wind tunnel, first create a point by selecting relative at 650mm from body to bottom by selecting a hot point at a distance of 650 mm to bottom .
- By taking that point as reference , we create anotheer point to front of car at a distance of 4* 5700 = 22800 mm ( 5700 mm is length of car ).
- Then we create another point at the back at a distance of 5700 +6* 5700 = 39900 mm (5700 mm is length of car and as we create relative to front point we add 5700 mm more).
- Then we create another two points on both sides of car , with the help of front and back of car , which we have created , such that we can join all the four points with the help of curve and create a surface there with the help of 4 curves .This completes creation of bottom part .
- Then we create top face by using offset at a distance of 1900 + 3* 5700 = 19000 mm (1900 mm is distance from bottom to top of car and 5700 mm is length of car ).
- Now using these two surfaces we create new surfaces on all sides and close the volume , such that it forms a wind tunnel .
- Now we create and assign PID's for the wind tunnel walls.In the below image we can see that PID's are created and assigned .

- The below image is the wireframe mode of wind tunnel we have created .

- Next thing is to do surface mesh to the wind tunnel .
- Now that the wind tunnel has been modelled, it has to be surface meshed first, such that the mesh size gradually grows from top to bottom.
- If we have refined mesh length at the top ,then we will have lot of cells and lot of computational effort is required to solve .So , we give varying mesh length .
- This can be done by using the spacing option under perimeters in mesh utility menu.
- choose geometry biasing option & set the dmin value as 30 and dimit value as 120 and factor as 1.1 and select all the four vertical perimeters.But before that we surface the top part by giving a length of 120 mm and bottom part with a length of 30 mm .
- Then generate surface mesh. In the below image we can see that the mesh length is varying and increasing from bottom to top .

- In the below image we can see that the surface mesh is completed successfully for whole model and wind tunnel and mesh length is varying,increasing from bottom to top .And also there are lop of elements .

- Now as surface mesh is completed ,next thing is to do volumetric mesh . To do volumetric mesh we have to define volumes . Then ANSA auto detects 6 volumes , in that we keep only the volume between car surface and wind tunnel , and as tyres are not attached , then each of them forms one volume , means 4 tyres means then 4 volumes will be created and car interior will form 1 volume ,which are the volumes we delete .We keep the first volume as we are doing external flow analysis .
- In the below image we can see the required volume between car surface and wind tunnel .

- In the below image we can see the volumes which are not required and needs to be deleted .

- Now as there is only one volume left ,for volumetric mesh to be done we use tetra CFD under unstructured mesh .But as the volume created by wind tunnel is very large and as it is of lot of meters and our mesh length is in still mm , it will create lot of elements , So it will take lot of time to finish volumetric mesh .So we can guess the volume created will be hallow inside of car and other parts where the volumes we deleted and whole other location will be filled with cells .So we will stop here with surface mesh as volumetric mesh further takes a lot of computational effort .
- In the below image we can see the final mesh before performing volumetric mesh .

Learning outcome:
In this process of working on this project we have learned how to,
- Identifying & cleanup of the topological / geometry errors .
- Geometry check-up and setting-up of relevant PID's and defining the element size or length .
- Setting the mesh parameters and quality criteria, selection of meshing type and generating surface mesh of the CAD model .
- Use Quality criteria tool & also learnt various options under the shell parameters such as Skewness, min length, max length , max angle &min angle, etc.
- Resolving the errors such as skewness, min & max lengths using various tools.
- Set-up Wind Tunnel as per given dimensions for external flow CFD analysis and surface mesh of wind tunnel .
Conclusion :
- The imported CAD model of Tesla cyber truck is Topologically Cleaned & Corrected all the feasible surface errors to perform external aerodynamic analysis.
- Surface mesh is generated with the required element size.
- Reconstructed the mesh as per the mesh quality required at Corners & at Intersection of edges.
- Worked with the errors occured in the Mesh.
- Created a wind tunnel For external aerodynamic analysis
Acess Link of the Project1-
https://drive.google.com/file/d/1hiG12SdpVR92QRFq7TFJhjODzbYZcsyA/view?usp=sharing