【vb精品源码栏目提醒】:网学会员在vb精品源码频道为大家收集整理了“哈工大材料力学上机实验题_序号7应力状态分析 - 大学课件“提供大家参考,希望对大家有所帮助!
材料力学上机实验题 序号 7 应力状态分析1.源代码VERSION 5.00Begin VB.Form Form1 Caption quot应力状态分析quot ClientHeight 9675 ClientLeft 480 ClientTop 630 ClientWidth 16140 LinkTopic quotForm1quot ScaleHeight 9675 ScaleWidth 16140 Begin VB.Frame Frame4 Caption quot输出结果quot Height 5295 Left 7560 TabIndex 41 Top 3960 Width 8175 Begin VB.CommandButton Command3 Caption quot计算quot Height 495 Left 2640 TabIndex 48 Top 4440 Width 1215 End Begin VB.CommandButton Command4 Caption quot清除quot Height 495 Left 4440 TabIndex 47 Top 4440 Width 1215 End Begin VB.PictureBox Picture2 Height 2655 Left 960 ScaleHeight 2595 ScaleWidth 6435 TabIndex 46 Top 1560 Width 6495EndBegin VB.TextBox Text19 Height 495 Left 2640 TabIndex 45 Top 600 Width 1215EndBegin VB.TextBox Text20 Height 495 Left 4440 TabIndex 44 Top 600 Width 1215EndBegin VB.TextBox Text21 Height 495 Left 6240 TabIndex 43 Top 600 Width 1215EndBegin VB.TextBox Text22 Height 495 Left 960 TabIndex 42 Top 600 Width 1215EndBegin VB.Label Label21 Caption quotτmaxquot Height 375 Left 6600 TabIndex 55 Top 360 Width 615EndBegin VB.Label Label20 Caption quotδ3quot Height 375 Left 4920 TabIndex 54 Top 360 Width 495 End Begin VB.Label Label19 Caption quotδ2quot Height 375 Left 3120 TabIndex 53 Top 360 Width 495 End Begin VB.Label Label18 Caption quotδ1 quot Height 255 Left 1440 TabIndex 52 Top 360 Width 615 EndEndBegin VB.Frame Frame3 Caption quot空间应力状态分析quot Height 2295 Left 7560 TabIndex 28 Top 1440 Width 8175 Begin VB.TextBox Text13 Height 495 Left 1440 TabIndex 34 Top 600 Width 1215 End Begin VB.TextBox Text14 Height 495 Left 3960 TabIndex 33 Top 600 Width 1215 EndBegin VB.TextBox Text15 Height 495 Left 6480 TabIndex 32 Top 600 Width 1215EndBegin VB.TextBox Text16 Height 495 Left 1440 TabIndex 31 Top 1320 Width 1215EndBegin VB.TextBox Text17 Height 495 Left 3960 TabIndex 30 Top 1320 Width 1215EndBegin VB.TextBox Text18 Height 495 Left 6480 TabIndex 29 Top 1320 Width 1215EndBegin VB.Label Label14 Caption quot请输入 τzxquot Height 495 Left 5400 TabIndex 40 Top 1440 Width 1215EndBegin VB.Label Label13 Caption quot请输入 τyzquot Height 495 Left 2880 TabIndex 39 Top 1440 Width 1215End Begin VB.Label Label12 Caption quot请输入 τxyquot Height 495 Left 360 TabIndex 38 Top 1440 Width 1215 End Begin VB.Label Label11 Caption quot请输入 δzquot Height 495 Left 5400 TabIndex 37 Top 720 Width 1215 End Begin VB.Label Label10 Caption quot请输入 δyquot Height 495 Left 2880 TabIndex 36 Top 720 Width 1215 End Begin VB.Label Label9 Caption quot请输入 δxquot Height 495 Left 360 TabIndex 35 Top 720 Width 1215 EndEndBegin VB.CommandButton Command2 Caption quot清除quot Height 495 Left 3960 TabIndex 17 Top 8400 Width 1215EndBegin VB.PictureBox Picture1 Height 2655 Left 2160 ScaleHeight 2595 ScaleWidth 3915 TabIndex 16 Top 5520 Width 3975EndBegin VB.CommandButton Command1 Caption quot计算quot Height 495 Left 2160 TabIndex 15 Top 8400 Width 1335EndBegin VB.TextBox Text11 Height 495 Left 840 TabIndex 14 Top 7680 Width 1215EndBegin VB.TextBox Text10 Height 495 Left 840 TabIndex 13 Top 6840 Width 1215EndBegin VB.TextBox Text9 Height 495 Left 840 TabIndex 12 Top 5880 Width 1215EndBegin VB.TextBox Text8 Height 495 Left 4920 TabIndex 11 Top 4560 Width 1215EndBegin VB.TextBox Text7 Height 495 Left 3600 TabIndex 10 Top 4560 Width 1215EndBegin VB.TextBox Text6 Height 495 Left 2160 TabIndex 9 Top 4560 Width 1215EndBegin VB.TextBox Text5 Height 495 Left 840 TabIndex 8 Top 4560 Width 1215EndBegin VB.TextBox Text4 Height 495 Left 5040 TabIndex 7 Top 2760 Width 1215EndBegin VB.TextBox Text3 Height 495 Left 2160 TabIndex 6 Top 2760 Width 1215EndBegin VB.TextBox Text2 Height 495 Left 5040 TabIndex 5 Top 2040 Width 1215EndBegin VB.TextBox Text1 Height 495 Left 2160 TabIndex 4 Top 2040 Width 1215EndBegin VB.CommandButton Command6 Caption quot退出quot Height 855 Left 14160 TabIndex 3 Top 360 Width 1575EndBegin VB.CommandButton Command8 Caption quot空间应力状态分析quot Height 855 Left 7560 TabIndex 2 Top 360 Width 3255EndBegin VB.CommandButton Command7 Caption quot平面应力状态分析quot Height 855 Left 360 TabIndex 1 Top 360 Width 3255EndBegin VB.CommandButton Command5 Caption quot帮助quot Height 855 Left 12480 TabIndex 0 Top 360 Width 1575EndBegin VB.Frame Frame1 Caption quot平面应力状态分析quot Height 2295 Left 360 TabIndex 18 Top 1440 Width 6375 Begin VB.Label Label4 Caption quot请输入 аradquot Height 495 Left 3360 TabIndex 22 Top 1440 Width 1215 End Begin VB.Label Label3 Caption quot请输入 τxyquot Height 495 Left 480 TabIndex 21 Top 1440 Width 1215 End Begin VB.Label Label2 Caption quot请输入 δyquot Height 495 Left 3360 TabIndex 20 Top 720 Width 1215 End Begin VB.Label Label1 Caption quot请输入 δxquot Height 495 Left 480 TabIndex 19 Top 720 Width 1215 EndEndBegin VB.Frame Frame2 Caption quot输出结果quot Height 5295 Left 360 TabIndex 23 Top 3960 Width 6375 Begin VB.Label Label17 Caption quotτmaxquot Height 255 Left 4920 TabIndex 51 Top 360 Width 495EndBegin VB.Label Label15 Caption quotδ3quot Height 375 Left 3720 TabIndex 50 Top 360 Width 375EndBegin VB.Label Label16 Caption quotδ2quot Height 255 Left 2280 TabIndex 49 Top 360 Width 495EndBegin VB.Label Label8 Caption δquot quotа Height 255 Left 840 TabIndex 27 Top 3480 Width 495EndBegin VB.Label Label7 Caption аquot quotτ Height 255 Left 840 TabIndex 26 Top 2520 Width 495EndBegin VB.Label Label6 Caption аquot quotδ Height 375 Left 840 TabIndex 25 Top 1680 Width 495EndBegin VB.Label Label5 Caption quotδ1 quot Height 255 Left 840 TabIndex 24 Top 360 Width 375 End EndEndAttribute VB_Name quotForm1quotAttribute VB_GlobalNameSpace FalseAttribute VB_Creatable FalseAttribute VB_PredeclaredId TrueAttribute VB_Exposed FalsePrivate Sub Command5_Click开始运行程序选择quot平面quot还是quot空间quotMsgBox quotа 按弧度制输入单位是 rad应力单位均是 Mpa.若为平面应力状态请按“平面应力状态分析”,否则,按“空间应力状态分析” Design by 潘万竞 o∩_∩o quot vbOKOnlyquot温馨提示quotCommand7.Enabled TrueCommand8.Enabled TrueEnd Sub若选择quot平面quotPrivate Sub Command7_ClickCommand1.Enabled TrueCommand2.Enabled TrueText1.SetFocusEnd SubPrivate Sub Command1_Click аDim δx As Double δy As Double τxy As Double As Double X As Double Y As Double z AsDouble输入数据(δx δy ;某截面方位角 аquot τxy )δx ValText1.Textδy ValText2.Textτxy ValText3.Text а ValText4.Text计算主应力X0Y δ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 gt Y And X gt z ThenText5.Text StrXText6.Text StrYText7.Text StrzText8.Text StrX - z / 2 Else If X lt Y And X lt z ThenText5.Text StrYText6.Text StrzText7.Text StrXText8.Text StrY - X / 2 ElseText5.Text StrYText6.Text StrXText7.Text StrzText8.Text StrY - z / 2End IfEnd If计算并输出 δаτааδText9.Text Strδx δy / 2 δx - δy / 2 Cos2 а τxy Sin2 аText10.Text Str-δx - δy / 2 Sin2 а τxy Cos2 аIf δx δy ThenText11.Text Str45 Else Text11.Text StrAtnτxy 2 / δx - δy / 2End If输出应力圆If δx - δy 2 / 4 τxy 2 0.5 lt 50 And δx - δy 2 / 4 τxy 2 0.5 gt 20 Then半径在 20-50 间的输出Picture1.ScaleMode 3Picture1.Scale 0 0-200 80Picture1.Scale -100 40-100 -40Picture1.Line -100 0-100 0Picture1.Line 0 -40-0 40Picture1.Circle δx δy / 2 0 δx - δy 2 / 4 τxy 2 0.5 QBColor12 Else If δx - δy 2 / 4 τxy 2 0.5 lt 20 And δx - δy 2 / 4 τxy 2 0.5 gt 0 Then半径在 0-20 间的输出Picture1.ScaleMode 3Picture1.Scale 0 0-80 40Picture1.Scale -40 20-40 -20Picture1.Line -40 0-40 0Picture1.Line 0 -20-0 20Picture1.Circle δx δy / 2 0 δx - δy 2 / 4 τxy 2 0.5 QBColor12 Else半径在大于 50 间的输出Picture1.ScaleMode 3Picture1.Scale 0 0-400 200Picture1.Scale -200 100-200 -100Picture1.Line -200 0-200 0Picture1.Line 0 -100-0 100Picture1.Circle δx δy / 2 0 δx - δy 2 / 4 τxy 2 0.5 QBColor12 End IfEnd IfEnd SubPrivate Sub Command2_Click清空文本框Text1.Text quotquotText2.Text quotquotText3.Text quotquotText4.Text quotquotText5.Text quotquotText6.Text quotquotText7.Text quotquotText8.Text quotquotText9.Text quotquotText10.Text quotquotText11.Text quotquot清除图片框Picture1.Cls返回光标Text1.SetFocusEnd Sub若选择quot空间quotPrivate Sub Command8_ClickCommand3.Enabled TrueCommand4.Enabled TrueText13.SetFocusEnd SubPrivate Sub Command3_ClickDim δx As Double δy As Double δz As Double τxy As Double τyz As Double τzx As Double输入数据(δx δy δz τxy τyz τzx )δx ValText13.Textδy ValText14.Textδz ValText15.Textτxy ValText16.Textτyz ValText17.Textτzx ValText18.Text 计算 I1I2I3得到方程quotx3-I1x2I2x-I30quot 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用盛金公式求解方程quotx3-I1x2I2x-I30quot的根 X1X2X3a I1 2 - 3 1 I2b -I1 I2 9 1 I3c I2 2 - 3 I1 I3db 2-4 a c当有三个相等实根时If a 0 And b 0 ThenX1 I.