- 1、本文档共19页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VB绘制汽车驱动力与行驶阻力平衡图汽车功率平衡图
3.2 实验记录(核心代码及调试过程)
1.核心代码:
.............驱动力与行驶阻力平衡图
Private Sub Command1_Click()
Picture1.DrawWidth = 1
Picture1.Cls
Dim i, j, n As Integer
Dim Ft, Ff, Fw, Umax, Uumax As Single
Picture1.Scale (-20, 18000)-(150, -2000)
Picture1.Line (0, 0)-(125, 0): Picture1.Line (0, 0)-(0, 16000)
Picture1.CurrentX = 125: Picture1.CurrentY = -300: Picture1.Print Ua(km/h)
Picture1.CurrentX = 125: Picture1.CurrentY = 192: Picture1.Print →
Picture1.CurrentX = 5: Picture1.CurrentY = 16000: Picture1.Print F/N
Picture1.CurrentX = -2: Picture1.CurrentY = 16000: Picture1.Print ↑
Picture1.CurrentX = -5: Picture1.CurrentY = -1: Picture1.Print 0
For i = 20 To 120 Step 20
Picture1.Line (i, 0)-(i, 200)
Picture1.CurrentX = i - 5: Picture1.CurrentY = -10: Picture1.Print i
Next i
For i = 1000 To 15000 Step 1000
Picture1.Line (0, i)-(1.5, i)
Picture1.CurrentX = -15: Picture1.CurrentY = i + 50: Picture1.Print i
Next i
Picture1.DrawWidth = 2
For n = 600 To 4000
Tq = -19.313 + 295.27 * (n / 1000) - 165.44 * (n / 1000) ^ 2 + 40.874 * (n / 1000) ^ 3 - 3.8445 * (n / 1000) ^ 4
For j = 1 To 5
Ft = Tq * i0 * ηt * x(j) / r
Ff = f * 9.8 * m
Ua = 0.377 * r * n / (i0 * x(j))
Fw = 0.5 * 1.2258 * ca * (Ua / 3.6) ^ 2
Picture1.Circle (Ua, Ft), 0.1, vbBlue
Picture1.Circle (Ua, (Ff + Fw)), 0.1, vbRed
Umax = Umax
If Ua Umax Then
Umax = Ua
Else
Umax = Umax
End If
Next j
Next n
Uumax = CInt(Umax * 100) / 100
Picture1.CurrentX = 40: Picture1.CurrentY = 16000: Picture1.Print 最高车速为:; Uumax; km/h
End Sub
...........动力特性图
Private Sub Command3_Click()
Picture1.DrawWidth = 1
Picture1.Cls
Dim i, j, n As Integer
Dim Ft, Fw, D As Single
Picture1.Scale (-20, 90)-(150, -10)
Picture1.Line (0, 0)-(125, 0): Picture1.Line (0, 0)
文档评论(0)