You are on page 1of 24

Computer Exercise: Unsteady Flow Past

a Cylinder
Problem Specification

Consider the steady state case of a fluid flowing past a cylinder, as illustrated above.
Obtain the velocity and pressure distributions when the Reynolds number is chosen to
be 20. 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 0.05 kg/m*s in order to obtain the desired
Reynolds number.

Pre-Analysis & Start-Up


Prior to opening FLUENT, we must answer a couple of questions. We must determine
what our solution domain is and what the boundary conditions are.
Solution Domain
For an external flow problem like this, one needs to determine where to place the outer
boundary. A circular domain will be used for this simulation. The effects that the cylinder
has on the flow extend far. Thus, the outer boundary will be set to be 64 times as large
as the diameter of the cylinder. That is, the outer boundary will be a circle with a
diameter of 64 m. The solution domain discussed here is illustrated below.

Boundary Conditions
First, we will specify a velocity inlet boundary condition. We will set the left half of the
outer boundary as a velocity inlet with a velocity of 1 m/s in the x direction. Next, we will
use a pressure outlet boundary condition for the right half of the outer boundary with a
gauge pressure of 0 Pa. Lastly, we will apply a no slip boundary condition to the cylinder
wall. The aforementioned boundary conditions are illustrated below.

Geometry
Strategy for Geometry Creation
In order to create the desired geometry we will first create a surface body for the
cylinder. Next, we will create a surface body for the outer boundary as a "frozen body",
so that it doesn't merge with the first surface body. Then, we will use a boolean
operation to subtract the small surface body from the large surface body. At this point,
we will have the surface body of the outer boundary with a hole in the middle where the
cylinder is. Lastly, we will project a vertical line on to the geometry, so that radial edge
sizing can be implemented in the meshing process.
Fluid Flow(FLUENT) Project Selection
Drag Fluid Flow(FLUENT) into the Project Schematic window.
Analysis Type
(Right Click) Geometry > Properties
Set Analysis Type to 2D
Launch Design Modeler
(Double Click) Geometry
Create Inner Circle and Dimension
Create a circle, centered around the origin in the xy plane. Set the diameter of the circle
to 1m.
Inner Circle Surface Body Creation
Concept > Surfaces From Sketches.
Set the Base Object to Sketch 1 (located underneath XYPlane in the Tree). You can
do this by clicking within the tree or you can click on the circle to select Sketch 1. Then
click Apply next to Base Object.
Click Generate
Create New Sketch in the XY Plane
In this step we will create a new sketch in the XY Plane. This step is required for the
boolean operation that we will carry out later in the geometry process. It allows us to
create two distinguishable geometries, in the xy plane.
Click on XYPlane in the Tree Outline and it should highlight blue. Then click on the
New Sketch button,
.

Create Outer Circle and Dimension


Now, create a circle centered around the origin in Sketch 2. Set the diameter of the
circle to 64m. You can click the "fit to window" button shown below to see both circles.

Outer Circle Surface Body Creation


In this step the Surface Body will be created as a frozen, such that it does not merge
with the inner circle surface body.
Concept > Surfaces From Sketches.
Set the Base Object to Sketch 2 (located underneath XYPlane in the Tree). You can
do this by clicking within the tree or you can click on the outer circle to select Sketch 2.
Then click Apply next to Base Object.
Then set Operation to Add Frozen as shown in the image below.

\
Then, click Generate

Carry Out Boolean Operation: Subtraction


In this step, the inner circle will be subtracted from the outer circle in order to obtain the
desired geometry.
Create > Boolean.
First, set Operation to Subtract. Next, use the face selection filter,
, to apply the
outer circle surface body as the Target Body. Then, use the face selection filter,
,
to apply the inner circle surface body as the Tool Body. In order to select inner circle
which overlaps with the outer circle, you may have to click on the planes to the lower left
as shown below.

Lastly, click Generate. At this point if you zoom into the center of the circle you should
see the 1m diameter hole, as shown below.

Create a Bisecting Line


The purpose of this step and the following two steps is to imprint a line onto the
geometry that will, allow for radial edge sizing in the meshing step.
Click on XYPlane in the tree and it should highlight blue. Then, click the new sketch
button,
. In the new sketch draw a line on the y axis that goes through both of the
concentric circles. Make sure that it is coincident to the y axis. Then trim the line
segments that lay inside of the inner circle and the line segments that lay outside of the

outer circle. This, is carried out by using the Trim feature located in the Modify portion
of Sketching.
Line Body Creation
Concept > Lines From Sketches.
Set the Base Object to Sketch 3. (located underneath XYPlane in the Tree). Click
Generate
Projection
Tools > Projection.
Apply the two lines that you created to edge and apply the surface body to target. You
must do these steps by using the line selection filter and the surface selection filter. For
the two lines hold down control to select them both. Click Generate.
Save Project and Close Design Modeler

Mesh
In this section the geometry will be meshed with 18,432 elements. The geometry will be
given 192 circumferential divisions and 96 radial divisions. Mapped face meshing will be
used and biasing will be used in order to significantly increase the number of elements
located close to the cylinder.
Launch Mesher
(Double Click) Mesh
Mapped Face Meshing
(Right Click) Mesh > Insert > Mapped Face Meshing
Set Geometry to both portions of the surface body. You will have to hold down control
in the selection process in order to highlight both halves. Click Update.
Circumferential Edge Sizing
(Right Click) Mesh > Insert > Sizing
Set Geometry to both edges of the surface body. You will have to use the edge
selection filter and you will have to hold down control in the selection process in order to
highlight both halves. Set Type to Number of Divisions, set Number of
Divisions to 96 and set Behavior to Hard. Click Update to generate the new mesh.
Radial Edge Sizing 1 (Top Half)
(Right Click) Mesh > Insert > Sizing
Set Geometry to the top half of the bisecting line. Set Type to Number of
Divisions, set Number of Divisions to 96 and set Behavior to Hard. Then, set
Bias Type to the first option and set Bias Factor to 460. These selections are shown
in the image below.

Radial Edge Sizing 2 (Bottom Half)

(Right Click) Mesh > Insert > Sizing


Set Geometry to the top half of the bisecting line. Set Type to Number of
Divisions, set Number of Divisions to 96 and set Behavior to Hard. Then, set
Bias Type to the second option and set Bias Factor to 460. These selections are
shown in the image below.

Then, click Update to generate the new mesh. You should obtain the mesh, that is
shown below.

Click Here For Higher Resolution


Verify Mesh Size
(Click) Mesh > (Expand) Statistics
You should have 18,624 nodes and 18,432 elements.

Create Named Selections


In this section the various parts of the geometry will be named according to the image
below. First create a named selection for the left half of the outer boundary and call it
"farfield1". Next, create a named selection for the right half of the outer boundary and
call it "farfield2". Lastly, create a named selection for both sides of the inner
circle(cylinder) and call it "cylinderwall". When creating the third named selection, make
sure that you included both halves of the circle. You will have to hold down control to
select both edges.

Save Project

Physics Setup
Your workbench project should look like this.

We are done with all the meshing steps but for some reason, a tick mark doesn't appear
next to Mesh in the project page. To get the tick mark next to mesh, right-click on it and
select Update as shown below.

Launch Fluent
(Double Click) Setup in the Workbench Project Page.
When the FLUENT Launcher appears change options to "Double Precision", and
then click OK as shown below.The Double Precision option is used to select the
double-precision solver. In the double-precision solver, each floating point number is
represented using 64 bits in contrast to the single-precision solver which uses 32 bits.
The extra bits increase not only the precision, but also the range of magnitudes that can

be represented. The downside of using double precision is that it requires more


memory.

Twiddle your thumbs a bit while the FLUENT interface starts up. This is where we'll
specify the governing equations and boundary conditions for our boundary-value
problem. On the left-hand side of the FLUENT interface, we see various items listed
under Problem Setup. We will work from top to bottom of the Problem Setup items
to setup the physics of our boundary-value problem. On the right hand side, we have
the Graphics pane and, below that, the Command pane.
Check Mesh
(Click) Mesh > Info > Size
You should now have an output in the command pane stating that there are 18,432
cells.

(Click) Mesh > Check


You should see no errors in the command pane.
Specify Material Properties
Solution Setup > Materials > Fluid > Create/Edit... .
Then set the Density to 1 kg/m^3 and set Viscosity to 0.05 kg/m*s. Click
Change/Create then click Close.

Boundary Conditions
FarField1

Solution Setup > Boundary Conditions > farfield1.


Set Type to velocity-inlet. Click Edit.... Set Velocity Specification Method to
Components, set X-Velocity to 1 m/s, and set Y-Velocity to 0 m/s.
FarField2

Solution Setup > Boundary Conditions > farfield2..


Set Type to pressure-outlet.
Cylinder Wall

Solution Setup > Boundary Conditions > cylinderwall .


Set Type to wall.

Reference Values
Solution Setup > Reference Values.
Set the Density to 1 kg/m^3. The other default values will work for the purposes of this
simulation.
Save Project

Numerical 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 double-click
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,
. Change
the number of frames to equal the number of data files we saved to animate, in this
case 400. Your Animation window should look like this:

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!

Verification & Validation


1. Perform additional runs with timesteps of 0.02 and 1s. Comment on the stability
of the scheme relating to the timestep by comparing the residuals.
2. Compare the residuals and the vorticity figures for a mesh of 128x64 or another
mesh of your choosing. Is there any noticeable differences between the results
using different mesh sizes?

Exercises
1. Base Case Unsteady Cylinder
a. How many steps were there per lift coefficient oscillation once the
oscillation reaches an apparently steady state? What do these oscillations
represent physically?
b. Why did you include the patched velocity found in the tutorial? What
happens when you dont include it in your calculated solution? Does
anything change if you increase the patch velocity?
2. Varying Timestep - Unsteady Cylinder
a. Plot the Strouhal number: the dimensionless frequency oscillation (f*d/U)
vs. the square of time step, and compare to the results in Fig. 5 of "Implicit
Multigrid Computation of Unsteady Flows with Applications to
Aeroelasticity" (Caughey 2001).
3. Altering Grid Unsteady Cylinder
a. Returning to a timestep of 0.2s, compare a mesh of 128 x 64 cells and a
mesh of your choosing to the original mesh. Maintain the same cell height
by altering the bias factor yourself.
b. Once the solution is computed, calculate the lift oscillation frequency, and
use Richardson extrapolation to compute the limiting frequency
corresponding to zero mesh spacing (similarly to the procedure done in
the paper by Caughey in part 2).
4. Altering Reynolds Number Unsteady Cylinder
a. Compare the results for Reynolds numbers of 60, 120, and 80 at a
timestep of 0.2s and mesh 192x96. Create a graph of the Strouhal number
(dimensionless frequency oscillation) as a function of these Reynolds
numbers.

You might also like