Solving the steady and unsteady 2D heat conduction problem
Objective: clear all close all clc %Initial condition L=1; %Length [m] nx=10; %Nodes in x direction ny=nx; %Nodes in y direction %Discretising in x-direction x=linspace(0,L,nx); y=linspace(0,L,ny); dx=L/(nx-1); dy = L/(ny-1); %Tolerance criteria error = 9e9; tol = 1e-4 ; %Assuming tremperature t=5; dt=1e-2 ; alpha = 0.1; %Steady…