哈工大機(jī)械原理連桿機(jī)構(gòu)_第1頁(yè)
哈工大機(jī)械原理連桿機(jī)構(gòu)_第2頁(yè)
哈工大機(jī)械原理連桿機(jī)構(gòu)_第3頁(yè)
哈工大機(jī)械原理連桿機(jī)構(gòu)_第4頁(yè)
哈工大機(jī)械原理連桿機(jī)構(gòu)_第5頁(yè)
已閱讀5頁(yè),還剩18頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、Harbin Institute of Technology機(jī)械原理大作業(yè)1課程名稱(chēng):機(jī)械原理 設(shè)計(jì)題目:連桿機(jī)構(gòu)運(yùn)動(dòng)分析 院 系: 能源學(xué)院 班 級(jí):1402401班 設(shè) 計(jì) 者: 學(xué) 號(hào): 指導(dǎo)教師: 設(shè)計(jì)時(shí)間: 2016年6月9日 哈爾濱工業(yè)大學(xué)5,源代碼RR I級(jí)機(jī)構(gòu)運(yùn)動(dòng)分析的源代碼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 P

2、ublic phii As Single Public omegai As Single Public alphai As SinglePublic li As Single '定義輸出參數(shù) Private sgl_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 '實(shí)例化類(lèi)并初始化輸入字段 Public Sub New(ByVal radiu

3、sVector_xA As Single, ByVal radiusVector_yA As Single, ByVal velocity_xA As Single, ByVal velocity_yA As Single, ByVal 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

4、ryA = radiusVector_yA vxA = velocity_xA vyA = velocity_yA axA = acceleration_xA ayA = acceleration_yA phii = phi_i omegai = 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

5、 Get Return sgl_ryB End Get End Property Public ReadOnly Property vxB As Single Get Return sgl_vxB End Get End Property Public 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 Proper

6、ty ayB As Single Get Return sgl_ayB End Get End Property '計(jì)算輸出參數(shù) Public Sub Calculate() sgl_rxB = rxA + li * Math.Cos(phii) 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.Co

7、s(phii) - alphai * li *_ Math.Sin(phii) sgl_ayB = ayA - omegai * omegai * li * Math.Sin(phii) + alphai * li *_ Math.Cos(phii) End SubEnd ClassRPR II級(jí)基本組運(yùn)動(dòng)分析的源代碼Public Class RPR '定義桿組模式枚舉類(lèi)型 Public Enum Mode As Integer ClockWise = 1 AntiClockWise = -1 End Enum '定義輸入字段 Public rxB As Single Publ

8、ic 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 Single 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 M

9、ode '定義輸出參數(shù) 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 Private sgl_rxE As Single Private sgl_ryE As Single Private sgl_vxE As Single Private sgl_vyE As Single Private sgl_axE As Singl

10、e Private sgl_ayE As Single Private sgl_phij As Double Private sgl_omegaj As Double Private sgl_alphaj As Double '實(shí)例化類(lèi)并初始化輸入字段 Public Sub New(ByVal radiusVector_xB As Single, ByVal radiusVector_yB As Single, ByVal velocity_xB As Single, ByVal velocity_yB As Single, ByVal acceleration_xB As Singl

11、e, ByVal acceleration_yB As Single, ByVal radiusVector_xD As Single, ByVal radiusVector_yD As Single, ByVal velocity_xD As Single, ByVal velocity_yD 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 Sing

12、le, ByVal mode As Mode) rxB = radiusVector_xB ryB = radiusVector_yB vxB = velocity_xB vyB = velocity_yB axB = acceleration_xB ayB = acceleration_yB rxD = radiusVector_xD ryD = radiusVector_yD vxD = velocity_xD vyD = velocity_yD axD = acceleration_xD ayD = acceleration_yD li = length_i lj = length_j

13、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 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 Prop

14、erty 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 Property 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 Publ

15、ic 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 Public 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 E

16、nd 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 Get End Property Public ReadOnly Property omegaj As Single Get Return sgl_omegaj End Get End Property Public ReadOnly Property alphaj As Single G

17、et Return sgl_alphaj End Get End Property '計(jì)算輸出參數(shù) Public Sub Calculate() Dim phii As Double Dim phik As Double Dim s As Double Dim v As Double Dim a As Double '計(jì)算phij Dim kDB As Double Dim phiDB As Double Dim phi As Double If rxB <> rxD Then kDB = (ryB - ryD) / (rxB - rxD) If rxB >

18、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 + lk) / Math.Sqrt(rxB - rxD) * (rxB - rxD) + (ryB - ryD)*_ (ryB - ryD) sgl_phij = phiDB + M * phi If sgl_phij <

19、0 Then sgl_phij += 2 * Math.PI End If '計(jì)算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 '計(jì)算phii,phik phii = sgl_phij + M * Math.PI / 2 phik = sgl_phij - M * Math.PI / 2 '計(jì)算rC sgl_rxC = rxB + li * Ma

20、th.Cos(phii) sgl_ryC = ryB + li * Math.Sin(phii) '計(jì)算rE sgl_rxE = rxC + (lj - s) * Math.Cos(sgl_phij) sgl_ryE = ryC + (lj - s) * Math.Sin(sgl_phij) '計(jì)算omegaj Dim G4 As Double = (rxB - rxD) * Math.Cos(sgl_phij) + (ryB - ryD) *_ Math.Sin(sgl_phij) sgl_omegaj = (vyB - vyD) * Math.Cos(sgl_phij) -

21、 (vxB - vxD) *_ Math.Sin(sgl_phij) / G4 '計(jì)算v v = (vxB - vxD) * (rxB - rxD) + (vyB - vyD) * (ryB - ryD) / G4 '計(jì)算vC sgl_vxC = vxB - sgl_omegaj * Math.Sin(phii) sgl_vyC = vyB + sgl_omegaj * Math.Cos(phii) '計(jì)算alphaj Dim G5 As Double = axB - ayD + sgl_omegaj * sgl_omegaj * (rxB - rxD) + 2 * v

22、 *_ 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 '計(jì)算s a = (G5 * (rxB - rxD) + G6 * (ryB - ryD) / G4 '計(jì)算vC sgl_axC = axB - sg

23、l_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級(jí)基本組運(yùn)動(dòng)分析的源代碼Public Class RRP '定義桿組模式枚舉類(lèi)型 Public Enum Mode As Integer ClockWise = 1 AntiClockWise = -1 End Enum '

24、定義輸入字段 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 As Single Public phij As Single Public omegaj As Si

25、ngle Public alphaj As Single Public li As Single Public lj As Single Public M As Mode '定義輸出參數(shù) 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 Private sgl_rxD As Single Private sgl_ryD As S

26、ingle 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 '實(shí)例化類(lèi)并初始化輸入字段 Public Sub New(ByVal radiusVector_xB As Single, ByVal radiusVector_yB As Single, ByVal

27、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_xK As Single, ByVal acceleration_yK As

28、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 = acceleration_yB rxK = radiusVector_xK r

29、yK = 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 Get End Property Public ReadOnly

30、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 Return sgl_axC End Get End Property

31、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 As Single Get Return sgl_vxD End G

32、et 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 ReadOnly Property phii As Single Get Ret

33、urn 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 '計(jì)算輸出參數(shù) Public Sub Calculate() '計(jì)算phii Dim h As Double If Math.Cos(phij) = 0 Then h = rx

34、B - 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 '計(jì)算rC sgl_rxC = rxB + li * Math.Cos(sgl_phii) sgl_ryC = ryB + li * Math

35、.Sin(sgl_phii) '計(jì)算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) '計(jì)算omegai Dim Q1 As Double = vxK - vxB - omegaj * (s * Math.Sin(phij) + lj *_ Math.Cos(phij) Dim Q2 As Double = vyK - vyB + omega

36、j * (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 '計(jì)算vC sgl_vxC = vxB - sgl_omegai * li * Math.Sin(sgl_phii) sgl_vyC = vyB + sgl_omega

37、i * li * Math.Cos(sgl_phii) '計(jì)算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) '計(jì)算alphai Dim Q4 As Double = axK - axB + s

38、gl_omegai * 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 * Ma

39、th.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 '計(jì)算aC sgl_axC = axB - sgl_alphai * li * Math.Sin(sgl_phii) - sgl_omegai * sgl_omegai_ * li * Math.Cos(s

40、gl_phii) sgl_ayC = ayB + sgl_alphai * li * Math.Cos(sgl_phii) - sgl_omegai * sgl_omegai_ * li * Math.Sin(sgl_phii) '計(jì)算aD Dim a As Double = -(Q4 * li * Math.Cos(sgl_phii) + Q5 * li *_ Math.Sin(sgl_phii) / Q3 sgl_axD = axK + a * Math.Cos(phij) - s * alphaj * Math.Sin(phij) -s * omegaj *_ omegaj *

41、Math.Cos(phij) - 2 * v * omegaj * Math.Sin(phij) sgl_ayD = ayK + a * Math.Sin(phij) + s * alphaj * Math.Cos(phij) -s * omegaj *_ omegaj * Math.Sin(phij) + 2 * v * omegaj * Math.Cos(phij) End SubEnd Class整個(gè)連桿機(jī)構(gòu)運(yùn)動(dòng)分析的源代碼Public Class Linkage Public Const n As Integer = 999 '定義各點(diǎn)坐標(biāo)字段 Public rB(n) As

42、PointF Public rD(n) As PointF Public rF(n) As PointFPublic rH(n) As PointF '定義G點(diǎn)運(yùn)動(dòng)狀態(tài)字段 Public rxG(n) As Single Public vxG(n) As Single Public axG(n) As Single '計(jì)算整個(gè)機(jī)構(gòu)的運(yùn)動(dòng)狀態(tài) Private Sub Linkage_Load(sender As Object, e As EventArgs) Handles MyBase.Load '定義并初始化已知參數(shù) Dim omega1 As Single = 10

43、 Dim lAB As Single = 170 Dim lCD As Single = 200 Dim lEF As Single = 650 Dim lFG As Single = 500 Dim vxB(n) As Single Dim vyB(n) As Single Dim axB(n) As Single Dim ayB(n) As Single Dim vxD(n) As Single Dim vyD(n) As Single Dim axD(n) As Single Dim ayD(n) As Single Dim vxF(n) As Single Dim vyF(n) As

44、Single Dim axF(n) As Single Dim ayF(n) As Single Dim phiCD(n) As Single Dim omegaCD(n) As Single Dim alphaCD(n) As Single Dim phiEF(n) As Single Dim omegaEF(n) As Single Dim alphaEF(n) As Single Dim phiAB As Single Dim stepPhi As Single = Math.PI * 2 / 1000 Dim AB As RR Dim BBC As RPR Dim CD As RR D

45、im DDE As RPR Dim EF As RR Dim FGG As RRP '計(jì)算機(jī)構(gòu)運(yùn)動(dòng)狀態(tài) For i As Integer = 0 To n phiAB = i * stepPhi '計(jì)算B點(diǎn)的運(yùn)動(dòng)狀態(tài) AB = New RR(0, 0, 0, 0, 0, 0, phiAB, 10, 0, lAB) AB.Calculate() rB(i).X = AB.rxB rB(i).Y = AB.ryB vxB(i) = AB.vxB vyB(i) = AB.vyB axB(i) = AB.axB ayB(i) = AB.ayB '計(jì)算H點(diǎn)和CD桿的運(yùn)動(dòng)狀態(tài) BBC = New RPR(rB(i).X, rB(i).Y, vxB(i), vyB(i), axB(i), ayB(i), -110, 0, 0, 0, 0, 0, 0, 300, 0, 1) BBC.Calculate() rH(i).X = BBC.rxE rH(i).Y = BBC.ryE phiCD(i) = BBC.phij + Math.PI / 2 If phiCD(i) > 2 * Math.PI Then phiCD(i) -= 2 * Math.PI ome

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論