Professional Documents
Culture Documents
2.1 Introduction
It is very important to compare results obtained by use of softwares with standard results. In last
report we had taken problem and solved it by using analytical solution and by using finite
difference method (i.e computationally). In this report same problem is taken and modelled in
Ansys. All the boundary conditions are kept same. The results obtained by this analysis are
compared with previous analytically and computationally obtained results.
T2
1000 (degree C)
T1
200 (degree C)
[Figure 1]
Steady state two dimensional heat conduction does not depends on matrial selection so it is
unimportant to set material for this analysis.
Mesh genration on the above domain needed to be verified on five aspects, these are as follows:
1. Aspect Ratio : Aspect ratio is used to maximum ratio of height and width of a cell for a
given mesh. A mesh consisting most of the cell of aspect ratio near 1 is considered good.
2. Skewness : Skewness refers to angle between to adjecent sides of a cell of given mesh. A
mesh is considered good if it have minimum skewness or orthogonal cell bounderies.
3. Jacobian Ratio, cell volume check also need to be done.
Finally the analysis was done after checking all these parameters. In order to terminate the
iteration tolerance was set to 10^-6.
2.4 Results
The comparision of temperatures obtain from different methodologies is in figure
[Figure 2]
[ Figure 3]
[Figure 4]
[Figure 5]
[Figure 6]
2.5 Discussions
As shown in the figure all the three methodologies are giving nearly same resullts. If number of
nodes were taken less than 20*20 than there was significant deviation of results obtained by
these methdologies whereas increasing number of nodes more than 20*20 resulted very less
significant deviation in these graphs.
Matlab code is mensioned in Appendix. It was used to generate analytical and numerical data
whereas Ansys data was generated by avilable option Write to file in Ansys Fluent
environment.
2.6 References
A. Fundamentals of Heat and Mass Transfer by THEODORE L. BERGMAN
B. Anderson J D Computational-Fluid-Dynamics-the-Basics-With-Applications
Appendix
clc
clear
%%%
L=5;
W=5;
n_of_interval_x=20;% intervals
n_of_interval_y=20;
nx=n_of_interval_x +1;% Nodes in x
ny=n_of_interval_y +1;% Nodes in y
T1=200;
T2=1000;
INFINITE_approximation=220;
format short
%
%
Boundary Conditions
T=zeros(ny,nx);
T(1:end,1)=T1;
T(1:end,end)=T1;
T(1,2:end-1)=T2;
T(end,2:end-1)=T1;
T_true=T;
%
PRE PROCESSING
dx=L/n_of_interval_x;
dy=W/n_of_interval_y;
N=(nx-2)*(ny-2);% Total unknowns
K=zeros(N,N);
B=zeros(N,1);
m=1;
for r=2:ny-1
for c=2:nx-1
if c==nx-1 && r~=2 && r~=ny-1
% Right Intermediate BC
K(m,m)=4;
K(m,m-1)=-1;
K(m,m+(nx-2))=-1;
K(m,m-(nx-2))=-1;
B(m)=T(r,end);
m=m+1;
elseif c==2 && r~=2 && r~=ny-1
% Left Intermediate BC
K(m,m)=4;
K(m,m-1)=-1;
K(m,m+(nx-2))=-1;
K(m,m-(nx-2))=-1;
B(m)=T(r,1);
m=m+1;
else
%Central nodes
K(m,m)=4;
%centre
K(m,m+1)=-1;
%right
K(m,m-1)=-1;
%left
K(m,m+(nx-2))=-1;
%bottom
K(m,m-(nx-2))=-1;
theta_analytical(r,c)=theta_true(m)
;
m=m+1;
end
end
%top
B(m)=0;
%source
m=m+1;
end
end
end
%
SOLVER
%
[LL,UU] = ILU_2(K);
temp=LL\K;
M=temp/UU;
NN=LL\B;
[T_temp] = conjgrad(M,NN);
T_final=UU\T_temp;
% POST PROCESSING %
m=1;
for r=2:ny-1
for c=2:nx-1
T(r,c)=T_final(m);
m=m+1;
end
end
theta=(T-T1)/(T2-T1);
% CODE FOR Analytical Solution %
theta_true=zeros(nx*ny,1);
s=1;
for y=W:-dy:0
for x=L:-dx:0
sum=0;
for
n=1:INFINITE_approximation
% defined earlier
hop=(((1)^(n+1)+1)/n)*(sin(n*pi*x/L))*((si
nh(n*pi*y/L))/(sinh(n*pi*W/L)));
sum=sum+hop;
end
theta_true(s)=(2/pi)*sum;
s=s+1;
end
end