{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MATLAB Homework 5

MATLAB Homework 5 - MIT OpenCourseWare http/ocw.mit.edu...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MIT OpenCourseWare http://ocw.mit.edu 18.085 Computational Science and Engineering I Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms .
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
18.085: Matlab Homework #5 Laplace's equation. The problem is Laplace's eqixa,tio~i on the unit sqiiare with boiinda,ry condi- tions u = y on the side :r = 1? u = n: on the side y = 1, 117 . n, = -y on t,he side n: = 0, 111 : n, = -n: on the side y = 0. Replace the 2nd derivatives in Laplace's equation by centered second differ- ences. This gives the "5-point discrete L.aplacianV on a sqixsre grid (An: = Ay) : [ u (:I: + AT, g) + IL(Z - Ax, y) + U(X, ?/ + Ax) + u (x: - Ax) - 4 4 r , ?I)]/ ( 4 ~ ) ~ Set Aa = 1/11 giving 10 x 10 = 100 int,erior grid points with 100 unknowns ~ ( r , The 100 grid points fall in a sqiia,re array hiit yon have t,o make 11). them into a VECTOR with 100 components. I usually number them by romTs; 11.1 = AX, Ax) and uz = 11,(Ax, 2Az) and next row 11,11 = 11,(2An:, Ax) and last corner uloo = u(1OAx. 10Az). At turo boundaries ure know u. At t,he left boixnda,ry n: = 0 ure know I! = -?I. Replace by [~r(Ax, y) - u(0, ?/)]/Ax
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern