Characteristics of Governing Partial Differential Equation (PDE) • • Ordinary Differential Equations have only one independent variable: ππ¦ 3 + 5π¦ 2 = 3π −π₯ , π¦ 0 =5 ππ₯ Partial Differential Equations have more than one independent variable: π2π’ π2π’ + 2π₯π¦ 2 + π’ = 1 ππ₯ 2 ππ¦ π3π’ π2π’ + π₯ 2 + 8π’ = 5π¦ ππ₯ 2 ππ¦ ππ¦ π2π’ ππ’ + π₯π’ =π₯ ππ₯ 2 ππ¦ π2π’ ππ₯ 2 3 π3π’ +6 =π₯ ππ₯ππ¦ 2 here u is the dependent variable, and x and y the independent variables. The order of a PDE is that of the highest-order partial derivative appearing in the equation. The two PDEs at the top are of 2nd order and two PDEs at the bottom are of 3rd order. A PDE is linear if it is linear in the unknown function and all its derivatives (no exponent), with coefficients not functions of u, but can be functions of the independent variables. The two PDEs on the left are linear and the two PDEs on the right are non-linear ones. Classification of 2nd Order Linear PDE’s in 2D π2π’ π2π’ π2π’ ππ’ ππ’ π΄ 2+π΅ +πΆ 2+π· +πΈ +πΉ =0 ππ₯ ππ₯ππ¦ ππ¦ ππ₯ ππ¦ where π΄ , π΅, πΆ, π· and πΈ are functions of π₯ and π¦. πΉ is a function of π₯, π¦ and π’. PDEs can be: • Elliptic ⇒ ⇒ ⇒ if π΅2 − 4π΄πΆ < 0 • Parabolic ⇒ ⇒ ⇒ if π΅2 − 4π΄πΆ = 0 • Hyperbolic ⇒ ⇒ ⇒ if π΅2 − 4π΄πΆ > 0 •This classification is useful because each category relates to specific and distinct engineering problem contexts that demand special solution techniques. Before embarking on a quantitative analysis of a partial differential equation, it is important to have an idea of the qualitative nature of the solution. Much of this qualitative understanding of the solution can be obtained by this classification scheme. Examples Elliptic PDE βͺ Describes physical processes that have Example : Laplace Equation already reached steady-state, hence are time-independent. π2π π2π + 2=0 2 ππ₯ ππ¦ Here, π΄ = 1, π΅ = 0, πΆ = 1 So, π΅2 − 4π΄πΆ = 0 − 4(1)(1) = −4 < 0 Parabolic PDE βͺ Describes time-dependent, dissipative Example : Heat Conduction physical processes, such as diffusion, that are evolving toward steady-state. Equation 2 π π ππ πΌ 2= ππ₯ ππ‘ Hyperbolic PDE Example : Wave Equation π2π¦ 1 π2π¦ = 2 2 2 ππ₯ π ππ‘ Here, π΄ = πΌ, π΅ = 0, πΆ = 0 So, π΅2 − 4π΄πΆ = 0 − 4(0)(πΌ) = 0 βͺ Describes time-dependent, conservative physical processes, such as convection, that are NOT evolving toward steady-state. Here, π΄ = 1, π΅ = 0, πΆ = −1/π 2 1 So, π΅2 − 4π΄πΆ = 0 − 4 1 − 2 = π 4 π2 >0 Features of Different Class of PDEs •Elliptic equations generally arise from a physical problem that involves a diffusion process that has reached equilibrium. Elliptic equations in engineering are typically used to characterize steady-state, boundary value problems (BVP). As in the Laplace equation, this is indicated by the absence of a time derivative. Thus, elliptic equations are typically employed to determine the steady-state distribution of an unknown in two spatial dimensions, e.g., a steady state temperature distribution in a rectangular slab in 2D. By analogy, the same approach can be employed to tackle other problems such as seepage of water under a dam or the distribution of an electric field. •In contrast to the elliptic category, parabolic equations determine how an unknown varies in both space and time (IBVP). This is manifested by the presence of both spatial and temporal derivatives in the heat conduction equation. Such cases are referred to as propagation problems because the solution “propagates,’’ or changes, in time (solution is obtained by ‘marching on time’). Physically, parabolic PDEs tend to arise in time dependent diffusion problems, such as the transient flow of heat in accordance with Fourier's law of heat conduction. •Hyperbolic equations also deal with propagation problems (IBVP). An important distinction manifested by the wave equation is that the unknown is characterized by a second derivative with respect to time. As a consequence, the solution oscillates. These are able to support solutions with discontinuities, for example a shock wave. A variety of engineering systems such as vibrations of rods and beams, convection driven fluid transport problems, waves, and transmission of sound and electrical signals can be characterized by this model. Initial and Boundary Condition for PDEs βΌ There are many possibilities to specify boundary conditions for PDEs: π2π’ ππ’ + π₯π’ =π₯ 2 ππ₯ ππ¦ βΌ Dirichlet boundary condition The solution of the function at the boundary point is specified (π’ = πΆ) βΌ Von Neumann boundary condition ππ’ The derivative of the function at the boundary point is specified ( ππ₯ = πΆ) βΌ Robin boundary condition A combination of the solution and derivative values of the function at the boundary point is specified (π΄π’ + π΅ ππ’ ππ₯ = πΆ) Solution Domain of PDEs Solution Domain of PDEs Solution Domain of PDEs Physical Examples of Elliptic PDEs Three steady-state distribution problems that can be characterized by elliptic PDEs. Temperature distribution on a heated plate, Seepage of water under a dam Electric field near the point of a conductor Physical Examples of Parabolic PDEs A long, thin rod that is insulated everywhere but at its end. The dynamics of the one-dimensional distribution of temperature along the rod’s length can be described by a parabolic PDE. The solution consisting of distributions corresponding to the state of the rod at various times. Physical Examples of Hyperbolic PDEs In the steady subsonic region, the Euler equations exhibit a behavior that is associated with elliptic PDE, whereas in the steady supersonic region, the mathematical behavior is totally different, namely that of hyperbolic PDEs.. Schematic of the flow-field over a supersonic blunt-nosed body Physical Example of an Elliptic PDE y Tt W Tl Tr x Tb L Schematic diagram of a plate with specified temperature boundary conditions The Laplace equation governs the temperature: π2π π2π ππ₯ 2 + ππ¦ 2 =0 Discretizing the Elliptic PDE y Tt (0, n) L οx = m W οy = n οx οy Tl Tr (i − 1, j ) (i, j ) x (0,0) Tb οy (i, j + 1) οx (i, j ) (i + 1, j ) (i, j − 1) (m,0) οΆT T ( x + οx, y ) − 2T ( x, y ) + T ( x − οx, y ) ( x, y ) ο 2 οΆx (οx )2 2 οΆT T ( x, y + οy ) − 2T ( x, y ) + T ( x, y − οy ) ( x, y ) ο 2 2 οΆy (οy ) 2 Discretizing the Elliptic PDE y Tt (0, n) οx οy Tl (i, j + 1) οx οy Tr (i − 1, j ) (i, j ) (i, j ) (i, j − 1) x (0,0) Tb (i + 1, j ) (m,0) οΆ 2T T ( x + οx, y ) − 2T ( x, y ) + T ( x − οx, y ) ( x , y ) ο οΆx 2 (οx )2 οΆ 2T οΆx 2 ο i, j Ti +1, j − 2Ti , j + Ti −1, j (οx )2 Discretizing the Elliptic PDE y Tt (0, n) οx οy Tl (i, j + 1) οx οy Tr (i − 1, j ) (i, j ) (i, j ) (i, j − 1) x (0,0) Tb (i + 1, j ) (m,0) οΆ 2T T ( x + οx, y ) − 2T ( x, y ) + T ( x − οx, y ) ( x , y ) ο οΆx 2 (οx )2 οΆ 2T T ( x, y + οy ) − 2T ( x, y ) + T ( x, y − οy ) ( x , y ) ο οΆy 2 (οy )2 οΆ 2T οΆx 2 οΆ 2T οΆy 2 ο Ti +1, j − 2Ti , j + Ti −1, j i, j ο i, j (οx )2 Ti , j +1 − 2Ti , j + Ti , j −1 (οy )2 Discretizing the Elliptic PDE οΆ 2T οΆ 2T + =0 2 2 οΆx οΆy Substituting these approximations into the Laplace equation yields: Ti +1, j − 2Ti , j + Ti −1, j (οx) 2 if, + Ti , j +1 − 2Ti , j + Ti , j −1 (οy ) 2 =0 οx = οy the Laplace equation can be rewritten as Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0 Discretizing the Elliptic PDE Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0 Once the governing equation has been discretized there are several numerical methods that can be used to solve the problem, e.g., •Direct Method (TDMA method) •Gauss-Seidel Method (Iterative method) •Relaxation Method The Gauss-Seidel Method • Recall the discretized equation Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 − 4Ti , j = 0 • This can be rewritten as Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 Ti , j = 4 • For the Gauss-Seidel Method, this equation is solved iteratively for all interior nodes until a pre-specified tolerance is met. Example 1: Gauss-Seidel Method Consider a plate 2.4 m ο΄ 3.0 m that is subjected to the boundary conditions shown below. Find the temperature at the interior nodes using a square grid with a length of 0.6 m using the Gauss-Seidel method. Assume the initial temperature at all interior nodes to be 0 ο°C . y 300 ο°C 75 ο°C 3.0 m 100 ο°C 50 ο°C 2.4 m x Example 1: Gauss-Seidel Method We can discretize the plate by taking οx = οy = 0.6m Example 1: Gauss-Seidel Method The nodal temperatures at the boundary nodes are given by: 300 ο°C y T 0,5 T0, 4 75 ο°C T0,3 T0, 2 T0 ,1 T0, 0 T1,5 T2,5 T3,5 T4,5 T0, j = 75, j = 1,2,3,4 T1, 4 T2, 4 T3, 4 T4, 4 T1,3 T2,3 T3,3 T4,3 T1, 2 T2, 2 T3, 2 T4, 2 T1,1 T2,1 T3,1 T4,1 100 ο°C Ti ,0 = 50, i = 1,2,3 Ti ,5 = 300, i = 1,2,3 x T1, 0 T2, 0 50 ο°C T3, 0 T4, 0 T4, j = 100, j = 1,2,3,4 Example 1: Gauss-Seidel Method •Now we can begin to solve for the temperature at each interior node using Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 Ti , j = 4 •Assume all internal nodes to have an initial temperature of zero. Iteration #1 T2,1 + T0,1 + T1, 2 + T1,0 i = 1 and j = 1 T1,1 = 4 = 0 + 75 + 0 + 50 4 = 31.2500 ο°C i = 1 and j = 2 T1, 2 = = T2, 2 + T0, 2 + T1,3 + T1,1 4 0 + 75 + 0 + 31.2500 4 = 26.5625ο°C Example 1: Gauss-Seidel Method After the first iteration, the temperatures are as follows. These will now be used as the nodal temperatures for the second iteration. y 300 ο°C 75 ο°C 100 102 135 25 9 .3 37 27 12 39 31 20 43 50 ο°C 100 ο°C x Example 1: Gauss-Seidel Method Iteration #2 i = 1 and j = 1 T1,1 = T2,1 + T0,1 + T1, 2 + T1,0 4 20.3125 + 75 + 26.5625 + 50 = 4 = 42.9688ο°C previous T1,present − T ο₯ a 1,1 = 1 present1,1 ο΄100 T1,1 42.9688 − 31.2500 ο΄100 42.9688 = 27.27% = Example 1: Gauss-Seidel Method The figures below show the temperature distribution and absolute relative error distribution in the plate after two iterations: Temperature Distribution y y 300 75 75 300 300 133 156 161 100 25 % 34% 16% 56 56 87 100 54% 83% 58% 39 29 56 100 31% 62 % 32% 43 37 56 100 27 % 45 % 24 % 75 75 Absolute Relative Approximate Error Distribution x 50 50 50 x Example 1: Gauss-Seidel Method Temperature Distribution in the Plate (°C) Node Number of Iterations 1 2 10 T1,1 31.2500 42.9688 73.0239 T1, 2 T1,3 26.5625 38.7695 91.9585 25.3906 55.7861 119.0976 T1, 4 100.0977 133.2825 172.9755 T2,1 20.3125 36.8164 76.6127 T2, 2 T2,3 11.7188 30.8594 102.1577 9.2773 56.4880 137.3802 T2, 4 102.3438 156.1493 198.1055 T3,1 T3, 2 42.5781 56.3477 82.4837 38.5742 56.0425 103.7757 T3,3 T3, 4 36.9629 86.8393 130.8056 134.8267 160.7471 182.2278 Exact The Relaxation Method • Recall the equation used in the Gauss-Seidel Method, Ti , j = Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1 4 • Because the Gauss-Seidel Method is guaranteed to converge, we can accelerate/decelerate the process by using under / overrelaxation. In this case, new old Ti,relaxed = ο¬ T + ( 1 − ο¬ ) T j i, j i, j π is called relaxation parameter. If π ≤ 1, it is called under-relaxation parameter. When π > 1, it is called over-relaxation parameter. Example 2: Relaxation Method Consider a plate 2.4 m ο΄ 3.0 m that is subjected to the boundary conditions shown below. Find the temperature at the interior nodes using a square grid with a length of 0.6 m . Use a relaxation parameter of 1.4. Assume the initial temperature at all interior nodes to be . 0 ο°C y 300 ο°C 75 ο°C 3.0 m 100 ο°C 50 ο°C 2.4 m x Example 2: Relaxation Method We can discretize the plate by taking οx = οy = 0.6m Example 2: Relaxation Method We can also develop equations for the boundary conditions to define the temperature of the exterior nodes. 300 ο°C y T 0,5 T0, 4 75 ο°C T0,3 T0, 2 T0 ,1 T0, 0 T1,5 T2,5 T3,5 T4,5 T0, j = 75, j = 1,2,3,4 T1, 4 T2, 4 T3, 4 T4, 4 T1,3 T2,3 T3,3 T4,3 T1, 2 T2, 2 T3, 2 T4, 2 T1,1 T2,1 T3,1 T4,1 100 ο°C Ti ,0 = 50, i = 1,2,3 Ti ,5 = 300, i = 1,2,3 x T1, 0 T2, 0 50 ο°C T3, 0 T4, 0 T4, j = 100, j = 1,2,3,4 Example 2: Relaxation Method •Now we can begin to solve for the temperature at each interior node using the rewritten Laplace equation from the Gauss-Seidel method. •Once we have the temperature value for each node we will apply the Relaxation equation. •Assume all internal nodes to have an initial temperature of zero. Iteration #2 Iteration #1 T +T +T +T T +T +T +T i=1 and j=1 T1,1 = 2,1 0,1 1, 2 1, 0 4 0 + 75 + 0 + 50 = 4 = 31.2500 ο°C relaxed 1,1 T = ο¬T new 1,1 + (1 − ο¬ )T old 1,1 = 1.4(31.2500) + (1 − 1.4)0 = 43.7500ο°C i=1 and j=2 T1, 2 = = 2, 2 0, 2 1, 3 1,1 4 0 + 75 + 0 + 43.75 4 = 29.6875ο°C T1,1relaxed = ο¬T1,1new + (1 − ο¬ )T1,1old = 1.4(29.6875) + (1 − 1.4)0 = 41.5625ο°C Example 2: Relaxation Method After the first iteration the temperatures are as follows. These will be used as the initial nodal temperatures during the second iteration. y 300 ο°C 75 ο°C 146 164 221 41 23 66 42 26 67 44 33 64 50 ο°C 100 ο°C x Example 2: Relaxation Method Iteration #2 i = 1 and j = 1 T1,1 = T2,1 + T0,1 + T1, 2 + T1,0 4 32.8125 + 75 + 41.5625 + 50 = 4 = 49.8438ο°C T1,1relaxed = ο¬T1,1new + (1 − ο¬ )T1,1old = 1.4(49.8438) + (1 − 1.4)43.75 = 52.2813ο°C ο₯ a 1,1 = previous T1,present − T 1 1,1 present 1,1 T ο΄100 52.2813 − 43.7500 = ο΄100 52.2813 = 16.32% In iteration 1 we calculated new values of internal nodes from Gauss Seidel method. Then we used the new values to calculate relaxed values. Again those relaxed values are now used as the previous values in Gauss Seidel method to calculate new values then these new values are used to calculate new relaxed values. Example 2: Relaxation Method The figures below show the temperature distribution and absolute relative error distribution in the plate after two iterations: y Temperature Distribution 300 75 75 300 y 300 161 216 181 100 9 .6 % 24 % 22 % 87 122 155 100 53% 81% 57% 51 58 76 100 19% 55% 13% 52 54 69 100 16% 39% 7 .5 % 75 75 Absolute Relative Approximate Error Distribution x 50 50 50 x Example 2: Relaxation Method Temperature Distribution in the Plate (°C) Node Number of Iterations 1 2 9 T1,1 43.7500 52.2813 73.7832 T1, 2 T1,3 41.5625 51.3133 92.9758 40.7969 87.0125 119.9378 T1, 4 145.5289 160.9353 173.3937 T2,1 32.8125 54.1789 77.5449 T2, 2 T2,3 26.0313 57.9731 103.3285 23.3898 122.0937 138.3236 T2, 4 164.1216 215.6582 198.5498 T3,1 T3, 2 63.9844 69.1458 82.9805 66.5055 76.1516 104.3815 T3,3 T3, 4 66.4634 155.0472 131.2525 220.7047 181.4650 182.4230 Exact Alternative Boundary Conditions • • In Examples 1-2, the boundary conditions on the plate had a specified temperature on each edge. What if the conditions are different ? For example, what if one of the edges of the plate is insulated. In this case, the boundary condition would be the derivative of the temperature temperature at the boundary is set at a fixed value (Neumann boundary condition). Because if the right edge of the plate is insulated, then the temperatures on the right edge nodes also become unknowns. y 300 ο°C 75 ο°C Insulated 3.0 m 50 ο°C 2.4 m x Alternative Boundary Conditions • The finite difference equation in this case for the right edge for the nodes for (m, j ) j = 2,3,..n −1 Tm +1, j + Tm −1, j + Tm, j −1 + Tm, j +1 − 4Tm, j = 0 • However the node (m + 1, j ) is not inside the plate. The derivative boundary condition needs to be used to account for these additional unknown nodal temperatures on the right edge. This is done by approximating the derivative at the edge node as (m, j ) y οΆT οΆx ο m, j 300 ο°C Tm+1, j − Tm−1, j 2(οx) 75 ο°C Insulated 3.0 m 50 ο°C 2.4 m x Alternative Boundary Conditions • Rearranging this approximation gives us, Tm +1, j = Tm −1, j + 2(οx) • οΆT οΆx m, j We can then substitute this into the original equation gives us, 2Tm −1, j + 2(οx) οΆT οΆx + Tm, j −1 + Tm, j +1 − 4Tm, j = 0 m, j • Recall that is the edge is insulated then, • οΆT =0 οΆx m, j Substituting this again yields, 2Tm −1, j + Tm, j −1 + Tm, j +1 − 4Tm , j = 0 Example 3: Alternative Boundary Conditions A plate 2.4 m ο΄ 3.0 m is subjected to the temperatures and insulated boundary conditions as shown in Fig. 12. Use a square grid length of 0.6 m . Assume the initial temperatures at all of the interior nodes to be 0 ο°C . Find the temperatures at the interior nodes using the direct method. y 300 ο°C 75 ο°C Insulated 3.0 m 50 ο°C 2.4 m x Example 3: Alternative Boundary Conditions We can discretize the plate taking, οx = οy = 0.6m Example 3: Alternative Boundary Conditions We can also develop equations for the boundary conditions to define the temperature of the exterior nodes. 300 ο°C y T 0,5 T0, 4 75 ο°C T0,3 T0, 2 T0 ,1 T0, 0 T1,5 T2,5 T3,5 T4,5 T1, 4 T2, 4 T3, 4 T4, 4 T1,3 T2,3 T3,3 T4,3 T1, 2 T2, 2 T3, 2 T4, 2 T1,1 T2,1 T3,1 T4,1 T0, j = 75; j = 1,2,3,4 Ti ,0 = 50; i = 1,2,3,4 Insulated x T1, 0 T2, 0 50 ο°C T3, 0 T4, 0 Ti ,5 = 300; i = 1,2,3,4 οΆT οΆx = 0; j = 1,2,3,4 4, j Example 3: Alternative Boundary Conditions y T 0,5 T0, 4 T0,3 T0, 2 T0 ,1 T0, 0 T1,5 T2,5 T3,5 T4,5 T1, 4 T2, 4 T3, 4 T4, 4 T1,3 T2,3 T3,3 T4,3 T1, 2 T2, 2 T3, 2 T4, 2 T1,1 T2,1 T3,1 T4,1 x T1, 0 T2, 0 T3, 0 T4, 0 Here we develop the equation for the temperature at the node (4,3), to show the effects of the alternative boundary condition. i=4 and j=3 2T3,3 + T4, 2 + T4, 4 − 4T4,3 = 0 2T3,3 + T4, 2 − 4T4,3 + T4, 4 = 0 Example 3: Alternative Boundary Conditions The addition of the equations for the boundary conditions gives us a system of 16 equations with 16 unknowns. Solving yields: ο© T1,1 οΉ ο©76.8254 οΉ οͺT οΊ οͺ οΊ οͺ 1, 2 οΊ οͺ99.4444 οΊ οͺ T1,3 οΊ οͺ128.617 οΊ οͺ οΊ οͺ οΊ οͺT1, 4 οΊ οͺ180.410 οΊ οͺT2,1 οΊ οͺ 82.8571οΊ οͺ οΊ οͺ οΊ οͺT2, 2 οΊ οͺ117.335 οΊ οͺT οΊ οͺ159.614 οΊ οͺ 2,3 οΊ οͺ οΊ οͺT2, 4 οΊ οͺ 218.021οΊ οͺT οΊ = οͺ οΊ ο°C 87 . 2678 οͺ 3,1 οΊ οͺ οΊ οͺT3, 2 οΊ οͺ127.426 οΊ οͺ οΊ οͺ οΊ οͺT3,3 οΊ οͺ174.483 οΊ οͺT3, 4 οΊ οͺ232.060οΊ οͺ οΊ οͺ οΊ οͺT4,1 οΊ οͺ88.7882 οΊ οͺT οΊ οͺ130.617 οΊ οͺ 4, 2 οΊ οͺ οΊ οͺT4,3 οΊ οͺ178.830 οΊ οͺ οΊ οͺ οΊ οͺο«T4, 4 οΊο» ο«232.738ο» y 300 75 75 300 300 180 218 232 233 129 160 174 179 99 117 127 131 77 83 87 89 75 75 x 50 50 50 Secondary Variables In Laplace equation that is used for heated plate, temperature is the primary variable. Secondary variables such as heat flux can also be found using appropriate relations (Fourier’s law in this case). y Tt (0, n) οx οy Tl οy Tr (i − 1, j ) (i, j ) (i, j ) Tb (i + 1, j ) (i, j − 1) x (0,0) (i, j + 1) οx (m,0) Heat flux in the x-direction, ππ₯ π,π = −π Heat flux in the y-direction, ππ¦ π,π = −π ππ ππ₯ π,π ππ ππ¦ π,π Resultant heat flux in the node (i, j), ππ,π = ≈ −π ≈ −π ππ+1,π −ππ−1,π 2Δπ₯ ππ,π+1 −ππ,π−1 2Δy ππ₯ 2π,π + ππ¦ 2 π,π Exercise-1 Consider a square heated plate of 4π × 4π that is subjected to the boundary conditions shown below. Find the temperature and heat fluxes at the interior nodes using a square grid with a length of 1π . Use a relaxation parameter of 1.2. Assume the initial temperature at all interior nodes to be 0°πΆ. The accuracy of the solution should be ππ = 1%. y 100°πΆ 75 ο°C 50°πΆ x 0°πΆ Exercise-2 Consider a square heated plate of 4π × 4π that is subjected to the boundary conditions shown below. Find the temperature at the interior nodes using a square grid with a length of 1π. Use a relaxation parameter of 1.2. Assume the initial temperature at all interior nodes to be 0°πΆ. The accuracy of the solution should be ππ = 1%. y 150°πΆ 50°πΆ Insulated x 0°πΆ Physical Example of an Parabolic PDE The internal temperature of a metal rod exposed to two different temperatures at each end can be found using the heat conduction equation. ππ π» ππ» πΆ π= ππ ππ The heat conduction equation requires approximations for the second derivative in space and the first derivative in time. Node Patterns for Elliptic vs Parabolic PDEs Grid used for the FDM solution of elliptic PDEs in two independent variables such as the Laplace equation Grid used for the FDM solution of parabolic PDEs in two independent variables such as the heat-conduction equation. Note that the grid is bounded in all dimensions Note that the grid is open-ended in the temporal dimension Discretizing the Parabolic PDE x οx οx i −1 i i +1 Schematic diagram showing interior nodes For a rod of length πΏ divided into π + 1 nodes, i.e., π₯π₯ = The time is similarly broken into time steps of π₯π‘, Hence πππ corresponds to the temperature at node π, π₯ = π π₯π₯ and π‘ = (π)(π₯π‘) πΏ π The Explicit Method x οx οx i −1 i i +1 πΏ π If we define π₯π₯ = , we can then write the finite central divided difference approximation of the left-hand side at a general interior node (π) as π2π ππ₯ 2 π,π π π ππ+1 − 2πππ + ππ−1 ≈ Δπ₯ 2 where (n ) is the node number along the time. The Explicit Method x οx οx i −1 i i +1 The time derivative on the right-hand side is approximated by the forward divided difference method as, ππ ππ‘ π,π πππ+1 − πππ ≈ Δπ‘ The Explicit Method Substituting these approximations into the governing equation yields π π ππ+1 − 2πππ + ππ−1 πππ+1 − πππ πΌ = 2 Δπ₯ Δπ‘ Solving for the temp at the time node, n + 1 gives πππ+1 = πππ + πΌ choosing, π = Δπ‘ Δπ₯ 2 π π ππ+1 − 2πππ + ππ−1 πΌΔπ‘ Δπ₯ 2 we can write the equation as, π π πππ+1 = πππ + π ππ+1 − 2πππ + ππ−1 The Explicit Method π π πππ+1 = πππ + π ππ+1 − 2πππ + ππ−1 •This equation can be solved explicitly because it can be written for each internal location node of the rod for time node n + 1 in terms of the temperature at time node n . •In other words, if we know the temperature of a spatial node π at time node n = 0, and the boundary temperatures (other spatial nodes), we can find the temperature of the node π at the next time step (node). •Therefore, starting from the given initial condition n = 0, we continue the process by first finding the temperature at all spatial nodes at n = 1, and using these to find the temperature at the next time node, n = 2. This process continues until we reach the time at which we are interested in finding the temperature. Convergence and Stability of Explicit Method •Convergence means that as Δπ₯ and Δπ‘ approach zero, the results of the finite-difference technique approach the true solution. •Stability means that errors at any stage of the computation are not amplified but are attenuated as the computation progresses. •For the explicit method to be both convergent and stable if π ≤ 1/2 or Δπ‘ ≤ 1 Δπ₯ 2 2 πΌ •However, π ≤ 1/2 ensures convergence, but the solution oscillates. •π ≤ 1/4 ensures that the solution does not oscillate. Further π ≤ 1/6 minimizes truncation error. •Thus the value of π places a strong limitation on the explicit method. For example, if Δπ₯ is halved, Δπ‘ must be quartered, to maintain the same value of π. •Consequently, halving Δπ₯ results in eightfold increase in the number of calculations in 1D. [In 2D and 3D the number of calculation increases 16 times and 24 times] •Thus the computational burden becomes large to attain acceptable accuracy in the solution. The Implicit Method •Using the explicit method, we were able to find the temperature at each node, one equation at a time. However the stability problem and convergence criterion places a limitation on the minimum number of the time steps. •Moreover, in explicit method, the temperature at a specific node was only dependent on the temperature of the neighboring nodes from the previous time step. This is contrary to what we expect from the physical problem. •The implicit method allows us to solve this and other problems by developing a system of simultaneous linear equations for the temperature at all interior nodes at a particular time. •The implicit method is unconditionally stable and convergent. The Implicit Method π 2 π ππ πΌ 2= ππ₯ ππ‘ The second derivative on the left-hand side of the equation is approximated by the CDD scheme at time level l + 1 at node ( i ) as π2π ΰΈ 2 ππ₯ π,π+1 π+1 π+1 ππ+1 − 2πππ+1 + ππ−1 ≈ Δπ₯ 2 The first derivative on the right hand side of the equation is approximated by the BDD scheme at time level l + 1 at node (i ) as ππ πππ+1 − πππ α€ ≈ ππ‘ π,π+1 Δπ‘ The Implicit Method π 2 π ππ πΌ 2= ππ₯ ππ‘ Substituting these approximations into the heat conduction equation yields π+1 π+1 ππ+1 − 2πππ+1 + ππ−1 πππ+1 − πππ πΌ = 2 Δπ₯ Δπ‘ Rearranging yields given that, ο¬ =ο‘ π+1 π+1 −πππ−1 + (1 + 2π)πππ+1 − πππ+1 = πππ οt (οx )2 The rearranged equation can be written for every node during each time step. These equations can then be solved as a simultaneous system of linear equations to find the nodal temperatures at a particular time. The Explicit vs Implicit Method π π πππ+1 = πππ + π ππ+1 − 2πππ + ππ−1 π‘ (π, π) The explicit method approximation of node (π, π). The shaded nodes have an influence on (π, π), whereas the unshaded nodes which affect (π, π) are excluded. π₯ Computational nodes demonstrating the fundamental differences between (a) Explicit and (b) Implicit methods. π+1 π+1 −πππ−1 + (1 + 2π)πππ+1 − πππ+1 = πππ π+1 π+1 π π The Crank-Nicolson Method π 2 π ππ πΌ 2= ππ₯ ππ‘ Using the implicit method our approximation of οΆT οΆ 2T οΆx 2 was of O(οx) 2 accuracy, while our approximation of οΆt was of O(οt ) accuracy. One can achieve similar orders of accuracy by approximating the second derivative, on the left-hand side of the heat equation, at the midpoint of the time step. Doing so yields π2π ΰΈ ππ₯ 2 π,π π π π+1 π+1 πΌ ππ+1 − 2πππ + ππ−1 ππ+1 − 2πππ+1 + ππ−1 ≈ + 2 Δπ₯ 2 Δπ₯ 2 The first derivative, on the right-hand side of the heat equation, is approximated using the forward divided difference method at time level, π + π ππ πππ+1 − πππ α€ ≈ ππ‘ π,π Δπ‘ The Simple Implicit vs Crank-Nicolson Method πΊπππππ π°πππππππ π΄πππππ : π+1 π+1 −πππ−1 + (1 + 2π)πππ+1 − πππ+1 = πππ π‘ π+1 π‘ π+1 π‘ π‘π A computational molecule for the simple implicit method π+ 1 2 π‘π A computational molecule for the Crank-Nicolson method πͺππππ − π΅πππππππ π΄πππππ : π+1 π+1 π π −πππ−1 + 2(1 + π)πππ+1 − πππ+1 = πππ−1 + 2(1 − π)πππ + πππ+1 The Crank-Nicolson Method •Substituting these approximations into the governing equation for heat conductance yields π π π+1 π+1 πΌ ππ+1 − 2πππ + ππ−1 ππ+1 − 2πππ+1 + ππ−1 πππ+1 − πππ + = 2 2 2 Δπ₯ Δπ₯ Δπ‘ giving π+1 π+1 π π −πππ−1 + 2(1 + π)πππ+1 − πππ+1 = πππ−1 + 2(1 − π)πππ + πππ+1 where Δπ‘ π=πΌ Δπ₯ 2 •Having rewritten the equation in this form allows us to discretize the physical problem. We then solve a system of simultaneous linear equations to find the temperature at every node at any point in time. Internal Temperatures at 9 sec. The table below allows you to compare the results from all three methods discussed in juxtaposition with the analytical solution. Node Explicit Implicit CrankNicolson Analytical T13 T23 T33 T43 65.953 39.132 27.266 22.872 59.043 36.292 26.809 24.243 62.604 37.613 26.562 24.042 62.510 37.084 25.844 23.610 Parabolic Equations in Two Spatial Dimensions The heat-conduction equation in two spatial dimensions are: ππ π2π π2π =πΌ + 2 2 ππ‘ ππ₯ ππ¦ This equation models the temperature distribution on the face of a heated plate. However, rather than characterizing its steady-state distribution, as was the case with elliptic form, it provides the plate’s temperature distribution as changes with time, i.e., it characterizes the transient temperature distribution. Standard Explicit and Implicit Schemes For 2D Explicit Scheme: Δπ‘ ≤ 1 (Δπ₯ 2 )+(Δy2 ) 8 πΌ Thus for a uniform grid Δπ₯ = Δπ¦ , π = πΌΔπ‘/ Δπ₯ 2 must be less than or equal to 1/4. Consequently, halving the step-size results in a fourfold increase in the number of nodes and a 16-fold increase in computational effort. Further Crank-Nicolson scheme leads to an exorbitantly large system of simultaneous equations. Alternating Direction Implicit (ADI) Scheme ADI scheme facilitates using TDMA algorithm to be used in 2D/3D problems. The node-values are updated in one dimension at a time, keeping the values of the other dimensions unchanged. The ADI method results in tri-diagonal equations along the dimension that is implicit. For example, in 2D, first traversing is done for row-wise nodes, considering the nodes above and below the row to be constant. After all the nodes are updated with new values, second traversing is done for the column nodes, again assuming the nodes on the left and right side to be constant. Alternating Direction Implicit (ADI) Scheme Laplace Equation (Columnwise Traverse): if Δπ₯ = Δπ¦, results TDM Column Traverse Row-wise Traverse