26
1 Middle East Technical University Mechanical Engineering Department ME 485 CFD with Finite Volume Method Spring 2014 (Dr. Sert) ANSYS Fluent 1 Tutorial 3 Problem Definition We want to simulate the unsteady flow over a 2D cylinder. Problem domain is a rectangular box with a circular hole in it, as shown below. Fluid properties are = 1 / 3 , = 1 . To simulate the flow with Reynolds number = 80, inlet velocity at the left boundary is set to be 80 m/s. Exit pressure is taken as 0 Pa. Top and bottom boundaries are specified to have zero shear. No slip BC is specified at the cylinder surface. We are interested in capturing the time periodic vortex shedding behind the cylinder and estimate itsfrequency, i.e. Strouhal number. We also want to calculate the lift and drag coefficients for the cylinder. Reference: A. L. F. L. M. Silva, A. Silveira-Neto, J. J. R. Damasceno “Numerical simulation of two-dimensional flows over a circular cylinder using the immersed boundary method”, J. Comp. Physics, 189, 351-370, 2003. 1 ANSYS 14.5 is used to prepare this tutorial. There might be some changes if you use another version. 16.5 m 13.5 m = 1 m 7.5 m 7.5 m

FLUENT Tutorial 3 - Unsteady Flow Over a Cylinder

Embed Size (px)

DESCRIPTION

fluent

Citation preview

  • 1

    Middle East Technical University Mechanical Engineering Department

    ME 485 CFD with Finite Volume Method Spring 2014 (Dr. Sert)

    ANSYS Fluent1 Tutorial 3

    Problem Definition

    We want to simulate the unsteady flow over a 2D cylinder. Problem domain is a rectangular box with a circular

    hole in it, as shown below. Fluid properties are = 1 /3, = 1 . To simulate the flow with Reynolds

    number = 80, inlet velocity at the left boundary is set to be 80 m/s. Exit pressure is taken as 0 Pa. Top and bottom boundaries are specified to have zero shear. No slip BC is specified at the cylinder surface.

    We are interested in capturing the time periodic vortex shedding behind the cylinder and estimate its frequency,

    i.e. Strouhal number. We also want to calculate the lift and drag coefficients for the cylinder.

    Reference: A. L. F. L. M. Silva, A. Silveira-Neto, J. J. R. Damasceno Numerical simulation of two-dimensional flows over a circular cylinder using the immersed boundary method, J. Comp. Physics, 189, 351-370, 2003.

    1 ANSYS 14.5 is used to prepare this tutorial. There might be some changes if you use another version.

    16.5 m 13.5 m

    = 1 m 7.5 m

    7.5 m

  • 2

    Step 0:

    Before working on this tutorial finish the first and the second.

    Step 1:

    Start ANSYS Workbench.

    Find Fluid Flow (Fluent) in the Toolbox tab and drag and drop it to the Project Schematic tab.

    Change the name of the analysis to Tutorial 3.

    Step 2:

    Click on the Geometry cell.

    In the Properties tab change Analysis Type to 2D.

    Double click on the Geometry cell to start the DesignModeler.

    Do not change the default length unit Meter.

    Step 3:

    In the Sketching tab go to Settings and check the Snap checkbox.

    Set Major Grid Spacing to 5 m.

    Set Minor-Steps per Major to 5.

    Set Snaps per Minor to 2.

    This will allow you to draw the problem geometry exactly using the mouse.

  • 3

    Step 4:

    In the Sketching tab select Draw Rectangle.

    In the Graphics tab first click on point (-16.5, -7.5) for the lower left corner of the rectangle and then click on

    point (13.5, 7.5) for the upper right corner of the rectangle. As you move the mouse you can see the x and y

    coordinates of the pointer on the lower right corner of the DesignModeler window.

    In the Sketching tab select Draw Circle.

    In the Graphics tab first click on point (0, 0) for the center of the circle and then click on (0.5,0) for the arbitrary point on its perimeter.

  • 4

    Step 5:

    In the Concept menu select Surfaces from Edges.

    In the Graphics tab select 4 edges of the rectangle and the circle and click the Apply button in the Details tab.

    Click the Generate button in the toolbar. A new part will be generated.

    Save the project and close the DesignModeler window to go back to the Workbench window.

  • 5

    Step 6:

    In the Workbench double click on the Mesh cell to start the Meshing application.

    Click on the Edge button of the toolbar in order to be able to select edges.

    In the Geometry tab using the Ctrl key select the top and bottom edges of the rectangle, right click and select Create Named Selection. Give a name wall to this selection.

    Similarly create named selections as inlet, outlet and cylinder.

  • 6

    Step 7:

    In the Outline tab expand Geometry and select Surface Body.

    In the Details tab set Thickness to 0 (I dont know why is it not already 0?)

  • 7

    Step 8a:

    In the Outline tab right click on Mesh and select Insert Method.

    Select the 2D domain in the Geometry tab and click on the Apply button of the Details tab.

    Change Method to Triangles.

  • 8

    Step 8b:

    In the Outline tab right click on Mesh and select Insert Sizing.

    Click the Edge button of the Toobar in order to be able to select an edge.

    In the Graphics tab select the circle.

    In the Details tab click the Apply button.

    Change Element Size to 0,001. This way there will be elements on the cylinder with size 0,001 m.

  • 9

    Step 8c:

    In the Outline tab select Mesh.

    In the Details tab change Max Face Size to 0,3 m to control the element sizes away from the cylinder.

    Click Generate Mesh button of the toolbar.

    An ustructured mesh of 8066 nodes (seen in the Statistics part of the Details tab) will be generated.

  • 10

    Step 8d:

    In the Outline tab right click Mesh and select Insert Inflation. Well create a structured boundary layer mesh

    around cylinder.

    Select the 2D surface and click the Apply button next to Geometry cell of the Display tab.

    Select the circle and click the Apply button next to Boundary cell of the Display tab.

    Set Inflation Option to First Layer Thickness.

    Set First Layer Height to 1e-3, Maximum Layers to 40 and Growth Rate to 2.5.

    Click the Update button of the toolbar.

  • 11

    Zoomed view of the created mesh is given below. It has 13000 nodes.

    Save the project and close the Meshing window to go back to the Workbench.

  • 12

    Step 9:

    In the Workbench window double click on Setup to start Fluent.

    In the Fluent Launcher window check Double Precision option.

    Step 10:

    In the General tab select Density-Based solver, which is more appropriate for compressible flows. Press the Help button to read more technical details about it.

    Select Axisymmetric option.

  • 13

    Step 11:

    In the Materials tab select air and press the Edit button.

    In the opened window change Name to myfluid.

    Set Density to 1 and Viscosity to 1.

    Press Change/Create button and click Yes on the popup window.

    Close Create/Edit Materials window.

  • 14

    Step 12:

    In the Boundary Conditions tab, select cylinder zone and make sure that its Type is wall.

    Select inlet zone and make sure that its Type is velocity-inlet. Click the Edit button and set Velocity Magnitude

    to 80 m/s to simulate =

    = 80.

    Select outlet zone and make sure that its Type is pressure-outet.

    Select wall zone and make sure that its Type is wall. Click the Edit button and set Shear Condition to Specified

    Shear with shear components being their default values of zero. This way at the top and bottom walls fluid will slip freely, i.e. no-slip condition is not applied and the effect of wall is minimized.

  • 15

    Step 13:

    In the Reference Values tab set Area (Frontal area of the cylinder, i.e. the diameter in 2D), Density and Viscosity

    to 1 and Velocity to 80. These are the values that will be used in drag and lift coefficient calculations.

  • 16

    Step 14:

    In the Solution Methods tab change Transient Formulation to Second Order Implicit.

  • 17

    Step 15a:

    In the Monitors tab press the Create Drag button to create a drag coefficient monitor. Select the created cd-1

    monitor and press the Edit button.

  • 18

    In the Drag Monitor window check Print to Console and Plot checkboxes. Set Window to 2.

    Select cylinder as Wall Zones.

    Click the Axes button.

    In the Axes Drag Monitor Plot window select Y Axis, deselect Auto Range and set Minimum and Maximum

    values as shown. Click Apply and Close buttons.

  • 19

    Step 15b:

    Similar to the previous step create a lift coefficient monitor.

  • 20

    Step 16:

    In the Solution Initialization tab press the Initialize button to perform the automated hybrid initialization.

  • 21

    Step 17:

    In the Run Calculation tab set Time Step to 0.001 and Number of Time Steps to 10000 to perform a simulation

    up to 10 s.

    Set Max Iterations/Time Step to 50.

    Press the Calculate button.

  • 22

    Residual plot will have zig-zags as shown below. These show the convergence of the iterations at each time step.

    As seen, at the beginning of the solution residuals drop below the default tolerance value of 1e-3 in less than 50 iterations. This means that Max Iterations / Time Step value that we set previously as 50 is enough.

  • 23

    Watch the Cd and Cl graphs during the solution and after 3.15 seconds of run (3150 time steps) stop the run by

    pressing the Cancel button. As seen below time periodicity is reached and both curves start doing constant

    amplitude and frequency oscillations. Cd value does slight oscillations around 1.40 and Cl curve oscillates

    between +- 0.23 with a zero mean value. Both values agree with the values given in the reference study (See the first page).

  • 24

    Step 18a:

    In the Graphics and Animations tab select Contours and press Set Up.

  • 25

    In the Contours window set Contours of to Velocity and Vorticity Magnitude.

    Check Filled and uncheck Auto Range checkboxes.

    Set Min and Max values to 0 and 200. Press the Display button.

    Following contour plot will be generated, showing the counter-rotating von Karman vortices shed from the top

    and bottom of the cylinder (Sometimes the contour plot does not show up when you press the Display button, a second or third trial may be necessary. Looks like a visualization bug).

    Step 18b:

  • 26

    Exercises:

    Calculate the Strouhal number of the flow using

    =

    where is the frequency of the shed vortices (or Cd or Cl graph). Compare the result with that of the reference. You can extract the Cd or Cl curve data to a text file if you need or use the printed Cd or C l

    information.

    Create vs angle graph shown in page 368 of the reference study.

    Visualize the result at an earlier time, e.g. = 3 s. You can use the Results cell of the Workbench. Are those results stored or do we need to change a setting to activate that?

    Create an animation of the shedding vortices using vorticity contours at different time levels.

    Close Fluent and go to the Workbench. Open the Meshing application, suppress the Inflate option and

    regenerate the mesh. Close meshing. In the Workbench right click Mesh cell and click Update. Double click

    Setup cell and say Yes to the warning window. Make sure that the displayed mesh is the new mesh.

    Reinitialize the solution and resolve the problem. Do you get different results, better or worse compared

    with the reference?

    Simulate = 300 case and compare the results with that of the reference.