#### Obtain the file duct.m from the course website. This pseudocode solves the 2D incompressible Navier-Stokes equations for flow in a duct using a fractional step pressure correction method. You will have to

**AMME5202 Assignment 2: Navier-Stokes equations**

Due: 5pm Friday, Week 11 (25/05/2018) Submit online via Turnitin.

This assignment should take a typical student 12 hours to complete.

Obtain the file duct.m from the course website. This pseudocode solves the 2D incompressible Navier-Stokes equations for flow in a duct using a fractional step pressure correction method. You will have to add in variable initialisation etc. to get it running.

- (4 marks) Run the code to obtain the steady state solution for a duct of length 0
*.*0 ≥*x*≥ 4*.*0, height 0*.*0 ≥*y*≥ 0*.*1, inlet velocity*U*= 1_{in }*.*0, density*ρ*= 1*.*0 and viscosity*ν*= 0*.*Determine a suitable grid-size and verify that it provides the correct solution for fully developed laminar duct flow. Hand in plots of velocity profiles and details of how you determined the grid size and verified the solution accuracy. - (1 marks) Write out the physical specification for this problem, that is the equations in continuous form, the domain size, the boundary and initial conditions, etc.
- (1 marks) Provide details for the discretisation scheme used. Comment on the stability and accuracy of the schemes.
- (4 marks) This code is very inefficient. Determine and implement modifications to improve the performance of the code. Document the improved performance. To obtain full marks for this component requires a significant improvement in performance, a factor greater than 2 should be possible.
- (4 marks) Modify the code to include a mixing length turbulence model, set appropriate inlet conditions and domain size to obtain fully developed turbulent duct flow. Compare your results to the 1
*/*7 power law profile and comment. Include full details of your implementation of the model. - (2 marks) An approximation is available for the wall shear stress in pipe flow.

*τ*0 = 0*.*03325*ρu*˜7*/*4*ν*1*/*4*R*−1*/*4*,*

where ˜*u *is the cross-stream average of the pipe velocity and *R *is the pipe radius. Calculate the wall shear stress

*,*

obtained from your turbulent simulations using the mixing length model, then compare to the approximation given above and comment.

- (2 marks) Place useful comments in the code and hand in commented code, including performance modifications and mixing length turbulence model.
- (2 marks) Presentation and report formatting.