{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework_6_2011

Homework_6_2011 - CS 111 Introduction to Computational...

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

CS 111 - Introduction to Computational Science Homework 6 Consider the diffusion equation in the interval [0 , 1]: ∂u ∂t = D 2 u ∂x 2 , (1) where D is the diffusion constant. Here, we will take D = . 5. An exact solution for this equation is u ( x, t ) = e - Dt cos( x ) and a good approximation can be written as: u n +1 i - u n i Δ t = D u n +1 i +1 - 2 u n +1 i + u n +1 i - 1 Δ x 2 . (2) 1. Write down the linear system corresponding to (2). 2. Write a code that solve the diffusion equation (1) using the scheme (2) for a final time of ttarget
This is the end of the preview. Sign up to access the rest of the 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