Download part-1
Transcript
1 Finite Difference Method: A Tutorial 1.1 Solving a simple problem with mesh and matrix Let us start with a simple problem. Consider a 50-by-50 mesh with 2500 nodes. We assign a real number to each of the nodes using the following rule: • Numbers at nodes along the first edge are 10. • Numbers at nodes along other three edges are all zero. • For any internal node, the number equals to the average of the numbers at its 4 neighbors. 8 6 4 2 10 20 y 30 40 30 40 20 10 x Figure 1.1 Solution to the 2D average-of-neighbor problem, (mesh size 50 × 50). Since the values along all edges are known (boundary conditions), we only need to determine the values at the 48 × 48 internal nodes. The solution is plotted in Figure 1.1. To demonstrate the procedure of obtaining this solution, we consider a smaller 6 × 6 problem, where only 4 × 4 = 16 unknowns are to be solved. We first label the unknown nodes as 𝑣1 ,𝑣2 , …, 𝑣16 , 0 0 0 0 10 𝑣1 𝑣5 𝑣9 𝑣13 0 10 𝑣2 𝑣6 𝑣10 𝑣14 0 10 𝑣3 𝑣7 𝑣11 𝑣15 0 10 𝑣4 𝑣8 𝑣12 𝑣16 0 0 0 0. 0 (1.1) Then we apply the requirement that the number at any node equals to the average of its four neighbors. This requirement can be easily written as an algebraic equation. Taking the node 𝑣6 as an example, we have the equation 1 𝑣6 = (𝑣2 + 𝑣5 + 𝑣7 + 𝑣10 ), 4 or (1.2)