You are on page 1of 23

Tutorial ANSYS FLUENT version 14

Turbulent flow around a cylinder


1) Problem specification
Symmetry
L1 = 0.3 m
Velocity inlet

L2 = 0.7 m
D = 0.1 m
Outlet

L3 = 0.3 m

Symmetry
Consider the steady state case of a fluid (air) past though a cylinder. Show velocity
vector around the cylinder and determine the reattachment length of the vortex
behind the cylinder when the Reynolds number is 10000.
The diameter of the cylinder is set to 0.1 m, the density of the air is set to 1.225
kg/m3, and the dynamic viscosity is set to 1.7894 10 -5 kg/m*s. Thus, the x
component of the inlet flow must be set to 1.5 m/s in order to achieve the desired
Reynolds number.

2) Geometry
Fluid Flow (FLUENT) Project Selection

Drag Fluid Flow (FLUENT) into the Project Schematic window.

Analysis Type

(Right Click) Geometry > Properties > Set Analysis Type to 2D

Launch Design Modeler

(Double Click) Geometry > select centimeter as desired length unit.

Setting

Sketching > within the sketching toolboxes, select settings > highlight Grid >
tick both show in 2D and snap.

Create a circle.

Modeling > Highlight XYPlane and right click > look at


Modeling > Highlight XYPlane > click New Sketch

Modeling > Highlight Sketch1 > Sketching > draw > Circle > draw rectangle
in graphics with each sides of the rectangle having 0.1 m (10 cm) in length.
We can draw anywhere in the graphics but the best way is to draw near the
reference point. Figure below show that the centroid of rectangle was located
at x = 0, y = 0 cm.

Create a rectangle.

Modeling > Highlight XYPlane > click New Sketch

Modeling > Highlight Sketch2 > Sketching > draw > Rectangle > draw
rectangle in graphics with 60 cm height and 100 cm width.

Create surface for rectangle

Concept > Surfaces from sketches


Set the Base Object to Sketch2 (located underneath XYPlane in the Tree
Outline). Then click Apply next to Base Object .Then set Operation to Add
Material. Then, click Generate

Create surface for circle

Concept > Surfaces from sketches


Set the Base Object to Sketch1 (located underneath XYPlane in the Tree
Outline). Then click Apply next to Base Object .Then set Operation to Add
Frozen. Then, click Generate

Carry Out Boolean Operation: Subtraction

Create > Boolean


First, set Operation to Subtract . Click at Target Bodies and select First row of
Surface Body and then click Apply. Next, Click at Tool Bodies and select
second row of Surface Body and then click Apply.

Lastly, click Generate. The surface will look like below.

Define fluid region

Highlight Surface Body underneath tree outline and 1 part, 1 body


In details view, change fluid/solid from solid to fluid

Exit Design Modeler

Close Design Modeler and save project

3) Mesh
Launch Mesher

(Double Click) Mesh

Meshing

Highlight Mesh > Sizing > Use Advanced Size Function = On: Curvature;
Relevance Center = Medium

Inflation

(Right Click) Mesh > Insert > Inflation

Specify Geometry. To do this, select face selection filter then click on the
surface of the region occupied by fluid in the graphic and then click Apply.
Specify Boundary. To do this, select edge selection filter then click on the
edge of the circle in the graphic and then click Apply.
Set the Inflation option to First Layer Thickness. Set First Layer Height to
0.005 m. Set Maximum Layer to 5 and Growth rate to 1.2.

Face selection
filter

Edge selection
filter

Sizing

(Right Click) Mesh > Insert > Sizing


Specify Geometry. To do this, select edge selection filter then click on the
circle line in the graphic and then click Apply.
Set the Type to Number of Divisions. Set Number of Divisions to 40. Set
Behaviour to Hard

Edge selection
filter

Click Generate Mesh. If the graphic did not changed, click Show Mesh. The
mesh should look like below.

Create Named Selections

Create a named selection for all boundary conditions. To create the named
selection, choose the edge selection filter, then select an edge. While the
edge is highlighted, right click and select "Create Named Selection". In the
new window that appears, type in any name and select "OK" to confirm.
Figure below show that two edges have been selected and being named as
Symmetry. Do the same procedure for the other edges.

Close ANSYS Mesher.


Update

Right click Mesh and click update

4) Physics setup
Launch Fluent

(Double Click) Setup in the Workbench Project Page. When the FLUENT
Launcher appears change options to "Double Precision", and then click OK as
shown below.

New windows will pop out as shown below.

This is where we'll specify the governing equations and boundary conditions
for our boundary-value problem. On the left-hand side of the FLUENT
interface, we see various items listed under Problem Setup. We will work from
top to bottom of the Problem Setup items to setup the physics of our
boundary-value problem. On the right hand side, we have the Graphics pane
and, below that, the Command pane.

Check Mesh

(Click) Mesh > Info > Size

You should now have an output in the command pane stating that there are
987 cells.
(Click) Mesh > Check
You should see no errors in the command pane.

Specify Models

Problem Setup > Models > Viscous > Edit....

Set the Model to k-epsilon (2 eqn) then click Ok.


Specify Material Properties

Solution Setup > Materials > Fluid > Create/Edit....

Then set the Density to 1.225 kg/m^3 and set Viscosity to 1.7894e-05
kg/m*s. Click Change/Create then click Close.

Boundary Conditions

Zone > inlet > set Type to velocity-inlet > Edit


In Momentum: Velocity Spec. Method = Magnitude, Normal to Boundary;
Velocity Magnitude = 1.5; Turbulence: Specification Method = Intensity and
Length Scale; Turb. Intensity = 1 %; Turbulent Length Scale = 0.1 m

Zone > outlet > set Type to pressure-outlet


Zone > symmetry > set Type to symmetry
Zone > wall > set Type to wall

Solution Methods

Solution > Solution Methods > Set turbulent kinetic energy and turbulent
dissipation rate to Second Order Upwind.

Convergence criterion

Solution > Monitors > Residuals > Edit....


Set the Absolute Criteria for continuity, x-velocity, y-velocity, k and,e to 1e-6.
Click Ok

Initial guess

Solution > Solution Initialization > Standard Initialization. Set Compute from
inlet then, click Initialize.

Iterate Until Convergence

Solution > Run Calculation. Set the Number of Iterations to 9999. Then, click
Calculate.

The solution should converge after approximately 159 iterations.

5) Analysis
Velocity Vectors

Results > Graphics and Animations > Vectors > Set Up...
Vectors of velocity, color by velocity, velocity magnitude. Set the Scale to 3.
Then click Display.

The results should look like this:

Reattchment length

In order to determine the reattachment length of the vortex behind the


cylinder, we need to plot streamwise velocity at the centerline of the cylinder
just behind the cube down to the end of the computational domain
represented by the discontinuous lines in the figure below.

L = 0.65 m

This line is not the physical line included as part of the computational
boundary. Instead, it is an imaginary line for data extraction. The line is drawn
by key in the coordinate with the point of origin is the same as we have
drawn in Design Modeler. In this case, the centroid of cylinder is the point of
origin with x =0, y=0.
Surface > Line/Rake
Set x0 = 0.05, x1 = 0.4, y0 = 0, y1 = 0; New surface name = line-behindcylinder then click Create.

Results > Plots > XY Plot > Set Up...


Tick Position on X Axis, Set Plot direction X = 1, Y = 0; Set Y Axis Function to
Velocity and X velocity. Next, highlight line-behind-cylinder then click Plot

The results should look like below. The negative velocity indicate the
existence of vortices. But as the distance is further away from the cube, the
streamwise velocity becoming positive. The velocity at 0 m/s indicate the
maximum vortex length behind the cube. However, it is difficult to determine
the length at which the velocity becomes zero. Therefore, we need to export
to Microsoft Excel.

Results > Plots > XY Plot > Set Up...


Tick Write to File then click Write

Save to any folder and give name and make sure the end of filename, include
.xy as shown below.

Next open the .xy data with notepad and copy all data. Then paste into
Microsoft Excel and begin plotting the data.

You might also like