I am working on an assignment where I am determining the temperature distribution of a chip on a substrate. When I decrease the nodal spacing the results change drastically. The smaller the nodal spacing the larger the temperatures i get. However when the nodal spacing is really small as in .00001m the temperature is nearly 0. Should this happen? What should i look for in the code to possibly remedy this situation? I am using MATLAB.
Ok. Guess I need to add more info. I think the best way to show my equations is to show my code. I am fairly confident about the equations used at each node. I derived them all by hand. When I use a nodal spacing, delta of 0.003 I get really low temperatures. At a delta of 0.001 I get reasonable temperatures. I think think the reason is that at 0.003 meters there are not enough node with heat generation.
%**********************************************
%--------Thermo Lab Numerical Project---------|
%-----------------Paul Fjare------------------|
%**********************************************
clear; clc
%Cooling of a silicon chip mounted in a dielectric
%substrate.
ks=5; % W/m-K
kc=50;
ksc=(ks+kc)/2;
h=500; % W/m^2-K
qgen=10^7; %W/m^3
L=.027; % meters
H=.012;
Tamb=293.15; % temperature of coolant in Kelvin
delta=.003; % meters
N=100000; %iterations
B=h*delta/ks; %dimensionless
sectionL=L/3;
sectionH=H/4;
%Determine size of matrix
cols = round(L/delta + 1) % Columns
rows = round(H/delta + 1) % Rows
sectioncols=round(sectionL/delta+1)
sectionrows=round(sectionH/delta+1)
% Build beginning zeros matrix from size above
T = zeros([rows,cols]);
%T=80*ones([rows,cols]);
for i=1:N
% 4 nodes conduction no heat gen
for m = sectionrows+1:rows-1
for n = 2:cols-1
T(m,n) = 0.25 *(T(m,n+1) + T(m,n-1) + T(m+1,n) + T(m-1,n));
end
end
%upper space between the chip and walls
%left
for m=2:sectionrows
for n=2:sectioncols-1
T(m,n)=0.25 *(T(m,n+1) + T(m,n-1) + T(m+1,n) + T(m-1,n));
end
end
%right
for m=2:sectionrows
for n=2*sectioncols:cols-1
T(m,n)=0.25 *(T(m,n+1) + T(m,n-1) + T(m+1,n) + T(m-1,n));
end
end
%------chip------
%top
for n=sectioncols+1:2*sectioncols-2
T(1,n)=(T(m,n-1)+T(m,n+1)+2*T(m+1,n)+qgen*delta^2/kc+2*h*delta/kc)/(4+2*h*delta/kc);
end
%top corners
for n=sectioncols
T(1,n)=(ks*T(1,n-1)+kc*T(1,n+1)+ksc*T(2,n)+2*qgen*delta^2/4+2*h*delta*Tamb)/(ks+kc+ksc+2*h*delta);
end
for n=2*sectioncols-1
T(1,n)=(ks*T(1,n+1)+kc*T(1,n-1)+ksc*T(2,n)+2*qgen*delta^2/4+2*h*delta*Tamb)/(ks+kc+ksc+2*h*delta);
end
%bottom and bottom corners
for m=sectionrows
for n=sectioncols+1:2*sectioncols-2
T(m,n)=(ks*T(m+1,n)+ksc*(T(m,n+1)+T(m,n-1))+kc*T(m-1,n)+qgen*delta^2/2)/(ks+2*ksc+kc);
end
%bottom corners
for n=sectioncols
T(m,n)=(ks*T(m,n-1)+ks*T(m+1,n)+ksc*T(m,n+1)+ksc*T(m-1,n)+qgen*delta^2/4+h*delta*Tamb)/(ks+2*ksc+ks+delta*h);
end
for n=2*sectioncols-1
T(m,n)=(ks*T(m,n+1)+ks*T(m+1,n)+ksc*T(m,n-1)+ksc*T(m-1,n)+qgen*delta^2/4+h*delta*Tamb)/(ks+2*ksc+ks+delta*h);
end
end
if sectionrows>2
for m=2:sectionrows-1
for n=sectioncols+1:2*sectioncols-2
T(m,n) = 0.25 *(T(m,n+1) + T(m,n-1) + T(m+1,n) + T(m-1,n)+qgen*delta^2) ;
end
end
end
%chip sides
if sectionrows>2
for m=2:sectionrows-1
for n=2*sectioncols-1
T(m,n)=(ks*T(m,n+1)+ksc*(T(m+1,n)+T(m-1,n))+kc*T(m,n-1)+qgen*delta^2/2)/(ks+2*ksc+kc);
end
for n=sectioncols
T(m,n)=(ks*T(m,n-1)+ksc*(T(m+1,n)+T(m-1,n))+kc*T(m,n+1)+qgen*delta^2/2)/(ks+2*ksc+kc);
end
end
end
%------end of chip-----
%top of substrate between chip and walls
%left
for n=2:sectioncols-1
T(1,n)=(T(1,n-1)+T(1,n+1)+2*T(1+1,n)+2*h*delta/ks)/(4+2*h*delta/ks);
end
%right
for n=2*sectioncols:cols-1
T(1,n)=(T(1,n-1)+T(1,n+1)+2*T(1+1,n)+2*h*delta/ks)/(4+2*h*delta/ks);
end
%upper left corner of substrate: node 1,1
T(1,1)=(T(1,2)+T(2,1)+Tamb*B)/(2+B);
%upper right corner of substrate: node 1,cols
T(1,cols)=(T(1,cols-1)+T(2,cols)+Tamb*B)/(2+B);
%left side of substrate
for m=2:rows-1
T(m,1)=(T(m-1,1)+T(m+1,1)+2*T(m,2))/4;
end
%right side of substrate
for m=2:rows-1
T(m,cols)=(T(m-1,cols)+T(m+1,cols)+2*T(m,cols-1))/4;
end
%lower left corner: node 5,1
T(rows,1)=(T(rows-1,1)+T(rows,2))/2;
%lower right corner: node 5,10
T(rows,cols)=(T(rows-1,cols)+T(rows,cols-1))/2;
%bottom of substrate
for n=2:cols-1
T(rows,n)=(T(rows,n-1)+T(rows,n+1)+2*T(rows-1,n))/4;
end
end
T=T; %temperature distribution in Kelvin
TC=T-273.15 %temperature distribution in degrees Celsius
A picture of the physical situation is shown below.