#
Main FAQ Search Member List User Groups Profile Log in to check your private messages
Login Register
PC Slayers Welcome to PC Slayers Forum
just because I'm bored

 
Post new topic   Reply to topic    PC Slayers Forum Index -> General
View previous topic :: View next topic  
Author Message
Biturbowned
Triple Kill!


Joined: 29 Nov 2006
Posts: 267
Location: here 'n there

PostPosted: Wed Dec 06, 2006 7:47 pm    Post subject: just because I'm bored Reply with quote

Eat your hearts out CSEs!!!!
proggy is Matlab, yes, I've written the code

clc
Angle1 = 20;
phi = Angle1*pi/180;
Angle2 = 25;
psi = Angle2*pi/180

W = 4330; %lbf
DTire = 22/12; %check this size
PTire = 36; %estimated
%Cd = .36;
Fa = 26.955625
MaxSpeed = 147
MaxHP = 340 %BHP @ 5000 rpm POSSIBLY LOWER THIS NUMBER TO GET WHP
MaxT = 380 %lb-ft @ 4000 rpm
Dpitch = 5; %input gear #4 pitch dia (in)
AxleR = 2.82;
%input gear:
Gratio = 1;

MG=[3.58 3.58 3.58 2.19 2.19 2.19 1.41 1.41 1.41 .83 .83 .83 .83];

%Creation of Miles and Milestot matrices
Miles = [5000 0 0 0 10000 0 20000 0 0 30000 35000 45000 55000];
Milestot=sum(Miles);

%Creation of Speed matrix
for i=1:1:13
Speed(i)=[i*11.3077];
end

%Creation of Hours matrix
for i=1:1:13
Hours(i)=[Miles(i)/Speed(i)];
end
Hourstot=sum(Hours);

%Creation of RPM, HP, and Torque matrices
for i=1:1:13
i;
RPM(i)=[Speed(i)*(22/15)*60*AxleR*MG(i)/(pi()*DTire)];
HP(i)=[(Speed(i)*(22/15)/550)*(((.5+(15/PTire)+((.0035*(Speed(i))^2)/PTire))*(W/100))+(.0322678*(Speed(i))^2))];
Torque(i)=[(6*HP(i)*33000/(pi()*RPM(i)))];
end

% Creation of plot of Torque vs. RPM for 4th gear pull
for i=10:1:13
RPM_4(i)=[RPM(i)];
HP_4(i)=[HP(i)];
Torque_4(i)=[Torque(i)];
end
plot(RPM_4,Torque_4/12,'--g',RPM_4,HP_4,'--r');
xlabel('Engine RPMs')
%ylabel('Horsepower')
title('Plot of HP and Torque in 4th gear of 2006 Dodge Charger R/T')

%Output of max HP and torque and peak RPM

C=max(HP);
D=max(Torque);
E=max(RPM);
disp('max HP is');
disp(C);
disp('max Torque in lb-in is');
disp(D);
disp('at');
disp(E); disp('RPMs');

for i=1:1:13
WINt(i)=[Torque(i)*2/Dpitch];
WINr(i)=[WINt(i)*22.79];
WIN(i)=[sqrt(WINt(i)^2+WINr(i)^2)];
end

%DRAG COEFFICIENT CALCS

RR=(.5+15/PTire+.0035*MaxSpeed^2/PTire)*(W/100); %lbf

C=(MaxHP/MaxSpeed*15/22*550-RR)/.00256/MaxSpeed^2;

%COUNTERSHAFT DIAMETER CALCS
Sy=156000; %psi
Sut=170000; %psi
Ma=46372; %alternating bending moment
q=.7;
Kt=1.4;
Kf=1+q*(Kt-1);
Kts=1.2;
Kfs=Kts;
Sep=.504*Sut;
Se=Sep/Kf;
n=2;

Dshaft=(16*n/pi*(2*Kf*Ma/Se+sqrt(3)*Kfs*MaxT/Sut))^(1/3)

%Creation of Teqcont
for i=2:1:13
Teqcont(i)=[Hours(i)*RPM(i)*(Torque(i))^9];
Teqbend(i)=[Hours(i)*RPM(i)*(Torque(i))^29];
end

Teqcontact=(sum(Teqcont)/(RPM(12)*(Hourstot-Hours(13))))^(1/9)
Teqbending=(sum(Teqbend)/(RPM(12)*(Hourstot-Hours(13))))^(1/29)

HPeqbend = (2*pi*RPM(12)*Teqbending/12)/33000
HPeqcont = (2*pi*RPM(12)*Teqcontact/12)/33000

Wtbend = Teqbending*2/Dpitch
Wtcontact = Teqcontact*2/Dpitch

Neq = Hourstot*RPM(12)*60
%
% Wtcont=(126000*HPeqcont)/(RPM(12)*3.5);
% Wtbend=(126000*HPeqbend)/(RPM(12)*3.5);


%HELICAL GEAR GEOMETRY CALCS

dp=7; %pitch diameter
rp=dp/2;
F=1; %facewidth

dg=dp*MG4;
rg=dg/2;
Np=48; %pinion teeth
Pd=Np/dp; %diametral pitch
addendum=1/Pd;
dedendum=1.25/Pd;
C=rp+rg;
%center distance
ag=addendum;
Z=sqrt((rp+addendum)^2-(rp*cos(phi))^2)+sqrt((rp+ag)^2-(rg*cos(phi))^2)-C*sin(phi); %length of action

mP=Pd*Z/pi/cos(phi); %contact ratio
pt=pi/Pd;
pn=pt*cos(psi);
px=pn/sin(psi);

mF=F*Pd*tan(psi)/pi; %transverse contact ratio
nr=mP-1;
na=mF-1;

phin=atan(tan(phi)*cos(psi));
psib=acos(cos(psi)*cos(phin)/cos(phi));

Lmin1=(mP*F-na*nr*px)/cos(psib);
Lmin2=(mP*F-(1-na)*(1-nr)*px)/cos(psib);

mN=F/Lmin2; %load sharing ratio

rowp=sqrt((.5*(rp+addendum+C-rg+ag))^2-(rp*cos(phi))^2);
rowg=C*sin(phi)-rowp;

I=cos(phi)/(1/rowp+1/rowg)/dp/mN;


% NUMBER OF TEETH CALCS

Zn=2.466*Neq^-.056;
Yn=1.6831*Neq^-.0323;
Sc=275000;
St=75000;
sigma_all_bend=St*Yn;
sigma_all_cont=Sc*Zn;
Cp=2300;

Npnew=21;
Npold=20;

while abs(Npold-Npnew)>.01
Npnew=Npold;
J=(-4E-5)*Npold^2+.0066*Npold+.2106;
Npold=(sigma_all_bend*J*Cp^2/((sigma_all_cont)^2*I));

if (abs(Npold-Npnew)>1000)
disp ('ERROR: output blows up!')
break
end

end
Pd=Npold/7 %DIAMETRAL PITCH=NUMBER OF PINION TEETH OVER PITCH DIAMETER
Npold


Back to top
View user's profile Send private message Send e-mail AIM Address
PC Oibo
Killtacular!


Joined: 27 Nov 2006
Posts: 347

PostPosted: Wed Dec 06, 2006 7:54 pm    Post subject: Reply with quote

Error 0145: Code unreadable to noobies.
Back to top
View user's profile Send private message Send e-mail
Biturbowned
Triple Kill!


Joined: 29 Nov 2006
Posts: 267
Location: here 'n there

PostPosted: Wed Dec 06, 2006 8:09 pm    Post subject: Reply with quote

PC Oibo wrote:
Error 0145: Code unreadable to noobies.

meh, I'm just proud of my dyno graph, pretty impressive if I do say so myself
Back to top
View user's profile Send private message Send e-mail AIM Address
Dabomberman
Site Admin


Joined: 27 Nov 2006
Posts: 398
Location: Alexandria, VA

PostPosted: Wed Dec 06, 2006 9:09 pm    Post subject: Reply with quote

WTF language is that? Don't make me post COBOL, you know it'll make your eyes bleed if you attempt to read it without proper protection...
_________________
AKA PC Tman. XBL = x TechnoTman x
Tman Homepage - Tman FTP AIM me for user/pass
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic    PC Slayers Forum Index -> General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



zeroSpace Template © Digital-Delusion
Powered by phpBB © 2001, 2002 phpBB Group
Back to Top


Free Forum Free Top Site List
Make this Forum Ad-Free