管理|BEMM178 Innovation Management Module Handbook

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981

MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 1
MECH5770M: Computational Fluid Dynamics Analysis
Tutorial 3: Backward-Facing Step (i)
Tutorial 3 Outline:
Create basic geometry for the backward facing step
Explore the dimensioning tools to parameterise the geometry
Generate mesh with relevant controls
Run a turbulent flow case
More advanced post-processing exercises
Prerequisites
1) Ensure that you have completed Tutorial 1 and 2 which cover the basics of CFD pre and postprocessing.
Notes
1) You MUST complete the tutorials in order otherwise you will struggle to complete later exercises.
2) Regularly save your work – programs do crash and you will lose unsaved work!
3) This document is written using ANSYS version 18.1, however, you may have access to later versions of the
software. If this is the case, some menus and screen outputs may differ slightly but you should still be able
to complete the tutorial. If you have any questions or problems, the demonstrators will be able to help you.
4) The following acronyms are used throughout this document:
RC = Right mouse button click
LC = Left mouse button click
MC = Middle mouse button click
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 2
1) Open ANSYS Workbench 18.1
2) As you did in Tutorial 1, under Component Systems LC and hold the mouse button on the Geometry icon and
drag across into the top left region of project Schematic (you should see a red box appear and “create
standalone system”) then let go of the mouse → To open Design Modeler, RC in row 2 of the Geometry box and
LC New DesignModeler Geometry…
3) Set the units to mm: LC the top menu Units → select Millimeter
4) In the Tree Outline LC on the XYPlane → LC on sketching tab at the bottom of the tree outline box → LC
Settings → LC Grid → Tick the boxes for Show in 2D and Snap (This draws a grid in the graphics window to aid
geometry creation) → set Major Grid Spacing to 25 mm, Minor-Steps per Major to 5.
5) LC on the end of the Triad Z-axis to view the XY plane.
6) LC in the graphics window and rotate the mouse wheel forwards or backwards to change the zoom level →
zoom in on the origin → Keep zooming in until the scale at the bottom of the graphics window has a range of 0-
100 mm:
Origin
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 3
7) Next, you will draw a 2D backward-facing step from the following combination of points:
8) LC Sketching tab under Sketching Toolboxes → LC Polyline →
Move mouse into Graphics window and LC on the origin (0,0)
to draw the first point. LC for each of the following points (the
coordinates can be seen in the bottom right corner of the
program) in this order:
(-100,0), (-100,25), (0,25), (100,25),
(100,0), (100,-25), (0,-25)
To complete the shape, RC on the origin and select Closed End.
9) To make a surface from this wireframe → LC Modeling tab under Sketching Toolboxes → LC on the (+) symbol
next to the XYPlane → LC Sketch1 under Tree Outline → on the top menu LC Concept → Surfaces from
Sketches → LC Apply under Details View → LC the Generate button: → You should now see the
correct shape in the Graphics window. (Remember: whenever you make any change to the geometry, a yellow
lighting symbol will appear in the Tree Outline: You must then click the generate button to register the
change).
10) File save project → Save the file as backstep in a suitable folder (e.g. Tutorials folder).
A B
H C
G D F
Origin
E
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 4
11) Next, you will add a dimension to the sketch to change the length of the shape: LC → Sketching tab under Tree
Outline → LC Dimensions → LC General → Move the mouse into the Graphics window and position over the
bottom edge (edge E from step (7)) until it changes colour → LC and a pencil should appear, now move the
mouse downwards and LC below the shape. (Notice that a green dimension with the label H1 appears). LC again
on edge (G) to add a further dimension, H2:

12) In the details view you will now see Dimensions H1 and H2. Click on the text boxes and change these to: H1 =
300 mm and H2 = 150 mm → Generate → File, Save project → File, Close DesignModeler. If you make a
mistake and select the wrong edge, you can delete a dimension by right-clicking on the dimension in the list
under the Details View menu box → Delete.
Note how the geometry has changed by supplying new dimensions. This can be extended to other shapes to give
full parametric control over various dimensions. However, be careful not to over-constrain the problem: using too
many dimensions can lead to conflicts between dimensions.
Edge E
Edge G
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 5
13) To mesh this shape, go back to Workbench and LC and hold the Mesh icon under Component Systems, then
drag and drop this onto row 2 of the Geometry box (circled below) and ensure that a link is present between
Geometry and Mesh:
14) RC on row 3 of the new Mesh box → LC Edit… → This will launch Ansys Mesh. LC on the Z-Axis of the triad to
view the step from the side. Change the physics preference from the default of Mechanical to CFD, in the tree
outline: LC on Mesh → In the Details box click on Physics Preference and change to CFD → LC Generate Mesh
→ Wait for the mesh to be created → LC Mesh under the Outline. You will see an initial Cartesian
mesh:
15) Clearly, this default mesh is far too coarse to adequately resolve fluid flow. However, because the shape was
created with a total of 8 edges, it is possible to control the mesh size with edge controls. LC Mesh under Outline
→ RC Insert → LC Sizing → LC edge selection filter → LC on edge H (see step (7)) in the Graphics Window
(this should turn green) → press and hold the Ctrl key on the keyboard and click on edges F, C and D one at a
time (they should all appear green) → under Details of “Edge Sizing” – Sizing, next to Geometry LC No Selection
(highlighted in yellow) → Apply → LC Element Size under Type → LC down arrow, LC Number of Divisions →
set to 16 in the box immediately below → LC Bias Type, LC on the down arrow → LC on the bias which clusters
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 6
the cells at the ends of the edge (recall step (19) from Tutorial 1) → set bias factor to 3 → LC Generate Mesh →
Wait for the mesh to be created → LC Mesh under the Outline:
16) The revised mesh is an improvement but now the elements are squashed (skewed) in the corners. As the shape
is simple, a better solution is to use Face Meshing which consists of a Cartesian grid. LC Mesh under Outline →
Insert → Face Meshing → LC Face selection filter → LC on the shape in the Graphics Window → LC Apply
→ Generate Mesh → Wait for the mesh to be created → LC Mesh under the Outline:
Note that the mesh is only controlled in the Y-direction because of the controls implemented in step (15) above;
in the X-direction there are no controls and so the mesh is skewed.
17) Before inserting more edge controls, rename the sizing from step (16): LC on Edge Sizing in the Outline → RC →
Rename → Enter y-sizing (Note: you should use a continuous name without spaces or symbols):
18) Repeat steps (15) and (17) to insert another edge control and apply to edges A and G. Ensure that the sizing is
clustered at both ends of the edges, that the number of divisions is set to 50 and a bias factor of 3 is used.
Rename the new sizing as x-sizing-upstream and Generate the mesh; this changes the inlet region of the shape:
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 7
19) The mesh still requires control in the X-axis from the step to the outlet on the right. Add another edge control
and apply to edges B and E → Ensure that the sizing is clustered to the left:
→ Set the Number of Divisions to 100 and a Bias Factor of 5.
→ You will notice that the bias on edges B and E are in opposite directions, there you must click on Reverse Bias
then select edge E → Apply → Rename the sizing to x-sizing-downstream. → Generate:
Note how the mesh is now fully controlled using the edge controls applied in the steps above. This was made
possible by creating the geometry using strategically placed points (step 8) which ensured that the following
pairs of edges were the same length: H and C; F and D; A and G; B and E.
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 8
20) For the final meshing stage change the number of divisions to 18 for y-sizing, 100 for x-sizing-upstream and 200
for x-sizing-downstream → Generate mesh → Repeat step (23) from tutorial 1 to check that the quality of the
mesh is very good with zero skewness:
21) Now that you have a mesh, you need to assign boundary conditions which will consist of an inlet, an outlet and
walls. To create the inlet → LC edge selection filter → LC on edge H so that it turns green → RC Create
Named Selection (N)… (at the bottom) → Enter the name inlet in the Selection Name box → OK:

MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 9
22) Repeat step 21 to create an outlet for the two edges (C and D) ensuring that you hold the Ctrl key to add both
edges to the selection. Name the selection outlet.
23) Create another named selection called walls for all the walls (edges A, B, G, F and E).
24) To check that your boundary conditions are correct → LC on the (+) symbol next to Named Selections → Hold
the Ctrl key before selecting them:

25) To export the mesh file click File → Export → Select your Tutorials → set the file name to backstep-1 → In the
Save as type box select FLUENT Input Files (*.msh) → Save. Save the project and close Workbench.
26) Open Fluent in 2D and Double Precision and read in backstep-1.msh.
27) Next you need to check the scale of the mesh to ensure you are solving the correct problem: LC on the Scale…
button in the Mesh sub-menu under Setting Up Domain → Check that the domain extents are the same as
those shown below → Close:
28) For convenience, the base of the step should be at the
origin so you need to translate the grid upwards by 0.05
m: LC Transform → Translate… → insert a Translation
Offset of 0.025 for Y (m) → Click Translate ONCE and
note the change in domain extents:
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 10
29) In the previous tutorial, you solved a laminar flow case, however in this example you will be simulating turbulent
flow with a moderately high Reynolds number; the air will enter the inlet and spill over the step with the sudden
expansion inducing flow separation and recirculation behind it. Since the flow is known to be turbulent, you
need to activate a turbulence model: In the tree, double click on Models in the Tree → double click on Viscous
(laminar) → when the Viscous Model menu appears, select the k-epsilon (2 eqn) option → OK:
Note that there are three types of k-ε model including the standard k-ε model (selected above), the RNG
(Renormalized Group Theory) k-ε model and the Realizable k-ε model. Other models are also available including
k-ω models, Spalart-Allmaras and Reynolds Stress models; these will be explored in later tutorials. For now, you
should appreciate that there are a wide range of turbulence models and it is essential to choose appropriate
ones, depending on the application.
30) With the turbulence model activated the next step is to set the boundary conditions on the inlet and outlet: In
the tree, double click on Boundary Conditions in the Tree → double click on the inlet boundary condition →
when the Velocity Inlet menu appears, enter 40 in the Velocity Magnitude (m/s) box 40 → Click on the down
arrow next to Specification Method K and Epsilon → select Intensity and Hydraulic Diameter → Enter values of
5% for Turbulent Intensity and 0.0476m for the Hydraulic Diameter → OK:
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 11
Note: both the turbulence intensity, TI, and the hydraulic diameter, DH, are parameters which provide a small
amount of turbulence on the inlet. In real fluid flows, turbulent fluctuations are often present on entry to a
particular region and so you should use appropriate values of TI and DH depending on your application. You can
also specify other parameters instead such as the turbulent length scale, it all depends on the boundary
condition information you have available prior to running your simulation(s).
31) Repeat step 30 to set the outlet boundary condition: when the Pressure Outlet menu appears leave the Gauge
Pressure (pascal) as 0 pa → change the turbulence Specification Method to Intensity and Hydraulic Diameter
→ Enter values of 5% for Turbulent Intensity and 0.0476m for the Hydraulic Diameter → OK:
32) In Tutorial 2 you used the default parameters in Fluent, which are designed to handle a wide range of flows.
However, many of these settings are not always suitable. An important aspect is the order of discretisation used
by the solver. To view the default schemes: double click on Solution in the Tree → double click Methods →
Change the schemes to Second Order Upwind for Turbulent Kinetic Energy (k) and Turbulent Dissipation Rate
(ε):

By default, second order schemes are already selected for the pressure and momentum equations. However, for
any additional models you select (e.g. turbulence model or species transport) the default discretisation schemes
are typically first order. The higher the order, the more accurate your solution will be. The drawback with
Default schemes
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 12
higher-order schemes is that they can be less stable. In general, second order simulations are accurate enough
for most engineering applications. If your simulation struggles to converge, you can start with first order
discretisation then switch to second order (or higher) once the residuals have dropped sufficiently.
33) You should also change the Gradient method from the default of Least Squares Cell Based to Green-Gauss Cell
Based which is also found under Solve → Methods:
The gradient method computes velocity derivatives, secondary diffusion terms and it constructs scalar values at
cell faces during a given simulation. Of the three methods available, the Green-Gauss Cell Based method is
suitable for structured hexahedral meshes (as above), the Green-Gauss Node Based method is suited to
unstructured tetrahedral meshes and Least Squares Cell Based is best for polyhedral meshes.
34) Initialise the solution (recall step 5 in
tutorial 2): Solution → Initialization → LC
Standard Initialization → LC down arrow
next to Compute From → LC inlet → LC
Initialize button at the bottom.
35) Save the case file: File → Write → Case →
save the file as backstep-1.cas.gz in your
Tutorials folder.
36) Run the simulation: Solution → Run Calculation → set Number of Iterations to 1000 by clicking in the
appropriate box and typing 1000 on the keyboard → Calculate → The simulation will take around 1 minute and
it should stop in the range 500-550 iterations (the exact number can vary depending on the computer):
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 13
37) Although the calculation is complete, the default residual tolerance of 0.001 is used to stop the calculation once
continuity, x-velocity, y-velocity, k and epsilon residuals have dropped below this value. It is good practice to
drop these tolerances: double click on Monitors under Solution in the Tree → double click Residual → in the
Residual Monitors menu box Change the Absolute Criteria for all quantities from 0.001 to 1e-16 → Change the
number of Iterations to Plot to 2000 and set Iterations to Store to 2000:
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 14
38) Continue the simulation with revised convergence criteria: Solution → Run Calculation → set Number of
Iterations to 1000 → Calculate → Wait for the simulation to stop, this will be when ~1300 iterations have taken
place:
Notice that the solution is converged when the residuals have levelled off i.e. no change in the solution for
further iterations. In this case, convergence has occurred after approximately 1200 iterations; the residuals are
oscillating due to numerical noise but they are not reducing as they do earlier in the simulation.
Where possible, it is good practice to lower the residual tolerances (step 37) and run the solution until the
residuals have levelled off. Note that for complex 3D problems this can be take 1000’s of iterations which take
many hours to complete.
It is also good practice to use monitors to show how certain parameters vary as the solution progresses. For
example, you may want to monitor the pressure drop through a pipeline or the drag coefficient of an object of
interest. This aspect will be covered in later tutorials.
39) Having run the simulation, you need to save the data. File → Write → Data → save as backstep-1-k-epsilon-
2nd-order.dat.gz (Be specific with your data files names so that you remember what settings were used)
Solution is converged after
~1200 iterations – residuals
have levelled off
Solution is NOT
converged – it is still
changing here!
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 15
40) Display the contours of the X-Velocity: Reduce the size of the Setup and Solution menu’s in the tree by clicking
on the small arrows → double click on Results in the Tree → double click on Contours → in the Contours
menu select Filled → Select contours of, Velocity, X-Velocity → Save/Display:
Notice how the X-Velocity (i.e. horizontal component of velocity) is negative behind the step; this is because the
air has separated and a recirculation region exists with flow opposing the free-stream direction.
41) As shown earlier in step 13 of Tutorial 2 it is very important to be aware that by default, Fluent displays
contours with smoothing and interpolation. In reality, your solution only has one value for each flow parameter
(velocity, pressure etc.) inside each computational element. To display the element values for X-Velocity: Open
the Contours window again and deselect Node Values under the Options field → Display. If you now zoom in on
the step using either the zoom button or your mouse wheel. The image below shows the difference
between the default contours node values. To overlay black grid lines see the next step.

Default contours (20 levels) with
smoothing and interpolation
Element values (20 levels) showing
the ACTUAL solution with grid lines.
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 16
Be careful when investigating your solution, particularly in regions of high flow gradients, the default contour
plots do not always show the true solution. Although the solution may look reasonable, your grid may be too
coarse which is why you should conduct a grid independence study, this will be covered in a later tutorial.
42) To overlay black grid lines: Select Draw Mesh under Options in the Contours box → The Mesh Display box will
appear → Ensure that Edges is selected under Options and All is selected under Edge Type → LC on the Colors…
button → In the Mesh Colors box LC interior under Types → LC black under Colors → Close the Mesh Colors
box → LC Display in the Mesh Display box followed by Close → LC Save/Display in the Contours box: You
should now have black grid lines overlaid on the contours as shown in the previous step, you may need to zoom
in on the step to see this.
43) Display velocity vectors: Results → double click Vectors → Save/Display:
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 17
44) Display pathlines which are released from the inlet and coloured by static pressure: Double click Pathlines in the
Tree → in the Pathlines menu Select inlet under Release from Surfaces → Select Pressure under Color by →
Save/Display:
Notice how the pathlines are released from the nodes on the inlet face and they indicate where the air flows
through the domain. The flow can clearly be seen to separate at the top of the step and reattach on the bottom
wall further downstream.
Steps (40-44) show some of the qualitative visualisation tools available within Fluent, however this must be
balanced with quantitative analysis. Accordingly, the reattachment length, L, is usually expressed in
dimensionless form relative to the step height, H. The following reference (B. Ruck and B. Makiola, Particle
dispersion in a single-sided backward-facing step flow, Int. J. Multiphase Flow. Vol 14, No. 6, pp. 787-800,
1988) details an experiment which was conducted in the 1980’s for which L/H = 8.1 i.e. the reattachment length
is 8.1 greater than the step height.
Separation point Reattachment
Reattachment length, L
Step
height, H
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 18
45) To determine the reattachment length from your CFD solution, you need to show contours of the X-Velocity with
a range limited to positive velocities only: In the Tree, double click on contours-1 (from step 42) → select
contours of Velocity, X-Velocity → LC the Compute button → uncheck the Auto Range button → set the value
in the Min (m/s) box to 0 → Save/Display:

46) Zoom in on the bottom wall in the region where the contours meets it. The exact point where the X-Velocity is
zero (arrowed above) denotes the reattachment point.
47) To determine the reattachment length L, create a point: LC Create under the Surface sub-menu of
Postprocessing → Point… → the Point Surface menu will appear → LC the Select Point with Mouse button →
You will now see a dialogue box appear asking you to use the probe button (Right mouse button) → RC on the
blue cell which touches the bottom wall (arrowed above). Now the coordinates of this point appear in the Point
Surface box (see the next page) and from this you should be able to calculate L/H ≈ 6.97. You will also see
“Contour level 0, value in [0, 2.0869644]“ appears in the console window, this is the exact value of the X velocity in the centre of the cell you have selected; the final few decimal points of this value can change slightly
in different versions of the software. Remember that the origin is at the base of the step following steps (27) and
(28).
MECH5770M Tutorial 3
Written by Dr Carl Gilkeson School of Mechanical of Engineering, University of Leeds, 2017. 19
Note: wherever possible, you should seek to validate your CFD results by comparing with equivalent
experimental data. In the example above, you have compared the reattachment point for a 2D simulation with
3D experimental data.
48) Close Fluent
Tutorial 3 Summary:
You have:
Created a basic geometry and meshed it with a structured hexahedral grid
Run a turbulent flow simulation with 2
nd order discretisation for all flow equations
Explored the concept of convergence and simulation stopping criteria
Post-processed the result with contour and vector plots as well as pathlines
Compared the reattachment length in your simulation to an experimental result
End of Tutorial

发表评论

了解 KJESSAY历史案例 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读