Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

EGB424 – Advanced Computational Fluid Dynamics

Lab 1 – Laminar incompressible flow in a rectangular 3D duct

Problem Definition:
The problem is a laminar, incompressible, constant property flow of water in a rectangular duct.

The problem parameters, as shown in Fig. 1 are: y


Inlet
• Inlet velocity = 0.01755 [m/s]
• Density = 997.0 [kg /m3 ] (water) x z
• Dynamic Viscosity = 8.899 x 10-4 [kg/(m.s)]
• Duct length = 3.66 m (Lz)
• Duct height = 0.038 m (Ly)
• Duct depth = 0.076 m (Lx)

Outlet
Figure 1: Schematic of the 3D rectangular duct

Boundary conditions: Inlet will be set up with an inlet velocity, an atmospheric pressure will be set a the
outlet of the computational domain. All the other faces will be set as walls with a no-slip condition.

Lab activities:
1. Create the geometry in Ansys-Design Modeler
2. Import the geometry in Ansys-Meshing and create an initial mesh as follows:
Right-click on Mesh  Insert  Method

Select the geometry  Click on No selection


Select Body

Click on the body to select (here the 3D rectangular duct).


Then Apply
Change the method to Sweep:

Click on Mesh and set size function as Curvature:


Scroll down to “Max Face Size”, and change the value to 0.005m

Click on Update:

Check the statistics (number of nodes and elements):


3. Set-up the simulations in Ansys CFX-Pre

Right-click Default Domain  Insert  Boundary

Inlet

Select the corresponding Location, either click on the face or in the dialog box:
Click on the “Boundary Details” Tab at the top, and select the option “Normal Speed. Specify the inlet
normal velocity to 0.01755 m/s. Then Click OK

Outlet

Follow the same process for the outlet face. In the “Boundary Details” Tab, select the “Average Static
Pressure” and set the value to 0.

Walls

Follow the same process for the 4 remaining faces. Select them all together

Insert  Boundary  Wall


In “Boundary Details”, select “No-Slip Wall”.

Default Domain Set-Up

Right-Click Default Domain  Edit

Select Material to be Water and the Reference Pressure to be 1 atm then Apply:
Click on the “Fluid Models” Tab, select all the options to NONE. No Heat transfer, no turbulence, no
combustion, no radiation. Click OK.

4. Run the simulations:

Edit the Solutions section on the Workbench:


Select Double Precision and Click Start Run:

Iterations

Plot Residuals

The solver will terminate after wither the number of iterations set or once all the residuals drop below
the target value, whichever comes first.

5. Run the simulations for more iterations.

Edit the Solve Control Tab:


Change the max iterations to 500 and the residual target to 1e-6 and Click Apply

Go To Solver  Output Control


Select the “Backup” Tab and click on (add new item). Select the iteration interval to 20 and
select “Keep all files”:

Re-run the simulations (step 5); The solver will create some backup files that will be used to
compare the results t different iterations to check the iterative convergence.

6. Post-process the simulations and compare with results at different iteration intervals

Click on Results
Go to File  Load Results (to load all the backup files); Select all the files and Click Open

We’re going to plot the velocity profiles at z=0.001m (near the inlet) and at z=3.65m (near the outlet) as
a function of x.

First, we need to create 2 lines, along x at z=0.001m and z=3.65m.

Go to Locations  Line
Define the coordinates of the 2 points required to create Line 1 and change the number of samples to 100
for a better interpolation; Click Apply:

In the “Color” Tab, you can change the colour of the line.

Do the same for Line 2 but with z=3.65m.

To create a Chart, click on (“Chart Icon”)

Go to “Data Series” Tab and click on (“New”):


Name the series as you want and select the location (Line 1). Click Apply:

Click on to create a 2nd series at the location Line 2.

Go to X-axis Tab and select the variable “Velocity w”. Apply. Do the same for the y axis and select the
variable x.
The chart plots the results for all the backup files and the final iteration:

You can change the title, the x-axis, etc… under the different “Chart” tabs. You can also export the data
points into excel as a .csv file to compare against the experimental data:

7. Refine the mesh as follows:

Right-click on Sweep  Insert  Sizing

Select the geometry by clicking on edges:


Select the vertical edges of the inlet face and then apply (hold CTRL to select additional edges at the outlet
face if required:
Select Type to “Number of Divisions” and set to 60:

Select Bias Type, to have a growth ration of the mesh near the walls, with a Bias factor of 5:

Do the same for the 2 other edges of the inlet face: Insert Sizing; Number of Divisions=80; Bias; Bias
Factor=5 and update Mesh:
Observe that we now more than 3 million of nodes. To “de-refine” the mesh and save some computational
cost, increase the “Max Face Size” to 0.01m.

This helps reducing the number of nodes along the z-direction, which is very long compared to the x- and
y- directions. This leads to 1.3 million nodes.

Use this mesh to re-run the simulations.

8. Re-run the simulations with the same set-up and compare the results against the initial mesh.

9. Compare the results with the converged mesh against the experimental data (velocity profiles at
different z- locations).

You might also like