No BSD License
-
InitializeGUI(airfoildata)
Initializes the GUI and establishes callback functions
-
DeterminePanelGeometry(inputg...
find coordinates for horseshoe vortices and control points and plot
-
DetermineProfileDrag(airfoild...
Determine the wing profile drag from the airfoils' drag polars
-
FinalOutput(CL, CDi, CD0, y_c...
calculate score and other outputs, post to the GUI
-
GetGeometryfromGUI(root, tip,...
Get parameters from the GUI and create geometry structure "geo"
-
InducedDrag(gamma, geo, panel...
Calculate far field induced drag
-
LiftCoeff(gamma, panel, geo, ...
Determine the lift coefficient given the vortex strengths
-
PerformRegression(data)
Relate the coefficients of the drag polar to Re as parabolic functions.
-
SpanLoading(l_s, l_t, CL, geo...
Determine center of pressure and spanwise loading
-
StandardAtmosphere(alt)
Read in altitude and output viscosity, density, and speed of sound
-
ZeroOutput(output)
Null output to GUI when error checking is not satisfied
-
[C,T,A]=naca4_3d(airfoil,y,nc...
determine airfoil skin and camber coordinates from NACA designation
-
[gamma, Fu_bar, Fv_bar, Fw_ba...
Implement Vortex Lattice Method
-
parseNACAairfoildata
parse the text file NACAdata.txt into a structure
-
Contents.m
-
Main.m
-
View all files
from
Wing Designer
by John Rogers
Wing Designer computes aircraft performance measures from wing and engine parameters.
|
| parseNACAairfoildata
|
function [finaldata] = parseNACAairfoildata
% parse the text file NACAdata.txt into a structure
fid = fopen('NACAdata.txt','r');
data = textscan(fid, '%s %n %n %n %n %n');
fclose(fid);
%Initialize finaldata
finaldata(1).airfoil = data{1}{1};
finaldata(1).Re = data{2}(1);
finaldata(1).a0 = data{3}(1);
finaldata(1).a1 = data{4}(1);
finaldata(1).a2 = data{5}(1);
finaldata(1).alphastall = data{6}(1);
%Iterate through all entries in data
for i = 2:length(data{1})
updated = 0;
for j = 1:length(finaldata)
%if we have already read in data about a certain airfoil, append
%new data
if strcmp(finaldata(j).airfoil,data{1}{i})
finaldata(j).Re = [finaldata(j).Re; data{2}(i)];
finaldata(j).a0 = [finaldata(j).a0; data{3}(i)];
finaldata(j).a1 = [finaldata(j).a1; data{4}(i)];
finaldata(j).a2 = [finaldata(j).a2; data{5}(i)];
finaldata(j).alphastall = [finaldata(j).alphastall; data{6}(i)];
updated = 1;
break
end
end
%if we have not already read in data about a certain airfoil, create
%new entry
if updated == 0
finaldata(end+1).airfoil = data{1}{i};
finaldata(end).Re = data{2}(i);
finaldata(end).a0 = data{3}(i);
finaldata(end).a1 = data{4}(i);
finaldata(end).a2 = data{5}(i);
finaldata(end).alphastall = data{6}(i);
end
end
|
|
Contact us at files@mathworks.com