收藏 分销(赏)

哈工大机械原理连杆机构运动分析作业.docx

上传人:胜**** 文档编号:1397357 上传时间:2024-04-25 格式:DOCX 页数:22 大小:91.36KB
下载 相关 举报
哈工大机械原理连杆机构运动分析作业.docx_第1页
第1页 / 共22页
哈工大机械原理连杆机构运动分析作业.docx_第2页
第2页 / 共22页
哈工大机械原理连杆机构运动分析作业.docx_第3页
第3页 / 共22页
哈工大机械原理连杆机构运动分析作业.docx_第4页
第4页 / 共22页
哈工大机械原理连杆机构运动分析作业.docx_第5页
第5页 / 共22页
点击查看更多>>
资源描述

1、机械原理大作业 课设计题目:连杆机构运动分析院 5,源代码RR I级机构运动分析的源代码Public Class RR 定义输入字段 Public rxA As Single Public ryA As Single Public vxA As Single Public vyA As Single Public axA As SinglePublic ayA As Single Public phii As Single Public omegai As Single Public alphai As SinglePublic li As Single 定义输出参数 Private sgl_

2、rxB As Single Private sgl_ryB As Single Private sgl_vxB As Single Private sgl_vyB As Single Private sgl_axB As Single Private sgl_ayB As Single 实例化类并初始化输入字段 Public Sub New(ByVal radiusVector_xA As Single, ByVal radiusVector_yA As Single, ByVal velocity_xA As Single, ByVal velocity_yA As Single, ByVa

3、l acceleration_xA As Single, ByVal acceleration_yA As Single, ByVal phi_i As Single, ByVal omega_i As Single, ByVal alpha_i As Single, ByVal length_i As Single) rxA = radiusVector_xA ryA = radiusVector_yA vxA = velocity_xA vyA = velocity_yA axA = acceleration_xA ayA = acceleration_yA phii = phi_i om

4、egai = omega_i alphai = alpha_i li = length_i End Sub 定义输出属性 Public ReadOnly Property rxB As Single Get Return sgl_rxB End Get End Property Public ReadOnly Property ryB As Single Get Return sgl_ryB End Get End Property Public ReadOnly Property vxB As Single Get Return sgl_vxB End Get End Property Pu

5、blic ReadOnly Property vyB As Single Get Return sgl_vyB End Get End Property Public ReadOnly Property axB As Single Get Return sgl_axB End Get End Property Public ReadOnly Property ayB As Single Get Return sgl_ayB End Get End Property 计算输出参数 Public Sub Calculate() sgl_rxB = rxA + li * Math.Cos(phii)

6、 sgl_ryB = ryA + li * Math.Sin(phii) sgl_vxB = vxA - omegai * li * Math.Sin(phii) sgl_vyB = vyA + omegai * li * Math.Cos(phii) sgl_axB = axA - omegai * omegai * li * Math.Cos(phii) - alphai * li *_ Math.Sin(phii) sgl_ayB = ayA - omegai * omegai * li * Math.Sin(phii) + alphai * li *_ Math.Cos(phii) E

7、nd SubEnd ClassRPR II级基本组运动分析的源代码Public Class RPR 定义杆组模式枚举类型 Public Enum Mode As Integer ClockWise = 1 AntiClockWise = -1 End Enum 定义输入字段 Public rxB As Single Public ryB As Single Public vxB As Single Public vyB As Single Public axB As Single Public ayB As Single Public rxD As Single Public ryD As S

8、ingle Public vxD As Single Public vyD As Single Public axD As Single Public ayD As Single Public li As Single Public lj As Single Public lk As Single Public M As Mode 定义输出参数 Private sgl_rxC As Single Private sgl_ryC As Single Private sgl_vxC As Single Private sgl_vyC As Single Private sgl_axC As Sin

9、gle Private sgl_ayC As Single Private sgl_rxE As Single Private sgl_ryE As Single Private sgl_vxE As Single Private sgl_vyE As Single Private sgl_axE As Single Private sgl_ayE As Single Private sgl_phij As Double Private sgl_omegaj As Double Private sgl_alphaj As Double 实例化类并初始化输入字段 Public Sub New(B

10、yVal radiusVector_xB As Single, ByVal radiusVector_yB As Single, ByVal velocity_xB As Single, ByVal velocity_yB As Single,ByVal acceleration_xB As Single, ByVal acceleration_yB As Single, ByVal radiusVector_xD As Single, ByVal radiusVector_yD As Single,ByVal velocity_xD As Single, ByVal velocity_yD

11、As Single, ByVal acceleration_xD As Single, ByVal acceleration_yD As Single,ByVal length_i As Single, ByVal length_j As Single, ByVal length_k As Single, ByVal mode As Mode) rxB = radiusVector_xB ryB = radiusVector_yB vxB = velocity_xB vyB = velocity_yB axB = acceleration_xB ayB = acceleration_yB rx

12、D = radiusVector_xD ryD = radiusVector_yD vxD = velocity_xD vyD = velocity_yD axD = acceleration_xD ayD = acceleration_yD li = length_i lj = length_j lk = length_k M = mode End Sub 定义输出属性 Public ReadOnly Property rxC As Single Get Return sgl_rxC End Get End Property Public ReadOnly Property ryC As S

13、ingle Get Return sgl_ryC End Get End Property Public ReadOnly Property vxC As Single Get Return sgl_vxC End Get End Property Public ReadOnly Property vyC As Single Get Return sgl_vyC End Get End Property Public ReadOnly Property axC As Single Get Return sgl_axC End Get End Property Public ReadOnly P

14、roperty ayC As Single Get Return sgl_ayC End Get End Property Public ReadOnly Property rxE As Single Get Return sgl_rxE End Get End Property Public ReadOnly Property ryE As Single Get Return sgl_ryE End Get End Property Public ReadOnly Property vxE As Single Get Return sgl_vxE End Get End Property P

15、ublic ReadOnly Property vyE As Single Get Return sgl_vyE End Get End Property Public ReadOnly Property axE As Single Get Return sgl_axE End Get End Property Public ReadOnly Property ayE As Single Get Return sgl_ayE End Get End Property Public ReadOnly Property phij As Single Get Return sgl_phij End

16、Get End Property Public ReadOnly Property omegaj As Single Get Return sgl_omegaj End Get End Property Public ReadOnly Property alphaj As Single Get Return sgl_alphaj End Get End Property 计算输出参数 Public Sub Calculate() Dim phii As Double Dim phik As Double Dim s As Double Dim v As Double Dim a As Doub

17、le 计算phij Dim kDB As Double Dim phiDB As Double Dim phi As Double If rxB rxD Then kDB = (ryB - ryD) / (rxB - rxD) If rxB rxD Then phiDB = Math.Atan(kDB) Else phiDB = Math.Atan(kDB) + Math.PI End If Else If ryB ryD Then phiDB = Math.PI / 2 Else phiDB = 3 * Math.PI / 2 End If End If phi = Math.Asin(li

18、 + lk) / Math.Sqrt(rxB - rxD) * (rxB - rxD) + (ryB - ryD)*_ (ryB - ryD) sgl_phij = phiDB + M * phi If sgl_phij 0 Then sgl_phij += 2 * Math.PI End If 计算s If li = 0 And lk = 0 Then s = Math.Sqrt(rxB - rxD) * (rxB - rxD) + (ryB - ryD) * (ryB - ryD) Else s = (li + lk) / Math.Tan(phi) End If 计算phii,phik

19、phii = sgl_phij + M * Math.PI / 2 phik = sgl_phij - M * Math.PI / 2 计算rC sgl_rxC = rxB + li * Math.Cos(phii) sgl_ryC = ryB + li * Math.Sin(phii) 计算rE sgl_rxE = rxC + (lj - s) * Math.Cos(sgl_phij) sgl_ryE = ryC + (lj - s) * Math.Sin(sgl_phij) 计算omegaj Dim G4 As Double = (rxB - rxD) * Math.Cos(sgl_phi

20、j) + (ryB - ryD) *_ Math.Sin(sgl_phij) sgl_omegaj = (vyB - vyD) * Math.Cos(sgl_phij) - (vxB - vxD) *_ Math.Sin(sgl_phij) / G4 计算v v = (vxB - vxD) * (rxB - rxD) + (vyB - vyD) * (ryB - ryD) / G4 计算vC sgl_vxC = vxB - sgl_omegaj * Math.Sin(phii) sgl_vyC = vyB + sgl_omegaj * Math.Cos(phii) 计算alphaj Dim G

21、5 As Double = axB - ayD + sgl_omegaj * sgl_omegaj * (rxB - rxD) + 2 * v *_ sgl_omegaj * Math.Sin(sgl_phij) Dim G6 As Double = ayB - ayD + sgl_omegaj * sgl_omegaj * (ryB - ryD) - 2 * v *_ sgl_omegaj * Math.Cos(sgl_phij) sgl_alphaj = (G6 * Math.Cos(sgl_phij) - G5 * Math.Sin(sgl_phij) / G4 计算s a = (G5

22、* (rxB - rxD) + G6 * (ryB - ryD) / G4 计算vC sgl_axC = axB - sgl_alphaj * Math.Sin(phii) - sgl_omegaj * sgl_omegaj *_ Math.Cos(phii) sgl_ayC = ayB + sgl_alphaj * Math.Cos(phii) - sgl_omegaj * sgl_omegaj *_ Math.Sin(phii) End SubEnd ClassRRP II级基本组运动分析的源代码Public Class RRP 定义杆组模式枚举类型 Public Enum Mode As

23、 Integer ClockWise = 1 AntiClockWise = -1 End Enum 定义输入字段 Public rxB As Single Public ryB As Single Public vxB As Single Public vyB As Single Public axB As Single Public ayB As Single Public rxK As Single Public ryK As Single Public vxK As Single Public vyK As Single Public axK As Single Public ayK

24、As Single Public phij As Single Public omegaj As Single Public alphaj As Single Public li As Single Public lj As Single Public M As Mode 定义输出参数 Private sgl_rxC As Single Private sgl_ryC As Single Private sgl_vxC As Single Private sgl_vyC As Single Private sgl_axC As Single Private sgl_ayC As Single

25、Private sgl_rxD As Single Private sgl_ryD As Single Private sgl_vxD As Single Private sgl_vyD As Single Private sgl_axD As Single Private sgl_ayD As Single Private sgl_phii As Double Private sgl_omegai As Double Private sgl_alphai As Double 实例化类并初始化输入字段 Public Sub New(ByVal radiusVector_xB As Single

26、, ByVal radiusVector_yB As Single, ByVal velocity_xB As Single, ByVal velocity_yB As Single, ByVal acceleration_xB As Single, ByVal acceleration_yB As Single, ByVal radiusVector_xK As Single, ByVal radiusVector_yK As Single,ByVal velocity_xK As Single, ByVal velocity_yK As Single, ByVal acceleration

27、_xK As Single, ByVal acceleration_yK As Single,ByVal phi_j As Single, ByVal omega_j As Single, ByVal alpha_j As Single, ByVal length_i As Single, ByVal length_j As Single,ByVal mode As Mode) rxB = radiusVector_xB ryB = radiusVector_yB vxB = velocity_xB vyB = velocity_yB axB = acceleration_xB ayB = a

28、cceleration_yB rxK = radiusVector_xK ryK = radiusVector_yK vxK = velocity_xK vyK = velocity_yK axK = acceleration_xK ayK = acceleration_yK phij = phi_j omegaj = omega_j alphaj = alpha_j li = length_i lj = length_j M = mode End Sub 定义输出属性 Public ReadOnly Property rxC As Single Get Return sgl_rxC End

29、Get End Property Public ReadOnly Property ryC As Single Get Return sgl_ryC End Get End Property Public ReadOnly Property vxC As Single Get Return sgl_vxC End Get End Property Public ReadOnly Property vyC As Single Get Return sgl_vyC End Get End Property Public ReadOnly Property axC As Single Get Ret

30、urn sgl_axC End Get End Property Public ReadOnly Property ayC As Single Get Return sgl_ayC End Get End Property Public ReadOnly Property rxD As Single Get Return sgl_rxD End Get End Property Public ReadOnly Property ryD As Single Get Return sgl_ryD End Get End Property Public ReadOnly Property vxD A

31、s Single Get Return sgl_vxD End Get End Property Public ReadOnly Property vyD As Single Get Return sgl_vyD End Get End Property Public ReadOnly Property axD As Single Get Return sgl_axD End Get End Property Public ReadOnly Property ayD As Single Get Return sgl_ayD End Get End Property Public ReadOnl

32、y Property phii As Single Get Return sgl_phii End Get End Property Public ReadOnly Property omegai As Single Get Return sgl_omegai End Get End Property Public ReadOnly Property alphai As Single Get Return sgl_alphai End Get End Property 计算输出参数 Public Sub Calculate() 计算phii Dim h As Double If Math.Co

33、s(phij) = 0 Then h = rxB - rxK Else h = Math.Abs(Math.Cos(phij) * (ryK - ryB - Math.Tan(phij) * (rxK - rxB) End If If M = Mode.ClockWise Then sgl_phii = Math.Asin(h + lj) / li) + phij Else sgl_phii = Math.PI - Math.Asin(h + lj) / li) + phij End If 计算rC sgl_rxC = rxB + li * Math.Cos(sgl_phii) sgl_ryC

34、 = ryB + li * Math.Sin(sgl_phii) 计算rD Dim s As Double = (sgl_rxC - rxK + lj * Math.Sin(phij) / Math.Cos(phij) sgl_rxD = rxK + s * Math.Cos(phij) sgl_ryD = ryK + s * Math.Sin(phij) 计算omegai Dim Q1 As Double = vxK - vxB - omegaj * (s * Math.Sin(phij) + lj *_ Math.Cos(phij) Dim Q2 As Double = vyK - vyB

35、 + omegaj * (s * Math.Cos(phij) - lj *_ Math.Sin(phij) Dim Q3 As Double = li * Math.Sin(sgl_phii) * Math.Sin(phij) + li *_ Math.Cos(sgl_phii) * Math.Cos(phij) sgl_omegai = (Q2 * Math.Cos(phij) - Q1 * Math.Sin(phij) / Q3 计算vC sgl_vxC = vxB - sgl_omegai * li * Math.Sin(sgl_phii) sgl_vyC = vyB + sgl_om

36、egai * li * Math.Cos(sgl_phii) 计算vD Dim v As Double = -(Q1 * li * Math.Cos(sgl_phii) + Q2 * li *_ Math.Sin(sgl_phii) / Q3 sgl_vxD = vxK + v * Math.Cos(phij) - s * omegaj * Math.Sin(phij) sgl_vyD = vyK + v * Math.Sin(phij) + s * omegaj * Math.Cos(phij) 计算alphai Dim Q4 As Double = axK - axB + sgl_omeg

37、ai * sgl_omegai * li *_ Math.Cos(sgl_phii) - alphaj * (s * Math.Sin(phij) + lj * Math.Cos(phij) - omegaj *_ omegaj * (s * Math.Cos(phij) - lj * Math.Sin(phij) - 2 * v * omegaj * Math.Sin(phij) Dim Q5 As Double = ayK - ayB + sgl_omegai * sgl_omegai * li *_ Math.Sin(sgl_phii) + alphaj * (s * Math.Cos(phij) - lj * Math.Sin(phij) - omegaj *_ omegaj * (s * Math.Sin(phij) + lj * Math.Cos(phij) + 2 * v * omegaj * Math.Cos(phij) sgl_alphai = (Q5 * Math.Cos(phij) - Q4 * Math.Sin(phij) / Q3 计算aC sgl_axC = axB - sgl_alphai * li * Math.Sin(sgl_phii) - sgl_omega

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 行业资料 > 机械/制造/汽车

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服