Airflow Over An Ahmed Body: Created in COMSOL Multiphysics 5.4
Airflow Over An Ahmed Body: Created in COMSOL Multiphysics 5.4
Ai r fl ow O v er an A h med Bod y
This model is licensed under the COMSOL Software License Agreement 5.4.
All trademarks are the property of their respective owners. See www.comsol.com/trademarks.
Introduction
This example describes how to calculate the turbulent flow field around a simple car-like
geometry using the CFD Module’s Turbulent Flow, k-ε interface. Detailed instructions
guide you through the different steps of the modeling process in COMSOL Multiphysics.
Model Definition
The Ahmed body represents a simplified, ground vehicle geometry of a bluff body type.
Its shape is simple enough to allow for accurate flow simulation but retains some important
practical features relevant to automobile bodies. The geometry was first defined by
Ahmed, who also measured its aerodynamic properties in wind-tunnel experiments
(Ref. 1). Further experiments have also been performed by Lienhart and Becker (Ref. 2).
The Ahmed body has become a popular benchmark case for RANS models (Ref. 3).
GEOMETRY
The Ahmed body is presented in Figure 1. The total length (L) of the body is 1.044 m
from front to end. It is 0.288 m in height and 0.389 m in width. Cylindrical legs of 0.05 m
in length are attached to the bottom surface. The angle of the rear slanting surface is
typically varied between 0 and 40 degrees. This particular geometry has a slant angle of
25 degrees, which is the same slant angle used in Ref. 3.
Length
Width
Height
Outlet Slip
8L
Symmetry
Wall function L
Inlet 2L
2L
TURBULENCE MODEL
The Reynolds number based on the length of the body, L, and the inlet velocity is
2.77·106, which means that the flow is turbulent. The k-ε turbulence model is applied to
account for the turbulence. The k-ε turbulence model is described in the theory section
for the Turbulent Flow interfaces in the CFD Module User’s Guide.
BOUNDARY CONDITIONS
Air enters the computational domain at a freestream velocity u∞=40 m/s normal to the
inlet surface. Experimental inlet conditions from Ref. 3 are used for the velocity and
turbulent kinetic energy. To obtain a condition for ε, Ref. 3 suggests to set μT=10·μ at the
inlet. At the outlet, a Pressure condition is applied.
The floor of the flow domain and surface of the Ahmed body are described by wall
functions. Wall functions could also be applied to the outer wall and the ceiling of the wind
tunnel. Their main effect on the flow around the body is, however, to keep the flow
MESHING
A common mesh size in Ref. 3 is half a million cells for simulations with wall functions.
However, those simulations do not include the stilts (the legs that support the body), and
the computational domains are smaller. Hence, you can expect to need an even larger
mesh in this simulation to resolve the flow. How large is, however, difficult to know in
advance.
There are two important aspects of the meshing. The first is to resolve the flow in the wake.
To achieve this, additional mesh control entities are introduced in the geometry. These
entities are advantageous to normal geometrical entities since they are removed whence
they are completely meshed. A smoothing algorithm then smooths the mesh locally in
order to minimize gradients in the mesh size. Also, it is easier to introduce a boundary
layer mesh when the control entities are removed.
F- ρu ∞ 2
------ = C D ----------- (1)
Ap 2
where F is the total drag force on the body, Ap is area of the body projected on a plane
perpendicular to the flow direction (that is, the xz-plane), ρ is the density (approximately
equal to 1.2 kg/m3), and u∞ is the freestream velocity (equal to 40 m/s). Ap can be
calculated from geometrical data and is equal to 0.115 m2 including the stilts. The
contributions to CD are commonly reported as the pressure coefficients on front, slant,
and base and the skin friction drag coefficient. These numbers are given in Table 1. Note
that the numbers given by the postprocessing tools correspond to half the body, and
hence, Ap must be replaced by Ap/2 when calculating the entries of Table 1.
TABLE 1: DRAG COEFFICIENTS
The pressure coefficient on the front is too high and the skin friction too low. Ref. 4 uses
two different versions of the k-ε model and two different wall function formulations and
all combinations show this behavior. It can probably be attributed to the fact that wall
functions are not very good at predicting the transition observed in the experiments to
take place on the front and roof of the body.
The low value of the slant pressure drag coefficient can be understood by looking at
Figure 3, which shows streamlines in the symmetry plane. Experimental results indicate
that the flow along the slant is attached almost everywhere and that there are two small
recirculation regions behind the base. The computational results capture this behavior, but
the extent of the recirculation zones is somewhat overpredicted. The pressure drag
coefficient, especially for the slant, is very sensitive to the exact shape and location of the
recirculation regions.
Figure 4: Streamlines behind the Ahmed body. The streamlines are colored by the velocity
magnitude and their thickness is proportional to the turbulent kinetic energy.
The flow pattern 80 mm downstream of the body shows two major vortices, one
emanating from the outer edge of the slant and one emanating from the interaction
between the floor and the stilts. The flow is qualitatively equal to the experimental results
The flow pattern 200 mm downstream of the body shows that one major vortex is
beginning to form but remains of the separate vortices can still be detected. The formation
is, however, not proceeded as far as in the experiments.
In conclusion, the major features of the flow are well-captured by the k-ε model, but there
are details that deviate from experimental data. This finding is in agreement with other
RANS simulations of the Ahmed body (Ref. 3).
References
1. S.R. Ahmed, G. Ramm, and G. Faltin, “Some Salient Features of the Time-Averaged
Ground Vehicle Wake”, SAE Technical Paper 840300, 1984.
2. H. Lienhart and S. Becker, “Flow and Turbulence Structure in the Wake of a Simplified
Car Model”, SAE 2003 World Congress, SAE Paper 2003-01-0656, Detroit, Michigan,
2003.
4. T.J. Craft, S.E. Gant, H. Iacovides, B.E. Launder, and C.M.E. Robinson,
“Computational Study of Flow Around the ‘Ahmed’ Car Body”, 9th ERCOFTAC/
IAHR Workshop on Refined Turbulence Modelling, 2001.
Modeling Instructions
From the File menu, choose New.
NEW
In the New window, click Model Wizard.
MODEL WIZARD
1 In the Model Wizard window, click 3D.
2 In the Select Physics tree, select Fluid Flow>Single-Phase Flow>Turbulent Flow>
Turbulent Flow, k-ε (spf).
3 Click Add.
4 Click Study.
5 In the Select Study tree, select General Studies>Stationary.
6 Click Done.
GLOBAL DEFINITIONS
1 In the Model Builder window, under Global Definitions click Parameters 1.
2 In the Settings window for Parameters, locate the Parameters section.
3 In the table, enter the following settings:
Interpolation 1 (int1)
1 In the Home toolbar, click Functions and choose Global>Interpolation.
2 In the Settings window for Interpolation, locate the Definition section.
3 From the Data source list, choose File.
4 Click Browse.
5 Browse to the model’s Application Libraries folder and double-click the file
ahmed_body_kin.txt.
6 Click Import.
7 Find the Functions subsection. In the table, enter the following settings:
GEOMETRY 1
Import 1 (imp1)
1 In the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click Browse.
4 Browse to the model’s Application Libraries folder and double-click the file
ahmed_body.mphbin.
5 Click Import.
6 Click the Zoom Extents button in the Graphics toolbar.
Block 1 (blk1)
1 In the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Width text field, type 2*L.
Block 2 (blk2)
1 In the Geometry toolbar, click Block.
2 In the Settings window for Block, locate the Size and Shape section.
3 In the Width text field, type L.
4 In the Depth text field, type 8*L.
5 In the Height text field, type 2*L.
6 Locate the Position section. In the x text field, type -L.
7 In the y text field, type -2*L.
8 Right-click Block 2 (blk2) and choose Build Selected.
Difference 1 (dif1)
1 In the Geometry toolbar, click Booleans and Partitions and choose Difference.
2 Select the object blk1 only.
3 In the Settings window for Difference, locate the Difference section.
4 Find the Objects to subtract subsection. Select the Active toggle button.
5 Select the objects blk2 and imp1 only.
6 Right-click Difference 1 (dif1) and choose Build Selected.
Cylinder 1 (cyl1)
1 In the Geometry toolbar, click Cylinder.
2 In the Settings window for Cylinder, locate the Size and Shape section.
3 In the Radius text field, type 2.2*L.
4 In the Height text field, type L.
5 Locate the Position section. In the y text field, type 0.2*L.
6 In the z text field, type -0.1*L.
7 Locate the Axis section. From the Axis type list, choose x-axis.
Union 1 (uni1)
1 In the Geometry toolbar, click Booleans and Partitions and choose Union.
2 Click in the Graphics window and then press Ctrl+A to select both objects.
3 Right-click Union 1 (uni1) and choose Build Selected.
Hexahedron 1 (hex1)
1 In the Geometry toolbar, click More Primitives and choose Hexahedron.
2 In the Settings window for Hexahedron, locate the Vertices section.
3 In row 1, set y to L and z to Cl.
4 In row 2, set y to 2*L and z to Cl.
5 In row 3, set x to D/2, y to 2*L, and z to Cl.
6 In row 4, set x to D/2, y to L, and z to Cl.
7 In row 5, set y to L and z to Sb.
8 In row 6, set y to 2*L and z to Sb.
9 In row 7, set x to D/2, y to 2*L, and z to Sb.
10 In row 8, set x to D/2, y to L, and z to Sb.
Hexahedron 3 (hex3)
1 In the Geometry toolbar, click More Primitives and choose Hexahedron.
2 In the Settings window for Hexahedron, locate the Vertices section.
3 In row 1, set y to L and z to Sb.
4 In row 2, set y to L and z to H_body+Cl+0.01[m].
5 In row 3, set x to D/2, y to L, and z to H_body+Cl+0.01[m].
6 In row 4, set x to D/2, y to L, and z to Sb.
7 In row 5, set y to Rl and z to H_body+Cl.
8 In row 6, set y to Rl and z to H_body+Cl+0.01[m].
9 In row 7, set x to D/2, y to Rl, and z to H_body+Cl+0.01[m].
10 In row 8, set x to D/2, y to Rl, and z to H_body+Cl.
Union 2 (uni2)
1 In the Geometry toolbar, click Booleans and Partitions and choose Union.
2 Select the objects hex1, hex2, and hex3 only.
3 In the Settings window for Union, locate the Union section.
4 Clear the Keep interior boundaries check box.
Explicit 1
1 In the Definitions toolbar, click Explicit.
2 In the Settings window for Explicit, locate the Input Entities section.
3 From the Geometric entity level list, choose Boundary.
4 Click the Select Box button in the Graphics toolbar.
5 Select Boundaries 5–11 and 13–16 only.
6 Right-click Explicit 1 and choose Rename.
7 In the Rename Explicit dialog box, type Body in the New label text field.
8 Click OK.
9 Click the Transparency button in the Graphics toolbar.
ADD MATERIAL
1 In the Home toolbar, click Add Material to open the Add Material window.
2 Go to the Add Material window.
3 In the tree, select Built-In>Air.
4 Click Add to Component in the window toolbar.
5 In the Home toolbar, click Add Material to close the Add Material window.
Wall 2
1 In the Physics toolbar, click Boundaries and choose Wall.
2 In the Settings window for Wall, locate the Boundary Condition section.
3 From the Wall condition list, choose Slip.
4 Select Boundaries 4 and 17 only.
Symmetry 1
1 In the Physics toolbar, click Boundaries and choose Symmetry.
2 Select Boundary 1 only.
Inlet 1
1 In the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 2 only.
3 In the Settings window for Inlet, locate the Turbulence Conditions section.
0 x
40[m/s] y
0 z
Change to unidirectional constraints to avoid reaction forces in the pressure from the
constraint for ε
9 In the Model Builder window’s toolbar, click the Show button and select
Advanced Physics Options in the menu.
10 Click to expand the Constraint Settings section. From the Apply reaction terms on list,
choose Individual dependent variables.
Outlet 1
1 In the Physics toolbar, click Boundaries and choose Outlet.
2 Select Boundary 12 only.
MESH 1
Size
1 In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose
Edit Physics-Induced Sequence.
2 In the Settings window for Size, locate the Element Size section.
3 Click the Custom button.
4 Locate the Element Size Parameters section. In the Maximum element size text field, type
0.1.
Size 1
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 click Size 1.
2 In the Settings window for Size, locate the Geometric Entity Selection section.
Size 2
1 In the Model Builder window, right-click Mesh 1 and choose Size.
2 In the Settings window for Size, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundary 3 only.
5 Locate the Element Size section. Click the Custom button.
6 Locate the Element Size Parameters section. Select the Maximum element size check box.
7 In the associated text field, type 0.035.
Size 3
1 Right-click Mesh 1 and choose Size.
2 In the Settings window for Size, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundaries 10 and 11 only.
5 Locate the Element Size section. Click the Custom button.
6 Locate the Element Size Parameters section. Select the Maximum element size check box.
7 In the associated text field, type 0.01.
Size 4
1 Right-click Mesh 1 and choose Size.
2 In the Settings window for Size, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundaries 5–9, 13, and 16 only.
5 Locate the Element Size section. Click the Custom button.
6 Locate the Element Size Parameters section. Select the Maximum element size check box.
7 In the associated text field, type 0.02.
Corner Refinement 1
In the Model Builder window, under Component 1 (comp1)>Mesh 1 right-click
Corner Refinement 1 and choose Disable.
Free Tetrahedral 1
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 click
Free Tetrahedral 1.
2 In the Settings window for Free Tetrahedral, locate the Domain Selection section.
3 From the Geometric entity level list, choose Domain.
4 Select Domain 3 only.
Size 1
1 Right-click Component 1 (comp1)>Mesh 1>Free Tetrahedral 1 and choose Size.
2 In the Settings window for Size, locate the Element Size section.
3 Click the Custom button.
4 Locate the Element Size Parameters section. Select the Maximum element growth rate
check box.
5 In the associated text field, type 1.03.
Free Tetrahedral 1
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 click
Free Tetrahedral 1.
2 Click Build Selected.
Free Tetrahedral 2
1 In the Model Builder window, right-click Mesh 1 and choose Free Tetrahedral.
2 In the Settings window for Free Tetrahedral, locate the Domain Selection section.
3 From the Geometric entity level list, choose Domain.
Boundary Layers 1
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 click
Boundary Layers 1.
2 In the Settings window for Boundary Layers, locate the Domain Selection section.
3 Click Clear Selection.
4 Select Domain 1 only.
Boundary Layers 1
1 In the Model Builder window, under Component 1 (comp1)>Mesh 1 click
Boundary Layers 1.
2 Click Build Selected.
Swept 1
1 In the Model Builder window, right-click Mesh 1 and choose Swept.
2 In the Settings window for Swept, locate the Domain Selection section.
3 From the Geometric entity level list, choose Domain.
4 Select Domain 2 only.
Distribution 1
1 Right-click Component 1 (comp1)>Mesh 1>Swept 1 and choose Distribution.
2 In the Settings window for Distribution, locate the Distribution section.
3 From the Distribution type list, choose Predefined.
4 In the Number of elements text field, type 28.
5 In the Element ratio text field, type 6.
6 In the Model Builder window, right-click Mesh 1 and choose Free Tetrahedral.
7 Click Build All.
STUDY 1
1 In the Study toolbar, click Show Default Solver.
2 Click Compute.
RESULTS
Velocity (spf)
It is advisable to disable automatic update of plots when working with large 3D models.
Velocity (spf)
1 In the Model Builder window, under Results click Velocity (spf).
2 In the Settings window for 3D Plot Group, locate the Plot Settings section.
3 From the View list, choose View 3.
4 In the Velocity (spf) toolbar, click Plot.
The slice plot of the velocity clearly shows the recirculation zone behind the body. The
result looks smooth which further supports the assumption that the resolution is
acceptable.
To evaluate the input to calculate the entries in Table 1, perform the following steps:
Surface Integration 1
1 In the Results toolbar, click More Derived Values and choose Integration>
Surface Integration.
Surface Integration 2
1 In the Results toolbar, click More Derived Values and choose Integration>
Surface Integration.
2 Click the Wireframe Rendering button in the Graphics toolbar.
3 In the Settings window for Surface Integration, locate the Selection section.
4 From the Selection list, choose Body.
5 Locate the Expressions section. In the table, enter the following settings:
The wall function expression will be used directly for maximum accuracy.
6 Click Evaluate.
The following steps reproduce Figure 3:
Surface 2
1 In the Results toolbar, click More Data Sets and choose Surface.
2 In the Settings window for Surface, locate the Parameterization section.
2D Plot Group 4
1 In the Model Builder window, under Results click 2D Plot Group 4.
2 In the Settings window for 2D Plot Group, locate the Data section.
3 From the Data set list, choose Surface 2.
Streamline 1
1 Right-click Results>2D Plot Group 4 and choose Streamline.
2 In the Settings window for Streamline, locate the Expression section.
3 In the x component text field, type v.
4 In the y component text field, type w.
5 Locate the Streamline Positioning section. In the Points text field, type 31.
6 In the 2D Plot Group 4 toolbar, click Plot.
7 In the Model Builder window, expand the Results>Views node.
2D Plot Group 4
1 In the Model Builder window, expand the Results>Views>View 2D 5 node, then click
Results>2D Plot Group 4.
2 In the Settings window for 2D Plot Group, locate the Plot Settings section.
3 From the View list, choose View 2D 5.
Selection
1 In the Model Builder window, under Results>Data Sets>Study 1/Solution 1 (2) (sol1) click
Selection.
2 In the Settings window for Selection, locate the Geometric Entity Selection section.
3 From the Geometric entity level list, choose Boundary.
4 From the Selection list, choose Body.
5 Select Boundaries 3, 5–11, and 13–16 only.
Surface 1
1 In the Results toolbar, click 3D Plot Group.
2 In the Model Builder window, right-click 3D Plot Group 5 and choose Surface.
3 In the Settings window for Surface, locate the Data section.
3D Plot Group 5
1 In the Model Builder window, under Results click 3D Plot Group 5.
2 In the Settings window for 3D Plot Group, locate the Plot Settings section.
3 Clear the Plot data set edges check box.
Streamline 1
1 Right-click Results>3D Plot Group 5 and choose Streamline.
2 In the Settings window for Streamline, locate the Streamline Positioning section.
3 From the Positioning list, choose Starting point controlled.
4 From the Entry method list, choose Coordinates.
5 In the x text field, type range(0.01,0.03,0.16) range(0.01,0.03,0.16)
range(0.01,0.03,0.16) range(0.01,0.03,0.16) range(0.01,0.03,0.16).
6 In the y text field, type -0.5*L.
7 In the z text field, type 0.02*1^range(1,6) 0.08*1^range(1,6) 0.14*1^range(1,
6) 0.2*1^range(1,6) 0.26*1^range(1,6).
8 Locate the Coloring and Style section. Find the Line style subsection. From the Type list,
choose Tube.
9 In the Tube radius expression text field, type k*1[s^2/m].
10 Select the Radius scale factor check box.
11 In the associated text field, type 3e-4.
Color Expression 1
1 Right-click Results>3D Plot Group 5>Streamline 1 and choose Color Expression.
2 In the 3D Plot Group 5 toolbar, click Plot.
The following steps will reproduce figures Figure 5 and Figure 6:
Cut Plane 1
1 In the Results toolbar, click Cut Plane.
2 In the Settings window for Cut Plane, locate the Plane Data section.
3 From the Plane list, choose zx-planes.
Cut Plane 2
1 In the Results toolbar, click Cut Plane.
2 In the Settings window for Cut Plane, locate the Plane Data section.
3 From the Plane list, choose zx-planes.
4 In the y-coordinate text field, type L+0.2.
3D Plot Group 6
1 In the Results toolbar, click 3D Plot Group.
2 In the Settings window for 3D Plot Group, click to expand the Title section.
3 From the Title type list, choose Manual.
4 In the Title text area, type Streamline: Velocity in xz-plane.
5 Locate the Plot Settings section. From the View list, choose View 7.
Streamline Surface 1
1 In the 3D Plot Group 6 toolbar, click More Plots and choose Streamline Surface.
2 In the Settings window for Streamline Surface, locate the Data section.
3 From the Data set list, choose Cut Plane 1.
4 Locate the Streamline Positioning section. From the Positioning list, choose
Uniform density.
5 In the Separating distance text field, type 0.04.
6 Locate the Coloring and Style section. Find the Line style subsection. From the Type list,
choose Tube.
7 Select the Radius scale factor check box.
8 In the associated text field, type 0.0005.
9 Find the Arrow style subsection. From the Type list, choose Tangent.
10 Select the Number of arrows check box.
11 In the associated text field, type 50.
12 From the Arrow length list, choose Logarithmic.
13 In the Range quotient text field, type 1000.
14 Select the Scale factor check box.
15 In the associated text field, type 0.0015.
16 From the Color list, choose Black.
Surface 1
1 In the Model Builder window, under Results right-click 3D Plot Group 6 and choose
Surface.
2 In the Settings window for Surface, locate the Data section.
3 From the Data set list, choose Study 1/Solution 1 (2) (sol1).
4 Locate the Expression section. In the Expression text field, type 1.
5 Locate the Coloring and Style section. From the Coloring list, choose Uniform.
6 From the Color list, choose Gray.
3D Plot Group 6
1 In the Model Builder window, under Results click 3D Plot Group 6.
2 In the 3D Plot Group 6 toolbar, click Plot.
3D Plot Group 7
1 In the Home toolbar, click Add Plot Group and choose 3D Plot Group.
2 In the Settings window for 3D Plot Group, locate the Title section.
3 From the Title type list, choose Manual.
4 In the Title text area, type Streamline: Velocity in xz-plane.
5 Locate the Plot Settings section. From the View list, choose View 7.
Streamline Surface 1
1 In the 3D Plot Group 7 toolbar, click More Plots and choose Streamline Surface.
2 In the Settings window for Streamline Surface, locate the Data section.
3 From the Data set list, choose Cut Plane 2.
4 Locate the Streamline Positioning section. From the Positioning list, choose
Uniform density.
5 In the Separating distance text field, type 0.04.
6 Locate the Coloring and Style section. Find the Line style subsection. From the Type list,
choose Tube.
7 Select the Radius scale factor check box.
8 In the associated text field, type 0.0005.
Filter 1
1 Right-click Streamline Surface 1 and choose Filter.
2 In the Settings window for Filter, locate the Element Selection section.
3 In the Logical expression for inclusion text field, type (x<0.35)*(z<0.45).
Surface 1
1 In the Model Builder window, under Results right-click 3D Plot Group 7 and choose
Surface.
2 In the Settings window for Surface, locate the Data section.
3 From the Data set list, choose Study 1/Solution 1 (2) (sol1).
4 Locate the Expression section. In the Expression text field, type 1.
5 Locate the Coloring and Style section. From the Coloring list, choose Uniform.
6 From the Color list, choose Gray.
3D Plot Group 7
1 In the Model Builder window, under Results click 3D Plot Group 7.
2 In the 3D Plot Group 7 toolbar, click Plot.