pde boundary conditions

2 views (last 30 days)
Shaun
Shaun on 11 May 2012
I want to solve:
dT/dt = 1/r*d/dr(r*dT/dr) with T(t,0)=T(t=1)=1 and T(0,r)=k
I have written this code, but am getting stuck with the boundary conditions:
function [c,f,s] = pdefun(r,t,T,dTdr)
c = 1;
f = dTdr;
s = 0;
function [T0] = icfun(r)
%icfun
T0 = k
function [pl,ql,pr,qr] = bcfun(rl,Tl,rr,Tr,t)
%bcfun
pl = ?;
ql = ?;
pr = Tr-1;
qr = 0;
What do I need to write in the ? spots?
Thanks
Shaun

Answers (0)

Community Treasure Hunt

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

Start Hunting!