VSP uses its own format for Airfoil files. Scripts to convert (or
code to read from) the UIUC database would be a great addition.
There should be a handful of example files in the 'airfoils' directory
distributed with OpenVSP.
There is a self-explanatory header at the top of the file. Then the
points are given in (x,y) pairs.
First, the top surface, leading edge to trailing edge. Then a blank
line. Then the bottom surface, LE to TE.
Points are interpreted where x runs from zero to one. Y-points are to-scale.
Although points are interpreted this way, it is not enforced. One
trick to model articulated flaps/slats is to read them in as an
airfoil file. Even though the points may run from x=0.8 to x=1.1, VSP
will 'do what you want' with them.
Rob
The C++ code could be modified to read both *.af format and also the
UIUC format.
The best approach may be to come up with a solution which can go on
the website -- either mass conversion and an airfoil archive or an
online conversion script. My preference would be for the latter --
Selig & co worked hard to collect all those airfoils, they deserve
credit for them.
Last time I looked at the UIUC files, there were a few different formats used.
Rob
What I meant by 'online conversion' was a web page on the site with an
'upload' button -- to upload a UIUC formatted file. A moment later,
it would push a download of the airfoil in *.af format.
If it was fancy, it might generate and display a plot of the airfoil
(say through gnuplot) so the user could see that the airfoil was
interpreted correctly.
This makes the dependency for conversion a decent browser and an
internet connection -- vs. installing Python.
Longer term, I hope to have an online database of *.vsp files
contributed by the community. In addition to the files, each would
have some metadata -- creator, version, citations, purpose, etc. I
would hope to have enough metadata so that a provenance for each file
could be established.
There can be a wide variety of quality of VSP models created -- this
is a good thing -- but it means you have to be careful when you start
with someone else's model.
Rob
No problem. Thanks for jumping in to help.
Well, "the code is the documentation"....
Airfoil files are read by this function...
https://github.com/OpenVSP/OpenVSP/blob/master/src/vsp/af.cpp#L1056
Which on line 1072 looks for "AIRFOIL FILE" on the first line. If it
does not find it, it attempts to read the file using this routine
"readSeligAirfoil". Who knew? It looks like an attempt to read UIUC
formatted files. Your job may already be done....
https://github.com/OpenVSP/OpenVSP/blob/master/src/vsp/af.cpp#L1136
If it does find "AIRFOIL FILE" then it uses "readVspAirfoil" to read the file.
https://github.com/OpenVSP/OpenVSP/blob/master/src/vsp/af.cpp#L1228
From that routine, it looks like it just uses the numbers and ignores
the rest of the line.
Rob
https://github.com/OpenVSP/OpenVSP/blob/master/src/vsp/af.cpp#L1272
Top surface points are written into lower surface array -- nothing
after the top surface points are read.
Rob