Skip to main content

Airfoil coordinates import function

Project description

Python Airfoil coordinates import function

Airfoil coordinates import function in Python.

Requirements

Python

Provided code is tested with Python 3.10.1.

Installation

Run:

pip install importAirfoil

Usage

Use importAirfoil function with the full path to document with airfoil data as only input argument.

Please check provided test in test/_App folder. In order to run the test first run CreateApp.cmd file (with adjusted input variables).

Airfoil file parsing rules

  • 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 scanf() 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 scanf() 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

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.

License

Copyright (C) 2022 Milos Petrasinovic info@vazmfb.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

importAirfoil-1.3.0.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file importAirfoil-1.3.0.tar.gz.

File metadata

  • Download URL: importAirfoil-1.3.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for importAirfoil-1.3.0.tar.gz
Algorithm Hash digest
SHA256 debed6ed76c31f3e478db2adb3cf080a578733cc02d4fcbd321ee482f638dac4
MD5 495518ba04616460c9f7d4f82f26c75f
BLAKE2b-256 ed44e92bc697027d492337ef7c5289eab6cf6c9b62c3e30407119c698a3e6ec3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page