《综合实验2-热传导方程的有限差分数值模拟.docx》由会员分享,可在线阅读,更多相关《综合实验2-热传导方程的有限差分数值模拟.docx(6页珍藏版)》请在第壹文秘上搜索。
1、微分方程数值解实验报告专业佶息与计算科学班级Jai1.1.a1.姓名学号协作队员实验F1.期2013年_1_月n星期四成绩评定教师签名批改日期题目一、问题提出一根长为1.的均匀导热细杆,恻面绝热,内部无热源。其热传导系数为兄比热为C,线密度为P.求细杆内温,度变化的规律。实验参数:取4=1,Z=1细杆各处的初始温改为SinQH),两端截向上的温袋为0一任选以下有限差分法模拟细杆在各个时刻的温度占典显格式Crank-Nico1.son格式。加权六点格式并与解析解M(Xo=e7sing0x0进行比较。二、模型建立设杆长方向为X轴,号虑杆上从X到X-的一段。其质辅为PAX,热容精为C!设杆中的X轴正
2、向,热流强度为q(x,t),热/为Q(x,t),温度分布为u(x,t)oX内细杆吸收热尿的来源只仃热传导(无热源):由热传导的FOUrIer定律,有q(%,f)=*x(x,f)由能量守恒定律,在上内细Hx,x+Ax上的能QIcwu=O即看CfAxAu-q(x1t)-q(x+x)于是有cpu1.(x,t)=-gx(x)(2)结合和(2)得2ut=a2uXX(3)其中a2=kcp三、求解方法使用古典显格式:Ur1.=U=+r(U:“一2U:+U1.)其中y=k/(k和h分别为时间与空间方向的步长,取k=0.(M)5,h=0.1使得七必12)行=11.=I,细杆各处的初始温度为Sin(G),两端截面
3、上的温度为0。Mat1.ab程序如下:c1.c;k=0.005;h=0.1;r-k/hA2;t-O:k:O.1.;n三1.ength(t);=0:h:1;U1144sin(pi*x);un-();fori三1.:n=;forp-1:11u1.-exp(-pi2*t(i)*si(pi*(p1.;U=IUu1.;endu111.三(;forj-2:10Un1.=r*Un(j-1.+(1.-2*r*Un(j)+r*Un(j1.);un1.=uniUn1.;ende-abs(-Un);un=(un;u;Un;e;Un=0uni0;endUn四、输出结果时刻长度00.10.20.30.40.50.60.
4、70.80.910显格式00.30900.S8780.80900.95111.00000.95110.80900.58780.30900解析解0030900.58780.80900.9S111.000.95110.80900.5878030900误处000000000000.005显格式00.29410.S5950.77010.90530.95180.90530.77010.55950.29410解析解00.29390.55900.76940.90450.95110.90450.76940.55900.29390误差00.00020.050.00060.00080.00080.00080.00
5、060.00050.000200.010品格武00.28000.53250.73300.86170.90600.86170.73300.53250.28000解析解00.27950.53170.73180.86020.90450.86020.73180.53170.27950误差00.00050.00090.00120.00140.00150.140.00120.0009080500.015显格式0O.266S0.50690.69770.82020.86240.82020.69770.5069O.266S0解析解00.26580.S0560.69590.81810.86020.81810.69
6、590.S0560.26580误差00.00070.00130.00170.00200.00220.00200.00170.00130.000700.020显格式00.25370.48250.66410.78070.82090.78070.66410.48250.25370解析解00.25280.48090.66190.77810.81810.77810.66190.48090.2528O误差00.00080.00160.00220.00260.00270.00260.00220.00160.08O0.025显格式00.24140.45930.63210.74310.78130.74310.6
7、3210.45930.2414O解析解00.24040.45740.62950.74000.77810.74000.62950.45740.2404O误差00.100.00190.00260.310.00330.310.00260.00190.10O0030显格式00.22980.43710.60170.70730.74370.70730.0170.43710.2298O解析解00.22870.43500.59870.70380.74000.70380.59870.43S00.2287O误差00.00110.00220.00300.003S0.00370.00350.00300.00220.1
8、.1.O0.035显格式00.21880.41610.57270.67330.70790.67330.57270.41610.2188O解析解00.21750.41370.56940.66930.70380.66930.56940.41370.2175O误爰00.00130.00240.00330.00390.00410.00390.00330.00240.13O0.040显格式00.20820.39610.54510.64080.67380.64080.54510.39610.2082O解析解00.20680.39340.54150.63660.66930.63660.S4150.39340
9、.2068O误差00.00140.00260.00360.00430.00450.00430.00360.00260.14O0.045显格式00.1982037700.51890.61000.4140.610.S189037700.1982O解析解00.1967037420.51500.60540.63660.60540.5150037420.1967O误差00.150.00280.00390.00460.00480.00460.00390.00280.15O0.050显格式00.18870.35880.49390.58060.61050.58060.49390.35880.1887O解析解0
10、0.18710.35590.48980.57580.60540.57580.48980.35S90.1871O误差00.00160.300.00410.00480.510.00480.00410.00300.16O0.055显格式00.17960.34160.47010.55270.58110.55270.47010.S4160.1796O解析解00.17790.33840.46580.54760.57580.54760.46S80.33840.1779O误差00.00160.00310.00430.0050O.53O.OOSO0.00430.00310.16O0.060显格式00.17090
11、32510.44750.S2610.55310.52610.447S032510.1709O解析解00.16920.32190.44300.520805476052080.44300.32190.1692O误差00.170.00320.00450.0052O.550.00520.00450.00320.17O0.065显格式00.16270.30950.42590.S0070.52650.S0070.42590.30950.1627O解析解00.16090.30610.42130.49530.52080.49530.42130.30610.1609O误差00.00180.00330.00460
12、.00540.00570.00540.00460.00330.18O0.070显格式00.15490.29460.40S40.47660.S0110.47660.40S40.29460.1549O解析解00.1S310.29110.40070.47110.49530.47110.40070.29110.1S31O误差00.180.00340.00470.00550.00580.00550.00470.00340.18O0.07S显格式00.14740.28040.38590.45370.47700.45370.38590.28040.1474O解析解00.14560.27690.38110.44800.4711