usuaero / AirfoilDatabase

A Python module for modeling airfoils
MIT License
29 stars 8 forks source link

Ncrit command is incorrect for xfoil 6.99 #10

Closed ss1870 closed 1 year ago

ss1870 commented 1 year ago

Hi there,

I think the command for setting Ncrit is incorrect, at least for my version of xfoil (6.99).

It should just be a single 'N' for both surfaces, and not differentiated between top and bottom surfaces. As it currently stands, no error is thrown, but Ncrit is just not set as requested.

https://github.com/usuaero/AirfoilDatabase/blob/f018674651c1431247cee74b5b24046249713bcf/airfoil_db/airfoil.py#L2129-L2139

Kind regards,

Sam

corygoates commented 1 year ago

This is working with my version of Xfoil (6.99 install via apt on Linux Mint). Could you provide more details as to what is going wrong on your end?

ss1870 commented 1 year ago

Hi Cory,

For reference, I am using the xfoil 6.99 windows executable available at: https://web.mit.edu/drela/Public/web/xfoil/ I would be surprised if the inputs were different between Linux and windows versions, but I have not yet checked the linux version myself. There is also no mention of different Ncrit values for lower/upper surfaces in the windows or linux documentation. From reading the section on 'Transition criterion', I don't think it would physically make sense to specify this amplification factor differently for the upper and lower surfaces.

Here is a screenshot of me attempting to use the commands - 'NT' and 'NB' - that are used by AirfoilDatabase, and then the correct command for my version 'N': image

Kind regards,

Sam

corygoates commented 1 year ago

Thanks for the extra info. It really doesn't make sense to me either. Here's what my xfoil output looks like:

ncrit

I don't know why they wouldn't have that in the docs.

I suppose since xfoil will just ignore a bad command, I could set it so AirfoilDatabase will try to put in both commands. Would you be willing to help me test that once I've got it implemented?

corygoates commented 1 year ago

Actually, it looks like the Linux version accepts both "N" and "NT/NB" as commands. I'll just update AirfoilDatabase to only use "N". I can't imagine anyone will ever want to specify the critical amplification otherwise, especially if that's not outlined in the docs.

corygoates commented 1 year ago

Fixed.

ss1870 commented 1 year ago

Thanks!

corygoates commented 1 year ago

No problem! Thanks for pointing that out.