Solving Heat Transfer problem using Finite Difference
Ältere Kommentare anzeigen
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 Kommentare
SALAH ALRABEEI
am 16 Jun. 2021
You should not use syms, because we the FDM idiscretizes the domain, and the solution is numerical (not symoblic).
Moreover, it is not clear what is the upper boundary condtions!
Mainly, this is solution at all points except the boundardies
for i=2:n-1
T(i)=(alp)*(T(i+1)-2*T(i)+T(i-1))+g;
end
insulated means
T(1) = 0;
what is the value in the upper bound, just put it here
T(n) =
Bjorn Gustavsson
am 16 Jun. 2021
Insulated surely means that there is no heat-flux at that end, not that the absolute temperature is zero (which is a rather unphysical assumption)
SALAH ALRABEEI
am 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.
amena zainab
am 16 Jun. 2021
Bearbeitet: amena zainab
am 16 Jun. 2021
Antworten (0)
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
