180 likes | 325 Views
大學生暑期學習實務體驗計畫 含雙邊裂縫橢圓桿之扭轉問題對偶邊界元素法分析. 學習使用 BEPO2D 程式 學生:賴偉文 指導教授:陳正宗 指導學長:范羽 2011/8/31. 本週學習重點. 學習使用 BEPO2D 程式 驗證 BEPO2D 和學長寫的 DBEM 程式解相同問題時解是否相同 上海研習營照片分享. Bepo2d 程式運作簡介. 輸入檔 f01.dat f02.dat f03.dat f15.dat f80.dat NELM NINTER NU NT NELM , NNODE. 經 UTLM 計算由矩陣 運作求未知邊界條件.
E N D
大學生暑期學習實務體驗計畫含雙邊裂縫橢圓桿之扭轉問題對偶邊界元素法分析大學生暑期學習實務體驗計畫含雙邊裂縫橢圓桿之扭轉問題對偶邊界元素法分析 學習使用BEPO2D程式 學生:賴偉文 指導教授:陳正宗 指導學長:范羽 2011/8/31
本週學習重點 • 學習使用BEPO2D程式 • 驗證BEPO2D和學長寫的DBEM程式解相同問題時解是否相同 • 上海研習營照片分享
Bepo2d程式運作簡介 輸入檔 f01.dat f02.dat f03.dat f15.dat f80.dat NELM NINTER NU NT NELM,NNODE 經UTLM計算由矩陣 運作求未知邊界條件 輸出檔 f16.dat f77.dat f78.dat Bepo2d 程式轉換
Bepo2d輸入檔介紹 元素編號 u • 輸入Dirichlet邊界條件(u) 在f01.dat內 • 輸入Neumann邊界條件(t) 在f02.dat內 • 輸入邊界條件(t,u)在f03.dat內 123 555 元素編號 t 45 77 先t後u 77555
u=x (0,1) (1,1) 3 4 3 元素 u=0 u=y 4 2 結點 1 2 1 (0,0) (1,0) u=0 Bepo2d輸入檔介紹 • 建立節點編號與元素座標在f15.dat -1 15 1 0 0 11 .00000E+00 .00000E+00 .00000E+00 2 0 0 11 .10000E+01 .00000E+00 .00000E+00 3 0 0 11 .10000E+01 .10000E+01 .00000E+00 4 0 0 11 .00000E+00 .10000E+01 .00000E+00 -1 -1 71 1 1 21 1 1 7 2 1 2 2 1 21 1 1 7 2 2 3 3 1 21 1 1 7 2 3 4 4 1 21 1 1 7 2 4 1 -1 節點編號 元素編號 結點
Bepo2d輸入檔介紹 • 建立內點座標在f80.dat 內點編號 x y z 111 0 0 11 0.02000E+00 .02000E+00 .00000E+00 112 0 0 11 0.02000E+00 .04000E+00 .00000E+00
實例-製作f15.dat -1 15 1 0 0 11 .00000E+00 .00000E+00 .00000E+00 2 0 0 11 .10000E+01 .00000E+00 .00000E+00 3 0 0 11 .10000E+01 .10000E+01 .00000E+00 4 0 0 11 .00000E+00 .10000E+01 .00000E+00 -1 -1 71 1 1 21 1 1 7 2 1 2 2 1 21 1 1 7 2 2 3 3 1 21 1 1 7 2 3 4 4 1 21 1 1 7 2 4 1 -1 自己試試看 -1 15 1 0 0 11 0.000e+000 0.000e+000 0.000e+000 2 0 0 11 1.000e+000 0.000e+000 0.000e+000 3 0 0 11 1.000e+000 1.000e+000 0.000e+000 4 0 0 11 0.000e+000 1.000e+000 0.000e+000 -1 -1 71 1 1 21 1 1 7 2 1 2 0 0 0 0 0 2 1 21 1 1 7 2 2 3 0 0 0 0 0 3 1 21 1 1 7 2 3 4 0 0 0 0 0 4 1 21 1 1 7 2 4 1 0 0 0 0 0 -1 Depo2d原始
實例-製作f15.dat -1 15 1 0 0 11 0.000e+000 0.000e+000 0.000e+000 2 0 0 11 1.000e+000 0.000e+000 0.000e+000 3 0 0 11 1.000e+000 1.000e+000 0.000e+000 4 0 0 11 0.000e+000 1.000e+000 0.000e+000 -1 -1 71 1 1 21 1 1 7 2 1 2 0 0 0 0 0 2 1 21 1 1 7 2 2 3 0 0 0 0 0 3 1 21 1 1 7 2 3 4 0 0 0 0 0 4 1 21 1 1 7 2 4 1 0 0 0 0 0 -1 f151=[-1;15]; e=[1:1:4]';%結點編號 ff=[0 0 11;0 0 11;0 0 11;0 0 11];%0 x=[0,1,1,0]';%結點x位置 y=[0,0,1,1]';%結點y位置 z=[0,0,0,0]';%結點z位置 f152=[e,ff,x,y,z]; f153=[-1;-1;71]; eee=[1,1,2,2,3,3,4,4]';%結點編號 fff=[1,21,1;2,0,0;1,21,1;3,0,0;1,21,1;4,0,0;1,21,1;1,0,0;]; xxx=[1,0,1,0,1,0,1,0]';%結點x位置 yyy=[7,0,7,0,7,0,7,0]';%結點y位置 zzz=[2,0,2,0,2,0,2,0]';%結點z位置 f154=[eee,fff,xxx,yyy,zzz]; f155=[-1];
-1 15 1 0 0 11 0.000e+000 0.000e+000 0.000e+000 2 0 0 11 1.000e+000 0.000e+000 0.000e+000 3 0 0 11 1.000e+000 1.000e+000 0.000e+000 4 0 0 11 0.000e+000 1.000e+000 0.000e+000 -1 -1 71 1 1 21 1 1 7 2 1 2 0 0 0 0 0 2 1 21 1 1 7 2 2 3 0 0 0 0 0 3 1 21 1 1 7 2 3 4 0 0 0 0 0 4 1 21 1 1 7 2 4 1 0 0 0 0 0 -1 實例-製作f15.dat %製作F151 fid = fopen('F15.dat', 'w'); fprintf(fid, ' %1.0f\r\n', f151'); fclose(fid); %製作F152 fid = fopen('F15.dat', 'a'); fprintf(fid, ' %1.0f %1.0f %1.0f %1.0f %6.3e %6.3e %6.3e\r\n', f152'); fclose(fid); %製作F153 fid = fopen('F15.dat', 'a'); fprintf(fid, ' %1.0f\r\n', f153'); fclose(fid); %製作F154 fid = fopen('F15.dat', 'a'); fprintf(fid, ' %1.0f %1.0f %1.0f %1.0f %1.0f %1.0f %1.0f\r\n', f154'); fclose(fid); %製作F155 fid = fopen('F15.dat', 'a'); fprintf(fid, ' %1.0f', f155'); fclose(fid); 1.0f代表輸出一格欄位,小數點後0位之數值 \r\n代表換行,將f153矩陣放入此檔案中
驗證bepo2d和學長寫的DBEM程式解相同問題時解是否相同驗證bepo2d和學長寫的DBEM程式解相同問題時解是否相同 • 邊界形狀(紅色為元素,黑色為結點) 2 1 2 3 6 8 7 4 5 Plot圖(紅色為元素,黑色為結點)
驗證DBEM和fortran製作的input檔是否相同 • Dirichlet問題 f02=[ ] • 沒有內點 f80=[ ]
驗證 BCT_UT = 0.2389 0.1779 0.1779 0.2389 0.6414 -0.2952 -1.9236 -1.9236 -0.2952 0.6414 BCU_UT = 1.5000 1.5000 1.5000 1.5000 1.5000 1.1250 0.1250 0.1250 1.1250 1.5000 BCU_LM = 1.5000 1.5000 1.5000 1.5000 1.5000 1.1250 0.1250 0.1250 1.1250 1.5000 BCT_LM = 0.3116 0.2112 0.2112 0.3116 0.6454 -0.1811 -1.8389 -1.8389 -0.1811 0.6454 • Yu(DualBEM) • bepo2d U T KERNEL ANS BCU( 1)= 1.500 U T KERNEL ANS BCU( 2)= 1.500 U T KERNEL ANS BCU( 3)= 1.500 U T KERNEL ANS BCU( 4)= 1.500 U T KERNEL ANS BCU( 5)= 1.500 U T KERNEL ANS BCU( 6)= 1.125 U T KERNEL ANS BCU( 7)= 0.125 U T KERNEL ANS BCU( 8)= 0.125 U T KERNEL ANS BCU( 9)= 1.125 U T KERNEL ANS BCU( 10)= 1.500 = 0.239 = 0.178 = 0.178 = 0.239 = 0.641 = -0.295 = -1.924 = -1.924 = -0.295 = 0.641 =1.500 =1.500 =1.500 =1.500 =1.500 =1.125 =0.125 =0.125 =1.125 =1.500 =0.312 =0.211 =0.211 =0.312 =0.645 =-0.181 =-1.839 =-1.839 =-0.181 =0.645
驗證U Kernel • Yu(DualBEM) • bepo2d UKernel = -2.0000 1.0505 2.2163 2.5120 2.2163 0.8304 0.6000 0.6000 0.8304 1.0505 1.0505 -2.0000 1.0505 2.2163 2.5120 1.1350 0.7731 0.7731 1.1350 2.2163 2.2163 1.0505 -2.0000 1.0505 2.2163 1.1350 0.7731 0.7731 1.1350 2.5120 2.5120 2.2163 1.0505 -2.0000 1.0505 0.8304 0.6000 0.6000 0.8304 2.2163 2.2163 2.5120 2.2163 1.0505 -2.0000 -0.0931 0.2774 0.2774 -0.0931 1.0505 1.6706 2.3069 2.3069 1.6706 -0.3401 -1.6931 -0.0452 -0.0452 -1.6931 -0.3401 1.2613 1.6228 1.6228 1.2613 0.7162 -0.0452 -1.6931 -1.6931 -0.0452 0.7162 1.2613 1.6228 1.6228 1.2613 0.7162 -0.0452 -1.6931 -1.6931 -0.0452 0.7162 1.6706 2.3069 2.3069 1.6706 -0.3401 -1.6931 -0.0452 -0.0452 -1.6931 -0.3401 1.0505 2.2163 2.5120 2.2163 1.0505 -0.0931 0.2774 0.2774 -0.0931 -2.0000 U(I,J) OF U(s,x) INTEGRATION -2.00000 1.05049 2.21630 2.51202 2.21630 0.83036 0.60005 0.60005 0.83036 1.05049 1.05049 -2.00000 1.05049 2.21630 2.51202 1.13500 0.77308 0.77308 1.13500 2.21630 2.21630 1.05049 -2.00000 1.05049 2.21630 1.13500 0.77308 0.77308 1.13500 2.51202 2.51202 2.21630 1.05049 -2.00000 1.05049 0.83036 0.60005 0.60005 0.83036 2.21630 2.21630 2.51202 2.21630 1.05049 -2.00000 -0.09310 0.27741 0.27741 -0.09310 1.05049 1.67061 2.30692 2.30692 1.67061 -0.34010 -1.69315 -0.04523 -0.04523 -1.69315 -0.34010 1.26131 1.62281 1.62281 1.26131 0.71621 -0.04523 -1.69315 -1.69315 -0.04523 0.71621 1.26131 1.62281 1.62281 1.26131 0.71621 -0.04523 -1.69315 -1.69315 -0.04523 0.71621 1.67061 2.30692 2.30692 1.67061 -0.34010 -1.69315 -0.04523 -0.04523 -1.69315 -0.34010 1.05049 2.21630 2.51202 2.21630 1.05049 -0.09310 0.27741 0.27741 -0.09310 -2.00000
驗證T Kernel • Yu(DualBEM) • bepo2d TKernel = -3.1416 0.7137 0.5760 0.5621 0.5760 -0.3335 -0.5236 0.5236 0.3335 0.7137 0.7137 -3.1416 0.7137 0.5760 0.5621 -0.0909 -0.1901 0.1901 0.0909 0.5760 0.5760 0.7137 -3.1416 0.7137 0.5760 0.0909 0.1901 -0.1901 -0.0909 0.5621 0.5621 0.5760 0.7137 -3.1416 0.7137 0.3335 0.5236 -0.5236 -0.3335 0.5760 0.5760 0.5621 0.5760 0.7137 -3.1416 1.0472 0.5236 -0.5236 -1.0472 0.7137 0.6839 0.6059 0.6059 0.6839 1.8518 -3.1416 0 0 -3.1416 1.8518 0.9948 0.8571 0.8571 0.9948 1.2898 0 -3.1416 -3.1416 0 1.2898 0.9948 0.8571 0.8571 0.9948 1.2898 0 -3.1416 -3.1416 0 1.2898 0.6839 0.6059 0.6059 0.6839 1.8518 -3.1416 0 0 -3.1416 1.8518 0.7137 0.5760 0.5621 0.5760 0.7137 -1.0472 -0.5236 0.5236 1.0472 -3.1416 T(I,J) OF T(s,x) INTEGRATION -3.14159 0.71372 0.57604 0.56207 0.57604 -0.33347 -0.52360 0.52360 0.33347 0.71372 0.71372 -3.14159 0.71372 0.57604 0.56207 -0.09091 -0.19013 0.19013 0.09091 0.57604 0.57604 0.71372 -3.14159 0.71372 0.57604 0.09091 0.19013 -0.19013 -0.09091 0.56207 0.56207 0.57604 0.71372 -3.14159 0.71372 0.33347 0.52360 -0.52360 -0.33347 0.57604 0.57604 0.56207 0.57604 0.71372 -3.14159 1.04720 0.52360 -0.52360 -1.04720 0.71372 0.68387 0.60589 0.60589 0.68387 1.85183 -3.14159 0.00000 0.00000 -3.14159 1.85183 0.99476 0.85707 0.85707 0.99476 1.28976 0.00000 -3.14159 -3.14159 0.00000 1.28976 0.99476 0.85707 0.85707 0.99476 1.28976 0.00000 -3.14159 -3.14159 0.00000 1.28976 0.68387 0.60589 0.60589 0.68387 1.85183 -3.14159 0.00000 0.00000 -3.14159 1.85183 0.71372 0.57604 0.56207 0.57604 0.71372 -1.04720 -0.52360 0.52360 1.04720 -3.14159
驗證L Kernel • Yu(DualBEM) • bepo2d LKernel = 3.1416 0.4857 0.5561 0.5621 0.5561 0.3335 0.5236 0.5236 0.3335 0.4857 0.4857 3.1416 0.4857 0.5561 0.5621 0.3135 0.4620 0.4620 0.3135 0.5561 0.5561 0.4857 3.1416 0.4857 0.5561 0.3135 0.4620 0.4620 0.3135 0.5621 0.5621 0.5561 0.4857 3.1416 0.4857 0.3335 0.5236 0.5236 0.3335 0.5561 0.5561 0.5621 0.5561 0.4857 3.1416 0.5236 0.7375 0.7375 0.5236 0.4857 -0.6839 -0.1813 0.1813 0.6839 2.0366 3.1416 0 0.0000 -3.1416 -2.0366 -0.9948 -0.3530 0.3530 0.9948 0.8041 0 3.1416 -3.1416 -0.0000 -0.8041 0.9948 0.3530 -0.3530 -0.9948 -0.8041 -0.0000 -3.1416 3.1416 0 0.8041 0.6839 0.1813 -0.1813 -0.6839 -2.0366 -3.1416 0.0000 0 3.1416 2.0366 0.4857 0.5561 0.5621 0.5561 0.4857 0.5236 0.7375 0.7375 0.5236 3.1416 L(I,J) OF L(s,x) INTEGRATION 3.14159 0.48574 0.55607 0.56207 0.55607 0.33347 0.52360 0.52360 0.33347 0.48574 0.48574 3.14159 0.48574 0.55607 0.56207 0.31351 0.46195 0.46195 0.31351 0.55607 0.55607 0.48574 3.14159 0.48574 0.55607 0.31351 0.46195 0.46195 0.31351 0.56207 0.56207 0.55607 0.48574 3.14159 0.48574 0.33347 0.52360 0.52360 0.33347 0.55607 0.55607 0.56207 0.55607 0.48574 3.14159 0.52360 0.73751 0.73751 0.52360 0.48574 -0.68387 -0.18131 0.18131 0.68387 2.03657 3.14159 0.00000 0.00000 -3.14159 -2.03657 -0.99476 -0.35304 0.35304 0.99476 0.80411 0.00000 3.14159 -3.14159 0.00000 -0.80411 0.99476 0.35304 -0.35304 -0.99476 -0.80411 0.00000 -3.14159 3.14159 0.00000 0.80411 0.68387 0.18131 -0.18131 -0.68387 -2.03657 -3.14159 0.00000 0.00000 3.14159 2.03657 0.48574 0.55607 0.56207 0.55607 0.48574 0.52360 0.73751 0.73751 0.52360 3.14159
驗證M Kernel • Yu(DualBEM) • bepo2d MKernel = 2.0000 -0.7143 -0.2088 -0.1538 -0.2088 0.0357 0.2500 -0.2500 -0.0357 -0.7143 -0.7143 2.0000 -0.7143 -0.2088 -0.1538 0.0055 0.0714 -0.0714 -0.0055 -0.2088 -0.2088 -0.7143 2.0000 -0.7143 -0.2088 -0.0055 -0.0714 0.0714 0.0055 -0.1538 -0.1538 -0.2088 -0.7143 2.0000 -0.7143 -0.0357 -0.2500 0.2500 0.0357 -0.2088 -0.2088 -0.1538 -0.2088 -0.7143 2.0000 -0.5000 -0.5000 0.5000 0.5000 -0.7143 0.1164 0.0154 -0.0154 -0.1164 -2.1538 4.0000 -1.3333 1.3333 -4.0000 2.1538 0.4396 0.1143 -0.1143 -0.4396 -0.5128 -1.3333 4.0000 -4.0000 1.3333 0.5128 -0.4396 -0.1143 0.1143 0.4396 0.5128 1.3333 -4.0000 4.0000 -1.3333 -0.5128 -0.1164 -0.0154 0.0154 0.1164 2.1538 -4.0000 1.3333 -1.3333 4.0000 -2.1538 -0.7143 -0.2088 -0.1538 -0.2088 -0.7143 0.5000 0.5000 -0.5000 -0.5000 2.0000 M(I,J) OF M(s,x) INTEGRATION 2.00000 -0.71429 -0.20879 -0.15385 -0.20879 0.03571 0.25000 -0.25000 -0.03571 -0.71429 -0.71429 2.00000 -0.71429 -0.20879 -0.15385 0.00549 0.07143 -0.07143 -0.00549 -0.20879 -0.20879 -0.71429 2.00000 -0.71429 -0.20879 -0.00549 -0.07143 0.07143 0.00549 -0.15385 -0.15385 -0.20879 -0.71429 2.00000 -0.71429 -0.03571 -0.25000 0.25000 0.03571 -0.20879 -0.20879 -0.15385 -0.20879 -0.71429 2.00000 -0.50000 -0.50000 0.50000 0.50000 -0.71429 0.11642 0.01544 -0.01544 -0.11642 -2.15385 4.00000 -1.33333 1.33333 -4.00000 2.15385 0.43956 0.11429 -0.11429 -0.43956 -0.51282 -1.33333 4.00000 -4.00000 1.33333 0.51282 -0.43956 -0.11429 0.11429 0.43956 0.51282 1.33333 -4.00000 4.00000 -1.33333 -0.51282 -0.11642 -0.01544 0.01544 0.11642 2.15385 -4.00000 1.33333 -1.33333 4.00000 -2.15385 -0.71429 -0.20879 -0.15385 -0.20879 -0.71429 0.50000 0.50000 -0.50000 -0.50000 2.00000
u=x (0,1) (1,1) 3 4 3 元素 u=0 u=y 4 2 結點 1 2 1 (0,0) (1,0) u=0 練習 • 邊界形狀如圖所示