Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with non NACA airfoil? #12

Open
zonexo opened this issue Jun 3, 2020 · 3 comments
Open

How to use with non NACA airfoil? #12

zonexo opened this issue Jun 3, 2020 · 3 comments

Comments

@zonexo
Copy link

zonexo commented Jun 3, 2020

Hi,

I got the naca0012 example working. Is there an example how to get it working with non NACA airfoil? Thanks!

@parmonom
Copy link

import numpy as np
from xfoil import XFoil
from xfoil.model import Airfoil

xf = XFoil()

#x, y coordinates of your airfoil
x = np.array([1.     , 0.98037, 0.93064, 0.8537 , 0.75616, 0.64594, 0.53099,
              0.41638, 0.30609, 0.20549, 0.11999, 0.05468, 0.01338, 0.     ,
              0.01338, 0.05468, 0.11999, 0.20549, 0.30609, 0.41638, 0.53099,
              0.64594, 0.75616, 0.8537 , 0.93064, 0.98037, 1.     ])
y = np.array([0.001341,  0.008009,  0.014067,  0.026066,  0.040484,  0.054959,
              0.06816 ,  0.078438,  0.083164,  0.080166,  0.068108,  0.047083,
              0.019785, -0.000696, -0.018018, -0.032271, -0.041626, -0.048684,
             -0.053613, -0.052991, -0.048566, -0.041285, -0.031565, -0.021308,
             -0.012699, -0.007986, -0.00155 ])

xf.airfoil = Airfoil(x, y)

This worked for me. With x, y, the coordinates of your airfoil.

@sahilbhola14
Copy link

airfoil_data.txt
XFOIL works with the attached file with the following set of commands,

LOAD airfoil_data.txt
airfoil_data
PANE
OPER
Visc 6000000
PACC
polar_file.txt

ITER 100
alfa 10

quit

However, it is not working with the package,
x = data_1[:, 0]
y = data_1[:, 1]
xf.airfoil = Airfoil(x, y)
xf.Re = 6e6
xf.max_iter = 500
cl, cd, cm, cp = xf.a(10)

@sphh
Copy link

sphh commented Feb 5, 2022

@sahilbhola14: Without seeing your error message, it is difficult to say, what is going wrong. But the ongoing development at codepage added the possibility to load the airfoil data from a file (and save it to a file). See https://codeberg.org/xfoil-python/xfoil-python/issues/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants