CFX-Intro 14.0 WS08 Vortex-Shedding

22
© 2011 ANSYS, Inc. March 1, 2012 1 Release 14.0 14. 0 Release Introduction to ANSYS CFX Workshop 08 Vortex Shedding

Transcript of CFX-Intro 14.0 WS08 Vortex-Shedding

Page 1: CFX-Intro 14.0 WS08 Vortex-Shedding

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

14. 0 Release

Introduction to ANSYS CFX

Workshop 08 Vortex Shedding

Page 2: CFX-Intro 14.0 WS08 Vortex-Shedding

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

Workshop Description:

Setup a transient simulation of a transient vortex shedding behind a cylinder (Kármán 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

Introduction Setup Solution Results Summary

Page 3: CFX-Intro 14.0 WS08 Vortex-Shedding

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

Reynolds Number Effects

Re > 3.5×106

3×105 < Re < 3.5×106

40 < Re < 150

150 < Re < 3×105

5-15 < Re < 40

Re < 5

Turbulent vortex street, but

the separation is narrower

than the laminar case

Boundary layer transition to

turbulent

Laminar boundary layer up to

the separation point, turbulent

wake

Laminar vortex street

A pair of stable vortices in the

wake

Creeping flow (no separation)

Introduction Setup Solution Results Summary

Page 4: CFX-Intro 14.0 WS08 Vortex-Shedding

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

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

Mesh Import

Introduction Setup Solution Results Summary

Page 5: CFX-Intro 14.0 WS08 Vortex-Shedding

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

Define Simulation Type

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

The first step is to change the Analysis Type to Transient:

Introduction Setup Solution Results Summary

Page 6: CFX-Intro 14.0 WS08 Vortex-Shedding

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

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

Define New Material

Introduction Setup Solution Results Summary

Page 7: CFX-Intro 14.0 WS08 Vortex-Shedding

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

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

Edit Default Domain

Introduction Setup Solution Results Summary

Page 8: CFX-Intro 14.0 WS08 Vortex-Shedding

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

Create Boundary Conditions (Wall)

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

Start by creating the Walls boundary conditions:

Introduction Setup Solution Results Summary

Page 9: CFX-Intro 14.0 WS08 Vortex-Shedding

© 2011 ANSYS, Inc. March 1, 2012 9 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 Setup Solution Results Summary

Page 10: CFX-Intro 14.0 WS08 Vortex-Shedding

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

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

Create Initial Conditions

Introduction Setup Solution Results Summary

Page 11: CFX-Intro 14.0 WS08 Vortex-Shedding

© 2011 ANSYS, Inc. March 1, 2012 11 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 Setup Solution Results Summary

Page 12: CFX-Intro 14.0 WS08 Vortex-Shedding

© 2011 ANSYS, Inc. March 1, 2012 12 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 Setup Solution Results Summary

Page 13: CFX-Intro 14.0 WS08 Vortex-Shedding

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

Output Control

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

Name X [m] Y [m] Z [m] Variable/CEL

CdCylinder - - - CdCylinderExpression

ClCylinder - - - ClCylinderExpression

HighPpt -1 0 0.25 Pressure

LowPpt 1 0 0.25 Pressure

Monitor Point 1 -2 2 0.25 Velocity

Monitor Point 2 2 2 0.25 Velocity

Monitor Point 3 3 2 0.25 Velocity

Monitor Point 4 4 2 0.25 Velocity

Monitor Point 5 6 2 0.25 Velocity

Monitor Point 6 8 2 0.25 Velocity

Monitor Point 7 28 2 0.25 Velocity

Introduction Setup Solution Results Summary

Page 14: CFX-Intro 14.0 WS08 Vortex-Shedding

© 2011 ANSYS, Inc. March 1, 2012 14 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 Setup Solution Results Summary

Page 15: CFX-Intro 14.0 WS08 Vortex-Shedding

© 2011 ANSYS, Inc. March 1, 2012 15 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 Setup Solution Results Summary

Page 16: CFX-Intro 14.0 WS08 Vortex-Shedding

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

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

Post-Process Results

Introduction Setup Solution Results Summary

Page 17: CFX-Intro 14.0 WS08 Vortex-Shedding

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

Post-Process Results

1. Use the Timestep Selector to load results from different points in the simulation

2. With the first Timestep loaded, open the Animation tool

3. Select the Quick Animation toggle and select Timesteps as the object to animate

4. Turn off the Repeat Forever button

5. Enable the Save Movie toggle and choose the folder where the video will be saved

6. Click the Play icon to animate the results and to generate the video file

Introduction Setup Solution Results Summary

Page 18: CFX-Intro 14.0 WS08 Vortex-Shedding

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

• 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

• The frequency will be calculated through a FFT of the monitoring points

Post-Process Results

U

DfSt

Introduction Setup Solution Results Summary

Page 19: CFX-Intro 14.0 WS08 Vortex-Shedding

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

1. Go back to Workbench

2. In the Vortex component system, right click on Solution and choose Display Monitors

3. In the solver Manager, go to Workspace >Workspace Properties>Global Plot Settings:

– Plot Data by = Time Step

4. On the User Points Tab, right click on the Graph>Monitor Properties>Range Settings >Plot Data By = Simulation Time

5. On the User Points Tab, right click on the Graph>Export Plot Data

6. 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”

Post-Process Results

Introduction Setup Solution Results Summary

Page 20: CFX-Intro 14.0 WS08 Vortex-Shedding

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

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

– Y Axis Tab

• Y Function = Magnitude

2. Export chart and save it as a .csv file

3. Open the .csv File and locate the frequency that gives the highest Magnitude

4. Use this frequency together with the diameter and velocity to calculate the Strouhal number

Post-Process Results

Page 21: CFX-Intro 14.0 WS08 Vortex-Shedding

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

• The CFD calculations can be repeated for several finer Grids in order to study the discretisation error

• On successive finer grids the Strouhal number will approach asymptotically to a grid independent value

• In this case the Grid 4 gives 3 % with respect the experimental value

Strouhal number

Grid 1 0.1490

Grid 2 0.1657

Grid 3 0.1686

Grid 4 0.1690

Experiment 0.164

Post-Process Results

Introduction Setup Solving Results Summary

Page 22: CFX-Intro 14.0 WS08 Vortex-Shedding

© 2011 ANSYS, Inc. March 1, 2012 22 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 Setup Solving Results Summary