This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: UCSB ME 17: Mathematics of Engineering Spring 2011 The Diffusion Equation in 2D (1 , 1) node 16 node 15 node 14 node 13 node 12 node 11 node 10 node 9 node 8 node 7 node 6 node 5 node 4 node 3 node 2 node 1 (1 , 2) (1 , 3) (1 , 4) (2 , 1) (2 , 2) (2 , 3) (2 , 4) (3 , 1) (3 , 2) (3 , 3) (3 , 4) (4 , 4) (4 , 3) (4 , 2) (4 , 1) x y Figure 1: Discretization of a two dimensional domain with m = 4 points in the x direction and n = 4 points in the y direction. A grid node is referenced by its i and j indices. The i index references the i th location in the x direction, while the j index references the j th location in the y direction. The solution u at red nodes will be given the value of the boundary conditions given by the function BC , while at the blue nodes the solution will be approximated using (1). Consider 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. We assume that the value of the temperature is given on the walls of the domain by a function called BC . In order to find a numerical solution, we discretize the computational domain into m points in the x direction and n points in the y direction, as illustrated in figure 1. This gives a grid with m n grid nodes, at which we can write an approximation to equation (1). Such a numerical approximation 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 steps in the x and y directions, respectively and t is the given time step. We can rewrite this approximation as: u n +1 i,j + D t x 2- u n +1 i +1 ,j + 2 u n +1 i,j- u n +1 i- 1 ,j +...
View Full Document
This note was uploaded on 12/29/2011 for the course ME 243a taught by Professor Abamieh during the Fall '09 term at UCSB.
- Fall '09