《材料力学压杆稳定的计算及判定程序.doc》由会员分享,可在线阅读,更多相关《材料力学压杆稳定的计算及判定程序.doc(8页珍藏版)》请在金锄头文库上搜索。
1、Harbin Institute of Technology材料力学上机作业 课程名称: 材料力学 设计题目: 院 系: 班 级: 分 析 者: 学 号: 指导教师: 哈尔滨工业大学2012年6月压杆稳定的计算及判定程序一、程序简介本程序设计目的是判断各种不同截面杆(圆形截面、矩形截面、圆环形截面和工字型截面)的压杆稳定性。通过输入不同截面杆的各项参数,计算杆的临界应力,校核杆的稳定性。二、程序界面1、选择截面类型界面2、计算校核界面三、程序代码Private Sub Command1_Click() Form1.HideForm2.ShowEnd SubPrivate Sub Command
2、2_Click()Form1.HideForm3.ShowEnd SubPrivate Sub Command3_Click()Form1.HideForm4.ShowEnd SubPrivate Sub Command4_Click()Form1.HideForm4.ShowEnd SubPrivate 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 = Text1.Textu = Tex
3、t2.Textl = Text3.Texte = Text4.Texttp = Text5.Textts = Text6.Texta = Text7.Textb = Text8.Textp = Text9.Textn = Text10.Texti = 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 = rs Thent = (
4、a - b * r) / nText11.Text = tIf p / s = rp Thent = pi 2 * e / (r 2 * n)Text11.Text = tIf p / s = rs Thent = (a - b * r) / nText11.Text = tIf p / s = rp Thent = pi 2 * e / (r 2 * n)Text11.Text = tIf p / s = rs Thent = (a - b * r) / nText11.Text = tIf p / s = t ThenText12.Text = 满足稳定条件ElseText12.Text
5、= 不满足稳定条件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, 255)Picture1.Line (0, 0)-(0, 300), RGB(0, 0, 255)For x = 0 To rs Step 0.01y = tsPicture1.PS
6、et (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 Command1_Click()Dim iy, iz, s, u, l, e, tp, ts, a, b, p, n, t As DoubleDim i As Do
7、ubleDim 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 = rp Thent = pi 2 * e / (r 2 * n)Text11.Text = tIf p / s = rs Thent = (a - b * r) / nText11.Text = tIf p / s = t ThenText12.Text = 满足稳定条件ElseText12.Text = 不满足稳定