0% found this document useful (0 votes)
11 views23 pages

Numerical Solution of Partial Differential Equations: y e y DX Dy

Uploaded by

crfpfyfynj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views23 pages

Numerical Solution of Partial Differential Equations: y e y DX Dy

Uploaded by

crfpfyfynj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Numerical and Engineering Analysis – 3rd Stage M. Sc.

Dina Sami

Numerical Solution of Partial Differential Equations

5.1 Introduction

A differential equation with one independent variable is called an ordinary differential


equation. An example of such an equation would be
dy
3 + 5 y 2 = 3e − x , y (0) = 5
dx

Where y is the dependent variable ‫ معتمد‬،‫متغير تابع‬, and x is the independent variable‫ متغير مستقل‬.
What if there is more than one independent variable? Then the differential equation is called a
partial differential equation. An example of such an equation would be
 2u  2u
3 + 2 = x2 + y2
x 2
y

Subject to certain conditions: where u is the dependent variable, and x and y are the
independent variables.
.‫اي معادلة تحتوي على معامالت تفاضلية جزئية لدالة ذات متغيرين مستقلين او اكثر تسمى بالمعادلة التفاضلية الجزئية‬
،‫وتظهر في العديد من الحاالت الفيزياوية والهندسية مثل مسألة انتقال الحرارة خالل عمود معدني واهتزاز االسالك وغيرها‬
.‫حيث تعتمد الدوال الموجودة في جميع هذه المسائل على متغيرين او اكثر‬
When writing PDEs, it is common to denote partial derivatives using subscripts. For example:
𝜕𝑢 𝜕2 𝑢 𝜕2 𝑢
= 𝑢𝑥 , = 𝑢𝑥𝑥 , = 𝑢𝑥𝑦
𝜕𝑥 𝜕𝑥 2 𝜕𝑥 𝜕𝑦

5.2 Types of Partial Differential Equations


Order of a PDEs

The order of a PDE is determined by the highest derivative in the equation. For example,

.‫رتبة المعادلة التفاضلية الجزئية تحدد برتبة اعلى اشتقاق يظهر فيها‬
𝝏𝒖 𝝏𝒖
+𝟐 = 𝒙𝟐 first-order PDE
𝝏𝒙 𝝏𝒚

𝝏𝒛 𝝏𝒛 𝟐
= 2y (𝝏𝒙) first-order PDE
𝝏𝒚
153
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami
𝝏𝒛 𝝏𝒛
(𝝏𝒙) (𝝏𝒙) ➔ ‫عند الضرب تجمع االسس‬

𝝏𝟐 𝒖 𝝏𝒖 𝟑
= ( 𝝏𝒛 ) Second-order PDE
𝝏𝒙 𝝏𝒚

𝝏𝒖 𝝏𝒖 𝝏𝒖
( 𝝏𝒛 ) ( 𝝏𝒛 ) ( 𝝏𝒛 ) ➔ ‫عند الضرب تجمع االسس‬

𝝏𝟐 𝒖 𝝏𝟐 𝒖 𝝏𝟐 𝒖
+𝟑 + = sin x Second-order PDE
𝝏𝟐 𝒙 𝝏𝒚𝝏𝒙 𝝏𝟐 𝒚

𝝏𝟐 𝒖 𝝏𝒖 𝝏𝒖
=2 . Second-order PDE
𝝏𝒚𝝏𝒙 𝝏𝒙 𝝏𝒚

𝝏𝒖 𝝏𝒖
𝒖 =𝒙 +𝒚 First-order PDE
𝝏𝒙 𝝏𝒚

Degree of a PDEs

The degree of a differential equation is the degree of the highest derivative, which occurs in
it. For example,
𝝏𝒖 𝝏𝒖
+𝟐 = 𝒙𝟐 First-degree PDE
𝝏𝒙 𝝏𝒚

𝝏𝒛 𝝏𝒛 𝟐
= 2y ( ) second-degree PDE
𝝏𝒚 𝝏𝒙

𝝏𝟐 𝒖 𝝏𝒖 𝟑
= ( 𝝏𝒛 ) Third-degree PDE
𝝏𝒙 𝝏𝒚

𝝏𝟐 𝒖 𝝏𝟐 𝒖 𝝏𝟐 𝒖
+𝟑 + = sin x First-degree PDE
𝝏𝟐 𝒙 𝝏𝒚𝝏𝒙 𝝏𝟐 𝒚

𝝏𝟐 𝒖 𝝏𝒖 𝝏𝒖
=2 . Second-degree PDE
𝝏𝒚𝝏𝒙 𝝏𝒙 𝝏𝒚

𝝏𝒖 𝝏𝒖
𝒖 =𝒙 +𝒚 Second-degree PDE
𝝏𝒙 𝝏𝒚

154
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

Linear and nonlinear PDEs


A linear PDE is one that is of first degree in all of its field variables and partial derivatives.
For example,
degree = 1 ➔ linear , degree > 1 ➔ nonlinear

𝝏𝒖 𝝏𝒖
+𝟐 = 𝒙𝟐 linear PDE
𝝏𝒙 𝝏𝒚

𝝏𝒛 𝝏𝒛 𝟐
= 2y (𝝏𝒙) nonlinear PDE
𝝏𝒚

𝝏𝟐 𝒖 𝝏𝒖 𝟑
= ( 𝝏𝒛 ) nonlinear PDE
𝝏𝒙 𝝏𝒚

𝝏𝟐 𝒖 𝝏𝟐 𝒖 𝝏𝟐 𝒖
+𝟑 + = sin x linear PDE
𝝏𝟐 𝒙 𝝏𝒚𝝏𝒙 𝝏𝟐 𝒚

𝝏𝟐 𝒖 𝝏𝒖 𝝏𝒖
=2 . nonlinear PDE
𝝏𝒚𝝏𝒙 𝝏𝒙 𝝏𝒚

𝝏𝒖 𝝏𝒖
𝒖 =𝒙 +𝒚 nonlinear PDE
𝝏𝒙 𝝏𝒚

Homogeneous and nonhomogeneous PDEs


.‫تكون المعادلة التفاضلية الجزئية متجانسة إذا كان كل حد من حدودها يحتوي اما المتغير المعتمد او مشتقته‬

𝝏𝒖 𝝏𝒖
+𝟐 = 𝒙𝟐 Nonhomogeneous PDE
𝝏𝒙 𝝏𝒚

𝝏𝒛 𝝏𝒛 𝟐
= 2y (𝝏𝒙) Homogeneous PDE
𝝏𝒚

𝝏𝟐 𝒖 𝝏𝒖 𝟑
= ( 𝝏𝒛 ) Homogeneous PDE
𝝏𝒙 𝝏𝒚

𝝏𝟐 𝒖 𝝏𝟐 𝒖 𝝏𝟐 𝒖
+𝟑 + = sin x Nonhomogeneous PDE
𝝏𝟐 𝒙 𝝏𝒚𝝏𝒙 𝝏𝟐 𝒚

𝝏𝟐 𝒖 𝝏𝒖 𝝏𝒖
=2 . Homogeneous PDE
𝝏𝒚𝝏𝒙 𝝏𝒙 𝝏𝒚

155
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami
𝜕𝑢 𝜕𝑢
𝒖 =𝒙 +𝒚 Nonhomogeneous PDE
𝜕𝒙 𝜕𝒚

Dimension of PDEs
Dimension of the equation represented the number of spatial variables. There are two types of
independent variables as the following:

1- Temporal variable ‫( المتغيرالزمني‬t)

2- Spatial variable ‫(المتغير المكاني‬x, y, z, r, 𝜃)

For example,
1
𝑢𝑥𝑥 = 𝑢𝑡𝑡 one- dimension
𝑐2

𝜙𝑥𝑥 + 𝜙𝑦𝑦 = 0 two-dimension

𝑇𝑥𝑥 + 𝑇𝑦𝑦 + 𝑇𝑧𝑧 = 0 three-dimension

156
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

5.3 Classification of Partial Differential Equations


As an introduction to solve PDEs, most textbooks concentrate on linear second order PDEs
with two independent variables and one dependent variable. The general form of such an
equation is

 2u  2u  2u
A + B + C +D=0 (1)
x 2 xy y 2
And can be classified as one of three types. This classification depends only on the coefficients of the
second order derivatives. Of course, we assume that at least one of the coefficients A, B, and C is not
zero. Where A, B, C, and D are real constants, is said to be

5.3.1 Parabolic Partial Differential Equations )‫(معادلة قطع مكافئ‬


If B − 4 AC = 0 , Equation (1) is called a parabolic partial differential equation.
2

One of the simple examples of a parabolic PDE is the heat-conduction equation for a metal rod.

𝜕2 𝑢 𝜕𝑢
𝛼 2 = (heat equation) (1-D) (2)
𝜕𝑥 𝜕𝑡

Where:
u = T (x, t) = Temperature as a function of location, x and time, t
k
𝛼 = thermal diffusivity, is given by  =
C
Where:
k = Thermal conductivity of rod material,
𝜌 = Density of rod material.
C = specific heat of the rod material.

157
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

1- Explicit Method of Solving Parabolic PDEs ‫طريقة صريحة‬


Parabolic equation involve partial derivatives with respect to both spatial and time variables,
so solution of this equation generally is determined from boundary and initial conditions.
To numerically solve parabolic PDEs such as Equation (2), one can use finite difference
approximations of the partial derivatives so that the dependent variable, T is now sought ‫بحث‬
at particular nodes ( x -location) and time ( t ).

Initial and Boundary Conditions


A boundary condition expresses the behavior of a function on the boundary (border) of its area
of definition (position condition). An initial condition is like a boundary condition, but then for
the time-direction.

What is the finite difference method?


The finite difference method is used to solve differential equations that have conditions
imposed ‫ مفروض‬on the boundary rather than at the initial point. These problems are called
boundary-value problems.
Steps of finite difference solution:
⚫ Divide the solution region into a grid ‫شبكة‬of nodes‫ عقد‬.
⚫ Replacement the given differential equation by finite difference equivalent,
⚫ Solve the differential equations subject to the boundary conditions and/or initial
conditions.

158
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

Finite difference method:

i= Node number along the x − direction,


h = distance between nodes in the x − direction.
j = Node number along the y – direction,

k = distance between nodes in the y –direction.

➢ Forward divided Difference Formula


𝜕𝑢 𝑢𝑖+1,𝑗 − 𝑢𝑖,𝑗 𝜕𝑢 𝑢𝑖,𝑗+1 − 𝑢𝑖,𝑗
= , =
𝜕𝑥 ℎ 𝜕𝑦 𝑘

➢ Backward divided Difference Formula


𝜕𝑢 𝑢𝑖,𝑗 − 𝑢𝑖−1,𝑗 𝜕𝑢 𝑢𝑖,𝑗 − 𝑢𝑖,𝑗−1
= , =
𝜕𝑥 ℎ 𝜕𝑦 𝑘

➢ Central divided Difference Formula


𝜕𝑢 𝑢𝑖+1,𝑗 − 𝑢𝑖−1,𝑗 𝜕𝑢 𝑢𝑖,𝑗+1 − 𝑢𝑖,𝑗−1
= , =
𝜕𝑥 2ℎ 𝜕𝑦 2𝑘

𝜕𝑢 𝜕𝑢 𝑢𝑖+1,𝑗 − 𝑢𝑖,𝑗 𝑢𝑖,𝑗 − 𝑢𝑖−1,𝑗


𝜕2 𝑢 | − | −
𝜕𝑥 𝐹𝐷 𝜕𝑥 𝐵𝐷 ℎ ℎ
= =
𝜕𝑥 2 ℎ ℎ
𝑢𝑖+1,𝑗 −2 𝑢𝑖,𝑗 + 𝑢𝑖−1,𝑗
=
ℎ2
𝜕𝑢 𝜕𝑢
| − |
𝜕2 𝑢 𝜕𝑦 𝐹𝐷 𝜕𝑦 𝐵𝐷 𝑢𝑖,𝑗+1 −2 𝑢𝑖,𝑗 + 𝑢𝑖,𝑗−1
= =
𝜕𝑦 2 𝑘 𝑘2

159
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

1- The Direct Method of Solving Elliptic PDEs )‫(الطريقة المباشرة‬


Let’s find the solution via a specific physical example. Take a rectangular plate as shown
below, where each side of the plate is maintained at a specific temperature. We are interested
in finding the temperature within the plate at steady state. No heat sinks or sources exist in the
problem.

The length L along the x − axis is divided into m equal segments, while the width W along the
y − axis is divided into n equal segments, hence giving

𝐿 𝑊
m= , n=
∆𝑥 ∆𝑦
Now we will apply the finite difference approximation of the partial derivatives at a general
interior node ( i, j ).

𝜕2 𝑢 𝑢𝑖+1,𝑗 −2 𝑢𝑖,𝑗 + 𝑢𝑖−1,𝑗


= (3)
𝜕𝑥 2 (∆𝑥)2
𝜕2 𝑢 𝑢𝑖,𝑗+1 −2 𝑢𝑖,𝑗 + 𝑢𝑖,𝑗−1
𝜕𝑦 2 = (∆𝑦)2
(4)

Equations (3) and (4) are central divided difference approximations of the second derivatives.
Substituting Equations (3) and (4) in Equation (2), we get
𝑢𝑖+1,𝑗 −2 𝑢𝑖,𝑗 + 𝑢𝑖−1,𝑗 𝑢𝑖,𝑗+1 −2 𝑢𝑖,𝑗 + 𝑢𝑖,𝑗−1
+ =0 (5)
(∆𝑥)2 (∆𝑦)2

160
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

For a grid with


 x = y
Equation (5) can be simplified as
𝑢𝑖+1,𝑗 + 𝑢𝑖−1,𝑗 + 𝑢𝑖,𝑗+1 + 𝑢𝑖,𝑗−1 − 4 𝑢𝑖,𝑗 = 0 (6)

Note1: elliptic PDEs involve partial derivatives with respect to spatial variables only, and as a
consequence solutions of such equations are determined by boundary conditions alone. Parabolic and
hyperbolic equations involve partial derivatives with respect to both spatial and time variables, so
solutions of such equations generally are determined from boundary and initial conditions.

Note2: A solution of an elliptic PDE (such as Laplace’s equation) can describe a physical system
whose state is in equilibrium (steady state); a solution of a parabolic PDE (such as the heat equation)
can describe a diffusional state, whereas a hyperbolic PDE (such as the wave equation) can describe a
vibrational state.

Gauss-Seidel Method:
This method is utilities the latest iterative value available and scans the mesh points symmetrically
from left to right along successive rows. The formula is given below.

𝑛+1 1 𝑛 𝑛+1 𝑛 𝑛+1


𝑢𝑖,𝑗 = [𝑢𝑖+1,𝑗 + 𝑢𝑖−1,𝑗 + 𝑢𝑖,𝑗+1 + 𝑢𝑖,𝑗−1 ]
4
𝑛
Where 𝑢𝑖,𝑗 be the 𝑛𝑡ℎ iterative value of 𝑢𝑖,𝑗 .

161
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

Ex. 1: Laplace equation in a square of side 3 units. Take x = y = 1, with


B.C: u (0, y) = u (3, y) = 50 (3 – y)
u (x, 3) = 16.5 sin (x (3 – x))
u (x, 0) = 150 + 25 x (3 – x)
Sol:

 2u  2u
+ =0
x 2 y 2
𝐿 3
m= = =3
∆𝑥 1
𝑊 3
n= = =3
∆𝑦 1

` `

162
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

𝒖𝒊+𝟏,𝒋 + 𝒖𝒊−𝟏,𝒋 + 𝒖𝒊,𝒋+𝟏 + 𝒖𝒊,𝒋−𝟏 − 𝟒 𝒖𝒊,𝒋 = 𝟎

−4 𝑢1,1 + 𝑢2,1 + 𝑢0,1 + 𝑢1,2 + 𝑢1,0 = 0


−4 𝑢1,1 + 𝑢2,1 + 100 + 𝑢1,2 + 200 = 0
−4 𝑢1,1 + 𝑢2,1 + 𝑢1,2 = −300 … (1)

−4 𝑢2,1 + 𝑢3,1 + 𝑢1,1 + 𝑢2,2 + 𝑢2,0 = 0


−4 𝑢2,1 + 100 + 𝑢1,1 + 𝑢2,2 + 200 = 0
−4 𝑢2,1 + 𝑢1,1 + 𝑢2,2 = −300 … (2)

−4 𝑢1,2 + 𝑢2,2 + 𝑢0,2 + 𝑢1,3 + 𝑢1,1 = 0


−4 𝑢1,2 + 𝑢2,2 + 50 + 15 + 𝑢1,1 = 0
−4 𝑢1,2 + 𝑢2,2 + 𝑢1,1 = −65 … (3)

−4 𝑢2,2 + 𝑢3,2 + 𝑢1,2 + 𝑢2,3 + 𝑢2,1 = 0


−4 𝑢2,2 + 50 + 𝑢1,2 + 15 + 𝑢2,1 = 0
−4 𝑢2,2 + 𝑢1,2 + 𝑢2,1 = −65 … (4)

Equations (1) to (4) represent a set of four simultaneous linear equations and solving them
gives the temperature at the four interior nodes. The solution is
𝑢1,1 = 120.625 ℃
𝑢2,1 = 120. 625 ℃
𝑢1,2 = 61.875 ℃
𝑢2,2 = 61.875 ℃

163
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

Insulated Conditions
If the right edge of the plate is insulated, then the temperatures on the right edge nodes also
become unknowns. The finite difference Equation (6) in this case for the right edge for the
nodes (m, j ) , j = 1,2,3,..n − 1; i = 1,2,.., m

➔ Tm+1, j + Tm−1, j + Tm, j −1 + Tm, j +1 − 4Tm, j = 0 (7)

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 (m, j ) as
T Tm+1, j − Tm−1, j
 (8)
x m, j 2(x)

giving
T
Tm +1, j = Tm −1, j + 2(x) (9)
x m, j

substituting Equation (9) in Equation (7), gives


T
2Tm −1, j + 2(x) + Tm , j −1 + Tm , j +1 − 4Tm , j = 0 (10)
x m, j

Now if the edge is insulated,


T
=0 (11)
x m, j

substituting Equation (11) in Equation (10), gives an equation to use at the Neuman Boundary
condition

2Tm−1, j + Tm, j −1 + Tm, j +1 − 4Tm, j = 0 (12)

NOTE: Gauss-Seidel Method:


This method is utilities the latest iterative value available and scans the mesh points symmetrically
from left to right along successive rows. The formula is given below.

𝑛+1 1 𝑛 𝑛+1 𝑛 𝑛+1


𝑢𝑖,𝑗 = [𝑢𝑖+1,𝑗 + 𝑢𝑖−1,𝑗 + 𝑢𝑖,𝑗+1 + 𝑢𝑖,𝑗−1 ]
4
𝑛
Where 𝑢𝑖,𝑗 be the 𝑛𝑡ℎ iterative value of 𝑢𝑖,𝑗 .

164
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

Ex2: Consider a plate 2.4 𝑚 × 3𝑚 that is subjected to the boundary conditions


shown below. Find the temperature at the interior nodes using a square with a
length of 0.6𝑚 grid using the Gauss- Seidel method. Assume the initial temperature guess
at all interior nodes to be 0℃.

Sol:
𝜕2 𝑢 𝜕2 𝑢
+ = 0
𝜕𝑥 2 𝜕𝑦 2

𝐿 2.4 𝑊 3
m= = =4 , n= = =5
∆𝑥 0.6 ∆𝑦 0.6

165
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

Now we can being to solve for the temperature at each interior node using:
1 1
𝑇1,1 = (𝑇2,1 + 𝑇0,1 + 𝑇1,2 + 𝑇1,0 ) , 𝑇2,1 = (𝑇3,1 + 𝑇1,1 + 𝑇2,2 + 𝑇2,0 )
4 4
1
𝑇3,1 = (𝑇4,1 + 𝑇2,1 + 𝑇3,2 + 𝑇3,0 )
4
1 1
𝑇1,2 = (𝑇2,2 + 𝑇0,2 + 𝑇1,3 + 𝑇1,1 ) , 𝑇2,2 = (𝑇3,2 + 𝑇1,2 + 𝑇2,3 + 𝑇2,1 )
4 4
1
𝑇3,2 = (𝑇4,2 + 𝑇2,2 + 𝑇3,3 + 𝑇3,1 )
4
1 1
𝑇1,3 = (𝑇2,3 + 𝑇0,3 + 𝑇1,4 + 𝑇1,2 ) , 𝑇2,3 = (𝑇3,3 + 𝑇1,3 + 𝑇2,4 + 𝑇2,2 )
4 4
1
𝑇3,3 = (𝑇4,3 + 𝑇2,3 + 𝑇3,4 + 𝑇3,2 )
4
1 1
𝑇1,4 = (𝑇2,4 + 𝑇0,4 + 𝑇1,5 + 𝑇1,5 ) , 𝑇2,4 = (𝑇3,4 + 𝑇1,4 + 𝑇2,5 + 𝑇2,3 )
4 4
1
𝑇3,4 = (𝑇4,4 + 𝑇2,4 + 𝑇3,5 + 𝑇3,3 )
4

Gauss-Seidel method: Initial value


0 0 0 0 0 0 0 0 0 0 0 0
𝑇1,1 = 𝑇2,1 = 𝑇3,1 = 𝑇1,2 = 𝑇2,2 = 𝑇3,2 = 𝑇1,3 = 𝑇2,3 = 𝑇3,3 = 𝑇1,4 = 𝑇2,4 = 𝑇3,4 =0
1st iteration
1 1 0 0 1 0 1 1 0
𝑇1,1 = (𝑇2,1 + 75 + 𝑇1,2 + 50) = 31.25 , 𝑇2,1 = (𝑇3,1 + 𝑇1,1 + 𝑇2,2 + 50) = 20.31
4 4

1 1 1 0
𝑇3,1 = (100 + 𝑇2,1 + 𝑇3,2 + 50) = 42.57
4

1 1 0 0 1 1 0 11 0 1
𝑇1,2 = (𝑇2,2 + 75 + 𝑇1,3 + 𝑇1,1 ) = 26.56 , 𝑇2,2 = (𝑇3,2 + 𝑇1,2 + 𝑇2,3 + 𝑇2,1 ) = 11.71
4 4

1 1 1 0 1
𝑇3,2 = (100 + 𝑇2,2 + 𝑇3,3 + 𝑇3,1 ) = 38.57
4

1 1 0 0 1 1 0 11 0 1
𝑇1,3 = (𝑇2,3 + 75 + 𝑇1,4 + 𝑇1,2 ) = 25.39 , 𝑇2,3 = (𝑇3,3 + 𝑇1,3 + 𝑇2,4 + 𝑇2,2 ) = 9.27
4 4

1 1 1 0 1
𝑇3,3 = (100 + 𝑇2,3 + 𝑇3,4 + 𝑇3,2 ) = 36.96
4

166
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami
1 1 0 1 1 0 1 1 1
𝑇1,4 = (𝑇2,4 + 75 + 300 + 𝑇1,3 ) = 100.09 , 𝑇2,4 = (𝑇3,4 + 𝑇1,4 + 300 + 𝑇2,3 )=
4 4
102.34
1 1 1 1
𝑇3,4 = (100 + 𝑇2,4 + 300 + 𝑇3,3 ) = 134.82
4

2nd iteration
2 1 1 1
𝑇1,1 = (𝑇2,1 + 75 + 𝑇1,2 + 50) = 42.96
4
2 −𝑇 1
𝑇1,1 1,1 42.96−31.25
|𝜀𝑎1,1 | = | 2
𝑇1,1
| × 100 = | 42.96
| × 100 = 27.26%

2 1 1 2 1
𝑇2,1 = (𝑇3,1 + 𝑇1,1 + 𝑇2,2 + 50) = 36.81
4
2 −𝑇 1
𝑇2,1 2,1 36.81−20.31
|𝜀𝑎2,1 | = | 2
𝑇2,1
| × 100 = | 36.81
| × 100 = 44.82%

2 1 2 1
𝑇3,1 = (100 + 𝑇2,1 + 𝑇3,2 + 50) = 56.34
4
2 −𝑇 1
𝑇3,1 3,1 56.34−42.57
|𝜀𝑎3,1 | = | 2
𝑇3,1
| × 100 = | 56.34
| × 100 = 24.44%

2 1 1 1 2
𝑇1,2 = (𝑇2,2 + 75 + 𝑇1,3 + 𝑇1,1 ) = 38.76
4
2 −𝑇 1
𝑇1,2 1,2 38.76−26.56
|𝜀𝑎1,2 | = | 2
𝑇1,2
| × 100 = | 38.76
| × 100 = 31.47%

2 1 1 2 1 2
𝑇2,2 = (𝑇3,2 + 𝑇1,2 + 𝑇2,3 + 𝑇2,1 ) = 30.85
4
2 −𝑇 1
𝑇2,2 2,2 30.85−11.71
|𝜀𝑎2,2 | = | 2
𝑇2,2
| × 100 = | 30.85
| × 100 = 62.04%

2 1 2 1 2
𝑇3,2 = (100 + 𝑇2,2 + 𝑇3,3 + 𝑇3,1 ) = 56.03
4
2 −𝑇 1
𝑇3,2 3,2 56.03−38.57
|𝜀𝑎3,2 | = | 2
𝑇3,2
| × 100 = | 56.03
| × 100 = 31.11%

167
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami
2 1 1 1 2
𝑇1,3 = (𝑇2,3 + 75 + 𝑇1,4 + 𝑇1,2 ) = 55.78
4
2 −𝑇 1
𝑇1,3 1,3 55.78−25.39
|𝜀𝑎1,3 | = | 2
𝑇1,3
| × 100 = | 55.78
| × 100 = 54.48%

2 11 2 1 2
𝑇2,3 = (𝑇3,3 + 𝑇1,3 + 𝑇2,4 + 𝑇2,2 ) = 56.48
4
2 −𝑇 1
𝑇2,3 2,3 56.48−9.27
|𝜀𝑎2,3 | = | 2
𝑇2,3
| × 100 = | 56.48
| × 100 = 83.58%

2 1 2 1 2
𝑇3,3 = (100 + 𝑇2,3 + 𝑇3,4 + 𝑇3,2 ) = 86.83
4
2 −𝑇 1
𝑇3,3 3,3 86.83−36.96
|𝜀𝑎3,3 | = | 2
𝑇3,3
| × 100 = | 86.83
| × 100 = 57.43%

2 1 1 2
𝑇1,4 = (𝑇2,4 + 75 + 300 + 𝑇1,3 ) = 133.28
4
2 −𝑇 1
𝑇1,3 1,3 133.28−100.09
|𝜀𝑎1,4 | = | 2
𝑇1,3
| × 100 = | 133.28
| × 100 = 24.9%

2 1 1 2 2
𝑇2,4 = (𝑇3,4 + 𝑇1,4 + 300 + 𝑇2,3 ) = 156.14
4
2 −𝑇 1
𝑇2,3 2,3 156.14−102.34
|𝜀𝑎2,4 | = | 2
𝑇2,3
| × 100 = | 156.14
| × 100 = 34.45%

2 1 2 2
𝑇3,4 = (100 + 𝑇2,4 + 300 + 𝑇3,3 ) = 160.74
4
2 −𝑇 1
𝑇3,3 3,3 160.74−134.82
|𝜀𝑎3,4 | = | 2
𝑇3,3
| × 100 = | 160.74
| × 100 = 16.12%

The table below show the temperature distribution in the plate after ten iterations:
𝑇1,1 73.0239 𝑇1,3 119.0976
𝑇2,1 76.6127 𝑇2,3 137.3802
𝑇3,1 82.4837 𝑇3,3 130.8056
𝑇1,2 91.9585 𝑇1,4 172.9755
𝑇2,2 102.1577 𝑇2,4 198.1055
𝑇3,2 103.7757 𝑇3,4 182.2278

168
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

Using the Gauss-Seidel method, solve for the temperatures at nodes 1 to 5.


Sol:

169
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

170
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

171
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

172
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

173
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

174
Numerical and Engineering Analysis – 3rd Stage M. Sc. Dina Sami

175

You might also like