computationa fluid dynamics cfd handouts 2014
Post on 06-Feb-2018
227 Views
Preview:
TRANSCRIPT
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
1/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
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
2/19
NM 402/963 Theory and Practice of Marine CFD
I
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
5
Assessment ....................................................................................................................... 17
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
3/19
NM 402/963 Theory and Practice of Marine CFD
Page 1of 17
UNSTEADY FLOW PAST A CIRCULAR CYLINDER
Background Knowledge1.
The non-dimensional quantities describing the flow around a smooth circular cylinder depend
on the cylinder Reynolds number:
Re DV
whereDis 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.
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
4/19
NM 402/963 Theory and Practice of Marine CFD
Page 2of 17
Fig. 1 Regimes of flow around a smooth, circular cylinder in steady current
Problem Description2.
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:
6
0.02 0.01Re 200
1 10
DV
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
Problem Modelling3.
Domain Size3.1
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 cmDownstream (right) = 20D= 40 cm
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
5/19
NM 402/963 Theory and Practice of Marine CFD
Page 3of 17
Sides (top/bottom) = 10D= 20 cm
Fig. 3 Computational domain size
Boundary Conditions3.2
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 Type Why
Cylinder Wall no particle allowed to slide or cross
Left side Velocity-inlet velocity given
Right side Pressure-outlet no imposed pressure
Top/Bottom Symmetry undisturbed flow, if far enough
Domain Discretisation3.3
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.
Input Variables3.4
Velocity at the upstream of the cylinder should be V= 0.01 m/s. The imposed pressure at the
downstream boundary should bep= 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 tocomplete the computation. A rough estimation of the time-step size can be made as follows:
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
6/19
NM 402/963 Theory and Practice of Marine CFD
Page 4of 17
Re 200 0.18St (obtained from the relationship below)
Period of vortex shedding0.02
11.11
0.18 0.01
DT s
StV
(definition of Strouhal number)
Time-step size should satisfy , 0.22, 0.5550 20
T Tt
Choose 0.5t s
From past experience, the duration of run for such a problem is given by
20 , 40 220, 440T T Choose 300s
Then the number of time steps is calculated as
300 / 0.5 600n
Guidelines4.
Geometry Creation4.1
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> Propert ies
Set Analys is Typeto 2D
c.Launch DesignModeler
(Double Click) Geometry to open the DesignModelersoftware
Select Centimeteras the desired length unit
d.Set the Correct Plane (XY Plane)
(Right Click) XY Planein the Tree Outline > Look at
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
7/19
NM 402/963 Theory and Practice of Marine CFD
Page 5of 17
(Click) Sketchingto switch to Sketching Toolboxes
e.Turn on 2D Grids
(Click) Sett ings> 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 Movefunction 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 Viewpanel
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
8/19
NM 402/963 Theory and Practice of Marine CFD
Page 6of 17
g. Create Surface Body for the Circle
(Select) Concept> Surfaces From Sketchesfrom the menu
Set the Base Objectto Sketch1 (located underneath XY Plane in the Tree Outlin epanel)
Note: You can do this by clicking within the Tree Outline panel or you can click on the circle to select Sketch1.
(Click) Applynext to Base Objectto 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 Planeand it should high light blue
(Click) on the New Sketchbutton
Switch back to the Sketching Toolboxesand create a Rectangle from the Drawsection
Note: Do not worry about the location of the rectangle. We will deal with it right away.
(Click) Dimensions> Horizontal/Verticalto define the position and size of the rectangle (4
dimensions are needed, see the figure below)
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
9/19
NM 402/963 Theory and Practice of Marine CFD
Page 7of 17
Set the values for these dimensions from Details Viewpanel (here H2=60, H4=20, V3=40,
V5=20)
Note: You can use Zoom to Fi tfeature 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 Sketchesfrom the menu
Set the Base Objectto 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) Applynext to Base Objectto confirm selection
Change Operat ionto Add Fro zenas shown below from Details Viewpanel
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.
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
10/19
NM 402/963 Theory and Practice of Marine CFD
Page 8of 17
(Click) Create> Boolean
Set Operat ionto Subtractfrom Details Viewpanel
Select the rectangle surface body and apply to make it the Target Bod y
Note: Target Bodyis 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 Bodyis the body which you want to subtract from another body. It will be removed in this case.
Note: You can always use the Tree Outlinepanel 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.
Create Auxiliary Lines4.2
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 Planeand it should high light blue
(Click) on the New Sketchbutton
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
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
11/19
NM 402/963 Theory and Practice of Marine CFD
Page 9of 17
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)
(Click) Trimin Modi fy totrim the line segments that lay inside of the inner circle
Symmetry
Horizontal
Horizontal
Symmetry
Vertical
Vertical
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
12/19
NM 402/963 Theory and Practice of Marine CFD
Page 10of 17
b.Line Body Creation
(Select) Concept> Lines From Sketchesfrom the menu
Set the Base Objectto Sketch3
(Click) Generate
c.Projection
(Select) Tools> Project ionfrom 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 Outlinepanel 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 CloseDesignModeler
Mesh Generation4.3
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.
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
13/19
NM 402/963 Theory and Practice of Marine CFD
Page 11of 17
(Right Click) Mesh> Insert> Mapped Face Meshing
Note: You can also click the Mesh Controldropdown tool in the toolbar to perform this operation.
Set Geometryto 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 Geometryto 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 Div is ions, set Number of Div isions to 30 as shown in the table
below
Set Behaviorto Hardand 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 Typefor 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 Di rection 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 # Edges I ncluded Bias Type Bias Factor No. of Di visions
1 2 4 30
2 2 4 30
3 12 No Bias N/A 254 3 1.2 30
5 1 1.2 30
6 3 2 60
7 1 2 60
8 6 2 20
9 2 2 20
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
14/19
NM 402/963 Theory and Practice of Marine CFD
Page 12of 17
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) > CreateNamed Select ion
(Enter) velocity_inlet as the name for the selection group
Repeat the selection and naming process for all edges surrounding the domain, includingthose making up the circle according to the following table
1 1
2 2
3 33
33 333
3
3
3
3
4
4
4
5 6
6
6
7
8 8 8
8 8 8
9
9
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
15/19
NM 402/963 Theory and Practice of Marine CFD
Page 13of 17
Posit ion of Edges Left Right Top & Bottom Circle
Name velocity_inlet pressure_outlet symmetry wall
e.Save Project and Close Mesher
FLUENT Setup4.4
Note: In this section we will set up the parameters for FLUENT.
a.Launch FLUENT
Select Setupfrom the Workbench
Set Precisionin the right side Propert iespanel to Double Precision
(Double Click) Setupfrom 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 Steadyin Timeto Transient while keeping other settings unchanged
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
16/19
NM 402/963 Theory and Practice of Marine CFD
Page 14of 17
c.Configure Materials
(Click) Create/Edit to open the following figure
(Click) FLUENT Databaseand select water-liquid (h2o) from the list then click Copy and
close both windows
d.Configure Cell Zone Conditions
(Click) Editto open the configuration window
Choose water- l iquidfrom the Material Namelist and click OK to close the window
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
17/19
NM 402/963 Theory and Practice of Marine CFD
Page 15of 17
e.Configure Boundary Conditions
Choose veloci ty_inletfrom the Zonelist and click Edit to open the configuration window
Choose Magnitude and Direct ionfrom the Veloci ty Sp ecif icat ion Methodlist
Change Veloci ty Magnitudeto 0.01 and click OK to finish
f.Configure Reference ValuesChoose veloci ty_inletfrom the Compute fromlist
Change Areato 0.02
Note: This value is the diameter of the cylinder and will be used for calculating drag and lift coefficients.
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
18/19
NM 402/963 Theory and Practice of Marine CFD
Page 16of 17
g.Configure Monitors
(Click) CreateDragand open the Drag Monitorwindow
(Tick) Plotand Writethen choose wallfrom Wall Zonesand click OK
Repeat the process for Lif t
h.Configure Calculation Activiti es
Set Auto save Every (Time Steps)to 10
i.Configure RunCalculation
Set Time Step Sizeto 0.5 and Number of Time Steps to 500
Note: These have been determined in section3.4.
(Click) Calculateto start calculation
-
7/21/2019 Computationa Fluid Dynamics CFD Handouts 2014
19/19
NM 402/963 Theory and Practice of Marine CFD
Assessment5.
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).
top related