Anda di halaman 1dari 431

About the FLUENT learning modules

These modules lead the user through the steps involved in solving a selected set of case studies
in CFD. The software packages used are FLUENT for solving the governing equations and
GAMBIT for preprocessing (geometry/meshing). It is worthwhile for the user to understand the
underlying concepts as he/she goes through the tutorials in order to be able to correctly apply
FLUENT to other problems. Each tutorial is followed by problems which are geared towards
strengthening and reinforcing the knowledge and understanding gained in the tutorials. Working
through the problem sets is an intrinsic part of the learning process and shouldn't be skipped.

What is FLUENT

FLUENT is a computational fluid dynamics (CFD) software package to simulate fluid flow
problems. It uses the finite-volume method to solve the governing equations for a fluid. It
provides the capability to use different physical models such as incompressible or compressible,
inviscid or viscous, laminar or turbulent, etc. Geometry and grid generation is done using
GAMBIT which is the preprocessor bundled with FLUENT.

Conventions used

Each tutorial begins with a problem specification. A solution can be obtained by following these
nine steps:
1. Create Geometry in GAMBIT
2. Mesh Geometry in GAMBIT
3. Set Boundary Types in GAMBIT
4. Set Up Problem in FLUENT
5. Solve!
6. Analyze Results
7. Refine Mesh

GAMBIT and FLUENT uses cascading menus which are represented as follows:

Main Menu > File > Export > Mesh...

This means that in the Main Menu, click on File. Then, in the File menu that comes up, click on
Export and so on.

Names of windows are in italics.

Items and options appearing within menus and dialog boxes are purple, italic, and bold.

Text and numbers that need to be entered are indicated in monospace font.
Tutorial 1: FLUENT - Laminar Pipe Flow - Problem Specification

Problem Specification

Consider fluid flowing through a circular pipe of constant radius as illustrated above. The pipe
diameter D = 0.2 m and length L = 8 m. The inlet velocity Ūz = 1 m/s. Consider the velocity to be
constant over the inlet cross-section. The fluid exhausts into the ambient atmosphere which is at
a pressure of 1 atm. Take density ρ = 1 kg/ m3 and coefficient of viscosity µ = 2 x 10-3kg/(ms).
The Reynolds number Re based on the pipe diameter is

where Ūz is the average velocity at the inlet, which is 1 m/s in this case.

Solve this problem using FLUENT via ANSYS Workbench. Plot the velocity and pressure
variation within the pipe. Validate your results.

Note: The values used for the inlet velocity and flow properties are chosen for convenience
rather than to reflect reality. The key parameter value to focus on is the Reynolds number.

Step 1: Pre-Analysis & Start-up

Preliminary Analysis

We expect the viscous boundary layer to grow along the pipe starting at the inlet. It will
eventually grow to fill the pipe completely (provided that the pipe is long enough). When this
happens, the flow becomes fully-developed and there is no variation of the velocity profile in the
axial direction, x (see figure below). One can obtain a closed-form solution to the governing
equations in the fully-developed region. You should have seen this in the Fluid Mechanics
course. We will compare the numerical results in the fully-developed region with the
corresponding analytical results. What values would you expect for the centerline velocity and
the friction factor in the fully-developed region based on the analytical solution? What is the
solution for the velocity profile?

We'll create the geometry and mesh in ANSYS 12.1 which is the preprocessor for FLUENT, and
then read the mesh into FLUENT and solve for the flow solution.
Start ANSYS FLUENT

Prior to opening ANSYS, create a folder called pipe in a convenient location. We'll use this as the
working folder in which files created during the session will be stored. For this simulation Fluent
will be run within the ANSYS Workbench Interface. Start ANSYS workbench:

Start> All Programs>Ansys 12.1> Workbench

The following figure shows the workbench window.

Step 2: Geometry

Care to skip the geometry and meshing steps? README


If you would prefer to skip the geometry and mesh steps, then you can use the necessary files laminar
flow file. In order to load the necessary files, go to the Workbench Project Page, then (Click) File >
Open > "pipe_laminar.wbpj". Lastly, goto Step 4 of the tutorial.

Saving

Click on the "Save As.." button, , which is located on the top of the Workbench
Project Page. Save the project as "LaminarPipeFlow" in your working directory. When you save
in ANSYS a file and a folder will be created. For instance if you save as "LaminarPipeFlow", a
"LaminarPipeFlow" file and a folder called "LaminarPipeFlow_files" will appear. In order to
reopen the ANSYS files in the future you will need both the ".wbpj" file and the folder. If you do
not have BOTH, you will not be able to access your project.
Fluid Flow(FLUENT) Project Selection

On the left hand side of the workbench window, you will see a toolbox full of various analysis
systems. To the right, you see an empty work space. This is the place where you will organize
your project. At the bottom of the window, you see messages from ANSYS.

Left click (and hold) on Fluid Flow (FLUENT), and drag the icon into the empty space in the
Project Schematic. Your ANSYS window should now look comparable to the image below.

Since we selected Fluid Flow(FLUENT), each cell of the system corresponds to a step in the
process of performing CFD analysis using FLUENT. Rename the project to Laminar Pipe.

Analysis Type
In the Project Schematic of the Workbench window, right click on Geometry and select
Properties, as shown below.
The properties menu will then appear to the right of the Workbench window. Under Advance
Geometry Options, change the Analysis Type to 2D as shown in the image below.

Launch Design Modeler


In the Project Schematic, double click on Geometry to start preparing the geometry.
At this point, a new window, ANSYS Design Modeler will be opened. You will be asked to
select desired length unit. Use the default meter unit and click OK.
Creating a Sketch

Start by creating a sketch on the XYPlane. Under Tree Outline, select XYPlane, then click on
Sketching right before Details View. This will bring up the Sketching Toolboxes.

Click on the +Z axis on the bottom right corner of the Graphics window to have a normal look of the XY
Plane.
In the Sketching toolboxes, select Rectangle. In the Graphics window, create a rough Rectangle by
clicking once on the origin and then by clicking once somewhere in the positive XY plane. (Make sure
that you see a letter P at the origin before you click. The P implies that the cursor is directly over a point
of intersection.) At this point you should have something comparable to the image below.

Dimensions

At this point the rectangle will be properly dimensioned.

Under Sketching Toolboxes, select Dimensions tab, use the default dimensioning tools.
Dimension the geometry as shown in the following image.

Under the Details View table (located in the lower left corner), set V2=0.1m and set H1=8m, as
shown in the image below. This order of V2 and H1 will depend on your dimensioning order.
Surface Body Creation

In order to create the surface body, first (Click )Concept> Surface From Sketches as shown in
the image below.

This will create a new surface SurfaceSK1. Under Details View, select Sketch1 as Base Objects
and then under Surface body select the thickness to 0.1m and click Apply. Finally click Generate
to generate the surface.

At this point, you can close the Design Modeler and go back to Workbench Project Page. Save
your work thus far in the Workbench Project Page.

Step 3: Mesh
In this section the geometry will be meshed with 500 elements. That is, the pipe will be divided
into 100 elements in the axial direction and 5 elements in the radial direction.

Launch Mesher

In order to begin the meshing process, go to the Workbench Project Page, then (Double Click)
Mesh.

Default Mesh

In this section the default mesh will be generated. This can be carried out two ways. The first
way is to (Right Click) Mesh > Generate Mesh, as shown in the image below.

The second way in which the default mesh can be generated is to (Click) Mesh > Generate
Mesh as can be seen below.
Either method should give you the same results. The default mesh that you generate should look
comparable to the image below.

Note that in Workbench there is generally at least two ways to implement actions as has been
shown above. For, simplicity's sake the "menu" method of implementing actions will be solely
used for the rest of the tutorial.

Mapped Face Meshing

As can be seen above, the default mesh has irregular elements. We are interested in creating a
grid style of mesh that can be mapped to a rectangular domain. This meshing style is called
Mapped Face Meshing. In order to incorporate this meshing style (Click) Mesh Control >
Mapped Face Meshing as can be seen below.

Now, the Mapped Face Meshing still must be applied to the pipe geometry. In order to do so, first click
on the pipe body which should then highlight green. Next, (Click) Apply in the Details of Mapped Face
Meshing table, as shown below.
Now, generate the mesh by using either method from the "Default Mesh" section above. You should
obtain a mesh comparable to the following image.
Edge Sizing

The desired mesh has specific number of divisions along the radial and the axial direction. In
order to obtain the specified number of divisions Edge Sizing must be used. The divisions along
the axial direction will be specified first. Now, an Edge Sizing needs to be inserted. First, (Click)
Mesh Control > Sizing as shown below.

Now, the geometry and the number of divisions need to be specified. First (Click) Edge
Selection Filter, . Then hold down the "Control" button and then click the bottom and top
edge of the rectangle. Both sides should highlight green. Next, hit Apply under the Details of
Sizing table as shown below.

Now, change Type to Number of Divisions as shown in the image below.


Then, set Number of Divisions to 100 as shown below.

Follow the same procedure as for the edge sizing in the radial direction, except select the left and
right side instead of the top and bottom and set the Number of Division to 5. Then, generate the
mesh by using either method from the "Default Mesh" section above. You should obtain the
following mesh.

As it turns out, in the mesh above there are 540 elements, when there should be only 500. Mesh
statistics can be found by clicking on Mesh in the Tree and then by expanding Statistics under
the Details of Mesh table. In order to get the desired 500 element mesh the Behavior needs to be
changed from SofttoHardfor both Edge Sizing's. In order to carry this out first Expand Mesh in
the tree outline then click Edge Sizing and then change Behavior to Hard under the Details of
Edge Sizing table, as shown below.
Then set the BehaviortoHard for Edge Sizing 2. Next, generate the mesh using either method
from the "Default Mesh" section above. You should then obtain the following 500 element mesh.

Create Named Selections

Here, the edges of the geometry will be given names so one can assign boundary conditions in
Fluent in later steps. The left side of the pipe will be called "Inlet" and the right side will be
called "Outlet". The top side of the rectangle will be called "PipeWall" and the bottom side of the
rectangle will be called "CenterLine" as shown in the image below.

In order to create a named selections first (Click) Edge Selection Filter, . Then click on the
left side of the rectangle and it should highlight green. Next, right click the left side of the
rectangle and choose Create Named Selection as shown below.
Select the left edge and right click and select Create Named Selection. Enter Inlet and click OK,
as shown below.

Now, create named selections for the remaining three sides and name them according to the
diagram.

Save, Exit & Update

First save the project. Next, close the Mesher window. Then, go to the Workbench Project Page
and click the Update Project button,

Step 4: Setup (Physics)


Your current Workbench Project Page should look comparable to the following image.
Regardless of whether you downloaded the mesh and geometry files or if you created them
yourself, you should have checkmarks to the right of Geometry and Mesh.

Next, the mesh and geometry data need to be read into FLUENT. To read in the data (Right
Click) Setup > Refresh in the Workbench Project Page as shown in the image below.

After you click Update, a question mark should appear to the right of the Setup cell. This
indicates that the Setup process has not yet been completed.

Launch Fluent

Double click on Setup in the Workbench Project Page which will bring up the FLUENT
Launcher.
When the FLUENT Launcher appears change the options to "Double Precision", and then click
OK as shown below. The Double Precision option is used to select the double-precision solver. In
the double-precision solver, each floating point number is represented using 64 bits in contrast to
the single-precision solver which uses 32 bits. The extra bits increase not only the precision, but
also the range of magnitudes that can be represented. The downside of using double precision is
that it requires more memory.

Twiddle your thumbs a bit while the FLUENT interface starts up. This is where we'll specify the
governing equations and boundary conditions for our boundary-value problem. On the left-hand
side of the FLUENT interface, we see various items listed under Problem Setup. We will work
from top to bottom of the Problem Setup items to setup the physics of our boundary-value
problem. On the right hand side, we have the Graphics pane and, below that, the Command
pane.
Check and Display Mesh

First, the mesh will be checked to verify that it has been properly imported from Workbench. In
order to obtain the statistics about the mesh (Click) Mesh > Info > Size, as shown in the image
below.
Then, you should obtain the following output in the Command pane.

The mesh that was created earlier has 500 elements (5 Radial x 100 Axial). Note that in
FLUENT elements are called cells. The output states that there are 500 cells, which is a good
sign. Next, FLUENT will be asked to check the mesh for errors. In order to carry out the mesh
checking procedure (Click) Mesh > Check as shown in the image below.
You should see no errors in the Command Pane. Now, that the mesh has been verified, the mesh display
options will be discussed. In order to bring up the display options (Click) General > Mesh > Display as
shown in the image below.

The previous step should cause the Mesh Display window to open, as shown below. Note that the
Named Selections created in the meshing steps now appear.
You should have all the surfaces shown in the above snapshot. Clicking on a surface name in the
Mesh Display menu will toggle between select and unselect. Clicking Display will show all the
currently selected surface entities in the graphics pane. Unselect all surfaces and then select each
one in turn to see which part of the domain or boundary the particular surface entity corresponds
to (you will need to zoom in/out and translate the model as you do this). For instance, if you
select wall, outlet, and centerline and then click Display you should then obtain the following
output in the graphics window.
Now, make sure all 5 items under Surfaces are selected. The button next to Surfaces selects
all of the boundaries while the button deselects all of the boundaries at once. Once, all the 5
boundaries have been selected click Display, then close the Mesh Display window. The long,
skinny rectangle displayed in the graphics window corresponds to our solution domain. Some of
the operations available in the graphics window to interrogate the geometry and mesh are:

Translation: The model can be translated in any direction by holding down the Left Mouse
Button and then moving the mouse in the desired direction.

Zoom In: Hold down the Middle Mouse Button and drag a box from the Upper Left Hand
Corner to the Lower Right Hand Corner over the area you want to zoom in on.

Zoom Out: Hold down the Middle Mouse Button and drag a box anywhere from the Lower
Right Hand Corner to the Upper Left Hand Corner.

Use these operations to zoom in and interrogate the mesh.

Define Solver Properties

In this section the various solver properties will be specified in order to obtain the proper
solution for the laminar pipe flow. First, the axisymmetric nature of the geometry must be
specified. Under General > Solver > 2D Space select Axisymmetric as shown in the image
below.
Next, the Viscous Model parameters will be specified. In order to open the Viscous Model
Options Models > Viscous - Laminar > Edit.... By default, the Viscous Model options are set to
laminar, so no changes are needed. Click Cancel to exit the menu.
Now, the Energy Model parameters will be specified. In order to open the Energy Model Options
Models > Energy-Off > Edit.... For incompressible flow, the energy equation is decoupled from
the continuity and momentum equations. We need to solve the energy equation only if we are
interested in determining the temperature distribution. We will not deal with temperature in this
example. So leave the Energy Equation set to off and click Cancel to exit the menu.

Define Material Properties

Now, the properties of the fluid that is being modeled will be specified. The properties of the
fluid were specified in the problem specification section. In order to create a new fluid (Click)
Materials > Fluid > Create/Edit... as shown in the image below.
In the Create/Edit Materials menu set the Density to 1kg/m^3 (constant) and set the Viscosity to 2e-3
kg/(ms) (constant) as shown in the image below.
Click Change/Create. Close the window.

Define Boundary Conditions

At this point the boundary conditions for the four Named Selections will be specified. The
boundary condition for the inlet will be specified first.

Inlet Boundary Condition

In order to start the process (Click) Boundary Conditions > inlet > Edit... as shown in the
following image.
Note that the Boundary Condition Type should have been automatically set to velocity-inlet.
Now, the velocity at the inlet will be specified. In the Velocity Inlet menu set the Velocity
Specification Method to Components, and set the Axial-Velocity (m/s) to 1 m/s, as shown below.

Then, click OK to close the Velocity Inlet menu.


Outlet Boundary Condition

First, select outlet in the Boundary Conditions menu, as shown below.

As can be seen in the image above the Type should have been automatically set to pressure-
outlet. If the Type is not set to pressure-outlet, then set it to pressure-outlet. Now, no further
changes are needed for the outlet boundary condition.

Centerline Boundary Condition

Select centerline in the Boundary Conditions menu, as shown below

As can be seen in the image above the Type has been automatically set to wall which is not
correct. Change the Type to axis, as shown below.
When the dialog boxes appear click Yes to change the boundary type. Then click OK to accept
"centerline" as the zone name.

Pipe Wall Boundary Condition

First, select pipe_wall in the Boundary Conditions menu, as shown below.


As can be seen in the image above the Type should have been automatically set to wall. If the
Type is not set to wall, then set it to wall. Now, no further changes are needed for the pipe_wall
boundary condition.

Save

In order to save your work (Click)File> Save Project as shown in the image below.

Step 5: Solution
Second Order Scheme

A second-order discretization scheme will be used to approximate the solution. In order to


implement the second order scheme click on Solution Methods then click on Momentum and
select Second Order Upwind as shown in the image below.
Set Initial Guess

Here, the flow field will be initialized to the values at the inlet. In order to carry out the
initialization click on Solution Initialization then click on Compute from and select inlet as
shown below.
Then, click the Initialize button, . This completes the initialization.

Set Convergence Criteria

FLUENT reports a residual for each governing equation being solved. The residual is a measure
of how well the current solution satisfies the discrete form of each governing equation. We'll
iterate the solution until the residual for each equation falls below 1e-6. In order to specify the
residual criteria (Click) Monitors > Residuals > Edit..., as shown in the image below.
Next, change the residual under Convergence Criterion for continuity, x-velocity,andy-velocity,
all to 1e-6, as can be seen below.
Lastly, click OK to close the Residual Monitors menu.

Execute Calculation

Prior, to running the calculation the maximum number of iterations must be set. To specify the
maximum number of iterations click on Run Calculation then set the Number of Iterations to
100, as shown in the image below.
As a safeguard save the project now. Now, click on Calculatetwo times in order to run the
calculation. The residuals for each iteration are printed out as well as plotted in the graphics
window as they are calculated. After running the calculation, you should obtain the following
residual plot.

The residuals fall below the specified convergence criterion of 1e-6 in about 48 iterations, as
shown below. Actual number of convergence steps may vary slightly.

At this point, save the project once again.

For instructions to view the results in the traditional FLUENT post-processor, follow as shown
below:

Step 6: Results
Velocity Vectors

One can plot vectors in the entire domain, or on selected surfaces. Let us plot the velocity vectors
for the entire domain to see how the flow develops downstream of the inlet. First, click on
Graphics &Animations . Next, double click on Vectors which is located under Graphics. Then,
click on Display. Zoom into the region near the inlet. The length and color of the arrows
represent the velocity magnitude. The vector display is more intelligible if one makes the arrows
shorter as follows: Change Scale to 0.4 in the Vectors menu and click Display.

The laminar pipe flow was modeled asymmetrically; however, the plot can be reflected about the
axial axis to get an expanded sectional view. In order to carry this out (Click) Display > Views...
as shown below.
Under Mirror Planes, only the axis (or centerline) surface is listed since that is the only
symmetry boundary in the present case. Select axis (or centerline)and click Apply, as shown
below.

Then click Close to exit the Views menu. Your vector field should have been reflected across the
axially axis as, shown below.
The velocity vectors provide a picture of how the flow develops downstream of the inlet. As the
boundary layer grows, the flow near the wall is retarded by viscous friction. Note the sloping
arrows in the near wall region close to the inlet. This indicates that the slowing of the flow in the
near-wall region results in an injection of fluid into the region away from the wall to satisfy mass
conservation. Thus, the velocity outside the boundary layer increases. By default, one vector is
drawn at the center of each cell. This can be seen by turning on the grid in the vector plot: Select
Draw Grid in the Vectors menu and then click Display in the Grid Display as well as the Vectors
menus. Velocity vectors are the default, but you can also plot other vector quantities. See section
27.1.3 of the user manual for more details about the vector plot functionality.

Centerline Velocity

Here, we'll plot the variation of the axial velocity along the centerline. In order to start the
process (Click) Results > Plots > XY Plot... > Set Up..as shown below.
In the Solution XY Plot menu make sure that Position on X Axis is selected , and X is set to 1
and Y is set to 0. This tells FLUENT to plot the x-coordinate value on the abscissa of the graph.
Next, select Velocity... for the first box underneath Y Axis Function and select Axial Velocity for
the second box. Please note that X Axis Function and Y Axis Function describe the x and y axes
of the graph, which should not be confused with the x and y directions of the pipe. Finally, select
centerline under Surfaces since we are plotting the axial velocity along the centerline. This
finishes setting up the plotting parameters. Your Solution XY Plot should look exactly the same
as the following image.
Now, click Plot. The plot of the axial velocity as a function of distance along the centerline now
appears.

In the graph that comes up, we can see that the velocity reaches a constant value beyond a certain
distance from the inlet. This is the fully-developed flow region. At this point the graph will be
modified such that the fully developed regions results are truncated. That is, the range of the axes
will be reconfigured. Open the Solution XY Plot menu, then click on Axes..., as shown below.
Then, deselect Auto Range, which is located under Options. The boxes under Range should now
be accessible. Next, select X, which is located under Axis. Enter 1 for Minimum and 3 for
Maximum under Range. At this point the grid lines will be turned on in order to help estimate
where the flow becomes fully developed. Check the boxes next to Major Rules and Minor Rules
under Options. At this point yourAxes - Solution XY Plot menu should look exactly the same as
the image below.
Lastly, click Apply. Now, that the X axis has been formatted, we will move on to formatting the
Y axis. Select Y under Axis and once again deselect Auto Range under Options. Then, enter 1.8
for Minimum and 2.0 for Maximum under Range. Also select Major Rules and Minor Rules to
turn on the grid lines in the direction. At this point yourAxes - Solution XY Plot menu should
look exactly the same as the image below.

We have now finished specifying the range for each axis, so click Apply and then Close. At this
point, the graph can be replotted. Go to the Solution XY Plot menu and click Plot to plot the
graph again with the new axes extents.

From the image above, one can see that the fully-developed region starts at around x=3m and the
centerline velocity in this region is 1.93 m/s.
Saving the Plot

In this section, we will save the data from the plot and a picture of the plot. The data from the
plot will be saved first. In order to save the plot data open the Solution XY Plot menu and then
select Write to File, which is located under Options. The Plot button should have changed to
Write.... Click on Write..., and then enter vel.xy as the XY File Name. Next, click OK. Check
that this file has been created in your FLUENT working directory. Lastly, close the Solution XY
Plot menu.

At this point, we'll save a picture of the plot. First click on File then click Save Picture, as
shown below.

Under Format, choose one of the following three options:

EPS- if you have a postscript viewer, this is the best choice. EPS allows you to save the file in
vector mode, which will offer the best viewable image quality. After selecting EPS, choose
Vector from under File Type.

TIFF- this will offer a high resolution image of your graph. However, the image file generated
will be rather large, so this is not recommended if you do not have a lot of room on your storage
device.

JPG- this is small in size and viewable from all browsers. However, the quality of the image is
not particularly good.

After selecting your desired image format and associated options, click on Save...
Enter vel.eps, vel.tif, or vel.jpg depending on your format choice and click OK.

Verify that the image file has been created in your working directory. You can now copy this file
onto a disk or print it out for your records.

Coefficient of Skin Friction

FLUENT provides a large amount of useful information in the online help that comes with the
software. Let's probe the online help for information on calculating the coefficient of skin
friction. In order to access the online help first (click) Help > Users Guide Index as shown in the
following image.

Click on S in the links on top and scroll down to skin friction coefficient. Click on the first link
(normally, you would have to go through each of the links until you find what you are looking
for). There you can see the following excerpt on the skin friction coefficient as well as the
equation for calculating it.

Click on the link for Reference Values panel, which tells us how to set the reference values used
in calculating the skin coefficient. In order to set the reference values, click on Reference Values,
as shown below.
Then, set Compute From to inlet, to tell FLUENT to calculate the reference values from the
values at inlet. Check that density is 1 kg/m3 and velocity is 1 m/s. (Alternately, you could have
just typed in the appropriate values). Your Reference Values should look the same as the
following screen snapshot.
Now, reopen the Solution XY Plot menu. Uncheck the Write to File check box under Options,
since we want to plot to the window. The Options and Plot Direction can be left as is since we
are still plotting against the x distance along the pipe. Under the Y Axis Function, pick Wall
Fluxes..., and then Skin Friction Coefficient in the box under that. Under Surfaces, only select
pipe_wall. At this point, your Solution XY Plot menu should look exactly like the following
image.

Now, the ranges of each axis will be specified. Click on Axes... within the Solution XY Plot
menu and re-select Auto-Range for the Y axis. Click Apply. Set the range of the X axis from 1to
8 by selecting X under Axis, entering 1 under Minimum, and 8 under Maximum in the box
(remember to deselect Range Auto-Range first if it is checked). Click Apply, then click Close.
Lastly, click Plot in the Solution XY Plot menu. You should obtain the following plot.
We can see that the fully developed region is reached at around x=3.0m and the skin friction
coefficient in this region is around 1.54.
In order to save the data from this plot, first reopen the Solution XY Plot menu. Then, select
Write to File under Options and click Write.... Enter cf.xy for XY File and click OK.

Velocity Profile

In this section we will plot the velocity at the outlet as a function of the distance from the center
of the pipe. In order to start the process (Click) Results > Plots > XY Plot... > Set Up..as shown
below

For this graph, the y axis of the graph will have to be set to the y axis of the pipe (radial
direction). To plot the position variable on the y axis of the graph, uncheck Position on X Axis
under Options and choose Position on Y Axis instead. To make the position variable the radial
distance from the centerline, under Plot Direction, change X to 0 and Y to 1. To plot the axial
velocity on the x axis of the graph, select Velocity... for the first box underneath X Axis
Function, and select Axial Velocity for the second box. Next, select outlet, which is located
under Surfaces. Then, uncheck the Write to File check box under Options, so the graph will plot.
Your Solution XY Plot, should look exactly like the image below.
Next, click on Axes in the Solution XY Plot menu. Then, change both the x and y axes to Auto-
Range. (Don't forget to click apply before selecting a different axis). Click Close in the Axes -
Solution XY Plot menu.
It is of interest to compare the velocity profile with the theoretical parabolic profile. In order to
plot the theoretical results, first click here to download the necessary file. Save the file to your
working directory. Next, go to the Solution XY Plot menu and click Load File... and select the
file that you just downloaded, profile_fdev.xy. Lastly, click Plot in the Solution XY Plot menu.
You should then obtain the following figure.

Notice, how results compare relatively well with the theoretical parabolic profile. In order to
save the data from this plot, first reopen the Solution XY Plot menu. Then, select Write to File
under Options and click Write.... Enter profile.xy for XY File and click OK.
To see how the velocity profile changes in the developing region, we will add profiles at x=0.6m
(x/D=3) and x=0.12m (x/D=6) to the previous plot. In order to create the profiles, we must first
create vertical lines using the Line/Rake tool. First, (Click) Surface < Line/Rake as shown in the
following image.

We'll create a straight line from (x0,y0)=(0.6,0) to (x1,y1)=(0.6,0.1). Select Line Tool under
Options. Enter x0=0.6, y0=0,x1=0.6, y1=0.1. Enter line1 under New Surface Name. Click
Create.

To see the line that you just created,(Click) Display > Mesh. Note that line1appears in the list of
surfaces. Select all surfaces except default-interior. Click Display. This displays all surfaces but
not the mesh cells. Zoom into the region near the inlet to see the line created at x=0.6m. The
white vertical line appearing to the right is line1, as shown in the image below.
Similarly, create a vertical line called line2at x=1.2; (x0,y0)=(1.2,0) to (x1,y1)=(1.2,0.1). Display
it in the graphics window to check that it has been created correctly. Now, we can plot the
velocity profiles at x=0.6m (x/D=3) and x=0.12m (x/D=6) along with the outlet profile. First,
open the Solution XY Plot menu. Under Surfaces, in addition to outlet, select line1 and line2.
Make sure Node Values is selected under Options. Now, your Solution XY Plot menu should
look exactly like the following image.

Lastly, click Plot and you should obtain the following output. Your symbols might be different
from the ones below. You can change the symbols and line styles under the Curves... button.
Click on Help in the Curves menu if you have problems figuring out how to change these
settings.
The profile three diameters downstream is fairly close to the fully-developed profile at the outlet.
If you redo this plot using the fine grid results in the next step, you'll see that this is not actually
the case. The coarse grid used here doesn't capture the boundary layer development properly and
under predicts the development length.

In FLUENT, you can choose to display the computed cell-center values or values that have been
interpolated to the nodes. By default, the Node Values option is turned on, and the interpolated
values are displayed. Node-averaged data curves may be somewhat smoother than curves for cell
values.

This is for CFD procedure:

Velocity Vectors

Velocity Magnitude Contours

The following video shows how to plot velocity magnitude contours. In order to get a better view
of the contours, the video also shows how to stretch the domain in the radial direction as well as
reflect it about the axis.

Tip: You can increase the number of Samples along the "Pipe Outlet location" to get a smoother
curve (though it might not make a difference here since the radial mesh is very coarse). See
snapshot below.
You can increase the number of Samples for "Centerline" and "Pipe Wall" locations to get
smoother curves.

Step 7: Verification & Validation


It is very important that you take the time to check the validity of your solution. This section
leads you through some of the steps you can take to validate your solution.
Refine Mesh

Let's repeat the solution on a finer mesh. For the finer mesh, we will increase the number of
radial divisions from 5 to 10. In the Workbench Project Page right click on Mesh then click
Duplicate as shown below.

Rename the duplicate project to Laminar Pipe Flow (mesh 2). You should have the following two
projects in your Workbench Project Page.

Next, double click on the Mesh cell of the Laminar Pipe Flow (mesh 2) project. A new ANSYS Mesher
window will open. Under Outline, expand Mesh and click on Edge Sizing, as shown below.
Under Details of "Edge Sizing", enter 10 for Number of Divisions, as shown below.

Sometimes, you need to turn-off "Advanced Size Function" under "Details of Mesh" to get the mesher to
accept the modified settings. That way the Advanced Size Function feature will not over-ride your
settings (this feature is useful for meshing complex geometries). Click Mesh in the tree and turn off
Advanced Size Function under "Details of Mesh" as shown below.
Then, click Update to generate the new mesh.

The mesh should now have 1000 elements (10 x 100). A quick glance of the mesh statistics
reveals that there are indeed 1000 elements.
Compute the Solution

Close the ANSYS Mesher to go back to the Workbench Project Page. Under Laminar Pipe
Flow (mesh 2), right click on Fluid Flow (FLUENT) and click on Update, as shown below.

Now, wait a few minutes for FLUENT to obtain the solution for the refined mesh. After FLUENT obtains
the solution, save your project.

It is necessary to check that the solution iterations have converged. Launch FLUENT by double clicking on
Solution of the "Laminar Pipe Flow (mesh 2)" project in the Workbench Project Page. After FLUENT
launches, select Monitors > Residuals > Edit... and then Plot, as shown in the images below.
It looks like my solution hasn't converged, so I need to run more iterations by selecting Run Calculation.
You may want to increase the number of iterations to, say, 1000. Ensure that you have a converged
solution and save the project.
If you double-click on Results for mesh 2 in the project page, you'll see that all results have been
updated for the new mesh. Also, you can drag Solution for the original mesh on to Results for mesh 2 in
the project page. CFD-Post will automatically add the results from the original mesh to the plots for
mesh 2. For instance, you will get the velocity profiles for both meshes in the same plot and you can
export that to Excel and compare with the full-developed analytical solution.

Further Verification

The plot below shows the results of a further refined mesh ( 20 radial x 100 axial ) and the
theoretical results.
Notice that for the further refined mesh, the results are almost indistinguishable from theory.

For instructions to compare results in the traditional FLUENT post-processor,follow below:

Step 7: Verification & Validation


It is very important that you take the time to check the validity of your solution. This section
leads you through some of the steps you can take to validate your solution.

Refine Mesh

Let's repeat the solution on a finer mesh. For the finer mesh, we will increase the number of
radial divisions from 5 to 10. In the Workbench Project Page right click on Mesh then click
Duplicate as shown below.
Rename the duplicate project to Laminar Pipe Flow (mesh 2). You should
have the following two projects in your Workbench Project Page.

Next, double click on the Mesh cell of the Laminar Pipe Flow (mesh 2)
project. A new ANSYS Mesher window will open. Under Outline, expand
Mesh and click on Edge Sizing, as shown below.

Under Details of "Edge Sizing", enter 10 for Number of Divisions, as shown below.
Sometimes, you need to turn-off "Advanced Size Function" under "Details of Mesh" to get the mesher to
accept the modified settings. That way the Advanced Size Function feature will not over-ride your
settings (this feature is useful for meshing complex geometries). Click Mesh in the tree and turn off
Advanced Size Function under "Details of Mesh" as shown below.
Then, click Update to generate the new mesh.
The mesh should now have 1000 elements (10 x 100). A quick glance of the mesh statistics reveals that
there are indeed 1000 elements.

Compute the Solution

Close the ANSYS Mesher to go back to the Workbench Project Page. Under Laminar Pipe
Flow (mesh 2), right click on Fluid Flow (FLUENT) and click on Update, as shown below.

Now, wait a few minutes for FLUENT to obtain the solution for the refined mesh. After
FLUENT obtains the solution, save your project.

It is necessary to check that the solution iterations have converged. Launch FLUENT by double
clicking on Solution of the "Laminar Pipe Flow (mesh 2)" project in the Workbench Project
Page. After FLUENT launches, select Monitors > Residuals > Edit... and then Plot, as shown in
the images below.

It looks like my solution hasn't converged, so I need to run more iterations by selecting Run
Calculation. You may want to increase the number of iterations to, say, 1000. Ensure that you
have a converged solution and save the project.
If you double-click on Results for mesh 2 in the project page, you'll see that all results have been
updated for the new mesh. Also, you can drag Solution for the original mesh on to Results for
mesh 2 in the project page. CFD-Post will automatically add the results from the original mesh to
the plots for mesh 2. For instance, you will get the velocity profiles for both meshes in the same
plot and you can export that to Excel and compare with the full-developed analytical solution.

For instructions to compare results in the traditional FLUENT post-processor, click here and
scroll down.

Velocity Profile

In order to launch FLUENT double click on the Solution of the "Laminar Pipe Flow (mesh 2)"
project in the Workbench Project Page.After, FLUENT launches (Click) Plots > XY Plot
>SetUp... as shown in the image below.
For this graph, the y axis of the graph will have to be set to the y axis of the pipe (radial
direction). To plot the position variable on the y axis of the graph, uncheck Position on X Axis
under Options and choose Position on Y Axis instead. To make the position variable the radial
distance from the centerline, under Plot Direction, change X to 0 and Y to 1. To plot the axial
velocity on the x axis of the graph, select Velocity... for the first box underneath X Axis
Function, and select Axial Velocity for the second box. Next, select outlet, which is located
under Surfaces. Then, uncheck the Write to File check box under Options, so the graph will plot.
Now, your Solution XY Plot menu should look exactly like the following image.
Since we would like to see how the results compare to the courser mesh and the theoretical
solution, we will load the profile.xy file, which was created in the previous step. In order to do
so, click Load File... in the Solution XY Plot menu, then select the profile.xy file. Click OK, then
click Plot in the Solution XY Plot menu. You should then obtain the following plot.

In the plot above the green dots correspond to the theoretical solution, the red dots correspond to
the rough mesh ( 5 x 100 ), and the white dots correspond to the refined mesh ( 10 x 100 ). Note
how the refined mesh results resemble the theory signicantly more than the rough mesh.
Further Verification

The plot below shows the results of a further refined mesh ( 20 radial x 100 axial ) and the
theoretical results.

Notice that for the further refined mesh, the results are almost indistinguishable from theory.

Exercises
Consider developing flow in a pipe of length L = 8 m, diameter D = 0.2 m, ρ = 1 kg/m3 , µ =2 ×
10^−3 kg/m s, and entrance velocity u_in = 1 m/s (the conditions specified in the Problem
Specification section). Use FLUENT with the "second-order upwind" scheme for momentum to
solve for the flowfield on meshes of 100 × 5, 100 × 10 and 100 × 20 (axial divisions × radial
divisions).

1. Plot the axial velocity profiles at the exit obtained from the three meshes. Also, plot the
corresponding velocity profile obtained from fully-developed pipe analysis. Indicate the equation
you used to generate this profile. In all, you should have four curves in a single plot. Use a
legend to identify the various curves. Axial velocity u should be on the abscissa and r on the
ordinate.

2. Calculate the shear stress Tau_xy at the wall in the fully-developed region for the three
meshes. Calculate the corresponding value from fully-developed pipe analysis. For each mesh,
calculate the % error relative to the analytical value. Include your results as a table:

3. At the exit of the pipe where the flow is fully-developed, we can define the error in the
centerline velocity as

where u_c is the centerline value from FLUENT and u_exact is the corresponding exact
(analytical) value. We expect the error to take the form

where the coefficient K and power p depend upon the order of accuracy of the discretization.
Using MATLAB, perform a linear least squares fit of

to obtain the coefficients p and K. Plot ϵ vs. ∆r (using symbols) on a log-log plot. Add a line
corresponding to the least-squares fit to this plot.

Hint: In FLUENT, you can write out the data in any "XY" plot to a file by selecting the "Write to
File" option in the Solution XY Plot menu. Then click on Write and enter a filename. You can
strip the headers and footers in this file and read this into MATLAB as column data using the
load function in MATLAB.

4. Let's see how p changes when using a first-order accurate discretization. In FLUENT, use
"first-order upwind" scheme for momentum to solve for the flowfield on the three meshes.
Repeat the calculation of coefficients p and K as above. Add this ϵ vs. ∆r data (using symbols) to
the above log-log plot. Add a line corresponding to the least-squares fit to this plot. In all, you
should have four curves on this plot (two each for second- and first-order discretization). Make
sure you include an appropriate legend in the figure.

Contrast the value of p obtained in the two cases and briefly explain your results (2-3sentences).

Hint: To interpret your results, you should keep in mind that the first or second-order upwind
discretization applies only to the inertia terms in the momentum equation. The discretization of
the viscous terms is always second-order accurate.
FLUENT - Turbulent Pipe Flow - Problem Specification

Problem Specification

Let's revisit the pipe flow example considered in the previous exercise. As before, the inlet
velocity is 1 m/s, the fluid exhausts into the ambient atmosphere and density is 1 kg/m3. For µ =
2 x 10 -5kg/(ms), the Reynolds no. based on the pipe diameter and average velocity at the inlet is

This change of viscosity has taken us from a Reynolds number of 100 to 10,000. At this
Reynolds number, the flow is usually completely turbulent.

We'll solve this problem numerically using ANSYS FLUENT. Among the results we'll look at
are centerline velocity, skin friction coefficient and the axial velocity profile at the outlet.

Step 1: Pre-Analysis & Start-Up


Preliminary Analysis

A turbulent flow exhibits small-scale fluctuations in time. It is usually not possible to resolve
these fluctuations in a CFD calculation. So the flow variables such as velocity, pressure, etc. are
time-averaged. Unfortunately, the time-averaged governing equations are not closed. (i.e. They
contain fluctuating quantities which need to be modeled using a turbulence model.) No
turbulence model is currently available that is valid for all types of flows and so it is necessary to
choose and fine-tune a model for particular classes of flows.

In this exercise, you'll be turned loose on variants of the k-ε model. But in the real world, tread
with great caution: you should evaluate the validity of your calculations using a turbulence
model very carefully (which, ahem, means that there is no getting away from studying fluid
dynamics concepts and numerical methods very carefully). FLUENT should not be used as a
black box. The k-ε models consist of two differential equations: one each for the turbulent kinetic
energy k and turbulent dissipation ε. These two equations have to be solved along with the time-
averaged continuity, momentum and energy equations. So turbulent flow calculations are much
more difficult and time-consuming than laminar flow calculations. This is an exercise to what
your appetite for turbulent flow calculations.
Start ANSYS FLUENT

Since the flow is axisymmetric, the geometry is a rectangle as in the laminar pipe flow tutorial.
We will first use a 100x30 mesh (i.e. 100 divisions in the axial direction and 30 divisions in the
radial direction).

We could create this mesh from scratch, as in the laminar pipe flow tutorial, but instead, we will
modify the previous 100x5 to get the 100x30 mesh. This will introduce you to the art of
modifying meshes in the ANSYS Workbench Mechanical Mesher.

Step 2: Geometry
Care to skip the geometry and meshing steps?
If you would like to skip the geometry and meshing steps, you unzip and load the project into ANSYS
workbench and skip to the Setup (Physics) step.
File: Turb pipe flow
For this tutorial we are going to be using the same geometry that we created in the laminar
pipeflow tutorial. Once you have completed the Laminar Pipe Flow tutorial, you can open the
saved project and use it as a template for this tutorial.

Step 3: Mesh
Care to skip the Laminar Flow tutorial?
If you would like to skip the Laminar Flow tutorial, you can use the completed project (pipe flow.zip)
(right click and select Save As..., which will be used as a template in this Turbulent Flow tutorial. Unzip
the folder and open up the project before continuing.

You should have completed the Laminar Pipe Flow tutorial before continuing with this one. The
starting point for this tutorial is the ending point of the one before it. If you bring up the project
we have already completed, you can follow the next steps.

Right click on Mesh. Then click onDuplicate, which will duplicate the mesh from the previous
tutorial. Enter "Turbulent Flow" in the highlighted field to rename it. At this point your project
schematic window should appear as below:
Next, double click on theMeshcell to edit the mesh.

We need to change the edge sizing, as we did in the previous tutorial, to 100 by 30 (instead of
100 by 5). We are also going to need to bias it. This is because we want smaller divisions the
closer you get to the wall. First, right click on Edge Sizing 2in the Project tree on the left, and
clickDeleteto remove the existing edge sizing on the inlet and outlet.

Next, we'll apply an edge sizing with bias to the inlet, the left end of the pipe. ClickMesh
Control > Sizing. Using the edge selection tool, highlight the inlet (left end) of the pipe and
clickApplynext toGeometry. As in the Laminar Pipe Flow tutorial, changeTypetoNumber of
Divisions, and enter 30. ChangeBehaviortoHard. Now, let's apply a bias to the edge sizing.
UnderBias Type, select the second option, - – — ----. Enter aBias Factorof 10. Your Details of
"Edge Sizing 2" should now appear like the image below.

Now we would like to apply an edge sizing to the outlet, the right end of the pipe. Once again,
we'll use 30 divisions, with a bias factor of 10 and with the smaller divisions at the top, near the
wall. This time, when selectingBias Type, choose the first option, ---- — – -. This will put the
smallest divisions at the top. Other than this, the procedure is the same as for the inlet. When
complete, your Details of "Edge Sizing 3" should look like this:

Right click on Mesh and select "Generate Mesh". The bias factor generates a finer mesh near the
pipe wall. This is done to compute the small fluctuation in fluid property near the wall.
Next, close the meshing window to return to the main project view.

Recall that we created the following boundary types for the 100x5 mesh in the Laminar Pipe
Flow tutorial:
Edge Position Name Type
Left inlet VELOCITY_INLET
Right outlet PRESSURE_OUTLET
Top wall WALL
Bottom centerline AXIS

Step 4: Setup (Physics)


Launch FLUENT

We will be working within ANSYS Workbench. To launch FLUENT, double click on the Setup
cell from the Project view. Make sure the Double Precision option is selected. This will use 64
bits (rather than 32) per floating point number, decreasing round-off errors.
Once Fluent has opened, select Problem Setup > General > Display...

Make sure all 5 items under Surfaces are selected. Then click Display. Remember that we can
zoom in using the middle mouse button. Zoom in and admire the mesh. How many divisions are
there in the radial direction?
Recall that you can look at specific components of the mesh by choosing the entities you wish to
view under Surfaces (click to select and click again to deselect a specific boundary). Click
Display again when you have selected your boundaries. Use this feature and make sure that the
boundary labels correspond to the correct geometric entities.

Define Governing Equations

Problem Setup > General > Solver

Choose Axisymmetric under 2D Space. As in the laminar pipe flow tutorial, we'll use the
defaults of Pressure-Based Type, Steady flow and Absolute Velocity Formulation.

Problem Setup > Models > Energy...

The energy equation can be turned off since this is an incompressible flow and we are not
interested in the temperature. Make sure Energy - Off appears.

Problem Setup > Models > Viscous - Laminar

Click Edit... and choose k-epsilon (2eqn). Notice that the window expands and additional
options are displayed on choosing the k-epsilon turbulence model. Under Near-Wall Treatment,
pick Enhanced Wall Treatment. This option uses a blended function to go between a two-layer
model and standard wall functions. If the mesh near the wall is fine enough, the two-layer model
is used. Otherwise, standard wall functions are used. You could alternately use Standard Wall
Functions; this will work well when 30 <y+< 100. Refer to the turbulence chapter in the
FLUENT user manual.
Click OK.

Problem Setup > Materials

Double click on air and change Density to 1.0 kg/m^3 and Viscosity to 2e-5 kg/(m*s). These
are the values in the Problem Specification and are picked to give us a Reynolds number of
10,000. We'll take both as constant.
Click Change/Create and close the window.

Define Boundary Conditions

Problem Setup > Boundary conditions > Operating Conditions...

Recall that for all flows, FLUENT uses the gauge pressure internally. Any time an absolute
pressure is needed, it is generated by adding the operating pressure to the gauge pressure. We'll
use the default value of 1 atm (101,325 Pa) as the Operating Pressure.

Click Cancel to leave the default in place.

We'll now setup the boundary conditions at the wall, centerline, inlet and outlet.

Problem Setup > Boundary conditions

We don't need to set any parameters for the pipewall zone. FLUENT will automatically detect
that this location should be set as a wall based on its name. Verify this by selecting that zone and
looking at its type in the drop down menu.
Next, let's look at the centerline. Since we are solving an axisymmetric problem, we will set the
centerline as the axis; this will impose symmetry at this boundary. Set centerline to axis
boundary type, using the drop down menu. Click Yes and OK to confirm.

Choose inlet and click on Edit..... This boundary is set to velocity-inlet type by default which is
right in our case. Change the Velocity Specification Method to Magnitude, Normal to
Boundary. Enter 1 m/sfor Velocity Magnitude. This indicates that the fluid is coming in normal
to the inlet at the rate of 1 meter per second. Select Intensity and Hydraulic Diameter next to the
Turbulence Specification Method. Then enter 1% for Turbulence Intensity and 0.2m for
Hydraulic Diameter. Click OK to set the boundary conditions for the inlet.
The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the
outlet gauge pressure = outlet absolute pressure - operating pressure = 0. Choose outlet under
Zone. The Type of this boundary is pressure-outlet. Click on Edit. The default value of the
Gauge Pressure is 0. Click Cancel to leave the defaults in place.

Note: Backflow in the Pressure Outlet menu refers to flow entering through an outlet boundary.
This is not likely to happen in this case. So we don't have to set the backflow parameters.

This completes the boundary condition specification.

Reference Values

Let's setup the reference values, which will be used later on while viewing non-dimensional
results (this setting doesn't affect the numerical solution).

Problem Setup > Reference Values


Select Compute from > inlet.
Step 5: Solution
We'll use second-order discretization for the momentum equation, as in the laminar pipe flow
tutorial, and also for the turbulence kinetic energy equation which is part of the k-epsilon
turbulence model.

Solution > Solution Methods

Change the Discretization for Momentum;TurbulenceKinetic Energy and Turbulence


Dissipation Rate equations to Second Order Upwind (if you do not see all of the equations scroll
down to see them).

The order of discretization that we just set refers to the convective terms in the equations; the
discretization of the viscous terms is always second-order accurate in FLUENT. Second-order discretization
generally yields better accuracy while first-order discretization yields more robust convergence. If the
second-order scheme doesn't converge, you can try starting the iterations with the first-order scheme
and switching to the second-order scheme after some iteration.
Set Convergence Criteria

Recall that FLUENT reports a residual for each governing equation being solved. The residual is
a measure of how well the current solution satisfies the discrete form of each governing equation.
We'll iterate the solution until the residual for each equation falls below 1e-6.

Solution > Monitors > Residuals, Statistic and Force Monitors

Double click on Residuals.Notice that Convergence Criterion has to be set for the k and epsilon
equations in addition to the three equations in the last tutorial. Set the Convergence Criterion to
be 1e-06 for all five equations being solved.

Select Print to Console and Plot under Options (these are the defaults). This will print as well
plot the residuals as they are calculated which you will use to monitor convergence.

Click OK.

Set Initial Guess

We'll use an initial guess that is constant over the entire flow domain and equal to the values at
the inlet:

Solution > Solution Initialization > Standard Initialization


In the Solution Initialization menu that comes up, choose inlet under Compute From. The Axial
Velocity for all cells will be set to 1 m/s, the Radial Velocity to 0 m/s and the Gauge Pressure to
0 Pa. The Turbulence Kinetic Energy and Dissipation Rate(scroll down to see it) values are set
from the prescribed values for the Turbulence Intensity and Hydraulic Diameter at the inlet.
Click Initialize (this is easy to overlook).

This completes the problem specification. Save your project.

Iterate Until Convergence

Solve for 700 iterations.

Solution > Run Calculation

In the Iterate menu that comes up, change the Number of Iterations to 700. Click Calculate.
The solution converges in a total of about 220 iterations. You may get a different number of
iterations to convergence depending on your mesh and software version.

We need a larger number of iterations for convergence than in the laminar case since we have a
finer mesh and are also solving additional equations from the turbulence model.

Setup Data Export

In addition to the standard data quantities, we would also like to view the results for the Skin
Friction Coefficient. This quantity is not transferred to the post-processor by default; so we have
to do it manually.

File > Data File Quantities


Under Additional Quantities, select Skin Friction Coefficient, which should be roughly half
way down. Your window should now look like this:

Step 6: Results
After the solution is complete, close the FLUENT window to return to the Workbench window.
Double click Results in the main Workbench window to open CFD Post, where we will be
viewing the results.

The following instructions show only how to view results using the "chart" option. But one
should really start by viewing velocity vectors; velocity/pressure/TKE contours etc. and check
that the solution looks basically right. The Laminar Pipe Flow tutorialwalks you through the
steps to view vectors and contours in CFD Post.
Locations

Before viewing the results, we need to define the locations in CFD Post where we would like to
view the results, namely the wall, centerline, and outlet.

Insert > Location > Line

Rename this location "Pipe Wall". Avoid naming locations in CFD Post with identical names to
those used in FLUENT, this can cause problems. We will define the line by two points. Enter
(0,0.1,0) for Point 1 and (8,0.1,0) for Point 2. Change Samples to 100.

Repeat the process for the two other locations needed:


Name Point 1 Point 2
"Pipe Centerline" (0,0,0) (8,0,0)
"Pipe Outlet" (8,0,0) (8,0.1,0)

y+

Turbulent flows are significantly affected by the presence of walls. The k-epsilon turbulence
model is primarily valid away from walls and special treatment is required to make it valid near
walls. The near-wall model is sensitive to the grid resolution which is assessed in the wall unit
y+(defined in section 10.9.1 of the FLUENT user manual). We'll gloss over the details for now
and use the following rule of thumb: select the near-wall resolution such that y+ > 30 or < 5 for
the wall-adjacent cell when using the Enhanced Wall Treatment option. Look at section 10.9,
Grid Considerations for Turbulent Flow Simulations, for details.

Let's plot y+ values for wall-adjacent cells to check how it compares with the recommendation
mentioned above.

Insert > Chart

Let's rename the graph "Wall Y plus". Also, change Title to "Wall Y plus".

Data Series Tab


Rename the data series to "Y plus". Next, change Location to Pipe Wall.
X Axis Tab: Change Variable to X.
Y Axis Tab: Change Variable to Yplus.
Click Apply and our chart should appear.
As we can see, the wall _y+_valueis between roughly 1.35 and 2.45. Since this is less than 5, the
near-wall grid resolution is acceptable.

Export the data to a .csv file ("comma separated values") by clicking on Export. This file can be
opened in Excel.
Centerline Velocity

Next, we would like to make a graph of the axial velocity along the centerline. We will do this by
creating another chart.

Insert > Chart


Rename this chart "Centerline Velocity", and change the title of the chart as well.

Data Series
Change Name to "Centerline Velocity", and this time set Location to "Pipe Centerline".

X Axis: Once again, change Variable to X.


Y Axis: Change Variable to Velocity u, which corresponds to the Axial Velocity.
Click Apply and our chart should appear.
Coefficient of Skin Friction

The definition of the skin friction coefficient was discussed in the laminar pipe flow tutorial.

Once again, insert another chart, naming and titling it Coefficient of Skin Friction. Rename the
data series and choose Pipe Wall for Location. Plot X on the X Axis and the Skin Friction
Coefficient on the Y Axis. When complete, your chart should match the image below:
We can see that the fully-developed value is 0.0085. Compare this with what you'd expect from
the Moody chart.

Velocity Profile

We'll plot the axial velocity at the outlet as a function of the distance from the center of the pipe.

Insert another chart, naming and titling it "Outlet Velocity". Change the name of the data series,
and set the Location to Pipe Outlet. This time, put Velocity u on the X Axis and Y on the Y Axis.
When complete, your chart should appear as below:
The axial velocity is maximum at the centerline and zero at the wall to satisfy the no-slip
boundary condition for viscous flow. Compare qualitatively the near-wall velocity gradient
normal to the wall with the laminar case. Which is larger? From this, what can you say about the
relative strengths of near-wall mixing in the laminar and turbulent cases?

Step 7: Verification & Validation


n order to assess the numerical accuracy of the results obtained, it is necessary to compare results
on different meshes. We'll re-do the calculation on a 100x60 mesh which has twice the number of
nodes in the radial direction as the 100x30 mesh.

In Workbench, under Turbulent Flow project, right click on Fluid Flow (FLUENT) and click
duplicate. Rename the duplicate project to Turbulent Flow Refined Mesh. You should have
three project cells in workbench.
Double click on Mesh for Turbulent Flow Refined Mesh. The ANSYS Mesher window will
open. Under Outline, expand mesh tree and click on Edge Sizing 2.

Highlight "Edge Sizing 2". Under Details of "Edge Sizing 2", increase Number of Divisions to
60. This will refine the mesh in the radial direction at the inlet.

Highlight "Edge Sizing 3". Under Details of "Edge Sizing 3", increase Number of Divisions to
60. This will refine the mesh in the radial direction at the outlet.

Click Update to generate the new mesh.

Close the ANSYS Mesher and go back to Workbench windows. Under Turbulent Flow Refined
Mesh, right click on Fluid Flow (FLUENT) and click Update. Wait for a few minutes for
FLUENT to obtain a solution and update all the results.
We would want to compare the solution on the two meshes. To do that, drag the Solution cell of
Turbulent Flow Refined Mesh to Results cell of Turbulent Flow.

Double click the Results cell of Turbulent Flow, and after CFD Post opens, we can compare our
results by simply selecting the desired chart!

Result Comparison

The following images show comparisons of Centerline Velocity, Coefficient of Skin Friction,
Outlet Velocity, and Wall Y-plus.
From the first three plots, we can see that the velocity and skin friction coefficient results have
remained nearly unchanged. However, the Y-plus results show significant improvement.

You may want to experiment with meshes of other granularities and compare their plots with the
plots saved from the 100x30 and 100x60 meshes.

In Problem 1, we will be looking at the effect of coarse meshes with uniform granularity.

Problem 1
Problem

Use FLUENT to resolve the developing flow in a pipe (same configuration as was done in the
tutorial) for a pipe Reynolds number of 10,000 on the following meshes: 100x5, 100x20 with
uniform spacing in the radial direction. Plot the skin friction cf as a function of axial location for
each grid. Compare the exit value with the expected value for fully developed flow (e.g., see
White pgs. 345-346). Recall that a key question for the integrity of the mesh is the non-
dimensional value of the first nodal point:
This should be either less than 4 (so that you resolve down into the viscous sublayer) or greater
than 30 (where wall functions can accurately compensate for the poorly resolved viscous
sublayer). Intermediate values can lead to greater errors. Calculate the value of y1+ for each
mesh; use that to help explain (briefly) the trends in the agreement that you observe.

Hints

If you no longer have the 100x5 or 100x20 mesh, you can download them here:
pipe100x5.msh,pipe100x20.msh.

Step 4 from old version of fluent

Step 4: Setup (Physics)


If you have skipped the previous mesh generation steps 1-3, you can the file pipe100x30.msh,
then proceed with the flow solution steps below.

Launch FLUENT

Lab Apps > FLUENT 6.3.26

Select 2ddp (2D, double-precision version) from the list of options and click Run.

Import File

Main Menu > File > Read > Case...

Navigate to your working directory and select the pipe100x30.msh file. Click OK.

The following should appear in the FLUENT window:


Check the number of nodes, faces (of different types) and cells. There are 3000 quadrilateral
cells in this case. This is what we'd expect since we used 30 divisions in the radial direction and
100 divisions in the axial direction while generating the grid. So the total number of cells is
30*100 = 3000.

Also, take a look under zones. We can see the four zones inlet, outlet, wall, and that we defined
in centerlineGAMBIT.

Grid

First, we check the grid to make sure that there are no errors.

Main Menu > Grid > Check

Any errors in the grid would be reported at this time. Check the output and make sure that there
are no errors reported. Then select:

Main Menu > Grid > Info > Size

The following summary about the grid should appear:


Let's look at the grid:

Main Menu > Display > Grid...

Make sure all 5 items under Surfaces are selected. Then click Display. Remember that we can
zoom in using the middle mouse button. Zoom in and admire the grid. How many divisions are
there in the radial direction?

Recall that you can look at specific components of the grid by choosing the entities you wish to
view under Surfaces (click to select and click again to deselect a specific boundary). Click
Display again when you have selected your boundaries. Use this feature and make sure that the
boundary labels correspond to the correct geometric entities.

Close the Grid Display Window when you are done.

Define Governing Equations

Main Menu > Define > Models > Solver


Choose Axisymmetric under Space. As in the laminar pipe flow tutorial, we'll use the defaults of
segregated solver, implicit formulation, steady flow and absolute velocity formulation. Click OK.

Main Menu > Define > Models > Energy...

The energy equation can be turned off since this is an incompressible flow and we are not
interested in the temperature. Make sure no tick mark appears next to Energy Equation.

Main Menu > Define > Models > Viscous...

Choose k-epsilon (2eqn). Notice that the window expands and additional options are displayed
on choosing the k-epsilon turbulence model. Under Near-Wall Treatment, pick Enhanced Wall
Treatment so that we may get a more accurate result.

Click OK.
Main Menu > Define > Materials...
Change Density to 1.0 and Viscosity to *2e-5. These are the values in the Problem
Specification. We'll take both as constant.
Click Change/Create.

Define Boundary Conditions

Main Menu > Define > Operating Conditions...

Recall that for all flows, FLUENT uses the gauge pressure internally. Any time an absolute
pressure is needed, it is generated by adding the operating pressure to the gauge pressure. We'll
use the default value of 1 atm (101,325 Pa) as the Operating Pressure.

Click Cancel to leave the default in place.We'll now set the value of the velocity at the inlet and
pressure at the outlet.

Main Menu > Define > Boundary Conditions...

The four types of boundaries we defined are specified as zones on the left side of the Boundary
Conditions Window. Recall that we don't need to set any parameters for the centerline and wall
zones. Verify this by selecting each of these two zones and clicking on Set....

Choose inlet and click on Set.... Enter 1 for Velocity Magnitude. This indicates that the fluid is
coming in normal to the inlet at the rate of 1 meter per second. Select Intensity and Hydraulic
Diameter next to the Turbulence Specification Method. Then enter 1 for Turbulence Intensity
and 0.2 for Hydraulic Diameter. Click OK to set the velocity.
The (absolute) pressure at the outlet is 1 atm. Since the operating pressure is set to 1 atm, the
outlet gauge pressure = outlet absolute pressure - operating pressure = 0. Choose outlet under
Zone. The Type of this boundary is pressure-outlet. Click on Set.... The default value of the
Gauge Pressure is 0. Click Cancel to leave the defaults in place.

Note: Backflow in the Pressure Outlet menu refers to flow entering through an outlet boundary.
This is not likely to happen in this case. So we don't have to set the backflow parameters.

This completes the boundary condition specification. Close the Boundary Conditions menu.

Step 5: Solution
We'll use second-order discretization for the momentum equation, as in the laminar pipe flow
tutorial, and also for the turbulence kinetic energy equation which is part of the k-epsilon
turbulence model.

Main Menu > Solve > Controls > Solution...

Change Discretization for Momentum, TurbulenceKinetic Energy and Turbulence Dissipation


Rate equations to Second Order Upwind (if you do not see all of the equations scroll down to
see them)

The order of discretization that we just set refers to the convective terms in the equations; the
discretization of the viscous terms is always second-order accurate in FLUENT. Second-order
discretization generally yields better accuracy while first-order discretization yields more robust
convergence. If the second-order scheme doesn't converge, you can try starting the iterations with
the first-order scheme and switching to the second-order scheme after some iterations.

Set Convergence Criteria

Recall that FLUENT reports a residual for each governing equation being solved. The residual is
a measure of how well the current solution satisfies the discrete form of each governing equation.
We'll iterate the solution until the residual for each equation falls below 1e-6.

Main Menu > Solve > Monitors > Residual...

Notice that Convergence Criterion has to be set for the k and epsilon equations in addition to the
three equations in the last tutorial. Set the Convergence Criterion to be 1e-06 for all five
equations being solved.

Select Print and Plot under Options. This will print as well plot the residuals as they are
calculated which you will use to monitor convergence.

Click OK.

Set Initial Guess

We'll use an initial guess that is constant over the entire flow domain and equal to the values at
the inlet:

Main Menu > Solve > Initialize > Initialize...

In the Solution Initialization menu that comes up, choose inlet under Compute From. The Axial
Velocity for all cells will be set to 1 m/s, the Radial Velocity to 0 m/s and the Gauge Pressure to
0 Pa. The Turbulence Kinetic Energy and Dissipation Rate (scroll down to see it) values are set
from the prescribed values for the Turbulence Intensity and Hydraulic Diameter at the inlet.

Click Init. Close the Solution Initialization window.

This completes the problem specification. Save your work:

Main Menu > File > Write > Case...

Type in pipe100x30.cas forCase File. Click OK. Check that the file has been created in your
working directory.

Iterate Until Convergence

Solve for 100 iterations first.

Main Menu > Solve > Iterate...

In the Iterate menu that comes up, change the Number of Iterations to 100. Click Iterate.

You'll find that not all residuals have fallen below 1e-6 in 100 iterations. Solve for 200 more
iterations. The solution converges in a total of 229 iterations.
We need a larger number of iterations for convergence than in the laminar case since we have a
finer mesh and are also solving additional equations from the turbulence model.

Save the solution to a data file:

Main Menu > File > Write > Data...

Enter pipe100x30.dat for Data File and click OK. Check that the file has been created in your
working directory.

Step 6: Results
y+

Turbulent flows are significantly affected by the presence of walls. The k-epsilon turbulence
model is primarily valid away from walls and special treatment is required to make it valid near
walls. The near-wall model is sensitive to the grid resolution which is assessed in the wall unit
y+ (defined in section 10.9.1 of the FLUENT user manual). We'll gloss over the details for now
and use the following rule of thumb: select the near-wall resolution such that y+ > 30 or < 5 for
the wall-adjacent cell. Look at section 10.9, Grid Considerations for Turbulent Flow
Simulations, for details.

First, we need to set the reference values needed to calculate y+.

Main Menu > Report > Reference Values...

Select inlet under Compute From to tell FLUENT to use values at the pipe inlet for the reference
values. Check that the reference value for density is 1 kg/m3, velocity is 1 m/s, and coefficient of
viscosity is 2e-5 kg/m-s as given in the Problem Specification. These reference values will be
used to non-dimensionalize the distance of the cell center from the wall to obtain the
corresponding y+ values. Click OK.

Let's plot y+ values for wall-adjacent cells to check how it compares with the recommendation
mentioned above.

Main Menu > Plot > XY Plot...

Make sure that Position on X Axis is set under Options, that 1 is the value next to X, and 0 is the
value next to Y and Z under Plot Direction. Recall that this tells FLUENT to plot the x-
coordinate value on the abscissa of the graph. Pick Turbulence... under Y Axis Function and
select Wall Yplus from the drop down list under that. Since we want the y+ value for cells
adjacent to the wall of the pipe, choose wall under Surfaces.
Click Plot.

As we can see, the wall y+ value is between 1.6 and 1.9 (ignoring the anamolous at the inlet).
Since this is less than 5, the near-wall grid resolution is acceptable.

Save Plot

In the Solution XY Plot Window, check the Write to File box under Options. The Plot button
should have changed to the Write... button. Click on Write.... Enter yplus.xy as the filename and
click OK. Check that this file has been created in your FLUENT working directory.
Centerline Velocity

Under Y Axis Function, pick Velocity... and then in the box under that, pick Axial Velocity.
Finally, select centerline under Surfaces since we are plotting the axial velocity along the
centerline. De-select wall under Surfaces.

Click on Curves... in the Solution XY Plot window. Select the solid line option under Pattern as
shown below. Change Weight to 2. Select the blank option under Symbol. Click Apply and Close.

Turn on grid lines: In the Solution XY Plot window, click on Axes.... Turn on the grid by
checking the boxes Major Rules and Minor Rules under Options. Leave Auto Range checked.
Click Apply. Select Y under Axis and repeat. Click Apply and Close.

Uncheck Write to File. Click Plot.


We can see that the fully developed region starts around x=5m with the centerline velocity
becoming constant at a value of 1.195 m/s. This is quite a bit lower than the value of 2 m/s for
the laminar case. Can you explain the difference based on the physical characteristics of laminar
and turbulent flows?

Save the data for this plot as vel.xy.

Coefficient of Skin Friction

The definition of the skin friction coefficient was discussed in the laminar pipe flow tutorial. The
required reference values of density and velocity have already been set when plotting y+.

Go back to the Solution XY Plot Window. Under the Y Axis Function, pick Wall Fluxes..., and
then Skin Friction Coefficient in the box under that. Under Surfaces, we are plotting the friction
coefficient along the wall. Uncheck centerline surface.

Uncheck Write to File. Click Plot.

We can see that the fully-developed value is 0.0085. Compare this with what you'd expect from
the Moody chart.

Save the data for this plot as cf.xy.

Velocity Profile

We'll plot the axial velocity at the outlet as a function of the distance from the center of the pipe.

Change the plot settings so that the radial distance from the axis is plotted as the ordinate: In the
Solution XY Plot window, uncheck Position on X Axis under Options and choose Position on Y
Axis instead. Under Plot Direction, change X to 0 and Y to 1. For the X Axis Function i.e. the
abscissa, pick Velocity... and Axial Velocity under that.
Since we want to plot this at the outlet boundary, pick only outlet under Surfaces.

Uncheck Write to File. Click Plot.

The axial velocity is maximum at the centerline and zero at the wall to satisfy the no-slip
boundary condition for viscous flow. Compare qualitatively the near-wall velocity gradient
normal to the wall with the laminar case. Which is larger? From this, what can you say about the
relative strengths of near-wall mixing in the laminar and turbulent cases?

Save this plot as profile.xy.

Step 7: Verification & Validation


In order to assess the numerical accuracy of the results obtained, it is necessary to compare
results on different meshes. We'll re-do the calculation on a 100x60 mesh which has twice the
number of nodes in the radial direction as the 100x30 mesh.

File > Read > Case...

Navigate to your working directory elect the pipe100x60.msh file you have created. Click OK.
Display the grid. Check its size.

Finer Mesh Analysis

Repeat steps 4, 5, and 6 of this tutorial with the finer mesh.

When you get to step 6 of the tutorial, plot each of the graphs as described. However, for each of
the plots, overlay the corresponding result for the coarser mesh so that we may compare them. To
do this, after the plotting the finer mesh result, in the Solution XY Plot Window, click on Load
File.... Navigate to your working folder, click on the appropriate filename for the previous result,
eg. vel.xy for centerline velocity, and click OK. Click Plot. You'll see both results plotted in the
same the graphics window.

In the centerline velocity plot above, the white line represents the centerline velocity of the finer
mesh, while the red line represents the velocity of the coarser mesh from before. As we can see,
there isn't too much of a difference between the two plots. Save this plot as vel2.xy.

Now, let's take a look at the coefficient of skin friction. This time, load the cf.xy file to compare
against the plot. This is the coefficient of skin friction plot:

Once again, we can see that due to the fine degree of each mesh, there isn't much difference
between the two plots. Save this plot as cf2.xy. Now, study the velocity of the outlet by plotting
and comparing to the graph in profile.xy.
Once again, the finer mesh in this case doesn't offer much more precision than the coarser mesh.
Save this plot as profile2.xy. Now let's take a look at the YPlus plot.

As we can see, there is a significant increase in the accuracy of the plot from the finer mesh.
Save this plot as yplus2.xy.

You may want to experiment with meshes of other granularities and compare their plots with the
plots saved from the 100x30 and 100x60 meshes.

In Problem 1, we will be looking at the effect of coarse meshes with uniform granularity.
FLUENT - Forced Convection - Problem Specification

Problem Specification

This tutorial shows you how to simulate forced convection in a pipe using ANSYS FLUENT.
The diagram shows a pipe with a heated section in the middle where constant heat flux is added
at the wall. The ambient air is flowing into the pipe from the left with a uniform velocity. We'll
use FLUENT to solve the relevant boundary-value problem and obtain the velocity, temperature,
pressure and density distribution in the pipe. Inputs necessary for the simulation, such as the
velocity at the pipe inlet and heat flux added at the wall, are obtained from one particular
experimental run. Results from the simulation will be compared with corresponding
experimental values. Your fingers might be itching to launch FLUENT and get busy with the
mouse and keyboard. Nevertheless, you will be well-served by reviewing the presentation before
proceeding. That way, you will be better able to apply the solution procedure to new problems.

Simulation Inputs Obtained from Experiment

The following inputs are necessary to specify the domain, boundary conditions and material
properties for the Boundary Value Problem (BVP) that we'll solve using FLUENT. The relevant
BVP is discussed in presentation mentioned above.

Pipe Geometry:
Circular cross-section
Pipe radius = 2.94e-2 m
Pipe length = 6.045 m
Material Properties:
Coeff. of viscosity = 1.787e-5 kg/(m s)
Cp = 1005 J/(kg K)
Thermal conductivity = 0.0266 W/(m K)
Molecular weight = 28.97 g/mole

Inlet:
• u = 30.06 m/s
• v = 0 m/s
• T = 298.15 K
• k = 0.09 m2/s2; epsilon = 16 m2/s3 (These are not measured and are rough guess values)

Outlet:
• Pressure = 97225.9 Pa

Wall:
• Heating between x = 1.83 m and x = 4.27 m
• Wall heat flux = 5210.85 W/m2
• Wall roughness: 0 (assume smooth)
• Wall thickness: 0 (assume negligible)

Ambient conditions:
• Ambient pressure = 98338.2 Pa

Step 1: Pre-Analysis & Start-Up


Since the pipe cross-section is circular and heat is applied in an axisymmetric manner, we'll
assume that the flow is axisymmetric. In cylindrical polar coordinates, this means that the flow
variables depend only on the axial coordinate x and radial coordinate r, and are independent of
the azimuthal coordinate θ. Hence we can model the pipe problem with a rectangular domain.
Here R = radius of the pipe, and L = length of the pipe. Rotating the above rectangle 360 degrees
about the axis will recover the full pipe geometry. The radial direction is label as y in FLUENT.

Start ANSYS FLUENT

We'll run FLUENT within the ANSYS Workbench interface. Start ANSYS workbench:

Start > All Programs > ANSYS 13.0 > Workbench

The following figure shows the workbench window.

On the left hand side of the workbench window, you will see a toolbox full of various analysis
systems. To the right, you see an empty work space. This is the place where you will organize
your project. At the bottom of the window, you see messages from ANSYS.

Note to students : You can skip the geometry and mesh steps. Use the mesh by right clicking herepipe
flow.zip and saving the zip file to a convenient location. Unzip the file (you cannot read in the zip file
directly). After unzipping, you should see a file called pipe_flow.wbpj and a folder called pipe_flow_files.
Read the mesh into Workbench using File > Open. Browse to the pipe_flow.wbpj file and select it. Then
skip toStep 4: Setup (Physics).

Step 2: Geometry
Since our problem involves fluid flow, we will select the FLUENT component on the left panel.

Left click (and hold) on Fluid Flow (FLUENT), and drag the icon to the empty space in the
Project Schematic. Here's what you get:

Since we selected Fluid Flow (FLUENT), each cell of the system corresponds to a step in the
process of performing CFD analysis using FLUENT. Rename the project to Forced Convection.

We will work through each step from top down to obtain the solution to our problem.

In the Project Schematic of Workbench window, right click on Geometry and select Properties.
You will see the properties menu on the right of the Workbench window. Under Advance
Geometry Options, change the Analysis Type to 2D.
In the Project Schematic, double click on Geometry to start preparing the geometry.

At this point, a new window, ANSYS Design Modeler will be opened. You will be asked to
select desired length unit. Use the default meter unit and click OK.

The geometry is a rectangle of length L = 6.045m and height R = 2.94 x 10^-2 m.

Creating a Sketch

Start by creating a sketch on the XYPlane. Under Tree Outline, select XYPlane, then click on
Sketching right before Details View. This will bring up the Sketching Toolboxes.

Click on the +Z axis on the bottom right corner of the Graphics window to have a normal look
of the XY Plane.
In the Sketching toolboxes, select Rectangle. However the cursor near the origin until you sees a
letter P. This means the cursor is coincident with a point, in this case the origin. Then drag the
cursor to draw a rectangle.

Note: You do not have to worry about dimensions for now, we will specify them properly in the
later step.

Modify the Sketch

Since we have a heated section in the middle of the pipe, we need to split the geometry
appropriately. Click Modify tab and select Split. Select two points at the top of the rectangle,
where there will be a heated section. Then select two points at the bottom of the rectangle.

Now we can constraint the lower rectangle with the top of the rectangle. Click Constraints tab,
select Equal Length. Click the appropriate top and bottom edge and set them to be of equal
length. This is shown below:
Dimensions

Under Sketching Toolboxes, select Dimensions tab, use the default dimensioning tools. Then
click on the lines and drag upwards or sideways as the case may be to place the dimensions (V1,
H2, H3, H4). Note: For horizontal dimensioning (shown in H2, H3 and H4), click first on the
horizontal dimension tab under the dimensions tab and then click (turns yellow) on the end
points of the split section lines (H2, H3 and H4). Then click on any point on the y-axis and drag
up. For the vertical dimensioning (V1), click on the vertical dimension tab under the dimensions
tab. Then click on the any point on the x-axis then click on V1 (turns yellow). Then drag V1 to
the left side.

Dimensioning of the geometry is shown below:


Under Details View on the lower left corner, input the value for dimension appropriately. Then
hit enter each time each dimension is entered.
V1: 0.0294 m
H2: 1.83 m
H3: 4.27 m
H4: 6.045 m

At this point, you should see something like this for your sketch:

Now that we have the sketch done, we can create a surface for this sketch.
Then click on Concept tab in the Design modeler window, then click on Surface from sketches.

This will create a new surface SurfaceSK1. Under the Tree Outline, click on the X-Y Plane and
select Sketch1 as Base Objects and under Details View, click Apply. Finally click Generate to
generate the surface.

Remember to save the project: File > Save Project


You can close the Design Modeler and go back to Workbench.

Step 3: Mesh
Save your work in Workbench window. In the Workbench window, right click on Mesh, and
click Edit. A new ANSYS Mesher window will open. We will create a mesh with 200x30
elements along the pipe. This means that we will divide the pipe with 200 elements in axial
direction and 30 elements along the radial direction.

In ANSYS Mesher, make sure that the unit we are working on is meter Metric unit. On the top
menu, click on Units and make sure that Metric (m, kg, N, s, V, A) is selected.

Since we are going to manually specify meshing type and element size, we should turn off
ANSYS build-in advanced sizing function. Under Details of "Mesh", expand Sizing, select Off
next to Use Advanced Size Function.

Meshing Method

We would also like to create a structured mesh where the opposite edges correspond with each
other. Let's insert a Mapped Face mesh. Under Outline, right click on Mesh, move cursor to
Insert, and select Mapped Face Meshing. Alternatively, you can click on Mesh Control on the
third menu and select Mapped Face Meshing. Finally select the pipe surface body in the
Graphics window and click Apply next to Geometry.

Edge Sizing
Now let us move on to specify the element sizing along the pipe radial direction.
Outline > Mesh > Insert > Sizing
In the Graphics window, select both the left and right edge of the geometry (click on the Edgetab
on the Fluid flow Fluent - Mesh window and then press Ctrl + mouse click to multiple select).
Under Details of "Edge Sizing", click Apply next to Geometry. Change the edge sizing
definition Type to Number of Divisions. Enter 30 for Number of Divisions.

Now continue with the sizing in the axial direction.


Outline > Mesh > Insert > Sizing
In the Graphics window, select all the top and bottom edge of the geometry (press Ctrl + mouse
click to multiple select). Under Details of "Edge Sizing", click Apply next to Geometry. Enter
0.03 for Element Size (this will give us roughly 200 divisions). Next to Behaviour, change Soft
to Hard (This is to overwrite the sizing function employed by ANSYS Mesher. Try meshing with
soft behavior and see what you get).

We have specified all the meshing conditions. Click Update on the third menu to see the mesh.

Click on Mesh and look under Details of "Mesh", next to Statistics, you should see that we have
6120 Elements for our mesh.

Create Named Selection

Next, we will name the edges accordingly so that we can specify the appropriate boundary
conditions in the later step. We know the bottom edges of the geometry are the centerline of the
pipe, the left edge is the inlet of the pipe, the right edge is the outlet of the pipe, top side edges
are wall and the top middle edge is the heated wall section. Let's name the edges according to the
diagram below. Remember to click on the Edgetab on the Fluid flow Fluent - Mesh window and
then press Ctrl + mouse click to multiple select the 3 line sections that make up the center line
before naming it.

Select the left edge and right click and select Create Named Selection. Enter Inlet and click OK.
Under Outline, you will see the name Inlet under Named Selections.
Finish naming rest of the edges. Finally, click Update .

Step 4: Setup (Physics)


In the Workbench window, this is what you should see currently in the Project Schematic space.
Double click on Setup which will bring up the FLUENT Launcher. Click OK to select the
default options in the FLUENT Launcher. Twiddle your thumbs a bit while the FLUENT
interface comes up. This is where we'll specify the governing equations and boundary conditions
for our boundary-value problem. On the left-hand side of the FLUENT interface, we see various
items listed under Problem Setup. We will work from top to bottom of the Problem Setup items
to setup the physics of our boundary-value problem. On the right hand side, we have the
Graphics pane and, below that, the Command pane.

Display Mesh

Let's first display the mesh that was created in the previous step.

Problem Setup > General > Mesh > Display...

The long, skinny rectangle displayed in the graphics window corresponds to our solution
domain. Some of the operations available in the graphics window to interrogate the geometry
and mesh are:
Translation: The model can be translated in any direction by holding down the Left Mouse
Button and then moving the mouse in the desired direction.

Zoom In: Hold down the Middle Mouse Button and drag a box from the Upper Left Hand
Corner to the Lower Right Hand Corner over the area you want to zoom in on.

Zoom Out: Hold down the Middle Mouse Button and drag a box anywhere from the Lower
Right Hand Corner to the Upper Left Hand Corner.

Use these operations to zoom in and interrogate our mesh.

You should have all the surfaces shown in the above snapshot. Clicking on a surface name in the
Mesh Display menu will toggle between select and unselect. Clicking Display will show all the
currently selected surface entities in the graphics pane. Unselect all surfaces and then select each
one in turn to see which part of the domain or boundary the particular surface entity corresponds
to (you will need to zoom in/out and translate the model as you do this). For instance, the surface
labeled heated_section should correspond to the part of the wall where heating occurs.

Specify Governing Equations

We ask FLUENT to solve the axisymmetric form of the governing equations.


General > Solver > 2D Space > Axisymmetric

The energy equation is turned off by default. Turn on the energy equation.
Models > Energy - Off > Edit...
Turn on the Energy Equation and click OK.
By default, FLUENT will assume the flow is laminar. Let's tell it that our flow is turbulent rather
than laminar and that we want to use the k-epsilon turbulence model to simulate our turbulent
flow. This means FLUENT will solve for mean (i.e. Reynolds-averaged) quantities at every point
in the domain. It will add the k and epsilon equations to the governing equations to calculate the
effect of the turbulent fluctuations on the mean.

Models > Viscous - Laminar > Edit...

Under Model, select k-epsilon (2 eqn). Since we'll use the default settings for the k-epsilon
turbulence model, click OK.

This is what you should currently see under Models.

Now let's set the "material properties" i.e. properties of air that appear in our boundary value
problem.

Materials > Fluid air > Create/Edit...

Since variations in absolute pressure are small in our pipe, we'll use a constant absolute pressure
in the ideal gas law. This is called the "Incompressible ideal gas" model in FLUENT (it's non-
standard nomenclature). Change the Density (kg/m3) from constant to incompressible-ideal-
gas. The constant absolute pressure to be used in the ideal gas equation is specified later as
Operating Pressure.
The other properties are also functions of temperature. However, we'll use constant values equal
to the average values over temperature range obtained in the experiment. Enter the following
constant values:
Cp (Specific Heat) (j/kg-k): 1005
Thermal Conductivity (w/m-k): 0.0266
Viscosity (kg/m-s): 1.787e-5
Molecular Weight (kg/kgmol): 28.97

Click Change/Create and Close the Create/Edit Materials window.

Specify Boundary Conditions

FLUENT uses gauge pressure internally in order to minimize round-off errors stemming from
small differences of big numbers. Any time an absolute pressure is needed, it is generated by
adding the so-called "operating pressure" to the gauge pressure:
absolute pressure = gauge pressure + "operating pressure"

This "operating pressure" is also used in the "incompressible ideal gas" model as mentioned
above. We will specify the "operating pressure" as equal to the measured ambient pressure since
the absolute pressure in the pipe varies only slightly from this (you do get significant variations
in gauge pressures though).

Boundary Conditions > Operating Conditions...


Enter 98338.2 under Operating Pressure and click OK.

Next we will specify the boundary condition for the centerline.

Boundary Conditions > centerline

Change the Type to axis and click OK. FLUENT will set the flow gradients at this boundary in
accordance with the axisymmetric assumption.

Now let's specify the boundary condition at the walls. By default, FLUENT correctly picks the
Wall boundary type for these boundaries. It will impose the no-slip condition for velocity at these
boundaries. Additionally, for the heated wall section, we need to specify the heat flux into the
flow.

Boundary Conditions >heated_section> Edit...

A new Wall window will open. Click on Thermal tab and enter 5210.85 next to Heat Flux
(w/m2) and click OK.

As discussed in the powerpoint presentation, we need to set:

 velocity and temperature (plus k and epsilon for the turbulence model equations) at the
inlet
 pressure at the outlet

For incompressible flow, the flow adjusts to the pressure at the outlet (consider this as a signal
you are sending the flow about what it needs to do inside the pipe).

Select:
Boundary Conditions > inlet
Note that the boundary Type is automatically set to velocity-inlet. FLUENT has an automatic
mechanism to pick a boundary type according to the name you give and settings that you have
selected previously (this could be dangerous if FLUENT selects the wrong boundary type and a
lackadaisical user doesn't change it.). In this case, it gets it right.

Click Edit... to set up the correct inlet parameters. The Velocity Inlet window pops up. Enter
30.06 next to Velocity Magnitude (m/s). For Turbulent Kinetic Energy (m2/s2), enter value
0.09. For Turbulent Dissipation Rate (m2/s3), enter value 16. Note that k and epsilon are not
measured and are rough guess values. The results should not be sensitive to these inputs since
most of the turbulence is generated in the boundary layers (ideally, you should check the
sensitivity of your calculation to this setting).

Now click on Thermal tab and enter 298.15K for Temperature. Click OK to close the window.

Finally, set up the outlet boundary condition:


Boundary Conditions > Outlet
FLUENT selects the pressure-outlet boundary type and its guess turns out to be right.

Click Edit... to specify the gauge pressure at the outlet. Enter -1112.3 for Gauge Pressure and
click Ok. (From experiment, measured outlet pressure is 97225.9 Pa. Corresponding gauge
pressure = 97225.9 Pa - operating pressure = -1112.3 Pa)
Now FLUENT knows all necessary elements of our beloved BVP (domain, governing equations and
boundary conditions). In the Solution step, we'll prod the beast to obtain an approximate numerical
solution to our BVP.

Step 5: Solution
FLUENT incorporates advanced algorithms for numerically solving our nonlinear BVP. There
are lots of knobs in the Solution menu that you can twiddle to improve your numerical solution
to the BVP. We'll not mess with most of these since the default settings yield an adequate
numerical solution for our problem. We could get a slight improvement in accuracy by fiddling
various knobs which we'll refrain from doing.

Let's now investigate how we can achieve a numerical solution in FLUENT. One must keep in
mind that the governing equations we are attempting to find an approximate solution to are non-
linear. This means that in order for a CFD program, such as FLUENT to solve it, it must go
through an iterative process. This process is briefly described in the flow-chart below.
From the flow chart, we see that we need to provide FLUENT with an initial guess for the flow
variables (velocity, pressure etc.) to start the iterations. We'll also specify the convergence
criterion to let the beast know when to consider the iterative process to have converged to a
solution.

Let's take a peek under:

Solution > Solution Methods

In this case, we are using the first order solvers. (If time permits, try using second order solvers
and determine what kind of difference it makes to the convergence time and the final solution.
This is the one of the first knobs that one twiddles).

To set the convergence criterion identified in the flowchart above , select:

Solution > Monitors > Residuals - Print, Plot > Edit...

We see that we need to provide a convergence criterion for each PDE that is being solved. For
this example, we will use the default values. Also make sure Plot box is checked. This will help
you monitor how/whether the solution is proceeding to convergence. Click OK.

Next, we set the initial guess indicated in the flowchart. The initial guess can be entered using:

Solution > Solution Initialization


For this example, we know the conditions at the inlet of the pipe (except for pressure which is set
to zero gauge by default). Initialize the entire flowfield to the specified values at the inlet: Under
Compute from, select Inlet and click Initialize.

To prevent the computer from iterating indefinitely, we need to set an iterations limit.

Solution > Run Calculation


Enter 500 for Number of Iterations and click Calculate. You will see a window message saying
Calculating the solution... Wait for FLUENT to finish the calculation. You should see a residual
plot on screen as the computation is being performed. It should look something like this:

Now that the computation is completed, we can go check out the results!

Step 6: Results

Please make sure your project is saved in Workbench. Double click on Results in the Project
Schematic window. This will open CFD-Post (the program used to analyze results from
FLUENT computation.) Click on z axis in the triad (at the bottom right of the graphics window)
to get the view along the z-axis.
Overview
You may have noticed in previous sections, that the pipe looks extremely long and thin on the
screen. In fact, due to the axisymmetric assumption, we have only modeled half of a 2D section
through the pipe in our analysis. To be able to make full use of the results, we must:

1) Generate the results for the parameter investigated (e.g. temperature, pressure, velocity).

2) Mirror the result to reflect the result of the full pipe section.

3) Stretch the pipe in the radial direction to better view contours.

The results shown below were obtained with a pipe length of 6.096 which is slightly different
from the current length of 6.045. So your results might be slightly different from those shown
below.

Temperature Contour

Our first challenge is the temperature contour. On the top menu, click on contour . We will be
calling this contour "Temperature Contour", OK when done. On the left hand side, Details of
Temperature Contour will allow you to select parameters relevant to the results we're looking for.
In this example, the Locations is periodic 1, the Variable is Temperature. The number of
contours is a personal preference, in this example, we have selected 100. This step tells CFD-
Post we are looking to plot contours of temperature.
The next step is to mirror the image, this will make the results more intuitive and easier to understand.
From the previous screen, select the View tab. This tab will allow us to adjust the appearance of the
contour plot we have just generated. Check Apply Reflection/Mirroring. Select ZX Plane for Method.
Choosing this option reflects the current model in the ZX plane and allows us to view the "full" pipe
section.

Finally, we stretch the pipe in the radial direction. Select Apply Scale. Enter 30 for y-axis. This
will stretch our model in the y (radial) direction by a factor of 30. Click Apply.
After you click Apply, you will see that under Outline > User Locations and Plots,
Temperature Contour is created. You will also see that the Temperature Contour is plotted in
the Graphics window on the right. Under Outline > User Locations and Plots,
uncheck Wireframe to see just the Temperature Contour in the Graphics window.

You can save the image to a file using the camera icon highlighted below or using the Snipping
Tool in Windows 7 (you can search for it under Start > Programs).

In developing the experiment, it was assumed that by the end of the adiabatic mixing stage, the
flow will be well mixed. Do the results from the numerical solution simulation support this
assumption?

Velocity Vectors
Our next challenge is to produce velocity vectors. This is a very similar process to creating the
temperature contours above. On the top menu, click on vector . Name it "Velocity Vector"
and click OK. Under Details of Velocity Vector, select periodic 1 for Locations. Select Velocity
for Variable. This tells CFD-post we are looking for vector plots of velocity.

In the next step, we will specify the appearance of vector arrows. Select the Symbol tab. Enter
0.05 for Symbol Size. This again is dependent on personal preference.
Finally click Apply. You will see that under Outline > User Locations and Plots, Velocity
Vector is created. Un-check Temperature Contour so that Graphics window shows just the
Velocity Vector plot. You can mirror the plot about the axis as before. You can translate the
model to look at flow development near the entrance. There is a toolbar option at top that puts
you in translate mode. You can click on the z-axis to restore our original view.

The velocity vectors are shown below:

You can zoom in and out and move the contour using the tools right above the contour:
Does the flow become fully developed at the end of the first section?

Centerline Temperature Plot


Now let's look at the temperature variation along the center-line of the pipe. To do this we need
to first create a line corresponding to the center-line:

Insert > Location > Line

Name it "Centerline" and click OK. On the lower left panel, you will see Details of Centerline.
Enter the start and end locations of the line and the sampling frequency. Click Apply.

You will see centerline created under User Locations and Plots.
Insert > Chart
Please name this chart "Centerline Temperature". You will see Details of Centerline
Temperature appear on the lower left.

We'll go through the tabs in the menu to specify the plot that we want. Select the General tab and
name the chart "Temperature Variation along Pipe Axis".

Select the Data Series tab. Change Name and Location.


We want to see the variation of temperature with the length of the pipe. Therefore, temperature
will be on the "y-axis" of the chart and axial position on the "x-axis" of the chart.

Click on X Axis tab. Next to Variable, choose X.

Click on Y Axis tab. Next to Variable, choose Temperature.


Click Apply. You will see Centerline Temperature created under Report in the Outline tab.
Note to Students:
You need to repeat the FLUENT simulation with inputs from YOUR MEASUREMENTS in the
lab. To compare the FLUENT results with experiment, you can export the FLUENT result into
Excel. A sample comparison is shown below.
You can export the FLUENT data in Excel format by clicking on the Export button in "Details of
centerline temperature"
Wall Temperature Plot
We will now plot the temperature variation along the wall. First, create a line corresponding to
the wall.

Insert > Location > Line

Name it "Wall" (with capital W; otherwise you'll get a conflict with a reserved name). On the
lower left panel, you will see Details of Wall. Enter the start and end locations of the line and the
sampling frequency. Click Apply.

You will see wall created under User Locations and Plots.

Insert > Chart

Name this chart "Wall Temperature". You will see Details of Wall Temperature appear on the
lower left panel.

Select the General tab and name the chart "Wall Temperature".

Select Data Series tab. Change the name of the first data series to FLUENT. Under Data
Source, specify Wall as Location.

As before, specify x-axis variable to be X (i.e. axial length along the pipe).
Specify y-axis variable to be Temperature. Click Apply. You should see the following plot.

Note to Students:
You need to repeat the FLUENT simulation with inputs from YOUR MEASUREMENTS in the
lab and compare the FLUENT results for the wall temperature with experiment. A sample
comparison is shown below.
You can export the data by clicking on the Export button, as shown in the previous step.

Pressure Plot
Create a plot of the pressure variation along the centerline of the pipe. Steps for this are similar
to the plot of the centerline temperature that we did earlier.

There is no need to create a new line. We can use the "centerline" created earlier.

Insert > Chart

Follow steps from the Centerline Temperature plot above, making appropriate modifications.
You should see the following plot.
Note to Students:
You need to repeat the FLUENT simulation with inputs from YOUR MEASUREMENTS in the
lab and compare the FLUENT results for the pressure with experiment. A sample comparison is
shown below.
Axial Velocity Profiles
Let's look at the velocity profiles before and after the heated section. To do this, we need to first
create lines at x=1.83 m ((start of heated section), x=4.27 m (end of heated section) and x=6.045
m (end of mixing section).

First, create the line at x=1.83 m.

Insert > Location > Line

Name it "x183" and click OK. Enter the following coordinates (0.0294 m is the pipe radius).

Point 1 (4.27,0,0)
Point 2 (4.27,0.0294,0)

Enter 100 for Samples. Click Apply.

Similarly create lines at x=4.27 m and x=6.045 m.

Insert > Chart


Name this chart "Axial Velocity Profiles".

Select the General tab and name the chart "Axial Velocity Profiles".

Select Data Series tab. Change the name of the first data series to x=1.83 m. Under Data Source,
specify x183 as Location.

Add a new data series by clicking on the "New" icon as shown below and repeat the above steps
but for x=4.27 m.

Add a third data series by clicking on the "New" icon and repeating the steps for x=6.045 m. You
should then have three items in the Data Series tab.

Specify x-axis variable: Velocity u

Specify y-axis variable: Y

Complete the plot. Here's what we get.


We notice that the flow accelerates due to the heating. As air is heated, its density decreases. So
the velocity has to increase to maintain the same mass flow rate.

Temperature Profiles
Similarly, one can look at the temperature profiles before and after the heated section.

Duplicate the Axial Velocity Profiles chart by right-clicking on the plot name in the "tree" on the
upper left. Rename it as "Temperature Profiles".
Double-click on "Temperature Profiles" in the tree view to edit its properties. This should be just
below "Axial Velocity Profiles" in the list.

Change the title and x-axis variable (to Temperature). Click Apply. Here's what we get.
This plot shows that:

 the temperature increases in the heated section

 the temperature is much higher near the wall in the heated section

 the temperature is nearly uniform at the end of the mixing section


All these trends are as expected.

Input Summary
You can view the input summary (model, material properties, boundary conditions, etc) by
clicking on Report in the menu on the top. A small window will pop up and you can print the
selected input summary directly in FLUENT.
Step 7: Verification & Validation
Verification and validation is a formal process for checking results. Each of these terms has a
specific meaning which we won't get into here. We'll act like high-priced consultants and do the
bare minimum: we'll refine the mesh and make sure that the results are nearly independent of the
mesh.

Note to Students:
Comparison with the experimental measurements is another way you'll check the FLUENT results.

Refine Mesh

Let's repeat the solution on a finer mesh with smaller cells. In workbench, under Forced
Convection project, right click on Fluid Flow (FLUENT) and click duplicate. Rename the
duplicate project to Force Convection Refined Mesh. You should have two project cells in
workbench.
Double click on Mesh for Forced Convection Refined Mesh. The ANSYS Mesher window will open. Under
Outline, expand mesh tree and click on Edge Sizing.

Highlight "Edge Sizing". Under Details of "Edge Sizing", increase Number of Divisions to 50.
This will refine the mesh in the radial direction.

Highlight "Edge Sizing 2". Under Details of "Edge Sizing 2", decrease Element Size to be 0.02.
This will refine the mesh in the axial direction.

Click Update to generate the new mesh. If you highlight Mesh in the tree and expand
Statistics, you will notice that the number of elements has increased to about 12,800, compared
to 5508 of the original mesh.
Close the ANSYS Mesher and go back to Workbench window. Under Forced Convection Refined Mesh,
right click on Fluid Flow (FLUENT) and click Update. Wait for a few minutes for FLUENT to obtain a
solution on the new mesh and update all the results.
We would want to compare the solution on the two meshes. To do that, drag the Solution cell of Forced
Convection Refined Mesh to Results cell of Forced Convection.
Finally, double click on Results cell of Forced Convection to compare the results on the two
meshes. Select the Chart Viewer tab near the bottom of the graphics window. Double-click on
Centerline Temperature in the Tree view to see the updated results (pretty sweet, huh?).

The red line corresponds to the refined mesh. Similarly, one can check wall temperature variation
on the two meshes.
Refining the mesh doesn't change the wall temperature much but the centerline temperature
changes a fair bit. So another level of mesh refinement would be wise
ANSYS WB - 2D Steady Convection - Problem Specification
Problem Specification

A fluid enters a pipe of radius 0.06 meters at a constant velocity of 0.1 m/s. The fluid has a
density of 1.2 kg/m^3, a thermal conductivity of 0.02 W/mK, a specific heat of 1000 J/kgK, and
a viscosity of 1.8e-5 kg/ms. The first 5.76 meters of the pipe are isothermal, held at 300 K. The
remaining 2.88 meters of the pipe have a constant heat flux of 37.5 W/m^2 added at the wall.

Using ANSYS FLUENT, simulate the above flow. Calculate and plot the velocity, temperature,
pressure and Nusselt number variation in the pipe.

Pre-Analysis & Start-Up

Boundary Value Problem


We will assume that the flow is axisymmetric. This means that in cylindrical coordinates (r, θ, z),
there is no variation in the circumferential direction (θ). So the geometry in the simulation is a
rectangle as shown below. Revolving the rectangle 360 degrees about the axis gives the full 3D
pipe geometry. We need to solve a boundary value problem. The governing equations for this
problem are conservation of mass, conservation of momentum (in r and z directions), and
conservation of energy. The governing equations and boundary conditions are shown below. We
will solve this boundary value problem numerically using the ANSYS FLUENT solver.
Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going to


Start > ANSYS > Workbench.

Setup Project

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of
the start up window, you will see the Toolbox Window. Take a look through the different
selections. We will be using FLUENT to complete the simulation. Load the Fluid Flow
(FLUENT) box by dragging and dropping it into the Project Schematic.

Right click the top box of the project schematic and go to Rename, and
name the project 2D Steady Convection.You are ready to create the geometry for the
simulation.
Geometry
Overview

The geometry is created in the following steps:

-Sketch: Sketch the rectangle

-Split edges: Split the horizontal edges to demarcate the unheated and heated sections.

-Dimension edges

-Create "Surface Body": Create a "Surface Body" from the sketch. This is analogous to, say,
extruding a sketch to create a 3D body. We always go from a "sketch" to a "body" in
DesignModeler. Here the "body" is 2D and referred to idiosyncratically as "Surface Body".

Specify Geometry as 2D

First, we need to specify that the geometry is 2-dimensional. Right click the Geometry box
and select Properties. This will open the Properties of Schematic A2: Geometry
Window. Under Advance Geometry Options change Analysis Type from 3D to 2D.
After the analysis type has been set, you can dismiss the Properties window. We are now ready
to launch DesignModeler, the drawing tool in ANSYS. Open DesignModeler by double-clicking
the geometry box . Twiddle your thumbs until the DesignModeler window
comes up. You will be prompted to choose a standard unit of measurement. Select Meter as the
standard unit, and click OK.

Sketching

We want to sketch on the XY plane. To look at the XY plane, click the positive Z-Axis on the
compass in the Graphics window.
Look to the left and you'll see the Tree Outline window. To sketch on the XY plane, highlight
XYPlane in the Tree Outlinewindow.To begin sketching, click on the Sketching tab at the bottom
of the Tree Outline window. To draw our domain, we will use the Rectangle tool. Click on
in the Sketching Toolboxes window. In the blue graphics window, draw the
rectangle by first clicking on the origin (make sure the P icon is showing, meaning the cursor is
coincident with a "P"oint, in this case the origin). Then select a point in the 1st quadrant.

Because the wall has two sections, an isothermal section and a heated section, we will need to
split the upper edge. To split the edge, select the Modify tab in the Sketching Toolboxes window,
and select . Next, click any point along the upper surface of the rectangle. This will
split the line into 2 segments.
It turns out that to get a nice regular mesh, the bottom edge should also be split in the same way.
So split the bottom edge as well (don't worry about the location, we'll adjust that next).

Now we will make the second segment of each edge to be of the same length (this will
automatically ensure that the first segments are also of the same length). Go to the Constraints
tab and select "Equal Length." Click on the top, right partition first. Then click on the bottom
right partition. This will make these segments the same length ensuring that both the top and
bottom edges are split at the same location. If you made a mistake,there is an undo button at the
top left (caveat: this undo button works only in the sketching mode).

Dimensioning

The next step in creating the domain will be adding dimensions. In the Sketching Toolboxes
window, select Dimensions > General. First, click the left segment of the upper edge of the
rectangle, then drag the cursor to place the dimension above the line. Repeat this process for the
right segment of the upper edge. Last, dimension the left edge as shown below.
We can set the dimension in the Details View window. In the Details View window, change H1 to
5.76, H2 to 2.88, and V3 to .06. You can zoom in/out using the middle mouse wheel. You can
move the dimensions by selecting Dimensions > Move and then dragging the labels by grabbing
them with the mouse.

Surface from Sketches

Recall that we need to create a 2D "Surface Body" from the sketch. To accomplish this, look to
the top menu and select Concept > Surfaces From Sketches.

Next, click any edge on the sketch in the Graphics window. This will select the corresponding
sketch. In the Details View window, select Base Objects > Apply. Now the program knows from
which sketch to create the surface.
Click Generate to create the surface. The geometry of the domain, if you have
followed the tutorial successfully, should look like this:

Save the project by selecting File > Save Project from the main menu. Close DesignModeler. We
are ready to move on to the meshing step.

Mesh
Launch the Mesher

Now that we have completed creating the geometry of the domain, we are ready to mesh it. The
meshing step chops up the domain into little chunks called cells or elements. The solver
approximates the governing equations and/or boundary conditions on each of these chunks. The
end result is a large system of simultaneous algebraic equations which we hand over to the
computer to solve.

Return to the Project Schematic Window. In this window, double click the Mesh box
to launch the mesher.
Twiddle your thumbs and try to avoid checking facebook while the meshing application
launches. If a Meshing Options window shows up to the right, you can dismiss it.

Mapped Face Meshing

First we will apply "mapped face meshing" to get a regular mesh. In the Outline window, click
in the tree. This will show the meshing options in the main menu bar (look just above
the tree outline). In the meshing options, select Mesh Control > Mapped Face Meshing.
In the Graphics window, click on the rectangle to select it, then in the Details window, click
Geometry > Apply.

This will apply "Mapped Face Meshing" to the rectangle which will yield a regular mesh.

Edge Sizing

We will control the mesh size by specifying the size of the divisions to be used on the edges of
the rectangle. To create the edge sizings, make sure Mesh is highlighted in the tree. Then select
Mesh Control > Sizing.
We'll be applying the sizing in meters. So check that the units are set to Metric (m, kg ...).

Since we'll be applying the sizing to edges, select the edge selection filter by clicking on it.
Select Zoom to Fit as shown in the snapshot below to fit the entire geometry in the graphics
window. Hold down the left mouse button and drag over the four horizontal edges (two top and
two bottom). The surfaces will be highlighted in green when they've been selected.

In the details window, select Geometry > Apply. Now the mesher knows which edges to apply
the sizing to. Ensure that Type is set to Element Size, then change the Size from Default to 0.05
m as shown below. This will set each division size on the corresponding edges to 0.05 m. (If we
want a finer mesh, we would input a smaller size.)
Now, we will create an edge sizing for the vertical edges of the geometry. Create another edge
sizing, and this time, choose the left and right vertical edges of the geometry by holding down
the Ctrl key and selecting each of them, and go to Geometry > Apply. Change the Type to
Number of Divisions. Next, specify Number of Divisions to 30. Note that one can specify the
Element Size or Number of Divisions depending on which is more convenient.

Generate the Mesh

In the Mesh context menu, Mesh > Generate Mesh.

The generated mesh should now be seen. (If you don't see it at first, select in the tree
outline to show the generated mesh). You can zoom in/out using the middle mouse wheel. We see
that ANSYS decreases the mesh size near the entrance since it sees a corner. This is fine for our
case since this will better resolve the rapidly developing boundary layer near the entrance. So we
won't override this.

Named Selections

Next, we will have to specify names of different portions of the geometry to use in FLUENT to
define boundary conditions. Make sure the Edge Selection Filter is selected before
proceeding.
Inlet

Select the left, vertical edge of the geometry with a left mouse click - it should highlight green.
Right click, and select Create Named Selection. Name the selection Inlet. Click OK once
finished.

Centerline

Next, we will specify the axis/centerline of the pipe. Select the bottom surface of the pipe, and
create a named selection. Name it Centerline.

Isothermal Wall

We will now specify the portion of the wall that is isothermal. Select the left portion of the upper
surface of the pipe. Create a named selection and call it Isothermal Wall.

Heated Wall

We will now specify the portion of the wall that is heated. Select the right portion of the upper
surface of the pipe. Create a named selection and call it Heated Wall.

Outlet

Finally, we will specify the outlet of the pipe. Select the right, vertical edge of the pipe. Create a
named selection, and call it Outlet.

Click here to enlarge


Click to update all the changes made in the mesher.
We are done with the mesh creation, so we can now save the project, and close the mesher.

Setup (Physics)

The geometry and the mesh have been set up to solve the problem using FLUENT but a few
things need to be considered before we proceed.

Double Precision

Both single and double precision versions of FLUENT are available in workbench. Although
single precision is sufficiently accurate in most cases, the disparate length scale in our model
(long, thin pipe) may create large round-off error. Hence, we will use double precision to reduce
this error.

Axisymmetric

When Axisymmetric is selected, FLUENT transforms the Cartesian coordinates to cylindrical


polar coordinates. The gradient in the axis symmetric model now becomes:

Material Properties

The values entered in material properties will be applied to the constants in the governing
equations.

Operating Condition

The absolute pressure is defined as the sum of the gauge pressure and the reference pressure:

In FLUENT, the reference pressure can be specified under operating condition. By default, the
operating condition is 1 atm.
Open FLUENT

Make sure a check mark appears next to the mesh panel in workbench. Double click Setup
to open FLUENT.

Initial Settings

Before FLUENT launches, we will be prompted to set some options. In Options check the box
next to Double Precision. The default processing option is Serial. In this tutorial, we will use the
Serial option to solve the 2D convection problem. If you have a dual processor, you can set the
option under Processing Options to Parallel, and change the Number of Processes to 2.

Once the options are set, click OK.

Problem Setup - General

Now, FLUENT should open. We will begin setting up some options for the solver. In the left
hand window (in what I will call the Outline window), under Problem Setup, select General.
The only option we need to change here will address the fact that pipe domain we created is
axisymmetric. Under 2D Space, click the radio box next to Axisymmetric.
Models

In the outline window, click Models. We will need to utilize the energy equation in order to solve
for the temperature. Under ModelshighlighEnergy - Off and click Edit.... Now, the Energy
window will launch. Check the box next to Energy Equation and hit OK.

Materials

In the Outline window, highlight Materials. In the Materials window, highlight Fluid, and click
Create/Edit.... this will launch the Create/Edit Materials window; here we can specify the
properties of the fluid. Set the Density to 1.2, the Specific Heat to 1000, the Thermal
Conductivity to .02, and the Viscosity to 1.8e-5.

click here to enlarge

Once finished, click Change/Create, then Close.

Boundary Conditions

Now we will specify the boundary conditions governing the problem. In the Outline window,
highlight Boundary Conditions.

Operating Conditions

The default operating pressure in FLUENT is 1 atm, which is 101325 Pa. We can equate the
operating pressure to the absolute pressure by setting the gauge pressure to zero.
Centerline

Under Zone, highlight Centerline. Change the Type to axis. Confirm you are changing the
selection, then leave the name as the default centerline.

Heated Wall

Under Zone, highlight heated_wall. The Type should have defaulted to wall. Next, click Edit....
Click the Thermal tab, and select the Heat Flux radio button. Change the Heat Flux (w/m2) to
37.5. Click OK.

Inlet

Under Zone, highlight inlet. The Type should have defaulted to velocity-inlet. Next, click Edit....
In the Momentum tab, change the Velocity Specification Method to Components, and specify the
Axial Velocity to 0.1. Click OK

Isothermal Wall

Under Zone, highlight isothermal_wall. The Type should have defaulted to wall. Next, click
Edit.... Click the Thermal tab, and select the Temperature radio button. Change the
Temperature (k) to 300. Click OK.

Outlet

Under Zone, highlight outlet. The Type should have defaulted to pressure-outlet. Next, click
Edit.... In the Momentum tab, ensure the Gauge Pressure is 0. Click OK.

Reference Values

In the Outline window, select Reference Values. Under Compute From, select Inlet. Ensure that
the values displayed are the values we specified. We are now ready to setup the solution.

Solution
Solution Methods

In the Outline window, select Solution Methods to open the Solution Methods window. Under
Spatial Discretization, change the option under Momentum from First Order Upwind to Second
Order Upwind. Under Energy, also change the option to Second Order Upwind.
Monitors

In the Outline window, click Monitors to open the Monitors window. In the Monitors window,
select Residuals - Print,Plot and press Edit.... This will open the Residual Monitors window. We
want to change the convergence criteria for our solution. Under Equation and to the right of
Continuity, change the Absolute Criteria to 1e-6. Repeat for x-velocity, y-velocity, and energy,
then pressOK.

Solution Initialization

In the Outline window, select Solution Initialization. We need to make an "Initial Guess" to the
solution so FLUENT can iterate to find the final solution. In the Solution Initialization window,
under Compute from, select Inlet from the drop down box. Check to see that the values that
generate match our inputted values, then press Initialize
Run Calculation

In the Outline window, select Run Calculation. Change the Number of Iterations to 200.
Double click Calculate to run the calculation. After the calculation is complete, save the project,
and you may close the solver.

Results
Open the Post Processor

In the Project Schematic double click Results to open the post processor. When the A6: Fluid
Flow (FLUENT) - CFD - Post Window opens, look at the geometry by clicking the +Z axis on
the compass

Velocity Vectors

In the Post Processing window, click the Vector icon to create a vector result. When
prompted, name the result Velocity Vector. In the Details of Velocity Vector window, begin on
the Geometry tab. Under Locations, select Periodic 1. This will show the velocity along the
entire geometry surface periodically. Next, click on the Symbol tab. Change the Symbol Size to
0.1. Finally, move to the View tab. We want to see the entire geometry of the pipe: not just half
of it like we currently see. To see the whole pipe, check the box next to Apply
Reflection/Mirroring, and change the Method to ZX Plane. Because the pipe is long and skinny,
it will be difficult to see the results. This post processor allows us to stretch the results to make
the results easier to see. To apply a scaling, check the box next to Apply Scale, and change the
Scale to 1,10,1 (this will scale the y-direction by 10). When finished, press Apply to see the
result. If you wish to see the result without the wireframe of the pipe, uncheck the box next to
Wireframe under User Location and Plots.
Velocity Contour

In the Post Processing window, click the Contour icon to create a Contour result. When
prompted, name the result Velocity Contour. In the Details of Velocity Contour window, begin
on the Geometry tab. Under Locations, again select Periodic 1. Also, change the Variable to
Velocity. Next, move to the View tab. Check the box next to Apply Reflection/Mirroring, and
change the Method to ZX Plane and again,check the box next to Apply Scale, and change the
Scale to 1,10,1. When finished, press Apply to see the result. Finally, we need to remove the
Velocity Vectors from the Graphic Window. Do this by unchecking the box next to Velocity
Vector in the Outline window under User Location and Plots.
Temperature Contour

In the Post Processing window, click the Contour icon to create another Contour result. When
prompted, name the result Temperature Contour. In the Details of Temperature Contour
window, begin on the Geometry tab. Under Locations, select Periodic 1. This time, change the
Variable to Temperature. Next, move to the View tab. Apply the same mirroring and scaling as
we did for the Velocity Contours. When finished, press Apply. Uncheck the box next to Velocity
Contour to only see the Temperature Contours.
Pressure Contour

Create another contour result, and name Pressure Contour. Use all of the same settings as the
previous results but this time choosing Variable > Pressure in the Geometry tab.
Graph of Temperature along Centerline

To graph the temperature along the centerline, we first need to create the centerline as a path. To
accomplish this, click on the Location icon , select Line, and name the line
Centerline. In the Details of Centerline window, set the Method to two points. Point 1 is
(0,0,0), and Point 2 is (8.64,0,0). Enter these values into the details window. Next, change the
number of Samples to 100. Press Apply once finished.
To create a chart, press the chart icon . When prompted, name the page Temperature Along
Centerline. In the Details of Temperature Along Centerline window, begin on the General tab.
In the Title, enter Temperature Along Centerline. Next, click on the Data Series tab. Under
Data Source, in the drop down menu next to Location, select Centerline. Now move to the X
Axis tab. In the drop down menu next to Variable, scroll all the way down and select X. In the Y
Axis tab, change the Variable to Temperature. when finished, press Apply to see the chart.

Graph of Temperature along Outlet

To graph the temperature along the outlet, we need to create the outlet as a path much like we did
with the centerline. Click on the Location icon , select Line, and name the line
Outlet. In the Details of Centerline window, set the Method to two points. Point 1 is (8.64,0,0),
and Point 2 is (8.64,0.06,0). Enter these values into the details window. Next, change the number
of Samples to 100. Press Apply once finished.
Next, press the chart icon . When prompted, name the page Temperature Along Outlet. In
the Details of Temperature Along Outlet window, begin on the General tab. In the Title, enter
Temperature AlongOutelt. Next, click on the Data Series tab. Under Data Source, in the drop
down menu next to Location, select Outlet. Now move to the X Axis tab. In the drop down menu
next to Variable, and select Temperature. In the Y Axis tab, change the Variable to Y. when
finished, press Apply to see the chart.
Graph of Nusselt Number along the heated section of the pipe

The Nusselt number is a non-dimensional parameter that provides a measure of the convection
heat transfer at a surface. It is the ratio of convection to pure conduction heat transfer. We will
now derive the Nussult number as a function of the given parameters and temperature.
The convection heat transfer at the pipe wall is:

We can rearrange terms to find an expression for h, the convection coefficient:

Substitute the convection coefficient expression into the Nusselt Number expression:

where
h is the convection coefficient.
k is the thermal conductivity.
L is the length scale. Similar to the Reynold's Number, the length scale is the diameter of the pipe
for an internal pipe flow.
q''_w is the heat flux at the heated surface, 37.5 W/m^2.
Tw is the pipe wall temperature at a given location along the pipe.
Tm is the mean temperature in the pipe at the location where Tw is defined.

To find the temperature at the wall, click on insert>>location>>point, and name it Tw exit. In
the Details of Tw exit window, set Method to XYZ and enter (8.64, 0.06, 0) in Point. Click Apply
to create a point at the upper right corner of the pipe. Click on Expression right below
and right click in the window to create a new expression named Tw. Under Details
of Tw panel, enter probe(Temperature)@Tw exit in the Definition tab. Tw now gives the
temperature at the location (8.64, 0.06, 0), which is on the exit pipe wall.
To find the mean temperature at a given location in the pipe, click on insert>>location>>line,
and name it exit. In the Details of exit window, set Method to Two Points and enter (8.64, 0, 0)
for Point 1 and (8.64, 0.06, 0) for Point 2. Click Apply to create a line at the exit of the pipe. The
mean temperature is the area weighted average temperature and we can use integral to find the
appropriate mean Temperature:

Click on the Calculators tab and double click on Function Calculator. Select lengthInt for the
Function, exit for the Location, and Velocity u for the Variable. Check show equivalent
expression and click Calculate. The expression "lengthInt(Velocity u)@exit is essentially the
integral of u*dr and can be conveniently used to calculate the mean temperature.
Under Expressions, right click in the window to create a new expression and name it Tm. In the
Details of Tm window, enter the following:

lengthInt(Velocity u*Y*Temperature)@exit/lengthInt(Velocity u*Y)@exit

This expression will now give the mean temperature at the location in which we called "exit".
Recall the pipe radius r is defined in the Y direction in FLUENT. Hence we will use Y to define
the radial position in the pipe, as shown in the expression above.

We are now ready to find the Nusselt Number. Create another expression and name it Nu exit.
Under the Definition tab, enter the Nusselt Number expression shown in the equation above. The
units are entered in square brackets, this is done to ensure the expression for the Nusselt Number
is dimensionless.

We would like to compare the Nusselt Number along the heated section of the pipe. We can
generate the Nusselt Number at a different location by simply changing the x-coordinate of exit
and Tw exit, which we defined earlier. Once the new coordinates defined in exit and Tw exit are
updated, the associated expression Tw, Tm, and Nu exit will be updated automatically.

We can expect a maximum and dominant convection heat transfer at the entrance of the heated
section of the pipe. The convection heat transfer raises the temperature inside the pipe, as well as
mean temperature, along the downstream direction. The mean temperature near the exit is higher
relative to the entrance and therefore a lower convection heat transfer is expected at the exit.
Again, the Nusselt Number is a measure of convection heat transfer relative to conduction heat
transfer. Thus we should expect the Nusselt Number to decrease along the length of the pipe.

To export the data, click on the "export" button. Comma Seperated Value (.csv) is able to be read
by matlab and Excel, so it should be fine.

We are now ready to validate and verify our results.

Verification & Validation


Create Another Instance of the Project

Return to the Project Schematic Window. Right click on the Fluid Flow (FLUENT)box
, and select Duplicate. This will create another instance of the project.
When the duplicate box generates, rename it Refined Mesh
Refine the Mesh

Open up the mesher of the newly created project by double clicking box of
Refined Mesh. We want to refine the mesh by increasing the number of elements. To accomplish
this, expand Mesh in the Outline window, and click Edge Sizing. If you followed the tutorial,
this should be an element sizing of the horizontal lines of the domain. Decrease the Element Size
from 0.1 to .025. Next, click Edge Sizing 2, the divisional edge sizing of the outlet and inlet.
Increase the Number of Divisions to {{80)) divisions. In the menu bar, select Mesh > Generate
Mesh. After the Mesh Generates, close the mesher.

Connect The Unrefined Mesh's Solution

Return to the project schematic. We want to be able to compare the Unrefined Mesh's results to
those of the Refined Mesh. To accomplish, click and drag the Solution Box
of the 2D Steady Convection project instance to the Results Box of
the Refined Mesh Project instance. See the picture below for clarification.

Next, press to update the project.

View Results

Next, open the Post Processor of the Refined Mesh project instance by double clicking
. In the Outline, select the Temperature Along Centerline chart we made earlier.
Next, In the Details of Temperature Along Centerline window, go to the Line Display tab. You
should see there are two data series on the graph. Select Series 1 for Refined Mesh, change Line
Style to Dot, and press Apply. You should now see two plotted lines on the plot, as below.
Repeat this process for the Temperature Along Outlet chart.
Because the data does not diverge as we refine the mesh, we have validated our results. We are
done with the simulation.
FLUENT - Flat Plate Boundary Layer - Problem Specification

Problem Specification

Consider a fluid flowing across a flat plate, as illustrated above. Obtain the velocity and pressure
distribution when the Reynolds number based on the plate length is 10,000. This Reynolds
number is obtained by using the following settings. The plate length is 1 m. The incoming fluid
is flowing in the x-direction with a velocity of 1 m/s. The density of the fluid is 1 kg/m^3 and the
viscosity is 1 x 10 ^(-4) kg/(m-s). Note that these values are not necessarily physical. They have
been picked to yield the desired Reynolds number.

Check your results by comparing the velocity and pressure distribution with classical boundary
layer theory.

Step 1: Pre-Analysis and Start-Up


Pre-Analysis

For an external flow like this, one needs to determine where to place the outer boundary. A
rectangular domain will be used for this simulation. The height of the rectangular domain will be
determined by the expected boundary layer thickness. For a flat plate boundary layer, one can
use the following approximation to find the boundary layer thickness.

When x = L, = 0.05m. The height of the domain will be set to ten times the boundary layer
thickness. Thus, the height of the boundary will be set to 0.5m. The following figure shows the
dimensions of the domain, and the boundary labels which will be used to set the boundary
conditions.
Start ANSYS FLUENT

Prior to opening ANSYS, create a folder called FlatPlateCFD in a convenient location. We'll use
this as the working folder in which files created during the session will be stored. For this
simulation FLUENT will be run within the ANSYS Workbench Interface. Start ANSYS
Workbench:

Start> All Programs>Ansys 12.1> Workbench

The following figure shows the workbench window.


Step 2: Geometry
Care to skip the geometry and meshing steps? README
If you would prefer to skip the geometry and mesh steps, then you can download the necessary files
hereFlat plate CFD. Download the "zip" file, then extract the files to your working directory. In order
to load the necessary files, go to the Workbench Project Page, then (Click) File > Open >
"FlatPlateFlow.wbpj". Lastly, click here to skip ahead to Step 4 of the tutorial.

Saving

It would be of best interest, to save the project at this point. Click on the "Save As.." button,
, which is located on the top of the Workbench Project Page. Save the project as
"FlatPlateFlow" in your working directory. When you save in ANSYS a file and a folder will be
created. For instance if you save as "FlatPlateFlow", a "FlatPlateFlow" file and a folder called
"FlatPlateFlow_files" will appear. In order to reopen the ANSYS files in the future you will need
both the ".wbpj" file and the folder. If you do not have BOTH, you will NOT be able to access
your project.

Fluid Flow(FLUENT) Project Selection

On the left hand side of the workbench window, you will see a toolbox full of various analysis
systems. To the right, you see an empty work space. This is the place where you will organize
your project. At the bottom of the window, you see messages from ANSYS. Left click (and hold)
on Fluid Flow (FLUENT), and drag the icon into the empty space in the Project Schematic.
Your ANSYS window should now look comparable to the image below.

Since we selected Fluid Flow(FLUENT), each cell of the system corresponds to a step in the
process of performing CFD analysis using FLUENT. Rename the project to "FlatPlate". We will
work through each step from top down to obtain the solution to our problem.

Analysis Type

In the Project Schematic of the Workbench window, right click on Geometry and select
Properties, as shown below.
The properties menu will then appear to the right of the Workbench window. Under Advance Geometry
Options, change the Analysis Type to 2D as shown in the image below.
Launch Design Modeler
In the Project Schematic, double click on Geometry to start preparing the geometry. At this
point, a new window, ANSYS Design Modeler will be opened. You will be asked to select
desired length unit. Use the default meter unit and click OK.

Creating a Sketch

Start by creating a sketch on the XYPlane. Under Tree Outline, select XYPlane, then click on
Sketching right before Details View. This will bring up the Sketching Toolboxes.

Click Here for Select Sketching Toolboxes Demo


Click on the +Z axis on the bottom right corner of the Graphics window to have a normal look
of the XY Plane.

Click Here for Select Normal View Demo

In the Sketching toolboxes, select Rectangle. In the Graphics window, create a rough rectangle
by clicking once on the origin and then by clicking once somewhere in the positive XY plane.
(Make sure that you see a letter P at the origin before you click. The P implies that the cursor is
directly over a point of intersection.) At this point you should have something comparable to the
image below.

Dimensions

At this point the rectangle will be properly dimensioned. Under Sketching Toolboxes, select
Dimensions tab, use the default dimensioning tools. Dimension the geometry as shown in the
following image.

Click Here for Higher Resolution

Under the Details View table (located in the lower left corner), set V1=0.5m and set H2=1m, as
shown in the image below.
Surface Body Creation

In order to create the surface body, first (Click )Concept> Surface From Sketches as shown in
the image below.

This will create a new surface SurfaceSK1. Under Details View, select Sketch1 as Base Objects.
Finally, click Generate to generate the surface.

At this point, you can close the Design Modeler and go back to Workbench Project Page. Save
your work thus far in the Workbench Project Page.

Step 3: Mesh
In this section the geometry will be meshed with 3000 elements. That is, the field will be divided
into 50 elements in the x direction and 60 elements in the y direction.
Launch Mesher

In order to begin the meshing process, go to the Workbench Project Page, then (Double Click)
Mesh.

Default Mesh

In this section the default mesh will be generated. In order to generate the default mesh first click
on Mesh, then click on Update as shown in the image below.

You should then obtain the following mesh.

Mapped Face Meshing

For this particular problem, we are interested in creating a grid style of mesh that can be mapped
to a rectangular domain. This meshing style is called Mapped Face Meshing. In order to
incorporate this meshing style (Click) Mesh Control > Mapped Face Meshing as can be seen
below.
Now, the Mapped Face Meshing still must be applied to the geometry. In order to do so, first
click on the surface body(filled rectangle), which should then highlight green. Next, (Click)
Apply in the Details of Mapped Face Meshing table, as shown below.

Now, generate the mesh by clicking Update.

Edge Sizing

The desired mesh has a specific number of divisions in the x direction and a specific number of
divisions in the y direction. In order to obtain the specified number of divisions Edge Sizing
must be used. The divisions in the x direction will be specified first. Now, an Edge Sizing needs
to be inserted. First, (Click) Mesh Control > Sizing as shown below.
Now, the geometry and the number of divisions need to be specified. First (Click) Edge
Selection Filter, . Then hold down the "Control" button and then click the bottom and top
edge of the rectangle. Both sides should highlight green. Next, hit Apply under the Details of
Sizing table as shown below.

Now, set Type to Number of Divisions as shown in the image below.


Then, set Number of Divisions to 50 as shown below.

Next, set the Behavior to Hard as shown in the image below. This step will disable the ANSYS
Mesher from overwriting any of our edge sizing specifications.

At this point, the edge sizing in the the y direction will be specified. Follow the same procedure
as for the edge sizing in the x direction, starting first by selecting (Click) Mesh Control > Sizing.
Select only the left side instead of the top and bottom and set the number of divisions to 60.
Remember to set the Behavior to Hard. Then, click Update to generate the mesh with the new
specifications. You should obtain the following mesh.

Your mesh should now have 3,000 elements (50x60). In order to check how many elements your
mesh has, expand Statistics under "Details of Mesh" as shown below.

Make sure that you also have 3,000 elements.

Edge Sizing Biasing

We would like to have more elements in the region very close to the flate plate and less elements
in the far field. In order to do this, we must bias the edge sizing. First, click on Edge Sizing 2,
then click on Bias Type and set it to the first option as shown below.
Next, set the Bias Factor to 70 as shown below. The Bias Factor is defined in this case to be the
ratio of the longest division and the shortest division. That is, the last division will be seventy
times longer than the length of the first division.

Now, the biasing needs to be specified for the right side of the geometry. In order to incorporate
the biasing on the right side a new Edge Sizing needs to be implemented. First, (Click) Mesh
Control > Sizing. Then, select and apply the left side of the geometry. Then, change Type to
Number of Divisions and set Number of Divisions to 60. Next, set Behavior to Hard and set
Bias Type to the second option, as shown below.
Then, set the Bias Factor to 70. Lastly, click Update to generate the new mesh. You should
obtain the following mesh.

Create Named Selections

Here, the edges of the geometry will be given names so one can assign boundary conditions in
FLUENT in later steps. The left side of the geometry will be called "inlet" and the right side will
be called "outlet". The top side of the rectangle will be called "far_field" and the bottom side of
the rectangle will be called "plate" as shown in the image below.

In order to create a named selection first (Click) Edge Selection Filter, . Then click on the
left side of the rectangle and it should highlight green. Next, right click the left side of the
rectangle and choose Create Named Selection as shown below.
Select the left edge and right click and select Create Named Selection. Enter "inlet" and click
OK, as shown below.

Now, create named selections for the remaining three sides and name them according to the
diagram. Once you have created all four named selections, expand Named Selections and you
should see the four named selections, as shown below.
Save, Exit & Update

First save the project. Next, close the Mesher window. Then, go to the Workbench Project Page
and click the Update Project button,

Step 4: Setup (Physics)


Your current Workbench Project Page should look comparable to the following image.
Regardless of whether you downloaded the mesh and geometry files or if you created them
yourself, you should have checkmarks to the right of Geometry and Mesh.

The question mark to the right of right of the Setup cell is normal and indicates that the Setup
process has not yet been completed.

Launch Fluent

Double click on Setup in the Workbench Project Page which will bring up the FLUENT
Launcher. When the FLUENT Launcher appears change the options to "Double Precision", and
then click OK as shown below.The Double Precision option is used to select the double-precision
solver. In the double-precision solver, each floating point number is represented using 64 bits in
contrast to the single-precision solver which uses 32 bits. The extra bits increase not only the
precision, but also the range of magnitudes that can be represented. The downside of using
double precision is that it requires more memory.
Twiddle your thumbs a bit while the FLUENT interface starts up. This is where we'll specify the
governing equations and boundary conditions for our boundary-value problem. On the left-hand
side of the FLUENT interface, we see various items listed under Problem Setup. We will work
from top to bottom of the Problem Setup items to setup the physics of our boundary-value
problem. On the right hand side, we have the Graphics pane and, below that, the Command
pane.

Check and Display Mesh

First, the mesh will be checked to verify that it has been properly imported from Workbench. In
order to obtain the statistics about the mesh (Click) Mesh > Info > Size, as shown in the image
below.

Then, you should obtain the following output in the Command pane.
The mesh that was created earlier has 3,000 elements(50 x 60). Note that in FLUENT elements
are called cells. The output states that there are 3,000 cells, which is a good sign. Next, FLUENT
will be asked to check the mesh for errors. In order to carry out the mesh checking procedure
(Click) Mesh > Check as shown in the image below.

You should see no errors in the Command pane. Now, that the mesh has been verified, the mesh
display options will be discussed. In order to bring up the display options (Click) General >
Mesh > Display as shown in the image below.

The previous step should cause the Mesh Display window to open, as shown below. Note that
the Named Selections created in the meshing steps now appear.
You should have all the surfaces shown in the above snapshot. Clicking on a surface name in the
Mesh Display menu will toggle between select and unselect. Clicking Display will show all the
currently selected surface entities in the graphics pane. Unselect all surfaces and then select each
one in turn to see which part of the domain or boundary the particular surface entity corresponds
to (you will need to zoom in/out and translate the model as you do this). For instance, if you
select far_field, inlet, and plate and then click Display you should then obtain the following
output in the graphics window.

Now, make sure all 5 items under Surfaces are selected. The button next to Surfaces selects
all of the boundaries while the button deselects all of the boundaries at once. Once, all the 5
boundaries have been selected click Display, then close the Mesh Display window. The rectangle
displayed in the graphics window corresponds to our solution domain. Some of the operations
available in the graphics window to interrogate the geometry and mesh are:
Translation: The model can be translated in any direction by holding down the Left Mouse
Button and then moving the mouse in the desired direction.

Zoom In: Hold down the Middle Mouse Button and drag a box from the Upper Left Hand
Corner to the Lower Right Hand Corner over the area you want to zoom in on.

Zoom Out: Hold down the Middle Mouse Button and drag a box anywhere from the Lower
Right Hand Corner to the Upper Left Hand Corner.

Use these operations to zoom in and interrogate the mesh.

Define Solver Properties

In this section the various solver properties will be specified in order to obtain the proper
solution for the flat plate boundary layer flow. First, the Energy Model parameters will be
specified. In order to open the Energy Model Options Models > Energy-Off > Edit..., as shown
in the following image.

For incompressible flow, the energy equation is decoupled from the continuity and momentum
equations. We need to solve the energy equation only if we are interested in determining the
temperature distribution. We will not deal with temperature in this example. So leave the Energy
Equation set to off and click Cancel to exit the menu. Next, the Viscous Model parameters will
be specified. In order to open the Viscous Model Options Models > Viscous - Laminar > Edit...,
as shown below.

By default, the Viscous Model options are set to laminar, so no changes are needed. Click
Cancel to exit the menu.

Define Material Properties

Now, the properties of the fluid that is being modeled will be specified. The properties of the
fluid were specified in the Problem Specification section. In order to create a new fluid (Click)
Materials > Fluid > Create/Edit... as shown in the image below.
In the Create/Edit Materials menu set the Density to 1kg/m^3 (constant) and set the Viscosity to
1e-4 kg/(ms) (constant) as shown in the image below.
Click Change/Create. Close the window.

Define Boundary Conditions

At this point the boundary conditions for the four Named Selections will be specified. The
boundary condition for the inlet will be specified first.

Inlet Boundary Condition

In order to start the process (Click) Boundary Conditions > inlet > Edit... as shown in the
following image.
Note that the Boundary Condition Type should have been automatically set to velocity-inlet.
FLUENT guesses boundary conditions based on the label of the named selections. Now, the
velocity at the inlet will be specified. In the Velocity Inlet menu set the Velocity Specification
Method to Components, and set the X-Velocity (m/s) to 1 m/s, as shown below.
Then, click OK to close the Velocity Inlet menu.

Outlet Boundary Condition

First, (Click) Boundary Conditions > outlet > Edit... as shown in the image below
Note that the Boundary Condition Type should have been automatically set to pressure-outlet.
For the outlet boundary condition the gauge pressure needs to be set to zero. The default gauge
pressure is zero, thus no changes need to be made. Close the Pressure-Outlet menu.

Plate Boundary Condition

The Boundary Condition Type should have been automatically set to wall, as shown in the
image below.
If the Boundary Condition Type is not set to wall, then set it to wall. We will use the default
setting for the wall boundary condition, thus no changes are needed.

Far-Field Boundary Condition

For the far_field, set the Boundary Condition Type to symmetry, as shown below.
In the first dialog box click yes and in the second dialog box leave the name as is and click OK.
The symmetry boundary conditions sets the velocities normal to the boundary equal to zero.

At this point save your work in the FLUENT Window by clicking the save button, .

Step 5: Solution
Second Order Scheme

A second-order discretization scheme will be used to approximate the solution. In order to


implement the second order scheme click on Solution Methods then click on Momentum and
select Second Order Upwind as shown in the image below.

Set Convergence Criteria

FLUENT reports a residual for each governing equation being solved. The residual is a measure
of how well the current solution satisfies the discrete form of each governing equation. We'll
iterate the solution until the residual for each equation falls below 1e-6. In order to specify the
residual criteria (Click) Monitors > Residuals > Edit..., as shown in the image below.
Next, change the residual under Convergence Criterion for continuity, x-velocity,andy-velocity,
all to 1e-6, as can be seen below.

Lastly, click OK to close the Residual Monitors menu.


Set Initial Guess

Here, the flow field will be initialized to the values at the inlet. That is, the initial values of all the
cells will be set to 1 m/s and 0 Pa for x velocity and gauge pressure respectively. In order to carry
out the initialization click on Solution Initialization then click on Compute from and select inlet
as shown below.

Then, click the Initialize button, . This completes the initialization process.

Alternately, you could set the Gauge Pressure to 0 and set the X Velocity to 1 m/s as shown
below.
Then, you would need to press the Initialize button to apply the specified initial values to all the
cells. Either method will give you the same results.

Iterate Until Convergence

Prior, to running the calculation the maximum number of iterations must be set. To specify the
maximum number of iterations click on Run Calculation then set the Number of Iterations to
1000, as shown in the image below.
As a safeguard save the project now. Now, click on Calculatetwo times in order to run the
calculation. The residuals for each iteration are printed out as well as plotted in the graphics
window as they are calculated. After running the calculation, you should obtain the following
residual plot.

The residuals fall below the specified convergence criterion of 1e-6 in about 557 iterations, as
shown below. Actual number of convergence steps may vary slightly.
At this point, save the project once again.

Step 6. Results
Post Processing
We will use CFD-Post as the primary post processing GUI. Steps for post processing in FLUENT can be
found here.

Exporting Skin Friction from FLUENT into the Post-


processor (CFD-Post)
FLUENT calculates the skin friction coefficient as follows (see section 34.4 of the FLUENT
User's Guide which is accessible from the "help" button on the FLUENT interface).

The wall shear in the numerator of this expression is calculated from the gradient of the velocity
field. The "reference" density and velocity used in the denominator are specified through the
reference values panel.
Basic entities such as velocity and pressure are automatically exported from FLUENT into CFD-
Post. Others such as skin friction coefficient needs to be manually exported. To manually export
the skin friction coefficient, in FLUENT, click on File > Data File Quantities:
In Data File Quantities dialogue, select skin friction coefficient and click on OK.

Note
Students in MAE 6510 will need to select the Nusselt number in addition to the skin friction
coefficient for your HW assignment. For the Nusselt number, reference values used are length and
temperature. Hence, you will need to specify the appropriate reference density, velocity, length, and
temperature in FLUENT before you export the skin friction coefficient and Nusselt number into the
post-processor.
Double click on Results from the Workbench Window to launch CFD-Post.

Velocity Vectors
Click on the z-axis, to view the XY plane. Click on the vector icon to insert a
vector plot. Name it Velocity Vector.

A panel named "Details of Velocity Vector" will appear right below the outline window. Set the
Locations to symmetry 1. Click on Apply to display the velocity vectors.

The velocity vectors will be displayed in the view window.


You can use the wheel button of the mouse to zoom into the region that closely surrounds the
plate, to get a better view of the boundary layer velocities:

Pressure Contour
Insert > Contour. Name it Pressure contour.
In Details of Pressure contour, change the locations to symmetry 1, change the variable to
Pressure, and change the number of contours to 50.

Click on Apply to view the contour.


Outlet Velocity Profile
We will create a line that corresponds to the x=1 line (outlet). Then the velocity along this line
can be plotted against the Y axis. From the toolbar, insert > location > line. Name it "Outlet"

In the Details of Outlet panel, enter the following coordinates. Change the number of samples to
50. Click on Apply to create a line at the outlet.
Insert a chart from the menu: insert > chart. Name the chart "Velocity Profile". Change the title
to "Velocity Profile" in the General tab. In the Data Series tab, rename Series 1 to FLUENT and
select Outlet for location. Select Velocity as the variable in the X Axis tab and select Y as the
variable in the Y Axis tab. Click on Apply to generate the chart.
The velocity profile at the outlet is shown below:

We would like to compare the FLUENT result to the Blasius boundary layer solution. Download
the Blasius solution hereblasiusU.clv. Return to the Data Series tab and insert another data set.
Rename it Blasius. Instead of specifying the location of the data, select the Blasius solution file
you have downloaded.
Click on Apply. The comparison should look like the following plot:

Normalized velocity profile


We will observe the normalized velocity (u/U_infinity) at the outlet. Insert a point and call it free
stream. The velocity at this point will be extracted and set to the free stream velocity
(U_infinity). The velocity profile found in the previous step will be divided by U_infinity.
Enter the following coordinates and click on Apply.

The location of this point can be visualized in the 3D viewer:


In the expressions tab, create a new expression and name it "Uinf". In Details of Uinf, enter the
following command and click on Apply:
Notice Uinf returns 1 m/s as the velocity at the point where we defined as free stream. This is the
same free stream velocity that we have set up in FLUENT.

Insert another expression and name it "u normalized". Enter the following command and notice
its value is a variable. This is because the u-velocity varies in the y direction.

In the Variables tab, create a new variable and name it "normalized u". Retain Expression for the
Method and change the expression to "u normalized" from the drop down list. Click on Apply.
normalized u now appears as an variable.
Insert a chart and name it "normalized velocity". Select Outlet for the location in Data Series.
Select normalized u for the X variable and Y for the Y variable. Click on Apply to view the
chart.
Notice the scale of this profile is exactly the same as that of the outlet velocity profile. This is
because the free stream velocity, Uinf, is 1 m/s.

Mid-Section Velocity Profile


Here, we will plot the variation of the x component of the velocity along a vertical line in the
middle of the geometry. In order to create the profile, we must first create a vertical line at
x=0.5m. Insert another line, same as the previous step, and name it Mid section. Enter the
following numbers to create a vertical line at x=0.5m. Set the number of samples to 50.
Remember to click on Apply to finish.
Insert another chart and name it Mid Section Velocity Profile. In the General tab, change the title
to "Velocity profile". Select Mid Section as the location and rename Series 1 to Mid section. We
will compare the velocity profiles at the mid section and at the outlet. Repeat the procedure in the
previous step to insert the velocity profile at the outlet. Change the variable to Velocity in the X
Axis tab and change the variable to Y in the Y Axis tab. Click on Apply to generate the chart.
The velocity profile comparison is shown below:

Skin Friction Coefficient


We can plot the skin friction coefficient imported from FLUENT as a function of distance along
the plate. Insert a line and name it "plate wall". Enter the end points of the line and the number of
samples as the following:
Insert a chart and name it "Cf along wall". Use the same name for the chart title.
From the Data Series tab, Select "plate wall" for the location.
In the X Axis tab, select X as the Variable. In the Y Axis tab, select Skin Friction Coefficient as
the Variable.

The skin friction coefficient along the plate is shown below:

It is of interest to compare the numerical skin friction coefficient profile to the skin friction
coefficient profile obtained from the Blasius solution. We will compare the FLUENT result to the
Blasius solution. Download the Blasius solution hereBlasiusSkin.csv. The comparison is shown
below:

You can export the skin friction coefficient for data manipulation.

Results From FLUENT are as follows:


Step 6: Results
Velocity Vectors

One can plot vectors in the entire domain, or on selected surfaces. Here, the vectors will be
plotted for the entire domain. First, click on Graphics &Animations . Next, double click on
Vectors which is located under Graphics. Then, click on Display in the Vectors menu. You
should obtain, the following output.

You can use the wheel button of the mouse to zoom into the region that closely surrounds the
plate, to get a better view of the boundary layer velocities.

Outlet Velocity Profile

In this section we will first plot the variation of the x component of the velocity along the outlet.
Then we will plot the Blasius solution to see how the numerical solution compares. In order to
start the process (Click) Results > Plots > XY Plot... > Set Up..as shown below.
In the Solution XY Plot menu make sure that Position on Y Axis is selected , and X is set to 0
and Y is set to 1. This tells FLUENT to plot the y-coordinate value on the ordinate of the graph.
Next, select Velocity... for the first box underneath X Axis Function and select X Velocity for the
second box. Please note that X Axis Function and Y Axis Function describe the x and y axes of
the graph, which should not be confused with the x and y directions of the geometry. Finally,
select outlet under Surfaces since we are plotting the x component of the velocity along the
outlet. This finishes setting up the plotting parameters. Your Solution XY Plot menu should look
exactly the same as the following image.

Now, click Plot. The plot of the x component of the velocity as a function of distance along the
outlet now appears.
In order to increase the legibility of the graph, we will plot the data as a line rather than points.
To turn on the line feature, click on Curves... in the Solution XY Plot menu. Then, set Pattern to
----, set the Weight to 2 and select nothing for Symbol, as shown below.

Next, click Apply in the Curves - Solution XY Plot menu. Next, close the Curves - Solution XY
Plot menu.

Now, the range of the y axis will be truncated, as we are not interested in far field velocity.
Furthermore, the grid lines will be turned on. In order to implement these two changes. First
click Axes in the Solution XY Plot menu. Next, select Y for Axis, deselect Auto Range, select
Major Rules, selectMinor Rules. Then, set Minimum to 0 and set Maximum to 0.12. YourAxes
- Solution XY Plot menu, should look exactly like the image below.
Then, click Apply in the Axes - Solution XY Plot menu. Now, select X for Axis and select Major
Rules and Minor Rules, as shown below.

Next, click Apply in the Axes - Solution XY Plot menu. Close the Axes - Solution XY Plot menu.
Now, click Plot in the Solution XY Plot menu. You should obtain the following output.

It is of interest to compare the numerical velocity profile to the velocity profile obtained from the
Blasius solution. In order to plot the theoretical results, first click here to download the necessary
file. Save the file to your working directory. Next, go to the Solution XY Plot menu and click
Load File... and select the file that you just downloaded, BlasiusU.xy. Lastly, click Plot in the
Solution XY Plot menu. You should then obtain the following figure.
Lastly, select Write to File located under Options in the Solution XY Plot menu. Then, click
Write.... When prompted for a filename, enter XVelOutlet.xy and save the file in your working
directory.

Mid-Section Velocity Profile

Here, we will plot the variation of the x component of the velocity along a vertical line in the
middle of the geometry. In order to create the profile, we must first create a vertical line at
x=0.5m, using the Line/Rake tool. First, (Click) Surface < Line/Rake as shown in the following
image.

We'll create a straight vertical line from (x0,y0)=(0.5,0) to (x1,y1)=(0.5,0.5). Select Line Tool
under Options. Enter x0=0.5, y0=0,x1=0.5, y1=0.5. Enter line1 under New Surface Name.
Your Line/Rake Surface menu should look exactly like the following image.
Next, click Create. Now, that the vertical line has been created we can proceed to the plotting.
Click on Plots, then double click XY Plot to open the Solution XY Plot menu. In the Solution XY
Plot menu, use the settings that were used from the section above, except select line1 under
Surfaces and deselect any other geometry sections. Make sure that Write to File is not selected,
then click Plot. You should obtain the following output.

Then, return to the Solution XY Plot menu and select both line1 and outlet under Surfaces. Next,
click Plot and you should obtain the following figure.
Once again, return to the Solution XY Plot menu, select Write to File, then click Write.... When
prompted for a filename, enter XVelProfs.xy and save the file in your working directory.

Pressure Coefficients

In this section we will create contour plots for the pressure coefficients. Before we begin, we
must first set the reference values for velocity. In order to do so, first click on Reference Values
then set Compute from to inlet, as shown below.

|^CompInlet_Full.png]

Next, click on Graphics and Animations, then double click on Contours, as shown below.
In the Contours menu, set Contours of to Pressure... and set the box below to Pressure
Coefficient. Next, select Filled and set Levels to 90. Your Contours menu should look exactly
like the following image.

Lastly, click Display in the Contours menu to generate the contour plot. You should obtain the
following output.

You can then zoom in to the leading edge of the plate with the wheel mouse button as shown
below.
Skin Friction Coefficient

Here, the skin friction coefficient will be plotted as a function of distance along the plate. First,
click on Plots, then double click on XY Plot. In the Solution XY Plot menu deselect Write to
File, select Position on X Axis, set X to 1 and set Y to 0. Then, set the box located underneath Y
Axis Function to Wall Fluxes and set the box below to Skin Friction Coefficient. Next, select
plate under Surfaces and deselect any other geometry features. At this point your Solution XY
Plot menu should look the same as the following image.

Make sure that for both the x and y axes, that Auto Range is selected. Remember, that you must
click Apply to implement the changes you make. Then, click Plot in the Solution XY Plot menu
and you should obtain the following output.
It is of interest to compare the numerical skin friction coefficient profile to the skin friction
coefficient profile obtained from the Blasius solution. In order to plot the theoretical results, first
click here to download the necessary file. Save the file to your working directory. Next, go to the
Solution XY Plot menu and click Load File... and select the file that you just downloaded,
BlasiusSkin.xy. Lastly, click Plot in the Solution XY Plot menu. You should then obtain the
following figure.

Lastly, select Write to File located under Options in the Solution XY Plot menu. Then, click
Write.... When prompted for a filename, enter SkinFriction.xy and save the file in your working
directory.

Drag

Now, we will obtain the drag on the plate. First, click on Report then click on Result Reports...,
as shown in the following image.

Next, double click on Forces and click Print in the Force Reports menu. You should then obtain
the following output in the command pane.
As one can see from the data above, the plate experiences a drag of approximately 0.008377
Newtons. Furthermore, the data states that the drag coefficient is approximately 0.01675. The
drag coefficient is defined by the following equation.

In the case here, the density, velocity and area all have values of 1. Thus, the equation above
reduces to the following equation.

The results from ANSYS FLUENT agree with the theory here since the drag coefficient is
approximately twice the value of the drag.

Now, save your work in the FLUENT window, then close the FLUENT window.

We do in workbench once again

Step 7: Verification & Validation


It is very important that you take the time to check the validity of your solution. This section
leads you through some of the steps you can take to validate your solution.

Refine Mesh

Let's repeat the solution on a finer mesh. For the finer mesh, we will increase the total number of
elements(cells) by a factor of four. In order to accomplish this, we double the number of
divisions on each section. Instead of modifying the project that was just created, we will
duplicate it and modify the duplicate. In the Workbench Project Page right click on Mesh then
click Duplicate as shown below.
Rename the duplicate project to FlatPlate (mesh 2). You should have the following two projects
in your Workbench Project Page.

Next, double click on the Mesh cell of the FlatPlate (mesh 2) project. A new ANSYS Mesher
window will open. Under Outline, expand Mesh and click on Edge Sizing. Under Details of
"Edge Sizing", enter 100 for Number of Divisions. Next set the number of divisions for Edge
Sizing 2 and Edge Sizing 3 to 120. Then, click Update to create the new mesh. The new mesh
should now have 12000 elements (100 x 1200). A quick glance of the mesh statistics reveals that
there is indeed 12000 elements.
Compute the Solution

Close the ANSYS Mesher to go back to the Workbench Project Page. Under FlatPlate (mesh
2), right click on Fluid Flow (FLUENT) and click on Update, as shown below.

Now, wait a few minutes for FLUENT to obtain the solution for the refined mesh. After
FLUENT obtains the solution, save your project.

Convergence

In order to launch FLUENT double click on the Solution of the "Laminar Pipe Flow (mesh 2)"
project in the Workbench Project Page. The new mesh has significantly more cells, thus it is
likely that the solution did not converge to the tolerances we have previously set. Therefore, we
will iterate the solution further, to make sure that the solution converges. In order to do so click
on Run Calculation, set Number of Iterations to 1000 and click Calculate, as shown below.
Once you rerun the calculation, you will quickly see that the solution did not converge for the
finer mesh within 1000 iterations. The solution should converge by the 1784th iteration as shown
below.

Outlet Velocity Profile

Now, the variation of the x component of the velocity will be plotted with the results of the
original mesh to determine whether the solution is mesh converged. Set up a plot for the
variation of the x component of the velocity along the outlet as was done in the solution section.
Then load the XVelOutlet.xy file into the plot and generate the plot. You should obtain the
following image.
As one can see from the image above, the numerical solution does not vary much at all between
the two meshes. Thus, it has been confirmed that the solution is mesh converged.

Exercises
Simulate the laminar boundary layer over a flat plate using FLUENT for a Reynolds number
where

Change the value of the coefficient of viscosity µ from the tutorial example to get ,
keeping all other parameters the same. After changing the coefficient of viscosity rerun the solver
for the mesh that was created in Step 3.

Exercise 1
While developing boundary-layer theory, Prandtl made the following key arguments about the
boundary-layer flow to simplify the Navier-Stokes equations:

i.

ii. Steamwise velocity gradients ≪ Transverse velocity gradients; for instance,

Since we are solving the Navier-Stokes equations, we can use the FLUENT solution to check the
validity of the above two essential features of boundary layers. Consider the solution at x = 0.5
and x = 0.7 and make plots of appropriate profiles to check the validity of these two features.
Make one figure to illustrate each feature. Choose the upper limit of your abscissa (vertical axis)
such that you can clearly see the variation within the boundary layer (the flow outside the
boundary layer is not very interesting in this case).

Exercise 2
For the FLUENT solution, plot the u-velocity profiles (y vs. u) at x=0.5, 0.7, and 0.9 in the same
figure. Briefly comment on the change in the velocity profile with x.

Exercise 3

Prandtl's student Blasius deduced that the velocity profiles in a flat plate boundary layer obey the
similarity principle i.e. if rescaled accordingly, they should collapse to a single curve. Re-plot the
profiles from exercise 2 in terms of the Blasius variables in a different figure.
Also plot the corresponding values from the Blasius solution in this figure. How well does the
FLUENT solution obey the similarity principle?

FLUENT 12.1 - Steady Flow Past a Cylinder - Problem Specification

Problem Specification

Consider the steady state case of a fluid flowing past a cylinder, as illustrated above. Obtain the
velocity and pressure distributions when the Reynolds number is chosen to be 20. 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 0.05 kg/m*s in order to obtain the desired Reynolds number.

1. Pre-Analysis & Start-Up


Prior to opening FLUENT, we must answer a couple of questions. We must determine what our
solution domain is and what the boundary conditions are.

Solution Domain
For an external flow problem like this, one needs to determine where to place the outer boundary.
A circular domain will be used for this simulation. The effects that the cylinder has on the flow
extend far. Thus, the outer boundary will be set to be 64 times as large as the diameter of the
cylinder. That is, the outer boundary will be a circle with a diameter of 64 m. The solution
domain discussed here is illustrated below.

Boundary Conditions
First, we will specify a velocity inlet boundary condition. We will set the left half of the outer
boundary as a velocity inlet with a velocity of 1 m/s in the x direction. Next, we will use a
pressure outlet boundary condition for the right half of the outer boundary with a gauge pressure
of 0 Pa. Lastly, we will apply a no slip boundary condition to the cylinder wall. The
aforementioned boundary conditions are illustrated below.

Care to skip the geometry and meshing steps? README


If you would prefer to skip the geometry and mesh steps, then you can download the necessary files
here. Download the "zip" file, then extract the files to your working directory. In order to load the
necessary files, go to the Workbench Project Page, then (Click) File > Open > "Cylinder.wbpj". Lastly,
click here to skip ahead to Step 4 of the tutorial.
2. Geometry
Strategy for Geometry Creation

In order to create the desired geometry we will first create a surface body for the cylinder. Next,
we will create a surface body for the outer boundary as a "frozen body", so that it doesn't merge
with the first surface body. Then, we will use a boolean operation to subtract the small surface
body from the large surface body. At this point, we will have the surface body of the outer
boundary with a hole in the middle where the cylinder is. Lastly, we will project a vertical line on
to the geometry, so that radial edge sizing can be implemented in the meshing process.

Fluid Flow(FLUENT) Project Selection

Drag Fluid Flow(FLUENT) into the Project Schematic window.

Analysis Type

(Right Click) Geometry > Properties


Set Analysis Type to 2D

Launch Design Modeler

(Double Click) Geometry

Create Inner Circle and Dimension

Create a circle, centered around the origin in the xy plane. Set the diameter of the circle to 1m.

Inner Circle Surface Body Creation

Concept > Surfaces From Sketches.


Set the Base Object to Sketch 1 (located underneath XYPlane in the Tree). You can do this by
clicking within the tree or you can click on the circle to select Sketch 1. Then click Apply next to
Base Object.

Click Generate

Create New Sketch in the XY Plane

In this step we will create a new sketch in the XY Plane. This step is required for the boolean
operation that we will carry out later in the geometry process. It allows us to create two
distinguishable geometries, in the xy plane.
Click on XYPlane in the Tree Outline and it should highlight blue. Then click on the New
Sketch button, .
Create Outer Circle and Dimension
Now, create a circle centered around the origin in Sketch 2. Set the diameter of the circle to 64m.
You can click the "fit to window" button shown below to see both circles.
Outer Circle Surface Body Creation

In this step the Surface Body will be created as a frozen, such that it does not merge with the
inner circle surface body.

Concept > Surfaces From Sketches.


Set the Base Object to Sketch 2 (located underneath XYPlane in the Tree). You can do this by
clicking within the tree or you can click on the outer circle to select Sketch 2. Then click Apply
next to Base Object.

Then set Operation to Add Frozen as shown in the image below.

\
Then, click Generate
Carry Out Boolean Operation: Subtraction

In this step, the inner circle will be subtracted from the outer circle in order to obtain the desired
geometry.

Create > Boolean.


First, set Operation to Subtract. Next, use the face selection filter, , to apply the outer circle
surface body as the Target Body. Then, use the face selection filter, , to apply the inner circle
surface body as the Tool Body. In order to select inner circle which overlaps with the outer circle,
you may have to click on the planes to the lower left as shown below.
Lastly, click Generate. At this point if you zoom into the center of the circle you should see the
1m diameter hole, as shown below.

Create a Bisecting Line

The purpose of this step and the following two steps is to imprint a line onto the geometry that
will, allow for radial edge sizing in the meshing step.

Click on XYPlane in the tree and it should highlight blue. Then, click the new sketch button, .
In the new sketch draw a line on the y axis that goes through both of the concentric circles. Make
sure that it is coincident to the y axis. Then trim the line segments that lay inside of the inner
circle and the line segments that lay outside of the outer circle. This, is carried out by using the
Trim feature located in the Modify portion of Sketching.

Line Body Creation

Concept > Lines From Sketches.


Set the Base Object to Sketch 3. (located underneath XYPlane in the Tree). Click Generate

Projection

Tools > Projection.


Apply the two lines that you created to edge and apply the surface body to target. You must do
these steps by using the line selection filter and the surface selection filter. For the two lines hold
down control to select them both. Click Generate.

Save Project and Close Design Modeler

3. Mesh
In this section the geometry will be meshed with 18,432 elements. The geometry will be given
192 circumferential divisions and 96 radial divisions. Mapped face meshing will be used and
biasing will be used in order to significantly increase the number of elements located close to the
cylinder.

Launch Mesher

(Double Click) Mesh

Mapped Face Meshing

(Right Click) Mesh > Insert > Mapped Face Meshing


Set Geometry to both portions of the surface body. You will have to hold down control in the
selection process in order to highlight both halves. Click Update.

Circumferential Edge Sizing

(Right Click) Mesh > Insert > Sizing


Set Geometry to both edges of the surface body. You will have to use the edge selection filter and
you will have to hold down control in the selection process in order to highlight both halves. Set
Type to Number of Divisions, set Number of Divisions to 96 and set Behavior to Hard. Click
Update to generate the new mesh.
Radial Edge Sizing 1 (Top Half)

(Right Click) Mesh > Insert > Sizing


Set Geometry to the top half of the bisecting line. Set Type to Number of Divisions, set Number
of Divisions to 96 and set Behavior to Hard. Then, set Bias Type to the first option and set Bias
Factor to 460. These selections are shown in the image below.

Radial Edge Sizing 2 (Bottom Half)

(Right Click) Mesh > Insert > Sizing


Set Geometry to the top half of the bisecting line. Set Type to Number of Divisions, set Number
of Divisions to 96 and set Behavior to Hard. Then, set Bias Type to the second option and set
Bias Factor to 460. These selections are shown in the image below.

Then, click Update to generate the new mesh. You should obtain the mesh, that is shown below.
Verify Mesh Size

(Click) Mesh > (Expand) Statistics


You should have 18,624 nodes and 18,432 elements.

Create Named Selections

In this section the various parts of the geometry will be named according to the image below.
First create a named selection for the left half of the outer boundary and call it "farfield1". Next,
create a named selection for the right half of the outer boundary and call it "farfield2". Lastly,
create a named selection for both sides of the inner circle(cylinder) and call it "cylinderwall".
When creating the third named selection, make sure that you included both halves of the circle.
You will have to hold down control to select both edges.
Save Project

4. Setup (Physics)
Launch Fluent

(Double Click) Setup in the Workbench Project Page.

Double Precision

Select Double Precision.

Parallel Processing

If you are using a computer that has more than one core, it is advantageous to turn on the parallel
processing feature of FLUENT. This feature will divide the solution domain amongst the number
of cores that you specify. The maximum number of cores that you can specify is 4 for the
standard FLUENT package. The Swanson Lab at Cornell University has dual core machines. In
order to use both cores, set Processing Options to Parallel (Local Machine) and set the Number
of Processes to 2. These selections are shown below.
If you have more cores set Number of Processes to the number of cores you have ( 4 is the
limit). Now, when you run your calculations in FLUENT you will have more than one core
working for you, which will significantly reduce your computation time. Lastly, click OK.

Check Mesh

(Click) Mesh > Info > Size


You should now have an output in the command pane stating that there are 18,432 cells.

(Click) Mesh > Check


You should see no errors in the command pane.

Specify Material Properties

Problem Setup > Materials > Fluid > Create/Edit....


Then set the Density to 1 kg/m^3 and set Viscosity to 0.05 kg/m*s. Click Change/Create then
click Close.

Boundary Conditions

FarField1

Problem Setup > Boundary Conditions > farfield1.


Set Type to velocity-inlet. Click Edit.... Set Velocity Specification Method to Components, set
X-Velocity to 1 m/s, and set Y-Velocity to 0 m/s.
FarField2

Problem Setup > Boundary Conditions > farfield2..


Set Type to pressure-outlet.

Cylinder Wall

Problem Setup > Boundary Conditions >cylinderwall.


Set Type to wall.

Reference Values

Problem Setup > Reference Values.


Set the Density to 1 kg/m^3. The other default values will work for the purposes of this
simulation.

Save Project

5. Solution
Second Order Upwind Momentum Scheme

Solution > Solution Methods > Spatial Discretization.


Set Momentum to Second Order Upwind

Convergence Criterion

Solution > Monitors > Residuals > Edit....


Set the Absolute Criteriafor ,x-velocity and y-velocity all to 1e-6. Click ok

Solution > Monitors > Drag > Edit....


Then check Print to Console and Plot. Next, click cylinderwall, which is located under Wall
Zones. Lastly, click ok

Initial Guess

Solution > Solution Initialization.


Set Compute From to farfield1. Alternately, you can simply set X Velocity to 1 m/s. Then, click
Initialize.

Iterate Until Convergence

Solution > Run Calculation.


Set the Number of Iterations to 2000. Then, click Calculate. (You may have to hit
Calculatetwice.) Now, have a cup of coffee. The solution should converge after approximately
1647 iterations.

Save Project

6. Results
Velocity Vectors

Results > Graphics and Animations > Vectors > Set Up...
Then click Display. The Scale was set to 2 in the plot below.

Stream Lines

Results > Graphics and Animations > Contours > Set Up...
Set Contours oftoVelocity..and set the box below to Stream Function. Make sure Filled is not
selected and click Display. The plots below were created by setting levels to 40, deselecting
Auto Range, setting Min (kg/s) to 31 and setting Max (kg/s) to 33.
Vorticity

Results > Graphics and Animations > Contours > Set Up...
Set Contours oftoVelocity..and set the box below to Vorticity Magnitude. Then click Display.
The plot below was created by by setting levels to 60, deselecting Auto Range, setting Min (1/s)
to 0.25 and setting Max (1/s) to 9.

Drag Coefficient

Reports > Result Reports > Forces > Setup


Then, click Print. The command pane will now display the following results: the pressure force,
the viscous force, the total force, the pressure force coefficient, the viscous force coefficient and
the drag force coefficient. As one can see from the following image link, FLUENT yields 2.04
for the value of the drag coefficient.Drag Coefficient
7. Verification and Validation
As with all simulations, it is imperative to verify your results. Here, we will verify our results by
comparing the drag coefficient we obtain from FLUENT to what we obtain

Exercises
Consider the steady flow past a cylinder at Re=40. Simulate this flow using FLUENT. Note that
the only parameter you need to change is the kinematic viscosity.

1.

Plot the streamlines near the cylinder.

2.

Calculate the drag coefficient from your FLUENT results and compare with BengtFonberg's
paper, "A numerical study of steady viscous flow past a cylinder" (1980).

FLUENT 12.1 - 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


Please complete the "Steady Flow past a Cylinder tutorial before completing this tutorial. Click
here to go to the problem statement of the "Steady Flow Past a Cylinder" tutorial.

Alternatively, click hereCYLINDER to 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.

Geometry

We can skip the geometry step, because it is the same as the "Steady Flow Past a Cylinder"
geometry and we have already duplicated that project.
Mesh

We can skip the mesh step as well, because it is the same as the "Steady Flow Past a Cylinder"
mesh and we have already duplicated that project.

4. Setup (Physics)
Launch FLUENT.

(Double Click) Setup in "Unsteady Flow", the duplicate project. Select Double Precision, and if
using a computer with multiple cores, select parallel, and set the number of cores to be used.

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.

Problem Setup > General.Set Time to Transient.


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.

Problem Setup > Materials > Fluid > Create/Edit.... Set the viscosity to 8.333*10^-3 kg/m*s.
Click Change/Create.

Then click Close.

Save Project

5. Solution
Convergence Criterion: Turn off Drag, Turn on Lift

Solution > Monitors > Drag > Edit.... Then uncheck Print to Console and uncheck Plot. Click
ok.
Solution > Monitors > Lift > Edit.... Then check Print to Console, Plot and Write. Click ok. 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.
Solution > Solution Initialization. Set Compute From to farfield1.. Click Initialize.

Next, we'll change the velocity in some of the cells to more quickly reach a sinusoidal variation
of the lift coefficient. Adapt > Region....

Then set X Min to 0.5 m, set X Max to 32 m, set Y Min to 0 m, and set Y Max to 32m.
Click Mark then click Close. This will select the cells bounded by these four points, so we can
change the initial condition in them.

Next, click Patch.


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 Patch,then click close.


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 > Calculation Activities > 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.
Advance Solution in Time

Solution > Run Calculation. Set Time Step Size to 0.2 seconds and set the Number Of Time
Steps to 400.
Now, click Calculate. (You may have to hit Calculate 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-clickResults.
Your project schematic window should now appear as below.

Double click on the Results module 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 Results button in the upper left corner of the screen.

Next, browse to the location where you chose to save the FLUENT data files. Select the .cas file
that is in this folder, which should be named "FFF-1-0001.cas", or similar. In the bottom right of
this window, select Load complete history as: and Single Case. Finally, click Open.

Click OK in the popup window if one appears.

h4. Load Timesteps

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

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

Next, ensure that Variable is set to Vorticity.

Change Range to User Specified. Set the Min to 0.01 s^-1 and Max to 2 s^-1.

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

Click Apply to 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.

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
Timesteps button.
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:
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.
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.

DOWNLOAD IT
ANSYS WB - Airfoil - Problem Specification

Problem Specification

In this tutorial, we will show you how to simulate a NACA 0012 Airfoil at a 6 degree angle of
attack placed in a wind tunnel. Using FLUENT, we will create a simulation of this experiment.
Afterwards, we will compare values from the simulation and data collected from experiment.

Pre-Analysis & Start-Up


Boundary Conditions

One of the simple things we can think about before we set up the simulation is begin planning
the boundary conditions of the set up. One of the popular meshes for simulating a airfoil in a
stream is a C-Mesh, and that is what we will be using. At the inlet of the system, we will define
the velocity as entering at a 6 degree angle of attack (as per the problem statement), and at a total
magnitude of 1. We will also define the gauge pressure at the inlet to be 0. As for the outlet, the
only thing we can assume is that the gauge pressure is 0. As for the airfoil itself, we will treat it
like a wall. Together, these boundary conditions form the picture below:
Open ANSYS Workbench

Now that we have the pre-calculations, we are ready to do a simulation in ANSYS Workbench!
Open ANSYS Workbench by going to Start > ANSYS > Workbench. This will open the start up
screen seen as seen below

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of
the start up window, you will see the Toolbox Window. Take a look through the different
selections. We will be using FLUENT to complete the simulation. Load the Fluid Flow
(FLUENT) box by dragging and dropping it into the Project Schematic.
Once you have loaded FLUENT into the project schematic, you are ready to create the geometry for the
simulation.

Geometry
Download the Airfoil Coordinates

In this step, we will import the coordinates of the airfoil and create the geometry we will use for
the simulation. Begin by downloading this file here and saving it somewhere convenient. This
file contains the points of a NACA 0012 airfoil.

Launch Design Modeler

Before we launch the design modeler, we need to specify the problem as a 2D problem. Right
click and select Properties. In the Properties of Schematic A2:
Geometry Window, select Analysis Type > 2D. Now, double click
to launch the Design Modeler. When prompted, select Meters as the unit of measurement.

Airfoil

First, we will create the geometry of the airfoil. In the menu bar, go to Concept > 3D Curve. In
the Details View window, click Coordinates File and select the ellipsis to browse to a file.
Browse to and select the geometry file you downloaded earlier. Once you have selected the
desired geometry file, click to create the curve. Click to get a better look at the
curve.
Next, we need to create a surface from the curve we just generated. Go to Concepts > Surfaces
from Edges. Click anywhere on the curve you just created, and select Edges > Apply in the
Details View Window. Click to create the surface.

Create C-Mesh Domain

Now that the airfoil has been generated, we need to create the meshable surface we will use once
we begin to specify boundary conditions. We will begin by creating a coordinate system at the
tail of the airfoil - this will help us create the geometry for the C-mesh domain. Click to
create a new coordinate system. In the Details View window, select Type > From Coordinates.
For FD11, Point X, enter 1.
Click to generate the new coordinate system. In the Tree Outline Window, select the
new coordinate system you created (defaulted to Plane 4), then click to create a new sketch.
This will create a sketching plane on the XY plane with the tail of the airfoil as the origin. At the
bottom of the Tree Outline Window, click the Sketching tab to bring up the sketching window.

The first action we will take is create the arc of the C-Mesh domain. Click .
The first click selects the center of the arc, and the next two clicks determine the end points of
the arc. We want the center of the arc to be at the tail of the airfoil. Click on the origin of the
sketch, making sure the P symbol is showing
For the end points of the arc, first select a point on the vertical axis above the origin (a C symbol
will show), then select a point on the vertical axis below the origin. You should end up with the
following:

To create the right side of the C-Mesh donain, click . Click the following
points to create the rectangle in this order - where the arc meets the positive vertical axis, where
the arc meets the negative vertical axis, then anywhere in the right half plane. The final result
should look like this:
Now, we need to get rid of necessary lines created by the rectangle. Select Modify in the
Sketching Toolboxes window, then select . Click the lines of the rectangle the are
collinear with the positive and negative vertical axises. Now, select the Dimensions toolbox to
dimension the C-Mesh domain. Click , followed by the arc to dimension the arc.
Assign the arc a value of 12.5. Next, select . Click the vertical axis and the vertical
portion of the rectangle in the right half plane. Also assign the horizontal dimension a value of
12.5.
Next, we need to create a surface from this sketch. To accomplish this, go to Concept > Surface
From Sketches. Click anywehere on the sketch, and select Base Objects > Apply in the Details
View Window. Also, select Operation > Add Frozen. Once you have the correct settings, click
. The final step of creating the C-Mesh is creating a surface between the boundary
and the airfoil. To do this, go to Create > Boolean. In the Details View window, select
Operation > Subtract. Next, select Target Bodies > Not selected, select the large C-Mesh
domain surface, then click Apply. Repeat the same process to select the airfoil as the Tool Body.
When you have selected the bodies, click

Selecting the Airfoil Body


Because the C-Mesh domain and the airfoil overlap, once you click in the vicinity of the
airfoil ANSYS will select the C-Mesh domain but give you the option of selecting multiple
layers

Select the layer that corresponds to the airfoil and the airfoil will be highlighted.
Create Quadrants

In the final step of creating the geometry, we will break up the new surface into 4 quadrants; this
will be useful for when we want to mesh the geometry. To begin, select Plane 4 in the Tree
Outline Window, and click . Open the sketching menu, and select . Draw a line
on the vertical axis that intersects the entire C mesh. Trim away the lines that are beyond the C-
Mesh, and you should be left with this:

Next, go to Concepts > Lines from Sketchs. Select the line you just drew and click Base
Objects > Apply, followed by . Now that you have created a vertical line, create a new
sketch and repeat the process for a horizontal line that is collinear to horizontal axis and bisects
the geometry.
Now, we need to project the lines we just created onto the surface. Go to Tools > Projection.
Select Edges press Ctrl and select on the vertical line we drew (you'll have to select both parts of
it), then press Apply. Next, select Target and select the C-Mesh surface, then click Apply.

Once you click , you'll notice that the geometry is now composed of two surfaces
split by the line we selected. Repeat this process to create 2 more projections: one projection the
line left of the origin onto the left surface, and one projecting the right line on the right surface.
When you're finished, the geometry should be split into 4 parts.

The geometry is finished. Save the project and close the design modeler, as we are now we are
ready to create the mesh for the simulation.

Mesh
Mapped Face Meshing

First, we will apply a mapped face meshing control to the geometry. In the Outline window, click
on Mesh to bring up the Meshing Toolbar. In the Meshing Toolbar, select Mesh Control >
Mapped Face Meshing. Making sure the face selection filter is selected , select all four
faces by holding down the right mouse button and dragging the mouse of all of the quadrants of
the geometry. When all of the faces are highlighted green, in the Details view Window select
Geometry > Apply. Next, select

Edge Sizing

Next, we will apply edge sizing controls to all of the edges of the mesh. To begin, go to Mesh
Control > Sizing. Next, click the edge selection filter . Select the following 4 edges buy
holding Ctrl and using the left mouse button:
Once the edges are selected, in the Details View Window select Geometry > Apply. Next, select
Type > Number of Divisions. Change the Number of Divisions to 50. Select Behavior > Hard.
We also want the mesh to have a bias, so select the first bias type: Bais> ----- — - -, and give the
edge sizing a Bias Factor of 150. The Edge sizing should now look like this:
Notice that the element sizes get smaller towards the airfoil. This will give us a better resolution
around the airfoil where the flow gets more complicated. Create a new edge sizing with the same
parameters, but choose the 4 remaining straight edges (see figure below). The number of
divisions will still be 50, but now will be selecting a different biasing type by selecting the
second Bias option: Bias > - - — -----. Again, set the Bias Factor to 150
Edge Bias
It is important to make sure that the edge divisions to this point are biased towards the center
of the mesh: otherwise you may run into some problems later. If your mesh does not match the
pictures in the tutorial, make sure to change the parameters of the mesh to make sure that they
do: this might mean choosing different edges for the different biasing types than those
outlined in this tutorial.

Finally, create a third edge sizing, and select the rounded edges as the geometry. Again, select
Type > Number of Divisions, and change Number of Divisions to 100. Select Behavior > Hard.
This time, we will not bias the edges.

Now, select Mesh > Generate to generate the mesh. It should look like this.
Named Selections

Now will assign names to some of the edges to make creating boundary conditions for the mesh
easier. Let's recall the boundary conditions we planned in the Pre-Analysis Step:
The edges highlighted blue are the inlet, the edges highlighted red are the outlet, and the airfoil is
highlighted white in the middle. Now we are ready to name the sections. In the Outline window,
select geometry - this will make seeing the edges a little easier. Again make sure the edge
selection tool is selected. Now, select the two vertical edges on the far right side of the mesh.
Right click, and select Create Named Selections. Name the edges outlet. Next, select the edges
that correspond to the inlet of the flow as defined by the picture above. Again, right click and
select Create Named Selections and this time name the selection inlet. Finally, select the two
edges making up the airfoil, and name the selection airfoil.

Setup(Physics)
Launch the Solver

In this step, we will open fluent and define the boundary conditions of the problem. If you
haven't already, close the meshing window to return to the Project Outline window. Now, click
. This will load the mesh into FLUENT. Now, double click Setup. The Fluent
Launcher Window should open. Check the box marked Double Precision. To make the solver
run a little quicker, under Processing Options we will select Parallel and change the Number of
Processes to 2. This will allow users with a double core processor to utilize both.
Select the Solver

Click OK to launch Fluent. The first thing we will do once Fluent launches is define the solver
we are going to use. Select Problem Setup > General. Under Solver, select Density-Based.

Models and Materials

Next, we will define the model we are going to use. We do this by going Problem Setup >
Models > Viscous-Laminar. Then press Edit... This will open the Viscous Model Menu Window.
Select Inviscid and press OK. Now, we will specify characteristics of the fluid. Because we
specified the fluid as inviscid, we will only have to define the density of the fluid. To make
matters even simpler, we are only looking for non-dimensionalized values like pressure
coefficient, so we will define the density of our fluid to be 1 kg/m^3. To define the density, click
Problem Setup > Materials > (double click) Air. This will launch the Create/Edit Materials
window.
Under Properties, ensure that density is set to Constant and enter 1 kg/m^3 as the density. Click
Change/Create to set the density.

Boundary Conditions

Inlet

Now that the fluid has been described, we are ready to set the boundary conditions of the
simulation. Bring up the boundary conditions menu by selecting Problem Setup > Boundary
Conditions. In the Boundary Conditions window, look under Zones. First, let's set the boundary
conditions for the inlet. Select Inlet to see the details of the boundary condition. The boundary
condition type should have defaulted to velocity-inlet: if it didn't, select it. Now, click Edit to
bring up the Velocity-Inlet Window. We need to specify the magnitude and direction of the
velocity. Select Velocity Specification Method > Components. Remember, we want the flow to
enter the inlet at an angle of 6 degrees since the angle of attack of the airfoil is 6 degrees; thus,
the x velocity will be , and the y velocity will be . Specify X-Velocity as 0.9945

m/s and Y-Velocity as 0.1045 m/s. When you have finished specifying the velocity as entering
the inlet at 6 degrees (the same thing as having an angle of attack of 6 degrees), press OK
Outlet

In the Boundary Conditions window, look under Zones. Select Outlet to see the details of the
boundary condition. The boundary condition type should have defaulted to pressure-outlet: if it
didn't, select it. Click Edit, and ensure that the Gauge Pressure is defaulted to 0. If it is, you may
close this window.

Airfoil

In the Boundary Conditions window, look under Zones and select airfoil. Select Type > Wall if it
hasn't been defaulted.

Reference Values

The final thing to do before we move on to solution is to acknowledge the reference values. Go
to Problem Setup > Reference Values. In the Reference Values Window, select Compute From
> Inlet. Check the reference values that appear to make sure they are as we have already set
them.

Solution
Methods

First, go to Solution > Solution Methods. Everything in this section should have defaulted to
what we want, but let's make sure that under Flow the selection is Second Order Upwind. If this
is the selection, we may move on.

Monitors

Now we are ready to begin solving the simulation. Before we hit solve though, we need to set up
some parameters for how Fluent will solve the simulation.
Let's begin by going to Solution > Monitors. In the Monitors Window, look under Residuals,
Statistic, and Force Monitors. Select Residuals - Print,Plot and press Edit. In the Residual
Monitors Window, we want to change all of the Absolute Criteria to 1e-6. This will give us
some further trust in our solution.

Initial Guess

Now, we need to initialize the solution. Go to Solution > Solution Initialization. In the Solution
Initialization Window, select Compute From > Inlet. Ensure the values that appear are the same
values we inputted in Step 5. If theare, initialize the solution by clicking Initialize.

Solve

Once the solution has been initialized, we are ready to solve the simulation. Go to Solution >
Run Calculation. Change Number of Iterations to 3000, then double click Calculate. Sit back
and twiddle your thumbs until Fluent spits out a converged solution.

Results
Velocity

First, we will look at the velocity vectors of the solution to see if the make intuitive sense. To
plot the velocity vectors, go to Results > Graphics and Animations. In the Graphics and
Animations Window, select Vectors and click Set Up.... This will bring up the Vectors Menu.
Make sure the settings of the menu match the figure above: namely Vectors of > Velocity, Color
by > Velocity, and set the second box as Velocity Magnitude. To see the velocity vectors, press
Display.

Pressure Contours

To view the pressure contours over the entire mesh, go to Results > Graphics and Animations
again, and in the Graphics and Animations Window, select Contours.
Click Set Up... to bring up the Contours Menu. Check the box next to Filled. Under Contours
Of, ensure that the two boxes that are selected are Pressure... and Static Pressure.
Once these parameters are set, press Display to see the pressure contours.

Streamlines

To view the streamlines, keep the Contours window open, and change the Contours Of box to
Velocity, and the box below to Stream Function. Change Levels to 100. Also, uncheck the box
marked Auto Range, and set Min(kg/s) to 13.11, and Max(kg/s) to 14.16
To view the streamlines, press Display

Pressure Coefficient

Next, we will plot the pressure coefficient along the surface of the airfoil. Click on Results >
Plots to open up the Plots Window. Under Plots, select XY Plot, and click Set Up.... In the
window that pops up, change the settings Y-Axis Function > Pressure, and change the second
box to Pressure Coefficient. Ensure X-Axis Function > Direction Vector. Under Surfaces,
select airfoil. See the figure below for help.
When all the settings are correct, press Plot to plot the data to the command window. To save the
data to a text file, check the box next to Write to File. You'll notice that the Plot button has been
replaced by a button marked Write..., click it. Change the file type to All Files and save the file
name as Pressure_Coefficient.txt

Coefficients of Lift and Drag

To find the Coefficients of Lift and Drag, click Results > Reports to bring up the Reports
Window. In the Reports Window, select Forces and click Set Up.... This will bring up the Force
Reports menu

We need to set the parameters so drag across the airfoil (keep in mind, which is at an angle) will
be displayed. In the Force Reports window change the Direction Vector such that X >.9945 and
Y >.1045. Click Print to print the drag coefficient to the command window. To print the lift
coefficient, in the Force Reports window change the Direction Vector such that X >-.1045 and
Y >.9945. Again, press Print.

Verification and Validation


Verification

One of the ways we can verify our data is by refining the mesh. Open up the mesh, and increase
the Number of Divisions for Edge Sizing and Edge Sizing 2 to 100. Click Mesh in the Outline
window, and in the Details window, expand statistics. The number of elements should now be
40000.

Exit out of the mesher. First, right click Setup and select Reset. Then click in the
project schematic. Open up the solver, and solve the simulation using the same solver and
boundary conditions (you'll have to input them again), but this time change the number of
iterations to 5000. Again, calculate the force coefficients and graph the pressure coefficient.

Validation

To validate our data, we will take a compare the data from actual experiment.

Unrefined Mesh Refined Mesh Experimental Data


Lift Coeffient 0.6315 0.6670 0.6630

Drag Coefficient 0.0122 0.0063 0.0090

Below is a graph displaying the comparing Coefficient of Pressure along the airfoil for the
experimental data and the CFD simulation. The data is from Gregory & O'Reilly, NASA R&M
3726, Jan 1970.

As we can see from the table and the graph, the CFD matches the data fairly well. There are
inaccuracies from factors like our assumption that the flow was inviscid, but we still managed to
extract some meaningful information from the simulation.

Exercises

Consider the low-speed airflow over the NACA 0012 airfoil at low angles of attack. The
Reynolds number based on the chord is Rec = 2.88 × 10^6. This flow can reasonably be modeled
as incompressible and inviscid.

1. Incompressible, Inviscid Model

Explain why the incompressible, inviscid model for this flow should yield lift coefficient values
that match well with experiment but will yield a drag coefficient that is always zero.

2. Boundary Value Problem

What is the boundary value problem (BVP) you need to solve to obtain the velocity and pressure
distributions for this flow at an angle of attack of 10 degrees? Indicate governing equations,
domain and boundary conditions (u = 0 at a certain boundary etc.). For each of the boundary
conditions, indicate also the corresponding boundary type that you need to select in FLUENT.
3. Coefficient of Pressure

Run a simulation for the NACA 0012 airfoil at angles of attack at 0 degrees and 10 degrees for
two cases: a mesh with 15000 elements and a mesh with 40000 elements. Plot the pressure
coefficient obtained from FLUENT on the same plot as data obtained from experiment The
experimental data is from Gregory & O’Reilly, NASA R&M 3726, Jan 1970 and is provided
here Follow the aeronautical convention of flipping the vertical axis so that negative Cp values
are above and positive Cp values are below. This can be done in MATLAB using set(gca, ’YDir’,
’reverse’);

4. Lift and Drag Coefficient

Obtain the lift and drag coefficients from the FLUENT results on the two meshes. Compare these
with experimental or expected values (present this comparison as a table). The experimental
values for 0 degree angle of attack are: Cl = 0.025; Cd = 0.0069, and the experimental values for
10 degree angle of attack are: Cl = 1.2219; Cd = 0.0138.

Conclusions

Comment on the comparison with experiment for the two angles of attack. Also,comment on the
effect of mesh refinement. How does the pressure distribution over the airfoil change on
increasing the angle of attack?

ANSYS WB - Supersonic Flow Over a Wedge - Problem Specification

8. Exercises

A uniform supersonic stream encounters a wedge with a half-angle of 15 degrees as shown in the
figure below.

The stream is at the following conditions:


Using FLUENT, calculate the Mach Number, static and total pressure behind the oblique shock
that will be formed. Also, calculate the shock angle, pressure coefficient along the wedge and
drag coefficient. Compare the FLUENT results with the corresponding analytical results.

Pre-Analysis & Start-Up


Pre-Analysis

In order to calculate the expected results behind the shock, we recommend using aoblique shock
wave calculator (link grc.nasa.gov). At Mach 3 and an angle of 15 degrees, we find the
following:

Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going to


Start > ANSYS > Workbench. This will open the start up screen seen as seen below
Screen Management

This tutorial is designed such that the user can have both ANSYS Workbench and the tutorial
open. As shown below, this online tutorial should fill approximately 1/3 of the screen, while
ANSYS Workbench fills the remaining 2/3 of the screen.

Setup Project

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of
the start up window, you will see the Toolbox Window. Take a look through the different
selections. We will be using FLUENT to complete the simulation. Load the Fluid Flow
(FLUENT) box by dragging and dropping it into the Project Schematic.
Right click the top box of the project schematic and go to Rename, and
name the project Supersonic Flow Over a Wedge.You are ready to create the geometry for the
simulation.

Geometry
Care to skip the geometry and meshing steps? README
If you would prefer to skip the geometry and mesh steps, then you can download the necessary files
here. Download the "zip" file, then extract the files to your working directory. In order to load the
necessary files, go to the Workbench Project Page, then (Click) File > Open > "Supersonic Flow Over
Wedge.wbpj". Lastly, click here to skip ahead to Step 4 of the tutorial.

Set Up

First, we need to specify that the geometry is 2-dimensional. Right click the Geometry box
and select Properties. This will open the Properties of Schematic A2: Geometry
Window. Under Advance Geometry Options change Analysis Type from 3D to 2D.
After the analysis type has been set, we are ready to launch Design Modeler, the geometry engine
in ANSYS. Open Design Modeler by double clicking the geometry box . After
launching Design Modeler, you will be prompted to choose standard units. Select Meter as the
standard unit, and click OK.

Sketching

We want to sketch on the XY plane. To look at the XY plane, click the positive Z-Axis on the
compass in the Graphics window.
To begin sketching, click on the Sketching tab in the Tree Outline window. To draw our domain,
we will use the Rectangle tool. Click on in the Sketching Toolboxes window. In the
graphics window, draw the rectangle by first clicking on the origin (make sure the P icon is
showing, meaning you are in fact selecting the point), then select a point in the 1st quadrant.

Now, we need to draw the wedge outline in the geometry. We will use the line tool to create the
wedge. Select the line tool in the Sketching Toolboxes window. Click on the points
shown in the below figure. Make sure the "C" is showing.
Now, we need to remove the extraneous lines that we created. In the Sketching Toolboxes
window, click the Modify tab, and select . Next, trim the lines indicated by the figure
below

The final sketch should look like the image below


Dimensions

Next, we need to add the dimensions for the geometry. In the Sketching Toolboxes window, select
the Dimensions tab. Next, select the general dimensioning tool . To create a
dimension, you first select a line. This will create a dimension for that line. Next, you will need
to place the dimension next to the line. See the image below for guidance.

Next, create dimensions for the following 4 lines:

In order to add magnitudes to the dimensions, look to the Details window. You will see 4
dimensions that have been specified. Click on a dimension magnitude, and notice that the
corresponding dimension will be highlighted in the graphics window. Use the following diagram
to add the dimensions to the geometry.
When the dimensions have been correctly applied, the geometry should look like this:

Create Surface

Next, we need to create a surface from the sketch. In the menu tool bar, select Concept >
Surface from Sketches. In the graphics window, select any line of the geometry.

Next, in the details window, select Base Objects > Apply. Finally, press . The
geometry should now look like the figure below.
Create a projection

Now, we want to project the center vertical line onto the surface body we just created. This will
help us with our mesh. In the menu bar, select New Sketch icon to create a new sketch

This will create a new sketch. In the Outline window, return to the Sketching tab. Again, select
the tool. Draw a line from the vertex of the wedge to the top of the geometry. Make
sure that when you click a vertex, a "P" appears (meaning point, constraining the line to the
vertex), a "V" appears on the line (meaning vertical, putting a vertical constraint on the line), and
a "C" appears when you click on the top line (constraining the newly created line to the top line).
Right before you make your second click to define the line, make sure it looks like this:
The line will turn dark blue if you have done this correctly (meaning the line is fully constrained)
Now, we need to create a line body from this sketch. In the menu bar, go to Lines from Sketches.
In the graphics window, select the line you just drew. In the Outline window, select Base Objects
> Apply. Finally, press .

Finally, we are ready to project the line on the surface. In the menu bar, go to Tools >
Projection. First, you will need to select an edge. Select the middle vertical line we just created.
In the details window, select Edges > Apply

Next, we need to select the surface body for the projection. In the Details window, select Target,
then select any point on the surface body.

In Details window, select Target > Apply. Finally, press . The line should now be
projected on the surface. Now that we have the surface and the projection, we no longer need the
line body we first created. In the Outline window, Expand 2 Parts, 2 Bodies. Right click Line
Body and select Suppress Body
Now that we have completed the geometry. Save the project, and close the Design Modeler.

Mesh
Launch the Mesher

Now that we have completed creating the geometry of the domain, we are ready to mesh it.
Return to the Project Schematic Window. In the Project Schematic window, double click the
Mesh box to launch the mesher.

Mapped Face Meshing

First we will apply a mapped face meshing; this will give us a regular mesh. First, in the Outline
window, click to show the Mesh menu in the menu bar. In the Meshing Menu, select
Mesh Control > Mapped Face Meshing. In the Graphics window, hold down CRTL, and select
both domain faces to select it, then in the Details window, click Geometry > Apply.

Body Sizing

Next, we will create a body sizing for the elements that will make up the domain. In the Mesh
Menu, select Mesh Control > Sizing. Next, select the body selection filter in the menu bar
Next, select the surface in the graphics window. In the Details window, select Geometry > Apply.
Now, we want to change the element size. In the Details Window, select Element Size > Default
and change the value to 0.05 m.

Generate the Mesh

Now, we are ready to generate the mesh. Generate the mesh by clicking in the
menu bar or by going to Mesh > Generate Mesh. The final mesh should resemble the one in the
figure below.

Named Selections

Now, we need to create named selections to use when we set boundary conditions. To create a
named selection, first ensure that the edge selection filter is selected. Next, left click on the
desired edge you wish to name (multiple edges can be selected while holding down CTRL), then
right click on the edge and select Create Named Selection.
Once you select Create Named Selection, a dialogue box will appear where you will enter the
desired name of the boundary. Use the diagram below to name all of the boundaries of the
geometry.

There are 4 edges that make up the farfield, and they can all be named at once by holding down CTRL,
left clicking all of the edges while holding down CTRL, then right clicking and selecting "Create Named
Selection"

Once the selections are all named and the mesh is created, you may save the project and close the
mesher.
Setup (Physics)
Update the Project and Open FLUENT

Before we open FLUENT, we need to update the project the import the mesh into FLUENT. To
do this, click Update Project . When the project updates, double click Setup
to open FLUENT.

Initial Settings

Before FLUENT launches, we will be prompted to set some options. In Options check the box
next to Double Precision. If you have a dual processor, you can set the option under Processing
Options to Parallel, and change the Number of Processes to 2. We don't necessarily need the
parallel processes for this simulation as it is fairly simple, but it becomes necessary later when
we refine the mesh and complicate the simulation further by changing boundary conditions.

Once the options are set, click OK.

Problem Setup - General

Now, FLUENT should open. We will begin setting up some options for the solver. In the left
hand window (in what I will call the Outline window), under Problem Setup, select General.
The only option we need to change here is the type of solver. In the Solver window, select
Density-Based.
Models

In the outline window, click Models. We will need to utilize the energy equation in order to solve
this simulation. Under Models highlight Energy - Off and click Edit.... Now, the Energy window
will launch. Check the box next to Energy Equation and hit OK. We also need to change the
type of viscosity model. Select Viscous - Laminar and click Edit.... Choose the Inviscid option
and press OK.

Materials

In the Outline window, highlight Materials. In the Materials window, highlight Fluid, and click
Create/Edit.... this will launch the Create/Edit Materials window; here we can specify the
properties of the fluid. Set the Density to Ideal Gas, the Specific Heat to 1006.43, theMolecular
Weight to 28.966. When you have updated these fields, press Change/Create.
Boundary Conditions

In the Outline window, select Boundary Conditions. We will now specify each boundary
condition for the simulation.

Farfield

In the Boundary Conditions window, select farfield. Use the drop-down menu to change the
Type to pressure-far-field. You will be asked to confirm the change, and do so by pressing OK.
Next, a dialogue box will open with some parameters we need to specify. Change the Gauge
Pressure (Pascal) to 101325, and Mach Number to 3.

Also, select the Thermal tab, and ensure that the temperature correctly defaulted to 300 K. When
you are finished, press OK.

Wedge

In the Boundary Conditions window, select wedge. Use the drop-down menu to change the Type
to wall.
Symmetry

In the Boundary Conditions window, select symmetry. Use the drop-down menu to change the
Type to symmetry.

Operating Conditions

In the Boundary Conditions window, select the Operating Conditions button. Change the Gauge
Pressure to 0. Then press OK

Reference Values

In the Outline window, select Reference Values. Change the Compute From parameter to
farfield. Check that the values are accurate. The reference values are used when calculating the
non-dimensional results such as the drag coefficient.
Solution
Solution Methods

In the Outline window, select Solution Methods to open the Solution Methods window. Under
Spatial Discretization, ensure that the option under FlowSecond Order Upwind is selected.

Solution Controls

In the Outline window, select Solution Controls to open the Solution Controls window. Ensure
that the Courant Number is set to 5.0.

Monitors

In the Outline window, click Monitors to open the Monitors window. In the Monitors window,
select Residuals - Print,Plot and press Edit.... This will open the Residual Monitors window. We
want to change the convergence criteria for our solution. Under Equation and to the right of
Continuity, change the Absolute Criteria to 1e-6. Repeat for x-velocity, y-velocity, and energy,
then pressOK.
Solution Initialization

In the Outline window, select Solution Initialization. We need to make an "Initial Guess" to the
solution so FLUENT can iterate to find the final solution. In the Solution Initialization window,
under Compute from, select farfield from the drop down box. Check to see that the values that
generate match our inputted values, then press Initialize

Run Calculation

In the Outline window, select Run Calculation. Change the Number of Iterations to 100.
Double click Calculate to run the calculation. It should only take about a minute to solve. After
the calculation is complete, save the project.

Results
Velocity Vectors

First, let's take a look at the velocity vectors. In the Outline window, under Results select Colors
and Animations. In the Colors and Animations window, under Graphics, select Vectors. Then
press Set Up....

In the Vectors window that opens, change the Scale of the arrows to 0.25, and change the Color
by parameter to Velocity... Mach Number
Hit Display to view the vectors in the graphics window

Once you have plotted the velocity vectors, you may close the Vectors menu.

Mach Number Contours

Next, we will plot the contours of mach number. In the Graphics and Animations window under
_Graphics, select Contours, and press Set Up.... Change the Contours Of parameter to Velocity...
Mach Number. Next, check the box next to Filled.
Change the Levels to 50 and press Display

Next, click on print information icon , and click


anywhere behind the shock. This will display a range of values. For instance, I received
(2.2354529, 2.2513809). These range of values match well with the analytic solution we received
in the pre-anaysis (Mach no. = 2.254, 0.8% difference)

Pressure Coefficient/ Static Pressure Contours

Now, change the Contours Of parameter to Pressure... Pressure Coefficient and press Display.
Next, change the Contours Of parameter to Pressure... Static Pressure and press Display. When
you have plotted the contours of static pressure, you may close the Contours window. Again, use
the print information tool to view the pressure behind the shock. I received the range
(282041.19, 286057.13). The average of this range is about 2.803 atmospheres. From the
analytical solution, we found that the pressure behind the shock is about 2.824, a 0.7%
difference.

Pressure Coefficient Along Wedge

In the Outline window under Results, select Plots. In the Plots window, select XY plot and press
Set Up.... Change the Y Axis Function to Pressure... Pressure Coefficient, and select the Wedge
under Surfaces.

To see the plot, press Plot


Measure Shock Angle

To measure the shock angle, we first need to create a line that we can plot the coefficient of
pressure over. In the Solution XY Plot window, click New Surface > Line/Rake. We will
arbitrarily use the line, y = 0.35. Set the start point of the line as (0,0.35), and the end point of the
line as (1.5,0.35). Name the line y = 0.35. Now press Create

Now, the new surface will appear in the list of surfaces. We want to plot the pressure coefficient
across the wedge and the new line we created in order to determine the shock angle. In the list of
surfaces, select wedge, symmetry, and y = 0.35. Press Plot.
We can then use the information from the plot to solve for the shock angle.

The shock angle from the analytical solution was 32.221 degrees. Because we took the value
from a graph, a bit more error is to be expected.

Print Drag Coefficient

Next, we will have FLUENT report the drag coefficient. Close the Solution XY Plot window. In
the Outline window, go to Reports. In the Reports window under Reports, select Forces and
press Set Up.... Ensure Wedge is selected and press Print. The drag coefficient will be printed.

Verification & Validation

Verification
Adapt the Mesh

In order to test our simulation for convergence, we will refine the mesh. Refining the mesh will
allow use to make sure that the results we are calculating are independent of the mesh. However,
instead of refining the mesh everywhere (which would be wasteful, as most of the area of the
domain far away from the shock has constant values), we will use our results to refine our mesh.
Specifically, we are going to use the gradient of the pressure to determine where to refine the
mesh. First, let's take a look at our mesh. In the Outline window, select Graphics and
Animations, under _Graphics, select Mesh, then press Setup. Select all of the surfaces (except
y=0.35) and press Display. This will display the current mesh.
You may now close the Mesh Display window. In the menu bar, go to Adapt > Gradient. Under
Options uncheck Coarsen. Under Method click the radio box next to Gradient. Ensure that
Gradients of > Pressure... Static Pressureare selected. Then press Compute.

This will compute the maximum and minimum gradients of static pressure. Next, we need to
pick a threshold. In order to do this, click on Contours.... This will open the familiar Contours
window. In the Contours window, select Contours ofAdaption... Existing Value, then press
Compute. This will populate the Contours menu with the values were were viewing for adaption,
in this case, gradient of the static pressure. Also, make sure to uncheck Node Values.
Finally, press Display to display the contours of static pressure gradient.

Our goal is to discover the areas of high gradient, and mark those areas for adaption. Using the
contour graph we can then find the areas of high pressure gradient that we want to refine. In the
Contours window, uncheck Auto Range. This will allow us to specify the range of gradients we
can see in the graph. Change the Min value to 10000. Then press Display. You will see that the
pressure gradients above 10000 generally mark the area of high pressure gradient quite well. We
will use 10000 as our threshold for refinement.
Return to the Gradient Adaption window, and enter 10000 into Refine Threshold. Then press
Mark. The print window will inform us we have marked 70 elements for refinement. Next, press
Adapt. You will be asked if you want to change the mesh. Press Yes.

It will seem like nothing has changed, but that is because we need to re-display the mesh in order
to see the adaption. The new mesh should look something like this.

Notice that the area surrounding the shock was refined. Now, re-initialize the solution, (Solution
Initialization > Compute FromFarfield> Initialize), and rerun the solution (you will also need to
increase the number of iterations – I recommend 150).

Now, once again, plot the contours of the mach number. Below is a comparison of the mach
number results from the original mesh and the refined mesh.
Original Mesh

Refined Mesh

The most striking difference between the two results is the thickness of the shock. Notice that for
the refined mesh, the shock is less thick that for the original mesh. This shows that the refined
mesh is converging towards the real case.

Comparison to Analytical Solution

In order to verify our simulation, we need to compare our results to either an analytical solution
or an experiment. Below is a table comparing the values from the simulation with the
calculations from the pre-analysis.

Mach Number Static Pressure (atm) Shock Angle (degrees)

Theory Value 2.254 2.824 32.22

FLUENT Solution 2.243 2.803 34.99

Percent Difference 0.8% 0.7% 8.2%

As we can see from the table, we are getting fairly good matching between the computation and
analytical approaches. From this we can build our trust in our simulation.
Supersonic Flow Over a Cone

Change the geometry from a wedge to a cone. What do you expect to change?

In the Outline window, click on General under Problem Setup. Under 2D Space select
Axisymmetric. We also need to change the boundary condition for the symmetry to an axis. Click
on Boundary Conditions in the Outline window. In the Boundary Conditions window, under
Zone, select Symmetry. Change the Type to Axis. Now, reinitialize the solution, then run it again
for 100 iterations.

Separated Shock

Next, we will alter the geometry to achieve a separated shock. Close FLUENT and open the
Design Modeler. We want to increase the angle of the wedge above its critical angle. We will
increase the angle to 35 degrees. Change the geometry's dimensions to match that of the diagram
below.

Once the geometry has changed, close the design modeler. We will have to re-calculate the
solution, but we will want to change some factors affecting the solution. Usually, when you make
an upstream change in ANSYS, the program will update all of the downstream data. We want to
break this connection, so right click and select
Reset. We will have to input the boundary conditions again, but that shouldn't take long – and
will end up saving us time when we calculate the solution inside of the FLUENT environment.

Next, open up the mesher by double clicking . Update the mesh by clicking
. Close the mesher, click , then once again double click
. Re-enter all of the data from Step 5 (here is link for reference).
This time, set the Courant Number to 1.0. This will make the solution a little more unstable, but
it will solve much, much faster. Run the solution again, this time with 5000 iterations.
Plot the contour plot of the mach number to see how the shock has changed.

Solution Procedure

Setup (Physics)
Update the Project and Open FLUENT

Before we open FLUENT, we need to update the project the import the mesh into FLUENT. To
do this, click Update Project . When the project updates, double click Setup
to open FLUENT.

Initial Settings

Before FLUENT launches, we will be prompted to set some options. In Options check the box
next to Double Precision. If you have a dual processor, you can set the option under Processing
Options to Parallel, and change the Number of Processes to 2. We don't necessarily need the
parallel processes for this simulation as it is fairly simple, but it becomes necessary later when
we refine the mesh and complicate the simulation further by changing boundary conditions.
Once the options are set, click OK.

Problem Setup - General

Now, FLUENT should open. We will begin setting up some options for the solver. In the left
hand window (in what I will call the Outline window), under Problem Setup, select General.
The only option we need to change here is the type of solver. In the Solver window, select
Density-Based.

Models

In the outline window, click Models. We will need to utilize the energy equation in order to solve
this simulation. Under Models highlight Energy - Off and click Edit.... Now, the Energy window
will launch. Check the box next to Energy Equation and hit OK. We also need to change the
type of viscosity model. Select Viscous - Laminar and click Edit.... Choose the Inviscid option
and press OK.
Materials

In the Outline window, highlight Materials. In the Materials window, highlight Fluid, and click
Create/Edit.... this will launch the Create/Edit Materials window; here we can specify the
properties of the fluid. Set the Density to Ideal Gas, the Specific Heat to 1006.43, theMolecular
Weight to 28.966. When you have updated these fields, press Change/Create.

Boundary Conditions

In the Outline window, select Boundary Conditions. We will now specify each boundary
condition for the simulation.
Farfield

In the Boundary Conditions window, select farfield. Use the drop-down menu to change the
Type to pressure-far-field. You will be asked to confirm the change, and do so by pressing OK.
Next, a dialogue box will open with some parameters we need to specify. Change the Gauge
Pressure (Pascal) to 101325, and Mach Number to 3.

Also, select the Thermal tab, and ensure that the temperature correctly defaulted to 300 K. When
you are finished, press OK.

Wedge

In the Boundary Conditions window, select wedge. Use the drop-down menu to change the Type
to wall.

Symmetry

In the Boundary Conditions window, select symmetry. Use the drop-down menu to change the
Type to symmetry.

Operating Conditions

In the Boundary Conditions window, select the Operating Conditions button. Change the Gauge
Pressure to 0. Then press OK
Reference Values

In the Outline window, select Reference Values. Change the Compute From parameter to
farfield. Check that the values are accurate. The reference values are used when calculating the
non-dimensional results such as the drag coefficient.
Solution
Solution Methods

In the Outline window, select Solution Methods to open the Solution Methods window. Under
Spatial Discretization, ensure that the option under FlowSecond Order Upwind is selected.

Solution Controls

In the Outline window, select Solution Controls to open the Solution Controls window. Ensure
that the Courant Number is set to 5.0.

Monitors

In the Outline window, click Monitors to open the Monitors window. In the Monitors window,
select Residuals - Print,Plot and press Edit.... This will open the Residual Monitors window. We
want to change the convergence criteria for our solution. Under Equation and to the right of
Continuity, change the Absolute Criteria to 1e-6. Repeat for x-velocity, y-velocity, and energy,
then pressOK.

Solution Initialization

In the Outline window, select Solution Initialization. We need to make an "Initial Guess" to the
solution so FLUENT can iterate to find the final solution. In the Solution Initialization window,
under Compute from, select farfield from the drop down box. Check to see that the values that
generate match our inputted values, then press Initialize

Run Calculation

In the Outline window, select Run Calculation. Change the Number of Iterations to 100.
Double click Calculate to run the calculation. It should only take about a minute to solve. After
the calculation is complete, save the project.
Results
Velocity Vectors

First, let's take a look at the velocity vectors. In the Outline window, under Results select Colors
and Animations. In the Colors and Animations window, under Graphics, select Vectors. Then
press Set Up....

In the Vectors window that opens, change the Scale of the arrows to 0.25, and change the Color
by parameter to Velocity... Mach Number

Hit Display to view the vectors in the graphics window


Once you have plotted the velocity vectors, you may close the Vectors menu.

Mach Number Contours

Next, we will plot the contours of mach number. In the Graphics and Animations window under
_Graphics, select Contours, and press Set Up.... Change the Contours Of parameter to Velocity...
Mach Number. Next, check the box next to Filled.

Change the Levels to 50 and press Display


Next, click on print information icon , and click
anywhere behind the shock. This will display a range of values. For instance, I received
(2.2354529, 2.2513809). These range of values match well with the analytic solution we received
in the pre-anaysis (Mach no. = 2.254, 0.8% difference)

Pressure Coefficient/ Static Pressure Contours

Now, change the Contours Of parameter to Pressure... Pressure Coefficient and press Display.

Next, change the Contours Of parameter to Pressure... Static Pressure and press Display. When
you have plotted the contours of static pressure, you may close the Contours window. Again, use
the print information tool to view the pressure behind the shock. I received the range
(282041.19, 286057.13). The average of this range is about 2.803 atmospheres. From the
analytical solution, we found that the pressure behind the shock is about 2.824, a 0.7%
difference.

Pressure Coefficient Along Wedge

In the Outline window under Results, select Plots. In the Plots window, select XY plot and press
Set Up.... Change the Y Axis Function to Pressure... Pressure Coefficient, and select the Wedge
under Surfaces.
To see the plot, press Plot

Measure Shock Angle

To measure the shock angle, we first need to create a line that we can plot the coefficient of
pressure over. In the Solution XY Plot window, click New Surface > Line/Rake. We will
arbitrarily use the line, y = 0.35. Set the start point of the line as (0,0.35), and the end point of the
line as (1.5,0.35). Name the line y = 0.35. Now press Create
Now, the new surface will appear in the list of surfaces. We want to plot the pressure coefficient
across the wedge and the new line we created in order to determine the shock angle. In the list of
surfaces, select wedge, symmetry, and y = 0.35. Press Plot.

We can then use the information from the plot to solve for the shock angle.

The shock angle from the analytical solution was 32.221 degrees. Because we took the value
from a graph, a bit more error is to be expected.
Print Drag Coefficient

Next, we will have FLUENT report the drag coefficient. Close the Solution XY Plot window. In
the Outline window, go to Reports. In the Reports window under Reports, select Forces and
press Set Up.... Ensure Wedge is selected and press Print. The drag coefficient will be printed.

Verification & Validation

Verification
Adapt the Mesh

In order to test our simulation for convergence, we will refine the mesh. Refining the mesh will
allow use to make sure that the results we are calculating are independent of the mesh. However,
instead of refining the mesh everywhere (which would be wasteful, as most of the area of the
domain far away from the shock has constant values), we will use our results to refine our mesh.
Specifically, we are going to use the gradient of the pressure to determine where to refine the
mesh. First, let's take a look at our mesh. In the Outline window, select Graphics and
Animations, under _Graphics, select Mesh, then press Setup. Select all of the surfaces (except
y=0.35) and press Display. This will display the current mesh.

You may now close the Mesh Display window. In the menu bar, go to Adapt > Gradient. Under
Options uncheck Coarsen. Under Method click the radio box next to Gradient. Ensure that
Gradients of > Pressure... Static Pressureare selected. Then press Compute.
This will compute the maximum and minimum gradients of static pressure. Next, we need to
pick a threshold. In order to do this, click on Contours.... This will open the familiar Contours
window. In the Contours window, select Contours ofAdaption... Existing Value, then press
Compute. This will populate the Contours menu with the values were were viewing for adaption,
in this case, gradient of the static pressure. Also, make sure to uncheck Node Values.

Finally, press Display to display the contours of static pressure gradient.


Our goal is to discover the areas of high gradient, and mark those areas for adaption. Using the
contour graph we can then find the areas of high pressure gradient that we want to refine. In the
Contours window, uncheck Auto Range. This will allow us to specify the range of gradients we
can see in the graph. Change the Min value to 10000. Then press Display. You will see that the
pressure gradients above 10000 generally mark the area of high pressure gradient quite well. We
will use 10000 as our threshold for refinement.

Return to the Gradient Adaption window, and enter 10000 into Refine Threshold. Then press
Mark. The print window will inform us we have marked 70 elements for refinement. Next, press
Adapt. You will be asked if you want to change the mesh. Press Yes.

It will seem like nothing has changed, but that is because we need to re-display the mesh in order
to see the adaption. The new mesh should look something like this.
Notice that the area surrounding the shock was refined. Now, re-initialize the solution, (Solution
Initialization > Compute FromFarfield> Initialize), and rerun the solution (you will also need to
increase the number of iterations – I recommend 150).

Now, once again, plot the contours of the mach number. Below is a comparison of the mach
number results from the original mesh and the refined mesh.

Original Mesh

Refined Mesh
The most striking difference between the two results is the thickness of the shock. Notice that for
the refined mesh, the shock is less thick that for the original mesh. This shows that the refined
mesh is converging towards the real case.

Comparison to Analytical Solution

In order to verify our simulation, we need to compare our results to either an analytical solution
or an experiment. Below is a table comparing the values from the simulation with the
calculations from the pre-analysis.

Mach Number Static Pressure (atm) Shock Angle (degrees)

Theory Value 2.254 2.824 32.22

FLUENT Solution 2.243 2.803 34.99

Percent Difference 0.8% 0.7% 8.2%

As we can see from the table, we are getting fairly good matching between the computation and
analytical approaches. From this we can build our trust in our simulation.

ANSYS WB - Compressible Flow in a Nozzle - Problem Specification

Problem Specification

Consider air flowing at high-speed through a convergent-divergent nozzle having a circular


cross-sectional area, A, that varies with axial distance from the throat, x, according to the formula

A = 0.1 + x2; -0.5 < x < 0.5

whereA is in square meters and x is in meters. The stagnation pressure po at the inlet is 101,325
Pa. The stagnation temperature To at the inlet is 300 K. The static pressure p at the exit is 3,738.9
Pa. We will calculate the Mach number, pressure and temperature distribution in the nozzle using
FLUENT and compare the solution to quasi-1D nozzle flow results. The Reynolds number for
this high-speed flow is large. So we expect viscous effects to be confined to a small region close
to the wall. So it is reasonable to model the flow as inviscid.

Pre-Analysis & Start-Up


Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going to


Start > ANSYS > Workbench. This will open the start up screen seen as seen below

Setup Project

To begin, we need to tell ANSYS what kind of simulation we are doing. If you look to the left of
the start up window, you will see the Toolbox Window. Take a look through the different
selections. We will be using FLUENT to complete the simulation. Load the Fluid Flow
(FLUENT) box by dragging and dropping it into the Project Schematic.
Right click the top box of the project schematic and go to Rename, and
name the project Compressible Flow in a Nozzle.You are ready to create the geometry for
the simulation.

Geometry
Care to skip the geometry and meshing steps? README
If you would prefer to skip the geometry and mesh steps, then you can download the necessary files
here. Download the "zip" file, then extract the files to your working directory. In order to load the
necessary files, go to the Workbench Project Page, then (Click) File > Open > "Compressible Flow in a
Nozzle.wbpj". Lastly, click here to skip ahead to Step 4 of the tutorial.

You can create the 2D geometry on your own as well. Please download the coordinates file and
make sure you under stand the content before you proceed to the video.

download coordinates file here

1 1 -0.5 0.333778669 0
1 2 -0.45 0.310303908 0
1 3 -0.4 0.287681033 0
1 4 -0.35 0.266127383 0
1 5 -0.3 0.24592425 0
1 6 -0.25 0.227431826 0
1 7 -0.2 0.211100165 0
1 8 -0.15 0.197466123 0
1 9 -0.1 0.187120297 0
1 10 -0.05 0.180628589 0
1 11 0 0.178412203 0
1 12 0.05 0.180628589 0
1 13 0.1 0.187120297 0
1 14 0.15 0.197466123 0
1 15 0.2 0.211100165 0
1 16 0.25 0.227431826 0
1 17 0.3 0.24592425 0
1 18 0.35 0.266127383 0
1 19 0.4 0.287681033 0
1 20 0.45 0.310303908 0
1 21 0.5 0.333778669 0

2 1 0.5 0.333778669 0
2 2 0.5 0 0

3 1 0.5 0 0
3 2 -0.5 0 0

4 1 -0.5 0 0
4 2 -0.5 0.333778669 0

We only need to model half of the nozzle because it can be solved using the axisymmetric solver
in FLUENT. The 2D nozzle has 4 edges and we will need to import a coordinate file to create the
diverging-converging nozzle wall.

Coordinates File
You should see five columns of data in the coordinates file.
The first column is the Group number. The coordinates data are assigned to groups to
distinguish edges.
The second column is the Group ID. Each set of coordinate needs to be assigned an ID so they
can be imported in the correct order.
The third column is the x coordinate. It varies from -0.5 to 0.5, as shown in the problem
statement.
The fourth column is the y coordinate. The y coordinate (radial coordinate) can be written as the
radius of the nozzle in terms of nozzle cross section area: A = pi*r^2.
The last column is the z coordinate. Although we are working with a 2D model, the tool we will
use to import the coordinates requires coordinates in all three directions. We can conveniently set
the z coordinates to 0.

The coordinates in the text file need to be grouped in a way that the end coordinate of a group must
be the start coordinate of the next group. For instance, the end coordinate of group 1 is (0.5
0.333778669, 0) is the same as the start coordinate of group 2.

Create the Geometry


Note that you need to suppress the line bodies before moving on, otherwise you might get an
error later. Right click on each line body and select Suppress Body as shown below. Then, save
your project before moving to the next step.

Mesh

The following video will show you how the mesh was created:

Setup (Physics)

The following video will walk you through setting up boundary conditions for our analysis.

Solution

The following video will walk you through setting up the solution for our analysis.

Solution

The following video will walk you through setting up the solution for our analysis.

Results
Download this file
Download thismach1D.xy file and save it somewhere convenient. It will be used in this portion of the
tutorial.

The following video will walk you through looking at the results of the analysis.
In order to make plots comparing the Fluent results with the corresponding analytical results, it is
recommended that you export the data from FLUENT into Excel or MATLAB and make the
plots in Excel or MATLAB. You can export data in a FLUENT "XY Plot" into a text file using
the Write to file option. The following video walks you through the process of exporting the
Mach number variation along x to a text file and reading in the Mach number values into Excel.

ANSYS WB - Turbulent Pipe Flow (LES) - Problem Specification

Problem Specification
Consider fluid flowing through a cylindrical pipe of diameter D = 0.0127 m and length L = 5D
= 0.0635 m. The bulk velocity at the pipe inlet is Ubulk = 6.58 m/s. Let us consider the case where
the density of the fluid is constant. Take density ρ = 1.331 kg/ m3 _and coefficient of viscosity _µ
= 2.34 x 10-5 kg/(ms). The Reynolds number Re based on the pipe diameter and the bulk velocity
is

Solve the above fluid flow problem using the LES capability in FLUENT via ANSYS
Workbench. Plot the mean and the root mean square velocities versus the radial distance at a
particular x/D downstream of the inlet. Compare the mean velocity obtained from the LES
simulation with the mean velocity obtained using the k-ε model.

Step 1: Pre-Analysis & Start-Up


Preliminary Analysis

In Large-Eddy Simulations, the instantaneous velocity U(x,t) is decomposed into a filtered


component Ū(x,t) and a residual component u'(x,t). The filtered velocity component represents
the large scale unsteady motions. In LES, the large scale turbulent motions are directly
represented whereas the effects of small scale turbulent motions are modeled. The filtered
equations for the filtered velocity can be obtained from the Navier-Stokes equations. The non-
linear convective term in the momentum equation introduces a residual stress tensor which is due
to the residual motions. Closure is needed for this residual stress tensor and hence require
modeling. There are simple to complex models in FLUENT which we will use.

Since we are solving for Ū(x,t), the LES is an unsteady simulation where we march in time. In
order to collect statistics like the mean and the root mean square (r.m.s.) velocities, we need to
first reach a statistically stationary state. In comparison, simulation using k-ε model solves only
for the mean velocity.
More information on the LES can be found in Turbulent Flows book by Pope[2000].

Start ANSYS FLUENT

Since LES is a three-dimensional unsteady simulation, the computational domain is a full pipe.

Prior to opening ANSYS, create a folder called turbulent_pipe_LES in a convenient location.


We'll use this as the working folder in which files created during the session will be stored. For
this simulation Fluent will be run within the ANSYS Workbench Interface. Start ANSYS
workbench:

Start> All Programs>Ansys 14.0> Workbench 14.0

The following figure shows the workbench window.

Step 2: Geometry
Saving

It would be of best interest, to save the project at this point. Click on the "Save As.." button,
, which is located on the top of the Workbench Project Page. Save the project as
"TurbulentPipeFlow" in your working directory. When you save in ANSYS, a file and a folder
will be created. For instance if you save as "TurbulentPipeLES", a "TurbulentPipeLES.wbpj" file
and a folder called "TurbulentPipeLES_files" will appear. In order to reopen the ANSYS files in
the future you will need both the ".wbpj" file and the folder. If you do not have BOTH, you will
not be able to access your project.

Fluid Flow (FLUENT) Project Selection

Left click (and hold) on Fluid Flow (FLUENT), and drag the icon into the empty space in
the Project Schematic. Your ANSYS window should now look comparable to the image below.

Rename the project to TurbulentPipeLES. We will work through each step from top down to
obtain the solution to the problem.

Analysis Type

As noted earlier, the computational domain for this simulation will be a full 3-dimensional
pipe. In the Project Schematic of the Workbench window, right click on Geometry and
select Properties. The properties menu will then appear to the right of the Workbench window.
Under Advance Geometry Options, make sure that the Analysis Type is 3D as shown in the
image below.
Launch Design Modeler

In the Project Schematic, double click on Geometry to start preparing the geometry.
At this point, a new window, ANSYS Design Modeler will be opened. You will be asked to
select desired length unit. Use the default meter unit and click OK.

Creating Cylinder

From the Create menu, choose Primitives and then Cylinder.

Create> Primitives> Cylinder


You should see Cylinder1 in Tree Outline as shown in figure below.

Now we have to define the dimensions for the cylinder according to the problem specifications.
Let us assume that the axis of the cylinder is in x-direction.

In the Details View table, change Base Plane to YZPlane, Axis X Component to 0.0635 m and
Radius (>0) to 0.00635m. Click Generate, this will create a cylinder with YZ plane as the base
plane and X-axis as the axis of the cylinder. The cylinder has a diameter of 0.0127 m and is
0.0635 m long. Inputs in the Details View table are shown below.

At this point, you can close the Design Modeler and go back to Workbench Project Page. Save
your work thus far in the Workbench Project Page.

Step 3: Mesh
In this section the geometry will be meshed using inflation feature to cluster more cells near the
wall of the cylinder.
Launch Mesher

In order to begin the meshing process, go to the Workbench Project Page, then (Double Click)
Mesh.

Inflation Feature (Mesh Control).

Right-click on the Mesh, in the Outline view, choose Insert and then choose Inflation.

Mesh> Insert> Inflation

The Outline view should look something similar to the figure below.

The parameters for the Inflation are given in the Details Pane. With Geometry highlighted,
select the cylinder using body selection tool, , and click Apply.

With Boundary highlighted, select the lateral surface using face selection tool, , and
click Apply.
Finally, change Maximum Layers to 15 since we need more cells near the wall. The Details view
should look something similar to the figure below.

Click on the Mesh in the Outline View to get the mesh details in the Details View. Under
Sizing,changeUse Advanced Size Function to Off, Relevance Center to Fine, element Size
to 4e-04m, Smoothing to High,
Right-click Mesh and choose to Generate Mesh, , to generate the mesh.
The Details View should look something similar to:
From the Mesh Statistics (in the figure above) we observe that we have about 0.85 million
elements which would require multiple cores to run the simulation.

Create Named Selections

Here, the faces of the geometry will be given names so one can assign boundary conditions in
Fluent in later steps. The left face of the pipe will be called "Inlet" and the right face will be
called "Outlet". The lateral (or curved) surface of the pipe will be called "PipeWall".

To name the left face select the face selection tool, , (Left) Click the appropriate face and
then (Right) Click to select Create Named Selection.
Enter Inlet in the Selection Name Box as shown in the figure.

Repeat the same procedure for the other two faces.

Save, Exit & Update

First save the project. Next, close the Mesher window. Then, go to the Workbench Project
Page and click the Update Project button, .
Step 4: Setup (Physics)
Regardless of whether you downloaded the mesh and geometry files or if you created them
yourself, you should have checkmarks to the right of Geometry and Mesh. Your
current Workbench Project Page should look comparable to the following image.

A question mark should appear to the right of the Setup cell. This indicates that
the Setup process has not yet been completed. This means that the mesh and the geometry data
need to be read into FLUENT.

Launch Fluent

Double click on Setup in the Workbench Project Page which will bring up the FLUENT
Launcher. When the FLUENT Launcher appears change the Options to "Double Precision",
and Processing Options to "Parallel (Local Machine)" with Number of Processes equal to "4" or
to the available number of processors at your end. Click OK as shown below.
Twiddle your thumbs a bit while the FLUENT interface starts up. This is where we'll specify the
governing equations and boundary conditions for our problem. On the left-hand side of the
FLUENT interface, we see various items listed under Problem Setup. andSolution. We will work
from top to bottom of both these items to setup the physics of our boundary-value problem. On
the right hand side, we have the Graphics pane and, below that, the Command pane.

Check and Display Mesh

First, the mesh will be checked to verify that it has been properly imported from Workbench.
(Click) Mesh > Check and make sure that the minimum volume is positive. It is a good practice
to check if x/y/z - domain extents are according to the dimensions given in the problem
specification.

In order to obtain the statistics about the mesh (Click) Mesh > Info > Size, as shown in the
image below.
Then, you should obtain the following output in the Command pane.

In order to bring up the display options (Click) General > Mesh > Display. Make sure you have
inlet, outlet, pipewall and interior-solid in Surfaces as shown in the figure below.
Please review the "Laminar Pipe Flow" tutorial to understand how to rotate, zoom-in and zoom-
out the geometry in the Graphics Window.

Define Solver Properties

In this section the various solver properties will be specified in order to obtain the proper
solution. On the left side of the window (Click) Problem Setup> General. Make sure
that Pressure-Based is selected under Type and Transient is selected under Time in
the Solver section. Note: LES is a transient simulation where the solution is marched in time.

Next, the Viscous Model parameters will be specified. In order to open the Viscous Model
Options (Click) Problem Setup > Models > Viscous - Laminar > Edit.... Click Large Eddy
Simulation under Model and WMLES under Subgrid-Scale Model. Click OK.
An Information box will appear as shown below, click OK. Basically, FLUENT switches the
discretization scheme for momentum equation to Bounded Central-Differencing. It also urges to
change the order to Second Order Implicit for Transient Formulation in the Solution Methods,
which we will do in the later stages.

For incompressible flows, the energy equation is decoupled from the continuity and the
momentum equations. So the energy equation is not solved. Make sure that Energy is set
to Off in Problem Setup > Models > Energy.

Define Material Properties

Now, the properties of the fluid that is being modeled will be specified. The properties of the
fluid were specified in the Problem Specification section. In order to create a new fluid (Click)
Problem Setup > Materials > Fluid > Create/Edit... as shown in the image below.
In the Create/Edit Materials menu set the Density to 1.331 kg/m^3 (constant) and set
the Viscosity to 2.34e-05 kg/(ms) (constant) as shown in the image below.
Click Change/Create. Close the window.

Define Boundary Conditions

At this point the boundary conditions for the three Named Selections will be specified.

Inlet Boundary Condition

In order to start the process (Click) Problem Setup > Boundary Conditions > inlet > Edit... as
shown in the following image.
Note that the Boundary Condition Type should have been automatically set to velocity-inlet.
Now, the velocity at the inlet will be specified. In the Velocity Inlet menu set the Velocity
Specification Method to Magnitude, Normal to Boundary, set the Velocity Magnitude (m/s) to
6.58 m/s and set the Fluctuation Velocity Algorithm to Spectral Synthesizer (this is needed to
fluctuate the velocity at the inlet). Also set the Turbulence Specification Method to Intensity
and Hydraulic Diameter. Set the value of Turbulent Intensity (%) to 10 % and Hydraulic
Diameter (m) to 0.0127 m. Finally set the Reynolds-Stress Specification Method to K or
Turbulent Intensity as shown below. Click OK to close the Velocity Inlet menu.

Outlet Boundary Condition

First, select outlet in the Boundary Conditions menu, as shown below.


As can be seen in the image above the Type should have been automatically set to pressure-
outlet. If the Type is not set to pressure-outlet, then set it to pressure-outlet. Now, no further
changes are needed for the outlet boundary condition.

Pipe Wall Boundary Condition

First, select pipewall in the Boundary Conditions menu, as shown below.


As can be seen in the image above the Type should have been automatically set to wall. If
the Type is not set to wall, then set it to wall. Now, no further changes are needed for
the pipe_wall boundary condition. Also make sure that the boundary condition Type for interior-
solid is Interior.

It is a good practice to change the Reference Values now, these values can be useful when we are
postprocessing results later on. (Click)Problem Setup > Reference Values. Select Compute
from as inlet.

Save

In order to save your work (Click)File> Save Project as shown in the image below.
Step 5: Solution
Solution Methods

Click on Solution Methods then click on Momentum and select Bounded Central
Differencing as shown in the image below. Also choose, Second order for Pressure and Second
Order Implicit under Transient Formulation. as
Set Initial Guess

Here, the flow field will be initialized to the values at the inlet. In order to carry out the
initialization click on Solution Initialization then click on Compute from and select inlet as
shown below.
Then click initialize to initialize the domain with an initial guess. This completes the
initialization.

Set Convergence Criteria

FLUENT reports a residual for each governing equation being solved. The residual is a measure
of how well the current solution satisfies the discrete form of each governing equation. We'll
iterate the solution until the residual for each equation falls below 1e-6. In order to specify the
residual criteria (Click) Monitors > Residuals > Edit..., as shown in the image below.
Next, change the residual under Convergence Criterion for continuity, x-velocity,and y-velocity,
all to 1e-6, as can be seen below.
Lastly, click OK to close the Residual Monitors menu.

Execute Calculation

Note that, we have to run the transient simulation to a statistically stationary state and then
collect statistics. Click on Run Calculation then choose the Time Step Size(s) as 1e-05 and the
Number of Time Steps as 20000. Also choose Extrapolate Variables option (refer to FLUENT
documentation for information) and leave the Max Iterations/Time Step as 20 (default). The
corresponding image is shown below.
As a safeguard save the project now. Now, click on Calculate in order to run the calculation. The
residuals for each iteration are printed out as well as plotted in the graphics window as they are
calculated. The residuals decrease during the inner iterations and jump again when we advance
by one time step as shown in image below.

From the above inputs, it is clear that 20 inner iterations are carried out to advance the simulation
by one time step and we requested for 20,000 time steps. So, typically these simulations are very
long even if we use 4 processors. To reduce the simulation time one can opt to High Performance
Computing (HPC) resources. The calculations performed for this tutorial are based on the
simulations run on an HPC cluster using 48 cores
In this simulation, it is verified that the statistically stationary state is reached by advancing the
simulation from 0s to 0.1s in physical time i.e. using only 10,000 time steps with 1e-05s time
step size with 20 inner iterations.When statistically stationary state is reached, statistics have to
be collected by advancing the physical time from 0.1s to atleast 0.15s. Use 5,000 time steps with
1e-05 time step size with 20 inner iterations. This is done as shown in the figure below. Select
the Data Sampling for Time Statistics to start collecting the statistics. You will see the physical
time for which the statistics have been collected across Time Sampled (s).
Collect the statistics for 0.05s (this corresponds to marching from 0.1s to 0.15s in time) as shown
in the above figure. At this point save the project once again.

Step 6: Results
Contour plots of Axial Velocity

Note that there are two types of velocities in an LES simulation - instantaneous velocity and
mean velocity. The instantaneous velocity is the actual velocity at any time instant in the domain.
When we collect the statistics, the instantaneous velocity is time-averaged to obtain the mean
velocity. Let us make a mid-plane in the domain to look at the contour plots of instantaneous
axial velocity and the mean axial velocity.

(Click) Graphics and Animation > Contours > Set Up.. as shown in the figure below.
In the Contours window, click on New Surface > Plane... as shown below.
In the Plane Surface window, click Point and Normal. Under Points, choose (x0 (m), y0 (m),
z0 (m)) = (0,0.0635,0) and under Normal choose (ix (m), iy (m), iz (m)) = (1,0,0). Name the
surface as midplane_les under New Surface Name. Click Create. The plane can be viewed using
Graphics and Animations > Mesh > Set Up....
Go back to Contours window and select Velocity... and Y Velocity under Contours of and under
Surfaces choose midplane_les and click Display. The figure below shows the contour plot of
instantaneous axial velocity.

For the contour plot of the mean axial velocity, select Unsteady Statistics... and Mean Y
Velocity under Contours of and under Surfaces choose midplane_les and click Display
From the two plots we can clearly see the difference between the two velocities.

XY plot of Axial Velocity

Let us make a line across the pipe at the center of the domain to look at the mean axial velocity
and compare it with the solution from k-e model in the next section.

(Click) Plots > XY Plot > Set Up.. as shown in the figure below.
In the Solution XY Plot window, click on New Surface > Line/Rake... as shown below.
In the Line/Rake Surface window, under End Points choose (x0 (m), y0 (m), z0 (m)) =
(0,0.03175,0) and (x1 (m), y1 (m), z1 (m)) = (0,0.03175,0.00635). Name the surface
as midline_les under New Surface Name. Click Create. The line can be viewed using Graphics
and Animations > Mesh > Set Up....
Go back to Solution XY Plot window and select Unsteady Statistics... and Mean Y
Velocity under Y Axis Function and under Plot Direction choose (X,Y,Z) = (0,0,1).
Choose midline_les under Surfaces and click Plot. The figure below shows the contour plot of
instantaneous axial velocity.

To save the line plot, select Write to File in the Solution XY Plot window and click Write. Select
a location and save the file as MeanYVel_LES.xy.
Save the project and close FLUENT.

Step 7: Verification & Validation


In order to verify the LES solution to the turbulent pipe flow problem, we will compare it against
the solution obtained using standard k-e model.

Turbulent Pipe with k-e model

In the Workbench Project Page, left-click on the downward pointing arrow on the top-left corner
of the TurbulentPipeLES project and select Duplicate from the drop down menu as shown in the
figure below.

\A new project will be created. Rename this new project as TurbulentPipeRANS as shown in
figure below.
Next, double click on the Solution cell of the TurbulentPipeRANS project. This will launch the
FLUENT solver. Here we will change the viscosity model to k-e model. In the FLUENT
window, click on Generaltab on the left hand side pane. Choose Steady for Time. Click OK for
the pop-up warning.

Next click on Models>Viscous on the left hand side pane as shown below. Choose Edit....
In the Viscous Model window, choose k-epsilon (2 eqn) for Model. Choose Realizable for k-
epsilon Model. Choose Enhanced Wall Treatment for Near-Wall Treatment. Click OK as
shown in the figure below.
Click on Boundary Conditions tab on the left hand side pane. Choose Outlet and click
Edit....Change the Turbulence Specification Method to Intensity and Hydraulic Diameter. Set
Backflow Turbulent Intensity to 10% and Backflow Hydraulic Diameter to 0.0127m. Click OK.

Next, click on Solution Methods tab on the left hand side pane. Choose Second Order
Upwind for Turbulent Kinetic Energy and Turbulent Dissipation Rate.
Click on Monitors >Residual and click Edit.... Set 1e-06 for k and epsilon. In order to get faster
convergence, choose 1e-05 for continuity and click OK.
Click on Solution Initialization and click Compute from and choose inlet.Click initialize as
shown below.
Click on Run Calculation and set Number of Iterations to 1000.Click Calculate as shown
below.
The solution converges in about 600 iterations.

Create Line

Click on Plots > XY Plot > Set Up... as shown below.


In the Solution XY Plot, choose New Surface > Line/Rake... as shown below.
Choose the coordinates of the two points that define the line as below and name the line as
midline_ke and click Create and Close the window.
The line can be viewed by clicking Graphics and Animations > Mesh > Set Up....

Go back to the Solution XY Plot window by clicking Plots > XY Plot > Set Up.... In this window,
choose Velocity... and Y Velocity for Y-Axis Function. Also, choose 0, 0, 1 as the Plot Direction.
Finally, choose midline_ke under Surfaces. and click Plot.
To compare the solution from LES simulation with that from the k-e model, click Load File... in
the Solution XY Plot and choose the saved file MeanYVel_LES.xy from the previous section as
shown in the figure below
In the Solution XY Plot select Mean Y Velocity under File Data and click Plot. The figure below
shows the comparison of the mean Y velocity from k-e and LES simulations, both the results are
very close which validates the solution procedure for the LES simulation.

ANSYS WB - Nasal Airway Model - Problem Specification

This tutorial is designed to show the process of extracting a nasal airway cavity geometry from a
set of CT scans using Materialize MIMICs software. The tutorial also explains meshing the
geometry in ICEM CFD and solving the model in FLUENT.

This process was created for my Masters of Engineering research which the goal is to model and
quantify nasal reconstruction surgical procedures. Comparing the various surgical techniques
using CFD results will help surgeons determine the proper procedure for the type of nasal airway
obstruction in the patient.

Problem Specification
Goals
1- Process the set of CT Scan images
2- Extract the Geometry of the cavity using MIMICs software
3- Mesh the created STL file in ANSYS ICEM CFD
4- Solve the model in FLUENT
5- Compare the pressure and shear stress on the nasal wall

Anatomy
Understanding the nasal anatomy is essential in determining the proper geometry for the model.
The nasal airway cavity is a very complex structure extending from the nostrils at the anterior of
the head, to the nasopharynx at the posterior of the throat. For a reference the cavity extends all
the way to the uvula in the back of your throat, so your nasal cavity extends deep inside the skull.
The right and left nostril are separated by the septum, a membrane that is mostly cartilage in the
anterior of the nose but becomes a thin bone in the posterior of the cavity. Air flow enters the
nose through the nostrils, entering vertically and the flow is redirected horizontally with the
curvature of the nose. The nose itself contains flaps of cartilage that act as valves, during a deep
inhale the sides of the nose collapse controlling flow.

http://training.seer.cancer.gov/images/anatomy/respiratory/nose_nasal_cavities.jpg

The most complex section of the geometry is nasal concha or turbinates that occupy most of the
cavity. These bones are long finger-like shelves in the nasal passage, extending from the top of
the exterior nose to the nasopharynx. There are three sets of concha, inferior, middle and
superior. Viewing the skull from the coronal plane, like you are facing the patient, shows that
these concha are actually curved. These concha serve to distribute the incoming air and also
warm and moisten the air before entering the lungs. Additionally there are four sets of sinuses
around nasal cavity, which for this study will be removed from the geometry. The entrance of the
sinuses into the nasal cavity is relatively small and does not impact the flow in cavity to any
great extent.

http://www.teachmeanatomy.com/wp-content/uploads/2012/12/Conchae-and-Meatuses.png

Nasal Airway Obstructions (NAO)- The focus of this study is relieving the stress to the patient
cause by nasal airway obstructions. There are many types of obstructions but the most common
is a deviated septum caused by some trauma to the nose. This causes a change in the geometry
between the right and left nasal passage, and the patient then experiences constant discomfort
when inhaling due to the differences in pressure or shear stress on the nasal wall. Correction of
these NAO is done with a 'shot-gun' surgical approach, doing as many surgeries in one procedure
in hope of alleviating the problem. Being able to quantify the various surgical procedures would
then help determine a single proper surgery for the patient.
Biological Specifications
1- A negative pressure should be placed at the nasopharynx, to simulate a normal inhale
2- From rhinometry data, the targeted flow out the nasopharynx should be 15 L/min during
normal inhale
3- The provided patient has a deviated septum, so there should clear distinction between the
pressure on the nasal wall in the right and left nasal passages
4- From previous studies, the flow may be modeled as laminar

Reference studies
Rhee, J. S., Cannon, D. E., Frank, D. O., &Kimbell, J. S. Role of Virtual Surgery in Preoperative
Planning: Assessing the Individual Components of Functional Nasal Airway Surgery.

Rhee, J. S., Pawar, S. S., Garcia, G. J., &Kimbell, J. S. (2011). Toward personalized nasal
surgery using computational fluid dynamics. Archives of Facial Plastic Surgery, 13(5), 305-310.

Lee, H. P., Poh, H. J., Chong, F. H., & Wang, D. Y. (2009). Changes of airflow pattern in inferior
turbinate hypertrophy: A computational fluid dynamics model.American journal of rhinology &
allergy, 23(2), 153-158.

Pre-Analysis & Start-Up


Image Processing
Attached is a set of original CT scan images, a set of edited binary images and the MATLAB
code used to create the edited images. For simplicity using the edited set of images to proceed
with the tutorial will be sufficient. Below is an explanation of how and why the images were
edited.
matlab_files.rar
Binary Images.rar

CT scan images are called DICOM images, a file format that contains patient information, and
require specific programs to read. MATLAB contains a image processing toolbox that can read
the images. For a CT scan, a set of images are taken of the patient in slices across the transverse
plane. Pixel size and slice thickness determine the resolution of the images and the quality of the
model created. Smaller pixels and smaller slices result in more details, but this means more
radiation to the patient and in conventional CT machines the smallest resolution is a pixel size of
(0.6 mm)^2 and a slice thickness of 0.6 mm. The value of the pixel intensity is related to the
density of the tissue, with air being black and cortical bone being white.
Noise removal- The included program removes the signal noise from each image in the set. Since
every machine contains some electronic noise, there is a variation in the pixel intensities of the
pure air in the images. By removing the average and one standard deviation of a large sample of
air pixel from each image, it will remove the noise and equalize most the backgrounds and air of
the images to zero intensity.

Binary images- Since we want to extract the cavity and are not concerned with the different
tissues scanned, it is beneficial to create binary images. These contain only two pixel values,
black for air and white for any tissue. Since the features in the nose have small sizes compared to
the pixel size, like the septum has a thickness of about 0.8 mm, this creation of binary images
will ensure that the cavity geometry stays separated. The binary images also help ease geometry
extraction process in the next step.

Geometry
First open MIMICs and the home screen will appear below.
Next select File -> New Project Wizard

Select the folder containing the DICOM images of the CT scan, MIMICs will detect the order
based on the file names of images. Also select the output folder for the project.

Press next and confirm all the settings and order of the images.

Set all the planes of the images, aligning the posterior, top and right side to the images.
The next step is to start creating the masks of the images that contain the outline of the volumes
used in the CFD calculation. Creating the mask is based on first selecting a threshold of pixel
values or tissue densities that the primary mask will have. Since the images are now binary, the
images have only two pixel values. Press the threshold button to create the first mask. The
primary mask should contain both pixel values to include both the air and the tissue, so make
sure the min and max values are at the lowest and highest values or that the slider has the entire
range.

Next the mask needs to be cropped with the crop mask button to select only the area around the
nasal cavity. Adjust the height, width and length of the rectangular mask in the three viewing
planes.
Now on the right side there is the created and cropped mask, by default labeled "Green", right
click on this mask and select Duplicate Mask. This will create a copy of the mask in a new color.
The purpose of having multiple masks is that you can do boolean operations to the masks,
subtracting one or adding one to the other. In this tutorial we will later subtract the secondary
mask from the primary to leave a third mask containing only the nasal volume.

Now deselect the visibility or the 'eye glasses' on the primary mask to have only the secondary
yellow mask visible and only edit that mask.

Right click on the black background of the Coronal plane and select Zoom to Full Screen. The
Coronal plane will allow us to distinguish the nasal geometry the easiest.

Next select the Multiple Slice Edit button. In the appeared function box, select Coronal under
the planes, and Thresholding as the operation. Lower the thresholding values to only include the
values of the tissue. The next step is very long and tedious. Middle mouse scroll all the way
back to the nasopharynx, and begin highlighting the area of the cavity. Then scroll, image by
image selecting the cavity in each slice. There is an Interpolate button that will linearly connect
the regions in between distant slices, but this is difficult to do with the complex nasal geometry.
Continue all the way to the nostrils and remove any sinus geometry and select apply.

Next with the Boolean Operation button, remove the secondary mask yellow from the primary
green mask.

Right clicking on the new mask and selecting Edit Mask in 3-D will allow you to flatten the inlet
and outlet geometries by removing additional pixels in at the nostrils and nasopharynx. This also
gives you a chance to smooth any geometry and trim any sinus cavities you may have missed.

Next right click on the third mask and select Calculate 3-D, this will make the primary STL
geometry. In the options, leave the optimal quality, but select the shell reduction, set at 1. This
will create only a single largest volume and make sure there are no floating pixels or random
disconnected geometries. Also select the smoothing option, this will help smooth out the pixels
give a nice smooth geometry for FLUENT. After the 3-D is created, additional Smoothing can
be done and Triangle Reduction so that the exported STL is as small and correct as possible.
Right click on the 3D and select STL+ option.

Select the created, smoothed and reduced 3D. Select Add and finally finish. In the directory
selected in the very beginning will be the final STL geometry. Save the MIMICs project and
close out the program.
Mesh
Open up ICEM CFD in the ANSYS 14 meshing folder. After it loads, select File -> Import
Geometry -> STL. Locate the STL created in MIMICs. Select the Generate option in STL
import options that appears.

Now that the STL is imported, rotate the model to confirm the geometry is correct from the wire
frame.
Next a 'Body' has to be created. This designates where the volume cells will be and where the
fluid will flow.

You'll need to turn on the body view seen in the image below to view the surface of the STL.

In the Create Body command, you'll need to select two point on the surface of the geometry
where the centroid of those points is inside the cavity. The easiest place to do this is in the back
of the nasal cavity after the passages have joined together.

Select one point on the right side surface of the back cavity geometry and then rotate the model
(Crtl + Left Mouse) and select another point on the left side.

Rotate the model and confrim that the Body point is inside the cavity geometry.
Now the next step is to set up the meshing of the geometry. This is done by setting a Global
Element Size or a Surface Element size. Adjusting this properties will greatly change the final
number of elements and the quality of the mesh. ICEM CFD has significant amount of options
and settings to get a quality mesh at the walls and coarsening in the 'farfield' regions. In this
tutorial we will choose an edge criteria in the terahedral elements of 0.2 and smooth the mesh to
a quality of 0.4 with 5 iterations. This will give a coarse mesh for the purposes of the tutorial.
Additionally prism elements and tetrahedral elements can be combined and after the creation of
the global mesh refinement of the global and localy refinement/ coarsening can be performed
based on the geometry complications.

After inputting the Global Mesh Settings, click Apply and the command window will inform you
that the new parameters are set.
Setup (Physics)

Anda mungkin juga menyukai