Thanks to visit codestin.com
Credit goes to www.scribd.com

100% found this document useful (2 votes)
849 views37 pages

FLUENT Tutorial 1 - Developing Flow in A Channel

This document provides tutorial instructions for using ANSYS Fluent to simulate laminar flow in a 2D channel. It describes the steps to set up the geometry, generate a mesh, define boundary conditions of no-slip walls and uniform inflow/outflow, specify fluid properties, initialize and run the simulation, and view velocity contour results. The tutorial is intended for an introductory CFD course on finite volume methods and illustrates how to model and solve a basic fluid flow problem using commercial software.

Uploaded by

Wernher Braun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
849 views37 pages

FLUENT Tutorial 1 - Developing Flow in A Channel

This document provides tutorial instructions for using ANSYS Fluent to simulate laminar flow in a 2D channel. It describes the steps to set up the geometry, generate a mesh, define boundary conditions of no-slip walls and uniform inflow/outflow, specify fluid properties, initialize and run the simulation, and view velocity contour results. The tutorial is intended for an introductory CFD course on finite volume methods and illustrates how to model and solve a basic fluid flow problem using commercial software.

Uploaded by

Wernher Braun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Middle East Technical University

Mechanical Engineering Department


ME 485 CFD with Finite Volume Method
Spring 2015 (Dr. Sert)
ANSYS Fluent1 Tutorial 1
Problem Definition
Consider a 2D channel of length 1 m and height 0.1 m. A fluid with density 1 kg/m3 and viscosity 0.0001 Pa-s
enters the channel at a uniform speed of 0.025 m/s. We want to simulate the developing laminar flow in the
channel.

Step 1:
Start ANSYS Workbench. Youll see 3 tabs as

Toolbox
Project Schematic
Properties of Project Schematic

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

Step 2:
In the Toolbox tab, under Analysis Systems, find Fluid Flow (Fluent) and drag and drop it to the Project
Schematic tab.
Change the name of the analysis to Tutorial 1.

A Fluent analysis is composed of 5 cells

Geometry: To dray the problem domain


Mesh: To generate the computational mesh
Setup: To define the problem physics, boundary conditions, solver settings, etc.
Solution: To run the analysis
Results: To post-process the solution

Were not going to use Solution and Results cells because Fluent will start when we execute the Setup cell
and solution and post-processing will be done inside Fluent.

Step 3:
Click on the Geometry cell.
In the Properties tab change Analysis Type to 2D.

Step 4:
Double click on the Geometry cell to start the DesignModeler.
Do not change the default length unit Meter.

DesignModeler has 3 main tabs as

Tree Outline (Under it there are Sketching and Modeling tabs)


Details View
Graphics

Step 5:
At the lower right corner of the Graphics tab find the X, Y, Z arrows and click on the Z arrow to look directly at
the XY plane from -Z direction.

Step 6:
In the Tree Outline tab select the Sketching tab and under Draw select Rectangle.
Draw a rectangle of arbitrary size by locating its lower left corner at the origin.
Right click on the Graphics tab and select Zoom to Fit

Step 7:
In the Sketching tab select Dimensions.
Select Horizontal and insert a horizontal dimension by selecting left and right edges of the rectangle.
Select Vertical and insert a vertical dimension by selecting upper and lower edges of the rectangle.
In the Details View tab set the values of horizontal and vertical dimensions to 1 m and 0.1 m, respectively.
Note: Real numbers may require the use of , instead of . as the decimal point.

Step 8:
From the Concept menu select Surface from Sketches.
In the Modeling tab, select Sketch 1 under XYPlane.
In the Details View tab, press Apply button to set the Base Objects.
Click the Generate button of the toolbar to generate a solid 2D part that will be seen in gray color in the Graphics
view.

Step 9:
In the Modeling tab youll see 1 Part, 1 Body under which there is Surface Body.
Right click on Surface Body and change its name to Channel.

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

Step 10
In the Workbench window double click on Mesh cell to start the Meshing application, which has 3 main tabs

Outline
Details of Model
Geometry

Step 11:
Click on the Z arrow of the Geometry tab to see the channel from -Z direction.
Right click in the Geometry tab and select Zoom to Fit.
Click on the Edge button of the toolbar in order to be able to select edges.
Using the Ctrl key select upper and lower walls of the rectangular domain and right click and select Create
Named Selection. Give a name Walls to this selection.
Select the left edge of the rectangular domain, right click and select Create Named Selection. Give a name
Inlet to this selection.
Select the right edge of the rectangular domain, right click and select Create Named Selection. Give a name
Outlet to this selection.

These selections will be useful later in assigning BCs, especially for complicated geometries.

10

Step 12a:
Select Mesh in the Outline tab.
Press the Generate Mesh button of the toolbar.
The following very coarse structured mesh will be generated with the default parameters.
In the Statistics part of the Details tab you can see that the mesh consists of 63 nodes and 43 elements (cells).

11

Step 12b:
The mesh generated with the default options is too coarse. It is possible to control the mesh details in many
different ways.
In the Details tab change the Relevance Center to Fine and press the Update button of the toolbar. A new
mesh of 552 nodes will be created.

12

Step 12c:
To refine the mesh further change the Relevance parameter to its maximum possible value of 100 and press
the Update button.
The new mesh will have 1111 nodes.

13

Step 12d:
To make the mesh even finer right click on Mesh in the Outline tab and select Insert->Refinement.
In the Geometry tab select the rectangular domain and press Apply button on the Details tab.
Leave the Refinement value at its default value of 1.
Press the Update button. The new mesh will have 4221 nodes.

There are other ways to control the cell sizes locally, but well proceed with this mesh.
Save the project and close the Meshing window to go back to the Workbench.

14

Step 13
In the Workbench window double click on Setup to start Fluent.
In the Fluent Launcher window check Double Precision option. With this option floating point numbers are kept
in computers memory in double precision, instead of single precision. This has a positive effect on accuracy, but
also increases memory usage.

15

Step 14:
Under Solution Setup, do not change anything in the General tab.
Pressure-based solver is preferred for incompressible flows and density based one is used for compressible
cases.
This problem is time independent (steady).
And it is a 2D planar problem.
Press the Help button to read technical details about these options.

16

Step 15:
In the Models tab do not change anything.
This is a single phase flow with no heat transfer. Therefore we do not need to solve for the energy equation.
Also the flow is in the laminar regime.

17

Step 16a:
In the Materials tab youll see that the project uses air as the default fluid and aluminum as the default solid,
although there is no solid part in this problem.
In the Materials tab click on Fluid and press the Create/Edit button.

18

Step 16b:
In Create/Edit Materials window change Name to myfluid to define a new fuid.
Enter 1.0 for Density and 0.0001 for Viscosity.
Press the Change/Create button.
Press Yes in the dialog box that asks for Change/Create mixture and Overwrite air? This will replace the
default air with the newly defined myfluid.
Press Close to close the Create/Edit Materials window.

19

Step 17:
In the Cell zone Conditions tab Click on Edit button and make sure that for the channel the material is
myfluid.

20

Step 18a:
In the Boundary Conditions tab, select inlet zone and make sure that its Type is velocity-inlet.
Press the Edit button and change Velocity Magnitude to 0.025.

21

Step 18b:
In the Boundary Conditions tab select outlet zone and make sure that its Type is pressure-outlet.
Press the Edit button and make sure that Gauge Pressure is set to 0.0.

22

Step 18c:
In the Boundary Conditions tab select walls zone and make sure that its Type is wall.
Press the Edit button and make sure that Shear Condition is set to No Slip.

23

Step 19:
In the Reference Values tab change Compute from value to inlet.

24

Step 20:
In the Solution Methods tab do not change anything.
Press the Help button to read technical details of the available options.

25

Step 21:
In the Solution Controls tab do not change the default relaxation values.
Press the Help button to read technical details of the available options.

26

Step 22a:
In the Monitors tab select Residuals - Print, Plot and press the Edit Button.
Change Residual values to 0.00001 for all equations.

27

Step 22b:
In the Monitors tab press the Create button below the Surface Monitors part to create a point to monitor the
velocity at point (1, 0.05) of the exit plane.

28

Step 22c:
In the Surface Monitor tab change Name to exit-velocity.
Check Plot option.
Change Field Variable to Velocity and Velocity Magnitude.
Press the New Surface drop down button and select Point.
In the Point Surface window change coordinate to (1, 0.05) and change name to point-1.
Press the Create button and close the window.
In the Surface monitor window select the newly created point-1 in the Surfaces part.

29

Step 23:
In the Solution Initialization tab press the Initialize button to perform the automated Hybrid Initialization.

30

Step 24:
In the Run Calculation tab set Number of Iterations to 1000 and press the Calculate button.

The solution converges in 104 iterations as seen below. It takes less than 1 minute in an ordinary laptop.
Residuals of all three equations (continuity, x-velocity and y-velocity) are all below the specified tolerance of
0.00001 and exit-velocity monitor value converged to a value of 0.0373 m/s.

31

During the solution the following plots are generated. First one is the velocity at point (1.0, 0.05). It converges
to a value of 0.0373 m/s. Analytical value is 1.5 = (1.5)(0.025) = 0.0375 m/s, which is close to the
calculated one.
Second plot is for the residuals. For all three equations they drop below the specified tolerance value of 0.00001.

32

Step 25:
In the Graphics and Animations tab Select Contours and press the Set Up button.
In the Contours window check Filled option, set Contours of parameter to Velocity and Velocity Magnitude
and set Surfaces to interior-channel.
Press the Display button to see the velocity magnitude contours.

33

The following plot will be generated, which clearly distinguishes the developing and fully developed regions.
The legend is not shown here, but red color shows high speed and blue shows low speed.

Similarly contour plots of individual velocity components or pressure can be generated. Can you guess how the
pressure contours will look like?

Step 26a:
In the Plots tab select XY Plot and press the Set Up button. We want to plot the variation of x-velocity along
the channel centerline.

34

Step 26b:
In the Solution XY Plot window set the Y Axis Function to X Velocity.
To create a line along the channel centerline press the New Surface drop down button and select Line/Rake.
In the Line/Rake Surface window set the end points of the line to (0.0, 0.05) and (1.0, 0.05).
Set the name of the line as center-line. Press the Create and Close buttons.
In the Solution XY Plot window select the newly generated center-line and press the Plot button.

35

x-velocity along the centerline is as follows

In the entrance region the fluid inside the growing boundary layer slows down due to the no slip boundary
condition and the fluid inside the inviscid core region speeds up to satisfy mass conservation. Entrance length is
about 0.25 m, after which the centerline velocity remains constant at 0.0373 m/s.

Similarly you can plot the change of pressure along the centerline, the change of shear stress along the wall, etc.

36

Step 27:
Similar to the previous step we can plot the x-velocity profile at the exit plane.
We do not need to create a new surface because the outlet surface already exists.
Plot Direction details are changed as follows.
Curves button can be used to change the plot style (color, thickness, dashed lines, etc).

The result is the following expected parabolic velocity profile.

37

You might also like