You are on page 1of 44

Workshop XX

Vortex shedding around


a cylinder

Introductory
FLUENT Training

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-1 December 2010
WS7: Vortex Shedding

Goals Workshop Supplement

• The purpose of this tutorial is to introduce the user to good techniques


for modelling transient flow

• The case consider here is flow around a cylinder with a Reynolds


number of 100

• Vortex shedding should be observed. But tutorial starts with a steady


state analysis assuming that the user didn’t anticipate this behavior

• This tutorial demonstrates iterative and non-iterative time advancement,


FFT and animations

• The tutorial is carried out using FLUENT and CFD Post in standalone
mode

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-2 December 2010
WS7: Vortex Shedding

Introduction Workshop Supplement

• Computational domain created in Design Modeller had the following


dimensions

Name Location Dimension

Cylinder D1 2 m (dia.)

Inlet Length D2 20 m = 10 D
Outlet Length D3 30 m = 15 D
Width D4 40 m = 20 D

• For a dimensionless analysis you may prefer a diameter of 1 m. Note


that Fluent uses the physical dimension. But if you specify a cylinder
diameter of 1m, inlet velocity = 1 m/s, density =1 kg/m3, viscosity will
be 1/Re = 0.01 [Pa.s]

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-3 December 2010
WS7: Vortex Shedding

Reynolds Number Effects Workshop Supplement

Re < 5 Creeping flow (no separation)

A pair of stable vortices in the


5-15 < Re < 40 wake

Laminar vortex street


40 < Re < 150

Laminar boundary layer up to


150 < Re < 3×105 the separation point, turbulent
wake

Boundary layer transition to


3×105 < Re < 3.5×106 turbulent

Turbulent vortex street, but


Re > 3.5×106 the separation is narrower
than the laminar case

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-4 December 2010
WS7: Vortex Shedding
Start a Fluent project (standalone mode)
Workshop Supplement

• Launch Fluent and choose your working directory.


• Choose ‘2D’
• Choose parallel with 2 processors to take advantage of multi core processor
Note that a parallel token is required in your license

Choose your working


directory here

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-5 December 2010
WS7: Vortex Shedding
Read a mesh that was generated in ICEM CFD Workshop Supplement

• Read the FLUENT mesh file : vortex-shedding-coarse.msh


– FileRead Mesh

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-6 December 2010
WS7: Vortex Shedding

Mesh Workshop Supplement

• The mesh will read in and display, and the zones will be written out.
– Partition with metis method is automatically performed

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-7 December 2010
WS7: Vortex Shedding

Mesh Workshop Supplement

• The mesh needs scaling, in order to have dimensionless format

Final domain
extent

• Close the scale panel and Check the Mesh


– General > Check
– General > Report Quality

• Display the grid again once scaling has been performed


– General > Display

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-8 December 2010
WS7: Vortex Shedding

Solver & model Workshop Supplement

• Keep the steady-state pressure-based solver

• Keep laminar model

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-9 December 2010
WS7: Vortex Shedding

Materials Workshop Supplement

• The properties to be used for the material ‘air’ need to be set


– For Density, select 1 kg/m3
– For Viscosity, select 0.01 Pa.s, Select Change/Create

• Assign the material ‘air’ to the grid cells


– Select ‘Cell Zone Conditions’
– Highlight ‘fluid’ then ‘Edit’
– Observe ‘air’ is already selected

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-10 December 2010
WS7: Vortex Shedding

Boundary Conditions Workshop Supplement

• Inlet
– Set the inlet boundary conditions ‘in’ with V = 1m/s

• Outlet
– The zone named ‘out’ is a pressure outlet with a constant gauge pressure of 0 Pa
• Note that default operating pressure is correct but has no impact on calculation since fluid
density is constant

• Wall and symmetry boundary conditions keep the default values

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-11 December 2010
WS7: Vortex Shedding

Solution Methods Workshop Supplement

• Select Solution Methods in the LHS tree

– Use QUICK discretization scheme in order to avoid numerical diffusion

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-12 December 2010
WS7: Vortex Shedding

Solution Monitors Workshop Supplement

• Set up residual monitors so the convergence can be monitored


– Monitors > Residuals > Edit
– Make sure ‘plot’ is on

• Create points to monitor quantity


Surface Point
– Specify coordinates (2 , 1)
– Activate point tool to check location on the grid
– (check out point tool before closing panel)

• Surface monitor on point


– Select “vertex-average” on report type and “velocity” “Y-velocity” in field variable
– Options: Print to console & Plot

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-13 December 2010
WS7: Vortex Shedding

Solution Initialization Workshop Supplement

• Initialize the flow field based on the far-field boundary


– Compute from > “in” (inlet zone)

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-14 December 2010
WS7: Vortex Shedding

Save the Case File Workshop Supplement

• Save the case file


– File > Write Case
• You can write case and data files with extension .gz
– the files will be compressed automatically

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-15 December 2010
WS7: Vortex Shedding

Run Calculation Workshop Supplement

• Set the number of requested iterations to 400

Note that solution is not


converging and monitor
shows a regular periodic
behavior

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-16 December 2010
WS7: Vortex Shedding

Post-Processing Workshop Supplement

• Choose Graphics and animations > Vectors

Steady state
solution is
asymetric

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-17 December 2010
WS7: Vortex Shedding

Save the Case&Data Files Workshop Supplement

• Save the Case&Data files


– File > Write Case&Data..
• You can write case and data files with extension .gz
– the files will be compressed automatically

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-18 December 2010
WS7: Vortex Shedding

Transient Run Calculation Workshop Supplement

• This suggests that hydrodynamics instability may occur

• This requires to solve the problem in a transient mode


Problem setup> General

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-19 December 2010
WS7: Vortex Shedding

Run Calculation Workshop Supplement

• It is also recommended to change solver Methods. Default pressure


velocity coupling (SIMPLE) may require more iterations to converge
– Use PISO et second order time stepping (under Solution methods)
– This implies also to change under relaxation factors

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-20 December 2010
WS7: Vortex Shedding

Solution Monitors Workshop Supplement

• Edit the Surface monitor


– Get Data every time step and display Flow time on X axis
– Click write button and specify a name for the file. This type of file can be used later for
Fourier Transform analysis

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-21 December 2010
WS7: Vortex Shedding

Save the Transient Case File Workshop Supplement

• Save the transient case file


– File > Write Case
• You can write case and data files with extension .gz
– the files will be compressed automatically

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-22 December 2010
WS7: Vortex Shedding

Run Calculation Workshop Supplement

• Method 1 : Choose a time step on Total Length/inlet_velocity/200


– Then you can check if the convergence occurs in less than 20 subiterations
– You can also display courant number …
• (Graphics and Animation > Contours of velocity – Cell courant number)
… And adjust time step so that courant number is close to one
– Time step is proportional to courant number

• Method 2: Choosing appropriate time step for such a problem


requires some literature study and can be more efficient than
above method
– From literature about vortex shedding we know that Strouhal number is between
0.165 for this Reynolds number .This gives an order of magnitude of time step
fD 1 D
St   period    6.06 s
V f St.V

• One can decide to choose around 60 points in the period.


This leads to a time step of 0.1 s
ANSYS, Inc. Proprietary Release 13.0
© 2010 ANSYS, Inc. All rights reserved. WS7-23 December 2010
WS7: Vortex Shedding
Run Calculation Workshop Supplement

• Specify time step (0.1 s) and number of time step (120)


• Click on the Extrapolate Variables option
– The solution will be speed Up

Note that between 5 and 10 subiterations


are required to converge each time step
ANSYS, Inc. Proprietary Release 13.0
© 2010 ANSYS, Inc. All rights reserved. WS7-24 December 2010
WS7: Vortex Shedding

Save the Transient Case&Data Files Workshop Supplement

• Save the transient case&data files


– File > Write Case&Data..
• You can write case and data files with extension .gz
– the files will be compressed automatically

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-25 December 2010
WS7: Vortex Shedding

Run Calculation Workshop Supplement

• Many time-steps have to be run before to get a periodic signal


– it can be time consuming

• So, we propose you to read the final case and data files:
File Read Case & Data
« vortex-shedding-unsteady.cas.gz »
– This case has been run for 50.4 s until a periodic signal is obtained.
And poor initialisation has been convected several time in the domain

• And to use this new starting point to continue the


convergence process

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-26 December 2010
WS7: Vortex Shedding

NITA Workshop Supplement

• Enable the Non Iterative Time Advancement Method (NITA)


– With Fractional Step for Pressure-Velocity Coupling

- NITA is an algorithm used to speed up the


transient solution process
- NITA runs about twice as fast as the ITA scheme
2
-NITA scheme reduce the splitting error to O(Δt2)
by using sub-iterations per time step
Overall time-discretization Truncation Splitting error (due
error for 2nd-order scheme: = error: O(Dt2)
+ to eqn segregation):
O(Dt2) O(Dtn)

- Two flavors of NITA schemes available


- PISO (NITA/PISO)
- Fractional-step method (NITA/FSM)
About 20% cheaper than NITA/PISO on a per
time-step basis
1

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-27 December 2010
WS7: Vortex Shedding

Run Calculation Workshop Supplement

• Select Calculation Activities in LHS menu

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-28 December 2010
WS7: Vortex Shedding

Post Processing [FLUENT] Workshop Supplement

• Create Q-criterion . This is usually used to caracterize vortex

• Define  Custom Field Function


U V U V
– In 2D incompressible flow it can be written: Q  . 
x y y x
– Use calculator and select field function (Derivatives) to create this new variable:

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-29 December 2010
WS7: Vortex Shedding

Post Processing [FLUENT] Workshop Supplement

• Animation sequence will be selected before running calculation


• Select Calculation Activities in LHS menu

3 4
ANSYS, Inc. Proprietary Release 13.0
© 2010 ANSYS, Inc. All rights reserved. WS7-30 December 2010
WS7: Vortex Shedding

Solution Monitors Workshop Supplement

• Edit Surface monitor again


– Add write option
• This data acquisition on the point will be used for a FFT analysis
– UnSelect the Plot option

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-31 December 2010
WS7: Vortex Shedding

Solution Monitors Workshop Supplement

• Edit Residuals monitor again


– UnSelect the Plot option

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-32 December 2010
WS7: Vortex Shedding

Run calculation for creating animation Workshop Supplement

• NITA requires a smaller time step


– Choose 0.05 s

• And 240 time steps


– This corresponds roughly to 2 periods

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-33 December 2010
WS7: Vortex Shedding

Save the Transient Case&Data Files Workshop Supplement

• Save the transient case&data files


– File > Write Case&Data..
• You can write case and data files with extension .gz
– the files will be compressed automatically

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-34 December 2010
WS7: Vortex Shedding

Post Processing [FLUENT] Workshop Supplement

• To run the animation (Graphics and Animation in the LHS menu)

You can play the animation


and write it to a mpeg format

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-35 December 2010
WS7: Vortex Shedding

Post Processing [FLUENT] Workshop Supplement

• FFT analysis (Fast Fourier Transform)


Display Plot

Load input file named


« point-4-y-velocity-final.out »
 This file countains more than 2000 time steps

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-36 December 2010
WS7: Vortex Shedding

Post Processing [FLUENT] Workshop Supplement

• FFT analysis : choose magnitude on Y axis and change X range.

Write the FFT to a file and edit this file


The main peak is located for a Strouhal
number of 0.1698
- 3% higher than experiment

The second peak is the harmonic


Signal is not strictly sinusoidal

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-37 December 2010
WS7: Vortex Shedding

Close FLUENT – Run CFD-Post Workshop Supplement

• Close FLUENT

• Open a CFD-POST session


– We will create an animation

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-38 December 2010
WS7: Vortex Shedding

Post Processing [CFD-Post] Workshop Supplement

• Animation in CFD post can be done based on all the data files
already saved
– Thus, you can create any animation once calculation is finished

• File Load Results


– Select last time step data file:

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-39 December 2010
WS7: Vortex Shedding

Post Processing [CFD-Post] Workshop Supplement

• Insert a vector

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-40 December 2010
WS7: Vortex Shedding

Post Processing [CFD-Post] Workshop Supplement

• Activate time step selector

Select successive time steps,


graphics window is updated
ANSYS, Inc. Proprietary Release 13.0
© 2010 ANSYS, Inc. All rights reserved. WS7-41 December 2010
WS7: Vortex Shedding

Post Processing [CFD-Post] Workshop Supplement

• Activate time step selector

Turn off the Repeat


Forever button

Play the animation and Create file


ANSYS, Inc. Proprietary Release 13.0
© 2010 ANSYS, Inc. All rights reserved. WS7-42 December 2010
WS7: Vortex Shedding

Summary Workshop Supplement

• In this tutorial we have used FLUENT with a transient case

• We have learned how to use iterative and non iterative


advancement scheme

• We checked with FFT analysis that predicted frequency is in


good agreement with results from literature

• We learned how to create animation within Fluent and with


CFD-Post

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-43 December 2010
WS7: Vortex Shedding

References Workshop Supplement

• Braza, M., Chassaing, P., and Minh, H.H., Numerical Study and
Physical Analysis of the Pressure and Velocity Fields in the Near
Wake of a Circular Cylinder, J. Fluid Mech., 165:79-130, 1986.

• Coutanceau, M. and Defaye, J.R., Circular Cylinder Wake


Configurations - A Flow Visualization Survey, Appl. Mech. Rev., 44(6),
June 1991.

• Williamson, C.H.K, “Vortex Dynamics in The Cylinder Wake,” Annu.


Rev. Fluid Mechanics 1996. 28:447-539

ANSYS, Inc. Proprietary Release 13.0


© 2010 ANSYS, Inc. All rights reserved. WS7-44 December 2010

You might also like