1、材力上机报告 压杆稳定性分析及截面几何性质的计算VBHarbin Institute of Technology材料力学上机作业 课程名称: 材料力学 设计题目:压杆稳定性分析及截面几何性质的计算 院 系: 机电工程学院 班 级: 学 号: 设 计 者: 指导教师: 张桂莲 哈尔滨工业大学2014年6月1.题目:压杆稳定分析输入:1.截面参数输入圆截面d圆环截面D,d矩形截面h,b工字型截面对形心轴的惯性矩Iy、Iz及截面面积A2.相当长度系数、长度l3.材料参数:E、,p、s;线性经验公式系数a、b4.工作压力P及稳定安全系数nw输出:1. 绘制临界应力总图(图示)2. 临界压力Pcr或临界
2、应力cr3. 稳定安全校核结果在此基础上,加了一个截面图形几何性质的计算功能,要求输入截面的几何尺寸,即可输出其面积、形心、惯性矩等几何性质2.程序及截图:Form1Private Sub Command1_Click()Form1.HideForm2.ShowEnd SubPrivate Sub Command2_Click()Form1.HideForm7.ShowEnd SubPrivate Sub Command3_Click()EndEnd SubForm2Private Sub Command1_Click()Form2.HideForm3.ShowEnd SubPrivate S
3、ub Command2_Click()Form2.HideForm4.ShowEnd SubPrivate Sub Command3_Click()Form2.HideForm5.ShowEnd SubPrivate Sub Command4_Click()Form2.HideForm6.ShowEnd SubForm3(圆形截面压杆稳定性判断)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 =
4、 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.Tex
5、t = tIf p / s = 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)-(
6、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,
7、 0)Next XEnd SubPrivate Sub Command2_Click()Form3.HideForm1.ShowEnd SubForm4(圆环截面压杆稳定性判断)t = 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 =
8、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)
9、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 Command2_Click()Form5.HideForm1.ShowEnd
10、SubForm6(工字钢截面压杆稳定性判断)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 = Text
11、8.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 = 不满足稳定条件End IfElseText11.Text = Text12.Text = 这是一个强度问题End IfDim Y As DoublePicture1.ClsPicture1.ScaleMode
12、 = 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)
13、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()Form6.HideForm1.ShowEnd SubForm7Private Sub Command1_Click()Form7.HideForm8.ShowEnd SubPrivate Sub Command2_Click()Form7.HideForm9.ShowEnd SubPrivate Sub Command3_Click()Fo
14、rm7.HideForm10.ShowEnd SubPrivate Sub Command4_Click()Form7.HideForm11.ShowEnd SubPrivate Sub Command5_Click()Form7.HideForm12.ShowEnd SubPrivate Sub Command6_Click()Form7.HideForm13.ShowEnd SubPrivate Sub Command7_Click()Form7.HideForm14.ShowEnd SubPrivate Sub Command8_Click()EndEnd SubForm8(矩形截面几何
15、性质计算)Private Sub Command1_Click()Dim b As Single, h As Single, Y As Single, z As Single, m As Single, n As Single, s As Singleb = Val(Text1.Text)h = Val(Text2.Text)s = b * hY = b / 2z = h / 2m = b * h * h * h / 12n = h * b * b * b / 12Label8.Caption = Str(Y)Label10.Caption = Str(z)Label13.Caption =
16、Str(m)Label15.Caption = Str(n)Label5.Caption = Str(s)End SubPrivate Sub Command2_Click()Text1.Text = Text2.Text = Label8.Caption = Label10.Caption = Label13.Caption = Label15.Caption = Label5.Caption = End SubPrivate Sub Command3_Click()Form8.HideForm1.ShowEnd SubPrivate Sub Command4_Click()EndEnd S
17、ubForm9(圆形截面几何性质计算)Const PI As Single = 3.1415926535Private Sub Command1_Click()Dim d As Single, s As Single, z As Single, m As Single, n As Singled = Val(Text1.Text)s = PI * d * d / 4z = d / 2m = PI * d * d * d * d / 64n = mLabel5.Caption = Str(s)Label8.Caption = Str(z)Label10.Caption = Str(z)Label
18、13.Caption = Str(m)Label15.Caption = Str(n)End SubPrivate Sub Command2_Click()Text1.Text = Label5.Caption = Label8.Caption = Label10.Caption = Label13.Caption = Label15.Caption = End SubPrivate Sub Command3_Click()Form9.HideForm1.ShowEnd SubPrivate Sub Command4_Click()EndEnd SubForm10(三角形截面几何性质计算)Pr
19、ivate Sub Command1_Click()Dim b As Single, h As Single, s As Single, Y As Single, z As Single, m As Single, n As Singleb = Val(Text1.Text)h = Val(Text2.Text)s = b * h / 2Y = b / 3z = h / 3m = b * h * h * h / 36n = h * b * b * b / 36Label8.Caption = Str(Y)Label10.Caption = Str(z)Label13.Caption = Str
20、(m)Label15.Caption = Str(n)Label5.Caption = Str(s)End SubPrivate Sub Command2_Click()Text1.Text = Text2.Text = Label8.Caption = Label10.Caption = Label13.Caption = Label15.Caption = Label5.Caption = End SubPrivate Sub Command3_Click()Form10.HideForm1.ShowEnd SubPrivate Sub Command4_Click()EndEnd Sub
21、Form11(梯形截面几何性质计算)Private Sub Command1_Click()Dim a As Single, b As Single, h As Single, s As Single, Y As Single, z As Single, m As Singlea = Val(Text1.Text)b = Val(Text2.Text)h = Val(Text3.Text)s = (a + b) * h) / 2Y = (a * a + a * b + b * b) / (a + b) * 3)z = (b + 2 * a) * h) / (3 * (a + b)m = (h
22、* h * h * (b * b + 4 * a * b - a * a) / (36 * (a + b)Label5.Caption = Str(s)Label8.Caption = Str(Y)Label10.Caption = Str(z)Label13.Caption = Str(m)End SubPrivate Sub Command2_Click()Text1.Text = Text2.Text = Text3.Text = Label5.Caption = Label8.Caption = Label10.Caption = Label13.Caption = End SubPr
23、ivate Sub Command3_Click()Form11.HideForm1.ShowEnd SubPrivate Sub Command4_Click()EndEnd SubForm12(半圆形截面几何性质计算)Const PI As Single = 3.1415926Private Sub Command1_Click()Dim a As Single, s As Single, Y As Single, z As Single, m As Singlea = Val(Text1.Text)s = PI * a * a / 8Y = 0z = (2 * a) / (3 * PI)
24、m = 0.00686 * a * a * a * aLabel5.Caption = Str(s)Label8.Caption = Str(Y)Label10.Caption = Str(z)Label13.Caption = Str(m)End SubPrivate Sub Command2_Click()Text1.Text = Label5.Caption = Label8.Caption = Label10.Caption = Label13.Caption = End SubPrivate Sub Command3_Click()Form12.HideForm1.ShowEnd SubPrivate Sub Command4_Click()EndEnd SubConst PI As Single = 3.1415926Private Sub Command1_Click()Dim a As Single, b As Single, s As Single, Y As Single, z As Single, m As Sin
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1