hoburg / pyxfoil

Python tools for running xfoil many times
MIT License
10 stars 4 forks source link

Example code doesn't work #1

Open pgkirsch opened 8 years ago

pgkirsch commented 8 years ago
[philippekirschen@kirschens-macbook-pro pyxfoil]$ python genpolar.py 
No directory specified:
Enter a run directory >> test1
test1
New run created: test1
Genpolar >> nacaset = ['2412']
Genpolar >> import numpy
Genpolar >> reynolds_set = numpy.logspace(4, 8, 41)       
Genpolar >> sweep(nacaset, reynolds_set)
***
Airfoil = NACA2412 Re = 10000.0
CL successfully zeroed: a = 0.594
End Of File (EOF). Empty string style platform.
<pexpect.pty_spawn.spawn object at 0x103521ed0>
command: /Applications/Xfoil/bin/xfoil
args: ['/Applications/Xfoil/bin/xfoil']
searcher: None
buffer (last 100 chars): ''
before (last 100 chars): 'ime error: Sequential READ or WRITE not allowed after EOF marker, possibly use REWIND or BACKSPACE\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 24194
child_fd: 8
closed: False
timeout: 30
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: <open file '/Users/philippekirschen/Documents/MIT/Research/pyxfoil/pyxfoil/test1/logs/XFOILsession2016_05_08_234906_sweep.txt', mode 'w' at 0x10355a030>
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
Invalid command: sweep(nacaset, reynolds_set) try again.
whoburg commented 7 years ago

hmm, this is working for me. Can't reproduce.

pgkirsch commented 7 years ago

I just tried again using latest master and got the same result..

whoburg commented 7 years ago

what's in the log file '/Users/philippekirschen/Documents/MIT/Research/pyxfoil/pyxfoil/test1/logs/XFOILsession2016_05_08_234906_sweep.txt'?

pgkirsch commented 7 years ago

Attached XFOILsession2016_05_08_234906_sweep.txt

whoburg commented 7 years ago

Here are the input commands that pyxfoil is running (extracted from the log); @pgkirsch maybe you can try this manually on your xfoil?

xfoil
 XFOIL   c>  PLOP
Option, Value   (or <Return>)    c>  G
Option, Value   (or <Return>)    c>  
XFOIL   c>  naca 0010
XFOIL   c>  
XFOIL   c>  ppar
Change what ? (<cr> if nothing else)   c>  n 200
Change what ? (<cr> if nothing else)   c>  
Change what ? (<cr> if nothing else)   c>  
XFOIL   c>  naca 2412
XFOIL   c>  
XFOIL   c>  OPER
.OPERi   c>  visc 10000.0
.OPERv   c>  cl 0
.OPERv   c>  pacc
Enter  polar save filename  OR  <return> for no file   s>  NACA2412_Re00000010k.pol
Enter  polar dump filename  OR  <return> for no file   s>  
.OPERva   c>  alfa 0.594

The final alfa command seems to result in

At line 664 of file ../src/iopol.f (unit = 9, file = 'NACA2412_Re00000010k.pol')
Fortran runtime error: Sequential READ or WRITE not allowed after EOF marker, possibly use REWIND or BACKSPACE

wonder if this is an xfoil issue?

whoburg commented 7 years ago

maybe the file 'NACA2412_Re00000010k.pol' exists and needs to be deleted?

pgkirsch commented 7 years ago

Yes, I get the same error when I try those commands manually

pgkirsch commented 7 years ago

I tried deleting 'NACA2412_Re00000010k.pol' from test1/savedpolars/ but that didn't seem to help.

And it didn't exist in the directory where I manually tested xfoil.

whoburg commented 7 years ago

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59513