




已阅读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年同济大学附属东方医院胶州医院招聘人才(100人)考前自测高频考点模拟试题及答案详解(历年真题)
- 上海市人民医院医疗卫生政策趋势分析与医院应对策略
- 张家口市中医院消毒灭菌学原理与监测方法进阶试题
- 2025湖南湘潭市韶山思政教育实践中心公开招聘教师2人模拟试卷及完整答案详解
- 衡水市人民医院心电图机维护保养考核
- 沧州市人民医院脊柱内镜下椎间盘切除技术资格认证
- 上海市中医院皮秒激光技术专项考核
- 2025江苏师范大学招聘工作人员78人(第一批)模拟试卷及参考答案详解
- 2025广东省第二中医院招聘皮肤科医师2人模拟试卷及答案详解(名校卷)
- 张家口市中医院护理科研文化建设考核
- 高等数学(经济类)第5版课件:数列的极限
- 2025年上海市高考英语热点复习:六选四句子还原之说明文(上)
- 老年病人误吸预防及护理
- 吉林地区普通高中2023-2024学年高三年级上学期数学第一次模拟试卷(含答案)
- 初中物理实验探究式教学策略研究结题报告
- 安徽省宣城市2023-2024学年高二上学期期末考试 英语 含答案
- 2024年秋季新教材三年级上册PEP英语教学课件:含视频音频U3-第1课时-A
- 公安涉警舆情课件
- 医院培训课件:《类风湿关节炎的治疗与康复》
- DB34∕T 3790-2021 智慧药房建设指南
- 实验小学六年级上学期素养竞赛语文试卷(有答案)
评论
0/150
提交评论