usuaero / AirfoilDatabase

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

airfoil.py might pick an already used random .pacc filename #6

Closed marcovanderbijl closed 1 year ago

marcovanderbijl commented 3 years ago

in airfoil.py around line 2087 # Polar accumulation file file_id = str(np.random.randint(0, 10000)) pacc_file = "xfoil_results_{0}.pacc".format(file_id) pacc_files.append(pacc_file)

xfoil flashed a warning that it was trying to write polar results into a .pacc file with different header information. I presume it picked a random .pacc filename number that had already been used in that run.

It would be much saver to use an incremental .pacc filename addative (or perhaps name them as dof number), instead of adding a check to see if the random had already been used.

corygoates commented 1 year ago

Excellent point. Working on this one. Turns out to be a simpler fix than I expected.

corygoates commented 1 year ago

Fixed