《TurboC4190内燃机动力学模拟仿真课程设计.docx》由会员分享,可在线阅读,更多相关《TurboC4190内燃机动力学模拟仿真课程设计.docx(27页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、目 录一、4190型柴油机题目条件二、4190型柴油机热力计算及结果 1、柴油机参数选择 2、热力计算源程序代码 3、热力计算结果 4、热力计算示功图三、4190型柴油机动力计算及结果 1、柴油机的已知参数 2、动力计算源程序代码3、主要参数计算结果 4、P示功图 5、活塞位移变化曲线图 6、活塞速度变化曲线图 7、活塞加速度变化曲线图 8、往复惯性力变化曲线图 9、总作用力变化曲线图 10、活塞侧推力和连杆力变化曲线图 11、法向力和切向力变化曲线图 12、单缸机转矩变化曲线图 13、曲柄销和主轴颈负荷变化曲线图 14、总转矩变化曲线图15、动力学计算结果一、4190型柴油机题目条件缸径:
2、D=190mm行程: S=210mm缸数: i=4转速: n=1600r/min连杆长度: L=370mm冲程数: 四冲程二、4190型柴油机热力计算及结果1、 柴油机参数选择压缩比: =15大气状态: P0=0.10MPa T0=293K燃料平均重量成分: C=0.86 H=0.13 O=0.01燃油低热值: Hu=42705kj/kg过量充气系数: a=1.6气体爆发压力: Pz=6.5MPaz点的热利用系数: z=0.65b点的热利用系数: b=0.8残余废气系数: =0.03残余废气温度: Tr=750K机械效率: m=0.80空气进入气缸的温度升高: T0=5c点的热利用系数: c=
3、1.112、热力计算源程序代码#include graphics.h#include conio.h#include dos.h#include math.hvoid draw(n1,Pa,s1,n2,Pb,l,p,Pz)float n1,Pa,s1,n2,Pb,l,p,Pz;float k,j;int gdriver,gmode,i,x,y,r,L=500,B=40,u,z;gdriver=DETECT;initgraph(&gdriver,&gmode,);setbkcolor(15); setcolor(8); cleardevice();line(20,55,20,410); line
4、(20,410,600,410);line(20,55,17,65); line(20,55,23,65);line(600,410,590,407); line(600,410,590,413);gotoxy(2,4); printf(p);gotoxy(2,5); printf(/);gotoxy(2,6); printf(MPa);k=(float)(L/s1); u=L; z=(int)(B*Pa);gotoxy(1,2); printf(mapl-l 6160);x=L;r=(int)(B*Pa*pow(float)L/x,n1);u=x;z=r;for(x=L;x=(int)(k)
5、;x-)r=(int)(B*Pa*pow(float)L/x,n1);line(u,400-z,x,400-r);u=x,z=r;line(x+1,400-r,(int)(p*L/s1-1),(int)(400-B*Pz);j=(float)(L/l); u=L; z=(int)(B*Pb);moveto(505,415); outtext(V*10e-4/(m*m*m);y=L;r=(int)(B*Pb*pow(float)L/y,n2);u=y; z=r;for(y=L;y=(int)j;y-)r=(int)(B*Pb*pow(float)L/y,n2);line(u,400-z,y,40
6、0-r);u=y;z=r;gotoxy(6,4);printf(z);moveto(505,375);outtext(a);moveto(25,250); outtext(c);moveto(505,400);outtext(b);arc(L,400-(int)(B*(Pa+(Pb-Pa)/2),270,450,(int)(B*(Pb-Pa)/2);getch();closegraph();void main() float Hu=42705,D=190,S=210,N=1600,gc=0.86,gh=0.13,go=0.01; float Pz=6.0,a=1.6,sz=0.65,sb=0.
7、80,Rr=0.03,Tr=750,Qm=0.80,s=15,P0=0.1,T0=300; float T1=5,sc=1.11,a2=19.26,b=0.0025,o=0.98; float Ta,Pa,Qv,n1,n2,m,n,Tc,Pc,L0,L,gi,B,B0,Xz,Bz,Cvpmx,Cppmx,Cvpmc,Cvpmz,Cvpmb, Cv1,Cv11,Cv2,Va,Tz,Tb,Tk,k,l,Pb,Pk,Pi1,Pi,Qi,ge,Qe,Pe,Cm,Hu1,Cppmz,p,Bb; printf(*n); Ta=(T0+T1+sc*Rr*Tr)/(1+Rr); Pa=0.9*P0; Qv=s
8、*T0*Pa/(s-1)*Ta*P0*(1+Rr); printf(Ta=%fKn;Pa=%fMPan,Ta,Pa); printf(Qv=%fn,Qv); n1=1.38; do m=n1; n1=1+8.315/(a2+b*Ta*(1+pow(s,(m-1); while(fabs(m-n1)0.0001); printf(n1=%fn,n1); Tc=Ta*pow(s,n1-1); Pc=Pa*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(l,n2-1)/(n2-1)-(1-1/pow(s,n1-1)/(n1-1)/(s-1);Pi=Pi1*o;gi=12.54e6*Qv*P0/(28.96*L*T0*Pi);Qi=3600.0*1000.0/(gi*Hu);Pe=Pi*Qm; ge=gi/Qm; Qe=Qi*Qm;printf(Pil=%fMPan;Pi=%fMPan;gi=%fg/kW.hn;Qi=%fn,Pi1,Pi,gi,Qi);printf(Pe=%fMPan,Pe);
13、printf(ge=%fg/kW.hn;Qe=%fn,ge,Qe);printf(*n);getch();draw (n1,Pa,s,n2,Pb,l,p,Pz,Pc);3、 热力计算结果4、热力计算示功图三、4190型柴油机动力计算及结果1、柴油机的已知参数转速: n=1600r/min连杆长度: L=370活塞组质量: mB=3.207连杆质量: mL=3.95连杆中心到小头的距离: LB 230曲柄销质量: mZ=2.47一半曲臂质量: mH=4.11曲臂偏心矩: pp=85.0曲柄半径: r=92.5 许用不匀度: dd=2.0/100)压缩比: E=15 平均压缩多变指数: n1=1.
14、37平均膨胀多变指数: n2=1.216气体爆发压力: Pz=7.0 外界气压: Pa=0.09 2、动力计算源程序代码#includestdio.h#includemath.h#includeconio.h#includegraphics.h#define n 1600#define L 370#define mB 3.207#define mL 3.95#define LB 230#define mZ 2.47#define mH 4.11#define pp 100#define r 92.5#define dd (2.0/100.0)#define E 15#define fn 1.3
15、92#define n1 1.37#define n2 1.216#define q 13.287#define Pz 7.0#define Pa 0.09#define Pb 0.32#define PI 3.141592654#define kk 92.5/370int i,j,xx,yy;char s30;double x1,x2,y1,y2,k,k1;float aa253,zz106;/* 已知条件 */void f_print() textbackground(0);clrscr();textcolor(2);window(4,4,25,70);printf(nnn);printf
16、(n);printf(known data:n);printf(nn);printf(connecting rod length L=450mmnn);printf(piston quality: mB=4.8kgnn);printf(connecting rod quality mL=7.2kgnn);printf(rod center to small point head: LB=315nn);printf(qu bing xiao quality: mZ=3.0kgnn);printf(half) qu bi quality: mH=5.0kgnn);printf(qu bi zhi
17、xin pian xin ju: p=120mmnn);printf(xu yong bu jun du: xeb=2.0/100.0nn);getch(); /*屏幕模式*/void f_mode() int gd=DETECT, gm;initgraph(&gd,&gm,c:TC20BGI);void fun_ft(int ft,int fd,int ti,float tt, float ts) setcolor(3);settextjustify(1,1);settextstyle(2,0,4);for(i=0;iti;i+) line (60,ft-i*fd,63,ft-i*fd);s
18、printf (s,%.lf,-1.0*tt+i*ts);outtextxy(40,ft-i*fd,s); void fun_camp(int x3,int y3,int x4,int y4)settextjustify(1,1);settextstyle(2,0,5);outtextxy(x3,y3,(MPa);settextstyle(2,0,5);outtextxy(x4,y4,ca);void fun_caNm(int x3,int y3,int x4,int y4)settextjustify(1,1);settextstyle(2,0,5);outtextxy(x3,y3,(Nm)
19、;settextstyle(2,0,5);outtextxy(x4,y4,ca);/* 画xy坐标轴 */void f_zb(int my,int by,int dx,int BB)setbkcolor(15);setcolor(1);cleardevice();setcolor(1);setlinestyle(0,0,2);line(60,10,60,by);line(60,my,590,my);moveto(60,0);lineto(62,14);lineto(58,14);lineto(60,0);floodfill(60,51,1);moveto(590,my);lineto(578,
20、my-2);lineto(578,my+2);lineto(590,my);floodfill(580,my,1);settextjustify(1,1);settextstyle(2,0,4);for(i=1;i13;i+) line(60+i*dx,my,60+i*dx,my-3); sprintf(s,%d,i*BB); outtextxy(60+i*dx,my+6,s); settextstyle(2,0,5);outtextxy(66,my+6,0);getch(); /* 气体压力与转角的关系 */void f_Gca() float vc,x3;vc=185/(E-1); k=r
21、/L/4.0; settextjustify(1,1); settextstyle(2,0,8); outtextxy(40,54,P); settextstyle(2,0,5); outtextxy(40,60,G); fun_camp(40,76,600,405); fun_ft(400,26,12,0,1); setcolor(1); moveto(186,400-Pa*26); for(i=126;i253;i+) x1=i*PI/126; x2=r*(1-cos(x1)+k*(1-cos(2*x1); x3=(vc+185)/(vc+x2); y1=19*Pa*pow(x3,n1);
22、 xx=i+60; yy=400-(int)y1; lineto(xx,yy); for(i=256;i379;i+) x1=i*PI/126; x2=r*(1-cos(x1)+k*(1-cos(2*x1); x3=(vc+x2)/vc;y1=x3/fn;y2=19*Pz/pow(y1,n2);xx=i+60;yy=408-(int)y2;lineto(xx,yy);lineto(443,400);getch();/*活塞位移与转角的关系*/void f_Xca()setcolor(1);settextjustify(1,1);settextstyle(2,0,4);fun_ft(400,20
23、,20,0,20);settextstyle(2,0,8);outtextxy(75,10,x);settextstyle(2,0,4);outtextxy(75,25,(mm);settextstyle(2,0,6);outtextxy(600,385,ca);setcolor(1);moveto(60,400);for(i=0;i505;i+)x1=i*PI/(6*42);x2=1-cos(x1)+(1-cos(2*x1)*kk/4;xx=60+i;y1=92.5*x2;y2=400-y1;yy=(int)y2;lineto(xx,yy);getch();/*活塞速度与转角的关系*/voi
24、d f_vca()setcolor(1);settextstyle(2,0,8);outtextxy(75,10,x);circle(75,5,1.5);settextstyle(2,0,6);outtextxy(600,245,ca);settextjustify(1,1);settextstyle(2,0,4);outtextxy(75,25,(m/s);fun_ft(490,50,10,10,2.0);setcolor(1);moveto(60,240);for(i=0;i505;i+)x1=i*PI/252;x2=sin(x1)+kk*sin(2*x1)/2;xx=60+i;y1=17
25、5*x2;y2=240-y1;yy=(int)y2;lineto(xx,yy);getch();/*活塞加速度与转角的关系*/void f_aca()setcolor(1);settextstyle(2,0,8);outtextxy(80,10,x);circle(78,5,1.5);circle(82,5,1.5);settextstyle(2,0,6);outtextxy(595,270,ca);settextjustify(1,1);settextstyle(2,0,4);outtextxy(105,15,(m/s);settextstyle(2,0,2);outtextxy(115,1
26、5,2);settextjustify(1,1);settextstyle(2,0,4);fun_ft(370,13,22,1000,100);setcolor(1);moveto(60,260-132*(1+kk);for(i=0;i505;i+)x1=i*PI/252;x2=cos(x1)+kk*cos(2*x1);xx=60+i;y1=92.5*x2;y2=260-y1;yy=(int)y2;lineto(xx,yy);getch();/* 往复惯性力曲线 */void f_Pjca() setcolor(1);fun_camp(36,50,595,235);settextjustify
27、(1,1);settextstyle(2,0,4);fun_ft(400,45,8,0.4,0.1);settextjustify(0,1);settextstyle(2,0,6);outtextxy(320,60,Pj1);outtextxy(320,100,Pj);outtextxy(320,140,Pj2);setcolor(1);moveto(60,360);for(i=0;i505;i+) x1=i*PI/126; x2=cos(x1);xx=60+i;y1=220+100*x2;yy=(int)y1;lineto(xx,yy); line(200,125,310,60);setco
28、lor(7);moveto(60,220+100*kk);for(i=0;i505;i+) x1=i*PI/126; x2=cos(2*x1); xx=60+i; y1=220+kk*100*x2; yy=(int)y1; lineto(xx,yy); line(255,195,310,140);setcolor(5);moveto(60,220+60*(1+kk);for(i=0;i505;i+) x1=i*PI/126; x2=cos(x1)+kk*cos(2*x1);xx=60+i;y1=220+100*x2;yy=(int)y1;lineto(xx,yy); line(240,172,
29、310,100);getch();/* 活塞受载荷变化曲线 */void f_Pca()float vc,x3,x4,x5,y3,y4;vc=185.0/(E-1);k=r/L/4.0;setcolor(8);fun_camp(30,65,595,410);fun_ft(492,46,12,2,1);settextjustify(1,1);settextstyle(2,0,4);setcolor(13);settextstyle(2,0,6);outtextxy(450,100,PG);outtextxy(500,230,P);outtextxy(550,260,Pj);line(327,17
30、0,425,105);line(350,370,485,235);line(460,388,535,265);setcolor(1);moveto(60,400+20*(1+kk);for(i=0;i169&i383)setcolor(5);lineto(xx,yy);setcolor(8);lineto(xx,yy);setcolor(8);moveto(188,400-Pa);for(i=126;i253;i+)x1=i*PI/126;x2=r*(1-cos(x1)+k*(1-cos(2*x1);x3=(vc+225)/(vc+x2);y1=32*Pa*pow(x3,n1);j=(int)
31、(i/2.0);aaj=aaj+0.5*y1-3;xx=i+60;yy=403-(int)y1;lineto(xx,yy);for(i=253;i379;i+)x1=i*PI/126;x2=r*(1-cos(x1)+k*(1-cos(2*x1);x3=(vc+x2)/vc;y1=x3/fn;y2=32*Pz/pow(y1,n2);j=(int)(i/2.0);aaj=aaj+0.5*y2-6;xx=i+60;yy=410-(int)y2;lineto(xx,yy);lineto(445,400);setcolor(8);moveto(215,385);for(i=168;i379;i+) xx
32、=i+60; j=(int)(i/2.0); yy=400-(int)aaj; lineto(xx,yy); lineto(443,385);getch();/*piston ce xiang ya li and conneting-rod force*/void f_Ntca() int j; setcolor(1); fun_camp(36,65,595,296); fun_ft(400,40,11,3,1); setcolor(8); settextstyle(2,0,7); outtextxy(450,160,Pcr); outtextxy(480,200,PN); line(340,
33、218,430,165); line(393,280,465,205); setcolor(4); moveto(60,280); /*PN*/ for(i=0;i505;i+) x1=asin(92.5*sin(i*PI/126)/370.0); x2=tan(x1); xx=i+60;j=(int)(i/2.0);y1=1.0*aaj*x2;yy=280-(int)y1;lineto(xx,yy);setcolor(13); /*Pcr*/moveto(60,334);for(i=0;i505;i+)x1=asin(92.5*sin(i*PI/126)/370);x2=1.0/cos(x1
34、);xx=i+60;j=(int)(i/2.0);y1=1.0*aaj*x2;yy=280-(int)y1;lineto(xx,yy);getch();/*曲柄销载荷变化曲线*/void f_Zca()float x3;setcolor(1);fun_camp(36,65,595,295);fun_ft(400,40,11,3,1);setcolor(8);settextstyle(2,0,7);outtextxy(450,160,PI);outtextxy(480,200,Pra);line(332,190,435,165);line(400,270,460,205); setcolor(1
35、3);moveto(60,333);for(i=0;i505;i+)x1=1.0*i*PI/126; x2=asin(92.5*sin(x1)/370.0); x3=cos(x1+x2)/cos(x2); xx=i+60; j=(int)(i/2.0); y1=aaj*x3; yy=280-(int)y1; lineto(xx,yy);getch();void f_Tca(float kn)float x3;setcolor(1);moveto(60,280);for(i=0;i505;i+) /*曲轴销处切向力*/x1=i*PI/126;x2=asin(92.5*sin(x1)/370);x
36、3=sin(x1+x2)/cos(x2);xx=i+60;j=(int)(i/2.0);y1=aaj*x3*kn;yy=280-(int)y1;lineto(xx,yy);getch();/*主轴径载荷变化曲线*/void f_Rca()float x3,x4,y3;fun_ft(380,50,9,0,0.5);fun_camp(36,65,595,395);setcolor(8);settextstyle(2,0,7);outtextxy(500,140,Ra);outtextxy(500,180,Ro);line(440,253,485,145);line(470,245,485,195)
37、;setcolor(1);moveto(60,213);for(i=0;i505;i+) /*曲轴销处总支反力*/x1=i*PI/126;x2=asin(92.5*sin(i*PI/126)/370.0);x3=sin(x1+x2)/cos(x2);x4=cos(x1+x2)/cos(x2);xx=i+60;j=(int)(i/2.0);y1=aaj*x3;y2=aaj*x4;y3=sqrt(pow(y1,2)+pow(y2-4),2);yy=272-(int)y3;lineto(xx,yy);setcolor(6);moveto(60,203);for(i=0;i505;i+) /*主轴径处
38、总支反力*/x1=i*PI/126;x2=asin(92.5*sin(i*PI/126)/370.0);x3=sin(x1+x2)/cos(x2);x4=cos(x1+x2)/cos(x2);xx=i+60;j=(int)(i/2.0);y1=aaj*x3;y2=aaj*x4;y3=sqrt(pow(y1,2)+pow(y2-20),2);yy=277-(int)y3;lineto(xx,yy);getch();/* 单缸输出转矩变化曲线 */void f_Mca() fun_ft(355,25,12,30000,10000);fun_caNm(36,65,595,328);setcolor(8);settextstyle(2,0,7);outtextxy(380,120,Mt);f_Tca(1.9);getch();/*total jia qie li arc */void f_Timm()fun_camp(36,65,595,328);fun_ft(382,31,10,0.6,0.3);void f_Tica() int kt,jt;float x3,