材料力学上机大作业—二向应力状态分析
Harbin Institute of Technology Harbin Institute of Technology
二向应力状态分析
一、 程序功能说明
本程序是基于二向应力状态分析的通用程序,编程语言为VB,编程软件为visual basic6.0精简版。
该程序所运用的材料力学知识有:二向应力状态下任意斜截面的应力计算,该点的主应力及主方向的计算,主切应力的计算并且输出莫尔圆。 二、 程序及源代码
界面一:
注释:程序运行的首页面,此设计旨在让程序有一定交互性 源代码如下:
Private Sub Command1_Click() form1.Hide
form2.Show
End Sub
Private Sub Command2_Click() End
End Sub
Private Sub Form_Load()
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Label2_Click()
End Sub
界面二:
注释:此界面操作者可以输入数据来求解未知量。
源代码如下:
Private Sub Command1_Click()
Dim a, b, c, d, e, f, g, o, r As Single e = 3.1416
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
d = Val(Text4.Text)
If Check1.Value = 1 Then
Text5.Text = (a + b) / 2 + (a - b) * Cos(2 * d * e / 180) / 2 + c * Sin(2 * d * e / 180)
Text6.Text = -(a - b) * Sin(2 * d * e / 180) / 2 + c * Cos(2 * d * e / 180)
Else
End If
If Check2.Value = 1 Then
Text7.Text = (a + b) / 2 + Sqr((a - b) * (a - b) / 4 + c * c)
Text8.Text = (a + b) / 2 - Sqr((a - b) * (a - b) / 4 + c * c)
Text9.Text = Atn(2 * c / (a - b)) / 2 * 180 / e
g = Text9.Text * e / 180
o = (a + b) / 2
r = (((a + b) / 2 + Sqr((a - b) * (a - b) / 4 + c * c) - ((a + b) / 2 - Sqr((a - b) * (a - b) / 4
+ c * c)))) / 2
Picture1.Scale (-500, 500)-(500, -500) Picture1.Line (-400, 0)-(400, 0) Picture1.Line (-200, -400)-(-200, 400) Picture1.CurrentX = 400
Picture1.CurrentY = 20
Picture1.Print "?x"
Picture1.CurrentX = -228
Picture1.CurrentY = 400
Picture1.Print "?y"
Picture1.Circle (o, 0), r
Picture2.Scale (-500, 500)-(500, -500) Picture2.Line (-400, 0)-(400, 0) Picture2.Line (0, -400)-(0, 400) Picture2.CurrentX = 400
Picture2.CurrentY = 20
Picture2.Print "?x"
Picture2.CurrentX = -20
Picture2.CurrentY = 400
Picture2.Print "?y"
Picture2.Line (-100, 100)-(100, 100) Picture2.Line (100, 100)-(100, -100) Picture2.Line (100, -100)-(-100, -100)
Picture2.Line (-100, -100)-(-100, 100) Picture2.CurrentX = 200
Picture2.CurrentY = 20
Picture2.Print "?"
Picture2.CurrentX = 200
Picture2.CurrentY = 0
Picture2.Print "σx"
Picture2.CurrentX = -20
Picture2.CurrentY = 200
Picture2.Print "?σy"
Picture2.Line (120, -80)-(120, 80) Picture2.CurrentX = 96
Picture2.CurrentY = 80
Picture2.Print "?τxy"
Picture2.Line (0, 0)-(300 * Cos(g), 300 * Sin(g))
Picture2.CurrentX = 300 * Cos(g) Picture2.CurrentY = 300 * Sin(g) Picture2.Print "x′"
Else
End If
If Check3.Value = 1 Then
Text10.Text = Sqr((a - b) * (a - b) / 4 + c * c)
Text11.Text = -Sqr((a - b) * (a - b) / 4 + c * c)
Text12.Text = Atn(2 * c / (a - b) / 2 * 180 / e + 45)
Text13.Text = Text12.Text - 90 Else
End If
End Sub
Private Sub Command2_Click() Form2.Hide
form1.Show
End Sub
Private Sub Command3_Click() Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Picture1.Cls
Picture2.Cls
Cls
End Sub
Private Sub Text14_Change()
End Sub
Private Sub Form_Load()
End Sub
Private Sub Label16_Click()
End Sub
三、实例演示
例:已知σx=50MPa,σy=-40MPa, τxy=-30MPa, 求这一点α=45?斜截面上的
应力、主应力与主方向、主切应力及主切平面。
第一步:如图,在提示下输入已知量,,并勾选所
要求
对教师党员的评价套管和固井爆破片与爆破装置仓库管理基本要求三甲医院都需要复审吗
的项目;
第二步:单击“确定”,则系统会自动输出运算结果; 可知此题的
答案
八年级地理上册填图题岩土工程勘察试题省略号的作用及举例应急救援安全知识车间5s试题及答案
为:斜截面上的应力σx′=-25.0001652MPa τxy′=-44.9998898MPa ,主应力为σmax=59.08326913MPa,σmin=-49。083269MPa ,主方向为α=-16.8449943?,主切平面为ατ′=1.5322076?ατ〞=-88.467792?,主切应力为τ′=54.083269MPa,τ〞=-54.083269MPa。
经验证,所得结果完全正确
提示:若要求解另一组数据,则单击“清除”按钮,若要返回主界面,则单击“返回”按钮。