필터 지우기
필터 지우기

Solving a PDE using PDE Toolbox

조회 수: 3 (최근 30일)
Tony Stianchie
Tony Stianchie 2023년 5월 6일
댓글: Tony Stianchie 2023년 5월 6일
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:
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.

채택된 답변

Torsten
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개)

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by