All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Solution Equation of two-dimensional heat conduction equation is ∂T∂t=α∗(∂2T∂x2+∂2T∂x2) where α is thermal diffusion coefficient. The equation is best described as a transient state two-dimensional heat conduction equation whereas if the time rate of change of temperature…
Faizan Akhtar
updated on 17 Feb 2021
Solution
Equation of two-dimensional heat conduction equation is
∂T∂t=α∗(∂2T∂x2+∂2T∂x2)
where α is thermal diffusion coefficient.
The equation is best described as a transient state two-dimensional heat conduction equation whereas if the time rate of change of temperature is zero it will be called a steady-state equation.
Applying numerical discretization for the above-mentioned equation
Transient state two-dimensional heat conduction equation
Nomenclature
Nodes representing X-axis = "i".
Nodes representing Y axis="j".
At any (i,j) temperature is represented by T(i,j)
The temperature at the top of (i,j)=T(i,j+1)
The temperature at the bottom of (i,j)=T(i,j−1)
The temperature at the left of (i,j)=T(i−1,j)
The temperature at the right of (i,j)=T(i+1,j)
(Please note that the central difference scheme is applicable for the temperature gradient (space loop) as boundary conditions are known to us, temperature for the inner nodes to be calculated. Forward difference scheme is applied for the time loop)
The equation for two-dimensional transient state heat conduction is described below
T(i)n+1−T(i)ndt=α∗((Ti,j+1)+(Ti,j−1)−2Ti,jdy2+(Ti+1,j)+(Ti−1,j)−2Ti,jdx2)
T(i)n+1=T(i)n+α∗dt∗((Ti,j+1)+(Ti,j−1)−2Ti,j)dy2+α∗dt∗((Ti+1,j)+(Ti−1,j)−2Ti,j)dx2
Explicit equation can be calculated for n time steps.
T(i,j)n+1=T(i,j)n+α∗dt∗((T(i,j+1)n)+(T(i,j−1)n)−2T(i,j)n)dy2+α∗dt∗((T(i+1,j)n)+(T(i−1,j)n)−2T(i,j)n)dx2
This is one of the easiest way to calculate the temperature for (n+1) time steps and at (i,j) nodes since right hand side equation terms are already known for previous time steps i,e "n".
The implicit equation can be calculated for n+1 time steps.
T(i,j)n+1=T(i,j)n+α∗dt∗((T(i,j+1)n+1)+(T(i,j−1)n+1)−2T(i,j)n+1)dy2+α∗dt∗((T(i+1,j)n+1)+(T(i−1,j)n+1)−2T(i,j)n+1)dx2
Calculating K1 and K2
K1=α∗dtdx2
K2=α⋅dtdy2
T(i,j)n+1∗(1+(2∗K1)+(2∗K2))=T(i,j)n+K2∗((T(i,j+1)n+1)+(T(i,j−1)n+1)+K1∗((T(i+1,j)n+1)+(T(i−1,j)n+1)
T(i,j)n+1=T(i,j)n+K2∗((T(i,j+1)n+1)+(T(i,j−1)n+1))+K1∗((T(i+1,j)n+1)+(T(i−1,j)n+1))1+(2∗K1)+(2∗K2)
The implicit equation consist of lot of unknowns apart from LHS because RHS consists of all the terms in the present time step.
Steady state two-dimensional heat conduction equation
For steady state ∂T∂t=0
The equation for two-dimensional steady state heat conduction is described below
∂2T∂x2+∂2T∂y2=0
Applying numerical discretisation for the above equation
Ti+1,j+Ti−1,jdx2+Ti,j−1+Ti,j+1dy2=Ti,j∗2∗(dx2+dy2)dx2∗dy2
Ti,j=1K∗(Ti+1,j+Ti−1,jdx2+Ti,j−1+Ti,j+1dy2)
where
K=2∗(dx2+dy2)dx2∗dy2
The implicit equation can be solved with the help of iterative solvers which are listed below
Transient state two-dimensional heat conduction implicit equation
Jacobi method
Gauss-seidel method
Successive over relaxation method
Transient state two-dimensional heat conduction explicit equation
Steady state two-dimensional heat conduction implicit equation
Jacobi method
Gauss-seidel method
Successive over relaxation method
Courant-Fredreichs-Lewy condition
It is a necessary condition for convergence for solving partial difference equation.It is an important criteria determining stability of the profile.
In this case
CFLx=α⋅dtdx2
CFLy=α⋅dtdy2
For temperature profile to be stable
CFL≤0.5
CFLx+CFLy≤0.5
Gathering other input parameters
Matlab coding algorithm
Matlab coding for two-dimensional steady-state equation solved implicitly.
% solving 2D steady state temperature heat conduction equation
% iterative solvers
% implicit equation
% Jacobi_method
clear
close all
clc
% length of domain
L=1;
%Number of node points
n=10;
% defining x value
x=linspace(0,L,n);
dx=x(2)-x(1);
y=linspace(0,L,n);
dy=y(2)-y(1);
% other input parameters
T=100*ones(n);
T(1,1:n)=600;
T(n,1:n)=900;
T(1:n,n)=800;
T(1:n,1)=400;
T(1,1)=500;
T(1,n)=700;
T(n,n)=750;
T(n,1)=650;
Told=T;
% iterative solver to be used (jacobian_iter=1,GS=2,SOR=3)
iterative_solver=1;
jacobi_iter=0;
% error and tolerance
error=9e9;
tol=1e-4;
% applying convergence loop
tic
while (error>tol)
for i=2:n-1
for j=2:n-1
if iterative_solver==1
figure(1)
% jacobian
T(i,j)=0.25*((Told(i+1,j)+Told(i-1,j)+Told(i,j+1)+Told(i,j-1)));
end
end
end
jacobi_iter_time=toc;
error=max(max(abs(Told-T)));
Told=T;
[c,h]=contourf(x,y,T);
colorbar
colormap(jet)
xlabel('xaxis')
ylabel('yaxis')
clabel(c,h)
title_text=sprintf('2D steady state temperature gradient jacobian iteration=%d,computation time=%f',jacobi_iter,jacobi_iter_time);
title(title_text)
jacobi_iter=jacobi_iter+1;
end
% solving 2D steady state temperature heat conduction equation
% iterative solvers
% implicit equation
% Gauss_seidel_method
clear
close all
clc
% length of domain
L=1;
%Number of node points
n=10;
% defining x value
x=linspace(0,L,n);
dx=x(2)-x(1);
y=linspace(0,L,n);
dy=y(2)-y(1);
% other input parameters
T=100*ones(n);
T(1,1:n)=600;
T(n,1:n)=900;
T(1:n,n)=800;
T(1:n,1)=400;
T(1,1)=500;
T(1,n)=700;
T(n,n)=750;
T(n,1)=650;
Told=T;
% iterative solver to be used
iterative_solver=1;
GS=0;
% error and tolerance
error=9e9;
tol=1e-4;
% applying convergence loop
tic;
while (error>tol)
for i=2:n-1
for j=2:n-1
if iterative_solver==1
figure(1)
% GS
T(i,j)=0.25*((Told(i+1,j)+T(i-1,j)+Told(i,j+1)+T(i,j-1)));
end
end
end
error=max(max(abs(Told-T)));
Told=T;
GS=GS+1;
GS_time=toc;
[c,h]=contourf(x,y,T);
colorbar
colormap(jet)
xlabel('xaxis')
ylabel('yaxis')
clabel(c,h)
title_text=sprintf('2D steady state temperature gradient gauss seidel iteration=%d,computation time=%f',GS,GS_time);
title(title_text)
end
% solving 2D steady state temperature heat conduction equation
% iterative solvers
% implicit equation
% Successive_over_relaxation
clear
close all
clc
% length of domain
L=1;
%Number of node points
n=10;
% defining x value
x=linspace(0,L,n);
dx=x(2)-x(1);
y=linspace(0,L,n);
dy=y(2)-y(1);
% other input parameters
T=100*ones(n);
T(1,1:n)=600;
T(n,1:n)=900;
T(1:n,n)=800;
T(1:n,1)=400;
T(1,1)=500;
T(1,n)=700;
T(n,n)=750;
T(n,1)=650;
Told=T;
% iterative solver to be used
iterative_solver=1;
SOR=0;
% error and tolerance
error=9e9;
tol=1e-4;
omega=1.8;
tic;
% applying convergence loop
while (error>tol)
for i=2:n-1
for j=2:n-1
if iterative_solver==1
% SOR
T(i,j)=omega*(0.25*(T(i+1,j)+T(i-1,j)+T(i,j+1)+T(i,j-1)))+(1-omega)*Told(i,j);
end
end
end
SOR_time=toc;
error=max(max(abs(Told-T)));
Told=T;
figure(2)
[c,h]=contourf(x,y,T);
colorbar
colormap(jet)
xlabel('xaxis')
ylabel('yaxis')
clabel(c,h)
title_text=sprintf('2D steady state temperature gradient SOR iteration=%d,computation time=%f',SOR,SOR_time);
title(title_text)
SOR=SOR+1;
end
% solving 2D transient state temperature heat conduction equation
% iterative solvers
% explicit equation
clear
close all
clc
% length of domain
L=1;
%Number of node points
n=10;
% defining x value
x=linspace(0,L,n);
dx=x(2)-x(1);
y=linspace(0,L,n);
dy=y(2)-y(1);
% time marching
t=1000;
dt=10;
nt=t/dt;
% thermal diffusivity
alpha=1.1;
K1=(alpha*dt*(dx^-2));
K2=(alpha*dt*(dy^-2));
% other input parameters
T=300*ones(n);
T(1,1:n)=600;
T(n,1:n)=900;
T(1:n,n)=800;
T(1:n,1)=400;
T(1,1)=500;
T(1,n)=700;
T(n,1)=650;
T(n,n)=850;
Told=T;
Tprevious=T;
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
explicit_time=1;
tic;
for k=1:nt
for i=2:n-1
for j=2:n-1
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
H=(Told(i-1,j)+Told(i+1,j));
V=(Told(i,j-1)+Told(i,j+1));
T(i,j)=(Tprevious(i,j)*term1)+(H*term2)+(V*term3);
end
end
error=max(max(abs(Told-T)));
Told=T;
explicit_time=explicit_time+1;
ET=toc;
[c,h]=contourf(x,y,T);
colorbar
colormap(jet)
clabel(c,h)
xlabel('xaxis')
ylabel('yaxis')
title_text=sprintf('2D transient state conduction explicit iteration=%d,computation time=%d',explicit_time,ET);
title(title_text)
pause(0.03)
end
% solving 2D transient state temperature heat conduction equation
% iterative solvers
% imlicit equation
% jacobi_method
clear
close all
clc
% length of domain
L=1;
%Number of node points
n=10;
% defining x value
x=linspace(0,L,n);
dx=x(2)-x(1);
y=linspace(0,L,n);
dy=y(2)-y(1);
% time marching
t=1000;
dt=10;
nt=t/dt;
% thermal diffusivity
alpha=1.1;
% error and tolerance
error=9e9;
tol=1e-4;
% other input parameters
T=300*ones(n);
T(1,1:n)=600;
T(n,1:n)=900;
T(1:n,n)=800;
T(1:n,1)=400;
T(1,1)=500;
T(1,n)=700;
T(n,n)=750;
T(n,1)=650;
Told=T;
Tprevious=T;
K1=(alpha*dt)/dx^2;
K2=(alpha*dt)/dy^2;
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
% iteration
iterative_method=1;
if iterative_method==1
jacobi_iter=1;
tic
for k=1:nt
while(error>tol)
for i=2:n-1
for j=2:n-1
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
H=(Told(i-1,j)+Told(i+1,j));
V=(Told(i,j-1)+Told(i,j+1));
T(i,j)=(Tprevious(i,j)*term1)+(H*term2)+(V*term3);
end
end
error=max(max(abs(Told-T)));
Told=T;
jacobi_iter=jacobi_iter+1;
end
Tprevious=T;
jacobian_time=toc;
[c,h]=contourf(x,y,T);
colorbar
colormap(jet)
xlabel('xaxis')
ylabel('yaxis')
clabel(c,h)
title_text=sprintf('2D temperature transient state jacobian iteration=%d,computational time=%f',jacobi_iter,jacobian_time);
title(title_text)
pause(0.03)
end
end
% solving 2D transient state temperature heat conduction equation
% iterative solvers
% imlicit equation
% Gauss_Seidel_method
clear
close all
clc
% length of domain
L=1;
%Number of node points
n=10;
% defining x value
x=linspace(0,L,n);
dx=x(2)-x(1);
y=linspace(0,L,n);
dy=y(2)-y(1);
% time marching
t=1000;
dt=10;
nt=t/dt;
% thermal diffusivity
alpha=1.1;
% error and tolerance
error=9e9;
tol=1e-4;
% other input parameters
T=1000*ones(n);
T(1,1:n)=600;
T(n,1:n)=900;
T(1:n,n)=800;
T(1:n,1)=400;
T(1,1)=500;
T(1,n)=700;
T(n,n)=750;
T(n,1)=650;
Told=T;
Tprevious=T;
% iteration
iterative_method=1;
K1=(alpha*dt)/dx^2;
K2=(alpha*dt)/dy^2;
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
% applying time marching loop
if iterative_method==1
GS=1;
tic;
for k=1:nt
while(error>tol)
for i=2:n-1
for j=2:n-1
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
H=(T(i-1,j)+Told(i+1,j));
V=(T(i,j-1)+Told(i,j+1));
T(i,j)=(Tprevious(i,j)*term1)+(H*term2)+(V*term3);
end
end
error=max(max(abs(Told-T)));
Told=T;
GS=GS+1;
end
Tprevious=T;
GS_time=toc;
[c,h]=contourf(x,y,T);
colorbar
colormap(jet)
disp('Temperature')
xlabel('x axis')
ylabel('y axis')
clabel(c,h)
title_text=sprintf('GS iteration for 2D transient heat conduction=%d,computational time=%f',GS,GS_time);
title(title_text)
pause(0.03)
end
end
% solving 2D transient state temperature heat conduction equation
% iterative solvers
% imlicit equation
% SOR
clear
close all
clc
% length of domain
L=1;
%Number of node points
n=10;
% defining x value
x=linspace(0,L,n);
dx=x(2)-x(1);
y=linspace(0,L,n);
dy=y(2)-y(1);
% time marching
t=1000;
dt=10;
nt=t/dt;
omega=1.8;
% thermal diffusivity
alpha=4e-3;
% error and tolerance
error=9e9;
tol=1e-4;
% other input parameters
T=100*ones(n);
T(1,1:n)=600;
T(n,1:n)=900;
T(1:n,n)=800;
T(1:n,1)=400;
T(1,1)=500;
T(1,n)=700;
T(n,n)=750;
T(n,1)=650;
Told=T;
Tprevious=T;
Tend=T;
% iteration
iterative_method=1;
SOR=1;
K1=(alpha*dt)/dx^2;
K2=(alpha*dt)/dy^2;
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
% applying time marching loop
if iterative_method==1
SOR=1;
tic;
for k=1:nt
while(error>tol)
for i=2:n-1
for j=2:n-1
term1=(1+(2*K1)+(2*K2))^-1;
term2=K1*term1;
term3=K2*term1;
H=(T(i-1,j)+Told(i+1,j));
V=(T(i,j-1)+Told(i,j+1));
T(i,j)=(Tprevious(i,j)*term1)+(H*term2)+(V*term3);
Tend(i,j)=(1-omega)*Told(i,j)+(T(i,j)*omega);
end
end
error=max(max(abs(Told-T)));
Told=T;
SOR=SOR+1;
end
SOR_time=toc;
Tprevious=T;
Tend=T;
[c,h]=contourf(x,y,T);
colorbar
colormap(jet)
xlabel('x axis')
ylabel('y axis')
clabel(c,h)
title_text=sprintf('SOR iteration for 2D transient heat conduction=%d,computational time=%f',SOR,SOR_time);
title(title_text)
pause(0.03)
end
end
Conclusion
The following information can be inferred from the plot
S No | Equation type | Approach | Iterative solvers |
Explicit iteration number |
Explicit time | ||
Jacobi iteration number Computation time |
Gauss-Seidel method iteration number Computation time |
Successive over-relaxation method iteration number Computation time |
|||||
1 | Steady-state | Implicit method |
213 50.21 |
114 26.39 |
73 19.27 |
N/A | N/A |
Explicit method | N/A | N/A | N/A | N/A | N/A | ||
2 | Transient state | Implicit method |
207 18.60 |
109 18.19 |
55 18.62 |
N/A | N/A |
Explicit method | N/A | N/A | N/A | 101 | 22.7 |
It can be concluded that the number of iteration for SOR is less compared to the other two (the highest being the Jacobian method).
Jacobian−method>Gauss−Seidel−method>SOR
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week-4 : Basic Calibration of Single cylinder CI-Engine
Aim: Basic Calibration of Single cylinder CI-Engine Objective : Explore Tutorial No 1- CI final 1.Compare SI vs CI and list down differences (assignment no 2-SI) 2. Comments on the following parameters BSFC Exhaust Temperature A/F ratios 3.Change MFB 50 and observe impact on performance Introduction Difference…
11 Nov 2021 05:26 AM IST
Week 2 : Basic Calibration of Single cylinder SI-Engine
Aim: Basic Calibration of Single-cylinder SI-Engine Objective: 1. Run the case at 1800 rpm and list down important parameters (20 Marks) air flow rate BMEP BSFC In-cylinder pressure 2. Increase the power output at 3600 rpm by 10% (30 Marks) Introduction A spark-ignition engine (SI engine) is…
22 Oct 2021 07:11 AM IST
Week 1 : Exploring the GUI of GT-POWER
Aim: Exploring the GUI of GT-suite GT-suite can be used in a wide range of applications. There are several industries that are using GT-suite for various applications On-highway and off-highway vehicle Marine and rail Industrial machinery Aerospace Power generation Multiphysics platform GT-Suite has a versatile multiphysics…
12 Oct 2021 02:52 PM IST
Week 8: Literature review - RANS derivation and analysis
Aim: Literature review - RANS derivation and analysis Objective: Apply Reynolds decomposition to the NS equations and come up with the expression for Reynolds stress. Explain your understanding of the terms Reynolds stress What is turbulent viscosity? How is it different from molecular viscosity? Introduction…
01 Sep 2021 07:52 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.