+ All Categories
Home > Documents > Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2)...

Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2)...

Date post: 14-Jul-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
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 13.0 > Workbench (2) When Workbench opens, select File > Save, then save the project as Assign1 into the folder of your choice on the computer D:\ drive. (3) Expand the Analysis Systems toolbox, then drag and drop a Fluid Flow (CFX ) object into the top left area of the Project Schematic window as shown in Figure 1. (4) Specify the units system as “Metric ( kg, m, s, ºC, A, N, V)”, and choose to “Display Values in Project Units”. Figure 1. ANSYS Workbench window
Transcript
Page 1: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

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 13.0 > Workbench

(2) When Workbench opens, select File > Save, then save the project as Assign1 into the folder of your choice on the computer D:\ drive.

(3) Expand the Analysis Systems toolbox, then drag and drop a Fluid Flow (CFX ) object into the top left area of the Project Schematic window as shown in Figure 1.

(4) Specify the units system as “Metric ( kg, m, s, ºC, A, N, V)”, and choose to “Display Values in Project Units”.

Figure 1. ANSYS Workbench window

Page 2: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

Stage 1. Create the model geometry

Double click on the Geometry cell to launch DesignModeler. Select m 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

Zoom in on the model view, so that the area displayed is placed around the origin of the coordinate with 10 major steps in the positive x- direction and 5 major steps in the negative x-direction.

Figure 2 Setup the Grid for creating the 2D geometry

Sketching: Draw > Polyline - Draw the outline of the 2D backward-facing step model by single LMB clicking on the points

with the given coordinates sequentially, as shown in Figure 1 of Assignment A, on the sketch, starting from the origin (0, 0). When come back to the origin point (0, 0), RMB and then select Close End from the pop up menu.

The 2D dimensions of model are defined now by drawing within the grid with the given coordinates of the model.

However, in the next step, we will still set up the dimensions of the model, as shown in Figure 3. This is to parameterize the model dimensions for the possible model geometry modifications in the future.

Sketching: Dimensions > Horizontal

Page 3: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

(1) Single LMB click on the line labelled 1 (refer to Figure 3) to select the first line, and then single LMB click on the line labelled 2 to select the second line. A pencil will appear on the screen. Move the pencil by dragging the mouse to an appropriate location, and then single LMB click to define the dimension H1 (note: the number on your drawing may differ due to the sequence of your setting up the dimensions).

(2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension H2.

Sketching: Dimensions > Vertical (3) Single LMB click on the line labelled 4 (refer to Figure 3) to select the first line, and then

single LMB click on the line labelled 5 to select the second line. A pencil will appear on the screen. Move the pencil by dragging the mouse to an appropriate location, and then single LMB click to define the dimension V3 (note: the number on your drawing may differ due to the sequence of your setting up the dimensions).

(4) Repeat the same procedure to select the lines labelled 5 and 6 to define the dimension V4.

Figure 3 Setup the four dimensions of the model

On the top menu bar, click on the Display Plane icon to turn off the grid. Then click on the icon to switch the graph to isometric view.

Click on the Extrude icon , on the top menu bar, to bring up the Details View for the Extrude 3D operation (the Tree outline will consequently switch to the Modeling phase).

In the Details View (refer to Figure 4), select Reversed for Direction, and then enter 0.01 for FD 1 Depth (>0). Then click , on the top menu bar, to complete the 3D Extrusion.

Figure 4 Details View for the 3D Extrude operation settings

We have now created the model geometry of the backward-facing step.

Save the Project and exit DesignModeler to return to the Workbench and ready for Meshing.

Page 4: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

Stage 2 Create the Mesh In ANSYS Workbench, double click on Mesh cell to bring up ANSYS Mesh (Refer to Figure 5).

(1) Click on Mesh under the Outline tree view to bring up the Details of Mesh panel at the left-bottom of the screen. In this panel:

(2) Set Physics Preference to CFD; Set Solver Reference: CFX

(3) Expand Sizing and set the Relevance Centre to Medium. (4) In the Outline tree view, RMB click on Mesh > Generate Mesh to create the mesh with a

medium density, as shown in Figure 5.

Figure 5 Create a structured mesh with a medium density.

Define the boundaries of the fluid domain by creating the Named Selections for all the faces that enclose the fluid domain: inlet, outlet, top wall, bottom wall, step wall. The front and back faces of the model are also need to be defined as the symmetry planes.

(1) Refer to Figure 6 to define the inlet boundary through the following steps:

- Ensure that the Face Selection Filter is active, single LMB click to select the Inlet face; - RMB > Create Named Selection ; - In the pup window, enter a name for the selected face, e.g. inlet, then OK.

(2) Repeat the same procedure to create the Named Selections for the outlet, the two symmetry planes (name them the way you like, e.g. symm1 and symm2), and the top, bottom and step walls of the channel (e.g. wall_top, wall_bottom, wall_step).

Figure 6 Create a Named Selection for inlet face

Click File > Save Project … to save the project file.

Click File > Close Meshing to exit ANSYS Mesh and return to the Workbench Project page.

Page 5: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

In the Workbench Project Schematic window, there should be a green tick next to the Mesh cell. If not, RMB on the Mesh cell, in the pup up menu select Update. Wait until the green tick appears. Then proceed to Stage 3.

Note: To create a finer mesh as required in Q3 of Assignment A, the simplest way is to set (under Sizing) the Relevance Centre to Fine, then click on Update on the top menu bar to generate the mesh with the fine density. If you wish to further refine the mesh in a unified manner, you can decrease the values for Min Size and Max Face size under Sizing. To ensure the accuracy of the 2D model solution, the limit for the Min Size is the Extrusion depth, which in this case is 0.01 m.

Stage 3 Specify Boundary Types, Materials, Fluid flow models and Initial values

In Workbench Project Schematic window, double click on the Setup cell to open CFX Pre

If you wish to change the default domain name to a meaningful name, then

(1) RMB on Default Domain under the Outline tree

(2) Select Rename, and then change the name to Backward Step.

Specify a new material (refer to Figure 7)

(1) RMB on Materials > Insert > Material, in the pup up window click OK to accept the default material name: Material 1 (you also can change the name by replacing it to a different name).

(2) In Details of Material 1, click on Material Properties tab. Under Equation of State, enter the value for Density (refer to Assignment A paper for the fluid density value).

(3) Expand Transport Properties and tick Dynamic Viscosity, then enter the value for Dynamic Viscosity (refer to Assignment A paper for the fluid viscosity value)

(4) Click on Apply to save the change, and then OK to exit Details of Material 1.

(a) (b)

Figure 7 Specify a new fluid material property: (a) Insert Material 1; (b) Enter the new material property.

Page 6: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

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

(1) In the Basic Settings tab, select Material 1 for the fluid material; leave other fields to the default settings

(2) Click on the Fluid Models tab, select None for Heat transfer; select (None) Laminar for Turbulence.

(3) 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 panel.

Specify boundary conditions for the flow domain. In the Outline tree:

(1) RMB on Backward Step > Insert > Boundary. In the pup up window, type: inlet, and then OK. This brings up Details of inlet in Backward Step in Flow Analysis 1:

(a) Select Inlet for Boundary Type; select inlet for Location.

(b) Click on Boundary Details tab, enter the value for Normal Speed (refer to Assignment A paper for the inlet speed value in x-direction), and keep other fields with the default settings.

(c) Click Apply to finalise the setting, and then OK to exit the Details tab.

(2) Repeat the same procedure to define the other boundaries of the fluid domain named Backward Step. Refer to Table 1 for the corresponding settings.

Table 1: Boundary settings for the flow domain named Backward Step

Name Boundary Type Location Boundary Details

outlet Outlet outlet Average Static Pressure = 0 Pa

symm Symmetry symm1, symm2

(Ctrl + LMB click for the multiple selection)

wall Wall wall_top, wall_bottom,

wall_step

(Ctrl + LMB click for the multiple selection)

No Slip Wall

Page 7: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

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 8, set:

- Max. Iterations: 200.

- Residual Target: 1e-06 (or 0.000001),

- Apply to save the change.

- OK to exit the Details tab

File > Save Project

File > Quit to exit CFX-Pre and return to the Workbench Project window.

Figure 8. Solver Control tab

Stage 3. Solving for a solution

Save the Workbench Project

In Workbench Project Schematic, LMB double click on Solution cell to launch the CFX Solver Manager

The CFX Solver Manager will start with the simulation ready to run.

Click on Start Run button to begin the solution process.

The solution process will stop either the residual target is met or the maximum Iteration number is reached, whichever comes first. Steadily decreased Residual curves indicate a convergent solution.

If the maximum iteration number is reached but the Residual targets have not met, we will need to continue the iterations: LMB click on File > Define Run > Start Run, until all the Residual targets are met.

Exit CFX Solver Manager to return to Workbench Project window.

Stage 5: Post-processing the result in CFD-Post

In Workbench Project Schematic window, save the project, and wait for the Solution cell getting a green tick.

LMB double-click the 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, accept the default name Contour 1 by clicking on OK.

- In the Details of Contour 1, set the Locations to symm

- Set the Variable to Pressure,

- Increase the # of Contours to 20.

- Click Apply to generate the pressure contour plot (see Figure 9).

Page 8: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

Figure 9 Pressure contour plot

Study the pressure contour plot. Has the flow reached to the fully developed stage before prior to the step?

Insert the pressure contour plot into the Report (refer to Figure 10):

(1) under the Outline tree, RMB on Report > Insert > Figure,

(2) in the pup up window, change the name Figure 1 to Pressure Contour, and then OK.

To create another contour plot, e.g. velocity contour, simply click on Contour 1 under the Outline tree, and then change the Variable to Velocity, and then Apply to view the plot.

Similarly, we can also insert the velocity contour plot into the Report. With the velocity vector plot in the graphics window, RMB on Report > Insert > Figure, then given a name and OK.

Figure 10 Procedure for Inserting a

graph into the Report

Create a velocity vector plot on the outlet:

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

- In the pup up window, accept the default name Vector 1 by clicking on OK.

- In Details of Vector 1, set the Locations to outlet

- Set the Variable to Velocity. - Click on Symbol tab, and then enter 2 for Symbol Size

- Click Apply to generate the velocity vector plot on the outlet (see Figure 11)

Page 9: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

Figure 11 Velocity vectors on outlet

Has the flow reached to a fully developed stage prior to the outlet?

You may follow the same procedure to plot the velocity vectors on one of the symmetry planes, which may be similar as the graph in Figure 12.

Figure 12 Velocity vectors on outlet

Create a streamline plot on the symmetry plane (see Figure 13):

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

- In the pup up window, accept the default name, Streamline 1, then OK

- In Details of Streamline 1, set

(a) Type: 3D Streamline;

(b) Start from: symm, inlet;

(c) Sampling: Equally Spaced;

Page 10: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

(e) # of Points: 30,

(f) Direction: Forward and Backward

- Click Apply to generate the streamline plot as shown in Figure 13.

Figure 13 Procedure for creating the streamline plot

Create a line that is very close to the bottom wall from the step to the outlet (see Figure 14):

- Expend the Location icon from the top menu bar, and then select Line

- In the pup up window, accept the default name, Line 1, then OK

- In Details of Line 1, set

(a) Domain: All Domains

(b) Enter the coordinates of Point 1 and Point 2 (refer to Figure 14);

(c) Tick Sample for Line Type

(e) Enter 30 for Samples;

(f) Click Apply to create Line 1 (the yellow line in the Graphics window that almost overlaps with the bottom wall of the step) as shown in Figure 14.

Page 11: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

Figure 14 Procedure for creating Line 1 (the yellow line)

Create a chart plotting x-velocity along the newly created Line 1 (see Figure 15):

- Click on the Insert Chart icon from the top menu bar.

- In the pup up window, accept the default name, Chart 1, then OK

- In Details of Chart 1, there are six tabs. we need to set, at least, the first four tabs to produce the chart:

(1) Under the General tab: (1a) for Type select xy; (1b) for Title, entre the title name of your own choice, e.g. x-velocity along the step bottom wall.

(2) Click on Data Series tab: (2a) highlight: Series 1(line1); (2b) tick Location, and then select Line 1.

(3) Click on X Axis tab: (3a) select X for Variable; (3b) tick Conservative.

(4) Click on Y Axis tab: (4a) Variables: select Velocity u; (4b) tick Conservative; (4c) Click Apply to generate the Chart 1 as shown in Figure 15(e).

(5) Extract the numerical data of Chart 1 by clicking on Export and save the data into a spreadsheet.

(a) (b)

Page 12: Computer Lab Guide for CFD Assignment Aopencourses.emu.edu.tr/pluginfile.php/64457/mod... · (2) Repeat the same procedure to select the lines labelled 2 and 3 to define the dimension

(c) (d)

(e)

Figure 15 Procedure for creating the chart of x-velocity versus Line 1: (a) General tab settings; (b) Data Series tab settings; (c) X Axis tab settings; (d) Y Axis tab settings; and (e) Chart 1 on the Graphics screen.

Publish the report:

- RMB on Report, select Refresh Preview

- RMB on Report, select Publish

- In the pop up Publish Report window, note the location of the report files and then OK.

Exit CFD-Post and return to the Workbench Project page.

Save the project

Exit ANSYS Workbench.

Figure 16 Report preview and publish


Recommended