Function importAirfoil: Difference between revisions
(Created page with "== GNU Octave Airfoil coordinates import function == Airfoil coordinates import function in GNU Octave. File:ImportAirfoil_OCT.png == Source Code == Source code for th...") |
No edit summary |
||
Line 54: | Line 54: | ||
Distributed under the GNU General Public License v3.0 or later license. | Distributed under the GNU General Public License v3.0 or later license. | ||
[[Category:User | [[Category:User Contributed Code]] |
Latest revision as of 20:08, 21 January 2022
GNU Octave Airfoil coordinates import function[edit]
Airfoil coordinates import function in GNU Octave.
Source Code[edit]
Source code for this function is available at: github.com/VAZMFB/GNU-Octave-importAirfoil
Requirements[edit]
Provided code is tested with GNU Octave 6.4.0.
Usage[edit]
Run importAirfoil.m with the full path to document with airfoil data as only input argument. Please check provided test.
Airfoil file parsing rules[edit]
- The file is read a line at a time starting from the top.
- Blank lines are discarded.
- The first line that is not discarded is the line on which function sscanf() finds two float numbers, with the first number in the range [-0.1, 1.1] and the second in the range [-1.1, 1.1].
- All subsequent lines on which function sscanf() finds two float numbers are taken into the account.
- If any value is greater than 1.1 all values are divided by 100 (see NACA file format).
- If there is one change in x value gradient, flip data that is after the change of gradient (see Lednicer file format).
Airfoil file formats[edit]
- Siegel
Lists points from the trailing edge, goes over the upper surface, then over the lower surface, to go back to the trailing edge (or in other direction, first lower and then upper surface).
- Lednicer
Lists points on the upper surface (from leading edge to trailing edge), then points on the lower surface (from leading edge to trailing edge).
- OpenVSP .af
Same as the Siegel format but with the additional header.
- NACA (as in Report No. 824)
Same as the Lednicer format but multiplied by 100.
Discussion[edit]
Discussion about this function is avialable at Discourse.
Author and Licensing[edit]
Author: Miloš Petrašinović <mpetrasinovic@mas.bg.ac.rs>
Department of Aerospace Engineering, Faculty of Mechanical Engineering, University of Belgrade
Distributed under the GNU General Public License v3.0 or later license.