傳熱學(xué)MATLAB溫度分布大作業(yè)完整版_第1頁(yè)
傳熱學(xué)MATLAB溫度分布大作業(yè)完整版_第2頁(yè)
傳熱學(xué)MATLAB溫度分布大作業(yè)完整版_第3頁(yè)
傳熱學(xué)MATLAB溫度分布大作業(yè)完整版_第4頁(yè)
傳熱學(xué)MATLAB溫度分布大作業(yè)完整版_第5頁(yè)
已閱讀5頁(yè),還剩6頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、東南大學(xué)能源與環(huán)境學(xué)院課程作業(yè)報(bào)告作業(yè)名稱:傳熱學(xué)大作業(yè)利用matlab程序解決熱傳導(dǎo)問(wèn)題 院系:能源與環(huán)境學(xué)院 專業(yè):建筑環(huán)境與設(shè)備工程 學(xué)號(hào): 姓名: 2014年11月9日1、 題目及要求1. 原始題目及要求2. 各節(jié)點(diǎn)的離散化的代數(shù)方程3. 源程序4. 不同初值時(shí)的收斂快慢5. 上下邊界的熱流量(=1W/(m)6. 計(jì)算結(jié)果的等溫線圖7. 計(jì)算小結(jié)題目:已知條件如下圖所示:二、各節(jié)點(diǎn)的離散化的代數(shù)方程各溫度節(jié)點(diǎn)的代數(shù)方程ta=(300+b+e)/4 ; tb=(200+a+c+f)/4; tc=(200+b+d+g)/4; td=(2*c+200+h)/4te=(100+a+f+i)/4

2、; tf=(b+e+g+j)/4; tg=(c+f+h+k)/4 ; th=(2*g+d+l)/4ti=(100+e+m+j)/4; tj=(f+i+k+n)/4; tk=(g+j+l+o)/4; tl=(2*k+h+q)/4tm=(2*i+300+n)/24; tn=(2*j+m+p+200)/24; to=(2*k+p+n+200)/24; tp=(l+o+100)/12三、源程序【G-S迭代程序】【方法一】函數(shù)文件為:function y,n=gauseidel(A,b,x0,eps)D=diag(diag(A);L=-tril(A,-1);U=-triu(A,1);G=(D-L)U;f

3、=(D-L)b;y=G*x0+f;n=1;while norm(y-x0)=eps x0=y; y=G*x0+f; n=n+1;end命令文件為:A=4,-1,0,0,-1,0,0,0,0,0,0,0,0,0,0,0; -1,4,-1,0,0,-1,0,0,0,0,0,0,0,0,0,0; 0,-1,4,-1,0,0,-1,0,0,0,0,0,0,0,0,0; 0,0,-2,4,0,0,0,-1,0,0,0,0,0,0,0,0; -1,0,0,0,4,-1,0,0,-1,0,0,0,0,0,0,0; 0,-1,0,0,-1,4,-1,0,0,-1,0,0,0,0,0,0; 0,0,-1,0,0

4、,-1,4,-1,0,0,-1,0,0,0,0,0; 0,0,0,-1,0,0,-2,4,0,0,0,-1,0,0,0,0; 0,0,0,0,-1,0,-1,0,4,0,0,0,-1,0,0,0; 0,0,0,0,0,-1,0,0,-1,4,-1,0,0,-1,0,0; 0,0,0,0,0,0,-1,0,0,-1,4,-1,0,0,-1,0; 0,0,0,0,0,0,0,-1,0,0,-2,4,0,0,0,-1; 0,0,0,0,0,0,0,0,-2,0,0,0,24,-1,0,0; 0,0,0,0,0,0,0,0,0,-2,0,0,-1,24,-1,0; 0,0,0,0,0,0,0,0,0,

5、0,-2,0,0,-1,24,-1; 0,0,0,0,0,0,0,0,0,0,0,-1,0,0,-1,12;b=300,200,200,200,100,0,0,0,100,0,0,0,300,200,200,100;x,n=gauseidel(A,b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.0e-6)xx=1:1:4;yy=xx;X,Y=meshgrid(xx,yy);Z=reshape(x,4,4);Z=Zcontour(X,Y,Z,30)Z = 139.6088 150.3312 153.0517 153.5639 108.1040 108.6641 108.3

6、119 108.1523 84.1429 67.9096 63.3793 62.4214 20.1557 15.4521 14.8744 14.7746【方法2】 t=zeros(5,5);t(1,1)=100;t(1,2)=100;t(1,3)=100;t(1,4)=100;t(1,5)=100;t(2,1)=200;t(3,1)=200;t(4,1)=200;t(5,1)=200;for i=1:10t(2,2)=(300+t(3,2)+t(2,3)/4 ;t(3,2)=(200+t(2,2)+t(4,2)+t(3,3)/4;t(4,2)=(200+t(3,2)+t(5,2)+t(4,3)

7、/4; t(5,2)=(2*t(4,2)+200+t(5,3)/4;t(2,3)=(100+t(2,2)+t(3,3)+t(2,4)/4; t(3,3)=(t(3,2)+t(2,3)+t(4,3)+t(3,4)/4; t(4,3)=(t(4,2)+t(3,3)+t(5,3)+t(4,4)/4; t(5,3)=(2*t(4,3)+t(5,2)+t(5,4)/4;t(2,4)=(100+t(2,3)+t(2,5)+t(3,4)/4; t(3,4)=(t(3,3)+t(2,4)+t(4,4)+t(3,5)/4; t(4,4)=(t(4,3)+t(4,5)+t(3,4)+t(5,4)/4;t(5,4)

8、=(2*t(4,4)+t(5,3)+t(5,5)/4;t(2,5)=(2*t(2,4)+300+t(3,5)/24; t(3,5)=(2*t(3,4)+t(2,5)+t(4,5)+200)/24; t(4,5)=(2*t(4,4)+t(3,5)+t(5,5)+200)/24; t(5,5)=(t(5,4)+t(4,5)+100)/12;tendcontour(t,50);ans = 100.0000 200.0000 200.0000 200.0000 200.0000 100.0000 136.8905 146.9674 149.8587 150.7444 100.0000 102.3012

9、 103.2880 103.8632 104.3496 100.0000 70.6264 61.9465 59.8018 59.6008 100.0000 19.0033 14.8903 14.5393 14.5117【Jacobi迭代程序】函數(shù)文件為:function y,n=jacobi(A,b,x0,eps)D=diag(diag(A);L=-tril(A,-1);U=-triu(A,1);B=D(L+U);f=Db;y=B*x0+f;n=1;while norm(y-x0)=eps x0=y; y=B*x0+f; n=n+1;end命令文件為:A=4,-1,0,0,-1,0,0,0,0

10、,0,0,0,0,0,0,0; -1,4,-1,0,0,-1,0,0,0,0,0,0,0,0,0,0; 0,-1,4,-1,0,0,-1,0,0,0,0,0,0,0,0,0; 0,0,-2,4,0,0,0,-1,0,0,0,0,0,0,0,0; -1,0,0,0,4,-1,0,0,-1,0,0,0,0,0,0,0; 0,-1,0,0,-1,4,-1,0,0,-1,0,0,0,0,0,0; 0,0,-1,0,0,-1,4,-1,0,0,-1,0,0,0,0,0; 0,0,0,-1,0,0,-2,4,0,0,0,-1,0,0,0,0; 0,0,0,0,-1,0,-1,0,4,0,0,0,-1,0,

11、0,0; 0,0,0,0,0,-1,0,0,-1,4,-1,0,0,-1,0,0; 0,0,0,0,0,0,-1,0,0,-1,4,-1,0,0,-1,0; 0,0,0,0,0,0,0,-1,0,0,-2,4,0,0,0,-1; 0,0,0,0,0,0,0,0,-2,0,0,0,24,-1,0,0; 0,0,0,0,0,0,0,0,0,-2,0,0,-1,24,-1,0; 0,0,0,0,0,0,0,0,0,0,-2,0,0,-1,24,-1; 0,0,0,0,0,0,0,0,0,0,0,-1,0,0,-1,12;b=300,200,200,200,100,0,0,0,100,0,0,0,30

12、0,200,200,100;x,n=jacobi(A,b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.0e-6);xx=1:1:4;yy=xx;X,Y=meshgrid(xx,yy);Z=reshape(x,4,4);Z=Zcontour(X,Y,Z,30)n =97Z = 139.6088 150.3312 153.0517 153.5639 108.1040 108.6641 108.3119 108.1523 84.1429 67.9096 63.3793 62.4214 20.1557 15.4521 14.8744 14.7746四、不同初值時(shí)的收斂快慢1、方

13、法1在Gauss迭代和Jacobi迭代中,本程序應(yīng)用的收斂條件均為norm(y-x0)=eps,即使前后所求誤差達(dá)到e的-6次方時(shí),跳出循環(huán)得出結(jié)果。將誤差改為0.01時(shí),只需迭代25次,如下x,n=gauseidel(A,b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.01)運(yùn)行結(jié)果為將誤差改為0.1時(shí),需迭代20次,可見(jiàn)隨著迭代次數(shù)增加,誤差減小,變化速度也在減小。方法2通過(guò) i=1:10判斷收斂,為迭代10次,若改為1:20,則迭代20次。2、在同樣的誤差要求下,誤差控制在e的-6次方內(nèi),Gauss迭代用了49次達(dá)到要求,而Jacobi迭代用了97次,可見(jiàn),在迭代

14、中盡量采用最新值,可以大幅度的減少迭代次數(shù),迭代過(guò)程收斂快一些。在Gauss中,初值為100,迭代46次達(dá)到精確度1.0e-6,初值為50時(shí),迭代47次,初值為0時(shí),迭代49次,初值為200時(shí)迭代50次,可見(jiàn)存在一個(gè)最佳初始值,是迭代最快。這一點(diǎn)在jacobi迭代中表現(xiàn)的尤為明顯。五、上下邊界的熱流量:上邊界t=200,=10,所以,熱流量1=*+=1*(100/2+(200-139.6088)+(200-150.3312)+(200-153.0517)+(200-153.5639)/2)=230.2264W下邊界熱流量2=|*+-h*(+)|=|1*(84.1429-20.1557)+(67

15、.9096-15.4521)+(63.3793-14.8744)+(62.4214- 14.7746)/2)-10*(90/2+(20.1557-10)+(15.4521-10)+(14.8744 -10)+(14.7746-10)/2)| = |-489.925|W =489.25W六、溫度等值線Gauss:Yacobi:七、計(jì)算小結(jié)導(dǎo)熱問(wèn)題進(jìn)行有限差分?jǐn)?shù)值計(jì)算的基本思想是把在時(shí)間、空間上連續(xù)的溫度場(chǎng)用有限個(gè)離散點(diǎn)溫度的集合來(lái)代替,即有限點(diǎn)代替無(wú)限點(diǎn),通過(guò)求解根據(jù)傅里葉定律和能量守恒兩大法則建立關(guān)于控制面內(nèi)這些節(jié)點(diǎn)溫度值的代數(shù)方程,獲得各個(gè)離散點(diǎn)上的溫度值。要先劃分查分網(wǎng)格,在建立差分代數(shù)方程組,用MATLAB或者其他軟件編程求解。高斯-賽德

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論