Worksheet

Worksheet#

Question 1#

Solve for flow around a bend by modifying the code that we developed in class. Implement pressure boundary conditions on the op half of the left hand boundary and the right hand half of the bottom boundary (implementing it on the entire boundary causes an issue because there will be an infinite pressure gradient in the corner). Have no slip boundary conditions on all other boundaries.

Note: If the behaviour is not good, try and reduce the Courant number (and also possibly the maximum time step) to improve stability.

Question 2#

Investigate how the flow varies as a function of the pressure drop. Calculate a Reynolds number for the flow based on the average inflow velocity. How does the average inflow velocity compare to the average outflow velocity (i.e. how good is continuity over the system)?

How does the symmetry of the flow field change as the pressure drop/Reynolds number is varied?

Why does the symmetry change with the Reynolds number?

Question 3#

Run the same simulation at a number of different resolutions. Use a very high resolution simulation as the “truth”. Calculate the L2 norm (the square root of the sum of the squared differences) as the error metric. Remember that the error can only be calculated at points that exist in both simulations and that the L2 norm varies with the number of points compared and so reduce all of the matrices to the resolution of the lowest resolution simulation in order to do the comparison.

Calculate the order of convergence by plotting the log of the error against the log of dx