0% found this document useful (0 votes)
56 views

Numerical Simulation of Laplace Equation Using CPP

The document describes numerical simulation of the Laplace equation using C++ to model heat transfer. It includes: 1) Code to define grid points and boundary conditions, calculate temperature distributions using Gauss-Seidel iteration and time marching, and compare to analytical solutions. 2) Results showing it took 1076 time steps to reach steady state with an error of 0.0099, and temperature values at different grid points calculated using the three methods. 3) Tables and plots of the temperature distributions.

Uploaded by

Ashline
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Numerical Simulation of Laplace Equation Using CPP

The document describes numerical simulation of the Laplace equation using C++ to model heat transfer. It includes: 1) Code to define grid points and boundary conditions, calculate temperature distributions using Gauss-Seidel iteration and time marching, and compare to analytical solutions. 2) Results showing it took 1076 time steps to reach steady state with an error of 0.0099, and temperature values at different grid points calculated using the three methods. 3) Tables and plots of the temperature distributions.

Uploaded by

Ashline
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Numerical simulation of laplace

equation using C++

Code in C++:
#include<iostream>
#include<math.h>
#include<fstream>
using namespace std;
int L=1;
int H=2;
double dx=0.05;
double dy=dx;
int nx=21;int ny=41; //No of grid points
double T1=100;
double T2=0; //since T2=T3=T4=0 only declaring T2=0
double pi=3.14159;
int main()
{
ofstream Tnum,Tactual,Tmarch,Table; /* for storing the data in excel sheet, Tnum for
Gauss seidel value Tactual for
analytical value, Tmarch for Time marching
and Table for required table at question 1 */
Tnum.open("Tnum.csv");
Tactual.open("Tact.csv"); // opening the excel files
Tmarch.open("Tmarch.csv");
Table.open("Table.csv");
double temp;
double er,err,a,b; //er for gauss siedel error and err for time marching error
int i,j,k,t,n; /* t as the time level no and n for the no used in analytical formula
k for required step for gauss seidel */
k=0;
double x[50],y[50]; // x and y for each grid points
double beta=dx/dy;
double T[50][50],Tpr[50][50],Tact[50][50],Tmpr[50][50],Tmar[50][50];
/* 2d arrays T for gauss siedel
Tpr for storing previous step value in
gauss seidel , Tact for analytical value,
Tmar for time marching value and Tmp r for previous timestep value
*/
for( j = 0; j < ny; j++)
{
T[j][0]=T2; //boundary condition at x=0 and x=l
T[j][nx-1]=T2;
}
for( i = 1; i < nx-1; i++)
{
T[0][i]=T1;
Tact[0][i]=T1;
Tmar[0][i]=T1; //boundary condition at y=0 and y=H
Tmpr[0][i]=T1;
T[ny-1][i]=T2;
}
// Ques 1> gauss seidel temperature distribution
do
{
er=0;
for( j = 1; j < ny-1; j++)
{
for( i = 1; i < nx-1; i++)
{
Tpr[j][i]=T[j][i];
T[j][i]=(T[j][i+1]+T[j][i-1]+beta*beta*(T[j+1][i]+T[j-1][i]))/(2*(1+beta*beta));
er=er+abs(Tpr[j][i]-T[j][i]); /* calculating the sum of errors between
two successive step for each grid points */
}
}
k++;
}while(er>0.01); //maximum error as 0.01 when err is less than that it wiil come out of
loop
cout<<"required no of step for Gauss seidel temperature distribution ="<<k<<endl;
// ques 2 for analytical solution
for( j = 1; j < ny-1; j++)
{
y[j]=j*dy; // obtaining y value at every vertical grid
for( i = 1; i < nx-1; i++)
{
x[i]=i*dx;
for( n = 1; n <111; n++)
{
a=(1-pow(-1,n))/(n*pi);
b =sin(((n*pi*x[i])/L));
Tact[j][i]=(Tact[j][i]+T1*2*a*b*(sinh((n*pi*(H-y[j]))/L)/sinh((n*pi*H)/L)));
}
}
}
// QUes 3 for time marching steady stae temperature
do
{
err=0;
for( j = 1; j < ny-1; j++)
{
for( i = 1; i < nx-1; i++)
{
Tmar[j][i]=(Tmpr[j][i+1]+Tmpr[j][i-1]+Tmpr[j+1][i]+Tmpr[j-1][i])/4;
err=err+abs(Tmar[j][i]-Tmpr[j][i]);
}
}
for( j = 0; j < ny; j++)
{
for( i = 0; i < nx; i++)
{
Tmpr[j][i]=Tmar[j][i]; // storing the previous time step value
}
}
t++;
}while(err>0.01);
cout<<"required time step ="<<t<<"\t"<<"minimized error ="<<err<<endl;
// Now storing the data in excel sheet
for( j = 0; j <ny; j++)
{
for( i = 0; i < nx; i++)
{
Tnum<<T[j][i]<<",";
Tactual<<Tact[j][i]<<",";
Tmarch<<Tmar[j][i]<<",";
}
Tnum<<"\n";
Tactual<<"\n";
Tmarch<<"\n";
}
Tactual.close();
Tnum.close();
Tmarch.close();
// storing the table in excel
Table<<"i"<<","<<"j"<<","<<"T<Gauss seidel>"<<","<<"T<time
marching>"<<","<<"T<analytical>"<<"\n";
for( j = 0; j < ny; j++)
{
Table<<11<<","<<j+1<<","<<T[j][10]<<","<<Tmar[j][10]<<","<<Tact[j][10]<<"\n";
}
Table.close();
return 0;
}

required time step =1076 minimized error =0.00995069


Table for Temperature distribution at i=11:
I j T<Gauss T<time T<analytical>
seidel> marching>
11 1 100 100 100
11 2 90.0007 90.0005 90.0408
11 3 80.2503 80.2501 80.3209
11 4 70.9661 70.9657 71.0521
11 5 62.3119 62.3113 62.3981
11 6 54.3908 54.3901 54.4661
11 7 47.2499 47.249 47.3078
11 8 40.8905 40.8896 40.9293
11 9 35.282 35.2809 35.3028
11 10 30.3728 30.3716 30.3783
11 11 26.1008 26.0995 26.0944
11 12 22.3998 22.3984 22.3846
11 13 19.2042 19.2026 19.183
11 14 16.4518 16.4502 16.427
11 15 14.0858 14.0841 14.059
11 16 12.0547 12.0529 12.0272
11 17 10.3128 10.311 10.2857
11 18 8.82014 8.81823 8.79395
11 19 7.54165 7.5397 7.51683
11 20 6.447 6.44502 6.42381
11 21 5.50994 5.50795 5.48851
11 22 4.70785 4.70585 4.68822
11 23 4.02126 4.01927 4.00343
11 24 3.43344 3.43147 3.41734
11 25 2.93003 2.92809 2.91558
11 26 2.4987 2.4968 2.48581
11 27 2.12887 2.12703 2.11743
11 28 1.81147 1.8097 1.80136
11 29 1.53868 1.53699 1.5298
11 30 1.30381 1.30222 1.29605
11 31 1.10107 1.09958 1.09434
11 32 0.925476 0.924099 0.919676
11 33 0.772697 0.771445 0.767749
11 34 0.638972 0.637853 0.634801
11 35 0.521006 0.520028 0.517547
11 36 0.415889 0.415061 0.413089
11 37 0.321031 0.320358 0.318843
11 38 0.234092 0.23358 0.232481
11 39 0.152926 0.152582 0.151866
11 40 0.075532 0.075358 0.075006
11 41 0 0 0
Fig : Temperature distribution using Gauss seidel
method

Fig : Temperature distribution using analytical method


Fig : Temperature distribution for time marching at
steady state
0 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 0
0 49.7374 69.2355 78.2547 83.0528 85.8775 87.6465 88.7798 89.4869 89.8762 90.0007 89.8762 89.4869 88.7798 87.6465 85.8775 83.0528 78.2547 69.2355 49.7374 0
0 29.7141 48.9498 60.7306 68.079 72.8107 75.9287 77.9858 79.2914 80.0173 80.2503 80.0173 79.2915 77.9859 75.9287 72.8107 68.079 60.7307 48.9499 29.7141 0
0 20.1692 36.1191 47.639 55.7217 61.3577 65.2717 67.9434 69.6758 70.6511 70.9661 70.6511 69.6758 67.9435 65.2718 61.3577 55.7217 47.6391 36.1192 20.1692 0
0 14.8435 27.7185 37.9847 45.811 51.6266 55.8571 58.8403 60.8174 61.9453 62.3119 61.9453 60.8174 58.8404 55.8572 51.6267 45.8111 37.9848 27.7185 14.8435 0
0 11.4863 21.9267 30.7704 37.9111 43.4808 47.6898 50.7435 52.808 54.0008 54.3908 54.0008 52.808 50.7435 47.6898 43.4808 37.9112 30.7704 21.9267 11.4863 0
0 9.17495 17.7316 25.2589 31.5824 36.6955 40.6778 43.6359 45.6704 46.859 47.2499 46.8591 45.6705 43.6359 40.6778 36.6956 31.5824 25.2589 17.7317 9.17498 0
0 7.48189 14.5661 20.9511 26.464 31.0412 34.6899 37.452 39.3788 40.5151 40.8905 40.5152 39.3788 37.452 34.6899 31.0413 26.4641 20.9511 14.5661 7.48192 0
0 6.18653 12.0998 17.5154 22.2813 26.3155 29.5885 32.1033 33.8777 34.9323 35.282 34.9323 33.8778 32.1033 29.5886 26.3156 22.2814 17.5154 12.0998 6.18655 0
0 5.16443 10.1312 14.7293 18.8305 22.3511 25.2455 27.495 29.0966 30.0542 30.3728 30.0543 29.0966 27.4951 25.2456 22.3511 18.8305 14.7294 10.1312 5.16446 0
0 4.34003 8.53121 12.4403 15.9601 19.0128 21.5475 23.5347 24.9594 25.8154 26.1008 25.8154 24.9594 23.5347 21.5476 19.0129 15.9602 12.4404 8.53127 4.34006 0
0 3.66447 7.21335 10.5406 13.5569 16.1925 18.3971 20.1369 21.3908 22.1471 22.3998 22.1471 21.3909 20.1369 18.3972 16.1926 13.557 10.5407 7.21341 3.6645 0
0 3.10451 6.11709 8.952 11.5345 13.8033 15.7115 17.2249 18.3201 18.9825 19.2042 18.9825 18.3201 17.2249 15.7116 13.8034 11.5346 8.95209 6.11716 3.10455 0
0 2.63649 5.19854 7.61584 9.82564 11.7748 13.4208 14.7311 15.6822 16.2587 16.4518 16.2588 15.6823 14.7312 13.4209 11.7749 9.82573 7.61592 5.1986 2.63653 0
0 2.24293 4.42474 6.4872 8.37744 10.0496 11.4659 12.5964 13.419 13.9184 14.0858 13.9184 13.419 12.5965 11.466 10.0497 8.37754 6.48729 4.42481 2.24298 0
0 1.91052 3.77033 5.53082 7.1473 8.5804 9.79685 10.7698 11.479 11.9101 12.0547 11.9101 11.479 10.7699 9.79694 8.58051 7.14741 5.53091 3.7704 1.91056 0
0 1.62882 3.21526 4.71847 6.1006 7.32786 8.37127 9.20714 9.81712 10.1882 10.3128 10.1883 9.81717 9.20722 8.37137 7.32796 6.10071 4.71857 3.21533 1.62887 0
0 1.38954 2.74343 4.02724 5.20882 6.2592 7.15331 7.87037 8.39415 8.71306 8.82014 8.71309 8.39421 7.87045 7.15341 6.25931 5.20892 4.02734 2.74351 1.38958 0
0 1.18591 2.34172 3.43829 4.44826 5.34686 6.11245 6.72695 7.17612 7.44975 7.54165 7.44978 7.17618 6.72703 6.11255 5.34697 4.44837 3.43838 2.3418 1.18595 0
0 1.01238 1.99928 2.93595 3.79912 4.56759 5.22273 5.7489 6.13371 6.36822 6.447 6.36825 6.13377 5.74898 5.22283 4.56769 3.79923 2.93605 1.99935 1.01243 0
0 0.864358 1.70709 2.50716 3.24473 3.90168 4.46203 4.91227 5.24168 5.44247 5.50994 5.4425 5.24173 4.91235 4.46212 3.90179 3.24484 2.50725 1.70716 0.864401 0
0 0.737981 1.45757 2.14089 2.77101 3.33244 3.81148 4.19652 4.47831 4.65012 4.70785 4.65015 4.47837 4.1966 3.81158 3.33255 2.77111 2.14098 1.45765 0.738023 0
0 0.630007 1.24437 1.82784 2.36601 2.84564 3.25498 3.58409 3.82499 3.97189 4.02126 3.97192 3.82505 3.58417 3.25508 2.84574 2.36612 1.82794 1.24444 0.630049 0
0 0.537695 1.06207 1.56014 2.0196 2.42916 2.77877 3.05991 3.26573 3.39125 3.43344 3.39128 3.26578 3.05999 2.77887 2.42926 2.0197 1.56023 1.06214 0.537735 0
0 0.458719 0.906093 1.33106 1.72314 2.07268 2.3711 2.6111 2.78682 2.894 2.93003 2.89403 2.78688 2.61117 2.37119 2.07278 1.72324 1.33115 0.906162 0.458759 0
0 0.391104 0.772547 1.13491 1.46926 1.76736 2.02189 2.22661 2.37652 2.46796 2.4987 2.46799 2.37657 2.22668 2.02197 1.76745 1.46935 1.135 0.772613 0.391142 0
0 0.333162 0.658102 0.966803 1.25165 1.50564 1.72253 1.89699 2.02474 2.10267 2.12887 2.1027 2.02479 1.89705 1.72261 1.50573 1.25175 0.966885 0.658166 0.333198 0
0 0.283453 0.559917 0.822573 1.06495 1.28108 1.46564 1.61411 1.72284 1.78917 1.81147 1.78919 1.72289 1.61417 1.46572 1.28116 1.06504 0.822651 0.559977 0.283488 0
0 0.240746 0.475559 0.698651 0.904524 1.08811 1.24489 1.37102 1.46339 1.51974 1.53868 1.51976 1.46343 1.37108 1.24497 1.08819 0.904605 0.698724 0.475616 0.240778 0
0 0.203983 0.402941 0.591972 0.766417 0.921982 1.05484 1.16172 1.24 1.28775 1.30381 1.28777 1.24004 1.16178 1.05491 0.922057 0.766492 0.59204 0.402994 0.204013 0
0 0.172255 0.340268 0.4999 0.647218 0.778595 0.890797 0.981064 1.04718 1.08751 1.10107 1.08753 1.04721 0.981117 0.890861 0.778665 0.647288 0.499963 0.340317 0.172283 0
0 0.144778 0.285992 0.420163 0.543986 0.654412 0.748724 0.824599 0.880171 0.914075 0.925476 0.914093 0.880206 0.824647 0.748782 0.654476 0.54405 0.42022 0.286037 0.144803 0
0 0.120874 0.238773 0.350793 0.454175 0.546372 0.625116 0.688468 0.734869 0.763178 0.772697 0.763194 0.7349 0.688511 0.625168 0.546429 0.454232 0.350844 0.238813 0.120897 0
0 0.099953 0.197446 0.290078 0.375568 0.45181 0.516927 0.569317 0.607689 0.6311 0.638972 0.631114 0.607716 0.569355 0.516973 0.45186 0.375618 0.290123 0.197481 0.099973 0
0 0.081498 0.160991 0.236521 0.306227 0.368393 0.421489 0.464208 0.495497 0.514586 0.521006 0.514598 0.49552 0.46424 0.421529 0.368437 0.30627 0.236559 0.161021 0.081515 0
0 0.065054 0.128508 0.188799 0.244441 0.294065 0.336449 0.370549 0.395526 0.410764 0.415889 0.410775 0.395545 0.370576 0.336482 0.294101 0.244477 0.188831 0.128533 0.065069 0
0 0.050216 0.099196 0.145735 0.188686 0.226992 0.259709 0.286032 0.305312 0.317075 0.321031 0.317083 0.305327 0.286053 0.259735 0.227021 0.188715 0.145761 0.099217 0.050227 0
0 0.036616 0.072332 0.106267 0.137587 0.165519 0.189376 0.20857 0.222629 0.231207 0.234092 0.231213 0.222641 0.208586 0.189396 0.16554 0.137608 0.106287 0.072347 0.036625 0
0 0.02392 0.047253 0.069422 0.089882 0.108129 0.123714 0.136253 0.145438 0.151041 0.152926 0.151045 0.145446 0.136264 0.123727 0.108143 0.089896 0.069435 0.047263 0.023926 0
0 0.011815 0.023339 0.034288 0.044394 0.053406 0.061104 0.067297 0.071834 0.074601 0.075532 0.074603 0.071837 0.067303 0.061111 0.053413 0.044401 0.034295 0.023344 0.011817 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Temperature distribution for Gauss Seidel


0 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 0
0 49.7382 69.9552 78.7129 83.3101 86.0283 87.7422 88.846 89.5373 89.9187 90.0408 89.9187 89.5373 88.846 87.7422 86.0284 83.3102 78.713 69.9554 49.7388 0
0 28.9976 48.9529 60.9734 68.3156 72.9938 76.0652 78.0903 79.376 80.0912 80.3209 80.0912 79.3761 78.0903 76.0652 72.9938 68.3157 60.9736 48.9532 28.998 0
0 19.7156 35.8854 47.6456 55.8319 61.4898 65.3955 68.0524 69.7723 70.7397 71.0521 70.7397 69.7723 68.0524 65.3955 61.4899 55.832 47.6457 35.8856 19.7159 0
0 14.5922 27.4935 37.8912 45.8216 51.6917 55.9432 58.9312 60.9068 62.0325 62.3981 62.0325 60.9069 58.9312 55.9433 51.6917 45.8217 37.8913 27.4937 14.5925 0
0 11.3429 21.7579 30.6583 37.8709 43.495 47.7367 50.8074 52.8796 54.0753 54.4661 54.0753 52.8796 50.8074 47.7368 43.4951 37.871 30.6584 21.758 11.3431 0
0 9.08821 17.6121 25.1586 31.5244 36.6797 40.6941 43.6734 45.7203 46.9151 47.3078 46.9152 45.7203 43.6734 40.6942 36.6798 31.5245 25.1587 17.6122 9.08836 0
0 7.42633 14.4816 20.8692 26.4047 31.0107 34.6855 37.4676 39.4078 40.5516 40.9293 40.5516 39.4078 37.4677 34.6856 31.0108 26.4047 20.8693 14.4817 7.42645 0
0 6.14906 12.039 17.4503 22.227 26.2793 29.5715 32.1027 33.8891 34.9507 35.3028 34.9507 33.8891 32.1027 29.5716 26.2794 22.227 17.4504 12.0391 6.14916 0
0 5.13799 10.0863 14.6777 18.7827 22.3138 25.2213 27.483 29.0941 30.0578 30.3783 30.0578 29.0941 27.483 25.2213 22.3139 18.7828 14.6778 10.0864 5.13807 0
0 4.32056 8.49704 12.3988 15.9187 18.9767 21.5195 23.5151 24.9468 25.8074 26.0944 25.8074 24.9468 23.5151 21.5196 18.9768 15.9187 12.3989 8.49711 4.32064 0
0 3.64959 7.18653 10.5067 13.5209 16.1585 18.3676 20.1126 21.3713 22.1308 22.3846 22.1308 21.3713 20.1126 18.3676 16.1585 13.5209 10.5067 7.18659 3.64965 0
0 3.09273 6.09542 8.9236 11.5029 13.7716 15.6818 17.1981 18.2962 18.9606 19.183 18.9606 18.2962 17.1981 15.6818 13.7716 11.5029 8.92364 6.09547 3.09278 0
0 2.62688 5.18055 7.59162 9.79768 11.7454 13.3917 14.7032 15.6558 16.2334 16.427 16.2334 15.6558 14.7032 13.3917 11.7455 9.79772 7.59166 5.1806 2.62692 0
0 2.23489 4.40949 6.46622 8.3525 10.0225 11.4379 12.5685 13.3915 13.8914 14.059 13.8914 13.3915 12.5685 11.4379 10.0225 8.35253 6.46625 4.40953 2.23493 0
0 1.90364 3.75716 5.5124 7.12492 8.55537 9.77029 10.7426 11.4515 11.8826 12.0272 11.8826 11.4515 10.7426 9.77031 8.55539 7.12495 5.51242 3.75719 1.90367 0
0 1.62285 3.20373 4.70214 6.08043 7.30485 8.34635 9.18104 9.79038 10.1612 10.2857 10.1612 9.79038 9.18105 8.34637 7.30487 6.08045 4.70217 3.20376 1.62288 0
0 1.38429 2.73325 4.01268 5.1906 6.23812 7.13012 7.84574 8.36862 8.68703 8.79395 8.68704 8.36863 7.84575 7.13014 6.23813 5.19061 4.0127 2.73327 1.38432 0
0 1.18127 2.33267 3.42525 4.4318 5.32761 6.09104 6.70397 7.15211 7.42513 7.51683 7.42514 7.15211 6.70398 6.09105 5.32762 4.43181 3.42526 2.33269 1.18129 0
0 1.00826 1.9912 2.92426 3.78426 4.55006 5.20309 5.72767 6.11139 6.34525 6.42381 6.34525 6.11139 5.72768 5.2031 4.55007 3.78427 2.92427 1.99122 1.00827 0
0 0.860684 1.69987 2.49667 3.23133 3.8858 4.44412 4.8928 5.22112 5.42127 5.48851 5.42127 5.22113 4.89281 4.44413 3.88581 3.23134 2.49668 1.69989 0.860699 0
0 0.734705 1.45113 2.13149 2.75896 3.31809 3.79524 4.1788 4.45954 4.63071 4.68822 4.63071 4.45954 4.17881 3.79525 3.3181 2.75897 2.1315 1.45114 0.734718 0
0 0.627088 1.23862 1.81944 2.35521 2.83273 3.24033 3.56806 3.80797 3.95426 4.00343 3.95427 3.80797 3.56806 3.24033 2.83274 2.35521 1.81945 1.23863 0.627099 0
0 0.535098 1.05695 1.55264 2.00994 2.4176 2.76562 3.04548 3.25039 3.37535 3.41734 3.37535 3.25039 3.04549 2.76562 2.41761 2.00995 1.55265 1.05696 0.535107 0
0 0.456415 0.901545 1.3244 1.71454 2.06236 2.35934 2.59818 2.77307 2.87974 2.91558 2.87974 2.77307 2.59819 2.35934 2.06237 1.71454 1.3244 0.901553 0.456422 0
0 0.389064 0.768519 1.129 1.46162 1.75819 2.01142 2.21511 2.36426 2.45523 2.48581 2.45523 2.36426 2.21511 2.01142 1.75819 1.46162 1.12901 0.768525 0.38907 0
0 0.331362 0.654546 0.961582 1.2449 1.49753 1.71326 1.88679 2.01386 2.09138 2.11743 2.09138 2.01387 1.88679 1.71326 1.49754 1.24491 0.961587 0.654552 0.331367 0
0 0.281871 0.556791 0.817981 1.059 1.27393 1.45747 1.60511 1.71324 1.77919 1.80136 1.77919 1.71324 1.60511 1.45747 1.27393 1.05901 0.817985 0.556795 0.281876 0
0 0.239362 0.472822 0.694628 0.899315 1.08184 1.23772 1.36312 1.45495 1.51097 1.5298 1.51097 1.45496 1.36312 1.23772 1.08185 0.899318 0.694632 0.472826 0.239366 0
0 0.202777 0.400557 0.588466 0.761876 0.916516 1.04858 1.15483 1.23264 1.2801 1.29605 1.2801 1.23264 1.15483 1.04858 0.916519 0.761878 0.588469 0.40056 0.202781 0
0 0.171211 0.338203 0.496863 0.643283 0.773857 0.885373 0.975085 1.04079 1.08087 1.09434 1.08087 1.04079 0.975086 0.885374 0.773859 0.643285 0.496866 0.338206 0.171214 0
0 0.143881 0.284217 0.417552 0.540601 0.650336 0.744055 0.819451 0.874671 0.908355 0.919676 0.908356 0.874672 0.819452 0.744056 0.650338 0.540603 0.417554 0.284219 0.143883 0
0 0.12011 0.237261 0.348568 0.451289 0.542897 0.621135 0.684078 0.730177 0.758297 0.767749 0.758298 0.730177 0.684079 0.621136 0.542898 0.451291 0.348569 0.237263 0.120112 0
0 0.099309 0.196173 0.288204 0.373138 0.448882 0.513573 0.565617 0.603734 0.626986 0.634801 0.626987 0.603735 0.565618 0.513574 0.448884 0.373139 0.288206 0.196174 0.099311 0
0 0.080965 0.159936 0.234968 0.304214 0.365968 0.41871 0.461141 0.492218 0.511176 0.517547 0.511176 0.492219 0.461142 0.41871 0.365969 0.304215 0.234969 0.159937 0.080966 0
0 0.064623 0.127655 0.187542 0.242812 0.292102 0.334199 0.368067 0.392872 0.408003 0.413089 0.408003 0.392872 0.368067 0.3342 0.292103 0.242813 0.187543 0.127656 0.064624 0
0 0.049879 0.09853 0.144754 0.187414 0.225459 0.257951 0.284093 0.303238 0.314918 0.318843 0.314918 0.303239 0.284093 0.257952 0.225459 0.187415 0.144755 0.098531 0.04988 0
0 0.036369 0.071842 0.105545 0.13665 0.16439 0.188082 0.207142 0.221102 0.229618 0.232481 0.229619 0.221103 0.207143 0.188082 0.16439 0.136651 0.105546 0.071842 0.036369 0
0 0.023757 0.04693 0.068946 0.089265 0.107386 0.122863 0.135314 0.144433 0.149996 0.151866 0.149996 0.144433 0.135314 0.122863 0.107386 0.089266 0.068947 0.04693 0.023758 0
0 0.011734 0.023178 0.034052 0.044088 0.053037 0.060681 0.066831 0.071335 0.074082 0.075006 0.074082 0.071335 0.066831 0.060681 0.053038 0.044088 0.034052 0.023179 0.011734 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Temperature distribution using analytical method


0 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 0
0 49.7374 69.2355 78.2547 83.0527 85.8774 87.6464 88.7797 89.4867 89.8761 90.0005 89.8761 89.4867 88.7797 87.6464 85.8774 83.0527 78.2547 69.2355 49.7374 0
0 29.7141 48.9498 60.7305 68.0788 72.8105 75.9285 77.9856 79.2912 80.017 80.2501 80.017 79.2912 77.9856 75.9285 72.8105 68.0788 60.7305 48.9498 29.7141 0
0 20.1691 36.119 47.6389 55.7215 61.3574 65.2714 67.9431 69.6755 70.6507 70.9657 70.6507 69.6755 67.9431 65.2714 61.3574 55.7215 47.6389 36.119 20.1691 0
0 14.8434 27.7184 37.9845 45.8107 51.6263 55.8567 58.8399 60.8169 61.9447 62.3113 61.9447 60.8169 58.8399 55.8567 51.6263 45.8107 37.9845 27.7184 14.8434 0
0 11.4862 21.9265 30.7701 37.9107 43.4803 47.6892 50.7429 52.8074 54.0001 54.3901 54.0001 52.8074 50.7429 47.6892 43.4803 37.9107 30.7701 21.9265 11.4862 0
0 9.17484 17.7314 25.2585 31.5819 36.695 40.6771 43.6352 45.6697 46.8582 47.249 46.8582 45.6697 43.6352 40.6771 36.695 31.5819 25.2585 17.7314 9.17484 0
0 7.48176 14.5658 20.9507 26.4635 31.0406 34.6891 37.4511 39.3779 40.5142 40.8896 40.5142 39.3779 37.4511 34.6891 31.0406 26.4635 20.9507 14.5658 7.48176 0
0 6.18637 12.0995 17.5149 22.2807 26.3148 29.5877 32.1024 33.8767 34.9312 35.2809 34.9312 33.8767 32.1024 29.5877 26.3148 22.2807 17.5149 12.0995 6.18637 0
0 5.16426 10.1308 14.7288 18.8298 22.3503 25.2446 27.494 29.0954 30.0531 30.3716 30.0531 29.0954 27.494 25.2446 22.3503 18.8298 14.7288 10.1308 5.16426 0
0 4.33984 8.53084 12.4398 15.9594 19.0119 21.5465 23.5335 24.9581 25.8141 26.0995 25.8141 24.9581 23.5335 21.5465 19.0119 15.9594 12.4398 8.53084 4.33984 0
0 3.66426 7.21294 10.54 13.5561 16.1916 18.396 20.1356 21.3895 22.1457 22.3984 22.1457 21.3895 20.1356 18.396 16.1916 13.5561 10.54 7.21294 3.66426 0
0 3.10429 6.11665 8.95135 11.5336 13.8023 15.7103 17.2235 18.3187 18.981 19.2026 18.981 18.3187 17.2235 15.7103 13.8023 11.5336 8.95135 6.11665 3.10429 0
0 2.63626 5.19807 7.61514 9.82473 11.7737 13.4196 14.7297 15.6807 16.2571 16.4502 16.2571 15.6807 14.7297 13.4196 11.7737 9.82473 7.61514 5.19807 2.63626 0
0 2.24269 4.42425 6.48647 8.37648 10.0485 11.4646 12.595 13.4174 13.9167 14.0841 13.9167 13.4174 12.595 11.4646 10.0485 8.37648 6.48647 4.42425 2.24269 0
0 1.91026 3.76981 5.53006 7.14631 8.57919 9.79545 10.7683 11.4773 11.9083 12.0529 11.9083 11.4773 10.7683 9.79545 8.57919 7.14631 5.53006 3.76981 1.91026 0
0 1.62856 3.21473 4.71768 6.09957 7.3266 8.36983 9.20553 9.81538 10.1864 10.311 10.1864 9.81538 9.20553 8.36983 7.3266 6.09957 4.71768 3.21473 1.62856 0
0 1.38926 2.74288 4.02643 5.20775 6.25791 7.15182 7.86872 8.39237 8.71119 8.81823 8.71119 8.39237 7.86872 7.15182 6.25791 5.20775 4.02643 2.74288 1.38926 0
0 1.18562 2.34116 3.43745 4.44717 5.34554 6.11092 6.72525 7.1743 7.44784 7.5397 7.44784 7.1743 6.72525 6.11092 5.34554 4.44717 3.43745 2.34116 1.18562 0
0 1.01209 1.99871 2.9351 3.79802 4.56624 5.22118 5.74718 6.13186 6.36628 6.44502 6.36628 6.13186 5.74718 5.22118 4.56624 3.79802 2.9351 1.99871 1.01209 0
0 0.864068 1.70651 2.5063 3.24361 3.90033 4.46046 4.91053 5.23981 5.44052 5.50795 5.44052 5.23981 4.91053 4.46046 3.90033 3.24361 2.5063 1.70651 0.864068 0
0 0.73769 1.45699 2.14003 2.76989 3.33108 3.80991 4.19478 4.47644 4.64816 4.70585 4.64816 4.47644 4.19478 3.80991 3.33108 2.76989 2.14003 1.45699 0.73769 0
0 0.629717 1.24379 1.82699 2.36489 2.84428 3.25342 3.58235 3.82312 3.96994 4.01927 3.96994 3.82312 3.58235 3.25342 2.84428 2.36489 1.82699 1.24379 0.629717 0
0 0.537407 1.06149 1.55929 2.0185 2.42782 2.77723 3.05819 3.26388 3.38932 3.43147 3.38932 3.26388 3.05819 2.77723 2.42782 2.0185 1.55929 1.06149 0.537407 0
0 0.458436 0.905529 1.33023 1.72205 2.07136 2.36957 2.60941 2.785 2.8921 2.92809 2.8921 2.785 2.60941 2.36957 2.07136 1.72205 1.33023 0.905529 0.458436 0
0 0.390827 0.771995 1.13409 1.46819 1.76606 2.0204 2.22496 2.37474 2.4661 2.4968 2.4661 2.37474 2.22496 2.0204 1.76606 1.46819 1.13409 0.771995 0.390827 0
0 0.332893 0.657567 0.96601 1.25062 1.50439 1.72108 1.89538 2.02302 2.10087 2.12703 2.10087 2.02302 1.89538 1.72108 1.50439 1.25062 0.96601 0.657567 0.332893 0
0 0.283194 0.559402 0.82181 1.06395 1.27987 1.46425 1.61257 1.72118 1.78743 1.8097 1.78743 1.72118 1.61257 1.46425 1.27987 1.06395 0.82181 0.559402 0.283194 0
0 0.240499 0.475067 0.697923 0.903574 1.08696 1.24356 1.36954 1.4618 1.51808 1.53699 1.51808 1.4618 1.36954 1.24356 1.08696 0.903574 0.697923 0.475067 0.240499 0
0 0.203749 0.402476 0.591283 0.765518 0.920893 1.05358 1.16033 1.2385 1.28619 1.30222 1.28619 1.2385 1.16033 1.05358 0.920893 0.765518 0.591283 0.402476 0.203749 0
0 0.172036 0.339833 0.499256 0.646377 0.777576 0.889623 0.979763 1.04578 1.08605 1.09958 1.08605 1.04578 0.979763 0.889623 0.777576 0.646377 0.499256 0.339833 0.172036 0
0 0.144576 0.28559 0.419568 0.54321 0.653471 0.747639 0.823396 0.87888 0.912724 0.924099 0.912724 0.87888 0.823396 0.747639 0.653471 0.54321 0.419568 0.28559 0.144576 0
0 0.12069 0.238407 0.350251 0.453468 0.545516 0.624129 0.687374 0.733693 0.761949 0.771445 0.761949 0.733693 0.687374 0.624129 0.545516 0.453468 0.350251 0.238407 0.12069 0
0 0.099788 0.197118 0.289593 0.374936 0.451044 0.516045 0.568338 0.606638 0.630001 0.637853 0.630001 0.606638 0.568338 0.516045 0.451044 0.374936 0.289593 0.197118 0.099788 0
0 0.081354 0.160704 0.236097 0.305674 0.367724 0.420718 0.463353 0.494578 0.513626 0.520028 0.513626 0.494578 0.463353 0.420718 0.367724 0.305674 0.236097 0.160704 0.081354 0
0 0.064932 0.128265 0.188439 0.243972 0.293497 0.335795 0.369824 0.394747 0.409951 0.415061 0.409951 0.394747 0.369824 0.335795 0.293497 0.243972 0.188439 0.128265 0.064932 0
0 0.050117 0.098999 0.145443 0.188305 0.226531 0.259178 0.285443 0.304679 0.316414 0.320358 0.316414 0.304679 0.285443 0.259178 0.226531 0.188305 0.145443 0.098999 0.050117 0
0 0.036541 0.072182 0.106045 0.137297 0.165168 0.188972 0.208123 0.222149 0.230705 0.23358 0.230705 0.222149 0.208123 0.188972 0.165168 0.137297 0.106045 0.072182 0.036541 0
0 0.02387 0.047151 0.069272 0.089687 0.107893 0.123442 0.135952 0.145114 0.150703 0.152582 0.150703 0.145114 0.135952 0.123442 0.107893 0.089687 0.069272 0.047151 0.02387 0
0 0.011789 0.023287 0.034213 0.044295 0.053287 0.060967 0.067145 0.07167 0.074431 0.075358 0.074431 0.07167 0.067145 0.060967 0.053287 0.044295 0.034213 0.023287 0.011789 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Temperature distribution for Time marching at steady state


Name: Syed Abu Ghalib Ahmed
Roll No: MEB16004
Subject: Elements of CFD
Date of Submission : 14/05/19

You might also like