AAE 412, HW 3

Sunday, September 02, 2001

Due Friday, 9/7 ... but PLEASE determine if you have

questions about what to do by Wednesday

so we can deal with them.

The Matlab code [pois1.m], in this directory, solves the Poisson problem corresponding to laminar fully developed flow in a rectangular channel. You can adjust the number of grid points at will.

You do not have to modify this code in any way to do this homework! The point of the assignment is to have you address accuracy issues and graphical presentation styles.

Your task is this:

a) Demonstrate that you can get a solution that is accurate to at least 3 decimal places.

To do this, you will need to perform a grid refinement study. It is important that if you refine the grid in only one direction, the answer does not necessarily get better. Only by refining the grid in BOTH directions can you expect improvement.

You can monitor the predicted value of U at the midpoint of the duct. Estimate the error in each grid. Note that the FD method used is 2nd order accurate (a fact you need to estimate the error.)

b) For each grid you do, provide plots of the grid; a mesh plot of the solution; a contour plot showing the contours with values from 0 to .1 in increments of .01.

Take care that the scale of all plots be the same (You can control this with the "axis" command in matlab.)

c) Construct an x-y plot showing U(x, .5), i.e. the velocity distribution in x at the mid-height of the duct. On one such figure, put results of all your grids (labeled so I can tell what's what.) The point of this is that x-y plots are more effective tools for comparing solutions than either mesh or contour plots: because you can read it, and see the differences.

d) Report the CPU time as a function of the number of grid points. You can do this with "tic/toc" or "cputime". Is CPU time proportional to the number of grid points, or does it go up faster than that?

What is the largest problem you can run? (and why?)