0% found this document useful (0 votes)
3 views9 pages

ANSYS Fluent Tutorial

The document is a tutorial for simulating fluid flow through a rectangular channel using ANSYS Fluent, detailing the steps to set up the project, create geometry, mesh, and define boundary conditions. It provides instructions for using ANSYS Workbench and Design Modeler to create a 2D model, set mesh resolution, and configure Fluent settings for the simulation. The tutorial emphasizes the importance of saving work regularly and offers guidance on initializing and running the calculations for the fluid flow simulation.

Uploaded by

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

ANSYS Fluent Tutorial

The document is a tutorial for simulating fluid flow through a rectangular channel using ANSYS Fluent, detailing the steps to set up the project, create geometry, mesh, and define boundary conditions. It provides instructions for using ANSYS Workbench and Design Modeler to create a 2D model, set mesh resolution, and configure Fluent settings for the simulation. The tutorial emphasizes the importance of saving work regularly and offers guidance on initializing and running the calculations for the fluid flow simulation.

Uploaded by

KhadijaMadani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Ansys Fluent tutorial

Project 1 description:

Simulate fluid flow through a rectangular channel shown below.

2 cm

Wall

Velocity
Outflow

Wall
10 cm

Figure 1.1

Consider air flowing through a rectangular channel of 2cm height and 10cm length. Assume that the
channel has an infinite width. Inlet air velocity is 0.1 n/s at the inlet and outlet is at the atmospheric
pressure.

1 ANSYS Workbench
Open Workbench
1. Open the Start Menu
2. Type Workbench into the search
3. Select the icon for Workbench 15.0
4. Alt rnately, you can find it in the ANSYS 15.0 folder of the start menu

Create a Fluid Flow (Fluent) Project


1. Under the Toolbox tab (left menu), drag the FLUENT module over to the Workspace (white space) or
double‐click.
2. Youwill see your newProject appear. Project 1 Laminar Flow Coarse Mesh. Name it This will
differentiate theprojectfilefrom someof theother fluent simulations you will be creating.
3. Save the proje t in your U:/ drive.

Set up Workbench Information


1
1. On the top menu, click View
2. Select Files. A menu will pop up at the bottom. This can tell you where the files are stored. There
will be a bunch created as you progress and it may be important to note the location.
3. On the top menu again, click View, and select Properties. This time, a menu will appear on the right
side of the screen. The Properties menu will change as you select different tabs on your project.
Set nalysis type
1. Within your Project box, single‐click Geometry. Your Properties menu will change.
Under Advanced Geometry Options, set Analysis Type to 2D
New Geometry
1. In the Project Box, right‐click Geometry.
2. Select New Design Modeler Geometry…
3. ANSYS Design Modeler (DM) will then open.

Note that you can also Import Geometry if you made the geometry in a CAD program. Just save the CAD
file as a universal format, such as .STP

2 ANSYS Design Modeler


Creating a New Sketch
1. In the Tree Outline (left menu), click XYPlane
2. In the Top Menu, click the New Sketch icon. Sketch 1 will appear in your Tree Outline under
XYPlane
3. On the Coordinate System in the bottom‐right corner, click the +Z‐axis to snap your view to 2D in
the XY plane. You can also familiarize yourself with the zooming and panning functions.
4. To begin drawing the geometry, select the Sketching tab at the bottom of the Tree Outline. that the
Sketching Toolboxes menu will replace your Tree Outline.

2
Note

Drawing the Geometry


1. In the Sketching Toolbox, under Draw, click Rectangle. Your cursor will become a pencil.
2. Create the rectangle of any size anywhere in Quadrant 1 of your drawing canvas. We will constrain
the location and size next.

ConstrainingGeometrytotheAxis
3. In the Sketching Toolbox, select the Cons raints dropdown.
4. Select Coincidence. This will set a rule for an edge to coincide with another.
5. Click the edge of the rectangle you want to constrain and then select the axis you want to lock it to. The
edges of the rectangle will change
w color if they are fully constrained.
6. Do this for both edges of the rectangle, so that its lower left corner is at the origin (0, 0).

Dimensioning the Geometry


1. In the Sketching Toolbox, select the Dimensions dropdown
2. Select General. You can also use Horizontal or Vertical for their respective lines.
3. Select the edge of the rectangle you want to dimension. Click above or next to that edge to place the
dimension label.
4. When you create a dimension, it will show up in the Details View menu. You can edit these values
and it will adjust the size of the rectangle.
5. Create a dimension for the horizontal and vertical lines of the rectangle and set their values to
H1 = 0.1 N and V2 = 0.02 N, respectively.

Creating a Surface
1. Click back to the Modeling Tab at the bottom of the Sketching Toolbox.
2. On the top menu, open the Concept dropdown and select Surface from Sketches.
3. Select your sketch and then click Apply in the Details View (bottom left menu).
4. Click the Generate button in the top menu. Your part will fill gray when the surface is
generated.
3 You are now Meshing
Open Meshing
1. Go back into ANSYS Workbench.
2. Note that you should see a checkmark next to Geometry in your Project Box.
3. Save the Project.
4. In the Project Box, right‐click Mesh and select Edit…
5. The Mesh Editor will open and your Geometry should automatically load.
done with creating your geometry. Click Save and close Design Modele
4. Set up Meshing
1. With the Mesh Editor open, orient your view, if necessary, with the coordinate system and
3
Zoom to Fit (button in the Top Menu with a Cube inside a Magnifying Glass). familiarize yourself
with the zooming and panning functions.
You can also
1. In the Outline menu (left side), expand out the Geometry tree (plus sign) and click Surface Body
2. The Details Menu (bottom left) will change to properties of the Surface Body
3. Under the Definition tab, change the Thickness to 0 m.
4. Under the Material tab, change the Fluid/Solid to Fluid.
Set Mesh Resolution
1. In the Outline menu, click the Mesh tab.
2. The Details menu will change to properties of the Mesh.
3. Set Min Size, Max Face Size, and Max Tet Size all to 1e— 3 m.
4. This will set your grid size to 1 mm spacing.

Set Mesh to Quadrilaterals


1. Familiarize yourself with the types of selection tools.
Face Selection, and Body Selection.
There is Vertex Selection, Edge Selection,
1. se the Face Selection tool to select the face of the geometry
2. Once it is selected (the face turns green), right‐click the geometry and Insert Mapped Face
Meshing
3. A Face Meshing will appear in your Outline menu. Once it is selected, the Details menu will
show its properties.
4. In the Details Menu, make sure Method is set to Quadrilaterals.
5. In the top menu, click Generate Mesh. If you click the Mesh icon in the Outline menu again, your
mesh should appear over your geometry

Boundary Labeling
1. In the Top Menu, use the edge selection tool to select the left edge of your geometry
2. Right‐click the left edge and select Create Named Selection
3. Name this edge inlet.
4. Repeat the process for the other edges, naming the wall_top, wall_bottom, and outflow,
respectively.
5. This naming process helps Fluent determine Boundary Conditions.
6. Click File, Save Project, and return to ANSYS. If you want to create a backup file of the Mesh,
you can select File, Export, and change the file type to .msh. If for some reason, your
Workbench Project becomes corrupted, you can resume from this point by importing the .msh
file to a new Project. Note that you will not be able to edit your .msh file, so inspect that it is
correct before exporting.

7. Back in Workbench, you may notice a Lightning Bolt next to the Mesh in your Project Box. means
4
that your Mesh has not been updated yet.
This
1. To update the Mesh, right‐click Mesh and select Update. Once it is done, a green checkmark
should appear.
4 Fluent setUp ating Project
1. To open Fluent, double‐click Setup in the Project Box. the following options and click OK

Fluent Layout
1. Fluent is segmented into several menus.
a. Top Ribbon – Adjusting properties
b. Tree – Each step of

Starting Fluent simulation


c. Task Page – The setup of variables and properties in each step of the Tree
d. Main Window – View the domain, simulation progress, or results
e. Console – The command line showing progress or errors.
2. Operating Fluent will mainly consist of running down the Tree and editing variables in each
respective Task Page.
A dialog will pop up with settings. Select
a
Figure 4.3
Setup – General
Note: Recommended selections for Project 1 are in Bold and Underlined

1. Mesh
a. Once Fluent opens, your geometry and mesh should automatically display. If it doesn’t,
you can manually display components by clicking Display in the Task Page.
b. If you need to scale the geometry (e.g. you made the geometry in inches and you want the
solution in SI units), you can also do it here.
c. You may also Check the mesh for errors and quality here.
2. Solver
a. Type
i. Pressure‐Based for low‐speed incompressible to high‐speed compressible flows
ii. Density‐Based reserved for flows with strong interdependence between density,
energy, momentum, or species.
b. Velocity Formulation
i.
ii.
c. Time i. ii.

5
Absolute is where major ty of the domain is non‐rotational Relative may be useful in
cases where the domain rotates

Steady solves for a steady‐state (developed) solution Transient is used if the


solution is a function in time
d. 2D space
i. Planar is your standard 2D space in Cartesian coordinates
ii. Axisymmetric revolves the domain around an axis (e.g. cylindrical coordinates)
Axisymmetric swirl revolves the domain around an axis with some tangential
iii. velocity
3. Gravity can include buoyancy effects for flows or gravitational settling in particle tracking.

Setup – Models
Descriptions:

1. Energy tracking is used for heat transfer solutions and things that are a function of temperature
(e.g. diffusion, air density, relative humidity)
2. Viscous Model determines how you solve/simplify the Navier‐Stokes equations. For Laminar
flow, simply choose the Laminar model. For Turbulent flow, you have several options that
approximate a solution. The most common is k‐epsilon because of its simplicity.
3. Species tracking is when you would simulate a species (e.g. relative humidity) mixing/diffusing
4. Discrete Phase is used for particle tracking within the fluid.

Figure 4.4
Setup – Materials
If you want to change environmental conditions, such as the working fluid (e.g. air, water, helium) or material
surface roughness (affects skin friction), you can do it in this tab

Default properties are fine.

Note that Cell Zone Conditions will be skipped over (defaults are fine).
Setup – Boundary Conditions
This is where we’ll define the boundary conditions for the simulation. Note that the edges you labeled
during meshing correspond to the boundaries found in fluent. Select a zone and click Edit…

1. Inlet – Set your Velocity Magnitude to 0.1 m/s


2. Outflow – default weighting of 1. If you have multiple outflows, you can scale the proportion of

6
the mass flow that exits each outflow (e.g. 0.2 outflow 1, 0.8 outflow 2)
Solution – Solution Methods
1. Scheme
a. SIMPLE – (Semi‐Implicit Method for Pressure‐Linked Equations) Default, robust.
b. SIMPLEC – (SIMPLE‐Consistent) Allows faster convergence for simple problems
(e.g., laminar flows with no physical models employed)
c. PISO – (Pressure‐Implicit with Splitting of Operators) For unsteady flow problems or
mesh with high skewness
2. Gradient
a. Green‐Gauss Cell Based – Default method, solution may have false diffusion/smearing
b. Green‐Gauss Node Based – Minimizes false diffusion, recommended for tri/tet mesh
c. Least Squares Cell Based – For polyhedral meshes, same accuracy, properties as node
3. Pressure
a. Standard – The default scheme. Reduced accuracy for flows with large surface‐normal
pressure gradients near boundaries (but should not be used when steep pressure
changes are present in the flow – PRESTO! scheme should be used instead)
b. PRESTO! – For highly swirling flows, steep pressure gradients, or curved domains
c. Linear – When other options result in convergence difficulties or unphysical behavior
d. Second‐Order – Use for compressible flows
e. Body Force Weighted – When forces are large e.g. high Ra convection, swirling flows
4. Momentum
a. First Order Upwind – Easiest convergence, only first order accurate, and very diffusive
i.e. dissipates large gradients and can suppress small/sharp features
b. Second Order Upwind – 2nd order accuracy, essential when flow is not aligned with
mesh grid direction e.g. during tri/tet mesh

5. Wall – Both default stationary wall with no slip. For other cases, you may want a moving wall.

Solution – Monitors
1. Select Residuals and click Edit…
2. Under Residual Values, check the box that says Normalize. This scales the last iteration of
Residuals by the maximum Residuals and can be used as a better gauge for convergence.
3. Under Convergence Criterion, select None. The Convergence Criterion tells Fluent when the
solution has converged to a value that you determine to be accurate enough and stops
calculating the solution early. By turning this feature off, Fluent will continue calculating the
solution until it reaches the number of iterations you set.
Solution – Solution Initialization
Select your initialization technique, the boundary to initialize with, and then click Initialize

1. Standard Initialization – This sets all mesh cells to a single starting value. Typically, you select
7
values that are the closest to what you think the final solution will look like to help the solution
converge faster. Compute from Inlet takes inlet conditions (from the boundary conditions tab
you set earlier) and applies it to the whole mesh as a starting guess. The calculations then refine the
flow to a converged steady‐state solution
2. Hybrid Initialization – Provides a quick approximation of the flow field by solving Laplace’s
equation to estimate a flow field and pressure field.
Solution – Run Calculation
1. SAVE YOUR WORK BEFORE PROCEEDING (sometimes Fluent crashes). File, Save
Project
2. Check Case to make sure everything is good to go (your mesh, boundary conditions, etc.)
a. Note: Since I selected First order upwind earlier, my Fluent recommended using a higher
order Momentum Solver (second order upwind) for improved accuracy. This may be a
good suggestion, so I went back to solution methods and changed it. It also suggested
Least Squares for Gradient. You can make that change too.
3. Set the Number of Iterations to 1000. You can always stop the calculation early. Sometimes I’ll
stop at around 200 and check that the flows/magnitudes make some sense before spending all that
time calculating to find out I made a mistake setting the boundary conditions.
4. Click Calculate
Calculating Solution
Once the program calculates, you’ll see a plot of the residuals (errors) for each of the equation parameters (in
this case, continuity, x‐velocity, y‐velocity).

Note that my solution converged after approximately 400 iterations to the minimum error.

Also note that the Console prints the residuals corresponding to each iteration.

Once you have a solution calculated, save your work again

8
9

You might also like