Вы находитесь на странице: 1из 24

 

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. 

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 / at the inlet and outlet is at the atmospheric pressure. 

   

 
1
 

1 ANSYYS Workb
bench 
 

1.1 Open Workbench 
1. Opeen the Start M
Menu 
2. Typ
pe Workbench h into the seaarch 
3. Sele
ect the icon fo
or Workbencch 17.1 
4. ernately, you can find it in the ANSYS 17.1 folder of  the 
Alte
starrt menu 

1.2 Creaate a Fluid FFlow (Fluentt) Project 
1. Und der the Toolbox tab (leftt menu), dra ag the FLUENNT 
mo odule over  to o the Workspace (white space) or 
douuble‐click.   
2. Youu will see you ur  new Projeect appear. Name it 
Prooject 1 Lamin nar Flow Coaarse Mesh.  TThis will 
diffferentiate thhe project file
e from somee of the otheer 
flue
ent simulatio ons you will be creating.
3. Savve the projecct in your U:// drive.  Figuree 1.1 

Project Boxx
Toolbo
ox

 
Figure 1.2 
F

 
2
 

1.3 Set u
up Workben
nch Informaation 
1. On the top menu u, click View 
2. Seleect Files. A me
enu will pop up at the botttom.  This ca n tell you where the files aare stored.  TThere 
will be a bunch ccreated as you progress an nd it may be i mportant to note the locaation. 
3. On the top menu u again, click View, and select Propertiees.  This timee, a menu will appear on th he 
righ
ht side of the screen.  The Properties mmenu will channge as you select differentt tabs on yourr 
projject. 

2
P
Propertiess Menu
3

Files Menu

 
Figure 1.3 
F

   

 
3
 

1.4 Set A
Analysis type 
1. Witthin your Pro
oject box, sin
ngle‐click Ge
eometry.  Your Propertiees menu will change. 
2. Undder Advance ed Geometryy Options, se et Analysis TType to 2D.

 
Fiigure 1.4 

1.5 New
w Geometry 
1. In tthe Project B
Box, right‐click Geometryy. 
2. Sele ect New Dessign Modele er Geometryy… 
3. ANSSYS Design  Modeler (DM
M M) will then
ope en. 

Note thhat you can also Import Geometry if 
you maade the geom metry in a CA AD program.  
Just savve the CAD ffile as a univversal formatt, 
such ass .STP 

 
Figure 1.5 

 
4
 

2 ANSYYS Design Modelerr 
2.1 Creaating a New Sketch 
1. In the Tree Outliine (left menu
u), click XYPlaane 
2. In the Top Menu u, click the Ne
ew Sketch icoon.  Sketch 1 wwill appear in
n your Tree O
Outline under 
XYPPlane 
3. On the Coordina ate System in the bottom‐right corner,  click the +Z‐aaxis to snap yyour view to 2
2D in 
the XY plane.  Yo
ou can also familiarize yourself with thee zooming and d panning funnctions. 
4. To bbegin drawingg the geomettry, select the
e Sketching taab at the botttom of the Trree Outline.  N
Note 
thatt the Sketchin
ng Toolboxess menu will re eplace your TTree Outline.

2. New Sketch

Tree Ou
utline 

 
Figure 2.1 
F

   

 
5
 

2.2 Draw
wing the Ge
eometry 
1. In the Sketching Toolbox, und der Draw, clicck Rectangle..  Your cursorr will become a pencil. 
2. Create the rectangle of any siize anywhere in Quadrant  1 of your draawing canvas.  We will con nstrain 
the location and size next. 

Draw
wing Tools

Editing Tools
 
Figure 2.2 
F

2.3 Consstraining Ge
eometry to the Axis 
1. In the Sketching Toolbox, select the Consttraints dropd own. 
2. Seleect Coincidennce.  This will set a rule forr an edge to ccoincide with another. 
3. Click the edge off the rectangle you want to o constrain a nd then selecct the axis you u want to lock it to.  
Thee edges of thee rectangle wiill change color if they are  fully constrained. 
4. Do tthis for both edges of the rectangle, so o that its loweer left corner is at the origiin (0, 0). 

 
Figure 2.3 
F

 
 
6
 

2.4 Dime
ensioning th
he Geometry 
1. In the Sketching Toolbox, sele ect the Dimen nsions dropdoown 
2. Seleect General.  You can also use Horizonttal or Vertica l for their resspective lines. 
3. Seleect the edge o of the rectanggle you want to dimensionn.  Click abovee or next to that edge to p place 
the dimension laabel. 
4. When you create e a dimension n, it will show
w up in the Deetails View mmenu.  You can n edit these vvalues 
andd it will adjustt the size of th
he rectangle.
5. Create a dimension for the ho orizontal and vertical liness of the rectan
ngle and set ttheir values too 
1 0.1  and d  2 0.02 , respectively. 

 
Figure 2.4 
F

   

 
7
 

2.5 Cre
eating a Surrface 
1. Cllick back to th
he Modeling Tab at the boottom of the SSketching To oolbox. 
2. On the top me
O enu, open thee Concept droopdown and sselect Surfacee from Sketch hes. 
3. Se
elect your ske etch and then
n click Apply iin the Detailss View (bottoom left menu)). 
4. Cllick the Geneerate button in the top menu.  Your parrt will fill grayy when the su
urface is 
ge
enerated. 
ou are now done with creaating your geometry.  Clickk Save and close Design M
5. Yo Modeler. 

2 4

3
 
Figure 2.5 

   

 
8
 

3 Meshing 
3.1 Op
pen Meshingg 
1. Go back into 
G ANSYS Worrkbench. 
2. Note that you
N u should see e a checkmarrk next to Geeometry in yyour Projectt Box. 
3. Sa
ave the Projject. 
4. In
n the Projectt Box, right‐click Mesh aand select Ed
dit… 
5. The Mesh Editor will ope en and your GGeometry should autom matically load. 

 
Figure 3.1 

 
 
9
 

3.2 Sett up Meshin
ng 
1. With the Mesh
W h Editor open n, orient your view, if neceessary, with th
he coordinatee system and d 
Zooom to Fit (button in the TTop Menu with a Cube insside a Magnifyying Glass).  YYou can also 
faamiliarize you
urself with the
e zooming and panning fu nctions. 
2. In
n the Outline menu (left side), expand o out the Geom metry tree (plus sign) and cclick Surface Body 
3. Thhe Details Me enu (bottom left) will channge to properrties of the Suurface Body 
4. Under the Deffinition tab, change the Th hickness to  . 
5. Under the Matterial tab, chaange the Fluid/Solid to Fluuid. 

Figure 3.2 

   

 
10
 

3.3 Sett Mesh Reso
olution 
1. n the Outline menu, click tthe Mesh tab. 
In
2. Th
he Details me enu will change to propertties of the Meesh. 
3. Se
et Min Size, MMax Face Size e, and Max Te
et Size all to  . 
4. Th
his will set yo
our grid size to
o 1 mm spacing. 

Figure 3.3 

   

 
11
 

3.4 Sett Mesh to Q
Quadrilateraals 
1. Faamiliarize you
urself with the types of sellection tools.   There is Verrtex Selection
n, Edge Selection, 
Fa
ace Selection n, and Body Selection. 
2. Use the Face SSelection tooll to select the
e face of the ggeometry 
3. Once it is selec
O cted (the face
e turns green)), right‐click tthe geometryy and Insert M Mapped Face
Meshing 
M
4. A Face Meshin ng will appearr in your Outlline menu.  OOnce it is seleccted, the Details menu will 
sh
how its prope erties. 
5. In
n the Details MMenu, make sure Method d is set to Quaadrilaterals.
6. In
n the top men nu, click Geneerate Mesh.  If you click thhe Mesh icon in the Outlin ne menu again, 
yo
our mesh sho ould appear oover your geometry. 

1  6

Figure 3.4 

 
 
12
 

3.5 Boundary Lab
beling 
1. In
n the Top Menu, use the e edge selectionn tool to selecct the left edge of your geeometry 
2. Right‐click the left edge andd select Creatte Named Se lection 
3. Name this edg
N ge inlet. 
4. Repeat the pro ocess for the other edges, naming the w wall_top, wall_bottom, an nd outflow, 
espectively. 
re
5. Thhis naming prrocess helps FFluent determ
mine Boundarry Conditionss. 
6. Click File, Save
e Project, and
d return to AN
NSYS.  If you w want to creatte a backup file of the Messh, 
yoou can select File, Export, and change tthe file type t o .msh.  If forr some reason n, your 
Workbench Pr
W roject become es corrupted, you can resuume from thiss point by imp porting the .mmsh 
file to a new Project.  Note that you will not be able tto edit your .m nspect that it is 
msh file, so in
orrect before exporting. 
co

 
Figure 3.5 

 
 
13
 

4 Flue
ent 
4.1 Upd
dating Proje
ect 
1. Back in Workbeench, you mayy notice a Ligghtning Bolt nnext to the M
Mesh in your P Project Box.  TThis 
meeans that you
ur Mesh has nnot been updaated yet. 
2. To update the M
Mesh, right‐cclick Mesh and d select Updaate.  Once it is done, a greeen checkmarrk 
sho
ould appear. 

 
Fiigure 4.1 

4.2 Starrting Fluentt 
1. To open Fluent,, double‐clickk Setup in the Project Box.   A dialog will pop up with
h settings.  Select 
the ptions and click OK. 
e following op

 
Fiigure 4.2 
 
14
 

4.3 Flue
ent Layout 
1. Flu
uent is segme ented into sevveral menus.   
a. Top Rib bbon – Adjustting propertiees 
b. Tree – EEach step of ssetting up thee simulation
c. Task Pa age – The setuup of variable
es and properrties in each sstep of the Trree 
d. Main W Window – View w the domain n, simulation  progress, or results 
e. Console e – The commmand line sho owing progresss or errors. 
2. Opperating Fluennt will mainly consist of running down tthe Tree and editing variables in each 
resspective Taskk Page. 

b c d

 
Fiigure 4.3 

   

 
15
 

4.4 Setu
up – Generaal 
Note: Reco
ommended se Project 1 are in Bold and U
elections for P Underlined 

1. Meesh 
a. Once Fluent opens, yyour geometrry and mesh sshould autom matically display.  If it doessn’t, 
you can n manually dissplay compon nents by clickking Display inn the Task Paage. 
b. If you need to scale the geometryy (e.g. you maade the geom metry in inchees and you waant 
the soluution in SI uniits), you can aalso do it heree. 
c. You may also Check the mesh forr errors and qquality here.
2. Solver 
a. Type 
i. Pressure‐Based for low‐sspeed incomppressible to high‐speed compressible flo ows 
ii. Density‐Base ed reserved ffor flows withh strong interd dependence between den nsity, 
energy, mom mentum, or species. 
b. Velocityy Formulation n 
i. Absolute is wwhere majoriity of the dom main is non‐rootational 
ii. Relative mayy be useful in cases wheree the domain rotates 
c. Time 
i. Steady solve es for a steady‐state (deveeloped) solution 
ii. Transient is used if the soolution is a fu nction in time 
d. 2D spacce 
i. Planar is youur standard 2D space in Caartesian coord dinates 
ii. Axisymmetric revolves th he domain aroound an axis (e.g. cylindriccal coordinatees) 
iii. Axisymmetric swirl revolvves the domaain around an me tangential 
n axis with som
velocity 
3. Gravity can include buoyancy effects for fflows or graviitational settlling in particlee tracking. 

 
Fiigure 4.4 

 
16
 

4.5 Setu
up – Models 
Description
ns: 

1. Energy trackingg is used for h heat transfer ssolutions andd things that aare a function
n of temperatture 
(e.g. diffusion, aair density, re
elative humidity) 
2. Visscous Model determines h how you solve e/simplify thee Navier‐Stokkes equations.  For Laminar 
flow, simply cho oose the Lam minar model.  For Turbulennt flow, you have several o options that 
approximate a ssolution.  The e most common is k‐epsiloon because off its simplicityy. 
3. Species trackingg is when you u would simulate a speciess (e.g. relativee humidity) m mixing/diffusing 
4. Disscrete Phase is used for paarticle trackinng within the  fluid. 

 
Fiigure 4.5 

   

 
17
 

4.6 Setu
up – Materiials 
If you wantt to change environmental conditions, such as the w working fluid (e.g. air, wateer, helium) orr 
material su
urface roughnness (affects sskin friction), you can do itt in this tab 

Default pro
operties are ffine. 

 
Fiigure 4.6 

Note that C
Cell Zone Con
nditions will b
be skipped over (defaults aare fine). 

   

 
18
 

4.7 Setu
up – Boundary Conditions 
This is whe
ere we’ll defin
ne the boundary condition
ns for the sim ulation.  Notee that the edgges you labeled 
during messhing corresppond to the bo
oundaries fou
und in fluent.   Select a zon
ne and click Eddit… 

1. Inlet – Set your Velocity Maggnitude to 0.1 m/s 
2. Ouutflow – default weighting of 1.  If you hhave multiplee outflows, yo ou can scale tthe proportion of 
the
e mass flow that exits each h outflow (e.gg. 0.2 outflow
w 1, 0.8 outfloow 2) 
3. Waall – Both deffault stationary wall with n ou may want a moving waall. 
no slip.  For o ther cases, yo

 
Fiigure 4.7 

 
19
 

4.8 Solu
ution – Solu
ution Metho
ods 
1. Sch
heme 
a. SIMPLEE – (Semi‐Implicit Method ffor Pressure‐ Linked Equattions) Defaultt, robust. 
b. SIMPLEC – (SIMPLE‐C Consistent) A Allows faster cconvergence for simple prroblems (e.g.,, 
laminarr flows with nno physical mo odels employyed) 
c. PISO – ((Pressure‐Imp plicit with Spllitting of Ope rators) For un
nsteady flow problems or 
mesh w with high skew
wness 
2. Gradient 
a. Green‐G Gauss Cell Baased – Default method, so lution may haave false diffu usion/smearing 
b. Green‐G Gauss Node B Based – Minim mizes false difffusion, recommmended forr tri/tet mesh h 
c. Least Sq quares Cell Baased – For po olyhedral messhes, same acccuracy, prop perties as node 
essure 
3. Pre
a. Standarrd – The defaault scheme. R Reduced accuuracy for flow ws with large ssurface‐norm mal 
pressurre gradients nnear boundaries (but shou ld not be useed when steep p pressure 
changess are presentt in the flow – – PRESTO! schheme should be used insteead) 
b. PRESTO ws, steep presssure gradien
O! – For highlyy swirling flow nts, or curved
d domains 
c. Linear – – When otherr options resu ult in converggence difficultties or unphysical behavior 
d. Second‐Order – Use for compresssible flows  
e. Body Fo orce Weighted – When forrces are largee e.g. high Ra convection, sswirling flowss 
4. Moomentum 
a. First Orrder Upwind – – Easiest convvergence, onlly first order aaccurate, and d very diffusivve 
i.e. dissipates large ggradients and d can suppres s small/sharp p features 
nd
b. Second Order Upwin nd – 2  order accuracy, esssential when n flow is not aaligned with 
mesh grid direction e e.g. during tri/tet mesh 

 
Fiigure 4.8 
 
20
 

4.9 Solu
ution – Mon
nitors 
1. Select Residualss and click Eddit… 
2. Un
nder Residual Values, checck the box thaat says Normaalize.  This scales the last iiteration of 
Residuals by the e maximum R Residuals and can be used  as a better gauge for convvergence. 
3. Un
nder Converge ence Criterion, select Non ne.  The Conv ergence Criteerion tells Fluent when thee 
sollution has con nverged to a value that yo ou determine  to be accuratte enough an nd stops 
callculating the ssolution earlyy.  By turning this feature ooff, Fluent wiill continue caalculating thee 
sollution until it reaches the nnumber of ite erations you sset. 

 
Fiigure 4.9 

   

 
21
 

4.10 Solu
ution – Solu
ution Initialization 
Select yourr initialization
n technique, tthe boundaryy to initialize w
with, and theen click Initialize 

andard Initiallization – Thiss sets all mesh cells to a si ngle starting value.  Typicaally, you select 
1. Sta
vallues that are the closest to
o what you th hink the final  solution will look like to help the solutiion 
converge fasterr.  Compute frrom Inlet takkes inlet cond itions (from tthe boundaryy conditions taab 
you set earlier) and applies itt to the whole mesh as a sstarting guesss.  The calculaations then reefine 
thee flow to a coonverged steaady‐state soluution 
2. Hyybrid Initialization – Provides a quick approximation  of the flow field by solvingg Laplace’s 
equation to estimate a flow field and presssure field. 

 
Figgure 4.10 

   

 
22
 

4.11 Solu
ution – Run Calculation

1. SA
AVE YOUR WO ORK BEFORE P PROCEEDING (sometimes  Fluent crashees).  File, Savee Project 
2. Check Case to m make sure eve ood to go (youur mesh, boundary conditions, etc.) 
erything is go
a. Note: Since I selected First order upwind earlieer, my Fluentt recommend ded using a higher 
order M
Momentum So olver (secondd order upwinnd) for improvved accuracy.  This may bee a 
good suuggestion, so I went back tto solution m ethods and cchanged it.  It also suggesteed 
Least Sq
quares for Gradient.  You ccan make thaat change tooo. 
3. Sett the Numberr of Iterations to 1000.  Yoou can alwayss stop the calculation earlyy.  Sometimes I’ll 
sto
op at around 200 and checck that the flo ows/magnituddes make som me sense befo ore spending all 
thaat time calculating to find out I made a mistake settiing the bound dary conditioons. 
4. Clicck Calculate 

 
Figgure 4.11 

   

 
23
 

4.12 Calcculating Solution 
Once the p
program calcu ulates, you’ll ssee a plot of tthe residuals  (errors) for eeach of the eq
quation 
parameters (in this case
e, continuity, x‐velocity, y‐vvelocity). 

Note that m
my solution cconverged after approximaately 400 iteraations to the minimum error. 

Also note tthat the Console prints the
e residuals corresponding tto each iterattion. 

Once you h
have a solutio
on calculated,, save your work again. 

 
Figgure 4.12 

 
24

Вам также может понравиться