wing_param % Original wing geometry [t q2 q3]=size(latt_w.VORTEX); figure(1) hold on plot3(latt_w.XYZ(:,:,1)',latt_w.XYZ(:,:,2)',latt_w.XYZ(:,:,3)','m*') plot3(latt_w.XYZ(:,:,1)',latt_w.XYZ(:,:,2)',latt_w.XYZ(:,:,3)','r') % for s=1:(t) % plot3(latt_w.COLLOC(s,1),latt_w.COLLOC(s,2),latt_w.COLLOC(s,3),'g*') % end axis equal xlabel('Wing x-coordinate') ylabel('Wing y-coordinate') zlabel('Wing z-coordinate') title('3-D Wing.') grid on hold off wing_param3 cd output fname=strcat(Run_ID(wing).name,'-Cx'); load(fname) cd .. % Delta cp plot figure(2) rotate3d on colormap(hot); AAA=results.cp'; fill3(latt_w.XYZ(:,:,1)',latt_w.XYZ(:,:,2)',latt_w.XYZ(:,:,3)',AAA') title('Delta cp distribution') colorbar('vert') axis equal % Spanload ann Local CL Loading figure(3) subplot(2,1,1) hold on, grid on plot(results.ystation(:,1)/0.3048,results.ForcePerMeter(:,1)/4.44822162*0.3048); Title('Spanload on main wing'); ylabel('lbf per foot'); xlabel('Spanstation') hold off subplot(2,1,2) hold on, grid on plot(results.ystation(:,1)/0.3048,results.CL_local(:,1),'r'); Title('Spanload on main wing'); ylabel('CL Local'); xlabel('Spanstation') hold off cd .. % Airfoils figure(5) foil_axis=[0 1 -.08 .15]; load -ASCII ah94145.txt af=ah94145; subplot(3,1,1) plot(af(:,1),af(:,2),'r') set(findobj(gca,'Type','line','Color',[0 0 1]),'Color','red','LineWidth',5) set(gca,'YTick',foil_axis(3:4)) set(gca,'YTickLabel',{'Lo','Hi'}) set(gca,'XTick',foil_axis(1:2)) set(gca,'XTickLabel',{'Leading Edge','Trailing Edge'}) title('AH94145 - Main Wing Airfoil'); axis(foil_axis) subplot(3,1,2) [x1 y1]=make_naca('0009',100,1); plot(x1,y1,'r') set(findobj(gca,'Type','line','Color',[0 0 1]),'Color','red','LineWidth',5) set(gca,'YTick',foil_axis(3:4)) set(gca,'YTickLabel',{'',''}) set(gca,'XTick',foil_axis(1:2)) set(gca,'XTickLabel',{'Leading Edge','Trailing Edge'}) title('NACA 0009 - Horizontal Tail Airfoil'); subplot(3,1,3) [x2 y2]=make_naca('0012',100,1); plot(x2,y2,'r') set(findobj(gca,'Type','line','Color',[0 0 1]),'Color','red','LineWidth',5) set(gca,'YTick',foil_axis(3:4)) set(gca,'YTickLabel',{'',''}) set(gca,'XTick',foil_axis(1:2)) set(gca,'XTickLabel',{'Leading Edge','Trailing Edge'}) title('NACA 0012 - Vertical Tail Airfoil');