Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

clear

%So lieu
V = input('nhap van toc V(km/h): ');
v = V/3.6;
m=4.5; b=3; c=0.3; S=0.9; AR=10;
h = input('nhap do cao h (m): ');
theta = 1+h*-0.0065/288.15;
sigma = theta^4.2565;
rho = 1.225*sigma;

%Tinh toan
C_L = 2*m*9.806/(rho*v^2*S);
C_D = 0.0236 + 0.0398*C_L^2;
THP = 0.5*rho*v^3*S*C_D;

RPM = [5000 6000 7000 8000 9000 10000];


BHP = [0.031 0.095 0.184 0.313 0.476 0.678];
format long
a= polyfit(RPM/100, BHP, 2); %noi suy ham bac 2 cho RPM/100 va BHP

nu=1; %tinh voi hieu suat ban dau la 75%


nu_=0.5;

%Lap
while [nu ~= nu_]
nu = (nu+nu_)/2;
BHPi = THP/nu/746;
r_ = roots(a-[0 0 BHPi]);
r_i = max(r_(1), r_(2));
J = v/(r_i*100/60*0.254);
nu_ = -21.133*J^4 + 42.729*J^3 - 33.381*J^2 + 12.659*J - 1.2515;
end

fprintf('RPM: %d\n',r_i*100);
fprintf('J: %.2f\n',J);
fprintf('nu_: %.6f\n',nu_);

You might also like