All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
AIM: To solve the 2D heat conduction problem for the steady and unsteady state using Jacobi, gauss seidel, and successive over-relaxation iterative techniques. THEORY: Conduction is a mode of heat transfer, generally takes place in solids due to temperature differences associated with free electron and lattice vibration.…
Sachin Barse
updated on 29 Sep 2023
AIM:
THEORY:
For steady-state, time derivative is not considered, their fore below equation represents the 2D steady-state Heat conduction (elliptic).
Steady State 2D heat conduction | ![]() |
Transient 2D heat conduction (explicit) | ![]() |
Transient 2D heat conduction (implicit) | ![]() |
MATLAB CODE:
Inputs
Top boundary temperature | 600 K |
Bottom Boundary temperature | 900 K |
Left Boundary temperature | 400 K |
Right Boundary temperature | 800 K |
error | 1e-4 |
Steady-State 2D Heat conduction
clear all
close all
clc
% Domain and dicretization length
number_node = 10;
domain_length = 1;
%value of x and y at nodes in a discretization plane
x = linspace(0,domain_length,number_node);
y = linspace(0,domain_length,number_node);
dx = domain_length/(number_node-1);
dy = domain_length/(number_node-1);
% Let define a temperature value at all nodes with initial guess 300k
T = 300*ones(number_node,number_node);
% Initia boundary conditions at left and right
T(1:end,1) = 400;
T(1:end,end) = 800;
% Initia boundary conditions at bottom and top
T(end,1:end) = 900;
T(1,1:end) = 600;
%average values of T at corner boundaries
T(1,1) = 500;
T(end,1) = 650;
T(1,end) = 700;
T(end,end) = 850;
%copy of Temperature to compute to compute
T_old = T;
%constant
K = (2*(dx^2+dy^2))/(dx^2*dy^2);
omegha = 1.2;
% to enter while loop initialize error value randomly
error = 10;
tol = 1e-4;
no_iteration = 0;
method = input('Enter(1) for jacobi,(2) for gauss siediel,(3) for sos');
if method == 1
while(error>tol)
for i = 2:number_node-1
for j = 2:number_node-1
term1 = (T_old(i+1,j)+T_old(i-1,j))/dx^2;
term2 = (T_old(i,j+1)+T_old(i,j-1))/dy^2;
T(i,j) = (term1+term2)/K;
end
end
error = max(max(abs(T_old-T)));
% to upadte the previous velcity with new velocity
%got from the iteration
T_old = T;
no_iteration = no_iteration+1;
end
elseif method == 2
while(error>tol)
for i = 2:number_node-1
for j = 2:number_node-1
term1 = (T_old(i+1,j)+T(i-1,j))/dx^2;
term2 = (T_old(i,j+1)+T(i,j-1))/dy^2;
T(i,j) = (term1+term2)/K;
end
end
error = max(max(abs(T_old-T)));
% to upadte the previous velcity with new velocity
%got from the iteration
T_old = T;
no_iteration = no_iteration+1;
end
else
while(error>tol)
for i = 2:number_node-1
for j = 2:number_node-1
term1 = (T_old(i+1,j)+T(i-1,j))/dx^2;
term2 = (T_old(i,j+1)+T(i,j-1))/dy^2;
T(i,j) = ((1-omegha)*T_old(i,j))+(omegha*((term1+term2)/K));
end
end
error = max(max(abs(T_old-T)));
% to upadte the previous velcity with new velocity
%got from the iteration
T_old = T;
no_iteration = no_iteration+1;
end
end
% to visualize the result
[X,Y] = meshgrid(x,y);
contourf(X,Y,T)
colorbar
set(gca,'ydir','reverse')
Unsteady-State 2D Heat conduction
Steady-State analysis
Transient analysis
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...
FINAL INDEPENDENT PROJECT
Project : Design & Animate the drone camera for project model. Attached Link For Model Review : https://drive.google.com/file/d/1f6sjaJc6Od2AEnmh-JYFFoLMmUveWk61/view?usp=drive_link
15 May 2024 05:42 PM IST
Week - 4
AIM: Implement control logic of a “washing machine” using Stateflow as per given sequence: If the power supply is available, the system gets activated. If the Water supply is not available, stop the process & indicate through LED Soaking time should be 200s followed by Washing…
13 Mar 2024 10:27 AM IST
Week -2
1.Door Bell Simulink Model: Simulink Model Explanation: The pulse generator is used to create square wave pulses at regular intervals.The block waveform parameters Amplitude,pulse width,period and phase delay,determine the shape of the output waveform. …
12 Mar 2024 12:23 PM IST
Project 1
Attached Model for Project :- Attached link for grading :- https://drive.google.com/file/d/13bjiEKi2h1sYtm9LzZMouMksFAZYnVIQ/view?usp=drive_link
29 Oct 2023 11:00 AM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.