Anda di halaman 1dari 56

1

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
(ANSYS Design
Modeler)

General (ANSYS
Fluent - Setup)

Unstructured
(ANSYS Mesh)

Solution
Methods
(ANSYS Fluent
- Solution)

Plots (ANSYS
Fluent- Results)

Turbulent

Model (ANSYS
Fluent - Setup)
Boundary
Conditions
(ANSYS Fluent Setup)
Reference Values
(ANSYS Fluent Setup)

Monitors
(ANSYS Fluent Solution)
Solution
Initialization
(ANSYS Fluent Solution)

Flow Chart for CFD Process for ahmed body

Graphics and
Animations
(ANSYS FluentResults)

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 15.0 > Workbench 15.0
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. Make sure that Unit is set to Meter (default value).

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

4.4. Enable the auto constraints option to pick the exact point as below

4.5. 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.6. Use the Rectangle tool again to draw a rectangle as per below.

4.7. 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.8. 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.9. 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.10.
Dimension the sketch as per below using General, Horizontal, Vertical, Radius,
and Angle under Dimensions.

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.

10

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.

11

4.16.

Tools > Merge.

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

12

4.18.

All the dimensions needed are shown as per below.

H1
H10

H11
V2

H4
H3
R8

H5
A9
V7

4.19.

V12
V6

File > Save Project. Close the Design Modeler window.

5. Mesh
5.1. Right click Mesh and from the dropdown menu select Edit

13

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.

14

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.

15

16

17

18

19

20

21

22

23

24

25

5.6. Click on Mesh under the Outline and change the Physics Preference to CFD.
5.7. Click Generate Mesh.

26

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.

27

5.10.

Repeat step 5.8 for the left edges and name them inlet.

28

5.11.

5.12.

Repeat step 5.8 for the right edges and name them outlet.

Repeat step 5.8 for the filleted corners and the straight segment that connects them and
name them nose.

29

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.

30

5.16.

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

31

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.

32

6.4. Solution Setup > Models > Viscous > Edit Change the turbulent model and nearwall treatment as per below.

33

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.

34

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.

35

7. Solution
7.1. Solution > Solution Methods. Change solutions methods as per below.

36

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.

37

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.

38

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: In order to see animation without any problem, keep the following instruction.
1. Do not forget to change window and click set button.
2. Click display button before pressing close button and make sure the new window #3
followed by contours of stream function show up.

39

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 turbulent viscosity ratio. Change parameter for turbulent viscosity ratio as per
below. Click Close for contours window and then click set and ok.
Note: In order to see animation without any problem, keep the following instruction.
3. Do not forget to change window and click set button.
4. Click display button before pressing close button and make sure the new window #3
followed by contours of stream function show up.

40

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. If
you close Fluent window after running the simulation, you will
lose your time history. As a result, 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

41

42

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.

43

Surface Name
Position-1
Position-2
Position-3
Position-4
Position-5
Position-6
Position-7
Position-8
Position-9
Position-10

x0
1.78192
1.932
1.98208
2.03191
2.08201
2.13212
2.23206
2.332
2.482
2.6819

y0
0.05
0.05
0.05
0.05
0
0
0
0
0
0

x1
1.78192
1.932
1.98208
2.03191
2.08201
2.13212
2.23206
2.332
2.482
2.6819

y1
3
3
3
3
3
3
3
3
3
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.

44

Function Name
y-by-h
Modified-U
Modified-TKE

Definition
y / 0.288
(mean-x-velocity / 120) + (x / 0.288)
(turb-kinetic-energy / 500) + (x / 0.288)

Operand field function including coordinate (x and y), mean-x-velocity and turb-kinetic-energy
are found as in the following table and figures
Operand field function
x, y
Mean-x-velocity
Turb-kinetic-energy

From field functions


Mesh
Unsteady statistics
Turbulence

45

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.

46

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.

47

Results > Graphics and Animations > Vectors > Set Up Change parameters as per
below and click Display.

48

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.

49

50

51

52

Note:
1. Dont get panic even if you cannot see the animation on the screen. The
snapshots of the animation are saved to files in ppm format in your
project directory, e.g. if your project name is lab4 then you can find the
snapshots in lab4_files\dp0\FLU\Fluent. The name of snapshots will have
stream or viscosity-ratio followed by serial numbers. Converting them
into movie file (e.g. *.avi or *.mpg) will be explained later.
2. In case you failed to see the animation on the screen, you can go to the
project directory and find ppm files. Holding left shift button and clicking
right mouse button, open command window. By using ImageMagick
program installed, type in following command into the command window.
convert -delay 6 -quality 95 streamline*.ppm streamline.mpg
convert -delay 6 -quality 95 viscosity-ratio*.ppm viscosity-ratio.mpg

53

9. Trouble shooting for the animation part


A script file is provided in case of not producing correct snapshot files although you think computational
setup is right (you can download the script file from the class website).
The script file assumes that you have followed this instruction up to at least section 8.2. What the script
does is to:
1. Redefine custom functions
2. Set calculation activities
For you.
In order to run the script, it is recommended to save your project and close and reopen Fluent
component. You should look for Journal in File-Read menu as shown below. For the files of type,
choose All files and find the script file in the folder you saved the script file.

54

When you load the script file, the following window will appear. Then press No button instead of Yes.

Note: Wait without clicking anything until all the batch commands are finished and popped-up
windows are closed. It takes a couple of minutes depending on the system.
Run the simulation and see if snapshot images are generated in the folder described in page 52.

10. 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


Simulation of turbulent flows over Ahmed body (slant angle=25
degree):

10.1.

55

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
Ahmed (EFD)
k-e
Error (%)

CB

CS

CD
0.289

b. Questions:
Do you observe separations in the wake region (use streamlines)? If yes, where is
the location of separation point?

56

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.

Anda mungkin juga menyukai