Workshop 08 Vortex Shedding 14. 0 Release
Introduction to ANSYS CFX
Introduction 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 including performing a FFT
Introduction
Setup
Solution
Results
Summary
Reynolds Number Effects Re < 5
Creeping flow (no separation)
A pair of stable vortices in the wake
5-15 < Re < 40
Laminar vortex street
40 < Re < 150
Laminar boundary layer up to the separation point, turbulent wake
150 < Re < 3×105
5
3×10 < Re < 3.5×10
Re > 3.5×106 Introduction
Setup
Solution
6
Boundary layer transition to turbulent Turbulent vortex street, but the separation is narrower than the laminar case Results
Summary
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
Setup
Solution
Results
Summary
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
Setup
Solution
Results
Summary
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
Setup
Solution
Results
Summary
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
Setup
Solution
Results
Summary
Create Boundary Conditions (Wall) Start by creating the Walls boundary conditions: 1.
2.
3.
Insert a new boundary named “Cylinder” •
Set the Boundary Type to Wall and the Location to “CYLINDER”
•
Boundary Details> Option = No Slip Wall
Insert a new boundary named “ RightWall” •
Set the Boundary Type to Wall and the Location to “RIGHT”
•
Boundary Details> Option = Free Slip Wall Wall
Insert a new boundary named “ LeftWall” •
Set the Boundary Type to Wall and the Location to “LEFT”
•
Boundary Details> Option = Free Slip Wall
Introduction
Setup
Solution
Results
Summary
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]
–
2.
Insert a new boundary named “Outlet” •
Set the Boundary Type to Outlet and the Location to “OUT”
•
Boundary Details> Relative Pressure = 0 [Pa]
–
3.
We are dealing with an incompressible flow
Insert a new boundary named “Sym1” •
4.
We are dealing with an incompressible flow
Set the Boundary Type to Symmetry and the Location to “SYM1”
Insert a new boundary named “Sym2” •
Set the Boundary Type to Symmetry and the Location to “SYM2”
Introduction
Setup
Solution
Results
Summary
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
Setup
Solution
Results
Summary
Solver Control 1.
Under Solver Solver Contr Control> ol> Basic Setting, Setting, set set the the follo following wing para paramet meters: ers: •
Min. Coeff. Loops = 1
•
Max. Coeff. Loops = 5
•
Residual Type = RMAX
•
Residual Target = 1E-3
–
Introduction
These parameters parameters together together with the “ Timestep“ are the key numerical inputs for a transient calculations
Setup
Solution
Results
Summary
Output Control 1.
2.
Under Under Outp Output ut Contr Control> ol> Trn Trn Resul Results, ts, do do the foll followi owing ng steps: steps: •
Insert new transient results
•
Option = Selected Variables
•
Output Variable List = Pressure, Velocity, Velocity u, Velocity v, Velocity w.
•
Timestep Interval = 5
Defin Define e the foll followi owing ng CEL CEL expres expressio sions ns for for the the Drag Drag and and Lift Lift
Introduction
Setup
Solution
Results
Summary
Output Control 1.
Under Under Outpu Outputt Contr Control> ol> Mon Monito itor, r, defin define e the foll followi owing ng Monit Monitor or Poin Points: ts:
Name
X [m]
Y [m]
Z [m]
Variable/CEL
CdCylinder
-
-
-
CdCylinderExpression CdCylinderExpression
ClCylinder
-
-
-
ClCylinderExpression 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
Run Solver 1. Sav Save the proje rojecct as as Vortex.wbpj 2.
In the the Pro Proje ject ct Sche Schem matic atic,, Edit the Solution object to start the Solver Manager
3.
Star Startt the the run run from from the the Sol Solve verr Mang Manger er • 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 wi th this workshop
4.
Afte Afterr a few few tim times este teps ps,, Stop Stop you yourr run run
5.
Select File > Monitor Finished Run in the Solver Manager
6.
Browse Browse to to the resu results lts file file prov provide ided d with with the the worksh workshop op –
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
Post-Process Results 1. Usin Using g Win Windo dows ws Exp Explo lore rer, r, loca locate te the 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
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
Setup
Solution
Results
Summary
Post-Process Results 1.
Use the Timestep Selector
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
to load results from different points in the simulation
Solution
Results
Summary
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
•
St
f D
U
The frequency will be calculated through a FFT of the monitoring points Introduction
Setup
Solution
Results
Summary
Post-Process Results 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”
Introduction
Setup
Solution
Results
Summary
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
–
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 Strouhal number •
•
•
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
Grid 1
0.1490
Grid 2
0.1657
Grid 3
0.1686
Grid 4
0.1690
Experiment
0.164
In this case the Grid 4 gives 3 % with respect the experimental value
Introduction
Setup
Solving
Results
Summary
Summary A transient simulation was performed for studying the laminar vortex shedding behind a cylinder.
The computed Strouhal number was compared c ompared with the experimental values for different grids.
Introduction
Setup
Solving
Results
Summary