PDE toolbox heat transfer solution

9 views (last 30 days)
I am modeling a rectangular cooling body with the PDE toolbox, and need to keep track of the temperature of the points on the boundary of the body. I thought that by finding where my x and y values are greatest in the point matrix 'p' I could find the node locations of the boundary points, and put those into the solution vector 'u' to find how these points change temperature, quantitatively, through time. However, when I search for the lowest temperatures in the solution vector, they do not match with the node points that I found in my 'p' matrix. I can understand this to a point, because the corner will lose heat faster than the edges, even part way into the body near the corner. However, I am getting values of 200˚ when I should be getting values around 10˚, so it's definitely not sampling the edge, but rather the interior of the body somewhere. Does anyone know the relationship between a node value in the point matrix 'p' and a node value in the solution vector 'u?' The code I used is below:
% p(1,1:2577) is x values of points
% p(2,1:2577) is y values of points
% u(1:2577,1:201) is solution vector for points from time 1 to time 201
bminx=find(p(1,:)==(min(p(1,:))));
bmaxx=find(p(1,:)==(max(p(1,:))));
bminy=find(p(2,:)==(min(p(2,:))));
bmaxy=find(p(2,:)==(max(p(2,:))));
% finds the borders of cooling rectangular body, creates vectors of the node points
% size(bminy) = 41 x 1, same for the other three
borders=unique([bminx,bmaxx,bminy,bmaxy])
% creates vectors of all node points, deleting any replicates. There are only 4 replicates, because each corner of the rectangle is counted twice.
% size(borders)= 160 x 1
Thus u(borders,201) should give me the 160 lowest temperatures for the cooling body, since the only heat flow is from the body to the significantly cooler boundaries. But it doesn't, and when I find the 160 lowest temperatures for the cooling body by using
find(u(:,201)<50)
the node points it gives are significantly different from those that I calculated should comprise the border. I can't find any relationship between the two, and am at a loss for how they related, but would like to know how this works. Any input would be great, thanks!

Accepted Answer

Bill Greene
Bill Greene on 7 Apr 2012
>Does anyone know the relationship between a node value in the point matrix 'p' and a node value in the solution vector 'u?
The ith column in p corresponds to the ith row in u (for the scalar PDE case which I assume is what you have).
I suggest that you turn on the "Show Node Labels" option in the Mesh menu of pdetool, run an analysis, and do a color plot of the result. You should be able to (roughly) compare the plotted results with those in the u-vector for specific node numbers.
Bill
  1 Comment
Dan
Dan on 8 Apr 2012
Thanks Bill. You're right, the ith column in p does correspond to the ith row in u. I was thinking the boundary points would all have to be the coolest in the system, but some interior points near the corners were cooler than boundary points in the middle of the edges. Showing node labels was a good idea, and helped. Thanks!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!