Solving the steady and unsteady 2D heat conduction problem
Objective: clear all; close all clc; %initial conditions L=1; B=1; nx=10; ny=10; x=linspace(0,1,nx); y=linspace(0,1,ny); dx=L/(nx-1); dy=B/(ny-1); % steady state jacobi method T=ones(nx,ny); %boundary condtions T(:,1)=400; T(1,:)=600; T(end,:)=900; T(:,end)=800; Told=T; tol=1e-4; err=899; k=2*(((dx^2)+(dy^2))/((dx^2)*(dy^2))); method=[1…