Unsteady Laminar Flow Over a Cylinder

16
CSUS ME259 ZHOU 1  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 ov er 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/m 3 , 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 g overning 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 r equired. 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.

Transcript of Unsteady Laminar Flow Over a Cylinder

Page 1: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 1/16

CSUS ME259 ZHOU

1

 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 disturbanceintroduced 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.

Page 2: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 2/16

CSUS ME259 ZHOU

2

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 SteadyFlow Past A Cylinder.

1. Setup (Physics)

 A. Duplicate Steady Flow Project

In the Workbench Proj ect Page of your steady flow project, (Right Cl ick) Solut ion >

Dupl icate

B. Launch Fluent.

(Double Cl ick) Setup  in the duplicate project. In the pop-up window, select Double

Precision . Then click OK  to close the window. 

Page 3: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 3/16

CSUS ME259 ZHOU

3

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.

Probl em Setup > General . Set Time to Transient.

D. Specify Material Properties

Probl em Setup > Materials > Flui d > Create/Edit . . .. Set the v iscos i t y to 8.333*10-3 

kg/m*s. Click Change/Create then click c lose. 

E. Save Project

2. Solution

 A. Solut ion methods

Select Second Order Upwind  from the Transient Formulat ion drop-down list

B. Monitors for li ft coefficient on cyl inder wall: Turn off Drag, Turn on Lift

Solut ion > Monitors > Drag > Edit . . .. Then uncheck Prin t to Conso le and uncheck

Plot . Click ok .

Page 4: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 4/16

CSUS ME259 ZHOU

4

Solut ion > Monito rs > Li f t > Edit . . .. Then check cyinderwall from the Wall Zones,

enable Prin t to Conso le, Plot  and Write in the Opt ions . 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.

Probl em Setup > Reference Values . Set Compute From  to farf ie ld1. 

C. Solution Initialization: Initialize

Set the initial condition in all of the cells to a velocity of 1 m/s in the X-direction.

Solut ion > Solut ion In i t ia l izat ion . Set Compute From  to farf ie ld1. 

Click In i t ia l ize.

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.

 Adap t > 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.

Page 5: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 5/16

CSUS ME259 ZHOU

5

Next, click Patch .

Page 6: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 6/16

CSUS ME259 ZHOU

6

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 c lose.

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 solutionhas 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.

Page 7: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 7/16

CSUS ME259 ZHOU

7

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. 

Page 8: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 8/16

CSUS ME259 ZHOU

8

F. Advance Solution in Time

Solut ion > Run Calcu lat ion . 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.

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

600 

40 

Page 9: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 9/16

CSUS ME259 ZHOU

9

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 f rom FLUENT simulation

 After opening CFD-Post, click the Load Results button in the upper left corner of the

screen as shown below.

Page 10: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 10/16

CSUS ME259 ZHOU

10

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.

Page 11: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 11/16

CSUS ME259 ZHOU

11

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 

Page 12: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 12/16

CSUS ME259 ZHOU

12

D. Insert Vortic ity 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.

Page 13: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 13/16

CSUS ME259 ZHOU

13

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 .

Page 14: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 14/16

CSUS ME259 ZHOU

14

There is a pop-up window of Animat ion 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:

FFF 0001.1 

600 

600 

Page 15: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 15/16

CSUS ME259 ZHOU

15

Keeping the Animat ion window open, click back to the Timestep Selector  window. Select time

step #600, and click App ly . The Vorticity Contour on the right half of your screen should now

have changed. Click back to the Animat ion 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 windowto 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 Animat ion window to create the animation.

F. Save Project

Page 16: Unsteady Laminar Flow Over a Cylinder

8/10/2019 Unsteady Laminar Flow Over a Cylinder

http://slidepdf.com/reader/full/unsteady-laminar-flow-over-a-cylinder 16/16

CSUS ME259 ZHOU

16

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 representationof the physical flow. This will leave for your practice.