Unstedy Flow Past a Cylinder

Embed Size (px)

Citation preview

  • 8/12/2019 Unstedy Flow Past a Cylinder

    1/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 time-

    derivative 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

  • 8/12/2019 Unstedy Flow Past a Cylinder

    2/15

    Please complete the "Steady Flow past a Cylinder tutorial before completing this

    tutorial. Clickhereto go to the problem statement of the "Steady Flow Past a

    Cylinder" tutorial.

    Alternatively, clickhereto 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.

    (Do u b l e C l i c k ) Se t u p in "Unsteady Flow", the duplicate project. Select Dou b l e

    P r e c i s i o n , and if using a computer with multiple cores, select parallel, and set the

    number of cores to be used.

    https://confluence.cornell.edu/display/SIMULATION/FLUENT+12.1+-+Steady+Flow+Past+a+Cylinder+-+Problem+Specificationhttps://confluence.cornell.edu/display/SIMULATION/FLUENT+12.1+-+Steady+Flow+Past+a+Cylinder+-+Problem+Specificationhttps://confluence.cornell.edu/display/SIMULATION/FLUENT+12.1+-+Steady+Flow+Past+a+Cylinder+-+Problem+Specificationhttps://confluence.cornell.edu/download/attachments/144972258/Cylinder.zip?version=1&modificationDate=1335902066000https://confluence.cornell.edu/download/attachments/144972258/Cylinder.zip?version=1&modificationDate=1335902066000https://confluence.cornell.edu/download/attachments/144972258/Cylinder.zip?version=1&modificationDate=1335902066000https://confluence.cornell.edu/download/attachments/144972258/Cylinder.zip?version=1&modificationDate=1335902066000https://confluence.cornell.edu/display/SIMULATION/FLUENT+12.1+-+Steady+Flow+Past+a+Cylinder+-+Problem+Specification
  • 8/12/2019 Unstedy Flow Past a Cylinder

    3/15

    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.

    P ro b l em Se t u p > Gene r a l . Set T ime to T r a n s i e n t .

    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.

  • 8/12/2019 Unstedy Flow Past a Cylinder

    4/15

    P ro b l em Se t u p > Ma t e r i a l s > F l u i d > C re a t e /E d i t . ... Set the v i s c o s i t y to

    8.333*10^-3 kg/m*s. Click Change /C r e a t e .

    Then click C l o s e .

    Save Project

    5. Solution

    Convergence Criterion: Turn off Drag, Turn on Lift

    So l u t i o n > Mon i t o r s > D ra g > Ed i t . ... Then uncheck P r i n t to Co n s o l e and

    uncheck P l o t . Click o k.

    So l u t i o n > Mon i t o r s > L i f t > Ed i t . ... Then check P r i n t t o

    C o n s o l e , P l o t and Wr i t e . Click o k. 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 X-

    direction. So l u t i o n > So l u t i o n I n i t i a l i za t i o n . Set Compu t e

    F r omto f a r f i e l d 1 .. Click I n i t i a l i z e.

    Next, we'll change the velocity in some of the cells to more quickly reach a sinusoidal

    variation of the lift coefficient. Ad ap t > Reg i o n . ...

  • 8/12/2019 Unstedy Flow Past a Cylinder

    5/15

    Then set X M into 0.5 m, set X Maxto 32 m, set Y M into 0 m, and set Y Maxto

    32m.

    Click Ma r k then click C l o s e . This will select the cells bounded by these four points,

    so we can change the initial condition in them.

    Next, click Pa t c h .

  • 8/12/2019 Unstedy Flow Past a Cylinder

    6/15

    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 Pa t c h ,then click c l o s e .

  • 8/12/2019 Unstedy Flow Past a Cylinder

    7/15

    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 > CalculationActivities > 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.

  • 8/12/2019 Unstedy Flow Past a Cylinder

    8/15

    Advance Solution in Time

    So l u t i o n > Ru n Ca l c u l at i o n . Set T ime S t e p S i z e to 0.2 seconds and set

    the Numb e r O f T ime S t ep s to 400.

    Now, click Ca l c u l a t e . (You may have to hit Ca l c u l a t e 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 Systemsand double-

    click Results.

  • 8/12/2019 Unstedy Flow Past a Cylinder

    9/15

    Your project schematic window should now appear as below.

    Double click on the Resultsmodule 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 Resultsbutton in the upper left corner of the

    screen.

    Next, browse to the location where you chose to save the FLUENT data files. Selectthe .cas file that is in this folder, which should be named "FFF-1-0001.cas", or

  • 8/12/2019 Unstedy Flow Past a Cylinder

    10/15

    similar. In the bottom right of this window, select Load complete history

    as:and Single Case. Finally, click Open.

    Click OKin the popup window if one appears.

    h4. Load Timesteps

    Click Tools > Time Step Selectorto 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.

  • 8/12/2019 Unstedy Flow Past a Cylinder

    11/15

    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 1from Locations.

    Next, ensure that Variableis set to Vorticity.

    Change Rangeto User Specified. Set the Minto 0.01 s^-1and Maxto 2 s^-1.

    Enter 25for Number of Contours. You should now see the following:

  • 8/12/2019 Unstedy Flow Past a Cylinder

    12/15

    Click Applyto 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.

  • 8/12/2019 Unstedy Flow Past a Cylinder

    13/15

    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 Timestepsbutton.

    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:

  • 8/12/2019 Unstedy Flow Past a Cylinder

    14/15

    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.

  • 8/12/2019 Unstedy Flow Past a Cylinder

    15/15

    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.