0% found this document useful (0 votes)
396 views107 pages

c3 ANSYS Tutorials

This tutorial introduces 2D linear finite element analysis (FEA) of a cantilever beam using ANSYS. The tutorial guides the user through setting up the geometry, mesh, material properties, and applying a load to solve for deflection and stresses. Video tutorials are provided online to demonstrate each step. The tutorial is aimed at beginners to teach basic static structural analysis in ANSYS.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
396 views107 pages

c3 ANSYS Tutorials

This tutorial introduces 2D linear finite element analysis (FEA) of a cantilever beam using ANSYS. The tutorial guides the user through setting up the geometry, mesh, material properties, and applying a load to solve for deflection and stresses. Video tutorials are provided online to demonstrate each step. The tutorial is aimed at beginners to teach basic static structural analysis in ANSYS.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 107

EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

EGA324 ANSYS
TUTORIALS

Note: Up-to-date information on this module should always be on Blackboard and


announcements will be sent to your student email address, but you should also regularly check
blackboard.

Dr N Lavery (Module Coordinator)

Office A203 Engineering East


Office hours 9-10 Wednesdays
E-mail: [email protected]

1
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Contents
EGA324 ANSYS Tutorials ............................................................................................................. 1
Introduction ................................................................................................................................ 3
ANSYS Beginner Tutorials ............................................................................................................ 6
TUTORIAL 1 (Beginner) – 2D linear FEA Static Structural Cantilever Beam ............................ 7
TUTORIAL 2 (Beginner) – 2D linear FEA of plate with a Hole................................................. 14
TUTORIAL 3 (Beginner) – Cantilever Beam Modal Analysis ................................................... 19
ANSYS Intermediate Tutorials .................................................................................................... 22
TUTORIAL 4 (Intermediate) – 3D Laminar Flow in a Pipe ....................................................... 23
TUTORIAL 5 (Intermediate) – 2D Turbulent Flow over a backward facing step ...................... 34
TUTORIAL 6 (Intermediate) – 3D Transient Structural analysis of a Bridge ............................ 48
ANSYS Advanced Tutorials ........................................................................................................ 59
TUTORIAL 7 (Advanced) – 2D FLUENT to model of flow over NACA0012 aerofoil ................ 60
TUTORIAL 8 (Advanced) – 2D FLUENT model of boundary layer flow over flat plate ............ 73
TUTORIAL 9 (Advanced) – 2D ANSYS non-linear modelling of a uniaxial tensile test ............ 93
End of ANSYS Tutorials ............................................................................................................ 107

2
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Introduction
The way in which we are teaching ANSYS in EGA324 has changed this year. The EGA324
module runs on the 2nd term (TB2) from weeks 20 to week 33, with a 3 week Easter recess over
weeks 27-29.

The PC labs C102 and C103 in Engineering East are booked every Tuesday and Thursday
throughout term from 9-2, and the PCs in this lab all have the licenced ANSYS software. This is
different to the downloadable ANSYS version which is limited, so it is recommended that you
plan to undertake your modelling work on the College of Engineering PCs.

The ANSYS course runs in three phases (Beginner, Intermediate and Advanced) over the first
six weeks of term, with each phase repeated every Tuesday and Thursday over a 2 week period
up until the Easter recess. You have been pre-allocated a PC lab session which you will attend
with your group. If you feel the need to attend a repeat session please check with the module
coordinator, as due to ANSYS licencing restrictions priority will be given to students pre-allocated
to a given session.

Guided tutorials will be given in person by a lecturer and a demonstrator from 9-12, but after the
taught session you can stay on in the same lab for an additional 2hr period to practise and
undertake the tutorial tests and additional exercises.

From week 27 onwards most students are expected to be running the models on their own
accord and to be preparing for the final report (assignment C3) in which you will have chosen an
experiment form EGA324 (E1, E2 or E3) to validate against your ANSYS model.

For more details on the module, including allocation of groups for specific laboratories and the
laboratory schedule, see the course notes on Blackboard -> Information.

The ANSYS tutorials in EGA324

The tutorials given in this booklet have been selected to be more than just a preparation for the
computational assignment in the module, but also a stepped and gentle introduction to the
powerful modelling capabilities within ANSYS, which will be useful in the future for you as
mechanical engineers. To this extent some additional modelling capabilities (e.g. 3D CFD and
Structural models, non-linear material properties and models, modal and transient structural
analysis) have also been included.

Each tutorial has the following structure:

1. Problem Specification
2. Pre-Analysis & Start-Up
3. Geometry
4. Mesh
5. Physics Setup
6. Numerical Solution
7. Numerical Results
8. Verification & Validation
9. Exercises
10. Comments

3
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

At the end of every PC Laboratory you will undertake a short online test on the tutorials you have
undertaken. These will graded with a P/F criteria.

Online Content

Step-by-step narrated video captures can be found on Blackboard -> Videos and e-lectures,
as well as being on the EGA324 YouTube channel. There is also CampusBlog available through
the Blackboard -> Entry point with these videos embedded in the tutorials.

TUTORIAL 1 (Beginner) – 2D linear FEA Static Structural


Cantilever Beam

https://youtu.be/HPqIl8hKCuA

TUTORIAL 2 (Beginner) – 2D linear FEA of plate with a Hole

https://youtu.be/4s7IXXs9K-8

TUTORIAL 3 (Beginner) – Cantilever Beam Modal Analysis

https://youtu.be/mFDpuYStsRQ

TUTORIAL 4 (Intermediate) – 3D Laminar Flow in a Pipe

https://youtu.be/RgK9ghNtuwg

TUTORIAL 5 (Intermediate) – 2D Turbulent Flow over a


backward facing step

https://youtu.be/x6XheeaJwNE

4
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 6 (Intermediate) – 3D Transient Structural analysis


of a Bridge

https://youtu.be/k0n-72Weo7w

TUTORIAL 7 (Advanced) – 2D FLUENT to model of flow over


NACA0012 aerofoil

https://youtu.be/h6OGr4oOAA4

TUTORIAL 8 (Advanced) – 2D FLUENT model of boundary


layer flow over flat plate

https://youtu.be/VudpapuAal0

TUTORIAL 9 (Advanced) – 2D ANSYS non-linear modelling of


a uniaxial tensile test

https://youtu.be/WfUTNWRe2P4

Additional Tutorial Resources

http://expertfea.com/tutorials.html

http://aerodoodle.swan.ac.uk

https://confluence.cornell.edu/display/SIMULATION/Home

http://www.ansys.com/en-gb/academic/free-student-products/support-resources

Free CFD and modelling software:

https://www.simscale.com/dashboard/

http://airfoiltools.com/

https://openfoam.org/

http://www.easycfd.net/index_files/Page377.htm

5
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

ANSYS BEGINNER
TUTORIALS

6
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 1 (Beginner) – 2D linear FEA Static


Structural Cantilever Beam

The original version of this tutorial can be found at:


https://confluence.cornell.edu/display/SIMULATION/ANSYS+-+Cantilever+Beam

This problem is a very basic example of Euler-Bernoulli beam theory. For more information on
solving the theoretical solution revise your Stress Analysis notes or follow the link above. Here,
we will use ANSYS to calculate the deflection and bending stresses.

1 Open ANSYS Workbench

2 From the toolbox on the left-hand side, double-click on


Static Structural to add this system to the Project
Schematic. Rename it ‘Example 1 – Cantilever Beam’

You can also drag and drop an analysis system into the
Project Schematic. You have to drag it into the area
highlighted by the green box that will appear.

3 Double-click Engineering Data on the system you have just added.

Once it opens, resizing the windows to view all the rows/columns may help. You can reset
the layout any time by View  Reset Workspace.

4 Notice the tabs at the top. Project is the main “home” screen, A2: Engineering Data is
what we have just opened. Notice the two options underneath: Filter Engineering Data
and Engineering Data Sources.

If you only have Filter Engineering Data selected, it will show you which material(s) is
assigned to your study. Structural Steel is already added by default. To add, change or edit
a material, click on Engineering Data Sources. Familiarise yourself with the windows that
appear, but we will come back to this in later tutorials. For this tutorial, we will just use the
default Structural Steel.

5 Go back to the Project tab.

Geometry

6 ANSYS has multiple graphics and solver “apps”. In the version of ANSYS in the PC labs,
double-clicking Geometry will automatically open a new ‘DesignModeler’ window. This is

7
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

where we will draw our geometry.

If you are using the downloaded student version (please only do this for practice, always do
your work in the PC labs), Geometry may automatically open a different graphics app
called ‘SpaceClaim’. If so, right-click on Geometry and select New DesignModeler
geometry to make sure you are using the same version as the PC labs.

7 This is where we can draw 1D, 2D and 3D objects for analysis. You can also import
drawings from Solidworks or other 3D design programs here (File  Import). We are going
to analyse a very simple cantilever beam with a point load at one end, and there are
several ways we could do this. We could draw the object in 3D using sketches and
extrudes (i.e. a volume) and give it a 3D mesh. This is too complicated/computationally
expensive for such a simple problem. We could draw the beam as a 2D sketch (i.e. a
surface) and tell ANSYS to give it a constant thickness, which simplifies the problem
somewhat. Or, we can simply draw a 1D line and assign a constant cross section; a much
simpler solution and perfect for such a basic analysis.

8 Notice on the left-hand side of the DesignModeler screen


the tabs Sketching and Modelling. Get used to switching
between them.

9 In the Graphics Window use the X/Y/Z axis controller to


look directly at particular planes. E.g. click on Z to align
to the XY plane. Hold down the middle mouse
button/scroll wheel to rotate around in 3D. Click the light
blue sphere to go back to isometric view.

10 Before we draw anything, make sure you are using the correct units. Click Units at the top
of the screen and change it to Millimetre if not already selected.

11 Using the X/Y/Z axis controller, click on Z to align to the XY


Plane. (Or, in the Tree Outline, right-click XYPlane  Look
At)
12 Go to the Sketching tab. Notice the horizontal tabs Draw,
Modify, Dimensions, Constraints, Settings. Open
Settings. Click on Grid. Tick the box Show in 2D to turn on
the grid on the current plane. Also tick Snap to snap to the
grid lines.

13 Go to Draw and click on Line. Hover over the origin and click to begin drawing, draw the
line any distance along the X axis (keep it horizontal) and click again to finish. Press Esc on
the keyboard to finish the sketch (you may have to wait half a second, make sure your
cursor is now an arrow and not a pencil symbol).

14 Go to Dimensions  General, click once on the line and click again to place the
dimension (it is not hold-and-drag). When you place the dimension, the line details will
appear in the Details window (bottom-left of the screen). You can change the dimension
here. Set the length to 4000 mm. Use the Zoom to Fit button if this disappears off the
screen. Press Esc twice to deselect everything. The grid may disappear because you are
zoomed out so far.

8
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

15 This is just a sketch. We need to generate a line body. At


the top of the screen, click Concept  Lines from
Sketches. Click to select your line, then click Apply in the
details window. The lightning-bolt symbol shows that this still
needs to be generated, so click the Generate button
near the top of the screen or right-click Line1 
Generate in the Tree Outline. In the Tree, you should now
have 1 Part, 1 Body (Line Body) with a green tick next to it.

16 We need to define the cross-section of the beam. Click Concept  Cross Section 
Rectangular. The details of the cross section are in the Details window (bottom-left of the
screen). Set the base B to 300 mm, and the height H to 300 mm. Use Zoom to Fit. Note
that it doesn’t matter what plane we define the cross-section on, we are not drawing on the
same sketch as our line.

9
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

17 In the part tree, expand 1 Part, 1 Body and click to select


Line Body. In the Details window, there should be an option
to define Cross Section (highlighted yellow). Click where it
says Not Selected and use the drop-down arrow to choose
Rect1, or whatever the cross section you just defined has
been called.

18 Click the light blue sphere on the axis control in the Graphics
window to go to isometric view. At the top of the screen click
View  Cross Section Solids to show the beam with the
assigned cross section in 3D. Note that although these
graphics will make our solution appear 3D, we are still only
solving a 1D problem.

19 File  Save Project and close the DesignModeler window.

Meshing

20 Double-click on Model in the Project Schematic. This will open ANSYS Mechanical. You
will use this window for all the remaining steps.

21 There are already default mesh settings; the lightning bolt symbol shows that they have not
been applied yet. Click to select Mesh in the Tree Outline. Click Update near the top of the
screen to apply the default mesh.

22 Use View  Thick Shells and Beams to toggle between the “3D” and line/nodes view.

Note this operation has a different name in the Mechanical solver window to the
DesignModeler window.

23 Click to select Mesh in the Tree Outline and note the Details window. There are some
options to change the style of the mesh (not recommended at this stage), but there is a
more controlled way of changing the mesh details.

24 With Mesh selected, go up to the toolbar above the Tree Outline and click Mesh Control
 Sizing. A sizing control is added to the Mesh in the Tree Outline.

25 We need to define which aspect of the geometry this sizing control will apply to. We only
have a single line, but you could use these controls to add different sizing/refinements to
specific points, lines, surfaces or volumes of a more complex part. Click where it says
Geometry: No Selection (highlighted yellow) in the Details window. In the upper toolbars,
click the button that allows us to select Edges (lines) . Hover over your line in the
Graphics window so it turns dashed red, click to select it, then click Apply. Change Type
from Element size to Number of divisions from the drop-down list. Change the number of
divisions to 10. Update the mesh again.

10
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

26 Use View  Thick Shells and Beams to toggle between the “3D” and line/nodes view, to
see the number of elements you have. Turn it off so we are looking at the line only.

Boundary Conditions

27 Now we need to apply fixtures and loads. In the same window, select Static Structural in
the Tree Outline.

28 In the upper toolbar, click Supports  Fixed Support. We need to select the node at the
left hand side of the line, so make sure we click the button that will allow us to select a
Vertex (point/node) .

29 Hover over the end of the line and the point should turn black. Click once to select it, and
the point will turn green. In the Details window click Apply to apply the fixed support to this
end of the beam.

30 Click Loads  Force. Using the same technique, Apply the


load at the other end of the beam. In the Details window,
change Define By to Components, and add a Y
component of -8000 N. Here, it must be negative. A red
arrow will show you in which direction the force is acting.

Solution

31 At this point it might seem appropriate to right-click on Solution and click Solve (F5). A
progress bar will appear until the solution is completed. After this it will appear that nothing
has happened, but that is because we haven’t yet told ANSYS what results we want to see.

32 Click to select Solution in the Tree Outline. Near the top of the screen you have options to
insert deformation, strain, stress, etc. results. Click Deformation  Total. It will add this
result to the Project tree, but you must right-click and Evaluate All Results to solve it. You
should now see a deformed beam in the Graphics window. You can change the

11
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

deformation scale in the upper toolbar, and toggle between 3D and line view as before. The
numerical result is given in the scale at the side of the Graphics window, and also in the
Tabular Data beneath.

33 With Total Deformation selected in the Tree Outline, you can view the mesh and the
colour contours, plus the original undeformed shape, at the same time by playing with the
Edges options in the upper toolbar .

34 Obviously we can add other stress, strain results to our


studies in the same way. In this particular case you will
notice most options are greyed out and can’t be added. This
is because we are modelling a very basic 1D beam. To
analyse the stress and strain we must add a Beam Tool.

Select Solution in the Tree Outline. In the upper toolbar


(just above the Tree Outline), click Tools  Beam
Tool (NOT the Tools menu right at the top of the screen).
Some results are already added by default and you can
select more. Click to select Beam Tool in the Tree Outline.
From the upper toolbar you can now add Stress 
Maximum Bending Stress and also Stress  Minimum
Bending Stress. Right-click, Evaluate All Results. Select
them in turn to view the stress contours in the Graphics
window.

35 Try to interpret the maximum and minimum bending stress results. The maximum bending
stress occurs at the fixed support which we would expect, where the top edge of the beam
is being pulled in tension away from the support. The stress at the free end of the beam is
so small it is effectively zero.

The minimum bending stress initially looks like there is a high stress at the free end, but
check the values – again the value here is effectively zero. The largest minimum stress
occurs at the fixed end and is equal to the maximum stress, except it is negative. This is
because it is a compressive force pushing the underside of the beam into the fixed support.
Because we have analysed this in 1D only we cannot see the stress difference between
the top and underside surfaces of the beam, and must rely on our theoretical
understanding in this instance.

12
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Modelled 1D stress at fixed end (constant along Y):

Actual 2D stress distribution at fixed end (linear from + tensile to – compressive):

36 Save, close, and then open back up just to check. If you get an error message about files
missing, it’s probably ok but you may have to re-run the solution.

Try Yourself:
• Increase the number of mesh elements and re-solve. Does it have much effect on
the total deformation and/or stress results?
• How does the maximum stress compare with the Yield Strength and UTS of steel?
Are we in danger of causing plastic deformation or failure at this load?
• What force do you have to apply to be in danger of yielding?

13
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 2 (Beginner) – 2D linear FEA of plate


with a Hole
The original version of this tutorial can be found at:
https://confluence.cornell.edu/display/SIMULATION/ANSYS+-+Plate+With+a+Hole

1 Create a new project, save it as ‘Example 2 – Plate with Hole’.

2 From the toolbox on the left, add a Static Structural analysis system into the Project
Schematic. Rename it ‘Example 2 – Plate with Hole’

3 Double-click Engineering Data. This time we’ll add Aluminium Alloy to the study as well as
the default Structural Steel, which should already be included. Select the Engineering
Data Sources button at the top of the screen. Select General Materials from the top
window and then Aluminium Alloy from the middle window. Click the Add button to
add this material to our study. Deselect Engineering Data Sources and you should see
that both Aluminium Alloy and Structural Steel are now assigned to this study.

4 Close Engineering Data tab and/or switch back to the main Project Schematic tab.

Geometry

5 BEFORE DRAWING ANYTHING right-click on


Geometry in your static structural system, select
Properties, and change the Analysis type from
3D to 2D.

6 Now double-click Geometry to open DesignModeler.


(Remember to right-click and manually select DesignModeler instead of SpaceClaim if
using the free-download version on your own device.)

7 Set the Units to Millimetre.

8 Switch to the Sketching tab  Settings  Grid  Show in 2D ✓, Snap ✓. Look at the
XY plane to begin sketching.

14
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

9 Notice that the geometry of the specimen is symmetrical in two planes. Therefore, we can
save ourselves some computational processing time by only drawing ¼ of the geometry
and later telling ANSYS where the lines of symmetry are.

10 Click Draw  Rectangle. Starting at the origin, draw a rectangle approximately twice as
long as it is tall. Now Draw  Circle, and draw a circle with a midpoint at the origin.

11 We can remove the unwanted lines using the trim function:


Modify  Trim. Click one-by-one on the parts of lines that
are not required (shown in red on the sketch here). It is
sometimes difficult to see whether horizontal/vertical lines
have actually been deleted due to the grid, so turn grid off
if it helps.

12 Dimensions  General. Click to add a dimension line to the top horizontal line of the
rectangle, then the right-hand vertical line, then the radius of the circle. In the details
window (bottom-left of screen) set the dimensions to H1 = 120, V1 = 60, R1 = 5 (mm).

If you have not done the sketching/trimming/dimensioning in the appropriate order,


changing the dimensions may result in bad geometry. If so, just delete the whole sketch
and start again.

13 Before the geometry is complete it must be turned into a surface. Click Concept 
Surfaces From sketches. In the Tree Outline window, expand out XYPlane and click to
select Sketch1 (the whole sketch you have just drawn). In the Details window below, click
Apply next to Base Objects. Set the Thickness to 2 mm. Finally, click Generate to
generate a surface. It should be filled grey in the graphics window.

14 Save, and close DesignModeler.

Meshing

15 In the Project Schematic, double-click Model to open the Mechanical solver.

16 Check that your Units are Metric (mm…)

15
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

17 Right-click Mesh in the Tree Outline and


Generate Mesh to see the default mesh. It is
quite coarse so we want to refine it first across the
whole surface, and then around the hole edge to
give us greater accuracy in the region where the
stress will be concentrated.

18 Select Mesh in the Tree Outline and add a sizing


control by clicking Mesh Control  Sizing, or by
right-clicking and Insert  Sizing. In the details
window, click on No Selection next to Geometry.
Now click the Face selection button near the top
of the screen . Click on the surface of the
specimen in the graphics window and then Apply
in the details window. Change the element size to
5 (mm) and re-generate the mesh.

19 Now we will refine the mesh around the hole. There are at least two ways to do this:
i. Add another sizing control. This time, click the Edge selection button and Apply it
to the circular edge of the hole. In the details window you can then choose Type 
Element Size and set the elements to a specific size (e.g. 1 mm), or choose Type 
Number Of Divisions to set a specific number of mesh elements (e.g. 20). Re-
generate the mesh.

or…

ii. Add a refinement control (Mesh Control  Refinement). Click the Edge selection
button and apply it to the circular edge of the hole. Then simply change the
Refinement Factor in the details window as required. Re-generate the mesh.

Whichever one you did, delete it and try the other way.

Boundary / Symmetry Conditions

In this example, the plate is pulled in tension from both ends. There is no need to add a
fixed support, the symmetry will take care of that.

20 In the Tree Outline, select Model. In the toolbar above, click the button labelled Symmetry
to add this to the tree (alternatively, right-click Model  Insert  Symmetry).

21 Select the newly created Symmetry option in the Tree Outline and click Symmetry
Region from the toolbar. In the details window, click where Geometry – No Selection is
highlighted yellow, click the Edge selection button and select the left-hand edge of the
specimen (above the hole). Click Apply. The option Symmetry Normal should be set to
X-Axis.

16
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

22 Add another Symmetry Region, and apply it to the bottom edge of the specimen. Change
Symmetry Normal to Y-Axis.

23 Now add a pressure load. Select Static Structural in the outline tree. Click Loads 
Pressure from the toolbar. Apply it to the right-hand edge of the specimen and set the
magnitude to -750 MPa in the details window.

(We are working with pressure partly because the original problem defines the load
conditions in this way, and partly because in materials testing it is sometimes useful to work
with a controlled force-per-unit-area loading condition than an arbitrary force value.)

Solution

24 Before solving, we need to define the desired results. Select Solution in the Tree Outline
and click Deformation  Total. Similarly, add the Maximum Principal Stress and
Minimum Principal Stress.

There are more clever things you can do here such as inserting a polar coordinate system
to find the radial stresses. This will be covered in one of the more advanced tutorials,
although you can find instructions via the link to the original online tutorial.

25 Click the Solve button (or right-click on Solution  Solve).

17
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

26 Select the Total Deformation result to view


the deformed shape. In the toolbar at the
top, find the Show Undeformed Wireframe
button to view the original shape
compared to the deformed shape. Animate
the solution by clicking Play in the Graph
window at the bottom.

27 View the stress results. Is the maximum


stress (pictured) in the expected place?

Note that the minimum principal stress (not


pictured) is actually a compressive stress
(negative) in the middle of the plate caused
by the deflection of the top surface. We
wouldn’t have identified this from the
previous result alone.

28 Write down your total deformation result. In


the Tree Outline, expand Geometry and
select Surface Body. In the details window,
change the Material Assignment to
Aluminium Alloy. Run the solution again
and compare the deformation results.

Try Yourself:
• Change your mesh sizing options to make the mesh more coarse or more fine. Re-
evaluate your solution. Do the deformation and stress results still return very similar
values? If so your solution is sufficiently refined. Meshes that are too coarse or too
dense can be equally problematic.
• Go back and change your radius dimension in the geometry to make the hole smaller or
larger. How does this affect the deformation and stress?
• Change the pressure direction so that the plate is being compressed. How do the
stresses compare to the same pressure value in tension?

18
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 3 (Beginner) – Cantilever Beam Modal


Analysis
The original version of this tutorial can be found at:
https://confluence.cornell.edu/display/SIMULATION/ANSYS+-
+Cantilever+Beam+Modal+Analysis

Let’s calculate the natural frequencies of the cantilever beam, fixed at one end, that we drew in
Tutorial 1. Furthermore, let’s visualise what the vibration looks like at each of these frequencies
(it’s “mode shapes”). The theory behind this is a simple example you will have encountered in
Dynamics.

When following these instructions be aware of the difference between selecting “Model” or “Modal”!

1 We have already drawn the geometry required for this study in Beginners Example 1. Open
that project in ANSYS Workbench.

2 Add a Modal analysis system to the project alongside the existing Static Structural system.

3 We can share the geometry from the Static


Structural analysis with the Modal analysis.
Click and hold Geometry in the Static
Structural system, drag it across to Geometry
in the Modal analysis system, and release. A
connection will be created.

4 Double-click Model in the Modal analysis system to open ANSYS Mechanical

5 From the Tree Outline, Generate the default mesh.

6 Add a Sizing control to the mesh. Remember to choose the Edge selection tool to
enable you to Apply the control to the line geometry. In the details window change Type to
Number Of Divisions, and Number = 20. Re-generate the mesh.

7 Use View  Thick Shells and Beams to toggle between 3D and line/node view.

Boundary Conditions

8 In the Tree Outline, select Modal. Click Supports  Fixed Support. As in example 1,
Apply a fixed support to the left-hand end of the beam. Remember to use the Vertex
selection tool .

9 There is no need to apply any loading or excitation in a simple modal analysis like this. But
in order to simplify the result it will be useful to solve only 2D vibrations, so we will restrict
the degrees of freedom to the XY Plane only.

19
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

10 Select Modal in the Tree Outline and click


Supports  Displacement. Select
Displacement in the Tree Outline and, using
the Edge selection tool, Apply it to the
beam/line. In the details window, set Z
Component to 0 and leave the X and Y
Components Free.
Solution

11 The mode shapes are defined by the deformation of the object, so this is the only result we
need to add. However, we need to add a separate deformation result for each mode shape
we wish to see.

12 Select Solution in the Tree Outline. Add a


Deformation  Total. Right-click and
rename it “Total Deformation Mode 1”. In the
details window make sure Mode is set to 1.
Right-click Total Deformation Mode 1 and
duplicate it five times, then rename as
required so that you have a list from Mode 1
to Mode 6. Select each in turn and change
the Mode value in the details window so that
it corresponds with the name.

13 Solve.

14 Click on each of the Total Deformation results in turn to see the corresponding mode
shapes. In the Graph window at the bottom, animate the results using the Play button .

What do the results tell us?

The deformation highlights the shape formed by each mode of vibration - the object’s ‘natural
frequencies’. The Frequency (Hz) value given both in the Graphics window and Tabular Data
tells you how many oscillations of that pattern occur per second. In a basic modal analysis like
this, the frequency is what we are interested in calculating. From this we can determine whether
sources of excitation such as footsteps or rotating machinery are likely to match and cause
resonance.

The displacement value (mm) in this instance is meaningless; there is no way to calculate an
actual displacement unless a specific load is given. This is relative displacement, i.e. the
displacement at any point can be compared relative to the maximum, although the maximum
itself is a value determined by the solver algorithm so that the model is ‘mass normalised’.

20
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Try Yourself:
• Under Modal in the Tree Outline, select Analysis Settings and increase the Max
Modes to Find. Add deformation results and view some of these mode shapes.

21
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

ANSYS INTERMEDIATE
TUTORIALS

22
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 4 (Intermediate) – 3D Laminar Flow in


a Pipe
A 2D axis-symmetric version of this tutorial can be found at:
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow

We will keep the same dimensions and flow conditions, but this tutorial will be done in 3D
instead, to add to your increasing levels of skills in ANSYS. The flow problem to be solved is
laminar, but this always needs to be checked by assessing the Reynolds number. In this tutorial
you will learn to

• Create a FLUENT analysis desktop project from scratch.


• Create 3D geometries in DesignModeler.
• Mesh your 3D model in the Desktop meshing tool.
• Work with FLUENT to select models and modify fluid properties
• Apply boundary conditions within FLUENT.
• Run a FLUENT analysis.
• Post-process a FLUENT analysis (vector plots, contour plots).
• Compare results to an analytical solution.

Problem specifications and preliminary considerations


A fluid with density of 1 kg/m3 and dynamic viscosity 2X10-3 kg/m.s flows through a pipe of
diameter D=0.2m and length L=3m. The inlet flow of 1 m/s can be considered to be constant
across the cross-section.

V = 1 m/s D P = 1 atm

L
First, check the Reynolds number,

̅𝐷
𝜌𝑉 1×1×0.2
𝑅𝑒𝐷 = = = 100 Equation 4.1
𝜇 2×10−3

̅ is the average velocity at the inlet. Due to the conservation of mass (one of the Navier-
where 𝑉
Stokes equations), mass is conserved at any cross-section down to the pipe 𝑚̇ = 𝜌𝑉 ̅𝐴, so while
the velocity profile may change, the average velocity remains constant. So 𝑅𝑒𝐷 <2300 thus the
flow is Laminar, and this will justify the use of a Laminar flow model in FLUENT.

Consider what you would expect from the solution of this problem. Assuming that the flow is axis-
symmetric At any point in the domain there are three unknowns, a velocity vector (𝑣𝑧 , 𝑣𝑟 ) and
pressure P – all dependent on location (r, z) within the domain.

23
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Does the velocity stay constant? No – it will change. Because of the requirement that the velocity
should be zero at the wall, the inlet velocity profile does not satisfy this condition. To this extent,
the velocity profile will develop into a fully developed profile.

This problem is actually one of the few flow problems which has an analytical solution which can
be derived from the Navier-Stokes equations, through simplifications based on the various
assumptions in the problem (laminar, steady state, axisymmetric and incompressible). The fully
developed profile can be solved for and results in a parabolic velocity (you will have seen this in
EG265 Fluid Mechanics 2):
𝑣𝑧 𝑟 2
̅
= 2 × [1 − ( ) ] Equation 4.2
𝑉 𝑅

From the analytical solution,


𝑑𝑃 ̅
8𝜇𝑉 ̅
32𝜇𝑉
=− 2 =− Equation 4.3
𝑑𝑧 𝑅 𝐷2

Therefore, the pressure is,

𝑑𝑃 𝑃𝐼𝑁𝐿𝐸𝑇 −𝑃𝑂𝑈𝑇𝐿𝐸𝑇
= Equation 4.4
𝑑𝑧 𝐿

Thus,
̅
32𝜇𝑉
𝑃𝐼𝑁𝐿𝐸𝑇 − 𝑃𝑂𝑈𝑇𝐿𝐸𝑇 = ∆𝑃 = 𝐿 Equation 4.5
𝐷2

Does the pressure remain constant? There is no change in pressure in the radial direction, but
there will be a constant pressure gradient in the axial direction for a fully developed pipe flow,
due to skin friction at the wall. Dig out your notes for EG265 (Lecture 5) – what is the pressure
loss equation and how does the friction factor come into it?

ANSYS Tutorial Steps

1 Open ANSYS Workbench.


2 Select a analysis from the
Toolbox, and drag onto the Project Schematic .
Rename if you wish.

Geometry

24
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

3 Open Geometry to start preparing the domain. Check


the units are meters. As the geometry is simple in this
case, one can use the Create->Primitives -> Cylinder
(as shown) or one could also create a sketch and rotate
around an axis.
We will just use the Cylinder primitive route here, so go
ahead and create a cylinder with the base plane
XYPlane, FD8, Axis Z Component of 3m, and a FD10,
Radius of 0.1m.
When finished click .

4 Now this geometry will have added the cylinder as a


solid material, so we need to change this so that it will
be a fluid.
If you click on the Solid body in the DesignModeler Tree
Outline, you can change this from Solid to Fluid, but you
will have to change the name manually, E.g. call it
“Fluidregion”.

5 You can now close DesignModeler (it will auto save),


and in the project Schematic of the workbench project
you will now have a tick for the Geometry.

Meshing

6 Double click on Mesh to bring up the


meshing tool.

7 You can hit the to see what


the default mesh might look like, but as you
can see this is relatively coarse and the
elements at the centre of the pipe are quite
skewed – this is not conducive to a good
result.

8 There are a number of different ways to


improve mesh quality.

25
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

First, select Mesh on the branch, and under


Mesh->Sizing->Use Advanced Size
Function->On: Proximity and Curvature.
Underneath, select Mesh->Sizing-
>Relevance Center->Medium.
and you will see that this
makes the mesh slightly finer.

9 One this we can do in this instance we can


add an Inflation branch to the Mesh, by right
clicking on Mesh->Insert->Inflation.

10 Select Inflation branch, select the front


circular face (not the body) Scope-
>Geometry select front face. Then under
boundary select the edge of the circle.
Keeping to the default options, and clicking
on you will see that the
mesh now has a number of element layers
away from the circular wall.
These finer elements will capture the faster
changes in the velocity profile coming away
from the no-slip (V=0) conditions at the wall.
You will also note at this point that we have
stuck with using hexahedral elements. This is
deliberate, as other element types (e.g.
tetrahedral) do not always give the best
results in CFD solutions, even though they
are much easier to mesh with.

Boundary Conditions

INLET OUTLET
V = 1 m/s P = 1 atm

V=0 m/s (no slip)


11 The final step in the meshing tool is to
select boundaries at which we will want to
apply boundary conditions within
FLUENT.
As, by default FLUENT treats unassigned
surfaces as wall surfaces with no-slip
boundary conditions, there is no need to

26
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

name a surface entity for the outside wall.


Select the front surface and right click on
“Create Named Selection” call this
OUTLET.
Then repeat with the back surface and
call this the INLET.
These will be easier to identify within
FLUENT.

12 Now close down the meshing


tool. (You may have to right
click and update the project to
get the ticks to all show-up as
green).
When this is the case, you will
be ready to double-click on
Setup to start the FLUENT
analysis.

13 Click OK to proceed at the


next window.

14 The FLUENT environment


should open as shown.

You can see the mesh outline,


and highlighted in blue is the
INLET, and highlighted in
RED is the OUTLET.

15 Clicking on Models shows that


the default models have been
selected, particularly the
Laminar viscous model.

27
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

16 Clicking on “Boundary
Conditions” shows that
FLUENT has picked up on an
inlet region, an interior region,
an outlet region and a wall
region. You can use a
“highlight Zone” to check
these allocations.

17 To set the boundary


conditions at the INLET,
select edit, and then set the
velocity as 1 (m/s). Leave the
Gauge Pressure as it is at 0.
This will set the velocity at all
nodes of the inlet to be 1, but
the pressure is not fixed. This
will change as the solution
progress and converge to a
final pressure distribution.
18 At the OUTLET we will specify
a pressure-outlet boundary
condition. In this case we will
stick to the default which is to
have a zero gauge pressure
(i.e. atmospheric).

Do we have to specify a pressure boundary condition at the inlet as well as the outlet?

Fluid/Materials Properties

As specified for this problem we need a fluid with density of 1 kg/m3 and viscosity 2X10-3
kg/m.s.

19 By default, FLUENT uses Air


as fluid medium, but under

Materials->Change/Create

you can access a large Fluent


Database with many
properties.
If you change the type of
modelling you are undertaking
(e.g. you add a thermal
model) additional properties
become available for your
material.
20 When you access the database or change a properties, a local copy of the material is
associated with the project. In this case, you will need to change the density to 1 kg/m3
and viscosity 2X10-3 kg/m.s.

You can either change the name of your medium or leave it as air. Its just a name.

28
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

When you close this window the properties will be allocated.

Solution

11 Having selected the model, set the boundary conditions end fluid properties, we should
be ready to run the analysis.
To do this you can click on Solution Method and see a number of algorithmic choices
which you will not need to change.
12 The first thing to do before we can
ruin the analysis is to initialize the
solution – this sets variables across
the domain to a certain initialisation
point. The default is the Hybrid
Initialization and all you are expected
to do at this step is hit the Initialize
button, which if successful should
yield a “hybrid initialization is done”
message.

13 Now click on Solution->Run


Calculation, and change the number
of iterations to 100. This should be
enough to get convergence for this
analysis.

When done, click on Calculate to start


the analysis.

14 In the view port window 1 you should


see Scaled Residuals plotted in real
time as the analysis progresses.
The graph data is echoed on the
screen below.

You can see that there are 4 residual


quantities being plotted, one for the
continuity equation, and 3 (x-, y-, and
z-) terms for the velocity components
of the momentum equations. These
are directly based on the Navier-
Stokes equations.

You should also find that convergence

29
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

occurs relatively fast after 33


iterations.

You can now close the FLUENT client


and it will automatically save it on the
ANSYS workbench.

15
Post-processing

There are a couple of ways of processing results, which results of the legacy of FLUENT
prior to being built into ANSYS. FLUENT has quite a powerful post-processing set of
tools which allows you to plot vectors, contours, streamlines and particle tracks.
However, we will use the ANSYS post-processor (CFD-Post) to look at the results, which
can be accessed by double clicking on Results:

26 When the CFD-Post opens up double


click on WireFrame and click on
“Show Surface Mesh” and this will
show the external mesh used for the
analysis.

17 What we will do is look at the solution


on a plane in a first instance as this
makes it easier to visualise. So go to
Insert->Location->Plane to create a
Plane 1. Align this with the y-z plane
and we can look at the velocity and
pressure in the flow direction.

18 Disable the “Show Surface Mesh” and You can clearly see a development of the
align the viewing direction to look velociteis from the INLET (on the right) towards
down the x-axis. Then go to Insert- the OUTLET (on the left).
>Vector to create a Velocity Vectors
Instance. Choose the location as The velocities appear to reach a fully developed
Plane 1, and click Apply. This will state within about 0.4m from the INLET.

30
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

create vectors coloured by magnitude.

19

20 You can play with the settings to


change the arrow length,
normalisation of arrow heads etc. Plot
the grid on the Plane.
This will allow you to visualise the
vectors a bit better close to the area
where they are developing.
At any point you can click on the
Outline to enable/disable particular
components of the plot.

21 Now let’s plot some contours. In the


same way Insert->Contour to create
a Contour 1 component.

This clearly shows the pressure drop


from the INLET on the right to the
OUTLET on the left, and it shows that
drop in pressure is linear, and there is
no variation in pressure in the radial
direction, as expected from the
analytical solution.

22 In a similar way to vectors and


contours, you can also plot
streamlines. Can you do this yourself?

Again note clearly the change in the


streamlines as the velocity becomes
fully developed.

Validation

We will use equation1 for the velocity profile to compare to the FLUENT solution. You
will need to open an excel spreadsheet, and plot equation 1 with 𝑉̅ = 1 (m/s) and
R=0.1m. Increment r by 0.01m from -0.1 to +0.1, as shown below.

31
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Now we need to extract the data


from the post-processor to be able
to do a direct comparison. We will
do this be creating a line (Insert-
>Location->Line) at the OUTLET.
Use the coordinates for the two
points as:

X1=0, Y1=-0.1,Z1=3
X2=0, Y2= 0.1, Z2=3

FLUENT Versus analytical


solution plotted in Excel.

What do the results tell us?

Try Yourself:
• Go back to the meshing and increase the number of elements, what effect has this
got on the velocity profile? Try 3 levels of refinement.
• What happens to the pressure drop as you refine the mesh? What is the analytical
value of the pressure drop predicted by Equation 4.5?
• What happens as you increase the velocity? Try velocities which give Reynolds
numbers of 400, 600 and 800. How does the analytical pressure drop compare to the
numerical one?

Questions for online test:


• At the beginning of this tutorial the demonstrator will have given you a unique INLET
velocity to run. What was it?
• What is the Reynolds number for this velocity?
• What is the analytical pressure drop for this velocity? (Pa)

32
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

• What is the simulated pressure drop? (Pa)


• What is the difference between the analytical and simulated maximum velocity at the
outlet? (m/s)

33
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 5 (Intermediate) – 2D Turbulent Flow


over a backward facing step

This is a classic CFD problem for which there are many numerical and experimental publications.
NASA has a dedicated benchmark page with data for this problem (at various Reynolds
numbers) at:

https://turbmodels.larc.nasa.gov/backstep_val.html

The original version of this tutorial can be found at:

https://www.learncax.com/knowledge-base/blog/by-category/cfd-software-tutorials/tutorial-cfd-
simulation-of-backward-facing-step

The Youtube video of this tutorial can be found at:

https://youtu.be/x6XheeaJwNE

We will keep the same dimensions and flow conditions, but this tutorial will be done in 3D
instead, to add to your increasing levels of skills in ANSYS. The flow problem to be solved is
laminar, but this always needs to be checked by assessing the Reynolds number. In addition to
what you have learned so far, in this tutorial you will learn to

• Create a FLUENT analysis desktop project from scratch.


• Create 2D geometries and surfaces from sketches in DesignModeler.
• Mesh your model in the Desktop meshing tool.
• Work with FLUENT to select a turbulence models and modify fluid properties
• Apply boundary conditions within FLUENT.
• Run a FLUENT analysis.
• Post-process a FLUENT analysis (vector plots, contour plots).
• Compare results to experimental data.

Flow enters the domain from the left, passes over the step, and because of the sudden
expansion, the pressure gradient causes the flow the detach creating a recirculation zone. The
main flow eventually re-attaches itself to the wall down-stream from the step.

Flow
in
Flow
Recirculation zone
out

Wall
Re-attachment length

34
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

For this particular problem we will use the following. The inlet velocity is 0.3781 m/s, the inlet
length is 0.4m, passing over a step height of 0.04m (call step height H). The outlet is located
1.6m from the step, the inlet height is 0.2m and the outlet height is 0.24m. The fluid flowing over
the step has a density of 1.23 kg/m3 and viscosity of 1.86 X10-5 Ns/m2. The dimensions are
shown in the sketch below (not to scale).

Wall
D=0.2m INLET
OUTLET

H=0.04m

Wall

0.4m 1.6m

First, to check the Reynolds number, note that the units of viscosity (Ns/m2) and (kg/m.s) are
equivalent units of dynamic viscosity, the Reynolds number based on the inlet height is

̅𝐷
𝜌𝑉 1.23×0.3781×0.2
𝑅𝑒𝐼𝑁𝐿𝐸𝑇 = = = 5000.67 Equation 5.1
𝜇 1.86×10−5

It should be noted however, that for the backward facing step problem, the step height is usually
taken as the characteristic length scale, in which case the Reynolds number is
̅𝐻
𝜌𝑉 1.23×0.3781×0.04
𝑅𝑒𝐻 = = = 1000.14 Equation 5.2
𝜇 1.86×10−5

On this basis, the flow coming in at the INLET is most likely to be turbulent. We will use this as a
justification for running the model with a turbulence model, but for comparison to other data, you
will need to pick work with Re=1000 (based on step height). This is a common difficulty in
comparing with non-dimensionalised data by other workers.

ANSYS Tutorial Steps

1 Open ANSYS Workbench.

35
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

2 Select a analysis from the


Toolbox, and drag onto the Project Schematic .
Rename if you wish.

Geometry

3 Open Geometry to start preparing the domain. Check


the units are meters.

Align the view direction to look down the z-axis.

In this case we will create 3 sketches, using each


containing a rectangle. Click on the sketch and then on

the in the Tree Outline to bring up


the Sketching tool box. You can create lines, circles,
rectangles etc., much the same way as you would of in
Solidworks.

Under settings you can create a background grid, size it


and show it on the window. You can make sure that
points snap to this grid.

Make the major grid spacing 0.2.

For sketch1 – create a rectangle for the inlet (see below


region 1), for sketch2 create a rectangle for the main Sketch 1
flow (region 2) and for sketch 3 create a rectangle for
the step (region 3).

You can use Dimensions to change the rectangle sides


after drawing on the screen – so for example, sketch 1 Sketch 2
would have H8=0.4m and V7=0.2m as per problem.

For each sketch, use Concept-> Surfaces from


Sketches, so create 3 surface bodies. Do not forget to
click after each time. Also, you will need to
change SurfaceSk->Operation to “Add Frozen” Sketch 3
otherwise the surfaces will be stitched together, and in
this case we actually want the flow domain to remain as
rectangles for generating a specific meshing.
4 If all goes well, you should end up with 3 “Surface Body”
under the Part of the Tree Outline, which will look as
below.

36
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

An IMPORTANT step here is to select all 3 “Surface


Body”s in the tree outline, and righ clicking form them
into a single Part. This makes sure that even though
the geometry is made up of sepparate rectangles, at
the time this gets passed to FLUENT it will understand
that these rectangles are connected.

Anotehr IMPORTANT thing to do here is to click on the


new part and change the Fluid/Solid detail to Fluid.

5 You can now close DesignModeler (it will auto save),


and in the project Schematic of the workbench project
you will now have a tick for the Geometry.

Meshing

6 Double click on Mesh to bring up the


meshing tool.

7 If things have gone ok, you should have a


Part with 3 Surface Bodies.

8
We are going to create groups of equal edge
sizings to create a “structured”-type grid of
quadrilateral elements.

First, select Mesh on the branch, and under

37
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Mesh->Insert->Sizing.

For Sizing, select the 3 edges (keep the


control button to select multiple edges).
Change the Type to “Number of Divisions”,
make this 30. “Behaviour” should be hard,
and then change the “Bias Type” to
. Finally, change the Bias
Factor to 4.

9 This should give the divisions shown above.


So, now repeat the step for 3 other groups of
divisions, namely (4,5), (6,7,8) and (9,10).

For Mesh-Sizing of (4,5) use 60 divisions, Behaviour: Hard and No Bias.

For Mesh-Sizing of (6,7,8) use 160 divisions, Behaviour: Hard and No Bias.

For Mesh-Sizing of (9,10) use 20 divisions, Behaviour: Hard and No Bias.

Once all the opposing sides have been given


equal divisions, make sure that the mesher
know that you want a structured mesh by
right click on Mesh (Mesh->Insert->Mapped
Face Meshing), and make sure that you
selected all three rectangular surfaces.
If you click and you will see a
mesh as below. Choosing the number of

38
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

divisions per face like this will ensure that the


mesh is structured.

Boundary Conditions

Wall
INLET
OUTLET

Wall

The final step in the meshing tool is to select boundaries at which we will want to apply
boundary conditions within FLUENT.

As, by default FLUENT treats unassigned surfaces as wall surfaces with no-slip
boundary conditions, there is no need to name a surface entity for the walls.

Select the RHS line and right click on “Create Named Selection” call this OUTLET.
Then repeat with the LHS line and call this the INLET.

These will be easier to identify within FLUENT.

39
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

12 Now close down the meshing tool.


(You may have to right click and
update the project to get the ticks to
all show-up as green).
When this is the case, you will be
ready to double-click on Setup to
start the FLUENT analysis.

13 Click OK to proceed at the next


window.

14 The FLUENT environment should


open as shown.

You can see the mesh outline, and


highlighted in blue is the INLET, and
highlighted in RED is the OUTLET.

15 Clicking on Models shows that the


default models have been selected,
particularly the Laminar viscous
model.

You will now go and change this to


a Turbulence model by clicking on
Viscous and selecting k-epsilon (2
eqn).

Under k-epsilon Model select


“Realizable”.

Under near-wall Treatment, select


“Enhanced Wall Treatment”.

To find out more about these


models, you can click help and
read-up more about Turbulence
models, but for now, no other
choices will be change here, so you
can move to the next step.

40
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

16 Clicking on “Boundary Conditions”


shows that FLUENT has picked up
on an inlet region, an interior region,
an outlet region and a wall region.
You can use a “highlight Zone” to
check these allocations.

17 To set the boundary conditions at


the INLET, select edit, and then set
the velocity as 0.3781 (m/s). Leave
the Gauge Pressure as it is at 0.

You will also see that there are


some requirements for boundary
conditions for the Turbulence
model.

Here you will select “Intensity and


Hydraulic Diameter” as input
specification, and the values of 5%
for the Turbulence intensity, and a
Hydraulic diameter of 0.2m.

18 At the OUTLET we will specify a


pressure-outlet boundary condition.
In this case we will stick to the
default which is to have a zero
gauge pressure (i.e. atmospheric).

Here again, we need boundary


conditions for the Turbulence
model, so select “Intensity and
Hydraulic Diameter” as input
specification, and the values of 3%
for the Turbulence intensity, and a
Hydraulic diameter of 0.24m.

Having entered turbulence parameters for boundary conditions at both the inlet and
outlet is a bit unnatural. How did we know what to put in here?

Fluid/Materials Properties

As specified for this problem we need a fluid with density of 1.23 kg/m3 and a dynamic
viscosity 1.86 X10-5 kg/m.s.

41
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

19 By default, FLUENT uses Air


as fluid medium, but under

Materials->Change/Create

You can access a large Fluent


Database with many
properties.
If you change the type of
modelling you are undertaking
(e.g. you add a thermal
model) additional properties
become available for your
material.
20 When you access the database or change a property, a local copy of the material is
associated with the project. In this case, you will need to change the density to 1.23
kg/m3 and viscosity 2X10-5 kg/m.s.

You can either change the name of your medium or leave it as air. Its just a name.

When you close this window the properties will be allocated.

Solution

11 Having selected the model, set the boundary conditions end fluid properties, we should
be ready to run the analysis.
To do this you can click on Solution Method and see a number of algorithmic choices
which you will not need to change.
12 The first thing to do before we
can ruin the analysis is to
initialize the solution – this sets
variables across the domain to a
certain initialisation point. The
default is the Hybrid Initialization
and all you are expected to do
at this step is hit the Initialize
button, which if successful
should yield a “hybrid
initialization is done” message.

42
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

13 Now click on Solution->Run


Calculation, and change the
number of iterations to 700. This
should be enough to get
convergence for this analysis.

When done, click on Calculate


to start the analysis.

14 In the view port window 1 you


should see Scaled Residuals
plotted in real time as the
analysis progresses.
The graph data is echoed on the
screen below.

You should also find that


convergence occurs relatively
fast after 108 iterations.

You can see that there are now 6 residual quantities


being plotted, one for the continuity equation, and 3
(x-, y-, and z-) terms for the velocity components of
the momentum equations. These are directly based
on the Navier-Stokes equations.

You can now close the FLUENT Additionally, there are now 2 more equations being
client and it will automatically solved for the turbulence model, the k-equation (for
save it on the ANSYS turbulence kinetic energy) and the epsilon-equation
workbench. for the turbulence dissipation.

15
Post-processing

There are a couple of ways of processing results, which results of the legacy of FLUENT
prior to being built into ANSYS. FLUENT itself has quite a powerful post-processing set
of tools which allows you to plot vectors, contours, streamlines and particle tracks.
However, we will use the ANSYS post-processor (CFD-Post) to look at the results, which
can be accessed by double clicking on Results:

18 Go to Insert->Vector to create a You can clearly see a development of the

43
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Velocity Vectors Instance. Choose the velociteis from the INLET (on the left) towards
location as Plane 1, and click Apply. the OUTLET (on the right).
This will create vectors coloured by
magnitude.

19

You can play with the settings to change the arrow length, normalisation of arrow heads
etc. Plot the grid on the Plane. This will allow you to visualise the vectors a bit better
close to the area where they are developing. At any point you can click on the Outline to
enable/disable particular components of the plot.

Zooming in shows the vectors circulating in the re-circulation zone.

20 Now let’s plot some contours. In the Pressure (P):


same way Insert->Contour to create
a Contour 1 component.

This clearly shows the pressure drop


from the INLET on the right to the
OUTLET on the left, and it shows that
Velocity magnitude (v):
drop in pressure is linear, and there is
no variation in pressure in the radial
direction, as expected from the
analytical solution.
Turbulence kinetic energy (k):
We can also plot up contours of
velocity magnitude, turbulence kinetic
energy and turbulence energy
dissipation.

Turbulence Eddy Dissipation (epsilon):

44
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

22 In a similar way to vectors and


contours, you can also plot
streamlines. Can you do this yourself?

Again note clearly the change in the


streamlines as the velocity becomes
fully developed.

Validation

As a way of validating our results we will look at the wall shear stress in the x-direction,
which is given by

𝜕𝑢
𝜏𝑤 = 𝜇 ( )| Equation 5.3
𝜕𝑦 𝑦=0

This is a quantity which is calculated by FLUENT. In the above equation, µ is the


dynamic viscosity, u is the flow velocity parallel to wall (in the +ve x-direction) and y is
distance to the wall. The higher the velocity gradient near a wall, the higher the shear
stress, and a negative shear stress will indicate a –ve flow i.e. flow in the –ve x-direction.
Thus, the wall shear stress can be used as a precise way of determining the length of
the re-ciculation zone.

Now we need to extract the data from


the post-processor to be able to do a
direct comparison. We will do this be
creating a line (Insert->Location-
>Line) along the bottom wall,
specifically between the points A and
B above:

A X1=0.4, Y1=-0.04, Z1=0.0


B X2=2.0, Y2=-0.04, Z2=0.0

Use a sample type line with 1000


samples.
The next step is to plot the wall shear
stress along this line. To do so create
a chart (Insert->Chart), Under Data
Series, select location Line 1. For the
X Axis, select Variable X, and for the
Y Axis select Wall Shear X. Then click
Apply.

45
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

What do the results tell us?

The x-axis shows the distance from the bottom corner of the step towards the outlet. The
change in sign of the shear stress indicates a change in velocity direction (in this case at
about x=0.55m). The maximum wall shear stress (~0.0006Pa) occurs roughly at x=0.74.
This means that the flow re-attaches itself at this point, which is 0.74-0.4 = 0.34m from
the step.

Recirculation zone

Wall
Re-attachment length = 0.34m, i.e. 8.5 times the step height.
As can be seen from the comparison to the results from reference [1], the re-circulation
length predicted by FLUENT (9.5H) is significantly lower than 13H predicted by [1].

There are a number of reasons why this could be:

• One reason could be that the velocity profile used at the inlet was not fully
developed, and the length of inlet prior to step was possibly too short. Ertuk et al
[1] recommend using a fully developed velocity profile at the inlet.
• They also used at least 20H (i.e. 0.8m) of inlet length prior to the step which is
twice what we used.
• The mesh could definitely be more refined in the region of the step.
• The k-epsilon model may under predict the re-circulation area, and other models,
such as the k-omega

Results from reference [1]

46
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Try Yourself:

• Go back to the meshing and increase the number of elements, what effect has this
got on the recirculation length? Try 3 levels of refinement.
• What happens as you increase the velocity? Try velocities which give Reynolds
numbers of 600, 1500 and 3000.
• What happens if you change the turbulence intensity in the INLET boundary
conditions?

Questions for test

• What is the Reynolds number based on step height using the same density and
viscosity for the inlet velocity given to you in the class?
• When using the wall x-direction wall shear stress to determine the re-attachment
length, explain why this is occurs at the position of maximum shear stress and not
the location at which the shear stress changes from negative to positive?

References

[1] E. Erturk / Computers & Fluids 37 (2008) 633–655

47
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 6 (Intermediate) – 3D Transient


Structural analysis of a Bridge

This tutorial will use a Transient Structural analysis in ANSYS and will be done in 3D instead, to
add to your increasing levels of skills in ANSYS. The problem is not based on any real problem
but creates a 3D bridge and applies a load moving across the span. In this tutorial you will learn
to

• Create a work bench Transient Structural analysis from scratch.


• Create 3D geometries in DesignModeler.
• Mesh your 3D model in the Desktop mechanical.
• Work with ANSYS Mechanical to apply boundary conditions.
• Use tabular formats to apply time-dependent boundary conditions.
• Run a mechanical
• Post-process a structural analysis (Deformation, Von-Misses stress contour plots).
• Create an animation video.

Problem specifications and preliminary considerations


We will consider a concrete bridge similar to the one pictured below, but with simplified arches
and geometry for the purpose of the tutorials. A distributed load of 10kN (over 30m2) will be
moved along the top of the road in six 1 second steps. The dimensions of the bridge are shown
below.

40m

5m
10m

6m 10m
3m

48
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Geometry
We will start with 3 simple sketches, which we will convert into 3 surfaces. The dimensions to use
here are L1=L2=5m, and H3=10m.

We will then use the Create->Pattern (Pattern Type: Linear, Offset 20m, Copies 1) to replicate
and merge these 3 surfaces into a single surface (1 below) and positioned to left hand side of y-z
plane:

We will now mirror surface 1 (Create->Body Transformation->Mirror) back across the y-z
plane to create a second surface (2).

49
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

A second mirror operation back across the y-z plane, this time coupled with a merge operation
will result in the single surface (2 & 3) shown below:

This has created a single Surface Body in the parts section of the Tree Outline. We will now
extrude this surface using Create->Extrude by 10m in the z-direction to give us the main 3D
Solid body part of the bridge.

To create the road which runs across the top, we will create a new plane (Plane 5) on one of the
ends of the bridge. With the plane created, you can sketch a rectangle as shown which is 8m
long and 1m high, with the top in line with the original solid.

50
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

We will now extrude (Create->Extrude) this sketch in the x-direction, but this time we will use the
extrusion to cut through the main 3D solid.

This is the final solid body we will use for the analysis, but we now need to create a path for the
loading. To do this, we will create another plane on the road surface (Plane 5), and on that plane
we will create a series of rectangles as before (I did not pay much attention to sizes here, just
that there should be six approximately equal sized patches along the road). You will then make
these into a surface using “Concept->Surface from Sketches”.

We will now Imprint these surface onto the body so that we can use them to apply the boundary
conditions later on. This we do by using “Create->Body Operation” with Type “Imprint Faces”
and Target Bodies “All Bodies”. A final step is to “Suppres” all surface Body types in the part
section of the Tree Outline, which can be done by righy clicking on each one. This should just
leave a single Solid body, and the boundary condition patches imprinted on the top surface.

51
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Material Properties
In ANSYS Workbench the properties which are allocated to a material determine the type of
modelling and are selected and modified within the main Project Areas of Workbench by clicking
on Engineering Data.

By clicking on Engineering Data Sources, you can access the library/database of existing
materials. Look for Concrete under General Non-linear Materials, and hit the Add button to make
a copy of this material back to your model (as shown above).

Model and Meshing


In ANSYS Workbench mechanical Transient Structural (and Static Structural) analysis, the
meshing, boundary conditions and model set-up and running all take place in the same location
“Model”. By double clicking on the Model you will open up the “Mechanical” environment, and the
project will be outlined below.

52
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

The first thing to do is to allocate the material you have selected from the database (in this case
the properties of Concrete), and this can be done by clicking on Solid in the Project outline, and
then assigining the material “Concrete NL” to the material. You can disable Nonlinear Effects and
Thermal Strain Effects here so that we restrict the analysis to a linear analysis.

The next step is to create a suitable mesh, and check that the surface patches we created in the
last step of the geometry are indeed on the mesh. Click on the Mesh part of the Outline, and then
goto “Use Advanced Size Function” and enable “On: Proximity and Curvature” – this will make
sure that features in the geometry will be refflected in the mesh. You will also need to change the
“Relevance centre” to Medium in order to get a slightly finer mesh.

As you can see the meshing has


defaulted to tetrahedral elements,
and by clicking on Outline->Mesh-
>Statistics” you can find out exactly
how many elements, which turns
out to be 71417 elements.

This may be too many elements for


the Student licence, so you may
have to reduce this to proceed with
this tutorial. You can reduce the
number of elements by either
changing the relevance centre to
Coarse, or overriding the minface
or element sizes inserting a Mesh-
>Sizing select body and choose a
larger minimum element size.

You can also faintly see from the mesh patterns on the road surface, that the imprinted patches
which have been included in the meshing.

Once you are happy with the mesh, we need to move to the next step which is to create the
boundary conditions for the analysis.

Boundary conditions and Analysis Settings


The first thing to do here is to set the “Analysis Settings”. We will have 6 Steps for the analysis;
each will have a step time of 1s and use “Auto Time Stepping”. You can access the individual
step settings by either clicking on the Graph tab, or changing the Current Step Number to the
one you wish to look at.

53
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

We will now create 1 fixed support (Transient->Insert->Fixed Support) which will fix the bases of
the upright columns.

We will now create 6 force loads (Transient->Insert->Force) which will be enabled at different
steps of the analysis for surfaces B, C, D, E, F and G to replicate the motion of a load from right
to left over the bridge.

For each Force load we create, we have various options. You will need to choose the Magnitude
to be created from Tabular data. You will need to select the Direction of application of the force
(to do this simply chose one of the sides of the uprights and make sure the force is pointing
downwards or in negative y-direction).

54
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

For each of the Faces B->G, create a separate force, and the Force magnitude in tabular format
as shown in the table below. Use a peak loading of 1X107 N = 10000 kN.

Step 1 – B Step 2 – Face C Step 3 – Face D … Step 6 – Face G

As the steps progress the load is ramped up and down on either side, which in combinations
gives the approximation of a load continuously moving across the bridge. Better patching and
timing of the loads will give a better approximation, but this tutorial is simply for demonstration of
the capability.

At this point we are ready to hit the solve button, and the solution should take a couple of
minutes.

Solution Post Processing


The purpose of this tutorial is primarily to introduce you to a transient structural stress analysis,
which you will use in more detail for the Stress Concentration Modelling in the advanced tutorial.
Being able to set boundary conditions and transient analysis time steps is part of the learning
curve at this stage, and less on the validation of this example, which was not selected to be
particularly representative of a real problem.

In any stress analysis, the first thing to look at is the stress distributions, and this is usually done
by looking at the Von-Misses stress. Right click on the Solution branch on the Project Outline and
“Insert->Stress-> Equivalent Stress (Von Misses)”.

You can show the contours on the undeformed geometry or on a geometry which is scaled by a
multiplication factor by the predicted deformation. This is useful to see if the geometry is
deforming as expected in areas of high loading or stress.

The stress contours at each of the 6 steps are shown on the undeformed geometry below.

55
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

STEP 1

STEP 2

STEP 3

STEP 4

STEP 5

STEP 6

56
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

The contours of total deformation (in meters) are shown below. Note that maximum deformations
for the loading used are of the order of 0.0016m, i.e. 1.6mm, so this bridge is in no danger of
collapsing under the applied loads.

STEP 1

STEP 2

STEP 3

STEP 4

STEP 5

STEP 6

57
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

As mentioned earlier, this tutorial was primarily a demonstration of a transient structural analysis
in ANSYS, and not meant to be a simulation of a real problem so there is no real validation
required at this stage.

Things for you to try out


Try to increase the load to see at what stage the bridge would see real deformation. Remember
that the peak loading you used was Use a peak loading of 1X107 N = 10000 kN, but that this was
spread over 30m2.

58
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

ANSYS ADVANCED
TUTORIALS

59
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 7 (Advanced) – 2D FLUENT to model


of flow over NACA0012 aerofoil

This tutorial is partly based on the SimCafe (Cornell) tutorial:

https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Flow+over+an+Airfoil

However, the flow domain has been modified so that the flow is within a conduit of similar
maximum dimensions to those you will find in the AF100 Subsonic Wind tunnels.

The tutorial builds on the previous tutorials in the Intermediate course, particularly using ANSYS
FLUENT with a turbulent flow model. In addition to what you have learned so far, in this tutorial
you will learn to

• Create geometries and surfaces with sketches by importing geometry from a coordinate
file in DesignModeler.
• Mesh your model in the Desktop meshing tool.
• Work with FLUENT to select a turbulence models and modify fluid properties
• Apply boundary conditions within FLUENT.
• Run a FLUENT analysis.
• Post-process a FLUENT analysis (vector plots, contour plots).
• Create and use parameter sets to run parametric studies (e.g. change inlet velocity or
angle of attack)
• Compare results to experimental data.

Problem specifications and preliminary considerations


In this problem we will model the 2D flow over an aerofoil located within the test section of a
wind-tunnel, specifically the subsonic AF100 Wind Tunnel of the college of Engineering which
you will use in experiment E1 shown below (source of images is the AF102 User Manual).

The test section is taken to be 0.6m long by 0.3m high. Although the test section has a 0.3m
width, the foil stretches from one side to the other, so a two dimensional analysis is possible.
Inlet airflow velocities between 5 m/s and 30 m/s will be simulated. The foil can be rotated about
the central axis to vary the angle of attack which will also be varied in the simulation.

60
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

The objective of the this tutorial is do develop flow models to simulate and validate the
experiment, specifically lift and drag forces as a function of Angle of Attack (AoA) (0° to 20°) and
the wind velocity (10-30 m/s). Thus within the model we need to be able to vary these input
parameters within the same range.

First, we need to check the Reynolds number ranges, and we can use the default dynamic
viscosity and density of air used by FLUENT, or you can use those you determined during the
experiment. Note the Reynolds number for an aerofoil is based upon Chord length, i.e. c=0.1m.

̅𝑐
𝜌𝑉
𝑅𝑒𝑐 = Equation 7.1
𝜇
This gives us a range of Reynolds numbers above 50,000 and below 200,000, which you will
need to calculate exactly for each wind velocity you test in the validation.

The lift and drag coefficients can be determined once you know your lift and drag forces, and are
given by:
𝐹𝐿 𝐹𝐷
𝐶𝐿 = 1 ; 𝐶𝐷 = 1 Equation 7.2
𝜌𝑉2 (𝑏𝑐) 𝜌𝑉2 𝐴
2 2

Where b=span=0.3m, c=chord=0.15mand A=projected area.

While the primary objective of the computational validation will be to compare your own
experimental data, this experiment (aerofoil NACA0012 and subsonic wind Tunnel) is a classic
benchmark experiment, so you are expected to be able to find many references to cross-check
your results with. Specifically, you are given an old report by Gregory et el, [1], in which one
specific graph compares the lift coefficient. In particular we are interested in the AoA versus lift
coefficient

You are expect to extract data for an appropriate Reynolds number from this graph for the range
of AoA, and directly compare to your own lift coefficient plots (experimental and simulated).

61
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Tutorial 7 (Part 1)

Geometry
We will start with creating the aerofoil profile.

To create the aerofoil profile:

• Go to the website
(http://airfoiltools.com/plotter/index?airf
oil=naca0012h-sa)
• Create the NACA0012 foil section
• Export as a .csv file
• Open Excel, manipulate into columns
with all text proceeded by a hash tag
(#). The file should have the following
format:
• # Title
• #Group Point X_cord Y_cord Z_cord
• Export as a tab delimited text file.
• For the purpose of this simulation you
can use the file provided to create the
aerofoil profile.

NACA0012_Airfoil_Profile alpha=0.txt

In ANSYS workbench

• Create a “CFD (Fluent)” analysis.

• Open the DM geometry

In DM Geometry

• Create 3D curve (Concept-> 3D Curve)

• Import the txt file


(NACA0012_Airfoil_Profile_alpha=0.txt
”) for the foil coordinates and make
sure coordinate units are mm.

• Create a Plane4 of type “From


Coordinates”, and locate at X=0.03m
and Y=0m.

• Convert the 3D curve to an aerofoil


surface (Concept -> Surfaces from
edges). Select the Line Body for the
edge.

62
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

• Use Create->Body
Transformation->Rotate on the
foil surface and Z-axis of Plane 4 to
rotate through an angle (choose -5°
at first).

• Create Sketch1 with rectangle on the


XY-Plane representing the wind tunnel
test section (600mm long X 300mm
tall)

• Create a surface using Concept-


>Surface from Sketch1

• Use a Boolean subtract to the foil


surface (as a tool) from the test section
rectangular surface

• Select the flow volume surface and


select Fluid/solid as Fluid

• Right click on “Line Body” and choose


“Supress Body” as we no longer need
the aerofoil line.

• Test the rotation of the aerofoil through


various angles of attack to check that it
stays within the test section.

• Example below shows the aerofoil


rotated at an angle of attack of -20°

• Change it back to -8° for the rest of this


tutorial

Meshing

For this simulation we are going to use triangular elements, although these are not really the
best for flow simulations, they are easier to mesh around more complex geometries.

• Click on “Mesh” on the Outline and


under Sizing, select Use Advanced
Size Functions -> On: Proximity and
Curvature.

• Still on Mesh sizing set the relevance


centre to Fine (you can also chose
Medium or Coarse)

• Right click on Mesh to Insert-> Mesh

63
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Method and select the entire


“Geometry->Surface Body” and choose
Methods: Triangles

• Using Mesh->Insert->Refinement –
select the line boundary of aerofoil, and
choose 3 levels of refinement

• You should now see a mesh like the


one to the right.

Boundary Conditions

For the boundary conditions in this problem, we have no-slip or u=v=0 at the walls (including
the aerofoil surface), and we have a velocity boundary condition at the INLET. We need to
identify the OUTLET as a boundary condition, but all we really know at the OUTLET is that
because it is that mass is conserved.

Wall
INLET OUTLET
Type: Velocity Type: Outflow
Velocity: V=10 m/s Turbulence Intensity: 3%
Gauge Pressure: 0 Foil_Wall Hydraulic Diameter: 0.3m
Turbulence Intensity: 5%
Hydraulic Diameter: 0.3m

Wall

Before we leave the meshing tool we need to identify the boundary.

Remaining within Meshing Tool:


• Select left line boundary, create named
selection INLET

• Select right line boundary, create


named selection OUTLET

• Select foil boundary, create named


section Foil_wall

64
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

In FLUENT Analysis

• Double click set-up to launch FLUENT


[OK]

• Choose the k-epsilon model, but leave


all options as default.

• Go to boundary conditions and check


that the INLET is set as a “Velocity-
inlet” type boundary condition with
velocity set at 10 m/s

• Leave the Gauge Pressure as it is at 0.

• You will also see that there are some


requirements for boundary conditions
for the Turbulence model.

• Here you will select “Intensity and


Hydraulic Diameter” as input
specification, and the values of 5% for
the Turbulence intensity, and a
Hydraulic diameter of 0.3m.

• Check that the OUTLET boundary


condition is set as “Outflow” type

• Check that both the foil_wall and the

65
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

outer walls of the test section have the


“no slip” boundary condition

• Initialise the solution

• Run the analysis for 500 iterations


(click Calculate)

Post Processing

Close FLUENT (default close should save to the ANSYS project workbench) and double click
on Results to open CFD-POST.

In Results (CFD – Post)

• Double click results to launch CFD-


POST

• Create a contour plot in the “symmetry


1” surface for velocity.

• Change the variable to plot a contour


of Pressure

66
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

• Create a Streamline plot

• Create a vector plot

• Enable vectors and zoom to see re-


circulation areas close to the aerofoil
surface

• Create a Polyline 1 (Insert->Location-


>Polyline) Method Boundary
Intersection between “Symmetry 1” and
“foil_wall”.

• Create chart at Location “Polyline 1” to


using Series 1 and X-axis Variable X
and Y-axis Variable Pressure to see
plot of pressure over the foil. Where is
the peak pressure upper or lower side?
Use the 3D contour plot to help you.

• On expressions tab, right click to


create a new expressions called
Xforce with the following script
““force_x()@foil_wall”. Do the same
with Yforce: “Yforce
force_y()@foil_wall”.

• Evaluate Xforce and Yforce to see total


x-(drag) and y-(lift) force components
on Foil_Wall boundary, e.g yforce=-
113.501N.

• The X-force on the foil gives you the


drag force in Newtons for the current
AoA and INLET velocity simulated.

• The Y-force on the foil gives you the lift


force in Newtons for the current AoA
and INLET velocity simulated.

• Note that the Y-force is negative (i.e. in


the downward direction) because of the
way in which we chose the rotation (-

67
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

8°). You will need to change the sign of


this when plotting forces on the same
graph.

Manipulating Multiple Analyses in Workbench

In the preceding part of this tutorial you have undertaken an analysis for a specific angle of
attack (8°) and a specific INLET velocity (U=10m/s). Of interest to the problem of determining
at which specific angle of attack stall occurs at a given Reynolds number it is necessary to
repeat this analysis for a range of values, for example (AoA=2°,6°, 8°,10°,12°,14°,16° and 18°) in
at the level of the GEOMETRY, and the other is to change the INLET velocities of U=10, 20 and 30 m/s
within FLUENT.

There are two ways to do this. One is to copy and paste the entire analysis in the WorkBench, and
individually change the parameters within GEOMETRY and FLUENT. This shown below:

You can then combine results into a single post-processer by linking into a single instance of
the “Results” tool.

The other way to vary the input parameters in a more automated manner in the last part of this
tutorial, namely using “Parameter Sets”.

Try for yourself


Single Analysis. Keeping a single INLET velocity of 10m/s, but with angles of angle of attack
of α=8°, 14° and 16° using three separate instances of the FLUENT analysis as described
above. Post-process the results and look at:
1) Aerofoil profile indicating the chord and the camber
2) Geometry indicating length and height of test section and AoA.
3) Mesh used for analysis indicating refinement level and number of elements
4) Geometry showing highlighted boundary conditions
5) Contours of velocity (include the legend)
6) Contours of pressure (include the legend)
7) Streamlines emanating from INLET
8) Velocity vectors (zoom in to the aerofoil to show vectors close to wall)
9) Graph of pressure over aerofoil, clearly indicating the section of graph corresponding to
the upper and lower sections of the aerofoil – can you compare all three analysis on a
single chart@?
Questions
a) What is the Reynolds number based on the INLET velocity and the aerofoil chord length?
b) What is the Mach number?
c) What are the lift and drag forces for this AoA?
d) What are the lift and drag coefficients for this AoA?

68
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

U=10m/s, AoA α=8°

U=10m/s, AoA α=14°

U=10m/s, AoA α=16°

Tutorial 7 (Part 2)

Using Parameter Sets

The parameter Set tab on the ANSYS workbench allows you to undertake parametric design
studies for parameters which have been set-up during the analysis.

69
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Create INPUT parameter In Geometry


Click on the box next to FD9 in the Rotate
tool to make the rotation angle an input
parameter

Create INPUT parameter In FLUENT


Edit the INLET boundary condition. Next to
the velocity box, there is a drop-down box
with an option to create “New Input
Parameter”.
This will pop up a box for which you can
set an initial value for this input parameter.

Create OUTPUT parameter In CFD POST


On expressions tab, right click to create a
new expressions called Xforce with the
following script ““force_x()@foil_wall”. Do
the same with Yforce: “Yforce
force_y()@foil_wall”.
Evaluate Xforce and Yforce to see total x-
(drag) and y-(lift) force components on
Foil_Wall boundary, e.g yforce=-113.501N.
Now, right click on each of these and
select as “use as Workbench Output
Parameter”, and a little P icon will appear
on that expression.
Output parameters have now been set-up
to extract from the FLUENT model the
forces on the “foil_wall” boundary, in the x-
and y-directions, which are the lift and drag
directions for this analysis.

70
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Going back to the Workbench, you will see


that there is now a Parameter Set Box with
red arrows in and out.
Double clicking on that box brings up the
Parameter Set view with two main
windows, an “Outline of All Parameters”
and a “Table of Design Points”.
You can see that the P3-Rotate1.FD9
parameter, which we created to represent
the Angle of Attack (AoA) is part of the
table.
With the table of design points, you can
change the AoA and run the analysis with
that value, without having to go into the
geometry and change it again.

Two input parameters and two output


parameters have been set-up,
1) INPUT: the angle of attack, AoA
2) INPUT: the INLET velocity
3) OUTPUT: the x-force on the foil wall
4: OUTPUT: the y-force on the foil wall

The input parameters can be varied in the


“Table of Design Points”, and the analysis
can be run for each and every parameter
without having to open/close FLUENT
each time. Be careful not to update the
table as the entire run can take a long time.
You can cut and paste the data in the
Table of Design Points straight into Excel.

Validation

You can take copy data directly from the table of design points into excel and create lift and
drag forces. A point to note here is that the X-force is the actual drag force, but to get the lift,
as the model is 2D (which assumes a 1m span of the foil into the paper), the simultion results
are valid for a foil with a 1m span, when in actual fact the experimental foil has a 300mm span,
so the results should be scaled by 0.3 (i.e. 300/1000).

71
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

The rest of the validation is left as an exercise which is required in the computational
validation aspects of assignment C3.
Questions
1) Mesh sensitivity (Coarse, Medium, Fine) – For the same AoA and velocity studied in
the first section, what effect does the refinement have on convergence? What effect does
refining the mesh have on calculated lift and drag forces?
2) Boundary Condition sensitivity. Run the NACA0012 model for angles of attack ranging
from α=0° to α=18°, with the three INLET velocities you used in the experiment (e.g.
U=10, 20 and 30m/s). Using the data in the parameter set, copy and paste into excel the
columns B (AoA), C (Inlet Velocity), D (x force) and E (y force). For each AoA calculate
the lift and drag coefficients, as well as the lift to drag ratio. Plot three graphs with AoA on
the x-axis versus, the lift coefficient, the drag coefficient and the lift to drag ratio. Include
on each graph a separate series for each of the velocities.
3) At what angle does the aerofoil stall? At which angle is the highest lift to drag ratio? How
does the experimental data compare to the computational data?
4) By comparing pressure plots over the foil at increasing AoAs, and the increasing re-
circulation zone with increasing AoA describe what happens to the flow over the foil and
what ultimately leads to the stall.
5) How does your data compare to the experimental data from Gregory et al,[1]? Be sure to
state which figure you are comparing data to, and also the relevant Reynolds number.
Are there any other references you could use?
References
[1] Low-Speed Aerodynamic Characteristics of NACA 0012 Aerofoil Section, including the Effects
of Upper-Surface Roughness Simulating Hoar Frost • By N.GREGORY and C. L. O'REILLY •
Aerodynamics Division, N.P.L. Reports and Memoranda No. 3726, January, 1970.

72
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 8 (Advanced) – 2D FLUENT model of


boundary layer flow over flat plate

A good tutorial for this problem can be found online at

https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Flat+Plate+Boundary+Layer

However, this tutorial uses a laminar model (not turbulent), and the geometry of the domain
studied is different to the one which is used in the tutorial below, which matches the domain of
the boundary layer experiment.

The tutorial builds on the previous tutorials in the Intermediate course, particularly using ANSYS
FLUENT with a turbulent flow model. In addition to what you have learned so far, in this tutorial
you will learn to

• Create geometries and surfaces with sketches in DesignModeler.


• Mesh your model in the Desktop meshing tool.
• Work with FLUENT to select a turbulence models and modify fluid properties
• Apply boundary conditions within FLUENT.
• Run a FLUENT analysis.
• Post-process a FLUENT analysis (vector plots, contour plots).
• Create user variables (normalised velocity) and export data to excel.
• Compare results to empirical BL thickness and experimental data.

Problem specifications and preliminary considerations


In this problem we will model 2D flow over a plate located within the test section of a wind-tunnel,
specifically the subsonic AF100 Wind Tunnel of the college of Engineering which you will use in
experiments E2, shown below (source of images is the AF106 User Manual).

As in the previous tutorial, the test section is taken to be 0.6m long by 0.3m high. Although the
test section has a 0.3m width, the plate stretches from one side to the other, so a two

73
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

dimensional analysis is possible. Inlet airflow velocities between 5 m/s and 30 m/s will be
simulated. The foils with the pressure taps are located as shown above, and for intent of the
analysis, the effect of the foils on the flow is assumed to be negligible. Although the plate can be
rotated about a central axis to vary the angle of attack this will not be changed in the experiment.

The objective of the this tutorial is do develop flow models to simulate and validate the growth of
the boundary layer as measured in the experiment, specifically comparing the predicted and
measured boundary layer thickness as a function of different wind velocities (10-30 m/s). Thus
within the model we need to be able to vary these input parameters within the same range.

The boundary layer thickness is defined as the point at which the velocity reaches 99% of the
free-stream velocity.
Boundary layer thickness 𝛿 = 99%𝑉0

Viscous sublayer

Wall (BL Plate)

Laminar boundary Layer Transition Turbulent boundary Layer

Figure 8.1

First, we need to look at the Reynolds number ranges, for which we can use the default dynamic
viscosity and density of air used by FLUENT, or you can use those you determined during the
experiment. In boundary layer theory, the critical transition Reynolds numbers are determined by
the local transition number which varies along the plate in the x-direction, as

̅𝑥
𝜌𝑉
𝑅𝑒𝑥 = Equation 8.1
𝜇

The critical x location, at which the transition to turbulence occurs, based on experimental set-
ups which better replicate an external (perfect set-up) is when Reynolds numbers are above
500,000. For the flat-plate experiment (AF106) which you will have undertaken, there are
numerous departures from the ideal. The plate is confined within the test section (not external),
flow is not fully developed and the plate has a leading edge which can create a small-
recirculation zone. Furthermore, there is a longitudinal pressure drop along the plate, which
should be taken into account when comparing to theory such as that used to derive the Blassius
solution which assumes a constant pressure.

To this extent, the manual states that the transition can occur anywhere between local Reynolds
numbers of 100,000 to 500,000, and based on these critical transition Re numbers, there is a
large difference in where the transition point can occur, as shown below, in figure 8.2.

74
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Figure 8.2
According to the classic Blasius theory, the thickness of the boundary layer in the laminar flow
region can be determined from:
4.91 𝑥
𝛿= ; Equation 8.2
√𝑅𝑒𝑥

And a number of empirical correlations exist in the turbulent region the boundary layer thickness
one of which is:
0.382 𝑥
𝛿= ; Equation 8.3
𝑅𝑒𝑥 0.2

This only gives us upper and lower bounds for the boundary layer thickness, heavily influenced
by pressure gradient, upstream and developing velocity profiles and freestream turbulence levels
coming into the test-section. As shown in Figure 8.3, these empirical equations do not tell us
about the transition point nor the boundary layer thickness as it transitions between the two.

Figure 8.3

In this tutorial we will model the flow over the plate using a turbulence model as done in previous
tutorials, but you are encouraged to run the simulation with a laminar model as done on the

75
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

online tutorial [2]. The objectives of this tutorial are to give you a model which you can use in
assignment C3 to validate against your own experimental data. As this is also classic benchmark
experiment, so you are expected to be able to find many references to cross-check your results
with, whether using the empirical formulas given above, or other experimental data.

One thing to note about trying to model this problem in FLUENT is that neither the laminar model
nor a standard turbulence model will capture the flow in the transition region. It is possible to
select a specialised modified turbulence model (see for example [1]) called the Local Correlation-
based Transition Modelling, but this is beyond the scope of this tutorial.

Geometry

We will consider air flowing across a flat plate, as illustrated below, but enclosed within the test
section of the Wind Tunnel. The domain we will model will be 0.5 m long by 0.15m high. The
incoming air is flowing in the x-direction with a constant velocity of 10-30 m/s across the inlet.
The density of the air is 1.223 kg/m^3 and the viscosity is 1.78 x 10-5 kg/(m-s).

Wall (upper surface test chamber)

H=0.15m INLET OUTLET

Wall (BL Plate)

L=0.5m

In ANSYS workbench
• Create a “CFD (Fluent)”
analysis.
• Open the DM geometry

In DM Geometry
• Check you are working in
Units of metres
• Create a sketch in the X-Y
plane with a rectangle (0.5 in
the x-direction and 0.15 in the
y-direction)
• The top side representing top
wall of the wind tunnel test

76
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

section, and the bottom side


will represent the plate wall.
• Create a surface from
Concept->Surface from
Sketches
• In the Tree Outline Click on
the Surface Body you have
created and change the
Fluid/Solid to Fluid.

Meshing

For this simulation we are going to use quadrilateral elements as these are best for flow
simulations, especially when detailed velocity profiles are required.

In Mesh
• On Mesh Insert->Mapped
Face Meshing, and for the
Geometry use Face to select
the entire surface body.
• On Mesh you might want to
check sizing is set to – on
curvature, relevance centre:
Coarse
• Now select the top and
bottom edges and Insert-
>Sizing to create “Edge
Sizing”, with 50 divisions and
Behaviour Hard and No Bias
• Select the left edge, and
create sizing Edge Sizing 2,
with 150 divisions, Behaviour
Hard and Bias Factor 70.
• Repeat with the right edge to
create Edge Sizing 3
• Check that the Bias type is in
the correct direction and
creates a subdivision which is
fine closest to the plate wall

• Generate the mesh, and you will see a mesh which is structured and very fine close to
the plate wall. This will create 150*50=7500 quadrilateral elements

77
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Boundary Conditions

The boundary conditions we will use are shown below:

Wall (u=v=0)
INLET
Type: Velocity
Velocity: u=10-30 m/s, v=0
Gauge Pressure: 0 OUTLET
Type: Either Outlet Pressure P=0
Turbulence Intensity: 5% Or Mass outflow
Hydraulic Diameter: 0.3m
Turbulence Intensity: 3%
Hydraulic Diameter: 0.3m
Wall (u=v=0)

• Still within the meshing tool,


select left line boundary and
create a named selection INLET

• Select right line boundary, create


named selection OUTLET

• For the top edge, create a named


section called far_field and for Note: Anotehr differences between the online tutorial
the bottom edge create a named [2] and the one we are undertaking here is that we are
section called plate trying to model the experiment, so we allocate a wall
boundary to B to simulate the test section of the wind
• Close the meshing tool tunnel, whereas in [2] they use a far-field pressure
boundary condition (symmetry) to try to get close to
the Blassius solution.

• Double click set-up to launch


FLUENT [OK]

78
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Fluid/Materials Properties

As specified for this problem we need a fluid with density of 1.23 kg/m3 and a dynamic
viscosity 1.86 X10-5 kg/m.s.

By default, FLUENT uses Air as fluid


medium, but under

Materials->Change/Create

You can access a large Fluent


Database with many properties.
If you change the type of modelling you
are undertaking (e.g. you add a
thermal model) additional properties
become available for your material.
When you access the database or change a property, a local copy of the material is
associated with the project. Check the properties of air here are a density of 1.23 kg/m3 and
viscosity 1.86X10-5 kg/m.s. When it comes to simulating your own experiment you can change
these properties based on the ambient conditions (temperature and pressure) at the time.

Part I Solution (Laminar with u=1m/s)

• The default viscous model in


Fluent is the Laminar model, we
will use this first

79
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Boundary conditions
• In FLUENT go to boundary
conditions and check that the
INLET is set as a velocity inlet
type boundary condition with x
velocity set at 1m/s, and the y
velocity as 0. The gauge
pressure you can leave as 0. For
the turbulence parameters use

• Check that the OUTLET


boundary condition is set as
“outflow”

• Check that both the far-field and


plate walls of the test section
have the “no slip” boundary
condition

Running the Laminar model


• Initialise the solution using
standard initialisation

• Run the analysis for 1000


iterations

80
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Close FLUENT (default close should


save to the ANSYS project
workbench)

You can compare the results from more than one analysis by creating a standalone instance
of the postprocessor “Results”, and linking by dragging the “Solution” box onto the Results, as
shown below.
Left click the Solution box from “Laminar BL simulation of AF106 (u=1m/s)” analysis (B) and
drop into onto the Results. When you open the Results it will allow you to plot multiple
FLUENT analyses side by side. Indeed if the mesh is similar, you can synchronise any
zooming so that the you can compare the solutions side by side.

In Results (CFD – Post)

• Double click results to launch


CFD-POST

• Align the view to the z-direction.

81
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

• Insert->Contour, select the


[Velocity] variable using the
Domais [All domains] on the
[Symmetry 1] location

• Click [Apply] to see them

• Note: in the centre of the test


section there is a development of
the velocity. Also there is a
boundary layer development
along the both the top and
bottom walls.

• You can chance the variable to


[Pressure] to visualise the
contours along the test section

• Note: The pressure drop


becomes constant the further
away from the inlet we get. If the
test section was extended far
enough the pressure drop would
be linear, and the velocity profile
would be closer to a fully
developed profile.

• Insert->Vector, select the


[Velocity] variable using the
Domais [All domains] on the
[Symmetry 1] location

• Click [Apply] to see them

• Note: use the zoom tool to look at


the vectors closer, you may need
to change the symbol sizes

• We are now going to create


some lines and points to get
specific velocity data at these
locations. These will match the
locations of the foils in the E2
Boundary Layer Experiment.

• Insert->Location->point, use
Method [xyz] and enter X=0m,
Y=0.075m, and Z=0m. This
creates a point on the inlet
halfway up.

• Insert->location->Line call it
[Tapx40mm] and select method

82
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

as Two points, use


X1=0.04m, Y1=0m, Z1=0m
X2=0.04m, Y2=0.15m, Z2=0m

• This creates a vertical line at


x=40mm

• Repeat and create 4 more


vertical lines at 90mm, 150mm,
220mm and 300mm.

• The number of samples on a cut


line is quite important, so you
could make this larger (e.g. 300
or 400)

• We are now going to create a


user defined variable which will
be the velocity normalised by the
inlet velocity.

• First, to get the inlet velocity at


point 1 on the inlet we create an
expression right click under the
“Expressions” tab and select
New.

• Call it Uinf and in the text


underneath enter
probe(Velocity u)@Point 1

• Click [Apply]

• Do the same and create an


expression called u normalised
and enter the text Velocity u/Uinf

• If you now click on the Variables


tab, you can create by right
clicking a new variable called
“normalized u” based on the “u
normalized” expression you
created earlier.

• This new variable can be plotted


everywhere on the mesh, as with
velocity and pressure.
A final non-dimensional parameter
which needs to be created is the non-
dimensional vertical coordinate, so in
this case we will scale the Y-
coordinate with the diameter of the

83
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

domain (0.15m).
So, in the same way as before, first
we create a new expression call it “y
normalised” which is “Y/0.15”.
Then create a new variable called
“normalised y” based on this
expression.

• You can plot the normalised u


variable as a contour, and as
expected the normalised velocity
is mostly between 0 and 1.

Graphs of velocity and normalised velocity

Insert -> graph and create a


“Velocity Profile”

On the general tab for the graph give


the graph a title.

In the Data series, create a data


series based on each of the locations
TAP1, TAP2, TAP3, TAP4 and
TAP5.

You can also import data from file.


Here we have imported the Blasius
solution for comparison.
On the X-axis tab, select normalised

84
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

u for the Variable, and on the Y-axis


tab select normalised u for the
Variable.
Limit the Y-axis to 0.2.

At any stage, you can hit the apply


button and you will see the
normalised velocity profile.
The Blasius solution has been
included for comparison.
Remember that the point at which the
normalised velocity becomes 99%
(0.99) of the freestream velocity is
the definition of the BL thickness.
As you can see there is significant
differences between the Blasius
profile (Series 8) and the profiles at
the various tap locations.
The modelled profiles over-shoot the
100% normalised velocity, and this is
because …
The model is representative of the
experiment, and it is obvious there is
a large departure from the idealised
case of a flat plate with no pressure
drop.
Also, numerically we are assuming a
constant velocity at the inlet, so the
velocity profile itself is also
developing and is not representative
of the fully developed laminar profile
through the test section.
Finally, by finding the y-location that
each velocity profile curve passes
0.99, it is possible to plot the
increasing BL thickness (in mm) as a
function of location along the plate. Comparing BL thickness between Laminar fluent and
empirical equation 8.2 for V=1m/s.
As can be seen, that there is quite a
difference between the model and
the empirical formula given by
equation 8.2.

Part II Solution (Turbulent with u=1m/s)

85
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Before we continue save this project


as “Laminar BL solution of AF106
(u=1 m/s)”.

Then duplicate your first analysis to a


second analysis and call it
“Turbulent BL solution of AF106
(u=1m/s)”.

Double click on Setup to start the


FLUENT client and we will now
choose a turbulence model, and
corresponding boundary conditions
all using the same mesh.

First under models change Viscous


Laminar to k-epsilon, but keep all the
default options for this turbulence
model.

86
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Now, go to the Boundary Conditions,


and click on the inlet BC (the only
one that needs changing), and for
this select the x-velocity as 1m/s.

Note: you can leave the turbulence


input at the inlet as given by default
for now, but this will be a source of
big differences in the velocity profiles.

As usual, under Solution initialise


using the Hybrid method, and when
ready run the calculation with 2000
iterations.

As before, we will pass the results from this analysis (Left click the Solution box from
“Turbulent BL simulation of AF106 (u=1m/s)” analysis (C) and drop into onto the Results.
When you open the Results it will allow you to plot multiple FLUENT analyses side by side.
Indeed if the mesh is similar, you can synchronise any zooming so that then you can compare
the solutions side by side.

87
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Looking at the velocity


vectors side-by-side
shows a “squarer” profile
for the turbulence velocity
than the more quadratic
profile for the Laminar
flow – which is what you
would expect.

However neither velocity


profile is fully developed
and this is because the
domain of the analysis is
not long enough in the x-
direction.

Note: The length of the


domain used in the model
(500mm) is pretty close
to the length of the
domain in the test section
(600 mm), and may well
be indicative of the some
of the differences you
may experience in trying
compare your
experimental data to the
ideal flat plate boundary
layer equations.

A more representative
inlet boundary condition
could be used to model
the experiment, such as
instead of using a
constant velocity across
the inlet, a distributed
velocity profile was used
either from an assumed
initial profile (e.g.
parabolic) or measured.

Solution (Turbulent with u=20m/s)

In both the prior solutions presented in this tutorial, we used a lower velocity than the ones

88
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

used in the experiment, so for the next case we will look at the results and change the inlet
velocity to 20 m/s.

Go back to the workbench and


duplicate your second analysis to a
second analysis and call it
“Turbulent BL solution of AF106
(u=20m/s)”.

Later when it comes to your own


exercises at the end of this tutorial
you can repeat this with other
velocities.
Double click on Set-up and open
FLUENT in the usual way.
All we are going to do is modify the
inlet BC for the x-velocity, and set
this as 20 m/s.
As usual, under Solution initialise
using the Hybrid method, and when
ready, run the calculation with 2000
iterations.

As before, we will pass the results from this analysis (Left click the Solution box from
“Turbulent BL simulation of AF106 (u=20m/s)” analysis (D) and drop into onto the Results.
When you open the Results it will allow you to plot multiple FLUENT analyses side by side.
Indeed if the mesh is similar, you can synchronise any zooming so that then you can compare
the solutions side by side.

We can directly compare the


velocity profiles at the outlet,
and you can see that the
laminar and turbulent 1 m/s
velocity (blue and green) are
much smaller than the 20 m/s
turbulence model profiles.

89
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

We can compare normalised


velocity profiles, which makes
the differences in the
distributions a bit clearer.

We can also focus on the 20


m/s turbulence model, and
look at how the profiles
develop along the lower
boundary.
In this case, we can see the
boundary layer developing,
but also that there is an
overshoot where the velocity
is actually greater than the
freestream velocity.
The overshoot in the velocity
is a real effect not predicted
by classical boundary layer
theory as it assumes that the
outer flow is inviscid – which
is obviously not the case in
either the experiment or the
models.
A better explanation can be
found here.
You can now export the
results from the normalised
velocity graph to Excel using
the export button which
allows you to save all the
data in the chart to a CSV
file.

90
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

From the data, you will see


the normalisd U/Uinf in the A
column and the Y(m) value in
the B column.

At the tap40m location, to


find the point the point in Y at
which the velocity becomes
99% of the free-stream
velocity (i.e. the BL
thickness), you can take the
average between a Y position
before (e.g. 96.95% at
0.0015m) and just after (e.g.
101.39% at 0.0023). So the
BL is 0.002m thick at tap 40.

Repeating this for Tap90mm,


150mm, 220mm and 300mm
gives you the trend shown
here, and this can be
compared to equation 8.3 for
the empirical turbulent
boundary layer, showing a
pretty good agreement.

To plot the empirical


equation, you will need to
calculate the Reynolds
number at each tap location.
You can now repeat this for
the other velocities you Comparing BL thickness between Turbulent fluent model and
tested in the wind-tunnel (e.g. turbulent empirical equation 8.3 for V=20m/s, and laminar
25 m/s and 30 m/s). (blue) empirical equation 8.2 for V=20m/s.

Things to try for yourself


• Change the B1 (inlet) velocities to exactly the same values as you tested in the experiment
(e.g. U=20 m/s, U=25 m/s and U=30 m/s). Things to look at include … How does the
boundary layer change with each inlet velocity? What is the boundary layer thickness for
each tap point?
• We used a single level of mesh with 50 divisions of the upper and lower the edges in the x-
direction and 120 divisions of the inlet and outlet in the y-direction. You could try a coarser
and finer mesh by changing edge sub-divisions (e.g. coarse: 60 in y-direction, 50 in x-
direction and fine: 160 in y-direction, 100 in x-direction). To analyse mesh sensitivity simply

91
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

tabulate differences in results (e.g. maximum or over-shoot velocity near wall) as they
change with mesh refinement. Is there any clear trend? Can you assume mesh
independence?
• These are all aspects you will be expected to address for the computational validation
requirement in assignment C3 in which you will use the boundary layer models developed in
this Tutorial.
o Additionally – you will need to include your own sketch of the geometry with
dimensions, and describe the boundary conditions applied at each section of the
geometry.
o Run the FLUENT models for each of the velocities used in the experiment using
a coarse, medium and fine mesh.
o Describe the overall meshing strategy which has been used in the model.
o By exporting data from the Results plotter, compare normalized velocity profiles
at 40mm, 150mm and 300mm for all three meshes? Is there a significant
difference? For the finest mesh, include contour plots of the normalized velocity
at each of the free-stream velocities. Comment on the boundary layer growth.
o Plot the ANSYS FLUENT boundary layer thickness against the experimentally
measured BL thickness? How do they compare? Are they better or worse than
the theoretically calculated BL thickness?
Questions from Tutorial
• Are there features in the experimental profiles which are similar to the modelled ones,
which are not captured by the Blassius solution? Specifically compare the Laminar
velocity profile at the outlet with the Blassius solution.
• What is the turbulence model you used?
• Did the mesh divisions affect the convergence?
• In terms of the fundamental fluid flow equations used by FLUENT, how are turbulence
models different to laminar models?
• Are there any specific values which could have been used at the inlet boundary for
turbulence and how might these affect the results?
References
[1] Modelling Laminar-Turbulent Transition Processes, Gilles Eggenspieler, ANSYS Conference
San Jose, USA, May 14 2012
https://support.ansys.com/staticassets/ANSYS/Conference/Confidence/San%20Jose/Downloads
/turbulence-transition-modeling-5.pdf
[2] 2D Laminar Boundary Layer on a Flat Plate - Online ANSYS tutorials at Cornell University,
USA.

https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Flat+Plate+Boundary+Layer

92
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

TUTORIAL 9 (Advanced) – 2D ANSYS non-linear


modelling of a uniaxial tensile test

A good background to ANSYS modelling for this problem can be found online at

http://inside.mines.edu/~apetrell/ENME442/Labs/1301_ENME442_lab7.pdf

The tutorial builds on the previous tutorials in the Beginner and Intermediate part of the course,
particularly using ANSYS Structural and Transient structural in 2D. In addition to what you have
learned so far, in this tutorial you will learn to

• Create geometries and surfaces with sketches in DesignModeler.


• Importing a geometry from CAD
• Mesh your model in the Desktop meshing tool.
• Work with Engineering data select and modify material properties to run linear elastic, bi-
linear elasto-plastic and multilinear elasto-plastic models
• Apply fixity and velocity boundary conditions in ANSYS mechanical.
• Run a transient analysis.
• Post-process a transient analysis (contour plots of Von-Misses and plastic strain).
• Create user defied results (to plot reaction forces) and export data to excel.

Problem specifications and preliminary considerations


The problem analysed in this tutorial is a Uniaxial Tensile Test of mild-steel samples shown
below, which is the experiment E3 undertaken in EGA324. The samples are about 120mm long,
with approximately a 70mm gauge length. The samples have notches removed of various sizes,
and the purpose of the experiment is to understand the effect of the stress raisers on the
concentration of stress and the failure types.

93
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Review of the theory

Elastic behaviour in metals is due to the stretching but not breaking of chemical bonds between
atoms, and is a fully recoverable deformation. For metals the elastic strains tend to be small
(<0.2%), but in this region the stress strain relationship of Hooke’s Law ( 𝜎 = Eε) is applicable.

When stresses go beyond the elastic limit, the material will yield and acquires a permanent
deformation and plasticity is the response of the material at stresses beyond yield. Materials
which fail with little plastic deformation are said to be brittle, and the opposite is that they are
ductile.

Plastic deformation results from slip between planes of atoms due to shear stresses. The
dislocation motion is essentially atoms rearranging themselves in the crystal structure to have
new neighbours, resulting in unrecoverable strains or permanent deformation after loading is
removed. Also slipping does not generally result in volumetric strains unlike elasticity.

Most metals have rate-independent plastic behaviour at low temperatures and strain rates.
Accurate simulation of plasticity in metals requires the use of true-stress-strain, as opposed to
engineering stress-strain.

Engineering stress is the force per unit (original) area. Engineering strain is the elongation per
unit (original) length. They are represented by the following symbols:

F l
Engineering Stress, S  and Engineering Strain, e 
Ao lo

Where Ao = original cross sectional area of specimen

lo = original length of the gauge section

F = applied force

l = change in length

For a linear elastic material, these parameters are related by Hooke's law,

S Ee

where E is Young's modulus. It is implicit here that only axial stresses and strains are of
interest. Otherwise, Hooke's Law is significantly more complex since stress is also dependent on
the strain in other directions. Note, it is assumed S  0 when e  0 so that S  E e represents
a line that passes through the origin with E as the slope.

94
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

The input data (stress-strain) requires true stress to strain, so the force-displacement data arising
from the uniaxial tensile test needs to be converted into engineering stress and then into true
stress. When using a multilinear isotropic hardening, it is important to capture the right gradient
of the stress-strain curve in the elastic region so that it is equal to the Young’s modulus, E.

Stress states in a material can be separated into two components – the hydrostatic stresses
which generate volume change, and the deviatoric stresses which generate angular distortion.

The Von Misses yield criterion states that yielding happens when the distortion energy in a unit
volume of the material equals the same distortion energy in a uniaxially stressed to the same
yield strength.

When the Von Misses equivalent stress exceeds the uniaxial material strength yielding occurs.

The hardening rules describe how the yield surface changes post yield as a result of plastic
deformation. Elastic perfectly plastic materials exhibit no hardening – so the yield surface
remains fixed.

There are basically two hardening rules Kinematic and Isotropic. In kinematic hardening the yield
surface remains constnt in size but translates in the direction of yield. In Isotropic hardening, the
yield surface expands in all directions uniformly with plastic flow. Most metals exhibit kinematic
behaviour for small strain cyclic loading, but isotropic hardening is more appropriate to capture
large strain deformations in metals.

Create a new Workbench analysis system, specifically a transient structural analysis.

95
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

At this stage, it is worth clicking on the Geometry tab which shows workbench properties and
making sure the analysis type is set 2D.

Setting the Material Properties for the ANALYSIS

We will now set the material properties. Double click the Engineering Data tab to enter the
material database. Click on the “Engineering Data Sources” and you will find a database of
materials, we are going to specifically select stainless steel as our starting point, from the
General Non-linear Materials section. Click the yellow plus sign to Add the material to your
current material, and choose the “Stainless Steel NL” (Non-linear).

This creates a copy of the properties in the current analysis, where you will find that an additional
material “Stainless Steel NL” has been added.

This material has density, elasticity properties (E, υ, …) and tensile properties already defined. It
is worth noting at this point that the steel most likely used for the experiment will be mild steel,
and stainless steel will probably have a higher yield and ultimate tensile strength. The plasticity
flow rule which has been used for this material in the database is a bilinear isotropic hardening
rule. You can add a “Tensile Ultimate Strength” of 360MPa, but this will not affect the analysis.
Later, you will be shown how to change the flow rule to a multilinear flow rule based on
experimental stress-strain data.

96
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

97
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

98
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

99
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Do not forget to assign a thickness to the part, in this case 1mm.

100
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

MESH

101
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Create a Body Sizing branch under the Mesh (using Sizing) and make the element size 1mm.

BOUNDARY CONDITIONS

Create a fixed support along the left hand line of the test bar, and create a velocity boundary
condition at the other end. Allocate a velocity in the x-direction of 0.0167 mm/s.

102
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

ANALYSIS

Use a total time of 1200s, leaving auto time stepping on with an initial timestep of 1s, and a
minimum timestep of 0.1s, and a maximum timestep of 10s.

RESULTS

Create solution output by right clicking and selecting from the menu from the main selection
(stress, strain, deformation …). The contour plot for the Von Misses stresses is shown below.
The contour can be plotted on the scaled geometry, and the scaling factor can be selected on the
left hand side from the Result drop down menu. Select a 1.0 (or true scale) to see a true
comparison of the underformed and deformed geometry.

103
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Deformation contours in true scale are shown below.

Right clicking on the Solution branch, and using Insert->Probe->reaction force creates an output
for the reaction forces along the fixed boundary. As can be seen these are of the order of 4kN.

104
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

From the reaction force graph versus time at the fixed end of the geometry, the bilinear isostropic
hardening response of the material is apparent. This response can be improved by using real
data from the experiment by using a multilinear isostropic hardening model.

Using Multilinear Isotropic Hardening with Stress -Strain data from experiment

The input data (stress-strain) requires true stress to strain, so the force-displacement data
asrising from the uniaxial tensile test needs to be converted into engineering stress and then into
true stress.

Engineering stress is the force per unit (original) area. Engineering strain is the elongation per
unit (original) length. They are represented by the following symbols:

F l
Engineering Stress, S  and Engineering Strain, e 
Ao lo

Where Ao = original cross sectional area of specimen

lo = original length of the gauge section

F = applied force

l = change in length

For a linear elastic material, these parameters are related by Hooke's law,

S Ee

where E is Young's modulus. It is implicit here that only axial stresses and strains are of
interest. Otherwise, Hooke's Law is significantly more complex since stress is also dependent on
the strain in other directions. Note, it is assumed S  0 when e  0 so that S  E e represents
a line that passes through the origin with E as the slope.

When using a multilinear isotropic hardening, it is important to capture the right gradient of the
stress-strain curve in the elastic region so that it is equal to the Young’s modulus, E.

105
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

Geometry Reduction

The test piece geometry can be approximated by only modelling the gauge length and not
modelling the tabs. If you look at the distributions of Von Misses stresses, the stress is relatively
constant along the gauge length. This will reduce the number of elements required for the
solution, and it will be easier to have a good mesh.

106
EGA324 – ENGINEERING PRACTISE – ANSYS TUTORIALS

END OF ANSYS
TUTORIALS

107

You might also like