Solving Heat equation using pdepe does not give credible results
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am using pdepe to solve an heat equation, (the end goal being to simulate a fiber splicer and get the power input necessary). To create the interaction fiber to air (air heated by the graphite filament) I considered the following equation for my fiber (m=1, cylinder) :
function[c,f,s]=pdefun(x,t,u,DuDx)
ro=123.218;
C=281;
lambda=1.7;
alpha=ro*C/lambda;
c=alpha;
f=DuDx;
s=0;
end
And the boundary conditions to get heat from air to the fiber are :
function[pl,ql,pr,qr]=bcfun(xl,ul,xr,ur,t)
h=25;
R=2;
k=5;
Ts=300;%%fiber
Tf=350;%%air
pl=0;
ql=1;
pr=(h/k)*(Ts-Tf);
qr=1;
end
The initial conditions of the fiber being
function u0=icfun(x)
u0=300;
end
My problem is that when used at my fiber dimensions (270µm of diameter), I get a fiber temperature rising above the air temperature. I guess I forgot a term leading to stabilization of my sytem?
m=1;
xmesh=linspace(0,270E-6,270);
tspan=linspace(0,2,50);
sol=pdepe(m,@pdefun,@icfun,@bcfun,xmesh,tspan);
u=sol(:,:,1);
figure();
surf(xmesh,tspan,u);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1176978/image.jpeg)
The lack of visible variations on the x axe is only because of the size of my fiber (when I change xmesh I get the expected x variations).
I also get the same problem when I add a pvol term (s~=0 for pdepe model equation). Leading to absurdly low amount of power needed for the filament to generate high temperature (Code below).
%% m=0 because I chose to unroll it
function[c,f,s]=pdefunfilament(x,t,u,DuDx)%%equation for the filament
global PowerFil
ro=2.3E3;
C=720;
lambda=120;
alpha=ro*C/lambda;
c=alpha;
f=DuDx;
s=PowerFil/9E-9;%%(R*I^2)/dtau (dtau volume)
end
function u0=icfunfilament(x)%%initial conditions
u0=300;
end
function[pl,ql,pr,qr]=bcfunfilament(xl,ul,xr,ur,t)%%boundary conditions
pl=0;
ql=1;
pr=0;
qr=1;
end
For this kind of code I get results like this :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1176983/image.jpeg)
Does anyone has an idea of where my pdepe model did go wrong?
2 件のコメント
Walter Roberson
2022 年 11 月 2 日
編集済み: Walter Roberson
2022 年 11 月 2 日
Pure black output from surf() typically means that edges are dense enough that they have taken over the display (since they are constant screen width no matter what magnification being used.)
m=1;
xmesh=linspace(0,270E-6,270);
tspan=linspace(0,2,50);
sol=pdepe(m,@pdefun,@icfun,@bcfun,xmesh,tspan);
u=sol(:,:,1);
figure();
surf(xmesh,tspan,u, 'edgecolor', 'none');
colorbar()
min(u(:)), max(u(:))
function[c,f,s]=pdefun(x,t,u,DuDx)
ro=123.218;
C=281;
lambda=1.7;
alpha=ro*C/lambda;
c=alpha;
f=DuDx;
s=0;
end
function[pl,ql,pr,qr]=bcfun(xl,ul,xr,ur,t)
h=25;
R=2;
k=5;
Ts=300;%%fiber
Tf=350;%%air
pl=0;
ql=1;
pr=(h/k)*(Ts-Tf);
qr=1;
end
function u0=icfun(x)
u0=300;
end
採用された回答
Torsten
2022 年 11 月 2 日
編集済み: Torsten
2022 年 11 月 2 日
m=1;
xmesh=linspace(0,270E-6,270);
tspan=linspace(0,2,50);
sol=pdepe(m,@pdefun,@icfun,@bcfun,xmesh,tspan);
u=sol(:,:,1);
figure();
surf(xmesh,tspan,u, 'edgecolor', 'none');
function[c,f,s]=pdefun(x,t,u,DuDx)
rho = 123.218;
cp = 281;
lambda = 1.7;
c = rho*cp;
f = lambda*DuDx;
s = 0;
end
function [pl,ql,pr,qr] = bcfun(xl,ul,xr,ur,t)
alpha = 5;
Tf = 350;%%air
pl = 0;
ql = 1;
pr = alpha*(ur-Tf);
qr = 1;
end
function u0=icfun(x)
u0 = 300;
end
4 件のコメント
Torsten
2022 年 11 月 3 日
But you defined k = 5 and lambda = 1.7 ...
But you know now about the boundary condition setup.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Thermal Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!