You are on page 1of 8

NDK: CAD/CAM TUTORIAL CFD: FLOW AROUND A CAR

1 Introduction
1.1 Objective . The main goal of this tutorial is to give the neophyte an idea about a ow simulation with cfd through the denition, the run and the post-processing of a real case. . To do so, we will simulate the incompressible, but 3D and turbulent airow around a car to investigate pressure and velocity elds, ow trajectories and drag coefcient. The car model will be placed in a wind-tunnel. The car geometry is courtesy of GM. . To be able to run the whole tutorial in about 1.5 hour, we will use a model that has already been meshed and that has only 130000 thetraedral cells. Note that at least 5 million cells, with hexa in the near-wall regions, would be necessary to obtain reliable and detailed results in such a case. symmetry

1.2 Script conventions . we only mention what has to be changed; other settings remain at their default values

. . . .

walking through the menus clic the button or text check the box choose the option

les -> open -> .... -> button v

Something written in small characters and on the right side like this is a comment

1.3 Using the Mouse in Fluent graphic-windows . left-clic standard . left-clic & drag rotates the model in the 3D-solver translates the model in the 2D-solver . middle-clic & drag right zooms in . middle-clic & drag left zooms out
If it doesnt work, check in Fluent that the middle button is set as a mouse-zoom Display -> Mouse Buttons

. right-clic
outlet 1.4 Login . username

selects

Student-ID or course82, course83, course95


from blackboard to door and from window to inner-wall

inlet

. password

Student-PWD resp. course


a restart of your computer is not necessary

car road

side-wall

1.5 Preparing directories and les . Start -> Applications -> Total Commander 6.0 . copy j:\mcad\M_cfd\TUTOR_Fluent\tutor_sub\sedan . to C:\temp
This makes a copy of all the necessary les in the directory C:\temp\sedan

B. Schmutz, le 13/9/04

cfd-tut_SEDAN.fm

-1

1.6 Starting Fluent from Window 2000 . Start -> Programs -> Fluent Inc Pr...-> Fluent 6.1->Fluent 6.1 3d . Version Run wait until >|

. .

All, Display
so you can see the mesh structure: ne in the car region and coarse elsewhere.

Close

2 Pre-processing
2.1 Importing the mesh . File -> Read -> Case go to C:\temp\sedan\ sedan.msh
Fluent reads the grid with about 130000 cells

2.3 Dene the physical model . Dene -> Model -> Solver . Segregated
continuity equation is rst solved for all cells, then Momentum and then turbulences. This works well for incompressible and moderate compressible ow

Implicit
(each equation is solved for all cells together with actual datas. The implicit solver brings faster convergence)

. . .
Scale Factors

OK Grid -> Check


be sure there is no negative volume or face area and there is no warning of any kind

3D; Steady
(car velocity will be constant and we dont expect instabilities)

Grid -> Scale X=2, Y= 2, Z=2 Scale


The grid was initially designed for a 1/2 scaled model, so we have to bring it to the real dimensions. Control that the domain extends from length x =- 10 to 10 m, high y= 0 to 10m and depth z = -0.0104 to 10 m

. . .
OK

Absolute
there is no moving mesh zone in the mesh

Dene -> Model -> Viscous k-epsilon


a robust and efcient turbulent model which gives good results in most cases where turbulences have an isotropic repartition

Close

.
2.2 Verifying and visualizing the mesh . Display -> Grid v Edges, Features, Display . rotate the model with the mouse-left-button to have a better perspective. . Shift-right-clic on the different faces of the model
to see how the mesh boundaries are dened. Denition appears in the Fluent-consolewindow: (e.g. front face -> inlet)

Standard
gives good results when pressure gradient along wall are weak and when it is clear where ow separation should take place.

Standard Wall Functions


velocity proles from experiments will be paste onto the sub-boundary-layers. This allows a coarse mesh

. .

OK Dene -> Model -> Energy dont enable, just clic OK


-2

B. Schmutz, le 13/9/04

cfd-tut_SEDAN.fm

by normal car-speed, there are no big compressible or heating effects

. Select . .

2.4 Specify material properties . Dene -> Materials Database


Just be curious and browse through the database to see what is available as standard

Wall (in the eld zone) Set replace wall with car (in the eld Zone Name ) Momentum
We consider our model as a wind-tunnelmodel: - so the car is a stationary wall, - the viscosity makes the air stick at the car coachwork, so no slip is ok - the coachwork is very smooth, so a roughness of 0 is ok.

. . type in

Close
we will remain by air which is appropriate for our wind-tunnel model

1.225 by the density in kgm-3 1.464e-5 by the viscosity in kgm-1s-1


- Those values correspond to the ICAO norm - Fluent means dynamic viscosity - As we consider air as incompressible and are not looking for heat transfer problematic, we dont need to specify properties such as , c p, M ,

OK

ceiling of the wind-tunnel

. . .

Change Create Close

Ceiling (in the eld zone) Set Momentum Specied Shear


default settings of 0 for x, y and z-components are already ok. This will allow the air to slip on the ceiling wall. This is not realistic, but so, we can use a very coarse mesh without boundarylayer problems.

2.5 Specify the boundary conditions


ambient

Dene -> Operating Conditions


- let the 101325 Pa which corresponds to the ICAO-Norm Fluent works with relative pressure. This improves the precision. - weight effects are small in comparaison with inertial and viscosity forces, so we dont need to enable gravity.

OK

Side wall of the wind-tunnel

. . .

Side Wall , Set , Momentum Specied Shear


default settings of 0 for x, y and z-components are already ok.

OK

OK

.
coachwork or car

Dene -> Boundary Conditions

road

. .

Road , Set , Momentum Moving Wall

B. Schmutz, le 13/9/04

cfd-tut_SEDAN.fm

-3

As the car doesnt move, the road will have a velocity in the positive x-direction, so that the ow under the car will be correctly modelled.

. type . type

5 % in the Backow Turbulence-intensity-eld 13.34 m in the Backow Hydraulic Diameter-eld


so if there is a backow through the outletplane, it will be modelled with realistic values

. type . type .

33.33 ms-1 in the Speed eld


Correspond to 120 km/h.

0.003 m in the Roughness Heigh eld OK


uid

OK

symmetry

.
symmetry plane , Set , OK
the car and the ow are symmetrical, so, to save computer ressources and running time, we model only one half of the problem

Fuid , Set , OK
default settings are already ok.

Close the Boundary-Conditions panel


the setting of the boundary conditions is now complete.

inlet

. . type . choose . type . type .

inlet , Set 33.33 ms-1 in the Velocity Magnitude eld


As the car doesnt move, the air has to in the positive x-direction,

2.6 Adjust the mathematical solver model . Solve -> Controls -> Solution
- we solve simultaneously Flow (Continuity and N.S.) and Turbulence equations - let the standard relaxation factors for all variables - we begin the solution with the most simple numeric scheme

Intensity and Hydraulic Diameter in the Turbulence Specication Method-list 3 % in the Turbulence-intensity-eld
This corresponds to the turbulence intensity encountered by a car in a quiet atmosphere.

. .

OK Solve -> Monitors -> Residuals v Plot v Print


So you will be able to follow the convergence of the solution on the monitor

13.34 m in the Hydraulic Diameter-eld


This corresponds to the equivalent hydraulic diameter of our wind tunnel

OK

.
outlet

OK

. . keep . choose

outlet , Set 0 Pa in the Gauge pressure eld


means we have atmospheric pressure at the outlet,

2.7 Initialize the ow eld . Solve -> Initialize -> Initialize Choose inlet in the Compute From-list . Init , Apply , Close
This will attribute to all cells of the model, the velocity, pressure and turbulences values that we dened for the inlet. Those are not -4

Intensity and Hydraulic Diameter in the Turbulence Specication Method-list


cfd-tut_SEDAN.fm

B. Schmutz, le 13/9/04

the correct values, but they are much better than zero and lead to a faster convergence to the physically correct values.

if something went wrong, you can read the results we computed: le -> read -> case & data sedan.cas

2.8 Save your model

. . type

File -> Write -> Case & Data


it is now time to save your work

4 Post-Processing
Normally we would have to enable better numerical schemes (2nd or 3rd order and run until a much better convergence of the ow solution is reached, but this would take about 3 hours with this case (and about 2 weeks with an adequate mesh renement). So we simply visualise the actual results. 4.1 pressure eld on the coachwork . Display -> Contours v Filled Contour of: Pressure , Static Pressure Surface: car Display zoom in and rotate with the mouse

my_sedan
-Fluent makes a my_sedan.cas with the denition of your model and a my_sedan.dat le with the pressure, velocity, values that you just have initialized.

OK

3 Processing
3.1 Calculate a solution . Solve -> Iterate . type 100 in the Number of iterations eld
This makes Fluent run 100 tries and errors calculations for the ow eld that should converge towards a realistic ow solution

Iterate
Control for a while that the residuals of all variables are getting smaller. In the console window, uent makes an estimation of the calculation remaining time ITS NOW TIME TO FANCY A COFFEE.

.
As an alternative, to save time, you can read the results we computed: le -> read -> case & data sedan.dat

Mirror Planes:

Display -> Views symmetry plane Apply


this will recreate the entire car

File -> Write -> Case & Data


this will save your model denition and results. If everything is ok, accept to overwrite both les.

. for further use:

Drag & Drop the Views -Window to a free place on the screen

back in the Contours window:

B. Schmutz, le 13/9/04

cfd-tut_SEDAN.fm

-5

Display -> Contours Display zoom in and rotate with the mouse Close

4.4 injections of smoke . Dene -> Models -> Discrete Phase Max. Number of steps: 1000 v Specify Length Scale 0.015 m OK
this denes for how long a way the solver will track the smoke particles

Length scale 4.2 velocity eld in the middle-plane . Display -> Views Views: double clic on front Close

.
Contour of: Surface:

Display -> Contours Velocity , Velocity Magnitude symmetry plane Display zoom in and out to zone of interest
Observe the boundary layer around the car and the region with separated ow behind the car

Dene -> Injections Create Injection Name: Overtype with vertical-front-injection Injection Type: group Number of particle streams: 30 First- point: x = -4; y =0.1; z =0 Last- point: x = -4; y =1.2; z =0
Pull the windows lift down to access next option.

Close

. Particule diameter5 m .
OK
This creates a vertical smoke injection ramp, in the symmetry plane, just in front of the car.

4.3 velocity vectors in the middle-plane . Display -> Vectors Surface: symmetry plane Scale: 3 Skip: 1 Vector Options Scale Head: 0.3 Apply Close . Display zoom in in front eld of the car zoom out and in in rear eld of the car
you can notice the begining of the establishment of a back-ow

Create Injection Name: Overtype with horizontal-front-injection Injection Type: group Number of particle streams: 40 First- point: x = -4; y =0.5; z =0 Last- point: x = -4; y =0.5; z =0.8 Particule diameter5 m OK , Close
This creates an horizontal smoke injection ramp, just in front of the car, at the level of the bumper.

Close

B. Schmutz, le 13/9/04

cfd-tut_SEDAN.fm

-6

Display -> Particle Tracks v Draw Grid v Edges, v Faces Outline Surfaces car
all other surfaces shouldnt be selected

4.5 Drag coefcient


Front area of the car

Report -> Projected Areas Projection Direction: X Min Feature Size: 0.002 m Surfaces: car Compute
Fluent should nd a frontal area of 0.978 m2.

Display , Close

.
Lighting References Values

Close

Display -> Light v Light On v Headlight On Lighting Method: Gouraud . Apply


adjust colors, light directions and number of lights according to your taste.

.
Compute from: Area

Report -> References Values inlet


0.978 m2

OK
A drag coefcient is dimensionless, so it has to be refered to the far-ow velocity and density, and to the car front area. Aerodynamic forces on the coachwork

Apply , Close

Back in the Particle Tracks Window:

.
Force Vector: Wall Zones:

. Color By:

Velocity , Velocity Magnitude Release from injections: vertical front injection Display rotate and zoom to your interest
If necessary, reset the view with Display -> Views

Report -> Forces Forces X=1, Y=0, Z=0 car Print


The pressure and viscous forces in x-direction are listed in the console window. So is also the total drag coefcient If necessary extend the console-window to the right.

idem with the horizontal front injection


There is a lot of visualisation renement with light, transparency, animations, but they are far away of the scope of this small introduction.

. With Force Vector:


Wall Zones: car Print

X=0, Y=1, Z=0

Close

You will nd the lift forces acting on the half car we modelled. Minus signs mean towards the road.

Close

B. Schmutz, le 13/9/04

cfd-tut_SEDAN.fm

-7

4.6 Checking boundary layer cells . Plot -> XY Plot Node Values Y Axis Function Turbulence WallYPlus (in the list below) Surfaces car Plot
A correct modelisation of the car boundary layer requires Y+ values between 30 and 500. Here you can see that a ner mesh is absolutely necessary

Close

We hope your enjoyed the ride

B. Schmutz

B. Schmutz, le 13/9/04

cfd-tut_SEDAN.fm

-8