河南工业大学汽车理论VB绘制汽车驱动力与行驶阻力平衡图-汽车功率平衡图_第1页
河南工业大学汽车理论VB绘制汽车驱动力与行驶阻力平衡图-汽车功率平衡图_第2页
河南工业大学汽车理论VB绘制汽车驱动力与行驶阻力平衡图-汽车功率平衡图_第3页
河南工业大学汽车理论VB绘制汽车驱动力与行驶阻力平衡图-汽车功率平衡图_第4页
河南工业大学汽车理论VB绘制汽车驱动力与行驶阻力平衡图-汽车功率平衡图_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

河南工业大学西华大学实验报告3.2实验记录(核心代码及调试过程)1.核心代码:'驱动力与行驶阻力平衡图PrivateSubCommand1_Click()Picture1.DrawWidth=1Picture1.ClsDimi,j,nAsIntegerDimFt,Ff,Fw,Umax,UumaxAsSinglePicture1.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"Fori=20To120Step20Picture1.Line(i,0)-(i,200)Picture1.CurrentX=i-5:Picture1.CurrentY=-10:Picture1.PrintiNextiFori=1000To15000Step1000Picture1.Line(0,i)-(1.5,i)Picture1.CurrentX=-15:Picture1.CurrentY=i+50:Picture1.PrintiNextiPicture1.DrawWidth=2Forn=600To4000Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4Forj=1To5Ft=Tq*i0*ηt*x(j)/rFf=f*9.8*mUa=0.377*r*n/(i0*x(j))Fw=0.5*1.2258*ca*(Ua/3.6)^2Picture1.Circle(Ua,Ft),0.1,vbBluePicture1.Circle(Ua,(Ff+Fw)),0.1,vbRedUmax=UmaxIfUa>UmaxThenUmax=UaElseUmax=UmaxEndIfNextjNextnUumax=CInt(Umax*100)/100Picture1.CurrentX=40:Picture1.CurrentY=16000:Picture1.Print"最高车速为:";Uumax;"km/h"EndSub'动力特性图PrivateSubCommand3_Click()Picture1.DrawWidth=1Picture1.ClsDimi,j,nAsIntegerDimFt,Fw,DAsSinglePicture1.Scale(-20,90)-(150,-10)Picture1.Line(0,0)-(125,0):Picture1.Line(0,0)-(0,85)Picture1.CurrentX=125:Picture1.CurrentY=-3:Picture1.Print"Ua(km/h)"Picture1.CurrentX=125:Picture1.CurrentY=0.9:Picture1.Print"→"Picture1.CurrentX=5:Picture1.CurrentY=85:Picture1.Print"D"Picture1.CurrentX=-2:Picture1.CurrentY=85:Picture1.Print"↑"Picture1.CurrentX=-5:Picture1.CurrentY=-1:Picture1.Print"0"Fori=20To120Step20Picture1.Line(i,0)-(i,1)Picture1.CurrentX=i-5:Picture1.CurrentY=-1:Picture1.PrintiNextiFori=20To80Step20Picture1.Line(0,i)-(2,i)Picture1.CurrentX=-10:Picture1.CurrentY=i+1:Picture1.Print"0";i/200NextiPicture1.DrawWidth=2Forn=600To4000Forj=1To5Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4Ft=Tq*i0*ηt*x(j)/rUa=0.377*r*n/(i0*x(j))Fw=0.5*1.2258*ca*(Ua/3.6)^2D=200*(Ft-Fw)/(m*9.8)IfD>0ThenPicture1.Circle(Ua,D),0.1,vbBlueEndIfNextjNextnEndSub'功率平衡图PrivateSubCommand4_Click()Picture1.DrawWidth=1Picture1.ClsDimi,j,nAsIntegerDimPe,Pf,PwAsSinglePicture1.Scale(-20,80)-(150,-10)Picture1.Line(0,0)-(125,0):Picture1.Line(0,0)-(0,75)Picture1.CurrentX=125:Picture1.CurrentY=-3:Picture1.Print"Ua(km/h)"Picture1.CurrentX=125:Picture1.CurrentY=0.9:Picture1.Print"→"Picture1.CurrentX=5:Picture1.CurrentY=75:Picture1.Print"Pe/kw"Picture1.CurrentX=-2:Picture1.CurrentY=75:Picture1.Print"↑"Picture1.CurrentX=-5:Picture1.CurrentY=-1:Picture1.Print"0"Fori=20To120Step20Picture1.Line(i,0)-(i,1)Picture1.CurrentX=i-5:Picture1.CurrentY=-1:Picture1.PrintiNextiFori=10To70Step10Picture1.Line(0,i)-(2,i)Picture1.CurrentX=-10:Picture1.CurrentY=i+1:Picture1.PrintiNextiPicture1.DrawWidth=2Forn=600To4000Forj=1To5Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4Pe=Tq*n/9550Ua=0.377*r*n/(i0*x(j))Pf=(m*f*Ua/3600)/ηtPw=(ca*Ua^3/76140)/ηtPicture1.Circle(Ua,Pe),0.1,vbBluePicture1.Circle(Ua,(Pf+Pw)),0.1,vbRedNextjNextnEndSub'外特性曲线PrivateSubCommand5_Click()Picture1.DrawWidth=1Picture1.ClsDimi,nAsIntegerDimPeAsSinglePicture1.Scale(-400,250)-(5000,-20)Picture1.Line(0,0)-(4500,0):Picture1.Line(0,0)-(0,200)Picture1.CurrentX=4300:Picture1.CurrentY=-3:Picture1.Print"n(r/min)"Picture1.CurrentX=4500:Picture1.CurrentY=3:Picture1.Print"→"Picture1.CurrentX=100:Picture1.CurrentY=200:Picture1.Print"Ttq(N*m)"Picture1.CurrentX=100:Picture1.CurrentY=80:Picture1.Print"Pe(kw)"Picture1.CurrentX=-60:Picture1.CurrentY=205:Picture1.Print"↑"Picture1.CurrentX=-5:Picture1.CurrentY=-1:Picture1.Print"0"Fori=500To4000Step500Picture1.Line(i,0)-(i,3)Picture1.CurrentX=i-200:Picture1.CurrentY=-1:Picture1.PrintiNextiFori=20To180Step20Picture1.Line(0,i)-(50,i)Picture1.CurrentX=-300:Picture1.CurrentY=i+3:Picture1.PrintiNextiPicture1.DrawWidth=2Forn=600To4000Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4Pe=Tq*n/9550Picture1.Circle(n,Pe),2,vbRedPicture1.Circle(n,Tq),2,vbBlueNextnEndSub2.数据图表:驱动力与行驶阻力平衡图:动力特性图:爬坡度图:发动机外特性曲线:发动机功率平衡图:3.2实验记录(核心代码及调试过程)1.核心代码:'加速度的倒数曲线PrivateSubCommand7_Click()Picture1.DrawWidth=1Picture1.ClsDimi,j,nAsIntegerDimFf,Ft,Fw,a,δAsSinglePicture1.Scale(-20,160)-(150,-10)Picture1.Line(0,0)-(125,0):Picture1.Line(0,0)-(0,150)Picture1.CurrentX=125:Picture1.CurrentY=-3:Picture1.Print"Ua(km/h)"Picture1.CurrentX=125:Picture1.CurrentY=1.8:Picture1.Print"→"Picture1.CurrentX=5:Picture1.CurrentY=150:Picture1.Print"1/a"Picture1.CurrentX=-2:Picture1.CurrentY=150:Picture1.Print"↑"Picture1.CurrentX=-5:Picture1.CurrentY=-1:Picture1.Print"0"Fori=20To120Step20Picture1.Line(i,0)-(i,1.5)Picture1.CurrentX=i-5:Picture1.CurrentY=-1:Picture1.PrintiNextiFori=10To140Step10Picture1.Line(0,i)-(2,i)Picture1.CurrentX=-10:Picture1.CurrentY=i+1:Picture1.Printi/10NextiPicture1.DrawWidth=2Forn=600To4000Forj=1To5Tq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4Ft=Tq*i0*ηt*x(j)/rUa=0.377*r*n/(i0*x(j))Fw=0.5*1.2258*ca*(Ua/3.6)^2Ff=f*9.8*mδ=1+Iw/(m*r^2)+If1*x(j)^2*i0^2*ηt/(m*r^2)a=(Ft-Ff-Fw)/(δ*m)Ifa>0ThenPicture1.Circle(Ua,10/a),0.1,vbBlueEndIfNextjNextnEndSub'直接挡加速时间曲线PrivateSubCommand8_Click()Picture1.DrawWidth=1Picture1.ClsDimi,nAsIntegerDimFf,Ft,Fw,a,δ,t,ttAsSinglePicture1.Scale(-10,90)-(60,-10)Picture1.Line(0,0)-(55,0):Picture1.Line(0,0)-(0,75)Picture1.CurrentX=53:Picture1.CurrentY=-3:Picture1.Print"t(s)"Picture1.CurrentX=55:Picture1.CurrentY=0.9:Picture1.Print"→"Picture1.CurrentX=2:Picture1.CurrentY=75:Picture1.Print"Ua(km/h)"Picture1.CurrentX=-0.7:Picture1.CurrentY=75:Picture1.Print"↑"Picture1.CurrentX=-3:Picture1.CurrentY=-1:Picture1.Print"0"Fori=10To50Step10Picture1.Line(i,0)-(i,1)Picture1.CurrentX=i-1.5:Picture1.CurrentY=-1:Picture1.PrintiNextiFori=10To70Step10Picture1.Line(0,i)-(1,i)Picture1.CurrentX=-5:Picture1.CurrentY=i+1:Picture1.PrintiNextit=0ForUa=0To70Step0.01n=Ua*i0*x(4)/0.377/rIfn>=600ThenTq=-19.313+295.27*(n/1000)-165.44*(n/1000)^2+40.874*(n/1000)^3-3.8445*(n/1000)^4Ft=Tq*i0*ηt*x(4)/rFw=0.5*1.2258*ca*(Ua/3.6)^2Ff=f*9.8*mδ=1+Iw/(m*r^2)+If1*x(4)^2*i0^2*ηt/(m*r^2)a=(Ft-Ff-Fw)/(δ*m)t=t+1*0.01/a/3.6Picture1.Circle(t,Ua),0.1,vbBlueEndIfNextUatt=CInt(t*100)/100Picture1.CurrentX=15:Picture1.CurrentY=80:Picture1.Print"0-70(km/h)直接挡加速时间为:";tt;"s"EndSub2.数据图表:加速度曲线图:加速度倒数曲线:直接挡加速时间图:3.2实验记录(核心代码及调试过程)1.核心代码'最高挡百公里耗油量PrivateSubCommand1_Click()Dimn(1To8),B0(1To8),B1(1To8),B2(1To8),B3(1To8),B4(1To8)n(1)=815:n(2)=1207:n(3)=1614:n(4)=2012:n(5)=2603:n(6)=3006:n(7)=3403:n(8)=3804B0(1)=1326.8:B0(2)=1354.7:B0(3)=1284.4:B0(4)=1122.9:B0(5)=1141#:B0(6)=1051.2:B0(7)=1233.9:B0(8)=1129.7B1(1)=-416.46:B1(2)=-303.98:B1(3)=-189.75:B1(4)=-121.59:B1(5)=-98.893:B1(6)=-73.714:B1(7)=-84.478:B1(8)=-45.291B2(1)=72.379:B2(2)=36.657:B2(3)=14.524:B2(4)=7.0035:B2(5)=4.4763:B2(6)=2.8593:B2(7)=2.9788:B2(8)=0.71113B3(1)=-5.8629:B3(2)=-2.0553:B3(3)=-0.51184:B3(4)=-0.18517:B3(5)=-0.091077:B3(6)=-0.05138:B3(7)=-0.047449:B3(8)=-0.00075215B4(1)=0.17768:B4(2)=0.043072:B4(3)=0.0068164:B4(4)=0.0018555:B4(5)=0.00068906:B4(6)=0.00035032:B4(7)=0.0002823:B4(8)=-0.000038568Picture1.Scale(-10,50)-(150,-10)Picture1.Line(0,0)-(120,0):Picture1.Line(0,0)-(0,45)Picture1.CurrentX=120:Picture1.CurrentY=-3:Picture1.Print"Ua(km/h)"Picture1.CurrentX=120:Picture1.CurrentY=1:Picture1.Print"→"Picture1.CurrentX=5:Picture1.CurrentY=45:Picture1.Print"Qs(L/100km)"Picture1.CurrentX=-2.5:Picture1.CurrentY=46:Picture1.Print"↑"Picture1.CurrentX=-3:Picture1.CurrentY=-1:Picture1.Print"0"Fori=20To100Step20Picture1.Line(i,0)-(i,1)Picture1.CurrentX=i-6:Picture1.CurrentY=-1:Picture1.PrintiNextiFori=10To40Step10Picture1.Line(0,i)-(3,i)Picture1.CurrentX=-12:Picture1.CurrentY=i+1:Picture1.PrintiNextig=3880*9.8f=0.013CdA=2.77ηt=0.85i0=5.83r=0.367Uamin=0.377*r*n(1)/(0.793*i0)Qmin=100Picture1.DrawWidth=2Forua=UaminTo100Step0.01Pe=(g*f*ua/3600+CdA*ua^3/76140)/ηtnn=0.793*i0*ua/(0.377*r)Fori=1To7Ifnn>=n(i)Andnn<=n(i+1)ThenB0B0=B0(i)+(B0(i+1)-B0(i))*(nn-n(i))/(n(i+1)-n(i))B1B1=B1(i)+(B1(i+1)-B1(i))*(nn-n(i))/(n(i+1)-n(i))B2B2=B2(i)+(B2(i+1)-B2(i))*(nn-n(i))/(n(i+1)-n(i))B3B3=B3(i)+(B3(i+1)-B3(i))*(nn-n(i))/(n(i+1)-n(i))B4B4=B4(i)+(B4(i+1)-B4(i))*(nn-n(i))/(n(i+1)-n(i))EndIfNextiBe=B0B0+B1B1*Pe+B2B2*Pe^2+B3B3*Pe^3+B4B4*Pe^4Qs=Pe*Be/(1.02*7*ua)Picture1.PSet(ua,Qs),vbBlueIfQs<QminThenQmin=QsUj=uaEndIfNextuaText1.Text=CInt(Uj*100)/100Text2.Text=CInt(Qmin*100)/100EndSub'次高挡百公里耗油量PrivateSubCommand2_Click()Picture1.ClsPicture1.DrawWidth=1Dimn(1To8),B0(1To8),B1(1To8),B2(1To8),B3(1To8),B4(1To8)n(1)=815:n(2)=1207:n(3)=1614:n(4)=2012:n(5)=2603:n(6)=3006:n(7)=3403:n(8)=3804B0(1)=1326.8:B0(2)=1354.7:B0(3)=1284.4:B0(4)=1122.9:B0(5)=1141#:B0(6)=1051.2:B0(7)=1233.9:B0(8)=1129.7B1(1)=-416.46:B1(2)=-303.98:B1(3)=-189.75:B1(4)=-121.59:B1(5)=-98.893:B1(6)=-73.714:B1(7)=-84.478:B1(8)=-45.291B2(1)=72.379:B2(2)=36.657:B2(3)=14.524:B2(4)=7.0035:B2(5)=4.4763:B2(6)=2.8593:B2(7)=2.9788:B2(8)=0.71113B3(1)=-5.8629:B3(2)=-2.0553:B3(3)=-0.51184:B3(4)=-0.18517:B3(5)=-0.091077:B3(6)=-0.05138:B3(7)=-0.047449:B3(8)=-0.00075215B4(1)=0.17768:B4(2)=0.043072:B4(3)=0.0068164:B4(4)=0.0018555:B4(5)=0.00068906:B4(6)=0.00035032:B4(7)=0.0002823:B4(8)=-0.000038568Picture1.Scale(-10,50)-(150,-10)Picture1.Line(0,0)-(120,0):Picture1.Line(0,0)-(0,45)Picture1.CurrentX=120:Picture1.CurrentY=-3:Picture1.Print"Ua(km/h)"Picture1.CurrentX=120:Picture1.CurrentY=1:Picture1.Print"→"Picture1.CurrentX=5:Picture1.CurrentY=45:Picture1.Print"Qs(L/100km)"Picture1.CurrentX=-2.5:Picture1.CurrentY=46:Picture1.Print"↑"Picture1.CurrentX=-3:Picture1.CurrentY=-1:Picture1.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论