已阅读5页,还剩15页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
材料力学上机大作业题目名称:绘制梁的剪力图、弯矩图姓名:王二小完成时间:2011.11.22运行环境:winXP(及以上)题目4绘制梁的剪力图、弯矩图输入1. 梁的总长度l2. 支撑条件及梁的各区段长度输入(左、右固定端悬臂梁;简支梁;左、右、双外伸梁)3. 各载荷大小、作用位置及方向(qi、ai、bi; pj、cj; mk、dk)输出:1. 结构构形图(图示)2. 剪力、弯矩(图示)3. 输出剪力、弯矩的最大值及截面位置软件运行结果:软件运行过程如下所示:软件代码:Private Sub Form_Click()Dim l As Doublel = Val(Text1.Text)Dim x, y, Hua, fd1(10), fd2(10), fd3(10), pos1(10), pos2(10), pos3(10), pos4(10) As DoubleDim xiang1(10), xiang2(10), xiang3(10) As DoubleDim y1(10), y2(10), y3(10), M1(10), M2(10), M3(10) As DoubleDim i, j As IntegerFor i = 1 To 10fd1(i) = Val(InputBox(请输入集中力的大小:(/kN,推荐值5KN)If fd1(i) = 0 ThenExit ForEnd 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 ThenExit ForEnd Ifpos2(i) = Val(InputBox(请输入分布力的pos2位置1:(m)pos3(i) = Val(InputBox(请输入分布力的pos3位置2:(m)xiang2(i) = Val(InputBox(请输入分布力的方向:(向上为-1,向下为1))Next iFor i = 1 To 10fd3(i) = Val(InputBox(请输入集中力偶的大小:(kN*m)If fd3(i) = 0 ThenExit ForEnd Ifpos4(i) = Val(InputBox(请输入集中力偶的位置:(m)xiang3(i) = Val(InputBox(请输入集中力偶的方向:(顺时针为-1,逆时针为1))Next iPicture1.ClsPicture1.Scale (-0.2 * l, 20)-(1.2 * l, -20)Picture1.Line (0, 0)-(l, 0)For i = 0 To 10If fd1(i) 0 And xiang1(i) 0 ThenPicture1.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)ElseIf fd1(i) 0 And xiang1(i) 0 ThenPicture1.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)End IfNext iFor i = 0 To 10If fd2(i) 0 ThenPicture1.Line (pos2(i), 3)-(pos3(i), 3)Picture1.Line (pos2(i), 3)-(pos2(i), 0)Picture1.Line (pos2(i), 0)-(pos2(i) - 0.5, 1)Picture1.Line (pos2(i), 0)-(pos2(i) + 0.5, 1)Picture1.Line (pos3(i), 3)-(pos3(i), 0)Picture1.Line (pos3(i), 0)-(pos3(i) - 0.5, 1)Picture1.Line (pos3(i), 0)-(pos3(i) + 0.5, 1)For x = pos2(i) + 0.8 To pos3(i) Step 0.8Picture1.Line (x, 3)-(x, 0)Picture1.Line (x, 0)-(x - 0.5, 1)Picture1.Line (x, 0)-(x + 0.5, 1)Next xEnd IfNext iFor i = 0 To 10If fd3(i) 0 And xiang3(i) 0 ThenPicture1.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(i) And x 0 And x pos4(i) And x 0 ThenFor Hua = 0 To y Step 0.01Picture2.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 l ThenFor Hua = 0 To y Step 0.01Picture3.PSet (x, Hua)Next HuaElseIf y 0 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 pos1(i) And x 0 And x pos2(i) And x 0 And x pos4(i) And x 0 ThenFor Hua = 0 To y Step 0.01Picture2.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 l ThenFor Hua = 0 To y Step 0.01Picture3.PSet (x, Hua)Next HuaElseIf y 0 And x l ThenFor Hua = y To 0 Step 0.01Picture3.PSet (x, Hua)Next HuaEnd IfNext xElseIf Combo1 = 左右端外伸梁 ThenDim Zhi1, Zhi2 As DoubleZhi1 = Val(InputBox(请输入左支承的位置:(m)Zhi2 = Val(InputBox(请输入右支承的位置:(m)Picture1.Line (Zhi1, -3)-(Zhi1, 0)Picture1.Line (Zhi2, -3)-(Zhi2, 0)For x = 0.01 To l Step 0.001For i = 1 To 10 Step 1If pos1(i) 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 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 l Theny3(i) = 0End IfEnd IfNext iy = 0For j = 1 To 10y = y + y1(j) + y2(j) + y3(j)Next jPicture2.PSet (x, y)Next xFor x = 0.01 To l Step 0.6For i = 1 To 10 Step 1If pos1(i) 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 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 ThenFor Hua = 0 To y Step 0.01Picture2.PSet (x, Hua)Next HuaElseIf y 0 ThenFor Hua = y To 0 Step 0.01Picture2.PSet (x, Hua)Next HuaEnd IfNext xPicture3.ClsPicture3.Scale (-0.2 * l, 20)-(1.2 * l, -30)Picture3.Line (0, 0)-(l, 0)For x = 0.01 To l Step 0.001For i = 1 To 10If pos1(i) 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)
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 全国大学生知识产权竞赛(完整题库+答案)
- 2025年四川建筑安全员C证考试模拟题及答案
- 市市直机关遴选公务员面试真题(题后含答案及解析)
- 《运营管理》课程习题和答案解析-修订版
- 国开形考《地域文化》形考一、二、三、四试题及答案
- 2025年陕西省建筑安全员考试题库附答案
- 学生交通安全培训课件
- 康复复位考试要点解析及模拟题答案
- 化工工艺原理及技术测试题目集
- 家庭教育心理测试亲子沟通与教育方式评估报告
- 非新生儿破伤风诊疗规范(2024年版)解读
- 6大国工匠百炼成器教案-蓝色
- 食品生产企业产品贮存运输及交付管理制度
- DB3301-T 65.11-2024 反恐怖防范系统管理规范 第11部分:医院
- 2025届广东省深圳市深圳实验学校初中部联考化学九年级第一学期期末综合测试试题含解析
- 第15节 辽宋夏金元的文化和科技 知识清单 高三统编版(2019)历史一轮复习(选必融合)
- 电子商务导论 记分作业资料-上海开大参考资料
- DZ∕T 0215-2020 矿产地质勘查规范 煤(正式版)
- 氨甲环酸制备工艺
- 安徽大学2022年825物理化学考研真题(含答案)
- 软件工程生涯发展展示
评论
0/150
提交评论