You are on page 1of 19

Theory and Practice of Marine CFD

Computer Lab Class


UNSTEADY FLOW PAST A CIRCULAR CYLINDER

Qing Xiao & Yuanchuan Liu

Department of Naval Architecture and Marine Engineering


University of Strathclyde
Glasgow

NM 402/963 Theory and Practice of Marine CFD

Contents
1.

Background Knowledge ..................................................................................................... 1

2.

Problem Description ........................................................................................................... 2

3.

Problem Modelling ............................................................................................................. 2


3.1 Domain Size ..................................................................................................................... 2
3.2 Boundary Conditions ....................................................................................................... 3
3.3 Domain Discretisation ..................................................................................................... 3
3.4 Input Variables ................................................................................................................. 3

4.

Guidelines ........................................................................................................................... 4
4.1 Geometry Creation ........................................................................................................... 4
4.2 Mesh Generation ............................................................................................................ 10
4.3 FLUENT Setup .............................................................................................................. 13

Assessment ....................................................................................................................... 17

NM 402/963 Theory and Practice of Marine CFD

UNSTEADY FLOW PAST A CIRCULAR CYLINDER


1. Background Knowledge
The non-dimensional quantities describing the flow around a smooth circular cylinder depend
on the cylinder Reynolds number:

Re

DV

where D is the diameter of the cylinder, V is the flow velocity and is the kinematic viscosity.
The flow undergoes tremendous changes as the Reynolds number is increased from zero. For
a smooth circular cylinder, the flow regimes it may experience with increasing Re is
summarised in Fig. 1.

Page 1 of 17

NM 402/963 Theory and Practice of Marine CFD


Fig. 1 Regimes of flow around a smooth, circular cylinder in steady current

2. Problem Description
In the following sections, we are going to look at a simple but classic hydrodynamic problem,
namely, unsteady flow past a circular cylinder. It is expected that you can get a general idea
on how a CFD simulation can be carried out through this problem. But first, let us look at the
description of the problem.
Table 1 gives the basic parameters which define the problem and will also be used in our
CFD simulation. Suppose that we are looking at a rigid circular cylinder placed in sea current,
which is a hydrodynamic problem. From Part 1, the Reynolds number is calculated as follows:

Re

DV

0.02 0.01
200
1106

Table 1 Simulation parameters

Cylinder diameter (D)

D = 2 cm = 0.02 m

Free-stream flow velocity(V)

V = 1 cm/s = 0.01 m/s

According to Fig. 1, we know that a laminar vortex street is likely to appear like the one
shown in Fig. 2. Then the problem is laminar and the flow type is unsteady flow. We are also
expecting flow separation and periodic vortex shedding to happen.

Fig. 2 Streamlines showing flow separation in the cylinder wake

3. Problem Modelling
3.1 Domain Size
The computational domain should be reasonably large to capture all effects induced by the
presence of the cylinder. Thus, the following domain size is chosen and shown in Fig. 3:
Upstream (left) = 10D = 20 cm
Downstream (right) = 20D = 40 cm

Page 2 of 17

NM 402/963 Theory and Practice of Marine CFD


Sides (top/bottom) = 10D = 20 cm

Fig. 3 Computational domain size

3.2 Boundary Conditions


Boundary conditions are essential if we want to define the fluid flow problem. You may
imagine the computational domain as a room while boundary conditions act like the
characters of the walls bounding the room. Table 2 shows the boundary conditions we are
going to use in the CFD simulation.
Table 2 Boundaries conditions
Where
Cylinder
Left side
Right side
Top/Bottom

Type
Wall
Velocity-inlet
Pressure-outlet
Symmetry

Why
no particle allowed to slide or cross
velocity given
no imposed pressure
undisturbed flow, if far enough

3.3 Domain Discretisation


The entire domain should be divided into different blocks and then a structure mesh will be
generated in each block. Due to the complexity of the flow in the vicinity and wake of the
cylinder, fine mesh is needed. The criterion to evaluate the mesh is that it should be fine
enough to capture all expected phenomena such as the flow separation and vortex shedding.
3.4 Input Variables
Velocity at the upstream of the cylinder should be V = 0.01 m/s. The imposed pressure at the
downstream boundary should be p = 0.0 Pa. In addition to the spatial discretisation, we also
need to discretise the time. The determination of the time-step size should take into
consideration the limitation of accuracy and stability as well as the time it will take to
complete the computation. A rough estimation of the time-step size can be made as follows:
Page 3 of 17

NM 402/963 Theory and Practice of Marine CFD

Re 200 St 0.18 (obtained from the relationship below)

Period of vortex shedding T

D
0.02

11.11s (definition of Strouhal number)


StV 0.18 0.01

T T
Time-step size should satisfy t , 0.22, 0.55 Choose t 0.5s
50 20

From past experience, the duration of run for such a problem is given by

20T , 40T 220, 440 Choose 300s


Then the number of time steps is calculated as
n 300 / 0.5 600

4. Guidelines
4.1 Geometry Creation
Note: In this section we will create the geometry and computational domain for later use.

a. Fluid Flow (FLUENT) Project Selection


(Double Click) Fluid Flow (FLUENT) in the tool box menu (or drag the icon to the blank area)

b. Analysis Type
(Right Click) Geometry > Properties
Set Analysis Type to 2D

c. Launch DesignModeler
(Double Click) Geometry to open the DesignModeler software
Select Centimeter as the desired length unit

d. Set the Correct Plane (XY Plane)


(Right Click) XY Plane in the Tree Outline > Look at

Page 4 of 17

NM 402/963 Theory and Practice of Marine CFD


(Click) Sketching to switch to Sketching Toolboxes

e. Turn on 2D Grids
(Click) Settings > Grid > (Tick) Show in 2D (Keep the default settings for other options)

f. Create a Circle and Set Dimension


(Click) Draw > Circle to create a circle to represent the cylinder (Place its centre at the
origin of the xy plane)
Note: Do not worry about the size of the circle. We will set it later using Dimension.

(Click) Dimensions > Diameter


Select the circle in the drawing area, and then click any place to set the location of the
dimension indicator
Note: You can always move the dimension to a proper place using Move function under Dimensions.
Note: Use Ctrl+MMB (Middle Mouse Button) to pan and Shift+MMB to zoom.

Change the diameter of the circle to 2cm in Details View panel

Page 5 of 17

NM 402/963 Theory and Practice of Marine CFD


g. Create Surface Body for the Circle
(Select) Concept > Surfaces From Sketches from the menu
Set the Base Object to Sketch1 (located underneath XY Plane in the Tree Outline panel)
Note: You can do this by clicking within the Tree Outline panel or you can click on the circle to select Sketch1.

(Click) Apply next to Base Object to confirm selection


(Click) Generate

in the toolbar to create surface body for the circle

h. Create a Rectangle and Set Dimension


Note: In this step we will create a new sketch, a rectangle, in the XY Plane. This step is required for the Boolean
operation that we will carry out later in the geometry process.

(Click) XY Plane and it should high light blue


(Click) on the New Sketch button

Switch back to the Sketching Toolboxes and create a Rectangle from the Draw section
Note: Do not worry about the location of the rectangle. We will deal with it right away.

(Click) Dimensions > Horizontal/Vertical to define the position and size of the rectangle (4
dimensions are needed, see the figure below)

Page 6 of 17

NM 402/963 Theory and Practice of Marine CFD

Set the values for these dimensions from Details View panel (here H2=60, H4=20, V3=40,
V5=20)
Note: You can use Zoom to Fit feature

in the toolbar to help you see the whole picture.

i. Rectangle Surface Body Creation


Note: In this step the Surface Body will be created as a frozen, such that it does not merge with the inner circle
surface body.

(Select) Concept > Surfaces From Sketches from the menu


Set the Base Object to Sketch2 (located underneath XY Plane in the Tree Outline panel)
Note: You can do this by clicking within the Tree Outline panel or you can click on the circle to select Sketch2.

(Click) Apply next to Base Object to confirm selection


Change Operation to Add Frozen as shown below from Details View panel
Note: This is necessary if you want to perform later Boolean operation.

(Click) Generate

j. Carry Out Boolean Operation: Subtraction


Note: In this step, the inner circle will be subtracted from the rectangle in order to obtain the desired geometry.

Page 7 of 17

NM 402/963 Theory and Practice of Marine CFD


(Click) Create > Boolean
Set Operation to Subtract from Details View panel
Select the rectangle surface body and apply to make it the Target Body
Note: Target Body is the body from which you want to subtract another body.

Select the circle surface body and apply to make it the Tool Body
Note: Tool Body is the body which you want to subtract from another body. It will be removed in this case.
Note: You can always use the Tree Outline panel to select the right body you want.

(Click) Generate
Note: At this point if you zoom into the centre of the circle you should see the 1m diameter hole, as show below.

4.2 Create Auxiliary Lines


Note: In this section we will imprint auxiliary lines onto the geometry we have created in last section. These
lines will be used in the following meshing section.

a. Draw lines
(Click) XY Plane and it should high light blue
(Click) on the New Sketch button
Draw a rectangle using Rectangle in Draw and apply Equal Length and Symmetry in
Constrains to it to define a square centred at the origin
(Click) Dimensions > Horizontal to set the side length of the square to 12cm as shown in
the figure below

Page 8 of 17

NM 402/963 Theory and Practice of Marine CFD

Draw the rest lines and apply the constraints and dimension to them as shown below
Note: When you draw lines, notice the letter appearing besides your mouse. (P for Point, C for Cross, H for
Horizontal and V for Vertical)

Vertical

Symmetry

Horizontal

Horizontal
Vertical

Symmetry

(Click) Trim in Modify to trim the line segments that lay inside of the inner circle

Page 9 of 17

NM 402/963 Theory and Practice of Marine CFD


b. Line Body Creation
(Select) Concept > Lines From Sketches from the menu
Set the Base Object to Sketch3
(Click) Generate

c. Projection
(Select) Tools > Projection from the menu
Select the lines you created earlier and apply them to Edges
Note: Hold down the Ctrl button to select multiple lines.

Select the rectangle surface body and apply it to Target


(Click) Generate
Note: Nothing seems to have changed after this operation. But if you switch back to the Tree Outline panel and
turn on the face selection filter

in the toolbar, you can now select parts of rectangle surface body as shown

in the figure below. What we just did actually has divided the whole region into several small regions.

d. Save Project and Close DesignModeler


4.3 Mesh Generation
Note: In this section we will generate mesh for our computational domain.

a. Launch Mesher
(Double Click) Mesh from the Workbench to open the Mesher

b. Create Mapped Face Meshing


Note: This step is to make sure all the cells are quadrilaterals.

Page 10 of 17

NM 402/963 Theory and Practice of Marine CFD


(Right Click) Mesh > Insert > Mapped Face Meshing
Note: You can also click the Mesh Control dropdown tool in the toolbar to perform this operation.

Set Geometry to all portions of the surface body


Note: Make sure you have set the selection filter in the toolbar to Face

Note: You will have to hold down Ctrl to select all.

(Click) Update

c. Edge Sizing
Note: In this step we will define the number of the cells for every edge so as to determine the mesh of the whole
domain.

(Right Click) Mesh > Insert > Sizing


Set Geometry to the edge labelled 1 in the figure below
Note: Make sure you have set the selection filter in the toolbar to Edge

Set Type to Number of Divisions, set Number of Divisions to 30 as shown in the table
below
Set Behavior to Hard and set Bias Type and Bias Factor according to the table below
Note: Bias Type defines the way the mesh is distributed. The type used for edge sizing #1 means that the mesh
will be finer along the edge direction.
Note: Bias Factor is defined as the ratio of the last to first cell size in one edge.

Repeat the above steps for all the other edges


Note: The reason why we set different Bias Type for edge sizing #1 and #2 is that the direction of the edges is
different. You can show the edge direction by turning on the Display Edge Direction feature

in the

toolbar. Unfortunately, there does not seem to be a way to reverse the direction in Workbench 14.0.

(Click) Update to generate new mesh after all operations are done and the created mesh
looks like the following figure
Edge Sizing #
1
2
3
4
5
6
7
8
9

Edges Included
2
2
12
3
1
3
1
6
2

Bias Type

No Bias

Page 11 of 17

Bias Factor
4
4
N/A
1.2
1.2
2
2
2
2

No. of Divisions
30
30
25
30
30
60
60
20
20

NM 402/963 Theory and Practice of Marine CFD


5

6
4

3
1

1
3

3
2
4

2
3
6

d. Create Named Selections


Note: This step acts as a necessary procedure for later setting boundary conditions.

Select the 3 edges located at the left side of the rectangle


Note: Use Ctrl for multiple selections.

(Right Click) > Create Named Selection


(Enter) velocity_inlet as the name for the selection group
Repeat the selection and naming process for all edges surrounding the domain, including
those making up the circle according to the following table

Page 12 of 17

NM 402/963 Theory and Practice of Marine CFD


Position of Edges
Name

Left
velocity_inlet

Right
pressure_outlet

Top & Bottom


symmetry

Circle
wall

e. Save Project and Close Mesher


4.4 FLUENT Setup
Note: In this section we will set up the parameters for FLUENT.

a. Launch FLUENT
Select Setup from the Workbench
Set Precision in the right side Properties panel to Double Precision
(Double Click) Setup from the Workbench to open FLUENT
(Click) OK for the FLUENT Launcher while keeping all parameters unchanged and you
should see the following image

b. Configure General
Change Steady in Time to Transient while keeping other settings unchanged

Page 13 of 17

NM 402/963 Theory and Practice of Marine CFD


c. Configure Materials
(Click) Create/Edit to open the following figure

(Click) FLUENT Database and select water-liquid (h2o<l>) from the list then click Copy and
close both windows

d. Configure Cell Zone Conditions


(Click) Edit to open the configuration window
Choose water-liquid from the Material Name list and click OK to close the window

Page 14 of 17

NM 402/963 Theory and Practice of Marine CFD

e. Configure Boundary Conditions


Choose velocity_inlet from the Zone list and click Edit to open the configuration window
Choose Magnitude and Direction from the Velocity Specification Method list
Change Velocity Magnitude to 0.01 and click OK to finish

f. Configure Reference Values


Choose velocity_inlet from the Compute from list
Change Area to 0.02
Note: This value is the diameter of the cylinder and will be used for calculating drag and lift coefficients.

Page 15 of 17

NM 402/963 Theory and Practice of Marine CFD

g. Configure Monitors
(Click) CreateDrag and open the Drag Monitor window
(Tick) Plot and Write then choose wall from Wall Zones and click OK
Repeat the process for Lift

h. Configure Calculation Activities


Set Autosave Every (Time Steps) to 10

i. Configure Run Calculation


Set Time Step Size to 0.5 and Number of Time Steps to 500
Note: These have been determined in section 3.4.

(Click) Calculate to start calculation

Page 16 of 17

NM 402/963 Theory and Practice of Marine CFD


5. Assessment
Assessment will be carried out via individual interview about UNSTEADY FLOW PAST
CIRCULAR CYLINDER by asking a few questions about mesh generation (DesignModeler
and Mesher), pre-process, problem solving and post-processing (FLUENT).

Page 17 of 17

You might also like