Solving Heat Transfer problem using Finite Difference
5 views (last 30 days)
Show older comments
I was working on modelling this question
Modelled it liket this:
I used this formula for finite difference
I wrote the code but how do i obtain equations ..for example solving by hand i got these:
Heres my code: There is an issue if i use syms T1 ....T5
Any help would be appreciated.
clear all
clc
close all
L=0.05; %thickness
n=5; % no of nodes
edot=6e5; % heat generation
k=34; % conductivity
g=edot/k;
dx=L/n; %distance between 2 nodes
alp=1/(dx)^2;
h=60; % heat transfer coefficient
syms T5
T_inf=30; % T on the right hand side
T0=ones(1,n);
T1=ones(1,n);
%T0(5)=T5;
for i=1:n-1
T1(i)=(alp)*(T0(i+1)-2*T0(i)+T0(i-1))+g; % node 1= insulation
end
T0(end)=h*(T_inf-T(5))*k*1/dx+edot*dx/2; % node 5 has heat convection too
4 Comments
SALAH ALRABEEI
on 16 Jun 2021
In this case, you boundary conditon in Neumann not Dirichlet, meaning that the derivate of the temperature at the end is zero not the temperature itself is zero.
Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!