flow around a curved channel
TRANSCRIPT
-
8/9/2019 Flow Around a Curved Channel
1/21
Fluid Dynamics
CAx Tutorial: Channel Flow
Basic Tutorial # 4
Deryl O. SnyderC. Greg Jensen
Brigham Young UniversityProvo, UT 84602
Special thanks to:
PACE, Fluent, UGS Solutions, Altair Engineering;
and to the following students who assisted in the creation of the Fluid Dynamics tutorials:
Leslie Tanner, Cole Yarrington, Curtis Rands, Curtis Memory, and Stephen McQuay.
-
8/9/2019 Flow Around a Curved Channel
2/21
-
8/9/2019 Flow Around a Curved Channel
3/213
Channel Flow
2D Curved Flow
In this tutorial, GAMBIT will be used to create and mesh the flow field geometry forthe problem. Once this is complete, FLUENT will be used to solve for the pressurefield everywhere in the domain and plot the pressure distribution across the pipe.
This tutorial will provide experience in solving 2D flows and creating plots of theresults.
The methods expressed in these tutorials represent just one approach to modeling, constrainingand solving 2D problems. Our goal is the education of students in the use of CAx tools formodeling, constraining and solving fluids application problems. Other techniques and methods
will be used and introduced in subsequent tutorials.
Water flows around the vertical two-dimensionalbend with circular streamlines and constant velocityas shown below. If the pressure is 40 kPa at point (1),determine the pressure at points (2) and (3). Assumethat the velocity profile is uniform as indicated.
-
8/9/2019 Flow Around a Curved Channel
4/214
Channel Flow
Creating Geometry
Begin the problem by creating geometry inGambit.
Start Gambit by either typing gambit at thecommand prompt (Unix or Windows) orclicking on the Gambit icon (Windows).
The Gambit standard display shouldappear.
Meshes are generated in Gambitby follow-ing left to right the menu icons located inthe top right of the display window.
The 2-D geometry will consist of two 90arcs with lines connecting the ends. Createa node which will be used to define thecenter of curvature for the two arcs.
Geometry > Vertex > Create Vertex
Enter the Vertex at (0,6,0) as shown:
Select Apply and Close.
-
8/9/2019 Flow Around a Curved Channel
5/215
Channel Flow
Creating GeometryGeometry > Edge > Create Real CircularArc
Note: Icons with a red arrow have a pull down menu.The arc button is located in the edges pull down menu.To activate the pull down menu select the icon with
MB3. Buttons are then selected withMB1.
Select the far right radio button
Enter 6 for the radius, 225 and 315 for theangles.
Select the centerbutton.
Select the vertex by holding the shift but-ton and clicking MB1 over the vertex.
Repeat for another arc of radius 4.
Now draw two lines to connect the arcs.
Geometry > Edge > Create Edge
Create lines to connect the arcs by shiftselecting both end points and selectingApply. Repeat for the other side of thechannel.
-
8/9/2019 Flow Around a Curved Channel
6/216
Channel Flow
Creating Geometry
Next, create a face from the edges just cre-
ated.
Geometry > Face > Wireframe
Shift select all four edges and click Apply.
The edges should now be colored blue toindicate that the face has been created.
If problems are encountered in creating thegeometry, the geometry can be loaded from thefile Bend_Geometry.dbs.
-
8/9/2019 Flow Around a Curved Channel
7/217
Channel Flow
Meshing Geometry
The geometry has now been created. Thenext step is to generate the mesh.
First the edges must be meshed.
Mesh > Edge > Mesh Edges
Shift Select the left straight edge and theright straight edge.
Change the pull-down menu to Intervalcount and enter 30.
Click Apply.
Repeat this procedure for the upper andlower walls.
The screen should now look like this:
Next mesh the face.
Mesh > Face > Mesh faces
Shift Select any edge of the geometry to
select the face. Make sure the Elementmenu is set to Quad, Type is set to Mapand then select Apply.
The screen should look like this:
If problems are encountered in meshing geome-try, the meshed geometry can be loaded fromthe file Bend_Meshed.dbs.
-
8/9/2019 Flow Around a Curved Channel
8/218
Channel Flow
Boundary Conditions
Now define the boundary conditions forthe problem.
Since Fluent version 6 is going to be used,select
Solver > Fluent5/6
from the pull-down menu across the top of
the window.
Operation > Zones > Specify BoundaryTypes
Change the pull-down menu at the bottomto edges. This allows for selection of indi-vidual edges. Select the top and bottomedges. Name them walls and clickApply.
Select the left straight edge, change thetype pull-down menu to Velocity-Inlet,name it inlet and click Apply.
Select the right straight edge, change thetype pull-down menu to Outflow, name itoutlet and click Apply.
Now the geometry is ready to be exported.
From the file pull-down menu, select
File>export>mesh
Select a location for the *.msh file andAccept.
make sure to select the "export 2-D (X-Y)Mesh" radio button.
Save and exit from Gambit.
-
8/9/2019 Flow Around a Curved Channel
9/219
Channel Flow
Starting in Fluent
Open Fluent from the Desktop or Startmenu.
Select 2D
Select Run
The following window should appear.
This is the FLUENT user interface. Mosttasks are completed using the menus acrossthe top. The menus are designed to guideyou through the analysis in an orderlyfashion, going from top to bottom througheach menu, and left to right across themenu bar.
Text commands can also be used in thecommand window.
If problems are encountered in specifyingboundary conditions, the completed mesh withboundary conditions specified can be loaded
from the file Bend_Complete.dbs.
-
8/9/2019 Flow Around a Curved Channel
10/2110
Channel Flow
Defining the Problem
Start by importing the mesh created inGambit.
File > Read > CaseA browse window should appear.
Locate the *.msh file and select OK.
FLUENT will read the mesh you created.If there are problems reading the mesh,return to the beginning of the tutorial andmake sure you follow the steps carefully. Ifthere are no problems the command win-dow should state done.
Now check the grid for errors.
Grid > Check
Any errors will be listed, otherwise thecommand window should again statedone.
-
8/9/2019 Flow Around a Curved Channel
11/2111
Channel Flow
Defining the Problem
Because the problem statement assumes aconstant velocity profile across the channel,the flow will be modeled as inviscid.
Define > Models > Viscous
Select the Inviscid radio button and thenOK.
Now the fluid properties must be specified.The fluid properties are found by selecting:
Define > Materials
Select database... to browse through theFLUENT library of materials. Scroll downand select water-liquid (h2o).
Select Copy to copy these material propertiesinto the current problem. Select Close on theDatabase Materials windows, followed byClose on the Materials window.
Note: it is very important to click on the copy button. Thefluid properties will not be loaded if the copy button is notselected.
-
8/9/2019 Flow Around a Curved Channel
12/2112
Channel Flow
Defining the Problem
In order to set gravitational conditions asspecified in the problem, select:
Define > Operating Conditions
Click on the Gravity radio button.
Set the Operating pressure to be 40000 Pa
and Gravity to be -9.81 m/s2 in the y direc-tion.
Click Ok.
Now the velocity condition at the inlet and
fluid type must be specified.
Define > Boundary Conditions
Select fluid under zones menu.
Select fluid from the type menu.
Click on set...
From the Material Name pull down menuselect the fluid that was previously addedto the list, namely water-liquid (h2o).
Select Ok.
-
8/9/2019 Flow Around a Curved Channel
13/2113
Channel Flow
Defining the Problem
Now to set the inlet conditions, select theinlet on the left, then select Set...Set...
Set the velocity magnitude to 10m/s.
Select Ok and close the BoundaryConditions window.
Specify which discretization functions willbe used to calculate the solution.
Solve > Controls > Solution
In the Solution Control dialogue box, setthe under-relaxation coefficients to
Pressure = 0.9Density = 1Body Forces = 1Momentum = 0.7
Also, change the Discretization functionsto:
PRESTO!SIMPLEC2nd order upwind
Click Ok.
-
8/9/2019 Flow Around a Curved Channel
14/2114
Channel Flow
Defining the Problem
By default, while trying to converge to asolution, FLUENT will stop iterating at aprescribed convergence threshold. Since theresiduals will be plotted and analyzedgraphically, it is not necessary to have FLU-ENT do this. To change this select:
Solve > Monitors > Residual
Place a check mark next to the Plot optionusing MB1.
Make a new window by incrementingWindow from 0 to 1.
Deselect all of the check convergenceboxes.
Select Ok.
Next, the solution must be initialized. Todo this:
Solve > Initialize > Initialize
From the Compute From pull-down menu,select the name given to the inlet wall.
Select Init then close.
Note: Once again, ifinitialize is not selected before closeis, the case will remain un-initialized.
-
8/9/2019 Flow Around a Curved Channel
15/2115
Channel Flow
Defining the Problem
In order to view the pressure field includ-ing the hydrostatic pressure, create a"Custom Field Function
Define > Custom Field Function
Create the function defined as follows:
absolute-pressure - density * 9.81 * y
Select absolute-pressure from the pull-down menu as shown:
Click Select.
Select the subtract sign.
Select density from the pull-down menuand click select
Select the multiplication (X) sign
Enter 9.81 on the calculator pad
Select the multiplication sign
Select the y-coordinate as follows:
First Pull-down menu: Grid
Second Pull-down menu: Y-Coordinate
Rename the function Press in the newfunction namebox.
Click Define and Close.
-
8/9/2019 Flow Around a Curved Channel
16/2116
Channel Flow
Defining the Problem
In order to view pressure at discretepoints, the points of interest must be creat-
ed.
Surface > Point...
Create three points by entering the coordi-nate values and giving the point a name. Ifthe bottom point surface creation fails, usea value slightly above zero (y=.0001), asshown.
Create two points located at the middle(y=1) and top of the channel (y=2), respec-tively.
Now set up monitors for these pointsunder:
Solve > Monitors > Surface...
Set up three separate monitors (one for
each point).
Rename the monitors.
Check the Printbox for all three monitors.Choose Iteration from the Every pull-down menu.
Select Define for the first monitor. Choosethe point to be monitored from theSurfaces scroll menu.
Change Report type to Sum.
Verify that the correct Custom FieldFunction chosen from the Report of menu.Click Ok.
Repeat for the remaining two points. Now,
while iterating, there will be a column ofpressure values displayed in the promptwindow for each point.
-
8/9/2019 Flow Around a Curved Channel
17/2117
Channel Flow
Solving the Problem
The problem is now ready to be solved.Select:
Solve > Iterate
Set the number of iterations to 100 andclick Iterate.
When iterations have completed close theiterate window.
Note: It is preferable to have a view of the residualshandy so that they can be visually monitored., as shown.
-
8/9/2019 Flow Around a Curved Channel
18/2118
Channel Flow
Analyzing the Results
Notice that the residuals have dropped by 6to 7 orders of magnitude and have leveledout. This means that the solution has con-verged.
To visually inspect the solutions, select
Display > Contours
From the pull-down menus select Pressureand select Display.
The Pressure Distribution should look likethis:
-
8/9/2019 Flow Around a Curved Channel
19/2119
Channel Flow
Analyzing the Results
Now, since the pressure along the z-axis isdesired, create a line along which to plotpressure vs. position by selecting:
Surface > Line/Rake
Enter the values as follows to define a line:
x0 = 0
y0 = 0x1 = 0y1 = 2
Name the line centerline. Click createthen close.
Display the line in the display window byhighlighting centerline in the GridDisplay window, and clicking display.
It should appear as shown:
-
8/9/2019 Flow Around a Curved Channel
20/2120
Channel Flow
Analyzing the Results
Select the line that was created:
Change the plot direction as shown:
Select Plot.
The plot should look like this:
If problems are encountered in setting up this
problem in fluent, the solved problem can beread in as a Case and Data from the fileBend.cas.
Now plot the user-defined function byselecting:
Plot > XY Plot
From the pull down menu, select:
Custom Field Functions...
-
8/9/2019 Flow Around a Curved Channel
21/21
Channel Flow
Analytical Solution
Where is the specific weight of the fluidand is the density. Substituting the geom-etry conditions for this problem and inte-
grating yields
The analytical solution for the pressure
along the vertical line from (1) to (3) isderived from
At point (2), y=1m, and P2 = 12.0kPa.
At point (3), y=2m, and P3 = -20.1kPa.
The values predicted by Fluent are:
P2 = 13507kPaP3 = -18386kPa
which are in both in error by 13% and 9%respectively.
The plot below shows a comparison of theanalytical and CFD results.
R
V
n
p
dn
dy
2
=
P
(kpa)
0.0 0.5 1.0 1.5 2.0
-20.0
0.0
20.0
40.0Fluent
Analytical
=y
VyPP6
6ln
2
1