1、60的网格。 Cccc,l,cls,l 把矩形区域划分为4060(共有4161个节点)的网格后,则由柱体内部的导热微分方程: 建立的柱体二维平面离散方程为:t(x,y)=.25*(t(x+1,y)+t(x-1,y)+t(x,y+1)+t(x,y-1) 其中,1y41,1x61。 又由假设和题意知柱体的边界条件为: 2、由离散方程,根据迭代算法,运用matlab语言编程,求解上述柱体内部温度的离散解,从而求解出其温度场的分布。由上述分析的出求解柱体内部温度分布的 matlab语言程序如下所示:m=61;n=41;global a b ;tw1=60;tw2=20;L1=0.6;L2=0.4;y=
2、zeros(1,n);x=zeros(m,1);t=zeros(m,n);T=t;R=t;er1=t;Er=t;t(:,1)=tw1;t(1,:)=tw1;t(61,:Er=1; i=; while (Er0.00000001) for a=2:m-1 for b=2:n-1 z=0.01*a; t(:,41)=60+20*sin(pi*z/.6); t(a,b)=(t(a-1,b)+t(a+1,b)+t(a,b-1)+t(a,b+1)/4; x=0.01*(a-1); y=.01*(b-1); R(a,b)=tw1+(tw2/sinh(pi*L2/L1)*sin(pi*x/L1)*sinh(
3、pi*y/L1); Eps=abs(t./R-1); Er=abs(t(a,b)/T(a,b)-1); T=t; end i=i+1 i t R Eps Er figure(1), mesh(t); title(数值解温度场) figure(2), mesh(R);解析解温度场 figure(3) mesh(Eps);数值解解析解温度场误差分布 x=.6:-(0.6/(m-1):; y=.4:-(0.4/(n-1): t1=t(:,(n-1)/2); R1=R(: Er1=Eps(: t2=t(m-1)/2,:); R2=R(m-1)/2,: Er2=Eps(m-1)/2,: figure(4
4、) plot(x,t1,g,x,R1b,x,Er1r) xlabel(横坐标x ylabel(纵坐标t1 R1 Er1绘制y=L2/2处数值解解析解温度曲线及误差曲线 figure(5) plot(y,t2,y,R2,y,Er2横坐标y纵坐标t2 R2 Er2绘制x=L1/2处数值解解析解温度曲线及误差曲线 Er = 9.9951e-09 数值解及其温度场如下: t = Columns 1 through 9 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0138 60.02
5、77 60.0417 60.0558 60.0700 60.0845 60.0992 60.1143 60.0000 60.0276 60.0553 60.0832 60.1114 60.1398 60.1687 60.1982 60.2282 60.0000 60.0413 60.0828 60.1245 60.1666 60.2092 60.2525 60.2965 60.3415 60.0000 60.0549 60.1100 60.1655 60.2214 60.2780 60.3355 60.3940 60.4537 60.0000 60.0684 60.1369 60.2059 6
6、0.2756 60.3460 60.4175 60.4903 60.5646 60.0000 60.0816 60.1634 60.2458 60.3289 60.4130 60.4983 60.5852 60.6739 60.0000 60.0946 60.1895 60.2849 60.3813 60.4787 60.5777 60.6784 60.7812 60.0000 60.1073 60.2149 60.3232 60.4325 60.5431 60.6553 60.7696 60.8861 60.0000 60.1197 60.2398 60.3606 60.4825 60.60
7、59 60.7311 60.8585 60.9885 60.0000 60.1318 60.2640 60.3969 60.5311 60.6669 60.8047 60.9449 61.0880 60.0000 60.1435 60.2873 60.4321 60.5782 60.7260 60.8760 61.0286 61.1843 60.0000 60.1547 60.3099 60.4660 60.6235 60.7829 60.9447 61.1093 61.2772 60.0000 60.1655 60.3316 60.4986 60.6671 60.8376 61.0107 6
8、1.1867 61.3664 60.0000 60.1759 60.3523 60.5297 60.7088 60.8899 61.0738 61.2608 61.4516 60.0000 60.1857 60.3720 60.5593 60.7484 60.9397 61.1337 61.3312 61.5326 60.0000 60.1950 60.3906 60.5873 60.7859 60.9867 61.1905 61.3978 61.6092 60.0000 60.2037 60.4081 60.6137 60.8211 61.0309 61.2438 61.4604 61.68
9、13 60.0000 60.2119 60.4245 60.6383 60.8540 61.0722 61.2936 61.5188 61.7485 60.0000 60.2195 60.4396 60.6610 60.8844 61.1104 61.3397 61.5729 61.8107 60.0000 60.2264 60.4535 60.6819 60.9124 61.1455 61.3820 61.6225 61.8678 60.0000 60.2327 60.4661 60.7009 60.9378 61.1774 61.4204 61.6676 61.9196 60.0000 6
10、0.2384 60.4774 60.7179 60.9605 61.2059 61.4548 61.7079 61.9661 60.0000 60.2433 60.4874 60.7329 60.9805 61.2310 61.4851 61.7435 62.0069 60.0000 60.2476 60.4960 60.7458 60.9978 61.2527 61.5113 61.7742 62.0422 60.0000 60.2513 60.5032 60.7567 61.0124 61.2709 61.5332 61.7999 62.0718 60.0000 60.2542 60.50
11、91 60.7655 61.0240 61.2856 61.5509 61.8206 62.0956 60.0000 60.2564 60.5135 60.7721 61.0329 61.2967 61.5642 61.8363 62.1135 60.0000 60.2579 60.5165 60.7766 61.0389 61.3042 61.5733 61.8468 62.1257 60.0000 60.2586 60.5180 60.7789 61.0420 61.3081 61.5780 61.8523 62.1319 60.0000 60.2587 60.5182 60.7791 6
12、1.0423 61.3085 61.5783 61.8527 62.1323 60.0000 60.2581 60.5169 60.7772 61.0397 61.3052 61.5744 61.8480 62.1269 60.0000 60.2567 60.5142 60.7731 61.0343 61.2984 61.5661 61.8383 62.1157 60.0000 60.2547 60.5101 60.7670 61.0260 61.2880 61.5536 61.8235 62.0986 60.0000 60.2520 60.5046 60.7588 61.0150 61.27
13、41 61.5368 61.8038 62.0759 60.0000 60.2485 60.4978 60.7485 61.0012 61.2568 61.5159 61.7793 62.0476 60.0000 60.2445 60.4896 60.7361 60.9847 61.2361 61.4909 61.7499 62.0137 60.0000 60.2397 60.4801 60.7218 60.9656 61.2121 61.4619 61.7158 61.9745 60.0000 60.2343 60.4693 60.7056 60.9439 61.1848 61.4290 6
14、1.6771 61.9299 60.0000 60.2283 60.4573 60.6875 60.9196 61.1543 61.3922 61.6340 61.8802 60.0000 60.2217 60.4440 60.6675 60.8929 61.1208 61.3518 61.5864 61.8255 60.0000 60.2145 60.4295 60.6458 60.8639 61.0843 61.3077 61.5347 61.7659 60.0000 60.2067 60.4140 60.6224 60.8325 61.0449 61.2602 61.4789 61.70
15、17 60.0000 60.1984 60.3973 60.5973 60.7990 61.0028 61.2094 61.4193 61.6330 60.0000 60.1895 60.3796 60.5707 60.7633 60.9580 61.1554 61.3559 61.5600 60.0000 60.1802 60.3608 60.5425 60.7256 60.9108 61.0983 61.2889 61.4829 60.0000 60.1704 60.3412 60.5129 60.6861 60.8611 61.0385 61.2186 61.4020 60.0000 6
16、0.1601 60.3206 60.4820 60.6448 60.8092 60.9759 61.1451 61.3175 60.0000 60.1494 60.2993 60.4499 60.6018 60.7552 60.9107 61.0687 61.2295 60.0000 60.1384 60.2771 60.4166 60.5572 60.6993 60.8433 60.9895 61.1384 60.0000 60.1269 60.2542 60.3822 60.5112 60.6415 60.7736 60.9078 61.0443 60.0000 60.1152 60.23
17、07 60.3468 60.4639 60.5822 60.7020 60.8237 60.9476 60.0000 60.1031 60.2066 60.3105 60.4154 60.5213 60.6286 60.7375 60.8484 60.0000 60.0908 60.1819 60.2735 60.3658 60.4591 60.5535 60.6495 60.7471 60.0000 60.0783 60.1568 60.2357 60.3153 60.3957 60.4771 60.5598 60.6440 60.0000 60.0656 60.1313 60.1974 6
18、0.2640 60.3313 60.3994 60.4687 60.5391 60.0000 60.0526 60.1054 60.1585 60.2120 60.2660 60.3208 60.3764 60.4329 60.0000 60.0396 60.0793 60.1192 60.1595 60.2001 60.2413 60.2831 60.3257 60.0000 60.0265 60.0530 60.0797 60.1065 60.1337 60.1612 60.1891 60.2176 60.0000 60.0132 60.0265 60.0399 60.0533 60.06
19、69 60.0807 60.0947 60.1089 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 60.0000 Columns 10 through 18 60.1297 60.1454 60.1617 60.1784 60.1957 60.2136 60.2321 60.2514 60.2715 60.2589 60.2905 60.3229 60.3563 60.3908 60.4265 60.4636 60.5021 60.5422 60.3874 60.4346 60.4831 60.5331 60.
20、5847 60.6382 60.6936 60.7512 60.8112 60.5148 60.5775 60.6419 60.7083 60.7769 60.8479 60.9215 60.9980 61.0776 60.6406 60.7186 60.7988 60.8814 60.9668 61.0551 61.1467 61.2418 61.3408 60.7646 60.8576 60.9533 61.0519 61.1537 61.2591 61.3683 61.4818 61.5999 60.8863 60.9941 61.1050 61.2193 61.3372 61.4593
21、 61.5859 61.7173 61.8541 61.0054 61.1277 61.2534 61.3830 61.5168 61.6552 61.7986 61.9476 62.1027 61.1215 61.2579 61.3982 61.5426 61.6918 61.8461 62.0060 62.1721 62.3449 61.2344 61.3845 61.5388 61.6977 61.8618 62.0315 62.2074 62.3901 62.5800 61.3436 61.5070 61.6749 61.8478 62.0263 62.2110 62.4023 62.
22、6009 62.8074 61.4490 61.6251 61.8061 61.9925 62.1849 62.3839 62.5901 62.8040 63.0265 61.5501 61.7384 61.9320 62.1313 62.3371 62.5498 62.7702 62.9989 63.2366 61.6467 61.8468 62.0523 62.2640 62.4824 62.7083 62.9422 63.1850 63.4372 61.7386 61.9497 62.1667 62.3901 62.6206 62.8589 63.1057 63.3617 63.6278
23、 61.8255 62.0471 62.2748 62.5093 62.7512 63.0012 63.2601 63.5287 63.8077 61.9071 62.1386 62.3764 62.6213 62.8738 63.1349 63.4052 63.6855 63.9767 61.9833 62.2240 62.4712 62.7257 62.9882 63.2595 63.5404 63.8317 64.1342 62.0539 62.3030 62.5590 62.8224 63.0941 63.3749 63.6655 63.9669 64.2798 62.1186 62.
24、3755 62.6395 62.9111 63.1912 63.4806 63.7802 64.0908 64.4132 62.1773 62.4413 62.7125 62.9915 63.2792 63.5765 63.8841 64.2030 64.5341 62.2299 62.5002 62.7778 63.0634 63.3580 63.6622 63.9770 64.3034 64.6421 62.2762 62.5521 62.8353 63.1268 63.4273 63.7376 64.0588 64.3916 64.7371 62.3161 62.5968 62.8849
25、 63.1813 63.4870 63.8026 64.1291 64.4675 64.8188 62.3496 62.6342 62.9264 63.2270 63.5369 63.8569 64.1879 64.5310 64.8869 62.3765 62.6644 62.9598 63.2637 63.5770 63.9005 64.2351 64.5817 64.9415 62.3969 62.6871 62.9849 63.2913 63.6071 63.9332 64.2704 64.6198 64.9823 62.4106 62.7024 63.0018 63.3099 63.
26、6273 63.9550 64.2940 64.6451 65.0093 62.4176 62.7102 63.0105 63.3193 63.6375 63.9660 64.3057 64.6575 65.0225 62.4180 62.7106 63.0108 63.3195 63.6376 63.9660 64.3055 64.6572 65.0219 62.4118 62.7035 63.0029 63.3107 63.6278 63.9551 64.2936 64.6441 65.0075 62.3990 62.6891 62.9867 63.2928 63.6081 63.9335
27、 64.2699 64.6182 64.9795 62.3796 62.6673 62.9625 63.2659 63.5785 63.9011 64.2346 64.5799 64.9379 62.3538 62.6383 62.9302 63.2302 63.5393 63.8582 64.1878 64.5291 64.8829 62.3217 62.6022 62.8900 63.1858 63.4905 63.8048 64.1297 64.4660 64.8146 62.2832 62.5590 62.8419 63.1327 63.4322 63.7412 64.0605 64.
28、3909 64.7335 62.2386 62.5090 62.7863 63.0713 63.3648 63.6675 63.9803 64.3041 64.6396 62.1881 62.4522 62.7232 63.0016 63.2883 63.5840 63.8895 64.2057 64.5333 62.1316 62.3889 62.6528 62.9239 63.2031 63.4910 63.7884 64.0961 64.4150 62.0695 62.3193 62.5754 62.8385 63.1094 63.3887 63.6772 63.9757 64.2849
29、 62.0020 62.2435 62.4911 62.7455 63.0074 63.2774 63.5563 63.8448 64.1436 61.9291 62.1618 62.4003 62.6453 62.8975 63.1576 63.4261 63.7038 63.9914 61.8512 62.0744 62.3032 62.5382 62.7801 63.0294 63.2869 63.5531 63.8288 61.7684 61.9816 62.2001 62.4245 62.6554 62.8934 63.1391 63.3932 63.6562 61.6810 61.8836 62.0912 62.3044 62.5238 62.7499 62.9832 63.2245 63.4743 61.5892 61.7807 61.9769 62.1784 62.3856 62.5992 62.8197 63.0475 63.2834
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1