Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Application Tutorial 8.

3c:
Surface Mesh Preparation

Fundamentals and Application of CFD

Master’s
Master’s DegreeDegree in Numerical Simulation
in Numerical Simulation in Engineering with Ansys
in Engineering with Ansys
© 2022 Ansys, Inc.
1Universidad Politécnica de Madrid - Ansys 12th EDITION
This AT is considered as advanced optional topics and will not be evaluated at the end of the module.
Thereby it is not intended to provide enough knowledge to the student for making
direct use of these capabilities. In that sense, they are not eligible for
technical assistance.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
2
Introduction
Workshop Description:
This workshop shows some of the clean up tools in Fluent Meshing for boundary meshes.
Learning Aims:
You are going to use the tools to clean up the given surface mesh and generate a volume mesh.
This workshop will cover how to
– Create and display groups
– Visualize problem areas
– Use global and local tools for cleaning up the mesh
– Checking quality of mesh
– Improving quality using global and local tools
– Use the new Fluent Meshing Icons
– Use Troubleshooting techniques
– Generating mesh and improving its quality
– Set zones and boundary conditions
Master’s Degree in Numerical Simulation in Engineering with Ansys
© 2022 Ansys, Inc.
3
Starting Ansys Fluent in Meshing Mode
• Open the Fluent Launcher by clicking the Windows Start menu, then selecting Fluent in the Fluid Dynamics
sub-menu of the Ansys program group
• Enable Meshing Mode under Options
• Set Working Directory to the area where files are
• Click OK to start Fluent in meshing mode.

Note: This tutorial uses the newly introduced


Icons for improving the surface mesh. Fluent
Meshing needs to be launched in serial mode
to display these icons.

The workshop geometry is a simple half-car


geometry in a wind tunnel.
For this workshop, We read the surface mesh,
identify and fix issues with it, before
proceeding to volume mesh generation.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
4
Read and display the mesh
•File → Read → Mesh...

• Select the mesh file


• ASMO_NS-for-repair.msh.gz and click Open
• This is read in as a geometry object.
• Right-click on “Asmo” object and click draw to
display.
• Select Zone selection filter and select the outer
walls of wind tunnel.
• Click on hide icon to see details of the car
geometry.
• Right-click on “Asmo” to get a summary of the
imported geometry.
• Problems with surface mesh are highlighted in the
summary.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
5
Hot Keys
If you click in the graphics window and press ‘Ctrl+h’ you can get the list of hot keys printed on the console as
well as in graphics window. You can use these hot keys to speed up cleanup operations considerably. When
you execute the hotkeys, you can see that it prints in the console the equivalent text-interface command you
would use for the hotkeys.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
6
Visualization of Problem Areas
• We now use visualization tools inside Fluent Meshing to identify issues with the surface mesh.
• Enable Free and Multi under Set Face Options
• The zones marked in blue are the free faces which have to be fixed.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
7
Visualization of Problem Areas (2)
• Disable “All” from the Face Options list dropdown to easily highlight all the problem areas.
• There are various global and local tools inside Fluent Meshing which can be used to fix such connectivity
issues.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
8
Merge Nodes
• Right-click on Asmo object, hover your mouse over Diagnostics and click on Connectivity and Quality to
open Diagnostic tools.

• This tool will help to identify the problematic areas for the surface mesh and to fix most of it.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
9
Merge Nodes (2)
• In the Face Connectivity tab
• Select Free as Issue and Merge Nodes as Operations
• Enable the option of Relative (Percent) Tolerance
• Retain the default value of 10%
• A local tolerance based on 0.1*edge length is used.
• Click Apply for All.

• The Message in TUI displays the number of boundary


nodes and faces merged.

• Click Draw in the dialog box to redisplay the free nodes.

Note: that number of free nodes has


Master’s Degree in Numerical Simulation in Engineering with Ansys significantly reduced. All the ones on
© 2022 Ansys, Inc.
10 the wind tunnel boundary are fixed.
Merge Nodes with Increased Tolerance
• If you zoom in, you can notice that some of the nodes with bigger tolerance difference have not been
merged.
• They require more than 10 % tolerance to be merged. You can increase the tolerance in steps of 10 till you
reach 50 % and observe the change.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
11
Merge Nodes with Increased Tolerance (2)
• Enable All Face Visibility. You may need to hide the wind tunnel walls again.
• Hover your mouse over Diagnostics again and click on Connectivity and
Quality to open Diagnostic tools.
• Repeat for 20%, 30%, 40% and 50%, redrawing each time to see the effect
on the connectivity
• Each step improves the connectivity of the mesh, reducing the number of
free faces.

Write the mesh


File→ Write Mesh
ASMO_Nodes_merged.msh.gz
Master’s Degree in Numerical Simulation in Engineering with Ansys
© 2022 Ansys, Inc.
12
Stitch
1

• Nodal mismatches can be too big for Node Merge to deal 2

with. You can instead Stitch the nodes for large tolerance 3

node merging. We advise saving the mesh before this is used


as it can destroy geometry if used incorrectly. Always Merge
Nodes first.
4

• In Diagnostics Tools (Diagnostics → Connectivity and


5
Quality), ensure Issue selected is Free

• Change operation to Stitch

• Mark all free faces within tolerance (0.05)

• Click First to go to the first set of the free faces about to be


stitched.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
13
Stitch (2)
• We could click Apply to Current to stitch the first set and then go to Next etc but here we use the more
useful Global Option
• Click Apply for All then hit Draw to see the effects.
• Observe that this fixes most of the free faces.
• We will now fix any remaining free face issues with local, manual methods.

Write the mesh


Master’s Degree in Numerical Simulation in Engineering with Ansys File→ Write Mesh
© 2022 Ansys, Inc.
14 ASMO_Stitched.msh.gz
Fixing Final Free Faces
• Switch on Remesh Caps option from Patch Options as shown. This will
remesh the caps created while filling holes.
• In Diagnostics tools, Mark again the Free faces.
– This time the faces will be considerably lesser than in previous operation.

• Click First in Diagnostics panel


• This will highlight hole on rear wheel housing. Select visibility of all faces to
improve the view.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
15
Fixing Final Free Faces (2)
• Clear face selection by clicking , select Zone selection filter (RMB), select the zone and click on the
Create Patch icon to fill the hole .
• Remember, middle mouse click centres the view on a point and then you can rotate or zoom on that point
easily. Up and down arrow keys can be used to incrase the delta for bounds.

Note: If you do not clear the free faces


before selecting the face zone, you will get
an error message. This is because repair
operation expects only the zone id as input.
Use or F2 hotkey.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
16
Fixing Final Free Faces (3)
• Click Next in the Diagnostics Tools panel.
• This will highlight the next set of free faces not fixed by the stitch
operation. Ensure Zone selection icon is activated and select the
Face Zone in which these faces are (purple in image below) with
RMB then use the Create Patch icon to create remeshed cap.
• Use Next and repeat the above process for the next hole.
• After cleaning this hole, click Mark Again.
• You should have only one free face which is both free and multi. See
next slide on how to solve this issue.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
17
Clean Up “Multi” Connected Faces
• Select all Boundary Zones in the Diagnostics tool
• Select issue as Multi
• Retain all other values as default and click Mark
• By clicking on First, first set of multi-connected faces will be
shown with default bounds around the set
• One can use up and down arrow keys to increase/decrease
the bounds
• Click Apply for Current this will delete one fringe face.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
18
Fixing Self - Intersections
• Check for Self Intersections in the geometry
• Change Issue to Self Intersections in Diagnostics Tools panel and Mark
• Click First to go to First set of faces
• Click Smooth All to smoothen the spike penetrating the mesh
• Draw to view to smoothed faces
• Click Mark again to verify they are all fixed
• Click Summary to see what issues remain
1

2 3

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
19
Verify Connectivity
• Once there are no Free or Multi faces we can verify connectivity and move on to worry about the quality of
the surface mesh
• Ensure that you have Bounds Reset so that you can see the whole geometry and check one last time for
Free and Multi faces visually

• Use ctrl+a hotkey to auto-scale the view to the screen


• Fix any remaining issues if free or multi exist. The Diagnostics Summary should look like this with no free,
multi or duplicate but with some skewed faces to fix.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
20
Fixing Poor Features
Here we fix a kink in the roof
• Zoom on the area highlighted
• Using Hotkeys or Boundary → Modify panel:
• Switch to Node Filter (ctrl+n)
• Select two nodes as shown
• Set (ctrl+s)
• Select the node to project as shown
• Project (ctrl+p).

Select Node Set Target Project to target

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
21
Rezoning Triangles
• In Graphics window select the car-front boundary zone (highlighted) and Isolate
(ctrl +shft+ i) it
• You can see that the feature edge is not smooth and some triangles should belong to
car-main-body
• Clear selection using Switch to face Filter and select the faces required to
rezone into car-main-body (hint: rotate shows them clearly by their edges)
• Now go back to earlier display of car (ctrl + shift + u)
• Switch to Zone Filter and select the car-main-body in the graphics window with
RMB (as shown red below)
• Click on (ctrl+o) to rezone the triangles into car-main-body

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
22
Checking Quality (1)
• To check the quality
• Report → Face Limits...
• Select all the zones under Face Zones. Click Compute.
• You can see that there are some highly skewed elements.
We will aim to bring the Maximum value below ‘0.85’
before creating a volume mesh.
• You can also plot the histogram of quality.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
23
Checking Quality (2)
• Display → Plot → Face Distribution...

• Select all the zones under Boundary Zones.

• Click Plot.
• You can see that most of the faces are of very good quality. If you change the Minimum and Maximum values you can
concentrate on the high skewness end. You can see that there are some elements with skew > 0.8.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
24
Improving Quality
• In Diagnostics Tools panel switch to Quality Tab. Switch
Operations to General Improve, change Min Skewness to
0.7 and Mark the skewed elements > 0.7

• Retain default options (e.g. Preserve Boundary is


switched on) and click on First to visualize problem areas.

• After these faces are marked hit Apply for All. This should
reduce max skewness to 0.91.

• Click Mark again. You should have only 3 faces above this
criteria.
• Click First

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
25
Improving Quality (2)
• Let’s clean these faces manually.

• Click F2 to clear selections


• Click Ctrl-N to change to node filters.
• Select the 2 nodes as soon.
• Click to merge them.
• Click Summary to check mesh quality. You should have a maximum skewness of 0.74.
• You can continue to improve further the mesh. Let’s assume it is enough for this case.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
26
Alternative Quality Example
• If your case skewness is higher than 0.74 is possible than some problems have not been fixed or have
appeared while the repairing process was performed.
• In the next two slides an example is explained in this case.

• Click F2 to clear selections


• Click Ctrl-N to change to node filters.
• Select the 2 nodes as soon.
• Click to merge them.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
27
Alternative Quality Example (2)
• Let’s check the skewness of the mesh after all the fixing
operations.
• Click Summary to check mesh quality. The maximum
skewness has changed depending on the procedure
following by Fluent Meshing to fix it (0.74-0.84-0.9).
• You can continue to improve further the mesh. Let’s reach
the 0.74 skewness and assume it is enough for this case.

• Open the Quality Tab in Diagnostic Tools. Decrease the


Min Skewness to 0.7 Set General Improve for
Operations and Select Apply for All.
• Click Summary again and check the new skewness in the
console.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
28
Generate Tetrahedral Mesh
You can now generate the Tet mesh
• Right click on “asmo” and select Convert to Mesh Object
• Right click on “Volumetric Regions” and select Compute
• Select the “asmo” Mesh Object, RMB and Auto Mesh
• Apply and then Mesh
• After you have the Tet mesh you can see from the report
• generated in the console that there are still some skewed
• elements
• In Display → Grid
• In the Cells tab select the zone under Cell Zones
• Under Options maintain enable only Quality
• Set Minimum to 0.9 to view skewed cells over this value
• Click Display
• In the Faces tab highlight the boundaries starting with “car-”
and click Display

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
29
Generate Cut Plane
To view the cut plane through the wheels:
• Zoom in on the elements.
• Select position Filter ctrl-x, and right-click to select a position
at the center of the element group as shown
• Since you want to look at a cut plane in Y direction, Click Set
Ranges and make sure that Y Range is checked while X and Z
Ranges are unchecked
• In the Cells tab of Display → Grid dialog box enable Bounded
and click Apply and Display
• You can see the problem areas down in the corners where
there are sharp angles.

Zoom In Zoom In

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
30
Using Auto Node Tool (1)
• To fix the skewed cells we can:
• Clear the mesh and repair the boundary again or

• Do local smoothing using the Auto Node Move tool


- This will move the local nodes to improve quality. We
will select boundaries to allow movement but we will
restrict movement along the surfaces to avoid changes
to the geometry

• Mesh → Tools → Auto Node Move…


• Select all the Boundary Zones.
• Retain the default settings and click Apply.

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
31
Using Auto Node Tool (2)
• A message will be printed in the console about improved quality. Click Apply for few more iterations
and the quality will improve. Once it is brought to an acceptable level the mesh is ready for the solver.
• Dropping Dihedral Angle and deselection of “restrict boundary nodes along surface” will allow more
aggressive improvements and better quality but risks loss of features.

Note: The number od cells above a certain quality could be slightly different

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
32
Cell Zones and Boundary Conditions
Boundary → Manage… (2 ways!)
• In the Manage Face Zones dialog box you can change
the face zones to a boundary condition type.
• Select wt-inlet (wind tunnel inlet) from Face Zones.
• Ensure that Change Type is selected from the Options
list.
• Select velocity-inlet from the Type drop-down list.
• Click Apply.
• Similarly set wt-outlet to pressure-outlet type, and wt-
symmetry to symmetry type.

• Alternatively we could use the GUI


• Ctrl – Z to select the Face Zone
• to define the boundary condition type

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
33
Mesh Ready
• Open Boundary → Manage
• Select all the Face Zones
• Click List to see the summary of all the boundary
condition types. The details will be printed in the
console.
• RMB on Model in the Tree and select Prepare for
Solve and answer Yes.
• Now write the volume mesh.

File → Write → Mesh…


ASMO_Meshed.msh.gz
• Enter a proper name for the mesh and click OK.
• Optionally, switch to Fluent solution mode and
continue to solve.
• Remember to scale the mesh!

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
34
http://www.ansys.com/academic/learning-resources/online-masters-degree
Ansys and any and all Ansys, Inc. brand, product, service and feature names, logos and slogans are registered trademarks or trademarks of Ansys, Inc. or its subsidiaries in the United States or
other countries. All other brand, product, service and feature names or trademarks are the property of their respective owners.

© 2022 Ansys, Inc. All Rights Reserved

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2022 Ansys, Inc.
35

You might also like