《材料力学大作业 梁的剪力图、弯矩图的绘制》由会员分享,可在线阅读,更多相关《材料力学大作业 梁的剪力图、弯矩图的绘制(20页珍藏版)》请在金锄头文库上搜索。
1、材料力学上机大作业题目名称:题目名称:绘制梁的剪力图、弯矩图绘制梁的剪力图、弯矩图姓名:王二小姓名:王二小完成时间:完成时间:2011.11.222011.11.22运行环境:运行环境:winXPwinXP(及以上)(及以上)题目题目 4绘制梁的剪力图、弯矩图 输入输入 1. 梁的总长度 l 2. 支撑条件及梁的各区段长度输入(左、右固定端悬臂梁;简支梁;左、右、双外伸梁) 3. 各载荷大小、作用位置及方向(qi、ai、bi; pj、cj; mk、dk) 输出:输出: 1. 结构构形图(图示) 2. 剪力、弯矩(图示) 3. 输出剪力、弯矩的最大值及截面位置软件运行结果:软件运行结果:软件运行
2、过程如下所示:软件运行过程如下所示:软件代码软件代码:Private Sub Form_Click()Dim l As Double l = Val(Text1.Text)Dim x, y, Hua, fd1(10), fd2(10), fd3(10), pos1(10), pos2(10), pos3(10), pos4(10) As Double Dim xiang1(10), xiang2(10), xiang3(10) As Double Dim y1(10), y2(10), y3(10), M1(10), M2(10), M3(10) As Double Dim i, j As I
3、ntegerFor i = 1 To 10 fd1(i) = Val(InputBox(“请输入集中力的大小: (/kN,推荐值 5KN)“) If fd1(i) = 0 Then Exit For End Ifpos1(i) = Val(InputBox(“请输入集中力的位 置:(m)“) xiang1(i) = Val(InputBox(“请输入集中力的 方向:(向上为-1,向下为 1)“) Next iFor i = 1 To 10 Step 1fd2(i) = Val(InputBox(“请输入分布力的大小: (kN/m)“) If fd2(i) = 0 Then Exit For E
4、nd If pos2(i) = Val(InputBox(“请输入分布力的 pos2 位置 1:(m)“)pos3(i) = Val(InputBox(“请输入分布力的 pos3 位置 2:(m)“) xiang2(i) = Val(InputBox(“请输入分布力的 方向:(向上为-1,向下为 1)“)Next iFor i = 1 To 10 fd3(i) = Val(InputBox(“请输入集中力偶的大 小:(kN*m)“) If fd3(i) = 0 Then Exit For End Ifpos4(i) = Val(InputBox(“请输入集中力偶的 位置:(m)“) xiang
5、3(i) = Val(InputBox(“请输入集中力偶 的方向:(顺时针为-1,逆时针为 1)“)Next iPicture1.Cls Picture1.Scale (-0.2 * l, 20)-(1.2 * l, -20) Picture1.Line (0, 0)-(l, 0)For i = 0 To 10 If fd1(i) 0 Then Picture1.Line (pos1(i), 5)-(pos1(i), 0) Picture1.Line (pos1(i), 0)-(pos1(i) - 1, 1) Picture1.Line (pos1(i), 0)-(pos1(i) + 1, 1
6、) ElseIf fd1(i) 0 And xiang3(i) 0 Then Picture1.Line (pos4(i), 3)-(pos4(i), -3) Picture1.Line (pos4(i), 3)-(pos4(i) - 1, 3) Picture1.Line (pos4(i), -3)-(pos4(i) + 1, -3) ElseIf fd3(i) 0 And xiang3(i) 0 And x pos1(i) And x 0 And x pos2(i) And x 0 And x pos4(i) And x 0 And x pos1(i) And x 0 And x pos2
7、(i) And x 0 And x pos4(i) And x 0 Then For Hua = 0 To y Step 0.01 Picture2.PSet (x, Hua) Next HuaElseIf y 0 And x pos1(i) And x 0 And x pos2(i) And x 0 And x pos4(i) And x 0 And x pos1(i) And x 0 And x pos2(i) And x 0 And x pos4(i) And x 0 And x 0 And x pos1(i) And x 0 And x pos2(i) And x 0 And x po
8、s4(i) And x 0 And x pos1(i) And x 0 And x pos2(i) And x 0 And x pos4(i) And x 0 Then For Hua = 0 To y Step 0.01 Picture2.PSet (x, Hua) Next HuaElseIf y 0 And x pos1(i) And x 0 And x pos2(i) And x 0 And x pos4(i) And x 0 And x pos1(i) And x 0 And x pos2(i) And x 0 And x pos4(i) And x 0 And x 0 And x
9、pos1(i) And x Zhi1 And x Zhi2 And x Zhi1 And pos1(i) 0 And x Zhi1 And x pos1(i) And x Zhi2 And x Zhi2 And pos1(i) 0 And x Zhi1 And x Zhi2 And x Zhi2 And x 0 And pos3(i) 0 And x pos2(i) And x pos3(i) And x Zhi1 And x Zhi1 And pos3(i) 0 And x Zhi1 And x pos2(i) And x pos3(i) And x Zhi2 And pos3(i) 0 A
10、nd x Zhi1 And x Zhi2 And x pos2(i) And x pos3(i) And x 0 And pos4(i) 0 And x pos4(i) And x Zhi1 And x Zhi2 And x Zhi1 And pos4(i) 0 And x Zhi1 And x pos4(i) And x Zhi2 And x Zhi2 And pos4(i) 0 And x Zhi1 And x Zhi2 And x pos4(i) And x 0 And x pos1(i) And x Zhi1 And x Zhi2 And x Zhi1 And pos1(i) 0 An
11、d x Zhi1 And x pos1(i) And x Zhi2 And x Zhi2 And pos1(i) 0 And x Zhi1 And x Zhi2 And x Zhi2 And x 0 And pos3(i) 0 And x pos2(i) And x pos3(i) And x Zhi1 And x Zhi1 And pos3(i) 0 And x Zhi1 And x pos2(i) And x pos3(i) And x Zhi2 And pos3(i) 0 And x Zhi1 And x Zhi2 And x pos2(i) And x pos3(i) And x 0
12、And pos4(i) 0 And x pos4(i) And x Zhi1 And x Zhi2 And x Zhi1 And pos4(i) 0 And x Zhi1 And x pos4(i) And x Zhi2 And x Zhi2 And pos4(i) 0 And x Zhi1 And x Zhi2 And x pos4(i) And x 0 Then For Hua = 0 To y Step 0.01 Picture2.PSet (x, Hua) Next HuaElseIf y 0 And x pos1(i) And x Zhi1 And x Zhi2 And x Zhi1
13、 And pos1(i) 0 And x Zhi1 And x pos1(i) And x Zhi2 And x Zhi2 And pos1(i) 0 And x Zhi1 And x Zhi2 And x Zhi2 And x 0 And pos3(i) 0 And x pos2(i) And x pos3(i) And x Zhi1 And x Zhi1 And pos3(i) 0 And x Zhi1 And x pos2(i) And x pos3(i) And x Zhi2 And pos3(i) 0 And x Zhi1 And x Zhi2 And x pos2(i) And x
14、 pos3(i) And x 0 And pos4(i) 0 And x pos4(i) And x Zhi1 And x Zhi2 And x Zhi1 And pos4(i) 0 And x Zhi1 And x pos4(i) And x Zhi2 And x Zhi2 And pos4(i) 0 And x Zhi1 And x Zhi2 And x pos4(i) And x 0 And x pos1(i) And x Zhi1 And x Zhi2 And x Zhi1 And pos1(i) 0 And x Zhi1 And x pos1(i) And x Zhi2 And x
15、Zhi2 And pos1(i) 0 And x Zhi1 And x Zhi2 And x Zhi2 And x 0 And pos3(i) 0 And x pos2(i) And x pos3(i) And x Zhi1 And x Zhi1 And pos3(i) 0 And x Zhi1 And x pos2(i) And x pos3(i) And x Zhi2 And pos3(i) 0 And x Zhi1 And x Zhi2 And x pos2(i) And x pos3(i) And x 0 And pos4(i) 0 And x pos4(i) And x Zhi1 And x Zhi2 And x Zhi1 And pos4(i) 0 And x Zhi1 And x pos4(i) And x Zhi2 And x Zhi2 And pos4(i) 0 And x Zhi1 And x Zhi2 And x pos4(i) And x 0 And x l Then For Hua = 0 To y Step 0.01 Picture3.PSet (x, Hua) Next HuaElseIf y 0 And x l Then