OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
671 stars 452 forks source link

Error with BL input file reading #593

Closed ptrbortolotti closed 3 years ago

ptrbortolotti commented 3 years ago

Hello OpenFAST team,

I'm trying to have the code reading the same boundary layer data input file over multiple sections. One could argue that it is weird to try doing that, but it was a convenient thing to do close to blade root, where BL data is hard to obtain from codes like XFoil. The code is now throwing the error "FAST_InitializeAll:AD_Init:Init_AAmodule:AA_Init:ReadInputFiles:readbltable:OpenFInpFile:Cannot open file"

@andrew-platt Could it be that this routine opens the files but does not close it? Matlab/Python would crash in a case like this. Does Fortran run into the same issue?

https://github.com/OpenFAST/openfast/blob/ff33ca1cf65f2e13c1de0ab78cc2396ec4a47ce0/modules/aerodyn/src/AeroAcoustics_IO.f90#L391

Am I off track? If I am not, is this is a hard bug to fix?

It is NOT an urgent issue.

Thank you!

Pietro

ebranlard commented 3 years ago

Yes you are right, only the last file is closed, I can submit a quick fix

ptrbortolotti commented 3 years ago

Thank you!

rafmudaf commented 3 years ago

@ptrbortolotti Did you verify that this fixes the issue?

ptrbortolotti commented 3 years ago

It does fix it thank you. I close the issue