PS7_solution

4 cpmlcp0sqrt1 m2m21gamma 12m2 2sqrt1 m2cp0 display

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sqrt(1-M^2))*Cp_0); %Display peak negative Cp value from each of the rules disp(['M=' num2str(M)]) disp(['Minimum pressure coefficient from the Prandtl-Glauert,' ... 'Karman-Tsien and Laitone compressibility rules']) disp([min(Cp_M_PG) min(Cp_M_KT) min(Cp_M_L)]) %PLot the compressible pressure coefficient along the airfoil surface figure(i+1) plot(naca0012_x,Cp_M_PG,naca0012_x,Cp_M_KT,naca0012_x,Cp_M_L) legend('Cp_PG','Cp_KT','Cp_L') title(['M=' num2str(M)]) set(gca,'YDir','reverse') ylabel('Cp') xlabel('x') axis([0 1 -1 1]) end %Solve for the critical Mach number Cpmin=min(Cp_0); %Peak negative incompressible pressure coefficient %%Prandtl Glauert Mcr_PG=fzero(@(Mcr) Cpmin/sqrt(1-Mcr^2) - 2/(gamma * Mcr^2)... *(((1+(gamma-1)*0.5*Mcr^2)/(1+(gamma-1)/2))^(gamma/(gamma-1))-1),0.5); %%Karman Tsien Mcr_KT=fzero(@(Mcr) Cpmin/(sqrt(1-Mcr^2)+Mcr^2/... (1+sqrt(1-Mcr^2))*Cpmin/2)- 2/(gamma * Mcr^2)... *(((1+(gamma-1)*0.5*Mcr^2)/(1+(gamma-1)/2))^(gamma/(gamma-1))-1),0.5); %%Laitone's rule Mcr_L=fzero(@(Mcr) Cpmin/(sqrt(1-Mcr^2)+Mcr^2*(1+(gamma-1)/2*Mcr^2)... /(2*sqrt(1-Mcr^2))*Cpmin) - 2/(gamma * Mcr^2)... *(((1+(gamma-1)*0.5*Mcr^2)/(1+(gamma-1)/2))^(gamma/(gamma-1))-1),0.5); disp(['Critical Mach number as determined from the Prandtl-Glauert,' ... 'Karman-Tsien and Laitone compressibility rules']) disp([Mcr_PG Mcr_KT Mcr_L])...
View Full Document

Ask a homework question - tutors are online