Professional Documents
Culture Documents
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Login
Search
Labels: None
Problem Specification
1. Pre-Analysis & Start-Up
2. Geometry
3. Mesh
4. Setup (Physics)
5. Solution
6. Results
7. Verification & Validation
Exercises
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
Reynolds number R ebased on the pipe diameter is
1 3 and
k coefficient
g / m of viscosity
2- 3k xg / 1( The
m
0 s ) .
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 centerline velocity, wall skin-friction coefficient, and velocity profile
at the outlet. 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.
Go to Step 1: Pre-Analysis & Start-up
See and rate the complete Learning Module
Go to all FLUENT Learning Modules
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Problem+Specification
1 / 40
06-08-2012
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Problem+Specification
2 / 40
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Simulation > > FLUENT - Laminar Pipe Flow - Pre-Analysis & Start-Up
Login
Search
Labels: None
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.
A l l
P r o g r a m s >
A n s y s
1 2 . 1 >
W o r k b e n c h
https://confluence.cornell.edu/pages/viewpage.action?pageId=85624043
3 / 40
06-08-2012
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/pages/viewpage.action?pageId=85624043
4 / 40
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Login
Search
Labels: None
2. Geometry
3. Mesh
4. Setup (Physics)
5. Solution
6. Results
7. Verification & Validation
Exercises
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 W o r k b e n c h .PSave
r othej project
e c as
t "LaminarPipeFlow"
P a g e
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.
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Geometry
.SYour
c ANSYS
h e m a t i
5 / 40
06-08-2012
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.
We will work through each step from top down to obtain the solution to our problem.
Analysis Type
In the P r o j e c t
Sof the
c hWorkbench
e m a window,
t i c right click on G e o m and
e tselect
r y P r o p e, asr shown
t i ebelow.
s
The properties menu will then appear to the right of the Workbench window. Under A d v a n c e
A n a l y s to
i 2D
s asTshown
y p inethe image below.
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Geometry
G e o ,m
change
e t the
r y
O p t
6 / 40
06-08-2012
Creating a Sketch
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Geometry
7 / 40
06-08-2012
Dimensions
At this point the rectangle will be properly dimensioned.
Under S k e t c h i n g , select
T oDo i l mb eo nx tab,
se i use
s o the
n default
s
dimensioning tools. Dimension the geometry as shown in
the following image.
) C o n c e p t
>
S
as shown
u r f inathecimage
e
below.
F r o m
S k e t c
Oand
b then
j e under
c t Surface
s
.PSave
r oyour
j work
e c thus
t far
P inatheg e
Go to Step 3: Mesh
See and rate the complete Learning Module
Go to all FLUENT Learning Modules
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Geometry
8 / 40
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Login
Search
Labels: None
3. Mesh
4. Setup (Physics)
5. Solution
6. Results
7. Verification & Validation
Exercises
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 W o r k b e n c h
,Pthen
r (o Dj o
e cu tb l Pe a g
C. el i c k )
M e s h
Default Mesh
In this section the default mesh will be generated. This can be carried out two ways. The first way is to ( R i g h t
G e n e r a t, as
e shown
M in
e the
s image
h
below.
M e s h
C l i c k )
>as can
G bee seen
n ebelow.
r a t e
9 / 40
M e s
06-08-2012
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.
Now, the M a p p e d
F a still
c emustMbe eapplied
s h toi the
n pipe
g geometry. In order to do so, first click on the pipe body which
should then highlight green. Next, ( C l i c k in
) theAD pe pt la yi l s
o f
M a p table,
p e as
d shown
F abelow.
c e
M e s h i n g
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 E d g e
must
S i be
z used.
i n gThe divisions along the axial direction will be specified first. Now, an E d g e
needs
S i ztoi n g
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Mesh
10 / 40
be inserted. First, ( C l i c k )
06-08-2012
M e s h
as
C shown
o n below.
t r o l
>
S i z i n g
Now, the geometry and the number of divisions need to be specified. First ( C l i c k )
E d g e , S . Then
e l hold
e c down
t i o n
the "Control" button and then click the bottom and top edge of the rectangle. Both sides should highlight green. Next, hit A p punder
l y
the D e t a i l s table
o fas shown
S i below.
z i n g
Then, set N u m b e r
o f as shown
D i vin the
i simage
i o below.
n s
o f to 100
D as
i vshown
i s below.
i o n s
At this point, the edge sizing in the the radial direction will be specified. Follow the same procedure as for the edge sizing in the axial
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
M e sin the
h Tree and then by expanding S t a t i under
s t the
i cD se t a i l s table.
o fIn order
M to
e get
s the
h desired 500 element
mesh the B e h a needs
v i oto be
r changed from S o tof Ht a for
r dboth E d g e
S. Ini order
z i to
n carry
g ' this
s out first E x p a n d
M e sin the
h tree outline then click E d g e
and
S i then
z ichange
n g B e h a tov Hi ao under
rr d the D e t a i l s
o f table,
E d g e
as shown below.
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Mesh
11 / 40
06-08-2012
Radial Sizing
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Mesh
N a m . eEnter
d Inlet
S and
e click
l e O
c tK, as
i oshown
n below.
12 / 40
06-08-2012
Now, create named selections for the remaining three sides and name them according to the diagram.
P
andr click
o jthee Uc pt d Pa at eg e P r o
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Mesh
13 / 40
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Login
Search
Labels: None
4. Setup (Physics)
5. Solution
6. Results
7. Verification & Validation
Exercises
Useful Information
Click here for the FLUENT 6.3.26 version.
Next, the mesh and geometry data need to be read into FLUENT. To read in the data ( R i g h t
W o r k b e n c h
P
as shown
r o j inethec image
t
Pbelow.
a g e
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
C l i c k ) in the
S e t u p
14 / 40
>
06-08-2012
Launch Fluent
Double click on S e t inuthep W o r k b e n c h
P
which
r owillj bring
e cupt the F
P L
a gU eE N T
L. When
a u the
n Fc Lh Ue rE N T
L a u n appears
c h e change
r
the options to "Double Precision", and then click O Kas 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.
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
15 / 40
06-08-2012
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 ( C l i c k )
M eassshown
h in> the image
C h ebelow.
c k
Dwindow
i s pto lopen,
a yas shown below. Note that the N a m e d
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
S ecreated
l e c t i o
16 / 40
06-08-2012
M o u and
s ethen B
moving
u t the
t omouse
n in
L e f t toHtheaL no dw eC r o rR n i eg rh t
M o and
u sdrag
e a box
B uanywhere
t t o from
n the L o w e r
C o r n e r
R i g h t to the
H a n d
C o
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
17 / 40
06-08-2012
In the C r e a t e / E d menu
i t set
M the
a Dt ee rn i stoa1kg/m^3
i l t sy (constant) and set the V i s c oto 2e-3
s i kg/(ms)
t y (constant) as
shown in the image below.
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
18 / 40
06-08-2012
B o u n d a r y
C oasnshown
d i int the
i ofollowing
n s image.
>
i n l e t
>
19 / 40
E d
06-08-2012
menu,
C o as
n shown
d i t below.
i o n s
menu,
C o as
n shown
d i t below.
i o n s
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
20 / 40
06-08-2012
First, select p i p e in
_ the
w B
a lo l u n d a r y
menu,
C o as
n shown
d i t below.
i o n s
Save
In order to save your work ( C l i c k ) F i l e
as
> shown
S ain the
v image
e
Pbelow.
r o j e c t
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
21 / 40
06-08-2012
Go to Step 5: Solution
See and rate the complete Learning Module
Go to all FLUENT Learning Modules
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Setup+%28Physics%29
22 / 40
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Login
Search
Labels: None
5. Solution
6. Results
7. Verification & Validation
Exercises
Useful Information
Click here for the FLUENT 6.3.26 version.
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 S o l u t i o n thenMclick
e on
t hM oo dms e nandt select
u mS e c o n d
O r as
d shown
e r inUthepimage
w i below.
n d
23 / 40
06-08-2012
I n i t i
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Solution
24 / 40
06-08-2012
Execute Calculation
Prior, to running the calculation the maximum number of iterations must be set. To specify the maximum number of iterations click on
R u n
C a l then
c usetl the
a N
t i uo mn b e r
o f to 100,
I t ase shown
r a tin the
i oimage
n s below.
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Solution
25 / 40
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Login
Search
Labels: None
6. Results
7. Verification & Validation
Exercises
Useful Information
Click here for the FLUENT 6.3.26 version.
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 G r a p h i c s
& . Next,
A ndouble
i m click
a toni Vo en cs twhich
o r isslocated
under G r a p . Then,
h i cclick
s on D i s p. Zoom
l a into
y the region near the inlet. (Click here to review the zoom functionality discussion
in step 4.) 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 S c ato l0.4
e in the V e c tmenu
o r and
s click D i s p. l a y
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 ( C l i c k )
D i s pas lshown
a y below.
>
V i e w s . . .
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Results
26 / 40
06-08-2012
Centerline Velocity
Here, we'll plot the variation of the axial velocity along the centerline. In order to start the process ( C l i c k )
P l o t . . . as
> shown
S ebelow.
t
U p . .
R e s u l t s
>
27 / 40
06-08-2012
28 / 40
06-08-2012
P, asi shown
c t ubelow.
r e
Under F o r ,mchoose
a t one of the following three options:
E P - ifS you have a postscript viewer, this is the best choice. E P allows
S
you to save the file in vector mode, which will offer the best
viewable image quality. After selecting E P , choose
S
V e c from
t o under
r
F i l e . T y p e
T I F- this
F will offer a high resolution image of your graph. However, the image file generated will be rather large, so this is not
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Results
29 / 40
06-08-2012
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 ( c l i c k )
H e l p
>
U s e
I n d ase shown
x
in the following image.
Then, set C o m p u t to
e i nF ,l to
r etell
ot FLUENT
m
to calculate the reference values from the values at inlet. Check that density is 1
k g 3/ and
m velocity is 1 m. (Alternately,
/ s
you could have just typed in the appropriate values). Your R e f e r e n cshould
e
V a l u e
look the same as the following screen snapshot.
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Results
30 / 40
06-08-2012
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
( C l i c k )
R e s u l t s
>
P l aso shown
t s below.
>
X Y
P l o t . . .
>
S e t
U p . .
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Results
31 / 40
06-08-2012
32 / 40
06-08-2012
33 / 40
06-08-2012
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Results
34 / 40
06-08-2012
Search Cornell
SimCafe
Home
Brow se/Manage
Simulation > > FLUENT - Laminar Pipe Flow - Verification & Validation
Login
Search
Labels: None
Refine Mesh
Let's repeat the solution on a finer mesh. For the finer mesh, we will use increase the radial divisions from 5 to 10. In the
W o r k b e n c h
P
rightr click
o j one Mc et sthen
Ph click
a g De u p l as
i cshown
a t below.
e
https://confluence.cornell.edu/pages/viewpage.action?pageId=85624049
P i p e . YouF should
l o have
w the
( m
following
e s two
h projects
2 ) in your W o r k b e n c
35 / 40
06-08-2012
o f, as shown
D i vbelow.
i s i o n s
The mesh should now have 1000 elements (10 x 100). A quick glance of the mesh statistics reveals that there is indeed 1000
elements.
https://confluence.cornell.edu/pages/viewpage.action?pageId=85624049
.PUnder
r oL j ae mc it n Pa ar g Pe i p e , right
F click
l o onw
36 / 40
( m e
06-08-2012
Velocity Profile
In order to launch FLUENT double click on the S o l u oft the
i o"Laminar
n
Pipe Flow (mesh 2)" project in the W o r k b e n c h
P a .gAfter,
e FLUENT launches ( C l i c k )
P l o t s
> as shown
X Y in the
P image
l o t below.
>
S e t U p . . .
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 P o s i t i o n under
o nO pX t i A
and
o xchoose
n i ss P o s i t i o n instead.
o n ToYmakeAthex position
i s
variable the radial distance from the centerline, under P l o t
D ,i change
r e cX tto i0 and
o nY to 1. To plot the axial velocity on the x
axis of the graph, select V e l o cfori the
t first
y . box
. .underneath X
A x i s ,Fandu select
n c At ix oi na l
Vforethel second
o c i box.
t y
Next, select o u t, which
l e tis located under S u r f . aThen,
c euncheck
s
the W r i t e check
t o boxFunder
i l O
e p t i, so
o the
n graph
s
will plot. Now, your S o l u t i o nmenuXshould
Y look
P l exactly
o t like the following image.
https://confluence.cornell.edu/pages/viewpage.action?pageId=85624049
37 / 40
06-08-2012
Further Verification
The plot below shows the results of a further refined mesh ( 20 radial x 100 axial ) and the theoretical results.
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/pages/viewpage.action?pageId=85624049
38 / 40
06-08-2012
Search Cornell
SimCafe
Home
Simulation > > FLUENT - Laminar Pipe Flow - Exercises
Brow se/Manage
Login
Search
Labels: None
Problem Specification
1. Pre-Analysis & Start-Up
2. Geometry
3. Mesh
4. Setup (Physics)
5. Solution
6. Results
7. Verification & Validation
Exercises
Exercises
Consider developing ow 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 oweld on meshes of 100 5, 100 10 and 100 20 (axial divisions radial divisions).
1. Plot the axial velocity proles at the exit obtained from the three meshes. Also, plot the corresponding velocity prole obtained from
fully-developed pipe analysis. Indicate the equation you used to generate this prole. 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 ow 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 t of
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Exercises
39 / 40
06-08-2012
to obtain the coe cients p and K. Plot vs. r (using symbols) on a log-log plot. Add a line corresponding to the least-squares t to
this plot.
Hint: In FLUENT, you can write out the data in any "XY" plot to a le by selecting the "Write to File" option in the Solution XY Plot
menu. Then click on Write and enter a lename. You can strip the headers and footers in this le and read this into MATLAB as
column data using the load function in MATLAB.
4. Let's see how p changes when using a rst-order accurate discretization. In FLUENT, use "rst-order upwind" scheme for
momentum to solve for the oweld on the three meshes. Repeat the calculation of coe cients 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 t to this plot. In all, you should have four
curves on this plot (two each for second- and rst-order discretization). Make sure you include an appropriate legend in the gure.
Contrast the value of p obtained in the two cases and briey explain your results (2-3sentences).
Hint: To interpret your results, you should keep in mind that the rst 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.
Return To Problem Specification
See and rate the complete Learning Module
Go to all FLUENT Learning Modules
This work is licensed under a C reative C ommons Attribution-Noncommercial-Share Alike 3.0 United States License
Adaptavist Theme Builder (4.2.4-M1) Powered by Atlassian Confluence 3.5.16, the Enterprise Wiki
https://confluence.cornell.edu/display/SIMULATION/FLUENT+-+Laminar+Pipe+Flow+-+Exercises
40 / 40