You are on page 1of 15

Unsteady Flow Past a Cylinder - Problem Specification

Problem Specification

Consider the unsteady state case of a fluid flowing past a cylinder, as illustrated above. For this tutorial we will use a Reynolds Number of 120. In order to simplify the computation, the diameter of the cylinder is set to 1 m, the x component of the velocity is set to 1 m/s and the density of the fluid is set to 1 kg/m^3. Thus, the dynamic viscosity must be set to 8.333x10^-3 kg/m*s in order to obtain the desired Reynolds number. Compared to the steady case, the unsteady case includes an additional timederivative term in the Navier-Stokes equations:

The methods implemented by FLUENT to solve a time dependent system are very similar to those used in a steady-state case. In this case, the domain and boundary conditions will be the same as the Steady Flow Past a Cylinder. However, because this is a transient system, initial conditions at t=0 are required. To solve the system, we need to input the desired time range and time step into FLUENT. The program will then compute a solution for the first time step, iterating until convergence or a limit of iterations is reached, then will proceed to the next time step, "marching" through time until the end time is reached.

2. Pre-Analysis & Start-Up

Please complete the "Steady Flow past a Cylinder tutorial before completing this tutorial. Click here to go to the problem statement of the "Steady Flow Past a Cylinder" tutorial. Alternatively, click here to download the completed project files for the "Steady Flow Past a Cylinder" tutorial. The pre-analysis is the same for both steady and unsteady flow past a cylinder. Click [here] to go to the pre-analysis of the "Steady Flow Past a Cylinder" tutorial. To start-up, open your completed "Steady Flow Past a Cylinder" project file. (If using the completed version in the zip file above, extract the files and open "Cylinder.wbpj".) Right-click on Fluid Flow (FLUENT) and then click Duplicate. Enter "Unsteady Flow" in the highlighted field to rename it. Your Project Schematic should now appear as below.

4. Setup (Physics)
Launch FLUENT.
(Double Click) Setup in "Unsteady Flow", the duplicate project. Select Double Precision , and if using a computer with multiple cores, select parallel, and set the number of cores to be used.

Then click OK

Transient
In this step here we will, tell FLUENT to solve for the unsteady flow. As you can see, by default FLUENT will solve for the steady flow. Problem Setup > General . Set Time to Transient .

Specify Material Properties


To achieve a Reynolds number of 120, as required in the problem statement, we will change the material viscosity, to 8.333*10^-3 kg/m*s.

Problem Setup > Materials > Fluid > Create/Edit... . Set the viscosity to 8.333*10^-3 kg/m*s. Click Change/Create .

Then click Close .

Save Project

5. Solution
Convergence Criterion: Turn off Drag, Turn on Lift
Solution > Monitors > Drag > Edit... . Then uncheck Print to Console and uncheck Plot . Click ok . Solution > Monitors > Lift > Edit... . Then check Print to Console , Plot and Write . 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.

Solution Initialization
First, let's set the initial condition in all of the cells to a velocity of 1 m/s in the Xdirection. Solution > Solution Initialization . Set Compute From to farfield1. . Click Initialize . Next, we'll change the velocity in some of the cells to more quickly reach a sinusoidal variation of the lift coefficient. Adapt > Region... .

Then 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 cells bounded by these four points, so we can change the initial condition in them. Next, click Patch .

Complete the patching menu as shown below. This will change the initial Y component of velocity in the selected region from 0 to 0.2 m/s.

Click Patch ,then click close .

Setting Up Data Export to Create Animation


We would like to create an animation of the vorticity magnitude after the solution has been calculated. To do so, we will need to export data from FLUENT to CFD-Post, the post processor used to view results. To do so, go to Solution > Calculation Activities > Automatic Export > Create > Solution Data Export....

Next, change File Type to CFD-Post compatible, as this is the program we will use for post processing. Then, select Vorticity Magnitude from the list of variables on the right, so we can 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.

Advance Solution in Time


Solution > Run Calculation . Set Time Step Size to 0.2 seconds and set the Number Of Time Steps to 400.

Now, click Calculate . (You may have to hit Calculate twice.) Now, have a cup of coffee. When complete, close FLUENT to return to the main project window.

Save Project

Results
Open CFD-Post
We'll create a separate CFD-Post module, as this is the easiest way to load the results for this project. On the left of the main project window, expand Component Systems and doubleclick Results.

Your project schematic window should now appear as below.

Double click on the Results module that was just created to open CFD-Post.

Results
Now, we need to load the results of our FLUENT simulation. After opening CFD-Post, click the Load Results button in the upper left corner of the screen.

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-1-0001.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 popup window if one appears. h4. Load Timesteps Click Tools > Time Step Selector to open the Time Step Selector.

Select the first time step, and click Apply. Leave the Time Step Selector window open, but continue to the next step.

h4. Create Vorticity Contour Now, let's insert a contour of vorticity, in order to animate it. While leaving the Time Step 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, let's set up the view we would like for the animation. You can see that we are currently viewing the 2D surface from a 3D, isometric perspective. To fix this, click the Z-axis in the axes triad in the lower corner.

Now let's zoom in to the are of interest. Select the zoom box tool from the upper toolbar.

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

Now we're ready to animate the vorticity contour over this zoomed-in area. h4. Create Animation Return to the Time Step Selector Window, which should still be open. Click the Animate Timesteps button.

Select Keyframe Animation, and click the insert new keyframe button, in this case 400. Your Animation window should look like this:

Change the number of frames to equal the number of data files we saved to animate,

Keeping the Animation window open, click back to the Time Step Selector window. Select time step #400, 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. We're now ready to set up the saving options for the animation. Click the arrow in the bottom right of the window to expand the options.

Check the box labeled Save Movie, and use the folder icon to set the desired file location and type. Next, maximize your CFD-Post window, and click the play button in the Animation window to create the animation! Your video should turn out similar to the one below.