Ansys 2024 Fluent Fluid Simulation Software User Manual
CHAPTER 2. FLAT PLATE BOUNDARY LAYER
Objectives
- Creating Geometry in Ansys Workbench for Ansys Fluent
- Setting up Ansys Fluent for Laminar Steady 2D Planar Flow
- Setting up Mesh
- Selecting Boundary Conditions
- Running Calculations
- Using Plots to Visualize Resulting Flow Field
- Compare with Theoretical Solution using Mathematica Code
Problem Description
In this chapter, we will use Ansys Fluent to study the two-dimensional laminar flow on a horizontal flat plate. The size of the plate is considered to be infinite in the spanwise direction and therefore the flow is 2D instead of 3D. The inlet velocity for the 1 m long plate is 5 m/s and we will be using air as the fluid for laminar simulations. We will determine the velocity profiles and plot the profiles. We will start by creating the geometry needed for the simulation.
Launching Ansys Workbench and Selecting Fluent
- Start by launching Ansys Workbench. Double-click on Fluid Flow (Fluent) which is located under Analysis Systems in Toolbox.
Launching Ansys DesignModeler - Select Geometry under Project Schematic in Ansys Workbench. Right-click on Geometry and select Properties. Select 2D Analysis Type under Advanced Geometry Options in Properties of Schematic A2: Geometry. Right-click on Geometry in Project Schematic and select Launch New DesignModeler Geometry. Select Units>>Millimeter as the length unit from the menu in DesignModeler.
- Next, we will be creating the geometry in DesignModeler. Select XYPlane from the Tree Outline on the left-hand side in DesignModeler. Select Look at Sketch Click on the Sketching tab in the Tree Outline and select the Line
skSketchool. Draw a horizontal line 1,000 mm long from the origin to the right. Make sure you have a P at the origin when you start drawing the line. Also, make sure you have an H along the line so that it is horizontal and a C at the end of the line. Select Dimensions within the Sketching options. Click on the line and enter a length of 1000 mm. Draw a vertical line upward 100 mm long starting at the end point of the first horizontal line. Make sure you have a P when starting the line and a V indicating a vertical line. Continue with a horizontal line 100 mm long to the left from the origin followed by another vertical line 100 mm long. The next line will be horizontal with a length of 100 mm starting at the endpoint of the former vertical line and directed to the right. Finally, close the rectangle with a 1,000-mm long horizontal line starting 100 mm above the origin and directed to the right.
- Click on the Modeling tab under Sketching Toolboxes. Select Concept>>Surfaces from Sketches in the menu. Control select the six edges of the rectangle as Base Objects and select Apply in Details View. Click on Generate in the toolbar. The rectangle turns gray. Right-clicking the graphics window select Zoom to Fit and close DesignModeler.
- We are now going to double-click on Mesh under Project Schematic in Ansys Workbench to open the Meshing window. Select Mesh in the Outline of the Meshing window. Right-click and select Generate Mesh. A coarse mesh is created. Select Unit Systems>>Metric (mm, kg, N …) from the bottom of the graphics window. Select Mesh>> Controls>>Face Meshing from the menu. Click on the yellow region next to Geometry under Scope in Details of Face Meshing. Select the rectangle in the graphics window. Click on the Apply button for Geometry in Details of “Face Meshing”. Select Mesh>> Controls>>Sizing from the menu and select Edge above the graphics window. Select the 6 edges of the rectangle. Click on Apply for the Geometry in “Details of Edge Sizing”. Under Definition in “Details of Edge Sizing”, select Element Size as Type, 1.0 mm for Element Size, Capture Curvature as No, and Hard as Behavior. Select the second Bias Type and enter 12.0 as the Bias Factor. Select the shorter upper horizontal edge and Apply this edge with Reverse Bias. Click on Home>>Generate Mesh in the menu and select Mesh in the Outline. The finished mesh is shown in the graphics window.
Why did we create a biased mesh?
We are now going to rename the edges of the rectangle. Select the left edge of the rectangle, right click and select Create Named Selection.Enter the inlet as the name and click on the OK button. Repeat this step for the right vertical edge of the rectangle and enter the name outlet. Create a named selection for the lower longer horizontal right edge and call it wall. Finally, control-select the remaining three horizontal edges and name them the ideal walls. An ideal wall is an adiabatic and frictionless wall.
- The reason for using a biased mesh is that we need a finer mesh close to the wall where we have velocity gradients in the flow. We also included a finer mesh where the boundary layer starts to develop on the flat plate. Select File>>Export…>>Mesh>>FLUENT Input File>>Export from the menu. Select Save as type: FLUENT Input Files (*.msh). Enter boundary-layer-mesh .msh the s file name and click on the Save button. Select File>>Save Project from the menu. Name the project Flat Plate Boundary Layer. Close the Ansys Meshing window. Right-click on Mesh in Project Schematic and select Update.
Launching Ansys Fluent - You can start Fluent in two different ways, either by double-clicking on Setup under Project Schematic in Ansys Workbench or standalone mode from Fluent 2024 R1 in the Ansys 2024 R1 app folder. You will need to read the mesh if you start Fluent in standalone mode. An advantage of starting Ansys Fluent in standalone mode is that you can choose the location of your Working Directory where all the output files will be saved, see Figure 2.6a). Launch the Dimension 2D and Double Precision Solver of Fluent. Check Double Precision under Options. Set the number of Solver Processes equal to the number of computer cores. To check the number of physical cores, press the Ctrl + Shift + Esc keys simultaneously to open the Task Manager. Go to the Performance tab and select CPU from the left column. You’ll see the number of physical cores on the bottom-right side. Ansys Student is limited to a maximum of 4 solver processes. Close the Task Manager window. Click on the Start button to launch Ansys Fluent. Click OK to close the Key Behavioral Changes window if it appears.
Figure 2.6a) Launching SetupWhy do we use double precision?
Double precision will give more accurate calculations than single precision. - Check the scale of the mesh by selecting the Scale… button under Mesh in General on the Task Page. Make sure that the Domain Extent is correct and close the Scale Mesh window.
- Double-click on Models and Viscous (SST k-omega) under Setup in the Outline View. Select Laminar as the Viscous Model. Click OK to close the window. Double-click on Boundary Conditions under Setup in the Outline View. Double-click on the inlet under Zone on the Task Page. Choose Components as Velocity Specification Method and set the X-Velocity [m/s] to 5.
- Click on the Apply button followed by the Close button.
- Double-click on ideal_wall under Zones. Check Specified Shear as Shear Condition and keep zero values for specified shear stress since an ideal wall is frictionless. Click on the Apply button followed by the Close button.
Why did we select Laminar as the Viscous Model?
For the chosen free stream velocity 5 m/s the Reynolds number is less than 500,000 along the plate and the flow is therefore laminar. Turbulent flow along a flat plate occurs at Reynolds numbers above 500,000. - Double-click on Methods under Solution in the Outline View. Select Standard for Pressure and First Order Upwind for Momentum. Double-click on Reference Values under Setup in the Outline View. Select Compute from the inlet on the Task Page.
Why do we use the First Order Upwind method for Spatial Discretization of Momentum?
The First Order Upwind method is generally less accurate but converges better than the Second Order Upwind method. It is common practice to start with the First Order Upwind method at the beginning of calculations and continue with the Second Order Upwind method. - Double-click on Initialization under Solution in the Outline View, select Standard Initialization, select Compute from the inlet, and click on the Initialize button.
- Double-click on Monitors under Solution in the Outline View. Double-click on Residual under Monitors in the Outline View and enter 1e-9 as Absolute Criteria for all Residuals. Click on the OK button to close the window. Select File>>Save Project from the menu. Select File>>Export>>Case… from the menu. Save the Case File with the name Flat Plate Boundary Layer. CAS.h5
Why did we set the Absolute Criteria to 1e-9?
Generally, the lower the absolute criteria, the longer the time the calculation will take and give a more exact solution. We see in Figure 2.12b) that the x-velocity and y-velocity equations have lower residuals than the continuity equation. The slopes of the residual curves for all three equations are about the same with a sharp downward trend. - Double-click on Run Calculation under Solution and enter 5000 for the Number of Iterations. Click on the Calculate button. The calculations will be complete after 193 iterations, see Figure 2.12b). Click on Copy Screenshot of Active Window to Clipboard, see Figure 2.12c). The Scaled Residuals can be pasted into a Word document.
Post-Processing - Select the Results tab in the menu and select Create>>Line/Rake… under Surface. Enter 0.2 for x0 (m), 0.2 for x1 (m), 0 for y0 (m), and 0.02 m for y1 (m). Enter x=0.2m for the New Surface Name and click on Create. Repeat this step three more times and create vertical lines at x=0.4m with length 0.04 m, x=0.6m with length 0.06 m, and x=0.8m with length 0.08 m. Close the window.
- Double-click on Plots and XY Plot under Results in the Outline View. Uncheck Position on X Axis under Options and check Position on the Y-axis. Set Plot Direction for X to 0 and 1 for Y. Select Velocity… and X Velocity as X Axis Function. Select the four lines x=0.2m, x=0.4m, x=0.6m, and x=0.8m under Surfaces.
- Click on the Axes… button in the Solution XY Plot window. Select the X-Axis, uncheck Auto Range under Options, enter 6 for Maximum Range, select General Type under Number Format, and set Precision to 0. Click on the Apply button. Select the Y-Axis, uncheck the Auto Range, enter 0.01 for Maximum Range, select General Type under Number Format, and click on the Apply button. Close the Axes window.
- Click on the Curves… button in the Solution XY Plot window. Select the first pattern under Line Style for Curve # 0. Select no Symbol for Marker Style and click on the Apply button. Next, select Curve # 1, select the next available Pattern for Line Style, no Symbol for Marker Style, and click on the Apply button. Continue this pattern of selection with the next two curves # 2 and # 3. Close the Curves – Solution XY Plot window. Click on the Save/Plot button in the Solution X.Y Plot window and Close this window. Click on Copy Screenshot of Active Window to Clipboard, see Figure 2.16c).
The XY Plot can be pasted into a Word document. Select the User Defined tab in the menu and Custom under Field Functions. Select a specific Operand Field Function from the drop-down menu by selecting Mesh… and Y-Coordinate. Click on Select and enter the definition as shown in Figure 2.16f). You need to select Mesh… and X Coordinate to include the x coordinate and complete the definition of the field function. Enter eta as a New Function Name, click on Defi,ne, and close the window. Repeat this step to create another custom field function. This time, we select Velocity… and X Velocity as Field Functions and click on Select. Complete the Definition as shown in Figure 2.16g) and enter u-divided-by-freestream-velocity as the New Function Name, click on Def, one, and close the window.
Why did we create a self-similar coordinate?
It turns out that by using a self-similar coordinate, the velocity profiles at different streamwise positions will collapse on one self-similar velocity profile that is independent of the streamwise location. - Double-click on Plots and XY Plot under Results in the Outline View. Set X to 0 and Y to 1 as Plot Direction. Uncheck Position on X Axis and uncheck Position on the Y-axis under Options. Select Custom Field Functions and eta for Y-Axis Function and select Custom Field Functions and udivided-by-freestream-velocity for X-Axis Function. Place the file blasius.dat in your working directory. This file can be downloaded from sdcpublications.com under the Downloads tab for this book. See Figure 2.19 for the Mathematica code that can be used to generate the theoretical Blasius velocity profile for laminar boundary layer flow over a flat plate. As an example, in this textbook the working directory is ܥ:\Users\jmatsson. Click on Load File. Select Files of type: All Files (*) and select the file blasius.dat from your working directory. Select the four surfaces x=0.2m, x=0.4m, x=0.6m, x=0.8m, and the loaded file Theory.
Click on the Axes… button. Select Y-Axis in the Axes-Solution XY Plot window and uncheck Auto. Range. Set the Minimum Range to 0 and Maximum Range to 10. Set the Type to float and Precision to 0 under the Number Format. Enter the Axis Title as eta and click on Apply. Select the X-Axis, uncheck Auto Range under Options, enter 1.2 for Maximum Range, select float Type under Number Format, and set Precision to 1. Enter the Axis Title as u/U. Click on Apply and Close the window. Click on the Curves… button in the Solution XY Plot window. Select the first pattern under Line Style for Curve # 0, see Figure 2.16a). Select no Symbol for Marker Style and click on the Apply button. Nex,t select Curve # 1, select the next available Pattern for Line Style, no Symbol for Marker Style, and click on the Apply button. Continue this pattern of selection with the next two curves # 2 and # 3. Close the Curves – Solution XY Plot window. Click on the Save/Plot button in the Solution XY Plot window and close this window. - Click on Copy Screenshot of Active Window to Clipboard, see Figure 2.16c). The XY Plot can be pasted into a Word document. Select the User Defined tab in the menu and Custom. Select a specific Operand function from the drop-down menu by selecting Mesh… and X-Coordinate. Click on Select and enter the definition as shown in Figure 2.17e). Enter rex as New Function Name, click on Define, and Close the window. Double-click on Plots and XPlotsot under Results in the Outline View. Set X to 0 and Y to 1 under Plot Direction.
Uncheck Position on X Axis and uncheck Position the on Y-axis under Options. Select Wall Fluxes and Skin Friction Coefficient for the Y-Axis Function and select Custom Field Functions and rex for the XX-AxisFunction. Place the file “Theoretical Skin Friction Coefficient” in your working directory. Click on Load File. Select Files of type: All Files (*) and select the file “Theoretical Skin Friction Coefficient”. Select the wall under Surfaces and the loaded file Skin Friction under File Data. Click on the Axes… Button. Check the X-Axis, check the box for Log under Options, enter Re-x as Axis Title, and uncheck Auto. Range under Option set Minimum to 100 and Maximum to 1000000. Set Type to float and Precision to 0 under Number Format and click on Apply. Check the Y-Axis, check the box for Log under Options, enter Cf-x as Label, and uncheck Auto. Range, set Minimum to 0.001 and Maximum to 0.1, set Type to float, Precision to 3, and click on Apply. Close the window. Click on Save/Plot in the Solution XY Plot window. Click on the Curves… button in the Solution XY Plot window. Select the first pattern under Lin. e Style for Curve # 0. Select no Symbol for Marker Style and click on the Apply button. Ne,xt select Curve # 1, select the next available Pattern for Line Style, no Symbol for Marker Style, and click on the Apply button. Close the Curves – Solution XY Plot window. Click on the Save/Plot button in the Solution XY Plot window and close this window. Click on Copy Screenshot of Active Window to Clipboard, see Figure 2.16c). The XY Plot can be pasted into a Word document.
- Theory
- In this chapter, we have compared Ansys Fluent velocity profiles with the theoretical Blasius velocity profile for laminar flow on a flat plate. We transformed the wall-normal mal coordinate into a similarity coordinate for comparison of profiles at different streamwise locations. The similarity coordinate is defined by where y (m) is the wall-normal coordinate, is defined by
- where y (m) is the wall-normal coordinate, U (m/s) is the free stream velocity, x (m) is the distance from the streamwise origin of the wall and ߥ) m2 /s) is the kinematic viscosity of the fluid. U (m/s) is the free stream velocity, x (m) is the distance from the streamwise origin of the wall and m2 /s) is the kinematic viscosity of the fluid.
We also used the non-dimensional streamwise velocity u/U where u is the dimensional velocity profile.
u/U was plotted versus ߟ for Ansys Fluent velocity profiles in comparison with Blasius’ theoretical profile and they all collapsed on the same curve as per the definition of self-similarity.
The Blasius boundary layer equation is given by
The boundary layer thickness is defined as the distance from the wall to the location where the velocity in the boundary layer has reached 99% of the free stream value.
For a laminar boundary layer orr we have the following theoretical expression for the variation of the boundary layer thickness with streamwise distance x and Reynolds number ܴ.
- The corresponding expression for the boundary layer thickness in a turbulent boundary layer is given by
- The local skin friction coefficient is defined as the local wall shear stress divided by dynamic pressure.
- The theoretical local friction coefficient for laminar flow is determined by
- and for turbulent flow, we have the following relation
References
- Çengel, Y. A., and Cimbala J.M., Fluid Mechanics Fundamentals and Applications, 1st Edition, McGraw-Hill, 2006.
- Richards, S., Cimbala, J.M., Martin, K., ANSYS Workbench Tutorial – Boundary Layer on a Flat Plate, Penn State University, 18 May 2010 Revision.
- Schlichting, H., and Gersten, K., Boundary Layer Theory, 8th Revised and Enlarged Edition, Springer, 2001.
- White, F. M., Fluid Mechanics, 4th Edition, McGraw-Hill, 1999.
Exercises
- Use the results from the Ansys Fluent simulation in this chapter to determine the boundary layer thickness at the streamwise positions as shown in the table below. Fill in the missing information in the table. ܷ is the velocity of the boundary layer at the distance from the wall equal to the boundary layer thickness and U is the free stream velocity.
x (m) o (mm) Fluent
o (mm) Theory
Percent Difference U 8 (m/s)
U (m/s)
v (m2/s)
Re x 0.2 .0000146 0.4 .0000146 0.6 .0000146 0.8 .0000146 - Change the element size to 2 mm for the mesh and compare the results in XY Plots of the skin friction coefficient versus the Reynolds number with the element size of 1 mm that was used in this chapter. Compare your results with theory.
- Change the free stream velocity to 3 m/s and create an XY Plot including velocity profiles at x = 0.1, 0.3, 0.5, 0.7, and 0.9 m. Create another XY Plot with self-similar velocity profiles for this lower free stream velocity and create an XY Plot for the skin friction coefficient versus Reynolds number.
- Use the results from the Ansys Fluent simulation in Exercise 2.3 to determine the boundary layer thickness at the streamwise positions as shown in the table below. Fill in the missing information in the table.is the velocity of the boundary layer at the distance from the wall equal to the boundary layer thickness and U is the free stream velocity.
x (m) o (mm) Fluent
o (mm) Theory
Percent Difference U 8 (m/s)
U (m/s)
v (m2/s)
Re x 0.1 .0000146 0.2 .0000146 0.5 .0000146 0.7 .0000146 0.9 .0000146
Table 2.2 Comparison between Fluent and theory for boundary layer thickness
Change the free stream velocity to the value listed in the table below and create an XY Plot including velocity profiles at x = 0.2, 0.4, 0.6, and 0.8 m. Create another XY Plot with self-similar velocity profiles for your free stream velocity and create an XY Plot for the skin friction coefficient versus Reynolds number.
Student | X-Velocity U (m/s) | Maximum Range (m/s) for X Velocity Plot |
1 | 3 | 4 |
2 | 3.2 | 4 |
3 | 3.4 | 4 |
4 | 3.6 | 4 |
5 | 3.8 | 4 |
6 | 4 | 5 |
7 | 4.2 | 5 |
8 | 4.4 | 5 |
9 | 4.6 | 5 |
10 | 4.8 | 5 |
11 | 5.2 | 6 |
12 | 5.4 | 6 |
13 | 5.6 | 6 |
14 | 5.8 | 6 |
15 | 6 | 7 |
16 | 6.2 | 7 |
17 | 6.4 | 7 |
18 | 6.6 | 7 |
19 | 6.8 | 7 |
20 | 7 | 8 |
21 | 7.2 | 8 |
Download PDF: Ansys 2024 Fluent Fluid Simulation Software User Manual