Modeling Using Fluent
Modeling Using Fluent
ISBN: 9781264274949
Authors: Imane Khalil, Issam Lakkis
We will provide in this chapter step-by-step instructions on how to solve the laminar pipe flow problem using FluentANSYS
2022 R1. We will create the computational domain and divide it into cells (mesh the domain). We will then set up the model by
assigning material properties, applying boundary conditions and specifying initial conditions before running the calculation.
Using future versions of Fluent may change slightly the instructions provided.
Fluent is provided as free software for students as part of the ANSYS Academic software. ANSYS can be downloaded by
visiting www.ANSYS.com/academic. The instructions to download ANSYS are included in Appendix (C).
2. ANSYS Workbench is a simulation platform that includes different Analysis Systems under its Toolbox. To use Fluent,
double-click Fluid Flow (Fluent) located under Analysis Systems in Toolbox as shown in Figure 3.7. This will create a new
Fluid Flow (Fluent) analysis into the Project Schematic. The Project Schematic is the display of the different processes that
can be executed in Workbench to build and run the model. Note that clicking View, shown in Figure 3.7, and selecting Reset
Workspace will restore the workspace layout to its default settings. Also note that selecting Reset Window Layout, after
clicking View, will restore the original window layout to when we started the Workbench application.
3. In the Project Schematic, rename the Fluid Flow (Fluent) analysis system by right-clicking the top box displayingFluid Flow
(Fluent) and selecting rename. We can alternatively double-click Fluid Flow (Fluent) at the bottom until it is highlighted and
type Chapter3 as the new name. Press Enter. See Figure 3.7.
4. The process for the analysis includes creating the geometry for the domain inGeometry application followed by meshing
the domain in Mesh application. Setup application will launch Fluent where we set up the problem and run the calculations.
The results of the calculations can be viewed in the Solution application and also in Results application. In this chapter, we
will look at the results in Solution application. All these applications are shown in Figure 3.7, and we will go through them in
the following subsections.
5. Before proceeding, we will save the Workbench project. ClickFile and select Save As…. In the dialog box, browse to the
working folder and name the project Laminar Pipe Flow . Click Save to save the project. Note that ANSYS Workbench will
save generated supporting files for the project in the working folder and that all supporting files are needed in order to
reopen or share the project in the future.
Figure 3.7 Toolbox, Project Schematic, and Fluid Flow (Fluent) Analysis system.
3.4.2. Geometry
The geometry of the model can be created using ANSYS DesignModeler, or ANSYS SpaceClaim applications. We also have the
option to import the geometry from an existing CAD drawing as demonstrated in Chapter 7.
In this section, the geometry of the model will be created using ANSYS DesignModeler.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Instructions to create the geometry using SpaceClaim are included in Appendix D.
Figure 3.8 is a flowchart for the process of creating the geometry using Design Modeler.
Right-click Geometry and select New DesignModeler Geometry… from the drop-down list. When ANSYS DesignModeler is
launched, the screen will look like Figure 3.9.
Figure 3.9 Modeling and sketching modes, Tree Outline, Details View, selection and rotation modes
toolbars.
The menu toolbar shown at the top of Figure 3.9 gives the user access to the different features and tools available in the
ANSYS DesignModeler application. The File menu contains basic file operations. The Create menu contains the three-
dimensional geometry creation tools. The Concept menu contains tools to create surfaces. The Tools menu has tools for
modeling operations. The View menu is used to change the display settings. Finally, the Help menu provides access to online
help documentation.
By default, the ANSYS DesignModeler application starts in Modeling mode, shown in Figure 3.9. The Tree Outline is displayed
at the left of the screen above the Modeling tab. When we click the Sketching tab, next to the Modeling tab, the Tree Outline will
be replaced with the Sketching Toolboxes. Below the Tree Outline is the Details View area which appears when double-clicking
an object in the Tree Outline to make it available for editing.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
The selection toolbar shown in Figure 3.9 allows the user to perform different selection tasks. The rotation modes toolbar, also
shown in Figure 3.9, is very useful as it allows the user to adjust the model's view in theGraphics window. Take a moment to
become familiar with the selection toolbar and the rotation modes toolbar.
Clicking View and selecting Windows → Reset Layout, shown in Figure 3.10, will restore the same window layout as when
DesignModeler application is launched and may be useful if the layout is accidentally modified in the future. Note that the
location of some of the icons in the figures may differ slightly from the location of icons on the user's screen as adjustment to
the size of the figures was made to capture the best possible resolution.
Click Units, shown in Figure 3.10 and select Meter if it is not already selected.
2. Create a Rectangle
Click XYPlane under the Tree Outline to build the geometry in the XY plane.
Click the icon representing Look At Face/Plane/Sketch, shown in Figure 3.10, to display the XY plane on the Graphics
window.
Click Sketching, shown in Figure 3.11, to create a sketch. A sketch is a collection of two-dimensional edges. The Sketching
Toolboxes will appear in place of Tree Outline at the top left of the screen, as shown inFigure 3.11. The options available to
the user in Sketching Toolboxes are listed and include Draw, Modify, Dimensions, Constraints, and Settings.
Click Draw to expand it, if it is not already expanded, and from the available list of shapes click theRectangle that has a
picture of a rectangle by two points. The full list of shapes under Draw may not be visible without scrolling up and down the
list, as illustrated in Figure 3.11. The pointer of the mouse will change to reflect a pen ready to draw the rectangle.
We will select the origin as the first point of the rectangle. The pointer of the mouse will display the letterP when we hover
over the origin indicating a point detected at the location. Notice that if we hover over the X axis or the Y axis, the pointer of
the mouse will display the letter C indicating the detection of a curve. Make sure to see the letterP appearing on the screen,
as shown in Figure 3.11, before selecting the origin as the first point of the rectangle. Drag the cursor to place the opposite
corner of the rectangle in the first quadrant. Click anywhere in the first quadrant to select the opposite corner. The location
of the opposite corner does not matter as we will dimension the rectangle in the following step.
Select the upper edge of the rectangle, then drag the cursor in the positive Y axis. Click anywhere to place the dimension
above the upper edge.
Repeat the process for the right edge of the rectangle but drag the cursor in the positive X axis to place the dimension to the
right side of the edge.
Adjust the dimensions of the rectangle in Details View, located below the Sketching Toolboxes, by selecting the cell next to
H1 and typing 10 , as shown in Figure 3.12. Press Enter. Similarly, select the cell next to V2 and type 0.1 . Press Enter.
Right-click anywhere inside the Graphics window and select Zoom to Fit, as shown in Figure 3.12.
Click Dimensions → Click Move to move the dimensions closer to the rectangle. Click the dimensions one at a time. Drag
the cursor and click to bring the dimension closer to the rectangle. Note that the full list of options under Dimensions may
not be displayed on the screen. Scrolling down to click Move may be needed.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Right-click and select Zoom to Fit one more time to view the rectangle created. The geometry of the pipe reflects a very long
pipe chosen to capture the fully developed flow regime inside the pipe.
The area of the rectangle is the surface used as our calculation domain. To create this surface, clickConcept shown in
Figure 3.13 and select Surfaces From Sketches.
We will select the rectangle as the Base Objects in Details View. Select the top edge of the rectangle highlighted in Figure
3.13 and then click Apply next to Base Objects in Details View. All four sides of the rectangle will be highlighted. TheBase
Objects will change to 1 Sketch. Click Generate shown in Figure 3.13 to create the surface. The rectangle is filled. The
created surface is now added in the Tree Outline and is the domain for the calculation.
Expand 1 Part, 1 Body in the Tree Outline and click the created surface named Surface Body as shown in Figure 3.14.
In Details View, the surface created is Solid by default. Scroll down and click Fluid/Solid to activate the option for the cell.
An arrow next to Solid will appear. Click the arrow to access the drop-down list. Change the material fromSolid to Fluid as
illustrated in Figure 3.14.
Note that clicking a cell to activate choices is very common in ANSYS Fluent as options using a drop-down list will be
available once we click the cell.
Click File and select Save Project. Close the ANSYS DesignModeler application by clicking the Close button X located in the
upper right corner or by clicking File and selecting Close DesignModeler. The Geometry in Project Schematic Workbench
has now a green check symbol next to it indicating the application is up to date. We are ready to start meshing the model.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.11 Sketching mode and Draw Rectangle.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.13 Concept, Base Object for Surface From Sketch, and Generate.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Geometry Summary
Click Sketching. Click Draw → Click Rectangle. Draw a rectangle by two points. Select the origin as the first point. Drag the cursor and place
the opposite corner in the first quadrant.
Click Dimensions → Click General. Select the upper horizontal edge of the rectangle. Drag the cursor and click anywhere to place the
dimension. Repeat for the right vertical edge. Adjust the value of H1 to 10 and the value of V2 to 0.1 . Press Enter.
Click Concept and select Surfaces From Sketches. Select the top horizontal edge of the rectangle. Click Apply next to Geometry. Click
Generate.
Expand 1 Part, 1 Body. Click Surface Body, click Fluid/Solid and select Fluid from the drop-down list next to it and select Fluid next to
Fluid/Solid.
3.4.3. Mesh
A flowchart of the steps needed to create the mesh is displayed inFigure 3.15.
We will mesh the computational domain in this section. Double-clickMesh under Project Schematic in ANSYS Workbench (see
Figure 3.7). It may take a few seconds to load but once Mesh application is open, the geometry will be loaded into the Mesh
window as shown in Figure 3.16.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Outline on the upper left panel is the outline view of the project. The Details View below the Outline displays the details of what
is established in Outline. The graphics toolbar allows the user to modify a selection or adjust the view in the geometry window.
The Layout is also shown in Figure 3.16. Clicking Home and selecting Layout → Reset Layout will restore the same window
layout as when the Mesh application was launched.
Recall that the location of the icons on Figure 3.16 may differ slightly from the location of the icons on the user's screen as
adjustment to the size of the figure was made to capture the best possible resolution.
Click the Z axis in the axis triad located at the bottom right corner ofFigure 3.16 to orient the view to the XY plane along the Z
axis.
1. Default Mesh
In Outline view, right-click Mesh shown in Figure 3.17 and select Generate Mesh. We can also generate Mesh by clicking
Generate in the Home tab, also shown in Figure 3.17. Once the mesh is generated, click Mesh under Outline to view the
mesh. A default coarse mesh for the domain is created.
Face Meshing will allow the user to create a structured and more uniform mesh with fewer distorted elements. Face
meshing is useful when used on a rectangular face as it will create a very ordered and high quality mesh.
Right-click Mesh in Outline view and select Insert ⇒ Face Meshing. Click No Selection next to Geometry in Details of “Face
Meshing” - Mapped Face Meshing, as shown in Figure 3.17. Activate Face selection filter shown in Figure 3.17 if it is not
activated and select the rectangular face in the geometry window. In Details of “Face Meshing” - Mapped Face Meshing,
click Apply next to Geometry. Apply will change into 1 Face. A green check mark will appear next to Face Meshing in
Outline view.
Click Mesh in Outline view. In Details of “Mesh”, select the default value of the Element Size under Defaults and change it
from the default value to 0.002 as shown in Figure 3.18. The color of the mesh changes to pink indicating it is being
modified. Click Generate.
We can watch the progress of meshing on the lower left corner of the status bar of the Mesh window, shown inFigure 3.18.
The element size is important and affects the number of mesh elements. A smaller element size will result in a larger
number of elements suitable for fluid flow analysis.
Once mesh is completed, a green check mark will appear next to Mesh if the meshing is successful. Click Mesh in Outline
view to see the generated refined mesh. Zoom in to look at the grid. We can zoom in and out by scrolling the wheel of the
mouse. Expand Quality, in Details of “Mesh” as shown in Figure 3.19. Click Mesh Metric, and from the drop-down list next
to it select Aspect Ratio. Note the maximum value of the aspect ratio, Max, is 1, an indicator there aren’t any elongated cells
in our grid. Expand Statistics in Details of “Mesh”, shown in Figure 3.19, to see the number of Nodes and Elements in the
mesh. Scrolling down in Details of “Mesh” may be necessary to expand Statistics.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Meshing the model is usually the most important and time consuming part of the modeling process. We divide the
continuous domain into a finite number of discrete elements that constitute the mesh. The quality of the mesh is determined
mainly by three factors: accuracy, efficiency, and the degree of complexity of the problem being studied [32]. Accuracy
corresponds to the ability of generating a solution with the highest possible fidelity to the underlying physics. Efficiency
corresponds to the ability of the mesh to generate an accurate solution with the minimum computational cost (or number of
elements). The degree of complexity of the problem being studied is contingent on the results in which the user is interested
and their employability. In other words, for studies that aim at modeling and understanding the physical processes of some
phenomenon, the mesh constraints are more stringent and tight than those imposed on studies performed for design
purposes [33]. Geometry-based metrics like the aspect ratio and skewness are used to assess the mesh quality. The former
is a measure of the elongation of an element, and the latter is a measure of the deviation of a cell from its ideal shape. Large
aspect ratios are inevitable in studies investigating highly complicated physical processes such as turbulent flows. Such
flows necessitate clustering of elements near the walls to capture the sharp gradients (typically in one direction) of physical
properties in the boundary layer, and as such the elements near the walls will be more elongated than those far away. In
short, having aspect ratios (or other geometry-based metrics) that deviate, to some acceptable degree, from what is
traditionally reported does not necessarily compromise the quality of the mesh if we are to look at the accuracy, efficiency,
and degree of complexity of the problem.
Some complicated geometries can take hours to mesh and some complicated models can take weeks to figure out the
optimum mesh for the model. The example in this chapter is a very simple model and will take only a few minutes to mesh.
We need to specify names for the boundaries of the domain in order to define boundary conditions in Fluent.
In the graphics toolbar, click Edge selection filter shown in Figure 3.19. Select the top edge of the domain. The top edge will
change color to indicate it has been selected. Right-click anywhere inside the geometry window and select Create Named
Selection … located toward the end of the list of options. The default nameSelection appears in the Selection Name dialog
box. Change the name to Wall and click OK.
Right-click anywhere inside the geometry window and select Zoom To Fit. Zooming in and out by scrolling the wheel of the
mouse may be needed in order to select and name the remaining edges of the rectangle.
Select the right side of the rectangle. Right-click anywhere inside the geometry window and selectCreate Named Selection
…. Change the name to Outlet and click OK.
Select the left side of the rectangle. Right-click anywhere inside the geometry window and selectCreate Named Selection ….
Change the name to Inlet and click OK.
Select the bottom side of the rectangle. Right-click anywhere inside the geometry window and selectCreate Named
Selection …. Change the name to Centerline . The screen should look like Figure 3.19. Click OK.
The created names for the boundaries appear in the Outline view and are displayed when expanding Named Selections. See
Figure 3.19.
It is important to mention that a geometrical entity cannot be selected in more than one Named Selections or an error
message will be displayed upon updating the Mesh and translating to Fluent. This is a common mistake made by the user.
Named Selections is used to assign boundary conditions in Fluent and having an edge or a face included in more than one
Named Selections will create a problem as multiple boundary conditions will be assigned to the same boundary.
Click File and select Save Project from the drop-down list.
Click File and select Close Meshing to close the ANSYS Mesh application and return to Project Schematic.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
In Workbench Project Schematic, the Mesh application has the lightning bolt symbol next to it indicating the application
requires an update. Right-click Mesh and select Update. Once updated, a green check symbol will appear next to Mesh
indicating the model is ready for the next step.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.19 Edge selection filter, naming the Centerline, and list of Named Selections.
Mesh Summary
Right-click Mesh and select Insert ⇒ Face Meshing. Activate Face selection and select the rectangle in the geometry window for Geometry.
Click Mesh. Change the Element Size under Defaults to 0.002 . Right-click Mesh and select Generate.
Select the top edge of the domain. Right-click and select Create Named Selection … . Type Wall and click OK.
Repeat by selecting the right edge of the rectangle and name it Outlet .
3.4.4. Setup
A flowchart of the steps needed to set up the model in Fluent is displayed inFigure 3.20.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.20 Flowchart of Fluent.
A dialog box shown in Figure 3.21 will appear on the screen where the different options for the user can be specified. Enable
Double Precision. Using double precision will reduce the roundoff errors as 16 significant figures are used versus 7 significant
figures for single precision. Increase the number of Solver Processes depending on the available Logical processors on the
machine used to perform the calculation. To find out the number of Logical processors on a machine, press Ctrl + Shift + Esc to
bring up the Task Manager window. Click the Performance tab on the Task Manager window to display the name of the
processor and the number of cores available. The number of Logical processors usually appears under the number of Cores.
Note that if we enter a number of Solver Processes larger than what is available on the machine, Fluent will still launch but will
display a message asking the user to Hit Return to Exit. Click Start. This will launch Fluent.
A message announcing product behavioral changes from previous releases will appear. Enable the box Don’t show this
message again and click OK. The Fluent window is shown in Figure 3.22 and is divided into several views listed below:
Outline View: We will step through each entry in this view to set up variables and properties for the simulation.
Task Page: When we step through the Outline View, the task page changes accordingly to allow the user to make changes
to properties and variables.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Graphics Window: This is where we view the model, simulation progress and results.
Console Window: This is the command line showing the progress of the simulation.
Figure 3.22 Outline View, Task Page, Graphics, and Console windows.
Figure 3.23 displays the pointer tools, view tools, and copy tools toolbars. The pointer tools toolbar allows the user to adjust the
view by changing the function of the left mouse button, whereas the view tools toolbar allows the user to adjust the view by
clicking any of its options. The copy tools toolbar allows the user to save images. Note the view in this figure is adjusted in size
to display the full toolbars.
Figure 3.23 Toolbar for pointer, toolbar for view, arrange the workspace, and ribbon.
Arrange the workspace shown in Figure 3.23 will allow the user to change the display of the different views.
Note that all options in the Outline View can also be accessed from the ribbon shown in Figure 3.23.
We will go in order of what needs to be modified in theOutline View to setup the problem.
1. General
→
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Expand Setup → Double-click General.
In the Task Page, click Scale… under Mesh. A Scale Mesh dialog box will display the Domain Extents. Make sure the
dimensions are correct and close the dialog box.
In the Task Page and under Solver options, keep the default options of Pressure-Based for Type, Absolute for Velocity
Formulation, and Steady for Time. Select Axisymmetric for 2D Space.
The Pressure-Based solver is used for low-speed incompressible flows, while the Density-Based approach is used for high-
speed compressible flows. In the Pressure-Based solver the velocity field used in the conservation of mass is calculated
from the pressure equation. The pressure equation is derived from the continuity and the momentum equations in a way
that the velocity field, corrected by the pressure, satisfies the continuity. However, in the Density-Based solver, the continuity
equation is used to obtain the density field while the pressure field is determined from the equation of state [34].
2. Models
Expand Setup → Double-click Models. Note that double-clicking any element will expand it. If the element is already
expanded, double-clicking it will collapse it.
In the Task Page, double-click Viscous - SST k-omega. A Viscous Model dialog box will appear. Choose Laminar from the
Model list. Click OK.
3. Materials
In the Task Page, the default materials in Fluent are air for Fluid and aluminum for Solid. We will add water to the Fluid list
of materials from the Fluent Database.
Click Create/Edit… button at the bottom of the Task Page, shown in Figure 3.24, to open the Create/Edit Materials dialog
box. Click Fluent Database…. A list titled Fluent Fluid Materials is displayed inside the Fluent Database Materials dialog
box. Scroll to the bottom of the list and select water-liquid (h2o<l>) as shown in Figure 3.25. Click Copy button. Close the
Fluent Database Materials dialog box. Close the Create/Edit Materials dialog box. In the Task Page the added material of
water-liquid from the Fluent Database… is listed under Materials and is now available to use for our model.
As discussed earlier, we are modeling the fluid inside the pipe but not the solid pipe itself. Therefore, the list ofCell Zone
Conditions in the Outline View contains only Fluid.
Expand Fluid under Cell Zone Conditions to view our domain named by default surface_body.
Double-click surface_body in the list of Cell Zone Conditions in the Task Page, shown in Figure 3.26. The Material Name
assigned to it is air as shown in the Fluid dialog box since this is the default fluid in Fluent. Clickair in the Fluid dialog box
and select water-liquid as the Material Name for the Zone Name surface_body, as shown in Figure 3.26. Click Apply then
click Close to close the Fluid dialog box.
5. Boundary Conditions
Expand Setup → Double-click Boundary Conditions. The list of boundaries is shown in the Task Page in Figure 3.27.
We will step through all the boundaries to change the types and apply boundary conditions as described earlier and shown
in Figure 3.6.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Note that if upper case letters are used in naming objects, Fluent will replace them with lower case letters. Also a space will
be replaced with an underscore. Our named selections contain upper case letters, and they show as upper case in Mesh
application; however, once transferred to Fluent they were changed to lower case letters as seen in the list of boundaries.
Fluent will automatically detect the type of boundary from its name. A boundary named inlet will be assigned by default a
velocity-inlet boundary type. A boundary named outlet will be assigned pressure-outlet type. A boundary named wall will be
assigned stationary wall motion and so on.
In the Task Page, select centerline from the list of Boundary Conditions to highlight it. At the bottom of the Task Page, click
the arrow below Type to access its list of options. Scroll up the list and select axis as the type of boundary since we have an
axisymmetric model. Click Apply in the Axis dialog box to confirm changing the centerline boundary type to axis. Click
Close to close the Axis dialog box. The Task Page should display axis as the Type for centerline Boundary Conditions as
shown in Figure 3.27.
Select inlet and make sure its type is velocity-inlet. Click Edit…, shown in Figure 3.27, and choose Magnitude, Normal to
Boundary as the Velocity Specification Method. Set the Velocity Magnitude [m/s] value to 0.0025 and click Apply. Close
the Velocity Inlet dialog box.
Note that interior-surface_body is the interior of the domain and even though it is listed underBoundary Conditions, we do
not have the option to make changes to it when we click Edit….
Select outlet. Make sure its type is pressure-outlet. Click Edit… and confirm the value of Gauge Pressure [Pa] at the outlet
is 0 . Click Close to close the Pressure Outlet dialog box.
Gauge pressure is used in Fluent to reduce the round-off errors caused by the way computers represent numerical values.
Round-off errors can be controlled by avoiding adding numbers with very large difference in magnitude or subtracting
almost equal size large numbers. By using gauge pressure, the pressure values inside the computational domain are in the
same order as the pressure difference that drives the flow and therefore will reduce the round-off errors.
Select wall. Make sure its type is wall. Click Edit… and confirm the Wall Motion is set to Stationary Wall and the Shear
Condition is set to No Slip. Click Close to close the Wall dialog box.
6. Methods
Expand Solution → Double-click Methods. In the Task Page, Coupled is selected as the Scheme for the Pressure-Velocity
Coupling.
The default options for the remaining Solution Methods will be used, and those options are listed:
Spatial Discretization → Momentum → Second Order Upwind. Scroll down if needed and make sure Pseudo Time
Method is enabled.
7. Residuals
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Double-click Residual shown in Figure 3.28. In Fluent, the residual for each equation being solved is calculated at every
iteration. The default residual threshold in Fluent is 0.001 for the continuity, x-velocity and y-velocity equations. We will
modify the convergence criteria by changing the Absolute Criteria to 1e-12 as shown in Figure 3.28. Print to Console and
Plot under Options are enabled by default so the user can view the residuals as they are calculated to monitor the
convergence of the solution. Click OK to close the Residual Monitors dialog box.
8. Initialization
Click Initialize in the Task Page. The Console will display a message when Hybrid Initialization is done.
The initial values assigned for every cell will affect the convergence speed of the calculation but will not affect the results of
the calculation. However, the more reasonable the initial guessed values, the faster the solution will converge. We will use
the default in Fluent for the Initialization Methods which is Hybrid Initialization, a method that solves the Laplace equation
to produce a velocity field and a pressure field which smoothly connects high and low pressure values in the computational
domain [34].
9. Calculation
In Task Page, set the Number of Iterations under Parameters to 300 . Click Calculate button under Solution Advancement
located at the bottom of the Task Page.
A Calculation complete message will appear when Absolute Criteria are met, or when the Number of Iterations are
completed, whichever comes first. The Absolute Criteria are met when the values of the residuals do not exceed the values
assigned by the user.
After each iteration, Fluent calculates the imbalance of the conservation of variables for each computational cell. The
imbalance is summed over all computational cells. This sum is called the unscaled residual. Fluent scales the residual using
a scaling factor. The scaled residuals are useful indicators of solution convergence. The console displays the residuals
after every iteration. In addition, a plot of the residuals calculated is updated and will be displayed on the graphics window
while Fluent is running. The plotted residuals by default are the scaled residuals. The user has the option to change them to
unscaled residuals.
Keep in mind that the number of iterations to converge will depend on the mesh and the version of Fluent used to perform
the calculation.
The Scaled Residuals plot is shown in Figure 3.29. It is clear that the solution converged as it is reflected in the plateau
residuals. However, further investigation is needed to confirm that this converged solution is the correct solution to the
problem.
To maximize the graphics window, we can close the Task Page and/or the Console. To bring the Task Page back, click Task
Page tab at the top left corner of the screen as shown in Figure 3.29.
Also note that some of the icons in the graphics window may be hidden, You can access hidden icons by clicking the
Expand button shown in Figure 3.29.
In the Task Page view, double-click Fluxes or select Fluxes and click Set Up… under the group box of Reports.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
In the Flux Reports dialog box, select Mass Flow Rate for Options, select inlet and the outlet from the list of Boundaries to
check the total mass flux through the inlet and outlet of the model. Click Compute.
The inlet and outlet mass flow rates along with the Net Results are displayed in the Console as shown in Figure 3.30. Fluent
uses the inward normal to the surface in calculating the mass flow rate; therefore, a positive mass flow means the mass is
entering the system while a negative mass flow means that mass is leaving the system. The conserved mass is one of the
indications for convergence. Click Close to close the Flux Reports dialog box.
Setup Summary
Expand Setup → Double-click General. Select Axisymmetric under 2D Space. Select Pressure-Based under Type. Select Absolute under
Velocity Formulation. Select Steady under Time.
Expand Setup → Double-click Models. Double-click Viscous - SST k-omega . Select Laminar for Model. Click OK.
Expand Setup → Double-click Materials. Click Create/Edit…. Click Fluent Database…, select water-liquid (h2o<l>) and click Copy. Close
the dialog boxes.
Expand Setup → Double-click Cell Zone Conditions. Double-click surface_body and select water-liquid next to Material Name. Click
Apply, then click Close.
Expand Setup → Double-click Boundary Conditions . Select centerline and select axis as the Type. Click Apply and click Close. Double-
click inlet. Set the Velocity Magnitude [ m/s] to 0.0025 . Click Apply and click Close.
Expand Solution → Double-click Methods. Use the default options for Solution Methods.
Expand Solution → Expand Monitors → Double-click Residual. Set the Absolute Criteria for all equations to 1e-12 . Click OK.
Expand Solution → Double-click Run Calculation. Set the Number of Iterations to 300 . Click Calculate.
Expand Results → Expand Reports. Double-click Fluxes. Select Mass Flow Rate for Options. Select inlet and outlet for Boundaries. Click
Compute. Click Close.
Double-click XY Plot under Plots in Outline View to create the plot of the velocity of the fluid along the centerline of the pipe.
A dialog box titled Solution XY Plot will appear as shown in Figure 3.31.
Note that double-clicking XY Plot from the Task Page will not give the user the option to name the figure and thus the option
to save the plot. We can double-click XY Plot from the Task Page if we desire to observe a certain result without saving it.
A default name for the plot appears under XY Plot Name. Change the name to My Vel Centerline . Notice that Fluent
replaces the space used in the name by a hyphen. It is a good practice not to use a space in Fluent. Also notice in Figure
3.31 that capital letters used in the name were changed to small letters.
Select Velocity… from the upper drop-down list and Velocity Magnitude from the lower drop-down list of Y Axis Function as
shown in Figure 3.31.
Select centerline from the list of Surfaces. Click Save/Plot then click Close to close the Solution XY Plot dialog box.
The created plot appears under Results → Plots → XY Plot in Outline View as shown in Figure 3.32. The solution created
by Fluent is at the cell centers. However, Fluent will interpolate between cells in order to create a continuous plot of the
solution.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Modifications to the curve can be made by right-clicking the plot my-vel-centerline from the list of XY Plot in Outline View
and selecting Edit… In the Solution XY Plot dialog box, click Axes…. In the Axes - Solution XY Plot dialog box, select Y
under Axis and change the Type of the Number Format to general. Click Apply then click Close. Note that if we make
changes to both axes then we need to click Apply before switching from one axis to another in order for the changes to be
saved. The changes made will not be reflected until we click Save/Plot in the Solution XY Plot dialog box. Figure 3.32
displays the profile of the centerline velocity with the applied modifications to the Y axis.
Alternatively, changes to the curve can be made by clicking Curves… in the Solution XY Plot dialog box. Click Close to close
the Solution XY Plot dialog box.
To print the created plot, click the Save Picture camera icon shown in Figure 3.32. In case the camera icon is not visible,
click Arrange the workspace button that was shown in Figure 3.23 and deactivate the Console. If the camera icon is still not
visible, click the Expand button that was shown in Figure 3.29.
When we click the Save Picture camera icon, a Save Picture dialog box will appear. Click Save…. In the Select File dialog
box, the default location for all created XY Plots reside in the plot folder inside the saved project in ANSYS but the user can
change the location before saving the plot and clicking OK.
A Copy Screenshot of Active Window to Clipboard, shown in Figure 3.32, can also be used to capture a screenshot of the
plot created.
We will create a plot for the velocity at the exit of the pipe (outlet) along the radial direction. Specifically, we will plot the radial
direction as a function of velocity.
In the Solution XY Plot dialog box change the default name to my-vel-outlet . Disable Position on X Axis under Options.
See Figure 3.33. Select Mesh… from the upper drop-down list and Y-Coordinate from the lower drop-down list of Y Axis
Function. Select Velocity… from the upper drop-down list and Velocity Magnitude from the lower drop-down list of X Axis
Function. Select outlet from the list of Surfaces. Click Save/Plot then click Close.
The created plot is now added to the list of XY Plot in the Outline View. Recall the values of the velocity in this plot are
calculated at the centers of the computational cells.
Double-click my-vel-outlet plot from the list of XY Plot in the Outline View to edit the plot and create a smooth curve. Right-
clicking my-vel-outlet plot and selecting Edit… will also allow the user to edit the plot. In the Solution XY Plot dialog box,
click Axes…. In the Axes - Solution XY Plot dialog box, select Y under Axis and change the Type of the Number Format to
general. Click Apply then click Close. Click Curves… in Solution XY Plot dialog box. Select the dashed line option which is
the second option under Pattern and set the value of Weight to 1 in the Curves - Solution XY Plot dialog box, as shown in
Figure 3.33. Click Apply then click Close to close the Curves - Solution XY Plot. Click Save/Plot to save and plot the
changes. Click Close to close the Solution XY Plot dialog box.
Figure 3.34 displays the radial velocity at the outlet of the pipe. For a better display of the outlet velocity, theOutline View
window is collapsed in addition to the Console window and Task Page window. The no-slip boundary condition is reflected
in this figure with the velocity being 0 at the wall of the pipe where R = 0.1 m. The velocity increases to reach its maximun
value at the center of the pipe.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Finally, we will export the data for the outlet velocity as it will be used inSection 3.5 for verification purposes. Click Arrange
the workspace button, and activate Outline View. To export the data, double-click my-vel-outlet plot from the list of XY Plot
in Outline View. Enable Write to File under Options in the Solution XY Plot dialog box. Click Write… at the bottom of the
dialog box. Name the file my-vel-outlet and change the location to save the file to the Desktop in the Select File dialog
box. Note the output file is a data file with .xy extension that we can open in Excel. Click OK to save and close the Select File
dialog box, then close the Solution XY Plot dialog box. See Figure 3.35.
In this section, we will create a plot for the shear stress along the wall of the pipe.
In the Solution XY Plot, change the default name to my-shear-wall . Disable Position on X Axis under Options. Select Wall
Fluxes… from the upper drop-down list and Wall Shear Stress from the lower drop-down list of Y Axis Function. Select
Mesh… from the upper drop-down list and X-Coordinate from the lower drop-down list of X Axis Function. Select wall from
the list of Surfaces. Click Curves…. Under Line Style select the dashed line which is the second option from the drop-down
list of Pattern and set the weight to 1 . Under Symbol, select the first option, which corresponds to no symbol. Click Apply,
and then click Close to close the Curves - Solution XY Plot. Click Save/Plot and then click Close to close the Solution XY
Plot dialog box.
The created plot is added to the list of XY Plot. Figure 3.36 displays the wall shear stress along the wall of the pipe.
Double-click Contours from the Outline View or from the Task Page to create the velocity contours inside the pipe.
Unlike the XY Plot, double-clicking from the Task Page will allow saving the created contour.
In the dialog box titled Contours, change the name from contour-1 to my-vel . Select Velocity… from the upper drop-down
list and Velocity Magnitude from the lower drop-down list for Contours of as shown in Figure 3.37. Select interior-
surface_body from the list of Surfaces.
Note that if we do not select a surface, then Fluent will plot using the whole domain for a two-dimensional model. For a
three-dimensional model, the reader must specify the surface or no plot will be created. The Colormap Options… shown in
Figure 3.37 will allow making changes to the color map location, font, number format and more.
Click Save/Display then click Close to close the Contours dialog box. The created contour appears under Results →
Graphics → Contours in Outline View and is shown in Figure 3.38.
A screenshot of the results can be made by clicking theCopy Screenshot of Active Window to Clipboard icon shown in
Figure 3.32.
Expand Results → Expand Graphics → Double-click Contours to create the pressure contours inside the pipe.Contours can
also be accessed from the Task Page.
In the dialog box titled Contours, change the name to my-pres . Select Pressure… from the upper drop-down list and Static
Pressure from the lower drop-down list for Contours of. Select interior-surface_body from the list of Surfaces. Click
Colormap Options… to make the desired changes to the color map location, font, number format and more. ClickApply after
making changes to the Colormap dialog box and click Close.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Click Save/Display then click Close to close the Contours dialog box.
Click File and select Save Project from the drop-down list.
Settings have changed! dialog box appears and displays a warning that settings have changed with the following options:
Use settings changes for current calculations only and Use settings changes for current and future calculations. The
default option is the first option. Keep the default option and click OK. Click File again and select Close Fluent.
A warning message asking if the reader wants to quit the application appears. Click OK.
ANSYS case and data files are automatically saved when we exit Fluent and return to Workbench. The case files contain the
mesh, boundary conditions, cell zone conditions, and solution parameters for our problem. The data files contain the values
of the flow field quantities in each mesh element and the convergence history for the flow field. If the reader has no need to
make changes to the mesh, run design optimization, or postprocessing in CFD post, then running Fluent using the case and
data files can be very useful. The reader can export at any time the case and data files by clicking File and selecting Export
→ Case and Data … from the drop-down list.
17. Sharing Files and Closing Workbench
To share the Workbench project, click File and select Archive…. Click Save and select from the Archive Options the option
to share the results and solution or the option to share the project and settings without the solution. Note that an archived
Workbench file can be opened with the same or newer release of ANSYS, but not with an older version of the software.
Click File and select Exit from the drop-down list to close Workbench.
If we need to return to the project at a later time, launch ANSYS Workbench by clickingStart → ANSYS 2022 R1 →
Workbench 2022 R1. From the directory where the project was saved, double-click Laminar Pipe Flow.wbpj.
In ANSYS Workbench Project Schematic, double-click Solution, or right-click Solution and select Edit… to launch the
Solution application. If we launch Setup, a warning message that the current mesh and settings will be loaded and not the
current data files where the solution is stored will be displayed as shown in Figure 3.40. By clicking OK and launching Setup,
the previously generated solutions will be lost.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.25 Fluent Database.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.27 Boundary Conditions Type and Boundary Conditions Edit.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.29 Scaled Residuals, Task Page, and Expand button.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.31 Solution XY Plot dialog box and Y Axis Function.
Figure 3.32 Centerline velocity profile, list of plots, save picture, and copy screenshot to clipboard.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.33 Disable Position on X Axis and Solution XY Plot dialog box.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.35 Export Data by using Write to File.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.37 Contours dialog box and Colormap Options.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.
Figure 3.39 Contours of Static Pressure.
© McGraw-Hill Education. All rights reserved. Any use is subject to the Terms of Use, Privacy Notice and copyright information.