You are on page 1of 12

Computer Lab Guide for CFD Assignment A

Learning Objectives:
1 Familiarize ANSYS Workbench environment
2 Learn to create the model geometry using ANSYS DesignModeler;
3 Learn to generate a grid/mesh with an acceptable quality using ANSYS Meshing.
4 Learn to perform a preliminary CFD analysis using ANSYS CFX, including assigning model
property parameters, selecting the appropriate CFD solver, setting up the boundary and
initial conditions, etc.;
5 Learn to utilise the basic post-processing techniques in ANSYS CFX Post to obtain the
basic CFD data, such as, pressure distribution, velocity variation in the entire
computational domain, as well as at a specified region of the domain .

Procedure
Start ANSYS Workbench:
(1) From Windows Start menu, select ANSYS 12.1 > Workbench

(2) When Workbench opens, select File > Save, then save the project as Assign1 into the
folder of your choice on the computer.
(3) Expand the Analysis Systems toolbox, then drag and drop a Fluid Flow (CFX ) object into
the top left area of the Project Schematic as shown below

Figure 1 ANSYS Workbench Project page


Stage 1. Create the model geometry

 Double click on the Geometry cell to launch DesignModeler. Select Meter as the unit of
measure for the session when prompted.

 Under Tree Outline, click on XY Plane, then click on New Sketch icon on the top
menu. This is to insert Sketch1 in XY Plane.

 Click on Look At icon to orient the sketch plane in the normal direction.
 Click on the Sketching tab to switch to sketch mode.
 Sketching: Settings > Grid
 Toggle on Show in 2D and Snap to Grid
 Click on Major Grid Spacing and set it to 1.0 m
 Click on Minor-Steps per Major and set it to 2

Figure 2a Setup the Grid for creating the geometry

 Zoom in on the model view, so that the area displayed is centred about the origin with 8
major steps in the x-and y-directions.
 Sketching: Draw > Polyline
- Left-click on the sketch to define the 4 end points of the horizontal section,
then right-click and select Open End from the pop up menu. Do the same to define the
4 end points of the vertical section.
 Sketching: Draw > Arc by Centre
- Left-click on the sketch to define the centre point of one arc, then left-click on
nd
the two end points of the arc. Do the same to define the 2 arc.
Figure 2b draw the lines and arcs

 Click on the Extrude icon on the top menu bar to bring up the Details View for the extrude
3D operation (the view will consequently switch to the Modeling view).
 In the Details View, the select Reverse for Direction and type 0.1 m for FD 1 Depth (>0),
as shown below, then click on Generate on the top menu bar.

Figure 3 Details View for extrude operation settings We have now created the R-bend cross-section
2D geometry.
 Save the Project and exit DesignModeler to return to the Workbench and ready for
Meshing.

Stage 2 Create the Mesh

• In ANSYS Workbench, double click on Mesh cell to bring up ANSYS Meshing.


 Click on Mesh under the Outline view to bring up the Details of Mesh panel, set the
Physics Preference to CFD, Solver Preference: CFX.
 Expand Sizing and set the Relevance Centre to Medium

 Change Min size to 0.001m and Max face size 0.1 m


 Click on Generate to create the mesh (similar as shown in Figure 4)

Figure 4 A structured mesh with a medium density.

To create a finer mesh, you can set Relevance Centre to Fine (in Sizing ), and/or decrease the values
for Min Size and Max Face size (see Figure 4), then click on Generate.

 Create some Named Selections for the boundaries of the flow domain:
-Ensure that the Face Selection Filter is active, select the inlet face by clicking on it,
-RMB > Create Named Selection
-In the popup window, enter a name, e.g. inlet, for the selection, then OK.
 Repeat the same procedure to create the Named Selections for outlet, the two symmetry
planes (name them the way you like, e.g. symm1 and symm2), and the inside and outside walls
of the channel (also name them the way you like, e.g. wall1 wall2).
 Click File > Save Project … to save the project file.
 Click File > Close Meshing to exit ANSYS Mesh and return to the Workbench Project
page
Stage 3. Specify Boundary Types, Materials, Fluid flow models and Initial
values

 In Workbench, double click on Setup cell to open CFX Pre


 Change the default domain name to a meaningful name. RMB on Default Domain in the
Outline tree and select Rename. Change the name to Rbend.
 Specify a new material:

- RMB on Materials > Insert > Material, in the pop up window click OK to accept the default
material name: Material 1 (you can change the name the way you like)
- In Details of Material 1, click on Material Properties tab. Under Equation of State, enter the
value for Density (say 1kg/m3).
- Expand Transport Properties and tick Dynamic Viscosity, then enter the value for Dynamic
Viscosity (product of kinematic viscosity and density)
- Click on Apply to save the change, then OK to exit Details of Material 1.

 Under Flow Analysis 1, double click on the fluid domain re-named Rbend to open
Details of Rbend in Flow Analysis 1, which contains three tabs named Basic Settings, Fluid
Models and Initialisation. Go through each of them as follows:

- In the Basic Settings, select Material 1 as the fluid material; leave other fields to the default
settings.
- Click on the Fluid Models tab, select None for Heat transfer; select (none)Laminar for
Turbulence
- Click on Initialisation tab, tick the Domain Initialisation to view the default settings. Accept
all the settings by clicking on Apply, then OK to exit the page.

 Specify boundary conditions for the flow domain


(1) RMB on Rbend > Insert > Boundary, type: inlet in the pup up window, then OK
- This brings up Details of inlet in Rbend in Flow Analysis 1:
(a) Select Inlet for Boundary Type; select inlet for Location.
(b) Click on Boundary Details tab, enter a value for Normal Speed (refer to Assignment A
paper for the value), and keep other fields with the default settings.
(c) Click Apply to finalise the setting, then OK to exit the Details tab.
(2) Repeat the same procedure to define the other boundaries of the fluid domain named
Rbend. Refer to the following Table for the corresponding settings.

Table 1: Boundary settings of the flow domain named Rbend

Name Boundary Type Location Boundary Details

Average Static
outlet Outlet outlet
Pressure = 0 Pa

Symmetry symm1, symm2


symm

wall Wall wall1, wall2 No Slip Wall


 Under Flow Analysis 1, double
click on Solver Control to open
the tab named: Details of Solver
Control in Flow Analysis 1.

Under the Basic Settings tab, as


shown in Figure 5:
- increase: Max. Iterations to 200;
- reduce Residual Target to 1e-6 (or 0.000001),
- click Apply to save the change, then OK to exit the
Details tab

 Save Project

 Exit CFX-Pre and return to the Workbench


Project page
Figure 5. Solver Control tab

Stage4. Solving for a solution

 Save the Workbench Project


 In Workbench double-click Solution cell to launch the CFX Solver Manager
 The CFX Solver Manager will start with the simulation ready to run.
 Click on Start Run to begin the solution process.
 The solution process will stop either the residual target is met or the Max. Iterations is
reached, whichever comes first. Steady decreased residual curves indicate a convergent solution.
 Exit CFX Solver Manager to return to Workbench Project page
Stage 5: Post-processing the result in CFD-Post
 Update the Workbench Project, and wait for every cell getting a green tick.
 In Workbench Project Schematic page, double-click Result cell to launch the CFX CFD-
Post.
 Create a pressure contour plot on the symmetry plane:
- Click on the Contour icon from the top menu bar.
- In the pup up window, enter a name, e.g. PressOnSymm, then OK.
- In the Details of PressOnSymm, set the Locations to symm
- Set the Variable to Pressure, -Increase the # of Contours to 30.
- Click Apply to generate the pressure contour plot (see Figure 6).

Figure 6 Pressure contour plot

 Create a velocity vector plot on the outlet:

- Click on the vector icon from the top menu bar.


- In the pup up window, enter a name, e.g. VelOnOutlet, then OK.
- In Details of VelOnOutlet, set the Locations to outlet
- Set the Variable to Velocity,
- Click Apply to generate the velocity vector plot on the outlet (see Figure 7)
-
-

Study the velocity profile. Can you tell if the flow has reached to a fully developed stage prior to the
outlet?

 Create a 3D streamline plot:


- Click on the Streamline icon , from the top menu bar.
- In the pup up window, click OK to keep the default name: Streamline 1.
- In Details of Streamline 1, set the Locations to Inlet and Rbend
- Set the Maximum Points to Reduction.
- Enter 100 for Max Points
- Click Apply to generate the Streamline plot.
- Zoom in to the car to observe the flow phenomenon after the bend (Figure 8)
Figure 8 stream line

 Create a line in the wall:


- Click on the Location icon, from the top menu bar, then click line.
- In the pup up window, click OK to keep the default name: line 1.
- In Details of Line 1, put in 1, 0, -0.05 for point 1 and 1, 8, -0.05 for point 2. Change
samples to 100.
- Click Apply to generate line 1 (yellow line in Figure 9)

.
 Create a chart to find out the reattachment point:
- Click on the Chart icon , from the top menu bar,
- In the pup up window, click OK to keep the default name: chart 1.
- In Details of Chart 1, click Data series, take Line 1 in Location. See Figure 10
- Click X axis, and choose Y for Variable see figure 11.
- Click Y axis, and choose velocity v for Variable see figure 12.
- Click Apply to generate the chart (See Figure 13).
- The location where velocity is 0 is the reattachment point
Figure 9 set up line 1

Figure 10
Figure 11

Figure 12
Figure 13 Chart of velocity V against Y.

You might also like