哈工大材料力学上机大作业(压杆稳定).doc
【精品文档】如有侵权,请联系网站删除,仅供学习与交流哈工大材料力学上机大作业(压杆稳定).精品文档.材料力学上机大作业压杆稳定分析作者班号: 1008102 作者学号:作者姓名: 指导教师: 完成时间:1、 题目:压杆稳定分析输入:1.截面参数输入圆截面d圆环截面D,d矩形截面h,b工字型截面对形心轴的惯性矩Iy、Iz及截面面积A2.相当长度系数、长度l3.材料参数:E、,p、s;线性经验公式系数a、b4.工作压力P及稳定安全系数nw输出:1. 绘制临界应力总图(图示)2. 临界压力Pcr或临界应力cr3. 稳定安全校核结果2、程序及截图Private Sub Command1_Click()Form1.HideForm2.ShowEnd SubPrivate Sub Command2_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 = Text2.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 <= t ThenText12.Text = "满足稳定条件"ElseText12.Text = "不满足稳定条件"End IfElseIf r >= rs Thent = (a - b * r) / nText11.Text = tIf p / s <= t ThenText12.Text = "满足稳定条件"ElseText12.Text = "不满足稳定条件"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.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 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 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 >= rp Thent = pi 2 * e / (r 2 * n)Text11.Text = tIf p / s <= t ThenText12.Text = "满足稳定条件"ElseText12.Text = "不满足稳定条件"End IfElseIf r >= rs Thent = (a - b * r) / nText11.Text = tIf p / s <= t ThenText12.Text = "满足稳定条件"ElseText12.Text = "不满足稳定条件"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.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 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 / 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 = "满足稳定条件"ElseText12.Text = "不满足稳定条件"End IfElseIf r >= rs Thent = (a - b * r) / nText11.Text = tIf p / s <= t ThenText12.Text = "满足稳定条件"ElseText12.Text = "不满足稳定条件"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.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 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)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 = "满足稳定条件"ElseText12.Text = "不满足稳定条件"End IfElseIf r >= rs Thent = (a - b * r) / nText11.Text = tIf p / s <= t ThenText12.Text = "满足稳定条件"ElseText12.Text = "不满足稳定条件"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.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 Sub如下图:Dim y As DoublePicture1.Cls Picture1.ScaleMode = 0 Picture1.Scale (-10, 300)-(200, -10) Picture1.DrawWidth = 1 Picture1.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.01 y = ts Picture1.PSet (x, y), RGB(255, 0, 0) Next x For x = rs To rp Step 0.01 y = a - b * x Picture1.PSet (x, y), RGB(255, 0, 0) Next x For x = rp To 300 Step 0.01 y = pi 2 * e / x 2 Picture1.PSet (x, y), RGB(255, 0, 0) Next xPrivate Sub Form_Load()Me.Picture = LoadPicture("E:UsersxjnPicturesLotus.jpg") '自己改图片路径Me.AutoRedraw = TrueEnd SubPrivate Sub Form_Resize()Me.PaintPicture Me.Picture, 0, 0, Me.Width, Me.HeightEnd Sub