Solving Heat Transfer problem using Finite Difference
古いコメントを表示
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 件のコメント
SALAH ALRABEEI
2021 年 6 月 16 日
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
2021 年 6 月 16 日
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
2021 年 6 月 16 日
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
2021 年 6 月 16 日
編集済み: amena zainab
2021 年 6 月 16 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
