Вы находитесь на странице: 1из 15

Simulation of 2-D Steady State Heat Conduction

Equation in a Rectangular Plate Using Different


Implicit Schemes

Prepared by Venu Agarwal

Submitted to Dr. S.P Vanka

1|Page
1. Introduction
The goal of this project was to solve the steady state 2-D heat diffusion equation in a square
plate implicitly using various Iterative techniques. Three point methods Gauss-Seidal,
Jacobi and SOR and a line method line inversion in x direction were used to find the two
dimensional temperature distribution in a square plate. The governing equation is the partial
differential equation shown below.

𝜕 2𝑇 𝜕 2𝑇
( 2 + 2) = 0
𝜕𝑥 𝜕𝑦

A unit square plate was set with an initial temperature value of zero and the boundary
conditions were given as one unit at the top and zero unit at the other three sides. Contour
plots of the temperature distribution for three different grid sizes for each of the four iterative
techniques were made.
The analytical solution of the 2D heat diffusion equation was used to estimate the error in
discretization for various grid sizes (i.e. 10*10, 20*20, 40*40) for each of the four iterative
methods. The code was written in Python language.

2. Implicit Iterative Schemes


In order to solve the partial differential equation stated above, it was discretized using the
implicit finite difference method. Central differencing in x and y direction was used which
is second order accurate.
The equation for the derivative in x direction is

𝑛+1 𝑛+1 𝑛+1


𝜕 2 𝑇 𝑇𝑖+1,𝑗 − 2𝑇𝑖,𝑗 + 𝑇𝑖−1,𝑗
=
𝜕𝑥 2 ∆𝑥 2

and similarly the equation for the derivative in the y direction is

𝑛+1 𝑛+1 𝑛+1


𝜕 2 𝑇 𝑇𝑖,𝑗+1 − 2𝑇𝑖,𝑗 + 𝑇𝑖,𝑗−1
=
𝜕𝑦 2 ∆𝑦 2

2|Page
A. Point Iterative methods

For every grid point, the steady heat diffusion equation was discretized according to the
above mentioned discretization scheme. This resulted in a set of nx*ny equations where nx
is the no. of grid points in x direction and ny is the no. of grid points in the y direction. These
nx*ny equations were written in a matrix form of Ax=B, where A is the coefficient matrix,
and B is the constant matrix.
To solve this matrix form of Ax=B, three point iterative schemes were used which are
described as follows:

I. Gauss Seidel Scheme

The element-wise formula for the Gauss–Seidel method is as follows:

where xk is the kth approximation or iteration of x and xk+1 is the next or k + 1 iteration of x.

(k+1)
The computation of xi(k+1) uses only the elements of x that have already been
(k)
computed, and only the elements of x that have not yet advanced to iteration k+1.

II. Jacobi Scheme

The element-wise formulate for the Jacobi Scheme is as follows:

where xk is the kth approximation or iteration of x and xk+1 is the next or k + 1 iteration of x.

(k+1) (k)
The computation of xi requires each element in x except itself. Unlike the Gauss-Seidel
(k) (k+1)
Method, we can't overwrite xi with xi , as that value will be needed by the rest of the
computation. The minimum amount of storage is two vectors of size n.

3|Page
III. Successive Over Relaxation

The element-wise formulate for the Jacobi Scheme is as follows:

where xk is the kth approximation or iteration of x and xk+1 is the next or k + 1 iteration of x.

The method of successive over-relaxation (SOR) is a variant of the Gauss Seidel method for
solving a linear system of equations resulting in faster convergence. The value of relaxation
factor (w) depend upon the type of coefficient matrix. Generally a value of w between 0 and
2 is taken. For the present case value of w was taken to be 1.6

B. Line Iterative Method

In line iterative methods, one line of grid points is chosen (either in x or y) and the discretized
implicit equations are written, which are then inverted to solve them. Once the solutions are
obtained, next line is solved (again either in x or y direction), using the already computed
solutions of the previous line.

I. Line Inversion in X

For Line Inversion in X method, one line of grid points is chosen in x direction and the
discretized heat diffusion equation using central differencing scheme( as mentioned earlier)
is written for every grid point on that line. The equation is written in the following form

Where Tk is the known value (computed from previous iteration) and Tk+1 is the solution of
the temperature for the next iteration (unknown value).
The discretized equations are written in matrix form Ax=B and are inverted using any of the
above mentioned point iterative schemes. After obtaining the solution, the next line in y
direction is considered and are solved for again using the same technique.
These marching is continued till the difference between two successive iterative solution for
all the nodes is less than a specified convergence value (10-6 in this case).

4|Page
3. Analytical Solution and Boundary
Conditions
The analytical solution is given by:

Where W is the width of the plate and H is the height of the plate. Since the geometry taken
is a square plate of unit side. W and H is equal to 1.

Boundary Conditions:

T2 is the temperature of the top side of the plate and T1 is the temperature of the rest of the
sides of the plate. In the present case, T2 is taken as 1 unit and T1 is taken as zero.

Analytical solution is used to estimate the error in discretization corresponding to different


grid sizes for a particular scheme. The error in temperature of the center line of the plate is
plotted against the height of the plate for all the three grid sizes considered. This error
estimation is done for all the four iterative schemes.

5|Page
4. Results
A. Temperature contours for various Iterative Techniques

Temperature Contours for different grid sizes for all the four discussed Iterative Techniques
are shown below. From the contour plots of different iterative schemes, one trend is common
that is as the grid size is increased, the plots are more smoothened near the corner of the
grids.

I. Gauss-Seidel

6|Page
7|Page
II. Jacobi method

8|Page
III. SOR

9|Page
10 | P a g e
IV. Line Inversion

11 | P a g e
B. Comparison between different Iterative Schemes

The following table compares the convergence rate of different iterative schemes. The
convergence criteria was set same for all the schemes .i.e. (10-6). The values tabulated are
the number of iterations taken by various schemes to reach the specified convergence
criteria of 10-6. As it should be, SOR gives the fastest convergence, followed by Line
inversion, then Gauss-Seidel and Jacobi gives the slowest convergence.

SOR Line Inversion Gauss-Seidel Jacobi

10*10 31 71 129 234

20*20 114 224 411 749

40*40 394 731 1333 2409

12 | P a g e
C. Error in Discretization

13 | P a g e
From the above four graphs for different iterative schemes, one trend is common. As the grid
size is refined, the error in temperature decreases. For 40*40 grid size error is almost zero
for all the four schemes.

14 | P a g e
5. Conclusion
In this project numerical simulation of steady heat diffusion equation was done using implicit
techniques. The major conclusion that can be drawn from the above mentioned results is the
importance of grid refinement to get accurate solutions and the performance of various
implicit iterative schemes. Refinement of the grid gives more accurate solutions. As far as
iterative techniques are concerned, SOR gives the fastest convergence among all the other
implicit schemes.

15 | P a g e

Вам также может понравиться