Below you will find the discussion and relevant materials for the ES 105 homework assignment due on January 16, 2009.
Discussion
Questionsa) Verify that the analytic solution is: a1) Sketch the solution map of U. b) Create a centered, second order correct FD molecule for an interior node, each of the four boundaries, and each corner. Make and use a clear, concise map of node locations in the process. c) Will the algebraic system be diagonally dominant? This system will be diagonally dominant. Since there is at least one inequality in which the main diagonal is greater than the off diagonals, this system will be irreducibly diagonally dominant. See the attached documents for how this was calculated from the FD molecules. d) With N interior nodes in the qdirection and N in the rdirection, solve using direct LU decomposition. Compute and plot U and the current vector i/s = invD. Use N=5 and N=10 here (i.e., coarse reslution). (Use subroutine SOLVE; write your FD answers to an ASCII file; use MATLAB graphics to be distributed to do the plotting.) Do your coarse solutions agree with your sketch? Yes, my coarse solutions agree with my sketch. d1) The matrices generated in (d): are they in fact diagonally dominant, and does that agree with your answer to (c)? Yes, my matrices are diagonally dominant in my numerical results. CALCULATION FOR N = 5 TO DETERMINE DIAGONAL DOMINANCE RESULTS = MAIN DIAGONAL  SUM( OFFDIAGONALS )
e) Compare with the analytic solution by plotting an error map vs (r,q). Please see the plots below. f) Compute the RMS error for a range of N, coarse to fine. Do not be skimpy on N here. Plot error versus h. Do the results agree with theory? Explain.
We see a slope of 2 for our errors as the number of nodes increases. This results agree with theory, since we expect order two accurcy with a centered difference approximation. g) Plot the converged (high N) numerical solution (current and potential). Does it make sense? Does it agree with your sketch? Our converged plot is at N=100 nodes. We see that it does agree with our theoretical sketch.

MaterialsSource Code


PlotsAnalytic Solution @ N = 100
U Plot @ N = 5Error Plot @ N = 5 U Plot @ N = 10 Error Plot @ N = 10 U Plot @ N = 50
Error Plot @ N = 50
CONVERGED SOLUTION U Plot @ N = 100
Error Plot @ N = 100
RMSE vs Number of Nodes
U Plot with 3*theta @ N = 10
U Plot with 3*theta @ N = 50 Discussions: Thanks to Neil E., Matt M., Grace, and Amir in working out some details of this assignment. Error Plot with 3*theta @ N = 50 