偏微分方程上機試驗報告doc_第1頁
偏微分方程上機試驗報告doc_第2頁
偏微分方程上機試驗報告doc_第3頁
偏微分方程上機試驗報告doc_第4頁
偏微分方程上機試驗報告doc_第5頁
免費預(yù)覽已結(jié)束,剩余2頁可下載查看

下載本文檔

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

文檔簡介

本文格式為Word版,下載可任意編輯——偏微分方程上機試驗報告doc

上機試驗2:五點差分格式法偏微分方程(Matlab)試驗報告

——五點差分格式法一、試驗題目

設(shè)G是形如下圖的十字形域,由五個相等的單位正方形組成,用五點差分格式求以下邊值問題的數(shù)值解:

?u?u?2??1,于G2?x?yu=0,于?G二、試驗原理

22G1G取定沿X軸和Y軸方向的步長h1和h2,h??h?h221122?,作兩族與坐

標(biāo)軸平行的直線:x=ih1,y=jh2,i,j?0,?1,?2,?

若(xi,yj)為正則內(nèi)點,沿x,y方向分別用二階中心差商代替

uxx和uyy則得

?[ui?1,j?2uij?ui?1,jh12?ui,j?1?2uij?ui,j?12h2]?fij

特別取正方形網(wǎng)格:h1?h2?h,則原差分方程可簡化為

1h2uij?(ui?1,j?ui,j?1?ui?1,j?ui,j?1)?fij

44三、試驗程序

1)functionuxy=EllIni2Uxl(x,y)

formatlong;

uxy=0;

2)functionuxy=EllIni2Uxr(x,y)formatlong;uxy=y*(2-y);

3)functionuxy=EllIni2Uyl(x,y)formatlong;uxy=0;

4)functionuxy=EllIni2Uyr(x,y)formatlong;ifx1A(i,i+nx-2)=1;A(i,i+1)=1;b(i)=-u0(1,i+1);elseifi>(ny-3)*(nx-2)A(i,i-nx+2)=1;A(i,i+1)=1;b(i)=-u0(ny,mod(i,(nx-2))+1);elseA(i,i-1)=1;A(i,i+1)=1;A(i,i+nx-2)=1;A(i,i-nx+2)=1;end

endendendend

ul=A\\b;

fori=1:(ny-2)forj=1:(nx-2)

u(i,j)=ul((i-1)*(nx-2)+j);endend

formatshort;

四、試驗結(jié)果

>>u=peEllip5(25,0,3,25,0,3)u=

Columns1through6

1.14482.28963.26712.28964.74666.70363.26706.70359.50504.07498.295511.80644.73709.597313.69905.275910.657615.24655.708911.510816.49516.049012.181617.47876.305512.688018.22216.485113.042618.74326.592213.254219.05436.629413.327819.16236.597713.265119.07006.496413.064818.77546.323112.722518.27206.073612.229817.54865.741511.574716.58795.317510.739515.36594.78919.700013.84924.13898.422111.99233.34456.85729.73182.38204.93036.97621.25322.50583.5896

Columns7through12

4.07508.295711.806614.726217.145719.134320.744422.015922.978523.654024.057324.197324.077123.694623.041722.104720.862619.286817.338514.966212.10148.65304.50164.73729.597713.699417.146020.023322.400524.332425.861927.022027.836928.323728.492428.346727.884127.095725.965724.471022.580320.251917.432614.054610.03305.26375.276310.658315.247419.135122.401125.112027.322829.077530.410631.348131.908232.101931.933231.399530.491129.191327.475625.311322.656219.457715.651511.16075.8950

5.70956.04996.30686.48696.59466.632711.511912.183312.690513.046113.259013.334116.496617.481018.225618.748219.061019.171320.746122.018622.982623.660024.065624.208524.333925.864727.026427.843528.333028.505127.323829.079830.414831.354731.917832.115329.769331.716033.198234.242634.868435.087131.714633.816835.419336.549237.226037.461533.194735.417237.112934.236636.544538.306234.859137.217839.018635.073737.449139.262134.884837.242739.041134.289636.595938.352933.278035.498537.187231.832833.932935.526529.928931.873933.345427.533129.288530.611224.603926.135827.283821.090422.367123.315616.932917.926618.652612.063312.753713.23516.40586.78986.9996

Columns13through18

6.60206.50196.330213.273313.075512.736119.081818.790618.291524.091823.713523.066028.363527.905927.123431.951231.423030.521134.903134.313733.309037.260336.619635.529439.057138.375137.216740.320139.607038.398141.068840.334739.092841.315240.570439.312941.064040.318539.063240.312439.576638.340939.050338.334437.136337.260036.574535.431834.916534.271633.2024

38.309039.548940.288440.539540.306739.587338.371136.640334.369831.527228.072523.959019.132913.53477.09856.082612.247317.573422.135426.000729.229131.871933.972135.564436.675737.325437.525437.280336.587735.438033.814031.690939.024940.292041.046541.300741.059040.318739.069537.293834.966532.055228.520224.314819.385413.67237.10965.753011.597016.619520.901424.515027.522729.977531.922633.393034.415135.007835.182934.945034.291733.213931.695129.711239.272840.547541.305141.557741.309940.558839.294437.498835.147232.207028.638424.394519.421613.65967.04275.332510.768215.406119.335822.635025.369427.592629.348030.669831.583732.107832.253432.024931.420330.430929.041427.2288

31.987131.393130.415329.036227.230024.962328.431827.898527.029525.808424.210522.202324.203223.739622.995921.957520.601618.896619.246818.860718.257117.423916.342014.983813.501813.199312.748012.139011.358610.38596.90166.68686.39646.02575.56745.0103

Columns19through23

4.80879.737313.900917.400520.320022.727124.675426.207127.354628.142128.586428.698028.480927.933627.048125.810624.202322.188519.737716.799313.31079.19114.3378

>>

4.16518.471412.059715.045417.517519.543621.174922.450423.399524.043624.397824.471124.267323.784923.017421.952820.573218.853716.761314.252311.26857.72993.52473.38016.92369

溫馨提示

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

評論

0/150

提交評論