40
© 2014 ANSYS, Inc. April 23, 2014 1 Release 15.0 15.0 Release Turbulence Modeling Using ANSYS Fluent Turbulent Flow Past a Backwards Facing Step

Turbulence Modeling Using ANSYS Fluent

  • Upload
    others

  • View
    56

  • Download
    1

Embed Size (px)

Citation preview

© 2014 ANSYS, Inc. April 23, 2014 1 Release 15.0

15.0 Release

Turbulence Modeling Using ANSYS Fluent

Turbulent Flow Past a Backwards Facing Step

© 2014 ANSYS, Inc. April 23, 2014 2 Release 15.0

Workshop Description:

Flow over a backwards facing step is a standard test case for turbulence models. We will see how to set up and solve turbulent flow problems in Fluent and learn to use CFD-Post and Workbench to compare the results from different turbulence models with each other and with experimental data. We will also examine how the results are affected by boundary conditions

Learning Aims:

The workshop covers many aspects of turbulent flow modeling in Fluent including specifying models and near wall treatments, checking y+, selecting boundary conditions, comparison with experimental results and comparison of results obtained with different turbulence models

Learning Objectives:

To understand how to set up and solve turbulent flows in Fluent using different models and near wall treatments

To understand how to post process y+ in Fluent

To understand the importance of realistic boundary conditions

To understand how to compare results with data using CFD-Post and easily perform results comparisons using Workbench

I Introduction

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 3 Release 15.0

Simulation to be performed

• The task is to simulate flow over a backwards facing step

• The simulation is being performed to determine:

– How the results from different turbulence models compare with one another and with experimental results

– Can the models predict the reattachment point downstream of the step??

Flow separates at the step and reattaches some distance downstream

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 4 Release 15.0

• Start a new workbench session. • Drag a Fluent component system onto the project • Right-click on ‘Setup’, and select Import Fluent Case, and Browse

• In the pop-up window, change the filter (bottom-right) from case to “Fluent Mesh File” • Browse to and select the file “driver.msh.gz”

• Click OK on the Fluent Launcher

screen

Loading the mesh and starting Fluent

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 5 Release 15.0

Display Mesh • Display the mesh and then zoom in on the mesh near the bottom wall

downstream of the step

Introduction Model Setup Solving Post-Processing Summary

It is intended for the simulation to resolve the viscous sublayer with the mesh (no wall functions), which requires a very fine near wall mesh to get y+ ≈ 1. Later in the workshop, we will evaluate whether this has been achieved.

The distance corresponding to y+ = 1 can be estimated as described in Lecture 7.

© 2014 ANSYS, Inc. April 23, 2014 6 Release 15.0

Activate Models • Open the Viscous Models panel and select the Realizable k-

epsilon with Enhanced Wall Treatment

When using any k-epsilon model, the Enhanced Wall Treatment is the only viscous sublayer resolving near wall treatment.

Later on we will calculate the flow with the SST k-omega model and compare results.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 7 Release 15.0

Define Materials

• Enter values for the density and viscosity of air as shown below

Introduction Model Setup Solving Post-Processing Summary

These values will allow us to match the Reynolds number reported in the experiment.

© 2014 ANSYS, Inc. April 23, 2014 8 Release 15.0

• The inlet boundary conditions are shown below

• The default backflow settings for the outlet are sufficient for this problem, so no entries are required for the pressure outlet boundary

Boundary Conditions

To begin with, uniform profiles will be used. In a later step, the flow will be recomputed using fully developed flow profiles for velocity and turbulence at the inlet.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 9 Release 15.0

Solution Methods • In the Solution Methods panel, change the option for 'Pressure-

Velocity Coupling' from SIMPLE to Coupled and select Pseudo Transient near the bottom of the panel

• Change pressure to PRESTO!

In many cases, the solution will converge in fewer iterations using Coupled plus the Pseudo Transient method.

PRESTO! is often a better choice for structured hexahedral or quadrilateral meshes such as has been created for this problem.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 10 Release 15.0

Introduction Model Setup Solving Post-Processing Summary

Monitors • In ‘Monitors’, press ‘Create...’ for a Surface Monitor

– Enter ‘wall-shear-mon’ for the name

– Check the box to Plot and set the window number to 2

– Choose Area-Weighted Average for the report type

– Choose Wall Shear Stress for the field variable

– Select bottom_wall as the surface

The Wall Shear Stress on the wall downstream of the step is the quantity of interest in this simulation, so it is natural to track it with a solution monitor.

© 2014 ANSYS, Inc. April 23, 2014 11 Release 15.0

Introduction Model Setup Solving Post-Processing Summary

Monitors • Create another surface monitor

– Enter ‘turb-out-mon’ for the name

– Check the box next to plot and immediately below that set Window to 3

– Select Area-Weighted Average for the report type

– Select Turbulent Viscosity Ratio for the field variable

– Select outlet_p in the list of surfaces

The solution for turbulence model variables can change very slowly in regions far downstream from inlets. Because of this they are often good to use for solution monitors. Turbulent viscosity ratio is selected here because it includes contributions from both the turbulent kinetic energy and the turbulent dissipation rate, meaning both fields have to converge before the monitor stops changing.

© 2014 ANSYS, Inc. April 23, 2014 12 Release 15.0

Calculate the Solution

• Initialize the solution using hybrid initialization, save the project, and then go to the Run Calculation panel and ask for 100 iterations

• The residuals converge in a small number of iterations, but the monitors do not definitively indicate that the solution has stopped changing

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 13 Release 15.0

Continue the Calculation • Set the continuity residual criterion to 1e-6

• Use the TUI command /solve/monitors/surface/clear-data to clear the solution monitors

• In the Run Calculation panel, request 100 more iterations

– Choose "Use settings for current calculation only"

There is no significance to 1e-6. It is just desired to select a low value so the iterations do not stop prematurely. Additional iterations will be performed and convergence will be judged by whether the surface moonitors are still changing.

This step is not strictly necessary but it helps to make the y-axis range in the monitor plots tighter, thus making it easier to see changes in the monitored variable.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 14 Release 15.0

Judging Convergence • After an additional 100 iterations, neither surface monitor is

changing and the residuals have all reached very low levels

– Together, these conditions indicate the solution is converged

• Save the project before moving on

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 15 Release 15.0

Quick Post-Processing: Wall Yplus

• Plot y+ along the bottom wall

Wall Yplus is near the bottom of the list under turbulence variables. For 2D problems such as this, xy plots are an ideal way to check the y+ distribution. Node values have been unselected because although y+ is calculated at wall faces, its value is stored for post-processing in the wall adjacent cells.

These values are a little bit higher than ideal. We will see later how it affects comparison with experiment, and it would be highly recommended to do a mesh sensitivity study if this were an actual study as opposed to a workshop exercise.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 16 Release 15.0

Quick Post-Processing: Vectors • Display velocity vectors and zoom in on the step region

The vectors show the recirculation zone behind the step and the subsequent reattachment of the flow. Some adjustment of the Scale and Skip setting in the panel is probably required for optimal viewing of the vectors.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 17 Release 15.0

Change the turbulence model • Close Fluent, return to Workbench and save the

project

• In the project schematic, right click on the Fluent cell and rename it as RKE

• Right click again on the Fluent cell and select Duplicate

• Rename the duplicate cell to SST and Edit the setup block in this cell

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 18 Release 15.0

Select SST Model • In the Viscous Models panel, select the SST model as shown

• Repeat the steps performed in Slides 12, 13 and 14

In Fluent, the turbulence models that use omega do not require the selection of a near wall treatment. This is because the near wall treatment that is used is a y+ insensitive method that automatically behaves either as a viscous sublayer resolving treatment or as a wall function depending on how fine or coarse the near wall mesh is.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 19 Release 15.0

SST: Convergence and Post-processing • Convergence is very good

both for this problem with both SST and Realizable k-epsilon

• Yplus is qualitatively similar. Next we will use CFD Post to make a more quantitative comparison

• Save the project, exit Fluent and return to the Project Schematic

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 20 Release 15.0

Post-Processing in CFD-Post • From 'Component Systems' drag a

'Results' object into the Project Schematic

• Left click on the Solution cell for RKE (A3) and without releasing the mouse, drag the pointer on top of Results (C2)

• Repeat the previous step with the Solution cell for SST (B3). The Project Schematic should appear as to the right.

• Double click on Results to start CFD-Post

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 21 Release 15.0

Velocity Vectors • Click on Insert and choose Vector

• Select 'symmetry 1' for the location and change the reduction factor to 2

• Click on the Symbol tab and enter a value of 0.5 for Symbol Size (not shown)

• Zoom in on the region just behind the step

The velocity fields here are very similar. In the next step a more quantitative comparison will be made using the shear stress on the wall downstream of the step.

Use these icons to synchronize views and the visibility of objects. For 2D models, CFD-Post extrudes

the geometry a small distance in the 3rd direction. The resulting symmetry planes are used for results display.

Introduction Model Setup Solving Post-Processing Summary

Changing the reduction factor to 2 means that only every other vector will be displayed, which makes the vectors easier to see.

© 2014 ANSYS, Inc. April 23, 2014 22 Release 15.0

Expressions • Comparisons of results are often made using geometrical

coordinates normalized by the step height. This can be done with the help of variables and expressions

• Click the Expressions tab, then right click and select 'New'

• Name the expression 'step height' and define the expression as shown (below)

It is also possible to type 0.0127 [m] in the definition field. Defining the expression as shown here will allow it to update automatically if the step height were to be changed, for instance in a parametric study.

Right click in the details field for context menus to add functions and locations without having to type them manually.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 23 Release 15.0

Expressions

• Create a second expression for the dimensionless x-coordinate named 'xh expression' as shown below

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 24 Release 15.0

Variables • In order to use the previous expression to plot the

wall shear stress, a variable needs to be created

• Click the Variables tab, right click anywhere in the white area, select 'New' and create a variable named 'Xh'

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 25 Release 15.0

Polyline

• A polyline defined by the intersection of the symmetry boundary and the bottom wall is required in order to plot the wall shear stress

There is more than one way to define this polyline, but the Boundary Intersection method is probably the most convenient in this case and its use ensures the polyline definition would remain consistent if changes were made upstream in the project workflow.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 26 Release 15.0

Create a Chart • Select Insert > Chart

• In the Details panel, select the polyline created in the previous step in the Data Series tab

• Select Xh for the X Axis variable and Wall Shear X for the Y Axis

'Wall Shear X' is used instead of 'Wall Shear' because the location where it changes sign identifies the flow reattachment point.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 27 Release 15.0

Wall Shear Stress Comparison • The resulting plot appears in the Chart Viewer

The reattachment point is identified where the shear stress changes sign. Also the positive values very close to the step indicate the presence of a small secondary recirculation zone. This can also be seen by zooming in on the vector plot and increasing the symbol size.

The size and strength of the recirculation zone predicted by either model is remarkably similar. However, because of the proximity of the inlet to the step, the use of uniform inlet profiles is questionable. That will be explored later on in the workshop.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 28 Release 15.0

Add External Data to Chart • Right click in the data field in the chart

details and select "New"

• Name the new series "Exp.", select File, navigate to the workshop files directory, change "Files of type" to "All Files (*)" and select x-wall-shear-ds.xy

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 29 Release 15.0

Plot External Data • Select the Line Display tab in the chart details and change the

display options as shown below

• The data appears on the chart as seen to the right

The external data is from the experiment of Driver and Seegmiller. Agreement between the CFD results and the data is not very good, however the uniform inlet boundary conditions do not correspond to those seen experimentally in the same location. In the following steps, more accurate, non-uniform velocity and turbulence profiles will be applied at the inlet in order to mimic the experimental conditions.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 30 Release 15.0

Changing the Inlet Boundary Condition

• Right click on the RKE cell in the Project Schematic and select Duplicate

• Name the newly created Fluent object "RKE Profile, right click on the Setup cell and select "Edit"

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 31 Release 15.0

Adding Profiles • Navigate to Define > Profiles, select Read…

in the Profiles panel, navigate to the workshop files directory and select the file "rke-prof.prof"

• Open the boundary conditions panel for the Velocity Inlet and use the drop down arrows apply the profiles as shown to the right

• Be sure to change the velocity specification method to “Components” and the turbulence specification method to "K and Epsilon"

The non-uniform profiles were produced by running an auxiliary calculation of the wind tunnel section upstream of the inlet to generate a profile with the same boundary layer thickness as the experiment.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 32 Release 15.0

Running the Calculation

• Initialize the flow with hybrid initialization and perform the calculation exactly as in Slides 12-14

• Good convergence behavior also with the new boundary conditions

Note that by creating a duplicate of the original Fluent object, it was not necessary to redefine any of the solution monitors, material properties or solver settings. Only the boundary conditions needed to be changed.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 33 Release 15.0

Check the Inlet Velocity Profile

• Use the XY Plot panel to view the inlet profile

– Click on Axes and enable display of grid lines for both the X- and the Y-axis

After selecting X in the upper left of the panel, check Major Rules and Minor Rules, then click Apply. Repeat for the Y axis and close the panel

Introduction Model Setup Solving Post-Processing Summary

Remember to change the Plot direction to (0,1).

© 2014 ANSYS, Inc. April 23, 2014 34 Release 15.0

Inlet Velocity Profile

• The profile is from a developing boundary layer with freestream velocity = 44.2 m/s and a boundary layer thickness just below 2 cm, as measured in the experiment

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 35 Release 15.0

Run SST with Profile Boundary Conditions

• In the Project Schematic, create a duplicate of the SST Fluent object and name it SST Profile

• Click Edit in the Setup cell of the new object, go to Define > Profiles and read the profile "sst-prof.prof"

• Apply the profile at the inlet boundary

• Initialize the solution with Hybrid Initialization and run the calculation using the same steps described in Slides 12-14

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 36 Release 15.0

Duplicating the Results Object • Right click on the Results object in the Project Schematic and

select Duplicate

• The original calculations with uniform boundary conditions are connected to this cell. Right click on each of the connections and select Delete

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 37 Release 15.0

Examining the New Results

• Left click on the Solution cell for RKE Profile(F3) and without releasing the mouse, drag the pointer on top of Results with Profiles (D2)

• Repeat with SST Profile so that the Project Schematic appears as shown

• The labeling of the individual blocks A,B,C,D,… may be different in your case

• Double click on Results with Profiles to launch CFD-Post

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 38 Release 15.0

Comparing Results with Profile BCs • Double click on Chart 1 in the Outline Tree to open

the chart

• The chart is automatically updated with the new results

Discussion: Use of realistic, non-uniform velocity and turbulence profiles at the inlet greatly improves the agreement between the results and the experiment. These results do not represent a formal validation study. In particular the issue of mesh independence (covered in Lecture 10) has not been addressed here. The intent of this workshop is to show how to run turbulent flow calculations, the importance of boundary conditions and how Workbench can be used to compare results from different turbulence models

Because the original results cell was duplicated, none of the setup steps such as defining variables and expressions and loading the experimental data needed to be repeated

Introduction Model Setup Solving Post-Processing Summary

Very good agreement for the reattachment point

© 2014 ANSYS, Inc. April 23, 2014 39 Release 15.0

Wrap-up

This workshop has shown the steps for setting up and solving a turbulent flow: - Selecting the model and if necessary the near wall treatment - Checking wall y+ - Running a simulation and using both residuals and solution monitors to

determine convergence - Post-processing the results, both in Fluent and CFD-Post When solving a particular type of flow for the first time, it can be useful to compare results from different turbulence models and compare with data if available. Important to keep in mind are the following:

- What information are you looking for - What do you know about the inlet conditions

In this case we were interested in the reattachment point and the use of suitable boundary conditions was important in this respect.

Introduction Model Setup Solving Post-Processing Summary

© 2014 ANSYS, Inc. April 23, 2014 40 Release 15.0

Optional Further work • There are many ways the simulation in this tutorial could be extended

• Mesh independence

– check that results do not depend on mesh

– Use Adapt > Region to adapt all the cells in the mesh and re-run the calculation

• Turbulence profile effects

– To see whether the use of detailed turbulence profiles matters, run the profile cases using the x-velocity profile, but intensity and hydraulic diameter for turbulence, as in Slide 8

Introduction Model Setup Solving Post-Processing Summary