Closed Zcaic closed 1 year ago
Hey @Zcaic ,
Thank you for posting about this issue!
When you say
I change line 264 to "command = [f'{self.xfoil_command}',f'{airfoil_file}']" , it can call Xfoil, but unfortunately, Xfoil can not work as expected.
Can you describe:
a) Expected behavior b) Observed behavior
Similarly, when you say that the original command "does not support" on Linux, can you also describe the same expected and observed behavior here?
This will help us reproduce, understand, and fix the issue here. Thanks!
Hello @peterdsharpe, I'm glad you got back to me
I test aerosandbox/aerodynamics/aero_2D/xfoil.py in Ubuntu 22.04, I add "print (result_at_single_alpha)" at end. xfoil.py.txt
a) Expected behavior: get correct result. b) Observed behavior: it raise :"FileNotFoundError: [Errno 2] No such file or directory: 'xfoil airfoil.dat'". then I found the reason of this error, I change line 272 "command = f'{self.xfoil_command} {airfoil_file}'" to "command = [self.xfoil_command,airfoil_file]",
it does not raise error , but I sitll dont get correct result. b) Observed behavior: "{'alpha': array([], dtype=float64), 'CL': array([], dtype=float64), 'CD': array([], dtype=float64), 'CDp': array([], dtype=float64), 'CM': array([], dtype=float64), 'Top_Xtr': array([], dtype=float64), 'Bot_Xtr': array([], dtype=float64), 'Top_Itr': array([], dtype=float64), 'Bot_Itr': array([], dtype=float64)}" it can found that "result_at_single_alpha" is empty.
then I Uncomment "verbose=true" in line 536 to see what happen, and it raise: " **Enter polar output filename s> At line 664 of file ../src/iopol.f (unit = 19, file = 'output.txt') Fortran runtime error: Unexpected element '(1X,F7.3 ,F9.4 ,F10.5 ,F10.5 ,F9.4 ,
Error termination. Backtrace:
at /usr/src/debug/gcc/gcc/libgfortran/io/transfer.c:3161
" But it can work and print correct result in Windows, because I'm not familiar with xfoil, I guess the there is a problem with the parameter passed to xfoil in Linux。
Could you see what's wrong ,thanks!
It has same problem in Arch Linux, So I think it is not a problem caused by Ubuntu.
Thank you for your reply, I will try your proposal.
@max-97 thanks very much. I change code about "pwrt" and "pacc" as you said, it works as expect. Thanks a lot!
Glad to hear it @Zcaic ! Thanks for the tip here, @max-97 .
New versions of AeroSandbox will have the option of using our new NeuralFoil package to generate airfoil polar functions instead of XFoil - since NeuralFoil is pure Python + NumPy, this should eliminate the need to have a local XFoil copy for most users. This will make cross-platform use vastly easier.
A preview is available in the AeroSandbox feature/neuralfoil-merge
branch, but should go live on master
+ develop
soon.
@max-97 @Zcaic , the fix proposed by @max-97 has been worked into the feature/neuralfoil-merge
WIP branch, and will be incorporated into the next AeroSandbox release (probably later this week). This fix has been verified to maintain compatibility on Windows as well.
https://github.com/peterdsharpe/AeroSandbox/commit/932f82db134b92e26462c6384f88ae87caffe144
Nice work!
I'm glad to hear the good news
@peterdsharpe When I learn DAWNDESIGNTOOL, I found the description of the function lib_winds.tropopause_altitude to be problematic. Code show as below: It seems that the comment inside the red box should be changed to
"latitude" : latitude, in degree
Good catch, thanks! Fix committed, incoming here:
https://github.com/peterdsharpe/AeroSandbox/commit/d132cf40442ebaa34968b74d58bad37fa5544d0c
1.airfoil.generate_polars work well in Windows, but it can't work in Ubuntu22.04. I found it caused by Xfoil .
I change line 264 to "command = [f'{self.xfoil_command}',f'{airfoil_file}']" , it can call Xfoil, but unfortunately, Xfoil can not work as expected.