1
ANSYS Fluent Tutorial Part 1
This tutorial introduces you to the ANSYS workbench and Fluent environments. Upon completing this
tutorial you will understand:
ANSYS workbench environment
o Create a new project, create geometry, mesh the domain, identify and name boundary
conditions, grid adaptation
Flow simulation in Fluent
o Export mesh to Fluent, apply boundary conditions, iterate toward the solution, examine the
flow fields, obtain numerical results, examine and validate the results
Project 1 description:
Simulate fluid flow through a rectangular channel shown below.
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 / at the inlet and outlet is at the atmospheric pressure.
Wall
Wall
Velocity
Outflow
2 cm
10 cm
1 ANSY
1.1 Ope
1. Ope
2. Typ
3. Sele
4. Alte
star
1.2 Crea
1. Und
mo
dou
2. You
Pro
diff
flue
3. Sav
3
YS Workb
n Workben
en the Start M
pe Workbench
ect the icon fo
ernately, you
rt menu
ate a Fluid F
der the Tool
odule over to
uble‐click.
u will see you
oject 1 Lamin
ferentiate th
ent simulatio
ve the projec
bench
ch
Menu
h into the sea
or Workbenc
can find it in
Flow (Fluent
box tab (left
o the Works
ur new Proje
nar Flow Coa
he project file
ons you will
ct in your U:/
Toolbo
1
arch
ch 17.1
the ANSYS 1
t) Project
t menu), dra
pace (white
ect appear.
arse Mesh. T
e from some
be creating.
/ drive.
F
Pr
ox
2
2
7.1 folder of
ag the FLUEN
space) or
Name it
This will
e of the othe
Figure 1.2
oject Box
2
the
NT
er
x
Figuree 1.1
1.3 Set u
1. On
2. Sele
will
3. On
righ
proj
up Workben
the top menu
ect Files. A me
be a bunch c
the top menu
ht side of the
ject.
1
2
3
nch Informa
u, click View
enu will pop
created as yo
u again, click
screen. The
ation
up at the bot
u progress an
View, and se
Properties m
F
Files M
3
ttom. This ca
nd it may be i
lect Propertie
menu will chan
Figure 1.3
enu
n tell you wh
mportant to
es. This time
nge as you se
P
ere the files a
note the loca
e, a menu will
lect different
Properties
are stored. T
ation.
appear on th
t tabs on your
s Menu
There
he
r
1.4 Set A
1. Wit
2. Und
1.5 New
1. In t
2. Sele
3. ANS
ope
Note th
you ma
Just sav
such as
Analysis typ
thin your Pro
der Advance
Fi
w Geometry
the Project B
ect New Des
SYS Design M
en.
hat you can
ade the geom
ve the CAD f
s .STP
e
oject box, sin
ed Geometry
igure 1.4
Box, right‐cli
sign Modele
Modeler (DM
also Import
metry in a CA
file as a univ
1
ngle‐click Ge
y Options, se
ck Geometry
er Geometry
M) will then
Geometry i
AD program
versal format
4
eometry. Yo
et Analysis T
y.
y…
f
.
t,
2
ur Propertie
Type to 2D.
Figure 1.5
es menu will change.
2 ANSY
2.1 Crea
1. In t
2. In t
XYP
3. On
the
4. To b
that
Tree Ou
4
YS Design
ating a New
he Tree Outli
he Top Menu
Plane
the Coordina
XY plane. Yo
begin drawing
t the Sketchin
utline
1
Modeler
Sketch
ine (left menu
u, click the Ne
ate System in
ou can also fa
g the geomet
ng Toolboxes
2. New
r
u), click XYPla
ew Sketch ico
the bottom‐
miliarize you
try, select the
s menu will re
F
Sketch
5
ane
on. Sketch 1 w
right corner,
rself with the
e Sketching ta
eplace your T
Figure 2.1
will appear in
click the +Z‐a
e zooming and
ab at the bott
Tree Outline.
n your Tree O
axis to snap y
d panning fun
tom of the Tr
Outline under
your view to 2
nctions.
ree Outline. N
3
2D in
Note
2.2 Draw
1. In t
2. Cre
the
2.3 Cons
1. In t
2. Sele
3. Clic
The
4. Do t
wing the Ge
he Sketching
ate the recta
location and
straining Ge
he Sketching
ect Coinciden
k the edge of
e edges of the
this for both
eometry
Toolbox, und
ngle of any si
size next.
eometry to
Toolbox, sel
nce. This will
f the rectangl
e rectangle wi
edges of the
Draw
Editi
der Draw, clic
ize anywhere
F
the Axis
ect the Const
set a rule for
e you want to
ill change col
rectangle, so
F
wing Tools
ng Tools
6
ck Rectangle.
in Quadrant
Figure 2.2
traints dropd
r an edge to c
o constrain a
or if they are
o that its lowe
Figure 2.3
. Your cursor
1 of your dra
own.
coincide with
nd then selec
fully constra
er left corner
r will become
awing canvas
another.
ct the axis you
ined.
is at the origi
a pencil.
. We will con
u want to loc
in (0, 0).
nstrain
k it to.
2.4 Dime
1. In t
2. Sele
3. Sele
the
4. Wh
and
5. Cre
1
ensioning th
he Sketching
ect General.
ect the edge o
dimension la
en you create
d it will adjust
ate a dimens
0.1 and
he Geomet
Toolbox, sele
You can also
of the rectang
abel.
e a dimension
t the size of th
ion for the ho
d 2 0.02
ry
ect the Dimen
use Horizont
gle you want
n, it will show
he rectangle.
orizontal and
, respective
F
7
nsions dropdo
tal or Vertica
to dimension
w up in the De
vertical lines
ly.
Figure 2.4
own
l for their res
n. Click above
etails View m
s of the rectan
spective lines
e or next to t
menu. You can
ngle and set t
.
hat edge to p
n edit these v
their values to
place
values
o
2.5 Cre
1. Cl
2. O
3. Se
4. Cl
ge
5. Yo
eating a Sur
lick back to th
On the top me
elect your ske
lick the Gene
enerated.
ou are now d
1
2
rface
he Modeling
enu, open the
etch and then
erate button i
one with crea
3
Tab at the bo
e Concept dro
n click Apply i
n the top me
ating your ge
4
8
ottom of the S
opdown and s
in the Details
nu. Your par
ometry. Click
Figure 2.5
Sketching To
select Surface
s View (botto
rt will fill gray
k Save and cl
oolbox.
e from Sketch
om left menu)
y when the su
ose Design M
hes.
).
urface is
Modeler.
3 Me
3.1 Op
1. G
2. N
3. Sa
4. In
5. T
shing
pen Meshing
Go back into
Note that you
ave the Proj
n the Project
he Mesh Ed
g
ANSYS Wor
u should see
ject.
t Box, right‐
itor will ope
rkbench.
e a checkmar
click Mesh a
en and your G
9
rk next to Ge
and select Ed
Geometry s
Figure 3.1
eometry in y
dit…
hould autom
your Project
matically loa
t Box.
d.
3.2 Set
1. W
Zo
fa
2. In
3. Th
4. U
5. U
t up Meshin
With the Mesh
oom to Fit (b
amiliarize you
n the Outline
he Details Me
nder the Def
nder the Mat
ng
h Editor open
utton in the T
urself with the
menu (left si
enu (bottom
finition tab, c
terial tab, cha
n, orient your
Top Menu wi
e zooming an
de), expand o
left) will chan
hange the Th
ange the Flui
10
view, if nece
th a Cube ins
d panning fu
out the Geom
nge to proper
hickness to
d/Solid to Flu
Figure 3.2
essary, with th
side a Magnify
nctions.
metry tree (pl
rties of the Su
.
uid.
he coordinate
ying Glass). Y
us sign) and c
urface Body
e system and
You can also
click Surface
d
Body
3.3 Set
1. In
2. Th
3. Se
4. Th
t Mesh Reso
n the Outline
he Details me
et Min Size, M
his will set yo
olution
menu, click t
enu will chan
Max Face Size
our grid size to
the Mesh tab
ge to propert
e, and Max Te
o 1 mm spaci
11
.
ties of the Me
et Size all to
ng.
Figure 3.3
esh.
.
3.4 Set
1. Fa
Fa
2. U
3. O
M
4. A
sh
5. In
6. In
yo
1
t Mesh to Q
amiliarize you
ace Selection
se the Face S
Once it is selec
Meshing
Face Meshin
how its prope
n the Details M
n the top men
our mesh sho
2
4
Quadrilatera
urself with th
n, and Body S
Selection tool
cted (the face
ng will appear
erties.
Menu, make
nu, click Gene
ould appear o
5
als
e types of sel
election.
l to select the
e turns green)
r in your Outl
sure Method
erate Mesh.
over your geo
6
12
lection tools.
e face of the g
), right‐click t
line menu. O
d is set to Qua
If you click th
metry.
Figure 3.4
3
There is Ver
geometry
the geometry
Once it is selec
adrilaterals.
he Mesh icon
rtex Selection
y and Insert M
cted, the Det
in the Outlin
n, Edge Selec
Mapped Face
ails menu wi
ne menu agai
tion,
ll
n,
3.5 Bo
1. In
2. R
3. N
4. R
re
5. Th
6. C
yo
W
fi
co
undary Lab
n the Top Me
ight‐click the
Name this edg
epeat the pro
espectively.
his naming pr
lick File, Save
ou can select
Workbench Pr
le to a new P
orrect before
beling
nu, use the e
left edge and
ge inlet.
ocess for the
rocess helps F
e Project, and
File, Export,
roject become
roject. Note
exporting.
edge selection
d select Creat
other edges,
Fluent determ
d return to AN
and change t
es corrupted,
that you will
13
n tool to selec
te Named Se
naming the w
mine Boundar
NSYS. If you w
the file type t
you can resu
not be able t
Figure 3.5
ct the left ed
lection
wall_top, wa
ry Conditions
want to creat
o .msh. If for
ume from this
to edit your .m
ge of your ge
ll_bottom, an
s.
te a backup fi
r some reason
s point by imp
msh file, so in
eometry
nd outflow,
le of the Mes
n, your
porting the .m
nspect that it
sh,
msh
is
4 Flue
4.1 Upd
1. Ba
me
2. To
sho
4.2 Star
1. To
the
ent
dating Proje
ck in Workbe
eans that you
update the M
ould appear.
rting Fluent
open Fluent,
e following op
ect
ench, you may
ur Mesh has n
Mesh, right‐c
t
, double‐click
ptions and cli
y notice a Lig
not been upda
click Mesh and
Fi
k Setup in the
ck OK.
Fi
14
ghtning Bolt n
ated yet.
d select Upda
igure 4.1
Project Box.
igure 4.2
next to the M
ate. Once it i
A dialog wil
Mesh in your P
s done, a gre
l pop up with
Project Box. T
een checkmar
h settings. Se
This
rk
lect
4.3 Flue
1. Flu
2. Op
res
ent Layout
uent is segme
a. Top Rib
b. Tree – E
c. Task Pa
d. Main W
e. Console
perating Fluen
spective Task
b
ented into sev
bbon – Adjust
Each step of s
age – The setu
Window – View
e – The comm
nt will mainly
k Page.
veral menus.
ting propertie
setting up the
up of variable
w the domain
mand line sho
consist of ru
Fi
c
15
es
e simulation
es and proper
n, simulation
owing progres
nning down t
igure 4.3
rties in each s
progress, or
ss or errors.
the Tree and
step of the Tr
results
editing varia
ree
bles in each
a
d
e
a
d
4.4 Setu
Note: Reco
1. Me
2. So
3. Gr
up – Genera
ommended se
esh
a. Once Fl
you can
b. If you n
the solu
c. You ma
lver
a. Type
i.
ii.
b. Velocity
i.
ii.
c. Time
i.
ii.
d. 2D spac
i.
ii.
iii.
avity can incl
al
elections for P
uent opens, y
n manually dis
eed to scale
ution in SI uni
y also Check
Pressure‐Ba
Density‐Base
energy, mom
y Formulation
Absolute is w
Relative may
Steady solve
Transient is
ce
Planar is you
Axisymmetr
Axisymmetr
velocity
ude buoyanc
Project 1 are
your geometr
splay compon
the geometry
its), you can a
the mesh for
sed for low‐s
ed reserved f
mentum, or s
n
where majori
y be useful in
es for a stead
used if the so
ur standard 2
ic revolves th
ic swirl revolv
y effects for f
Fi
16
in Bold and U
ry and mesh s
nents by click
y (e.g. you ma
also do it here
r errors and q
speed incomp
for flows with
pecies.
ity of the dom
cases where
y‐state (deve
olution is a fu
D space in Ca
he domain aro
ves the doma
flows or gravi
igure 4.4
Underlined
should autom
king Display in
ade the geom
e.
quality here.
pressible to h
h strong interd
main is non‐ro
e the domain
eloped) soluti
nction in tim
artesian coord
ound an axis
ain around an
itational settl
matically disp
n the Task Pa
metry in inche
igh‐speed co
dependence
otational
rotates
on
e
dinates
(e.g. cylindric
n axis with som
ling in particle
lay. If it does
age.
es and you wa
mpressible flo
between den
cal coordinate
me tangentia
e tracking.
sn’t,
ant
ows
nsity,
es)
l
4.5 Setu
Description
1. En
(e.
2. Vis
flo
ap
3. Sp
4. Dis
up – Model
ns:
ergy tracking
g. diffusion, a
scous Model
w, simply cho
proximate a s
ecies tracking
screte Phase
s
g is used for h
air density, re
determines h
oose the Lam
solution. The
g is when you
is used for pa
heat transfer s
elative humid
how you solve
minar model.
e most comm
u would simu
article trackin
Fi
17
solutions and
ity)
e/simplify the
For Turbulen
on is k‐epsilo
late a species
ng within the
igure 4.5
d things that a
e Navier‐Stok
nt flow, you h
on because of
s (e.g. relative
fluid.
are a function
kes equations
ave several o
f its simplicity
e humidity) m
n of temperat
. For Lamina
options that
y.
mixing/diffusi
ture
r
ng
4.6 Setu
If you want
material su
Default pro
Note that C
up – Materi
t to change e
urface roughn
operties are f
Cell Zone Con
ials
nvironmenta
ness (affects s
fine.
nditions will b
l conditions,
skin friction),
Fi
be skipped ov
18
such as the w
you can do it
igure 4.6
er (defaults a
working fluid
t in this tab
are fine).
(e.g. air, wateer, helium) orr
4.7 Setu
This is whe
during mes
1. Inl
2. Ou
the
3. Wa
up – Bound
ere we’ll defin
shing corresp
et – Set your
utflow – defa
e mass flow t
all – Both def
ary Conditi
ne the bound
pond to the bo
Velocity Mag
ult weighting
hat exits each
fault stationa
ons
ary condition
oundaries fou
gnitude to 0.
of 1. If you h
h outflow (e.g
ry wall with n
Fi
19
ns for the sim
und in fluent.
1 m/s
have multiple
g. 0.2 outflow
no slip. For o
igure 4.7
ulation. Note
Select a zon
e outflows, yo
w 1, 0.8 outflo
ther cases, yo
e that the edg
ne and click Ed
ou can scale t
ow 2)
ou may want
ges you label
dit…
the proportio
a moving wa
ed
n of
all.
4.8 Solu
1. Sch
2. Gr
3. Pre
4. Mo
ution – Solu
heme
a. SIMPLE
b. SIMPLE
laminar
c. PISO – (
mesh w
adient
a. Green‐G
b. Green‐G
c. Least Sq
essure
a. Standar
pressur
changes
b. PRESTO
c. Linear –
d. Second
e. Body Fo
omentum
a. First Or
i.e. diss
b. Second
mesh g
ution Metho
E – (Semi‐Imp
C – (SIMPLE‐C
r flows with n
(Pressure‐Imp
with high skew
Gauss Cell Ba
Gauss Node B
quares Cell Ba
rd – The defa
re gradients n
s are present
O! – For highly
– When other
‐Order – Use
orce Weighte
rder Upwind –
ipates large g
Order Upwin
rid direction e
ods
licit Method f
Consistent) A
no physical mo
plicit with Spl
wness
ased – Defaul
Based – Minim
ased – For po
ault scheme. R
near boundar
t in the flow –
y swirling flow
r options resu
for compress
d – When for
– Easiest conv
gradients and
nd – 2nd orde
e.g. during tr
Fi
20
for Pressure‐
Allows faster c
odels employ
litting of Ope
t method, so
mizes false dif
olyhedral mes
Reduced accu
ies (but shou
– PRESTO! sch
ws, steep pres
ult in converg
sible flows
rces are large
vergence, onl
d can suppres
r accuracy, es
i/tet mesh
igure 4.8
Linked Equat
convergence
yed)
rators) For un
lution may ha
ffusion, recom
shes, same ac
uracy for flow
ld not be use
heme should
ssure gradien
gence difficult
e e.g. high Ra
ly first order a
s small/sharp
ssential when
tions) Default
for simple pr
nsteady flow
ave false diffu
mmended for
ccuracy, prop
ws with large s
ed when steep
be used inste
nts, or curved
ties or unphy
convection, s
accurate, and
p features
n flow is not a
t, robust.
roblems (e.g.,
problems or
usion/smeari
r tri/tet mesh
perties as nod
surface‐norm
p pressure
ead)
d domains
sical behavio
swirling flows
d very diffusiv
aligned with
,
ng
h
e
mal
r
s
ve
4.9 Solu
1. Se
2. Un
Re
3. Un
sol
cal
sol
ution – Mon
lect Residuals
nder Residual
siduals by the
nder Converge
lution has con
lculating the s
lution until it
nitors
s and click Ed
Values, chec
e maximum R
ence Criterio
nverged to a
solution early
reaches the n
dit…
ck the box tha
Residuals and
n, select Non
value that yo
y. By turning
number of ite
Fi
21
at says Norma
can be used
ne. The Conv
ou determine
this feature o
erations you s
igure 4.9
alize. This sc
as a better g
ergence Crite
to be accurat
off, Fluent wi
set.
ales the last i
auge for conv
erion tells Flu
te enough an
ill continue ca
iteration of
vergence.
ent when the
nd stops
alculating the
e
e
4.10 SoluSelect your
1. Sta
val
co
yo
the
2. Hy
eq
ution – Solu
r initialization
andard Initial
lues that are
nverge faster
u set earlier)
e flow to a co
ybrid Initializa
uation to est
ution Initiali
n technique, t
lization – This
the closest to
r. Compute fr
and applies it
onverged stea
tion – Provid
imate a flow
zation
the boundary
s sets all mes
o what you th
rom Inlet tak
t to the whol
ady‐state solu
es a quick ap
field and pres
Fig
22
y to initialize w
h cells to a si
hink the final
kes inlet cond
e mesh as a s
ution
proximation
ssure field.
gure 4.10
with, and the
ngle starting
solution will
itions (from t
starting guess
of the flow fi
en click Initial
value. Typica
look like to h
the boundary
s. The calcula
eld by solving
ize
ally, you sele
elp the soluti
y conditions ta
ations then re
g Laplace’s
ct
ion
ab
efine
4.11 Solu1. SA
2. Ch
3. Set
sto
tha
4. Clic
ution – Run
AVE YOUR WO
eck Case to m
a. Note: S
order M
good su
Least Sq
t the Number
op at around
at time calcul
ck Calculate
Calculation
ORK BEFORE P
make sure eve
ince I selecte
Momentum So
uggestion, so
quares for Gr
r of Iteration
200 and chec
ating to find
n
PROCEEDING
erything is go
d First order
olver (second
I went back t
adient. You c
s to 1000. Yo
ck that the flo
out I made a
Fig
23
(sometimes
ood to go (you
upwind earlie
d order upwin
to solution m
can make tha
ou can always
ows/magnitud
mistake setti
gure 4.11
Fluent crashe
ur mesh, bou
er, my Fluent
nd) for improv
ethods and c
at change too
s stop the cal
des make som
ing the bound
es). File, Save
ndary condit
t recommend
ved accuracy
changed it. It
o.
culation early
me sense befo
dary conditio
e Project
ions, etc.)
ded using a hi
. This may be
also suggeste
y. Sometime
ore spending
ons.
gher
e a
ed
s I’ll
all
4.12 CalcOnce the p
parameter
Note that m
Also note t
Once you h
culating Sol
program calcu
s (in this case
my solution c
that the Cons
have a solutio
ution
ulates, you’ll s
e, continuity,
converged aft
ole prints the
on calculated,
see a plot of t
x‐velocity, y‐v
er approxima
e residuals co
, save your w
Fig
24
the residuals
velocity).
ately 400 itera
rresponding t
ork again.
gure 4.12
(errors) for e
ations to the
to each iterat
each of the eq
minimum er
tion.
quation
ror.