應力狀態(tài)分析、壓桿穩(wěn)定性分析_第1頁
應力狀態(tài)分析、壓桿穩(wěn)定性分析_第2頁
應力狀態(tài)分析、壓桿穩(wěn)定性分析_第3頁
應力狀態(tài)分析、壓桿穩(wěn)定性分析_第4頁
應力狀態(tài)分析、壓桿穩(wěn)定性分析_第5頁
已閱讀5頁,還剩26頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、Harbin Institute of Technology 材料力學上機報告 設(shè)計題目: 應力狀態(tài)分析、壓桿穩(wěn)定性分析 院 系: 機電工程學院 班 級: 設(shè) 計 者: 學 號: 指導教師: 張桂蓮 設(shè)計時間: 哈爾濱工業(yè)大學材料力學上機報告一、 問題描述應力狀態(tài)分析:輸入:1.平面應力狀態(tài)輸入:(x、y、xy);某截面方位角2.空間應力狀態(tài)輸入:(x、y、z、xy、yz、zx)輸出:1.輸出主應力(1、2、3)2.最大切應力(max=13=)3.如為平面應力狀態(tài)則需輸出方位角斜截面上的應力、及主方位角4.畫出應力圓示意圖壓桿穩(wěn)定分析輸入:1.截面參數(shù)輸入圓截面d圓環(huán)截面D,d矩形截面h,b工

2、字型截面對形心軸的慣性矩Iy、Iz及截面面積A2.相當長度系數(shù)、長度l3.材料參數(shù):E、,p、s;線性經(jīng)驗公式系數(shù)a、b4.工作壓力P及穩(wěn)定安全系數(shù)nw輸出:1. 繪制臨界應力總圖(圖示)2. 臨界壓力Pcr或臨界應力cr3. 穩(wěn)定安全校核結(jié)果二、程序源代碼本程序采用Visual Basic 6.0編寫平面應力狀態(tài)分析Private Sub Timer1_Timer()End SubPrivate Sub Command1_Click()Dim x As Double, y As Double, xy As Double, As Double, X As Double, Y As Double

3、, z As Double'輸入數(shù)據(jù)(x , y ,xy );某截面方位角"x = Val(Text1.Text)y = Val(Text2.Text)xy = Val(Text3.Text) = Val(Text4.Text) / 180 * 4 * Atn(1)'計算主應力X = 0Y = (x + y) / 2 + (x - y) 2 / 4 + xy 2) 0.5z = (x + y) / 2 - (x - y) 2 / 4 + xy 2) 0.5'比較大小,輸出主應力(1 , 2 , 3 )和最大剪應力max =13 =(1 - 3)/2If X &

4、gt;= Y And X >= z ThenText5.Text = Str(X)Text6.Text = Str(Y)Text7.Text = Str(z)Text8.Text = Str(X - z) / 2) Else If X <= Y And X <= z ThenText5.Text = Str(Y)Text6.Text = Str(z)Text7.Text = Str(X)Text8.Text = Str(Y - X) / 2) ElseText5.Text = Str(Y)Text6.Text = Str(X)Text7.Text = Str(z)Text8.

5、Text = Str(Y - z) / 2)End IfEnd If'計算并輸出,Text9.Text = Str(x + y) / 2 + (x - y) / 2 * Cos(2 * ) + xy * Sin(2 * )Text10.Text = Str(-(x - y) / 2 * Sin(2 * ) + xy * Cos(2 * )If x = y ThenText11.Text = Str(45) Else Text11.Text = Str(Atn(xy * 2 / (x - y) / 2) / (4 * Atn(1) * 180)End If'輸出應力圓Pictur

6、e1.ScaleMode = 3k = Text8.TextPicture1.Scale (-130 - Abs(x + y) - 2 * k, 100 + 5 * k)-(130 + Abs(x + y) + 2 * k, -100 - 5 * k)Picture1.Line (-130 - Abs(x + y) - 2 * k, 0)-(130 + Abs(x + y) + 2 * k, 0)Picture1.Line (0, -100 - 5 * k)-(0, 100 + 5 * k)Picture1.Circle (x + y) / 2, 0), (x - y) 2 / 4 + xy

7、2) 0.5, QBColor(12)End SubPrivate Sub Command2_Click()'清空文本框Text1.Text = "0"Text2.Text = "0"Text3.Text = "0"Text4.Text = "0"Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.

8、Text = ""Text11.Text = ""'清除圖片框Picture1.Cls'返回光標Text1.SetFocusEnd SubPrivate Sub Command3_Click()Me.HideForm10.Visible = TrueEnd SubPrivate Sub Command4_Click() Me.Hide Form4.Visible = TrueEnd SubPrivate Sub Label18_Click()End SubPrivate Sub Form_Load()End Sub二向應力狀態(tài)效果圖空間應

9、力狀態(tài)分析Private Sub Command1_Click()Dim x As Double, y As Double, z As Double, xy As Double, yz As Double, zx As Double'輸入數(shù)據(jù)(x ,y ,z ,xy ,yz ,zx )x = Val(Text13.Text)y = Val(Text14.Text)z = Val(Text15.Text)xy = Val(Text16.Text)yz = Val(Text17.Text)zx = Val(Text18.Text) '計算I1,I2,I3;得到方程"x3-

10、I1*x2+I2*x-I3=0" I1 = x + y + z I2 = x * y - xy 2 + y * z - yz 2 + z * x - zx 2 I3 = (y * z - yz 2) * x - (xy * z - yz * zx) * xy + (xy * yz - zx * y) * zx'用盛金公式求解方程"x3-I1*x2+I2*x-I3=0"的根X1,X2,X3a = I1 2 - 3 * 1 * I2b = -I1 * I2 + 9 * 1 * I3c = I2 2 - 3 * I1 * I3d = b 2 - 4 * a *

11、c'當有三個相等實根時If (a = 0 And b = 0) ThenX1 = I1 / 3X2 = I1 / 3X3 = I1 / 3End If'當有兩個相等實根時If (a <> 0 And d = 0) ThenX1 = I1 + b / aX2 = -b / (2 * a)X3 = -b / (2 * a)End If'當有三個互不相等實根時If (d < 0 And a > 0) Then t = (-2 * a * I1 - 3 * b) / (2 * a (3 / 2) If (t = 0) Then u = 3.1415926

12、5357979 / 2 X1 = (I1 - 2 * a (1 / 2) * Cos(u / 3) / 3 X2 = (I1 + a (1 / 2) * (Cos(u / 3) + 3 (1 / 2) * Sin(u / 3) / 3 X3 = (I1 + a (1 / 2) * (Cos(u / 3) - 3 (1 / 2) * Sin(u / 3) / 3 Else If (-1 < t And t < 1 And t <> 0) Then u = Atn(1 - t 2) / t) X1 = (I1 - 2 * a (1 / 2) * Cos(u / 3) / 3

13、 X2 = (I1 + a (1 / 2) * (Cos(u / 3) + 3 (1 / 2) * Sin(u / 3) / 3 X3 = (I1 + a (1 / 2) * (Cos(u / 3) - 3 (1 / 2) * Sin(u / 3) / 3 End If End IfEnd If'當不全是實根時If (d > 0 Or d < 0 And a <= 0) ThenMsgBox "方程可能不全是實根,無法比較根的大小,請重新輸入", vbOKOnly, "溫馨提示"Text13.Text = ""

14、;Text14.Text = ""Text15.Text = ""Text16.Text = ""Text17.Text = ""Text18.Text = ""Text13.SetFocusEnd If'比較大小,輸出主應力(1 , 2 , 3 )和最大剪應力max =13 =(1 - 3)/2以及應力圓 If (X1 >= X2 And X2 >= X3) Then Text19.Text = Str(X1) Text20.Text = Str(X2) Text21.Te

15、xt = Str(X3) Text22.Text = Str(X1 - X3) / 2) End If If (X1 >= X3 And X3 >= X2) Then Text19.Text = Str(X1) Text20.Text = Str(X3) Text21.Text = Str(X2) Text22.Text = Str(X1 - X2) / 2) Picture2.ScaleMode = 3 End If If (X2 >= X1 And X1 >= X3) Then Text19.Text = Str(X2) Text20.Text = Str(X1)

16、Text21.Text = Str(X3) Text22.Text = Str(X2 - X3) / 2) End If If (X2 >= X3 And X3 >= X1) Then Text19.Text = Str(X2) Text20.Text = Str(X3) Text21.Text = Str(X1) Text22.Text = Str(X2 - X1) / 2) End If If (X3 >= X1 And X1 >= X2) Then Text19.Text = Str(X3) Text20.Text = Str(X1) Text21.Text =

17、Str(X2) Text22.Text = Str(X3 - X1) / 2) End If If (X3 >= X2 And X2 >= X1) Then Text19.Text = Str(X3) Text20.Text = Str(X2) Text21.Text = Str(X1) Text22.Text = Str(X3 - X1) / 2) End If '輸出應力圓 A1 = Val(Text19.Text) B1 = Val(Text20.Text) C1 = Val(Text21.Text) E1 = Val(Text22.Text) Picture2.Sc

18、aleMode = 3 Picture2.Scale (-100 + C1 - (A1 - C1), 80 + (A1 - C1)-(100 + C1 + (A1 - C1), -80 - (A1 - C1) Picture2.Line (-100 + C1 - (A1 - C1), 0)-(100 + C1 + (A1 - C1), 0) Picture2.Line (0, -80 - (A1 - C1)-(0, 80 + (A1 - C1) Picture2.Circle (A1 + C1) / 2, 0), (A1 - C1) / 2, QBColor(12) Picture2.Circ

19、le (A1 + B1) / 2, 0), (A1 - B1) / 2, QBColor(12) Picture2.Circle (B1 + C1) / 2, 0), (B1 - C1) / 2, QBColor(12) End SubPrivate Sub Command2_Click()'清空文本框Text13.Text = ""Text14.Text = ""Text15.Text = ""Text16.Text = ""Text17.Text = ""Text18.Text =

20、""Text19.Text = ""Text20.Text = ""Text21.Text = ""Text22.Text = ""'清除圖片框Picture2.Cls'返回光標Text13.SetFocusEnd SubPrivate Sub Command3_Click() Me.Hide Form10.Visible = TrueEnd SubPrivate Sub Command4_Click()Me.HideForm4.Visible = TrueEnd SubPriv

21、ate Sub Form_Load()End Sub 空間應力狀態(tài)分析圓形截面壓桿穩(wěn)定性分析Private Sub Command1_Click()Dim d, u, l, e, tp, ts, a, b, p, n, t As DoubleDim i, s As DoubleDim r, rp, rs As DoubleConst pi = 3.1415d = Val(Text1.Text)u = Val(Text2.Text)l = Val(Text3.Text)e = Val(Text4.Text)tp = Val(Text5.Text)ts = Val(Text6.Text)a = V

22、al(Text7.Text)b = Val(Text8.Text)p = Val(Text9.Text)n = Val(Text10.Text)i = pi * d 4 / 64s = pi * d * d / 4r = 1000 * u * l / Sqr(i / s)rp = pi * Sqr(e / tp)rs = (a - ts) / bIf r >= rp Thent = pi 2 * e / (r 2 * n)Text11.Text = tIf p / s <= t ThenText12.Text = "滿足穩(wěn)定條件"ElseText12.Text

23、= "不滿足穩(wěn)定條件"End IfElseIf r >= rs Thent = (a - b * r) / nText11.Text = tIf p / s <= t ThenText12.Text = "滿足穩(wěn)定條件"ElseText12.Text = "不滿足穩(wěn)定條件"End IfElseText11.Text = ""Text12.Text = "這是一個強度問題"End IfDim Y As DoublePicture1.ClsPicture1.ScaleMode = 0Pi

24、cture1.Scale (-10, 300)-(200, -10)Picture1.DrawWidth = 1Picture1.Line (0, 0)-(200, 0), RGB(0, 0, 255)Picture1.Line (0, 0)-(0, 300), RGB(0, 0, 255)For X = 0 To rs Step 0.01Y = tsPicture1.PSet (X, Y), RGB(255, 0, 0)Next XFor X = rs To rp Step 0.01Y = a - b * XPicture1.PSet (X, Y), RGB(255, 0, 0)Next X

25、For X = rp To 300 Step 0.01Y = pi 2 * e / X 2Picture1.PSet (X, Y), RGB(255, 0, 0)Next XEnd SubPrivate Sub Command2_Click()Me.HideForm1.Visible = TrueEnd SubPrivate Sub Command3_Click()Me.HideForm4.Visible = TrueEnd SubPrivate Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)End Sub圖3

26、圓形截面壓桿穩(wěn)定性分析輸出結(jié)果例4利用程序進行圓環(huán)形截面壓桿穩(wěn)定性分析,外徑D=200mm,內(nèi)徑d=50mm,長度系數(shù)=1,桿長l=2000mm,彈性模量E=50000MPa,比例極限p=240MPa,屈服極限s=320MPa,系數(shù)a=234,系數(shù)b=1234,工作壓力P=30000N,安全系數(shù)n=4.5。輸出結(jié)果如圖4所示。圓環(huán)形壓桿穩(wěn)定性分析Private Sub Command1_Click()Dim d1, d2, u, l, e, tp, ts, a, b, p, n, t As DoubleDim i, s As DoubleDim r, rp, rs As DoubleConst

27、 pi = 3.1415d1 = Text1.Textd2 = Text13.Textu = Text2.Textl = Text3.Texte = Text4.Texttp = Text5.Textts = Text6.Texta = Text7.Textb = Text8.Textp = Text9.Textn = Text10.Texti = pi * (d1 4 - d2 4) / 64s = pi * (d1 2 - d2 2) / 4r = 1000 * u * l / Sqr(i / s)rp = pi * Sqr(e / tp)rs = (a - ts) / bIf r >

28、;= rp Thent = pi 2 * e / (r 2 * n)Text11.Text = tIf p / s <= t ThenText12.Text = "滿足穩(wěn)定條件"ElseText12.Text = "不滿足穩(wěn)定條件"End IfElseIf r >= rs Thent = (a - b * r) / nText11.Text = tIf p / s <= t ThenText12.Text = "滿足穩(wěn)定條件"ElseText12.Text = "不滿足穩(wěn)定條件"End IfEls

29、eText11.Text = ""Text12.Text = "這是一個強度問題"End IfDim Y As DoublePicture1.ClsPicture1.ScaleMode = 0Picture1.Scale (-10, 300)-(200, -10)Picture1.DrawWidth = 1Picture1.Line (0, 0)-(200, 0), RGB(0, 0, 255)Picture1.Line (0, 0)-(0, 300), RGB(0, 0, 255)For X = 0 To rs Step 0.01Y = tsPictu

30、re1.PSet (X, Y), RGB(255, 0, 0)Next XFor X = rs To rp Step 0.01Y = a - b * XPicture1.PSet (X, Y), RGB(255, 0, 0)Next XFor X = rp To 300 Step 0.01Y = pi 2 * e / X 2Picture1.PSet (X, Y), RGB(255, 0, 0)Next XEnd SubPrivate Sub Command2_Click()Me.HideForm1.Visible = TrueEnd SubPrivate Sub Command3_Click

31、()Me.HideForm4.Visible = TrueEnd SubPrivate Sub Frame2_DragDrop(Source As Control, X As Single, Y As Single)End Sub圖4 圓環(huán)形截面壓桿穩(wěn)定性分析輸出結(jié)果例5利用程序進行矩形截面壓桿穩(wěn)定性分析,高度h=250mm,寬度b=120mm,長度系數(shù)=1,桿長l=12mm,彈性模量E=300000MPa,比例極限p=240MPa,屈服極限s=320MPa,系數(shù)a=341,系數(shù)b=2658,工作壓力P=30000N,安全系數(shù)n=4.5。輸出結(jié)果如圖5所示。矩形截面壓桿穩(wěn)定性分析Private

32、 Sub Command1_Click()Dim h, d, u, l, e, tp, ts, a, b, p, n, t As DoubleDim i, s As DoubleDim r, rp, rs As DoubleConst pi = 3.1415h = Text1.Textd = Text13.Textu = Text2.Textl = Text3.Texte = Text4.Texttp = Text5.Textts = Text6.Texta = Text7.Textb = Text8.Textp = Text9.Textn = Text10.Texti = h * d 3 /

33、 12s = h * dr = 1000 * u * l / Sqr(i / s)rp = pi * Sqr(e / tp)rs = (a - ts) / bIf r >= rp Thent = pi 2 * e / (r 2 * n)Text11.Text = tIf p / s <= t ThenText12.Text = "滿足穩(wěn)定條件"ElseText12.Text = "不滿足穩(wěn)定條件"End IfElseIf r >= rs Thent = (a - b * r) / nText11.Text = tIf p / s <

34、;= t ThenText12.Text = "滿足穩(wěn)定條件"ElseText12.Text = "不滿足穩(wěn)定條件"End IfElseText11.Text = ""Text12.Text = "這是一個強度問題"End IfDim Y As DoublePicture1.ClsPicture1.ScaleMode = 0Picture1.Scale (-10, 300)-(200, -10)Picture1.DrawWidth = 1Picture1.Line (0, 0)-(200, 0), RGB(0, 0

35、, 255)Picture1.Line (0, 0)-(0, 300), RGB(0, 0, 255)For X = 0 To rs Step 0.01Y = tsPicture1.PSet (X, Y), RGB(255, 0, 0)Next XFor X = rs To rp Step 0.01Y = a - b * XPicture1.PSet (X, Y), RGB(255, 0, 0)Next XFor X = rp To 300 Step 0.01Y = pi 2 * e / X 2Picture1.PSet (X, Y), RGB(255, 0, 0)Next XEnd SubP

36、rivate Sub Command2_Click()Me.HideForm1.Visible = TrueEnd SubPrivate Sub Command3_Click()Me.HideForm4.Visible = TrueEnd SubPrivate Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)End Sub圖5 矩形截面壓桿穩(wěn)定性分析輸出結(jié)果例6利用程序進行工字形截面壓桿穩(wěn)定性分析,Iy=4215cm4,Iz=3135cm4,A=1223mm2,長度系數(shù)=1,桿長l=450mm,彈性模量E=3000

37、0MPa,比例極限p=240MPa,屈服極限s=320MPa,系數(shù)a=461,系數(shù)b=2561,工作壓力P=30000N,安全系數(shù)n=4.5。輸出結(jié)果如圖6所示。工字形截面壓桿穩(wěn)定性分析Private Sub Command1_Click()Dim iy, iz, s, u, l, e, tp, ts, a, b, p, n, t As DoubleDim i As DoubleDim r, rp, rs As DoubleConst pi = 3.1415iy = Text1.Textiz = Text13.Texts = Text14.Textu = Text2.Textl = Text3.Texte = Text4.Texttp = Text5.Textts = Text6.Texta = Text7.Textb = Text8.Textp = Text9.Textn = Text10.TextIf iz < iy Theni = izElsei = iyEnd Ifr = 1000 * u * l / Sqr(i / s)r

溫馨提示

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

評論

0/150

提交評論