ANSYS Tutorial
ANSYS Tutorial
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
This is a tutorial on modeling figure 1 as shown below using ANSYS. It is designed for
introduction to the ANSYS Workbench tool for developing this geometry and then transferring it
to ANSYS for modelling according to the specification given below for water, where the
properties are also mentioned in the problem. We like to see the flow behavior and also we are
assuming that the small exit will have only a very little portion of flow rate.
Big Exit
100
mm
Inlet Wall
Inlet 100 mm 137.5
mm
Small
Wall
Ux = 0.4 m/s, 225 mm
T = 20°C Curved Wall
25 mm
200 mm
1
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Part 1
Geometry
and Mesh
2
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
3
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2. Start the geometry: Double Click Geometry (as shown double arrow in the Fig 3). (It
might take a while for it to load.) ANSYS Workbench Project Schematic opens and looks
like Fig. 4. A meaningful name could be given to the whole file by double clicking at the
name, where is it named as "Fluid Flow (Fluent)", e.g. "Elbow".
Note: Geometry will contain the geometry file (here you construct the geometry, Mesh will
contain the mesh file (you will make the mesh element and declare the boundary types), after
saving the mesh file, it will be exported to Fluent.
4
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2(a). Draw the line: Click the line button in the sketch tab (Fig. 5). Use the Line tool ( ) to
sketch lines in 2D or to draw lines between points on objects in 3D. These lines will
become edges when you pull your sketch into a solid with the Pull tool
5
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Using the Line tool, draw a 200mm line on the x-z plane. (Fig. 6). In the figure, the angle
is 90° and the length is 54mm. The angle should be remained same and the length has to
be changed to 200mm and it will look like fig. 7
Figure 6: 200mm line is being drawn on the x-z plane from 54mm
6
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2(b). Draw the quarter circle for elbow: Select tangent arc from the sketch window. (Fig. 7)
Use the Tangent Arc ( ) tool to sketch an arc that is tangent to a curve or line in the
design. Once, the Tangent Arc is selected, locate the pointed around the end of the
straight line, it will show an option to snap on that end (fig. 8) with the green dot. This
arc will become an edge when it will pull the sketch into 3D with the Pull tool.
Once the angle and diameter () is activated (fig. 8), the angle should be kept at 90° and
diameter should be made 300mm and it will look like figure 9.
7
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2(c). Draw the line: Using the line tool, draw another 200mm line from the other end of the arc
by snapping (fig. 8). The final figure will look like fig. 10.
8
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2(d). Drawing in a new plane: Select the new plane button in the bottom middle of the screen
(fig. 11). Move the mouse around one end of the lines, depending on the nature of
moving you will get x-y plane activated (fig. 12.a) or y-z plane activated (fig. 12.b). In
this case y-z plane needs to be selected by single click.
(a) (b)
9
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2(e). Draw the circle: Select the circle option from the sketch window (fig. 13). Use the Circle
tool ( ) to sketch a circle in 2D when you know the location of the circle's center and a
point on the circle’s edge, or the radius or diameter.
Note: The circle can become a cylinder or hole when it is pulled into 3D with the Pull tool, or a
sphere or torus if it is rotated or swept.
Choose the center point of the circle to be the end point of the line, and draw a circle with
a diameter of 100 mm (fig. 14)
10
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2(f). Pull and sweep the circle: Click the Pull tool (next to select, fig. 15), which is side by the
sketch tools. After this the circle becomes orange.
11
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
While holding shift, select each segment of the line. Make sure all the lines are
highlighted (blue as it is found in fig. 17) and connected. Press Enter. The pipe should
follow the path of the line, extruding the circle along it. If it doesn’t work, make sure that
you selected the circle BEFORE using the Pull tool. If it works, it will look like fig. 18.
Figure 17: Selecting and highlighting the connecting lines for elbow
12
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
2(g). Drawing in a new plane: Select the new plane button in the bottom middle of the screen
(fig. 11). Move the mouse around one end of the lines, depending on the nature of
moving you will get x-y plane activated (fig. 12.a) or y-z plane activated (fig. 12.b). In
this case x-y plane needs to be selected by single click. If it is not found, as it was found
in fig. 11, it can found in top middle of the screen (fig. 19). An ideal ox-y plane the one
that is at the bottom of upper straight pipe (fig. 20). As shown in fig. 20, draw a line to
locate the center of the small pipe at 62.5 mm from rightmost side.
13
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Draw another line in x-z plane starting from the center of the circle for 225mm (fig. 21).
Figure 21: Line equal to the length of the pipe from the beginning of elbow
2(h). Pull and sweep the circle: Click the Select tool. We are going to select the circle to
extrude it, but you will notice that the extruded pipe is covering up the drawn circle, and
it can’t be selected. Instead, select the Surface option from the left toolbar (fig. 22) under
Structure to select the circle. Now, the surface (i.e. circle) will be selected (fig. 23) and
then extrude (fig. 24)
14
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
15
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Once the geometry is finished, the workbench project will show a tick mark at the right
of the geometry (fig. 25)
3. Open the ANSYS Meshing application: Double Click Mesh (as shown double arrow in
the Fig 26). (It might take a while for it to load.) A new window should open and look
like Fig. 27.
16
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
3(a). Create named selections for the geometry: We will label each boundary in the geometry
by creating named selections for the pipe inlets, exits, walls etc. (as they are named with
green in Fig. 1).
i. For this action, single button must be clicked (fig. 28). Select the large inlet in the
geometry that is displayed in the ANSYS Meshing application. (Fig. 29).
ii. Right-click and select the Create Named Selection option. This displays the Selection
Name dialog box. (Fig. 30)
iii. In the Selection Name dialog box, "Inlet" for the name and click OK.
iv. Perform the same operations for other surfaces as named in fig .1.
The named selections that you have created appear under the Named Selections item in
the Outline view (fig. 31). It also helps you whether you have named a surface more than
once, as you can see that "Inlet Wall" has been created twice. So, it can be deleted by the
"Delete" option as shown in fig. 31.
17
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
18
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
3(b). Create named selection(s) for the fluid body: We will label fluid domain. Create a named
selection for the fluid body.
i. Change the selection filter to Body in the Graphics Toolbar (fig. 32).
19
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
ii. Click the elbow in the graphics display to select it. The whole domain turns green
(fig. 33)
iii. Right-click, select the Create Named Selection option and name the body Fluid.
20
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Note: By creating a named selection called Fluid for the fluid body you will ensure that ANSYS
Fluent automatically detects that the volume is a fluid zone and treats it accordingly.
3(c). Set the basic Mesh Parameters: For this analysis, we will adjust several meshing
parameters to obtain a finer mesh. (These are introduced for future references)
i. In the Outline view, select Mesh under Project/Model to display the Details of
“Mesh” view below the Outline view.
ii. Expand the Sizing node by clicking the “+” sign to the left of the word "Sizing" to
reveal additional sizing parameters (Fig. 34).
iii. Expand the Quality node to reveal additional quality parameters. Change Smoothing
to High. (Fig. 34)
iv. Add a Body Sizing control.
A. With Mesh still selected in the Outline tree, click the elbow in the graphics
display to select it.
21
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
B. Right click in the graphics area and select Insert → Sizing from the context menu.
A new Body Sizing entry appears under Mesh in the project Outline tree
C. In the Outline tree, click the new Body Sizing control.
v. Click again Mesh in the Outline view and in the Details of “Mesh” view, expand the
Inflation node to reveal additional inflation parameters. Change Use Automatic
Inflation to Program Controlled.
3(d). Generate the Mesh: Right-click Mesh in the project Outline tree, and select Update in the
context menu.
Once the meshing is finished, the workbench project will show a tick mark at the right of
the geometry (fig. 35)
At this stage, we will leave the Workbench by exporting the mesh file after saving and will work
in FLUENT independently.
22
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Part 2
Exporting
and
Pre-processing
23
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
4. Export the mesh file: Save the project first and then export. (Fig. 36)
24
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
After saving, in the "Save as type:" dropdown box (fig. 37), choose "FLUENT Input Files
(*.msh)". Then browse the location and give it a meaningful name, e.g.
"Elbow_B4_Model".
5(a). Opening the mesh file: Now, it is the time for opening the file. This is very critical at this
point, as the file has been transferred from one program to another, so checking and
gathering information about everything is necessary. The mesh file can be opened from
File>Read>Mesh (fig. 39) and then from browser locate the mesh file, which has been
generated.
25
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
5(b). Checking and gathering all the information: First we check the mesh, by clicking
"Display" button (fig. 40) and then checking only the wall and clicking on "Display" as
shown in Fig. 41. It will show the meshed figure that has been exported here in Fluent.
26
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
27
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
First check the mesh size, by clicking the "Check" under "Mesh". (Fig. 43). The mesh
information will be displayed in "Console" (fig. 44). In this console, it is showing 19,275
cells.
28
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
29
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Then check the domain information, by Display>Info>Size (Fig. 45). The domain
information will be displayed in "Console" (fig. 46). In the console, the first paragraph
shows the Xmin, Xmax, Ymin, Ymax, Zmin and Zmax. These are very important to create any
surface for calculations.
5(c). Setting the solver: The inlet velocity will be set (later) as 0.01 m/s, which gives Reynolds
number as 1250 (laminar), so the model will be set as "Laminar" by clicking "Models" in
Tree window (fig. 47a), which will open "Viscous Model" window (fig. 47b), check
"Laminar" radio button and click on "OK".
(a) (b)
5(d). Setting the Material: The material means the fluid. It can be set by "Materials" in Tree
window (fig. 47.a), which will open "Materials" in Task page (fig. 48). In the problem
statement, it is clear that we will have to use water as the fluid. So, it will be set "Water"
as fluid, while "Air" is selected by default (fig. 48). It needs to be changed and it can be
done by opening "Create/Edit Material" window (fig. 49). Here, you find only "air" under
the "Fluent Fluid Materials" drop down box. To create water, click on "Fluent Database"
button, which will open "Fluent Database Materials" window (fig. 50). Find out "water-
liquid (h2o<l>)” from "Fluent Fluid Materials" selection box and then click "Copy".
Water now ill appear in "Create/Edit Material" window (fig. 51). Change the Viscosity
default value to 0.0008 as mentioned in the problem statement.
30
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
31
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
32
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
5(e). Setting the Boundary Conditions: Boundary conditions are the most important part of a
problem. All the fluid dynamics problem solve mass, momentum and energy equations,
which is similar among all, but the one that makes a problem different than others is
boundary condition. In this problem, it as one inlet and two exits and rest of them are
walls.
(i) Inlet: To set the inlet with a velocity of 0.01 m/s, select "Boundary Conditions" in
Tree (fig. 52), which will open "Boundary Conditions" in Task Page. Select "Inlet".
Change the type from drop-down box to "velocity-inlet", it will open (if it does not
open click on "Edit" button) the window (fig. 53) to edit the boundary conditions of
"Inlet". Change the velocity to 0.01 m/s, which will ensure laminar flow.
(ii) Small Exit: To set the small exit, change the type from drop-down box to "pressure-
outlet" and click on "Edit" button, it will open the window (fig. 54) to edit the
boundary conditions of "Small Exit". Change the gage pressure to 0. Do the same for
"Big Exit" as well.
(iii)Walls: The rest of the surfaces are treated as wall. Starting with "Inlet Wall", change
the type to "wall", it will open the window (fig. 55) to edit the boundary conditions of
"Inlet Wall". Keep everything as they are. Do the same for all other walls.
33
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
34
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
35
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
5(f). Setting the Solution Criteria: First, we need to set the method. By clicking "Methods" in
Tree, Task Page will show "Solution Methods" (fig. 56). In the Task Page, under Scheme
Drop-down box, select "SIMPLE" and "Second Order" in everything e.g. Pressure,
Momentum etc.
36
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
By clicking "Control" in Tree, Task Page will show "Solution Controls" (fig. 57). In the
Task Page, under "Under-Relaxation Factors" boxes, put 0.3 for "Pressure", 0.9 for
"Density", 0.9 for "Body Forces" and 0.7 for "Momentum".
(a) (b)
By clicking Monitors>Residual in Tree (fig. 58a), Task Page will show "Residual
Monitors" (fig. 58.b). In the Task Page, under "Residual Monitors" check the "Print to
Console" and "Plot" boxes. Make sure you set 0.001 for all four (e.g. continuity, x-
velocity, y-velocity, z-velocity) Residuals.
37
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
By clicking "Initialization" in Tree, Task Page will show "Solution Initialization" (fig.
59). In the Task Page, under "Solution Initialization" choose "Standard Initialization" and
put "0" for all the fields.
By clicking "Run Calculation" in Tree, Task Page will show "Run Calculation" (fig. 60).
In the Task Page, under "Run Calculation" put "1000" for "Number of Iterations" (this is
the number that the solver will iterate before convergence), "1" for "Reporting Interval"
(which means, the console will show the residuals in each iteration) and then click
"Calculate" button. Then the solver will start computation and residuals will be shown in
another window (fig. 61). It can be shown in fig. 61 that the residuals values are
decreasing, which means the solution is converging. The convergence residuals are set at
0.001, when all the parameters' residuals reach 0.001 or lower, the computation is
complete. It is found in that picture that the solver took 81 iterations for completion.
38
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
5(g). Saving case and data: Now, it is time to save the case and data before post-processing. To
do this, File>Write>Case & Data (fig. 62) and then save in the appropriate location in
browser, with a meaningful name "Elbow_After_Sim". The computer will save two files,
e.g. case and data.
39
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Part 3
Post-
processing
40
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
6. Checking the results: The first thing that needs to be checked is the mass and energy
conservation. As this problem has to temperature issue, thus no energy equation, we will
check only the mass conservation.
7. Presenting the results: In a 3-D problem, it is very difficult to see the result in volume. It
is wise to see the results in different surface, e.g. exits, center plane etc.
7(a). Creating mid plane: To see the static pressure or velocity in mid-plane, first we will have
to create the mid plane. Mid plane is parallel to y-plane. It is wise to check the Ymin and
Ymax again from fig. 46, and are found as Ymin = –0.05m and Ymax = 0.05m, so mid plane
should be at Y = 0, so the equation of that line should be y = 0.
Postprocessing>Create>Quadratic (fig. 64a) will open the "Quadratic Surface" window,
where you can see the text box for the input of an equation like,
A x² + B y² + C z² + D xy + E yz + F zx + G x + H y + I z + J = 0
41
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
(a) (b)
Figure 64: Creating Quadratic Surface
We can also check the existence of this plane in mesh display (fig. 65), by checking mid-
plane in "Surfaces" and checking only "Edges" in "Options" and "Outline" in "Edge
Type". You will be able to see the mid-plane with black lines in fig. 66.
42
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
Mid-plane
7(b). Displaying Static Pressure: In the "Postprocessing", from "Graphics" panel, choose
"New" from "Contour" drop-down box, it will open "Contours" window (fig. 67). Check
"Filled", "Node Values", "Global Range", "Auto Range" in "Options" Panel. In the
"Contours of", select "Pressure" from first drop-down box and "Static Pressure" from
second drop-down box, select "mid-plane" from "Surfaces". Click "Display" button, you
will be able to see the pressure contour (fig. 68).
43
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
44
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos
7(c). Displaying Velocity Vector: In the "Postprocessing", from "Graphics" panel, choose
"New" from "Vectors" drop-down box, it will open "Vectors" window (fig. 69). Check
"Global Range", "Auto Range" and "Auto Scale” in "Options" Panel. In the "Vectors of",
drop-down box select "Velocity" and in "Color by" select "Velocity..." from first drop-
down box and "Velocity Magnitude" from second drop-down box, select "mid-plane"
from "Surfaces". Click "Display" button, you will be able to see the velocity vector in
mid-plane (fig. 68).
8. Formatting the results: The legends in fig. 70 are in scientific format, which are little
inconvenient to realize. These values need to be in decimal for better understanding.
8(a). Formatting the results: Viewing>Graphics>Colormap (fig. 71) will open formatting
window (fig. 72), which is named as "Colormap" window. In the "Number Format"
panel, select "Float" in "Type" drop-down box and type or scroll-up to number "4" in
"Precision" and click "Apply". It will show the velocity vector in fig. 73
45
Copyright © 2019 by Dr. Jobaidur Khan
Prepared by:
Dr. Jobaidur Khan, Hasan Aqtash, Heeral Maderna, Benedict Cutri and Johan Marcos