ABSTRACT (original article): The present paper describes how to apply the Chebyshev orthogonal collocation technique to solve steady-state and unsteady-steady two-dimensional problems. All problems are solved using one single computer algebra, Mathematica©. The problems include: (1) steady-state heat transfer in a rectangular bar, (2) steady-state flow in a rectangular duct, (2) steady-state heat transfer in a cooling cylindrical pin fin, (4) steady-state heat conduction in an annulus, (5) unsteady-state heat transfer in a rectangular bar, and finally (6) unsteady-state diffusion reaction system. Whenever possible the results obtained with orthogonal collocation are compared to the analytical solution in order to validate the applied numerical technique. CITATION (original article): Binous, H., Kaddeche, S., & Bellagi, A. (2015). Solving two-dimensional chemical engineering problems using the chebyshev orthogonal collocation technique. In Computer Applications in Engineering Education (Vol. 24, Issue 1, pp. 144–155). Wiley. DOI: https://doi.org/10.1002/cae.21680
In electronic systems, a fin is a heat sink or a passive heat exchanger that cools a device by dissipating heat into the surrounding medium (e.g. air). This diagram shows a cylindrical pin fin, used to maximize heat transfer to a fluid between two walls: ​​
The walls are at a high temperature
T
w
. The fluid flowing over the pin has a free stream temperature
T
∞
. The heat transfer coefficient between the pin wall and the surrounding medium is labeled
h
(in
W/
2
m
K
). If one introduces the dimensionless temperature
ϕ=
T-
T
∞
T
w
-
T
∞
, the governing equation is:​​
1
r
∂
∂r
r 
∂ϕ
∂r
+
2
∂
ϕ
∂
2
z
=0
,​with
0≤r≤
r
0
and
0≤z≤L
.
The associated boundary conditions are then:​​
∂ϕ
∂z
z=0
=0
(axial symmetry condition),​
∂ϕ
∂r
r=0
=0
(radial symmetry condition),​
∂ϕ
∂r
+
h
k
ϕ
r=
r
0
=0
(continuity of heat flux at the boundary fin/surrounding air), and​
ϕ(z=L)=
ϕ
w
=1
(constant temperature at the wall),​where
k (W/m K)
is the thermal conductivity of the cylindrical pin fin and
r
0
=1
.
We plot the contours of the dimensionless temperature for a Biot number, Bi=1. This solution is based on Chebyshev orthogonal collocation with
N=41
collocation points. The analytical solution of the differential equation obtained by separation of variables [2] is given by:​​
ϕ=
∞
∑
n=1
2 
B
i
 
J
0
(
λ
n
 r)cosh(
λ
n
 z)
cosh(
λ
n
 L)
J
0
(
λ
n
r
0
)
2
(
λ
n
r
0
)
+
2
B
i

,​where
B
i
=
h 
r
0
k
is the Biot number and
λ
n
are the zeros of the nonlinear function:
f(λ)=(λ 
r
0
)
J
1
(λ 
r
0
)-
J
0
(λ 
r
0
) 
B
i
. These roots are reported in Table 3 of Ref. 2 and could be obtained using Wagon’s graphical method (see Ref. 3).​​
​​We find good agreement between our numerical solution and the analytical solution plotted in Ref. 2. ​Finally, we find excellent agreement between contour plots obtained using Mathematica and Python.
Parameters of the problem reproduced from Ref . 2.
In[]:=
r0=1;Bi=1(*Biotnumber*);
Numerical solution based on Orthogonal Collocation and the Gauss - Lobatto nodes
Derivative Matrices constructed using 41 Gauss - Lobatto collocation points
In[]:=
Np=40;​​Ds=Table[d[i,j],{i,0,Np},{j,0,Np}];​​d[0,0]=(2Np^2+1)/6//N;​​d[Np,Np]=-(2Np^2+1)/6//N;​​d[i_,i_]:=-y[i]/(2(1-y[i]^2));​​y[i_]:=Cos[iPi/Np]//N;​​d[j_,k_]:=If[j≠k,c[j](-1)^(j+k)/(c[k](y[j]-y[k]))];​​c[i_]:=If[i0||iNp,2,1];​​Dsq=Ds.Ds;
In[]:=
L2a=4KroneckerProduct[Dsq,IdentityMatrix[Np+1]];L2b=4KroneckerProduct[IdentityMatrix[Np+1],Dsq];​​Lbc1=2KroneckerProduct[IdentityMatrix[Np+1],Ds];​​Lbc2=2KroneckerProduct[Ds,IdentityMatrix[Np+1]];
Governing equations
In[]:=
x=Table[r0/2(1+y[i]),{i,Np,0,-1}];
In[]:=
U=Table[u[i+(j-1)(Np+1)],{j,1,Np+1},{i,1,Np+1}]//Flatten;
In[]:=
Eq[i_]:=L2a[[i]].U+L2b[[i]].U-1/x[[Quotient[i-1,Np+1]+1]]Lbc2[[i]].U0;
In[]:=
bc1=Table[Lbc1[[1+(j-1)(Np+1)]].U0,{j,1,Np+1}];​​bc2=Table[Lbc2[[i+Np(Np+1)]].UBi/r0u[i+Np(Np+1)],{i,2,Np}];​​bc3=Table[Lbc2[[i]].U0,{i,2,Np}];
In[]:=
sys=Join[{bc1,bc2,bc3,Table[u[Np+1+(j-1)(Np+1)]1,{j,1,Np+1}],Table[Eq[i+(j-1)(Np+1)],{j,2,Np},{i,2,Np}]}]//Flatten;
In[]:=
initguess=Flatten[Table[{u[i+(j-1)(Np+1)],0.5},{j,1,Np+1},{i,1,Np+1}],1];
Solution using FindRoot
In[]:=
sol=Quiet@FindRoot[sys,initguess];
Contour plot of the solution
In[]:=
a=Flatten[Table[{x[[i]],x[[j]],u[i+(j-1)(Np+1)]/.sol},{j,1,Np+1},{i,1,Np+1}],1];f=Interpolation[a,InterpolationOrder3];
In[]:=
p1=ContourPlot[f[x1,y1],{x1,0,r0},{y1,0,r0},ContoursTable[0.05i,{i,1,20,1}],PlotPoints100,ImageSize{400,400},FrameLabel{Style["x",Italic,16],Style["y",Italic,16]},PlotLegendsAutomatic,ColorFunction"Rainbow",PlotRange->{{0,1},{0,1}}]
Out[]=
In[]:=
p1=ContourPlot[f[x1,y1],{x1,0,r0},{y1,0,r0},ContoursTable[0.05i,{i,1,20,1}],PlotPoints100,ImageSize{400,400},FrameLabel{Style["x",Italic,16],Style["y",Italic,16]},PlotLegendsAutomatic,ContourStyle->Table[{Dashed,Darker@Red,Thick},{i,1,20,1}],ContourShading->None,PlotRange->{{0,1},{0,1}}]
Out[]=
Bennett' s solution + our numerical solutions superimposed on the same plot

References

◼
  • [1] H. Binous, S. Kaddeche and A. Bellagi, Solving two-dimensional chemical engineering problems using the chebyshev orthogonal collocation technique, Computer Applications in Engineering Education, 24(1), pp. 144-155, 2016. https://onlinelibrary.wiley.com/doi/abs/10.1002/cae.21680
  • ◼
  • [2] T. Bennett, Transport by Advection and Diffusion, New York: Wiley, 2012.
  • ◼
  • [3] S. Wagon, Mathematica in action: Problem solving through visualization and computation, 3rd ed. Springer-Verlag, Berlin, 2010.
  • CITE THIS NOTEBOOK

    Cooling by a cylindrical pin fin​
    by Housam Binous and Ahmed Bellagi
    Wolfram Community, STAFF PICKS, March 24, 2024
    ​https://community.wolfram.com/groups/-/m/t/3146557