# HW4 - The goal of this is to write the corresponding linear...

This preview shows page 1. Sign up to view the full content.

UCSB ME 17: Mathematics of Engineering Spring 2011 Homework 4 Consider a domain [ a, b ] × [ c, d ] and the heat equation in two spatial dimensions: ∂u ∂t = D 2 u ∂x 2 + 2 u ∂y 2 ! + S, where D is the diffusion constant, u is the temperature and S is the source term. A numerical approximation of the heat equation can be written as: u n +1 i,j - u n i,j Δ t = D u n +1 i +1 ,j - 2 u n +1 i,j + u n +1 i - 1 ,j Δ x 2 + u n +1 i,j +1 - 2 u n +1 i,j + u n +1 i,j - 1 Δ y 2 ! + S n i,j , where U n i,j = u ( x i , y j , t n ), Δ x and Δ y are the given space step in the x and y directions, respectively and Δ t is the given time step.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The goal of this is to write the corresponding linear system Au = rhs , i.e. identify the matrix A and the vectors u and rhs . In particular: 1. Write by hand the linear system in the case where m = n = 4. 2. Write a MATLAB function that takes in D,a,b,c,d,m,n,dt , the solution u n at time t n and two function handles BC and S and constructs the linear system for u n +1 . 1...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern