Solving a PDE using PDE Toolbox
1 回表示 (過去 30 日間)
古いコメントを表示
This problem invoves an inner pipe with a constant wall temp, an annular space with conduction only, and an insulated outer pipe (no heat transfer)
I'm trying to solve the following Partial Differental Equation as my Governing Equation:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376394/image.png)
Initial Condition:
@ t = 0s, T = 573 K (uniformly distributed)
Boundary Conditions:
@ r = ri, T = 673 K (constant)
@ r = ro, dT/dr = 0 (insulated end)
This is my first time using pdepe, any help would be appreciated.
I'd like to be able to plot (Temperature vs time) for varying points between the inner and outer radii.
0 件のコメント
採用された回答
Torsten
2023 年 5 月 6 日
編集済み: Torsten
2023 年 5 月 6 日
C.ri = 0.0125;
C.ro = 0.0375;
C.alpha = 1.905*10^-5;
C.Ti = 673;
C.T0 = 573;
r = linspace(C.ri,C.ro,50);
t = linspace(0,2000,2001);
m = 1;
eqn = @(r,t,T,dudx)heatcondPDE(r,t,T,dudx,C);
ic = @(r)heatcondPDE_IC(r,C);
bc = @(rl,Tl,rr,Tr,t)heatcondPDE_BC(rl,Tl,rr,Tr,t,C);
sol = pdepe(m,eqn,ic,bc,r,t);
T = sol(:,:,1);
plot(r,[T(1,:);T(5,:);T(10,:);T(20,:);T(30,:);T(40,:);T(80,:)])
grid on
function T0 = heatcondPDE_IC(r,C)
if r == C.ri
T0 = C.Ti;
else
T0 = C.T0;
end
end
function [c, f, s] = heatcondPDE(r,t,T,dudx,C)
c = 1;
f = C.alpha *dudx;
s = 0;
end
function [pl,ql,pr,qr] = heatcondPDE_BC(rl,Tl,rr,Tr,t,C)
pl = Tl - C.Ti;
ql = 0;
pr = 0;
qr = 1;
end
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!