Question: This is the code i have so far, plotted Figure 3 has a jump in the middle of the graph that shouldn't be there, plotted
This is the code i have so far, plotted Figure has a jump in the middle of the graph that shouldn't be there, plotted figure is missing the black outline that shows the shape of the airfoil. The last reply i got on chegg the code was not all there was cut short
clear
clc
naca structmptt 'chordlength', ; NACA
naca structmptt 'chordlength', ; NACA
naca structmptt 'chordlength', ; NACA
Calculation
xc yc xU yU xL yL calculateairfoilcoordinatesnaca;
xc yc xU yU xL yL calculateairfoilcoordinatesnaca;
xc yc xU yU xL yL calculateairfoilcoordinatesnaca;
Plot
plotairfoilxc yc xU yU xL yL 'NACA ;
plotairfoilxc yc xU yU xL yL 'NACA ;
plotairfoilxc yc xU yU xL yL 'NACA ;
Function to calculate airfoil coordinates
function xc yc xU yU xL yL calculateairfoilcoordinatesnaca
Extract parameters
m naca.m ;
p naca.p ;
tt naca.tt ;
c naca.chordlength;
Calculate coordinates
x linspace c;
yc zerossizex;
yt tt sqrtxcxcxcxcxc;
ytisnanyt;
for i :lengthx
if xi pc
yci m ppxi xi;
dycdx m pp xi;
else
yci m pppxi xi;
dycdx m pp xi;
end
theta atandycdx;
xci xi yti sintheta;
yci yci yti costheta;
end
xU xc yt sinatanmxpxc dycdxc xcdycdxxc;
yU yc yt cosatanmxpxc dycdxc xcdycdxxc;
xL xc yt sinatanmxpxc dycdxc xcdycdxxc;
yL yc yt cosatanmxpxc dycdxc xcdycdxxc;
end
Function to plot airfoil
function plotairfoilxc yc xU yU xL yL label
figure;
plotxU yUk 'LineWidth', ; hold on;
plotxL yLk 'LineWidth', ;
plotxc ycr 'LineWidth', ;
plotxc xUyc yUbo 'MarkerFaceColor', b 'MarkerSize', ;
plotxcend xUendycend yUendbo 'MarkerFaceColor', b 'MarkerSize', ;
grid on;
axis equal;
xlabelChord Length';
ylabelThicknessCamber;
titlelabel;
legendUpper Surface', 'Lower Surface', 'Mean Camber Line', 'Location', 'Best';
end
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
