Professional Documents
Culture Documents
1:
Use of UDF in Moving
Deforming Mesh
ANSYS Fluent Dynamic Mesh
Release 2019 R3
Note: The mesh is a big domain with an object inside. This object is going
to rotate around the center line in the domain and also around itself.
Note: Only Local Cell is enabled under Remeshing Methods. The object in
motion is in the middle of the domain and will not be in contact with the
external boundary. So none of the boundaries will change or deform.
• Close Fluent.
This concludes this first UDF workshop based on using a CG Motion UDF for
dynamic moving mesh.
12 © 2019 ANSYS, Inc.
UDF: DEFINE_GEOM
13
13 © 2019 ANSYS, Inc.
Preparation
Now you will check the effect of another UDF on moving
mesh.
• Launch Fluent.
• Select 3D under Dimension in the Fluent Launcher dialog
box.
• Ensure that Display Mesh After Reading is enabled under
Display Options in the Fluent Launcher dialog box. This
will ensure that the mesh is displayed automatically after
reading.
• Retain the option of Serial under Processing Options.
• Make sure you have set the correct working directory in
the General Options tab.
• Click OK to start Fluent.
14 © 2019 ANSYS, Inc.
Reading and Checking the Mesh
• Read the mesh file udf-def-geom.msh.
File → Read → Mesh...
• For a better display of the mesh click
Display....
Domain → Mesh → Display...
• Enable Faces and Edges in the Mesh
Display dialog box.
Note: You have the top and bottom surfaces with a parabola-
wall which has a clear definition of shape.
• Close Fluent
29 © 2019 ANSYS, Inc.
UDF: DEFINE_GRID_MOTION
30
30 © 2019 ANSYS, Inc.
Preparation
Now you will study the effect of another UDF on a
different moving mesh.
• Launch Fluent.
• Select 2D under Dimension in the Fluent Launcher
dialog box.
• Ensure that Display Mesh After Reading is enabled
under Display Options in the Fluent Launcher dialog
box. This will ensure that the mesh is displayed
automatically after reading.
• Retain the option of Serial under Processing Options.
• Make sure you have set the correct working directory
in the General Options tab.
• Click OK to start Fluent.
31 © 2019 ANSYS, Inc.
Reading and Checking the Mesh
• Read the mesh file udf-grid-motion.msh.
File → Read → Mesh...
• In the mesh display check each surface
of the geometry to check the name and
which surface it corresponds to.
Domain → Mesh → Display...
• Open the Mesh Display dialog box.
Display → Mesh...
• Deselect all from the list of Surfaces Note: You can see that the mesh has 2 domains. One made of tri
elements and the other of quad. Among the Surfaces
• Select each surface one by one and click • wall consists of the sides of the quad elements.
• top-deforming is the top surface.
Display to check which displayed surface • right surface is the right wall of the tri elements.
represents which name. • left surface is the left wall of the tri elements.
• quad-to-tri surface is the interior surface between the tri and quad
elements.
• bottom surface is the bottom wall.
• Click Load and then close the Compiled UDFs dialog box.
• Close Fluent.
43 © 2019 ANSYS, Inc.
Summary
• In this tutorial you have played with three different UDF macros. This was not a
detailed study in UDF process or programming, but just an introduction to what the
possibilities are in using these UDFs.
– DEFINE_CG_MOTION
‒ DEFINE_GEOM
‒ DEFINE_GRID_MOTION