汽车动力性计算 VB源代码
部分代码
Private Sub Command2_Click() '加速度曲线
Label17.Caption = ""
Picture1.Cls
Picture1.Scale (-12, 3)-(125, -0.3)
Picture1.Line (0, 0)-(0, 2.8)
Picture1.Line (0, 0)-(120, 0)
For j = 1 To 100
For i = 1 To 10
Picture1.Line (0, i * 0.25)-(2, i * 0.25) '取纵坐标刻度线
Picture1.Line (i * 10, 0.04)-(i * 10, 0) '取横坐标刻度线
Picture1.Line (1.5 - j * 0.015, 2.65)-(0, 2.8) '画纵坐标箭头
Picture1.Line (-1.5 + j * 0.015, 2.65)-(0, 2.8)
Picture1.Line (120, 0)-(114, 0.05 - j * 0.0005) '画横坐标箭头
Picture1.Line (120, 0)-(114, -0.05 + j * 0.0005)
Picture1.CurrentX = -4: Picture1.CurrentY = -0.02: Picture1.Print 0
Picture1.CurrentX = -10: Picture1.CurrentY = i * 0.25 + 0.02: Picture1.Print i * 0.25 '读取纵坐标刻度线数值
Picture1.CurrentX = 16: Picture1.CurrentY = 2.7: Picture1.Print "a / (m/s)"
Picture1.CurrentX = 10 * i - 7: Picture1.CurrentY = -0.05: Picture1.Print i * 10 '读取纵坐标刻度线数值
Picture1.CurrentX = 103: Picture1.CurrentY = -0.05: Picture1.Print "Ua/(Km / h)"
Next i
Next j
For i = 1 To 5
Ff = 0: ft = 0: a = 0: Ua = 0
If i = 1 Then Ig = 5.56: Uamax = 0.377 * r * Nmax / (Ig * io): Uamin = 0.377 * r * Nmin / (Ig * io)
If i = 2 Then Ig = 2.769: Uamax = 0.377 * r * Nmax / (Ig * io): Uamin = 0.377 * r * Nmin / (Ig * io)
If i = 3 Then Ig = 1.644: Uamax = 0.377 * r * Nmax / (Ig * io): Uamin = 0.377 * r * Nmin / (Ig * io)
If i = 4 Then Ig = 1: Uamax = 0.377 * r * Nmax / (Ig * io): Uamin = 0.377 * r * Nmin / (Ig * io)
If i = 5 Then Ig = 0.793: Uamax = 0.377 * r * Nmax / (Ig * io): Uamin = 0.377 * r * Nmin / (Ig * io)
Ff = M3 * 9.8 * f + CDA * Ua * Ua / 21.15
For Ua = Uamin To Uamax Step 0.01
n = Ua * io * Ig / (0.377 * r)
tq = -19.313 + 295.27 * (n / 1000) - 165.44 * (n / 1000) ^ 2 + 40.874 * (n / 1000) ^ 3 - 3.8445 * (n / 1000) ^ 4
ft = tq * Ig * io * Nt / r
δ = 1 + (Iw1 + Iw2 + Iff) / (M3 * r ^ 2) + Iff * Ig ^ 2 * io ^ 2 * Nt / (M3 * r ^ 2)
a = (ft - Ff) / (M3 * δ
1