You are on page 1of 22

Workshop 08 Vortex Shedding

14. 0 Release

Introduction to ANSYS CFX


1 2011 ANSYS, Inc. March 1, 2012 Release 14.0

Introduction
Workshop Description:
Setup a transient simulation of a transient vortex shedding behind a cylinder (Krmn vortex street) and compare the predicted Strouhal number with experimental data.

Learning Aims:
This workshop introduces several new skills: Preparing a simulation for transient analysis Learn how to post-process a transient simulation including performing a FFT

Introduction
2 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Reynolds Number Effects


Re < 5
Creeping flow (no separation)

5-15 < Re < 40

A pair of stable vortices in the wake

40 < Re < 150

Laminar vortex street

150 < Re < 3105

Laminar boundary layer up to the separation point, turbulent wake Boundary layer transition to turbulent Turbulent vortex street, but the separation is narrower than the laminar case
Results Summary
Release 14.0

3105 < Re < 3.5106


Re > 3.5106
Introduction
3 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Mesh Import
1. Launch Workbench 2. Drag and drop a CFX component system in
the project page

3. Start CFX-Pre by double clicking Setup

4. Right-click on Mesh > Import Mesh >ICEM


CFD

5. Set the Mesh Units to m


For some mesh formats it is important to
know the units used to generate the mesh

6. Import the mesh F10_S10_B15_Hex010.cfx5


Introduction
4 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Define Simulation Type


The first step is to change the Analysis Type to Transient:
1. Edit the Analysis Type object in the Outline tree

2. Set the Analysis Type Option to Transient


3. Set the Total Time to 20 [s]

4. Set the Timesteps to 0.01 [s] and click OK

The simulation will have 2000 timesteps

Introduction
5 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Define New Material


1. Define CEL expressions for Re,
Velocity, Density and Viscosity

2. Right Click on Materials> Insert>


Material

3. Name = MyFluid

4. Insert CEL expressions for Density


and Viscosity

The idea is to set the properties in


order to reach the target Reynolds number

5. Click OK
Introduction
6 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Edit Default Domain


1. Edit Default Domain from the
Outline tree

2. Basic Settings> Material =


MyFluid

3. Fluid Models> Heat Transfer>


Option = None

4. Fluid Models> Turbulence> Option


= None (Laminar)

5. Click OK

Introduction
7 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Create Boundary Conditions (Wall)


Start by creating the Walls boundary conditions:
1. Insert a new boundary named Cylinder

Set the Boundary Type to Wall and the Location to CYLINDER Boundary Details> Option = No Slip Wall

2. Insert a new boundary named RightWall


Set the Boundary Type to Wall and the Location to RIGHT Boundary Details> Option = Free Slip Wall

3. Insert a new boundary named LeftWall


Set the Boundary Type to Wall and the Location to LEFT Boundary Details> Option = Free Slip Wall

Introduction
8 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Create Boundary Conditions (Outlet & Sym)


1. Insert a new boundary named Inlet

Set the Boundary Type to Inlet and the Location to IN Boundary Details> Velocity= 20 [m.s-1]

We are dealing with an incompressible flow

2. Insert a new boundary named Outlet

Set the Boundary Type to Outlet and the Location to OUT Boundary Details> Relative Pressure = 0 [Pa]

We are dealing with an incompressible flow

3. Insert a new boundary named Sym1

Set the Boundary Type to Symmetry and the Location to SYM1

4. Insert a new boundary named Sym2


Set the Boundary Type to Symmetry and the Location to SYM2

Introduction
9 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Create Initial Conditions


1. Create CEL Expressions for the initial flow angle,
U and V velocities The idea is to create an asymmetry in the initial
velocity field in order to accelerate the generation of vortices and reduce the computational time

2. Insert a Global Initialisation

3. Under Cartesian Velocity Components, insert


the CEL Expressions for U and V velocities

4. Set the Relative Pressure to 0 Pa 5. Click OK

Introduction
10 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Solver Control
1. Under Solver Control> Basic Setting, set the following parameters:

Min. Coeff. Loops = 1 Max. Coeff. Loops = 5 Residual Type = RMAX Residual Target = 1E-3

These parameters together with the Timestep are the key numerical inputs for a transient calculations

Introduction
11 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Output Control
1. Under Output Control> Trn Results, do the following steps:

Insert new transient results Option = Selected Variables Output Variable List = Pressure, Velocity, Velocity u, Velocity v, Velocity w. Timestep Interval = 5

2. Define the following CEL expressions for the Drag and Lift

Introduction
12 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Output Control
1. Under Output Control> Monitor, define the following Monitor Points:

Name
CdCylinder ClCylinder HighPpt LowPpt Monitor Point 1 Monitor Point 2

X [m]
-1 1 -2 2

Y [m]
0 0 2 2

Z [m]
0.25 0.25 0.25 0.25

Variable/CEL
CdCylinderExpression ClCylinderExpression Pressure Pressure Velocity Velocity

Monitor Point 3
Monitor Point 4 Monitor Point 5 Monitor Point 6 Monitor Point 7
Introduction
13 2011 ANSYS, Inc.

3
4 6 8 28
Setup
March 1, 2012

2
2 2 2 2

0.25
0.25 0.25 0.25 0.25
Solution

Velocity
Velocity Velocity Velocity Velocity
Results Summary
Release 14.0

Run Solver
1. Save the project as Vortex.wbpj 2. In the Project Schematic, Edit the Solution object to start the Solver Manager

3. Start the run from the Solver Manger

You can monitor the volume of water in the domain during the simulation on the User Points tab The simulation will take about 30 min to complete. Therefore results files have been provided with this
workshop

4. After a few timesteps, Stop your run


5. Select File > Monitor Finished Run in the Solver Manager 6. Browse to the results file provided with the workshop Take a look at the Momentum and Mass residuals and at the User Points. The transient behaviour of the flow is clear.

Introduction
14 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Post-Process Results
1. Using Windows Explorer, locate the supplied results file Vortex.res, and drag it into an empty region of the Project Schematic 2. A new CFX Solution and Results cell will appear. Double-click on the Results object to open it in CFD-Post.

Introduction
15 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Post-Process Results

1. Insert> Contour
Name = myVelocity Location = Sym1 Variable = Velocity Range = User Specified Min = 0 [m s^-1] Max = 26 [m s^-1] # of Contours = 27

Introduction
16 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Post-Process Results
1. 2. 3. 4. 5. 6. Use the Timestep Selector to load results from different points in the simulation With the first Timestep loaded, open the Animation tool Select the Quick Animation toggle and select Timesteps as the object to animate Turn off the Repeat Forever button Enable the Save Movie toggle and choose the folder where the video will be saved Click the Play icon to animate the results and to generate the video file

Introduction
17 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Post-Process Results
Behind the cylinder transient vortices are
formed

The appearance of these vortices have a


certain frequency that depends on the Reynolds number

The Strouhal number is a dimensionless


number describing oscillating flows

The Strouhal is defined as a function of the


frequency, diameter and velocity

f D St U

The frequency will be calculated through a


FFT of the monitoring points
Introduction
18 2011 ANSYS, Inc.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Post-Process Results
1. 2. 3.
Go back to Workbench In the Vortex component system, right click on Solution and choose Display Monitors In the solver Manager, go to Workspace >Workspace Properties>Global Plot Settings: Plot Data by = Time Step On the User Points Tab, right click on the Graph>Monitor Properties>Range Settings >Plot Data By = Simulation Time On the User Points Tab, right click on the Graph>Export Plot Data This file requires further modification in a text editor so as to keep the Time and Monitor Point 2 columns only. Modification has already been made: the result file is Monitor Point 2.csv
Introduction
19 2011 ANSYS, Inc.

4. 5. 6.

Setup
March 1, 2012

Solution

Results

Summary
Release 14.0

Post-Process Results
1.
In CFD-Post, Insert> Chart Name = myFFT General Tab
Type = General XY- Transient Fast Fourier Transform = on Substract mean = on Range input Data Min = 10 Range input Data Max = 20

Data Series
Data Source > File = Monitor Point 2.csv file

X Axis Tab
Min = 1 Max = 5

2. 3.

Y Axis Tab Y Function = Magnitude Export chart and save it as a .csv file Open the .csv File and locate the frequency that gives the highest Magnitude

4.
20

Use this frequency together with the diameter and velocity to calculate the Strouhal number
2011 ANSYS, Inc. March 1, 2012 Release 14.0

Post-Process Results
The CFD calculations can be repeated for
several finer Grids in order to study the discretisation error Strouhal number

Grid 1
Grid 2 Grid 3

0.1490

0.1657
0.1686 0.1690

On successive finer grids the Strouhal


number will approach asymptotically to a grid independent value

Grid 4
Experiment

In this case the Grid 4 gives 3 % with


respect the experimental value

0.164

Introduction
21 2011 ANSYS, Inc.

Setup
March 1, 2012

Solving

Results

Summary
Release 14.0

Summary
A transient simulation was performed for studying the laminar vortex shedding behind a cylinder. The computed Strouhal number was compared with the experimental values for different grids.

Introduction
22 2011 ANSYS, Inc.

Setup
March 1, 2012

Solving

Results

Summary
Release 14.0

You might also like