Vous êtes sur la page 1sur 16

CSUS

ME259

ZHOU

ANSYS WORKBENCH

Tutorial #4 Unsteady Laminar Flow past a Cylinder


Prerequisites
This tutorial assumes that you have successfully completed Tutorial #3 Steady Flow past a
Cylinder.

Introduction
As a flow passes over a circular cylinder as shown
right, its flow pattern depends upon the Reynolds
number. For lower value of Reynolds number like
Re=20 in Tutorial #3, the flow is steady and symmetric.
As the Reynolds number is increased, the disturbance
introduced at the upstream flow can not be damped by
the viscous forces. This leads to a very important
periodic phenomenon downstream of the cylinder,
known as `vortex shedding'.
The purpose of this tutorial is to illustrate the setup and solution of an unsteady flow past a
circular cylinder and to show the vortex shedding process using computer simulation. The
tutorial demonstrates how to do the following:
Solve a time dependent simulation.
Set the time monitors for lift coefficient and observe vortex shedding.
Set up an animation to demonstrate the vortex shedding.

Problem Description
For this tutorial a Reynolds Number of 120 is used with the following settings: the diameter of
the pipe is set to 1 m, the x component of the velocity is set to 1 m/s, the density of the fluid is
set to 1 kg/m3, and the dynamic viscosity must be set to 8.333x10-3 kg/m*s to obtain Re=120.
For this unsteady case, a time derivative term is added into the governing differential equations
(mass and momentum conservation). However, the domain and boundary conditions will be the
same as the Steady Flow Past a Cylinder. Because this is a time-dependent system, initial
conditions at time t=0 are required. In order to solve the transient system, the desired time
range, for instance, the process lasting 2 minutes, and the time step size t for flows to march
through time, for instance t= 0.2 second are needed to input into Anysis FLUENT. The
program will then compute a solution for the first time step, iterating until convergence or a limit
of iterations is reached, and then will proceed to the next time step, marching through time until
the end time is reached.
1

CSUS

ME259

ZHOU

Preparation
The pre-analysis and start-up are the same for both steady and unsteady flow past a cylinder.
The same geometry and mesh are used as Tutorial #3 Steady Flow Past a Cylinder.
First Launch Ansys Workbench and then open your wbpj file saved from Tutorial #3 Steady
Flow Past A Cylinder.

1. Setup (Physics)
A. Duplicate Steady Flow Project
In the Workbench Project Page of your steady flow project, (Right Click) Solution >
Duplicate

B. Launch Fluent.
(Double Click) Setup in the duplicate project. In the pop-up window, select Double
Precision. Then click OK to close the window.

CSUS

ME259

ZHOU

C. Select Transient
In this step, FLUENT is instructed to solve for the unsteady flow because, by default FLUENT
will solve for the steady flow.
Problem Setup > General. Set Time to Transient.

D. Specify Material Properties


Problem Setup > Materials > Fluid > Create/Edit.... Set the viscosity to 8.333*10-3
kg/m*s. Click Change/Create then click close.
E. Save Project

2. Solution
A. Solution methods
Select Second Order Upwind from the Transient Formulation drop-down list
B. Monitors for lift coefficient on cylinder wall: Turn off Drag, Turn on Lift
Solution > Monitors > Drag > Edit.... Then uncheck Print to Console and uncheck
Plot. Click ok.
3

CSUS

ME259

ZHOU

Solution > Monitors > Lift > Edit.... Then check cyinderwall from the Wall Zones,
enable Print to Console, Plot and Write in the Options. Click ok. The last option writes
the lift coefficient data to a file that is buried in one of the subfolders that FLUENT creates in the
working folder. You'll have to dig around to find it.
Set the reference values used to compute the lift and drag coefficients.
Problem Setup > Reference Values. Set Compute From to farfield1.
C. Solution Initialization: Initialize
Set the initial condition in all of the cells to a velocity of 1 m/s in the X-direction.
Solution > Solution Initialization. Set Compute From to farfield1.
Click Initialize.
D. Solution Initialization: Region Adaption
In order to more quickly reach a sinusoidal variation of the lift coefficient to reflect the periodic
flow nature, the velocity in some of the flow region cells will be changed using Adapt locally.
Adapt > Region....

In the Region Adaption window as shown below, set X Min to 0.5 m, set X Max to 32 m, set
Y Min to 0 m, and set Y Max to 32m.
Click Mark then click Close.
This will select the flow region cells bounded by these four points, so we can change the initial
condition in them.
4

CSUS

ME259

ZHOU

Next, click Patch.

CSUS

ME259

ZHOU

In the Patch window as shown below, select Y Velocity under Variable, enter 0.2 under Value
(m/s), the click on solid_surface_body and hexahedron-r0 respectively to complete the
patching menu.

Click Patch, then click close.


This will change the initial Y component of velocity in the selected region from 0 to 0.2 m/s.
E. Data export for animation
An animation of the vorticity magnitude is desired to visualize vortex shedding after the solution
has been calculated. To do so, data needs to be exported from FLUENT to CFD-Post, and then
the post processor is used to view results.
First, go to Solution > Calculation Activities > Automatic Export > Create
Select Solution Data Export from Create drop-down list.

CSUS

ME259

ZHOU

Next, in the Automatic Export window as shown below, change File Type to CFD-Post
compatible, as this is the program used for post processing.
Then, select Vorticity Magnitude from the list of variables under Quantities on the right, so as
to make an animation of contours of vorticity.
Finally, click Browse, and choose a convenient file location to place the data files. Make note of
this location for later use.
Click OK.

CSUS

ME259

ZHOU

F. Advance Solution in Time


Solution > Run Calculation. In the Run Calculation as shown below, set Time Step Size
to 0.2 seconds, set the Number Of Time Steps to 600, and set the Max Iteration/Time
Step to 40.

600

40

Click Calculate. During calculation, lift coefficient Cl shows a clear sinusoidal pattern as
illustrated below, indicating a sustained vortex shedding process.

When complete, close FLUENT to return to the main project window.


G. Save Project
8

CSUS

ME259

ZHOU

3. Results
A. Open CFD-Post
A separate CFD-Post module is first created because this is the easiest way to load the results
for this project.
On the main project window as shown below, double-click Results from Component Systems

Your project schematic window should now appear as below.

To open CFD-Post, double-click on the Results module on C window that was just created.
B. Load results from FLUENT simulation
After opening CFD-Post, click the Load Results button
screen as shown below.

in the upper left corner of the

CSUS

ME259

ZHOU

Next, browse to the location where you chose to save the FLUENT data files. Select the .cas file
that is in this folder, which should be named "FFF-0001.1.cas", or similar. In the bottom right of
this window, select Load complete history as: and Single Case. Finally, click Open.

Click OK in the pop-up window if one or two appear.

10

CSUS

ME259

ZHOU

C. Load Timesteps
Click Tools > Time Step Selector to open the Timestep Selector as shown below.
.

In the window of Timestep Selector as shown below, select the first time step, and click Apply.
Leave the Time Step Selector window open and continue to the next step.

FFF 0001.1

11

CSUS

ME259

ZHOU

D. Insert Vorticity Contour for animation


While leaving the Timestep Selector window open, click Insert > Contour. Name it "Vorticity
Contour".
Under Details of Vorticity Contour, select symmetry 1 from Locations.
Next, ensure that Variable is set to Vorticity.
Change Range to User Specified. Set the Min to 0.01 s^-1 and Max to 2 s^-1.
Enter 25 for Number of Contours. You should now see the following:

Click Apply to create the contour.


Next, set up the view for the animation. Currently the 2D surface from a 3D isometric
perspective is being viewed. For 2D view, click on the +Z axis in the axes triad in the lower right
corner.
12

CSUS

ME259

ZHOU

Now zoom in to the area of interest. Select the zoom box tool from the upper toolbar as shown
below.

Using the zoom box tool, click and drag a box that roughly encompasses the area shown below
to zoom in on it.

Now it is ready to animate the vorticity contour over this zoomed-in area.
E. Create animation
Return to the Time Step Selector Window, which should still be open as shown below. In the
right side of window, click the Animate Timesteps button
.

13

CSUS

ME259

ZHOU

FFF 0001.1

There is a pop-up window of Animation as shown below, select Keyframe Animation, and
click the insert new keyframe button,
. Change the number of frames to equal the number of
data files we saved to animate, in this case 600. Your Animation window should look like this:

600

600

14

CSUS

ME259

ZHOU

Keeping the Animation window open, click back to the Timestep Selector window. Select time
step #600, and click Apply. The Vorticity Contour on the right half of your screen should now
have changed. Click back to the Animation window, and insert another new keyframe. This
time, leave the number of frames set to 10.
To set up the saving options for the animation, click the arrow in the bottom right of the window
to expand the options if it is not. Then check the box labeled Save Movie, and use the folder
icon to set the desired file location and type.

Next, click the play button in the Animation window to create the animation.
F. Save Project
15

CSUS

ME259

ZHOU

4. Verification and Validation

For steady case, to validate the accuracy of the result, we have to check whether the mesh is
refine enough. For unsteady case, we have another parameter that we have to take note of,
which is the time step size. The smaller the time step size, the more accurate the representation
of the physical flow. This will leave for your practice.

16

Vous aimerez peut-être aussi