필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

im new to matlab community i have this code for engine torque and i want to find the resultant figure for each figure

조회 수: 1 (최근 30일)
clc
clear
k=1.4;
psi=14.5; % pressure angle of pinion teeth
N=2000; % rotational speed of engine
w=(N/60)*2*pi;
patm = 101325; % atmospheric pressure
pmax=(patm*100); % maximum pressure = 100 atmospheres
vc=0.05*10^(-3); % convert clearance volume in m^3
stroke = 127*10^(-3); % in m
bore = 100*10^(-3); % piston bore in m
area=(bore^(2))*pi/4; % calculate cross sectional area in m^3
dispvol = area*stroke; % calculate displacement volume
r=63.5* 10^(-3); % Radius of crankshaft in m
l=0.23; % length of the connecting rode in m
m1=0.6; % mass of the piston in kg
m2=0.8; % mass of the connecting rod
m3=0.5*m2+m1; % equivalent mass of the reciprocating parts
theta1=0:1:180;
for ac=1:length(theta1);
intake(ac)= 0.9*patm;% pressure during intake stroke
t1(ac)=intake(ac)*area*r*sind(theta1(ac))*(l+(r*cosd(theta1(ac))/l)); % torque during intake stroke
end
theta2=180:1:360;
for ac=1:length(theta2);
x(ac)=r*cosd(theta2(ac))+((l^(2))-(r^(2))*(sind(theta2(ac)))^(2))^(0.5);
vol(ac)=vc+area*(r+l-x(ac));
c(ac)=0.5*patm*((vc+dispvol)/(vol(ac)))^k % pressure during compression stroke
t2(ac)=c(ac)*area*r*sind(theta2(ac))*(l+(r*cosd(theta2(ac))/l));% torque during compression stroke
end
theta3=360:1:540;
for ac=1:length(theta3);
x(ac)=r*cosd(theta3(ac))+(l^(2)-r^(2)*(sind(theta3(ac)))^(2))^(0.5);
vol(ac)=vc+area*(r+l-x(ac));
p(ac) = pmax*(vc/vol(ac))^k; % pressure during power stroke
t3(ac)=p(ac)*area*r*sind(theta3(ac))*(l+(r*cosd(theta3(ac))/l)); % torque during power stroke
end
theta4=540:1:720;
for ac=1:length(theta4);
e(ac) = 1.1*patm; % pressure during exhaust stroke
t4(ac)=e(ac)*area*r*sind(theta4(ac))*(l+(r*cosd(theta4(ac))/l)); % torque during exhaust stroke
end
figure(1); % torque-angle diagram
plot(theta1,t1,'k',theta2,t2,'k',theta3,t3,'k',theta4,t4,'k','linewidth',2.5)
xlabel('Angle of crank in degrees');
ylabel('Transmitted torque in (N.m)');
grid
figure(2); % torque-angle diagram
plot(theta1,t1,'k',theta2,t2,'k',theta3,t3,'k',theta4,t4,'k','linewidth',2.5)
xlabel('Angle of crank in degrees');
ylabel('Transmitted torque in (N.m)');
hold on
plot(theta1+360,t1,'r',theta2+360,t2,'r',theta3+360,t3,'r',theta4+360,t4,'r','linewidth',2.5)
grid
figure(3); % torque-angle diagram
plot(theta1,t1,'k',theta2,t2,'k',theta3,t3,'k',theta4,t4,'k','linewidth',2.5)
xlabel('Angle of crank in degrees');
ylabel('Transmitted torque in (N.m)');
hold on
plot(theta1+120,t1,'r',theta2+120,t2,'r',theta3+120,t3,'r',theta4+120,t4,'r','linewidth',2.5)
hold on
plot(theta1+240,t1,'b',theta2+240,t2,'b',theta3+240,t3,'b',theta4+240,t4,'b','linewidth',2.5)
grid
figure(4); % torque-angle diagram
plot(theta1,t1,'k',theta2,t2,'k',theta3,t3,'k',theta4,t4,'k','linewidth',2.5)
xlabel('Angle of crank in degrees');
ylabel('Transmitted torque in (N.m)');
hold on
plot(theta1+90,t1,'r',theta2+90,t2,'r',theta3+90,t3,'r',theta4+90,t4,'r','linewidth',2.5)
hold on
plot(theta1+180,t1,'b',theta2+180,t2,'b',theta3+180,t3,'b',theta4+180,t4,'b','linewidth',2.5)
hold on
plot(theta1+270,t1,'r',theta2+270,t2,'r',theta3+270,t3,'r',theta4+270,t4,'r','linewidth',2.5)
grid
figure(5); % torque-angle diagram
plot(theta1,t1,'k',theta2,t2,'k',theta3,t3,'k',theta4,t4,'k','linewidth',2.5)
xlabel('Angle of crank in degrees');
ylabel('Transmitted torque in (N.m)');
hold on
plot(theta1+60,t1,'r',theta2+60,t2,'r',theta3+60,t3,'r',theta4+60,t4,'r','linewidth',2.5)
hold on
plot(theta1+120,t1,'b',theta2+120,t2,'b',theta3+120,t3,'b',theta4+120,t4,'b','linewidth',2.5)
hold on
plot(theta1+180,t1,'r',theta2+180,t2,'r',theta3+180,t3,'r',theta4+180,t4,'r','linewidth',2.5)
hold on
plot(theta1+240,t1,'b',theta2+240,t2,'b',theta3+240,t3,'b',theta4+240,t4,'b','linewidth',2.5)
hold on
plot(theta1+300,t1,'k',theta2+300,t2,'k',theta3+300,t3,'k',theta4+300,t4,'k','linewidth',2.5)
grid
figure(6); % torque-angle diagram
plot(theta1,t1,'k',theta2,t2,'k',theta3,t3,'k',theta4,t4,'k','linewidth',2.5)
xlabel('Angle of crank in degrees');
ylabel('Transmitted torque in (N.m)');
hold on
plot(theta1+45,t1,'r',theta2+45,t2,'r',theta3+45,t3,'r',theta4+45,t4,'r','linewidth',2.5)
hold on
plot(theta1+90,t1,'b',theta2+90,t2,'b',theta3+90,t3,'b',theta4+90,t4,'b','linewidth',2.5)
hold on
plot(theta1+135,t1,'r',theta2+135,t2,'r',theta3+135,t3,'r',theta4+135,t4,'r','linewidth',2.5)
hold on
plot(theta1+180,t1,'b',theta2+180,t2,'b',theta3+180,t3,'b',theta4+180,t4,'b','linewidth',2.5)
hold on
plot(theta1+225,t1,'k',theta2+225,t2,'k',theta3+225,t3,'k',theta4+225,t4,'k','linewidth',2.5)
plot(theta1+270,t1,'b',theta2+270,t2,'b',theta3+270,t3,'b',theta4+270,t4,'b','linewidth',2.5)
plot(theta1+315,t1,'r',theta2+315,t2,'r',theta3+315,t3,'r',theta4+315,t4,'r','linewidth',2.5)
grid

답변 (0개)

이 질문은 마감되었습니다.

태그

제품


릴리스

R2013b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by