You are on page 1of 49

Simulation of Turbulent Flow over the Ahmed Body

58:160 Intermediate Mechanics of Fluids


CFD LAB 4

By Timur Dogan, Michael Conger, Maysam Mousaviraad, Tao Xing and Fred Stern
IIHR-Hydroscience & Engineering
The University of Iowa
C. Maxwell Stanley Hydraulics Laboratory
Iowa City, IA 52242-1585

1. Purpose
The Purpose of CFD Lab 4 is to simulate unsteady turbulent flows over the Ahmed body
following the “CFD process” by an interactive step-by-step approach and conduct verifications
using CFD Educational Interface ANSYS. Students will have “hands-on” experiences using
ANSYS to predict drag coefficients and axial velocity for slant angle 25 degrees and
compare them with EFD data. Students will use post-processing tools (streamlines, velocity
vectors, contours, animations) to visualize the mean and instantaneous flow fields and
compute the non-dimensional shedding frequency (Strouhal number). Students will analyze
the differences between CFD and EFD and present results in a CFD Lab report.

Geometry Physics Mesh Solution Results

Ahmed body General (ANSYS Unstructured Solution Plots (ANSYS


(ANSYS Design Fluent - Setup) (ANSYS Mesh) Methods Fluent- Results)
Modeler) (ANSYS Fluent
Model (ANSYS
- Solution)
Fluent - Setup) Graphics and
Animations
Boundary Monitors (ANSYS Fluent-
Conditions (ANSYS Fluent - Results)
Turbulent (ANSYS Fluent - Solution)
Setup)
Solution
Reference Values Initialization
(ANSYS Fluent - (ANSYS Fluent -
Setup) Solution)

Flow Chart for “CFD Process” for ahmed body


2. Simulation Design
The problem to be solved is unsteady turbulent flows over the Ahmed body (2D). Reynolds
number is around 768,000 based on inlet velocity and vehicle height (h). The following figure
shows the sketch window you will see in ANSYS with definitions for all geometry parameters.
The origin of the simulation is located at the rear of the body. θ is the slant angle. L is the length
of the body and h is the height of the body. Uniform velocity specified at inlet and constant
pressure specified at outlet. The top boundary of the simulation domain is regarded as
“Symmetry” and there is a distance between the car body and road, GL.

In CFD Lab4, all EFD data for turbulent airfoil flow in this Lab can be found on the class
website http://www.engineering.uiowa.edu/~me_160/.
3. Open ANSYS Workbench Software
3.1. Start > All Programs > ANSYS 14.5 > Workbench 14.5
3.2. Drag and drop three component onto the Project Schematic, name the components and
create connections between components as per below.

4. Geometry Creation
4.1. From the Project Schematic right click Geometry and select New Geometry.
4.2. Select Meter and click OK.

4.3. Select the XYPlane then click the New Sketch button.

4.4. Use the Rectangle tool under Draw to make a rectangle starting from the origin and
ending in the first quadrant. Dimension it using General dimension as per below.
4.5. Use the Rectangle tool again to draw a rectangle as per below.

4.6. Use the Fillet tool in Modify to put a radius on the front corners of the Ahmed Car as
per below. Use the Radius size of 0.1m.
4.7. Use the Chamfer tool to put a chamfer on the back of the Ahmed Car as per below. Use
the Length of 0.25m.

4.8. Put a constraint on the two radii using the Equal Radius tool in Constraints. (Note: in
the bottom left corner next to the checkmark in a green circle is the notes on how to use
a tool. This works for all tools.)

4.9. Dimension the sketch as per below using General, Horizontal, Vertical, Radius, and
Angle under Dimensions.
4.10. Input the dimensions as per below.
4.11. Concept > Surface From Sketches. Select the sketch you just created and click
Apply. Click Generate.

4.12. Select XYPlane and click the New Sketch button. Use the Line tool under Draw
to make the lines as per below (Three lines total). Make sure that the C appears when
you are on the line and the V/H appears next to the line being created indicating you are
both on the existing edge and the line is vertical/horizontal.
4.13. Use the Horizontal and Vertical dimension tool to dimension the lines as per
below.

4.14. Tools > Face Split.


4.15. Select the surface for Target Face and click Apply. For Tool Geometry select
two endpoints of a single line while holding Ctrl then click Apply. Select Tool
Geometry again and select two more endpoints and click Apply, repeat this process for
the last line and click Apply. Click Generate. This splits the surface into six pieces.

4.16. Tools > Merge.


4.17. Change the Merge Type to Faces and select the top three faces. Click Apply then
Generate.

4.18. File > Save Project. Close the Design Modeler window.

5. Mesh
5.1. Right click Mesh and from the dropdown menu select Edit…
5.2. Right click Mesh > Insert > Inflation.

5.3. For Geometry, select the surface of the domain which borders the Ahmed Car and click
Apply. For the Boundary, select the edges of the Ahmed Car by holding Ctrl and
selecting the edges and then click Apply. There should be seven edges selected for the
Boundary. Change the parameters in Details of “Inflation” – Inflation as per below.
5.4. Right click Mesh > Insert > Method. Select the domain for Geometry and click Apply.
Change the Method to Triangles.

5.5. Right click Mesh > Insert > Sizing. Select the line as per below and click Apply.
Change the parameters of sizing as per below. Repeat this for the following figures
below. There should be 22 edge sizings.
5.6. Click on Mesh under the Outline and change the Physics Preference to CFD.
5.7. Click Generate Mesh.
5.8. Select the top edges of the domain by holding Ctrl while selecting, right click, from the
dropdown menu select Create Named Selection. Name the top edge symmetry.

5.9. Repeat step 5.8 for the bottom edges and name them road.
5.10. Repeat step 5.8 for the left edges and name them inlet.

5.11. Repeat step 5.8 for the right edges and name them outlet.
5.12. Repeat step 5.8 for the filleted corners and the straight segment that connects them and
name them nose.

5.13. Repeat step 5.8 for the sloped edge of the Ahmed Car and name it slope.
5.14. Repeat step 5.8 for the top edge of the Ahmed Car and name it ahmed top.

5.15. Repeat step 5.8 for the bottom edge of the Ahmed Car and name it ahmed bottom.
5.16. Repeat step 5.8 for the right vertical edge of the Ahmed Car and name it back.

5.17. File > Save Project. Close Meshing window.


5.18. Update the mesh by right clicking Mesh and from the dropdown menu select
Update.

6. Setup
6.1. Right click Setup and select Edit…
6.2. Select Double Precision and click OK.

6.3. Solution Setup > General. Change solver to Transient as per below.
6.4. Solution Setup > Models > Viscous > Edit… Change the turbulent model and near-
wall treatment as per below.

6.5. Solution Setup > Materials > Fluid > air > Create/Edit… Change the air Density and
Viscosity as per below and click Change/Edit then close the window.
6.6. Solution Setup > Boundary Conditions > inlet > Edit… Change the inlet boundary
conditions as per below and click OK.

6.7. Solution Setup > Boundary Conditions > Zone > outlet > Edit… Change the outlet
boundary condition as per below and click OK.
6.8. Solution Setup > Reference Values. Change the reference values as per below.

7. Solution
7.1. Solution > Solution Methods. Change solutions methods as per below.
7.2. Solution > Monitors > Residuals –Print, Plot > Edit. Change the parameters a s per
below and click ok.

7.3. Solution > Monitors > Residuals, Statistics and Force Monitors > Create > Drag.
Select parameters as per below. Click Axes and make changes to the x-axis as per below
and click apply. Finally click ok and close windows.
Note: Do not forget to change window.
7.4. Solution > Solution Initialization. Change X-Velocity and turbulent parameters as per
below.

7.5. Solution > Calculation Activities > Solution Animations > Create/Edit. Change the
parameters as per below.
7.6. Click Define for the stream animation (see previous image where the button is labeled
with blue rectangle). Select PPM image for storage type, change window then select
contour to plot stream function. Change parameter for the stream as per below. Click
Close for contours window and then click set and ok.
Note: Do not forget to change window and click set button.

7.7. Click Define for the viscosity ratio (see previous image where the button is labeled with
blue rectangle). Select PPM image for storage type, change window then select contour
to plot stream function. Change parameter for the stream as per below. Click Close for
contours window and then click set and ok.
Note: Do not forget to change window and click set button.
7.8. Solution > Run Calculation. Change parameters as per below and click Calculate. If
you have the correct setup you should see four windows on the upper left corner as per
below (2nd image). You can change what the window shows by changing the option on
the upper left corner as shown on the second image below. Window 1-4 shows the
residuals, coefficient of drag history, streamlines and turbulent viscosity ratio. After
running for about 0.05 flow time you should see vortices at the back of the ahmed car for
windows 3 and 4.
NOTE: This simulation will take several hours please make
sure your setup is correct before running the simulation. Also,
after running the simulation if you close Fluent the videos will
not work and the drag coefficient history will not show on
window 2.
After the calculation you should see the images below
8. Results
8.1. Creating line to plot modified TKE and modified U.

Surface > Line/Rake. Create 10 lines at the locations given at the table below.

Surface Name x0 y0 x1 y1
Position-1 1.78192 0.05 1.78192 3
Position-2 1.932 0.05 1.932 3
Position-3 1.98208 0.05 1.98208 3
Position-4 2.03191 0.05 2.03191 3
Position-5 2.08201 0 2.08201 3
Position-6 2.13212 0 2.13212 3
Position-7 2.23206 0 2.23206 3
Position-8 2.332 0 2.332 3
Position-9 2.482 0 2.482 3
Position-10 2.6819 0 2.6819 3

8.2. Create custom function

Define > Custom Field Functions. Create custom field functions and click Define. You will
need to create two custom field functions shown in the table below.
Function Name Definition
y-by-h y / 0.288
Modified-U (mean-x-velocity / 120) + (x / 0.288)
Modified-TKE (turb-kinetic-energy / 500) + (x / 0.288)

8.3. Plotting values along the lines created.

Results > Plots > XY Plot > Set Up. Click Load File… and load the experimental data.
Select the lines you created (position-1 through position-10) and experimental data then click
Plot. (Note: You can download the EFD data from the class website)
Note: You change the style and color of the data by clicking Curves button and
changing the parameters below then clicking Apply. Click Axes… and adjust the Y axis
maximum to 2.5 and minimum to -0.5.
8.4. Plotting drag coefficient
Results > Report > Forces > Set Up. Select the region where you want to calculate the
drag coefficient under wall zone then click print.

8.5. Plotting contours and vectors


Results > Graphics and Animations > Contours. Change parameters as per below and
click Display.
Results > Graphics and Animations > Vectors > Set Up… Change parameters as per
below and click Display.
8.6. Creating videos
Results > Graphics and Animations > Solution Animation Playback > Set Up…
Change the window to streams or viscous ratio then click play button. You can click print
screen shot to save images as the video plays. Below few images are shown from the
video.
9. Exercises
You need to complete the following assignments and present results in your lab reports following
the lab report instructions.
Simulation of Turbulent Flow over the Ahmed Body
9.1. Simulation of turbulent flows over Ahmed body (slant angle=25
degree):

a. Fill in the table for the four drag coefficients and compute the relative error between
CFD and EFD (Ahmed data), EFD data for Ck , CB , and Cs can be found from the figure
below. Where Ck = Ck* , CB = CB* , and Cs = Cs* . The definitions of the drag coefficients
are: Ck is the forebody pressure drag coefficient, CB is the vertical based pressure drag
coefficient, CR is the friction drag coefficient, Cs is the slant surface pressure drag
coefficient, and Cw = CD is the total drag coefficient. So, Cw = CD = CS + CB + Ck + CR
Ck CB CS CD
Ahmed (EFD) 0.289
k-e
Error (%)

b. Questions:
• Do you observe separations in the wake region (use streamlines)? If yes, where is
the location of separation point?
• What is the Strouhal number based on the shedding frequency (CD vs. time), the
height of the Ahmed body and the inlet velocity? Note: the shedding frequency
f=1/T where T is the typical period of the oscillation of CD that can be evaluated
using the peaks between 0.1<time<0.14.
• Figures to be saved: 1. XY plots for residual history, modified U vs. y-by-h (with
EFD), Modified-TKE vs. y-by-h and time history of drag coefficient, 2. Contour of
pressure, contour of axial velocity and velocity vectors, 3. 3 or 4 snapshots of
animations for turbulent-viscosity-ratio and streamlines (hints: you can use
<<Alt+print Screen>> during the play of the animations).
• Data to be saved: the above table with values.

You might also like