Skip to content

Conversation

@rthedin
Copy link
Collaborator

@rthedin rthedin commented Apr 9, 2025

Issue pointed out on the forums: https://forums.nrel.gov/t/the-rotorapexoffsetpos-array-was-not-assigned-valid-real-values-on-line-59-issue-with-openfast-toolbox/8616

The issue is reproducible and is occurring with entry RotorApexOffsetPos that has 3 components. Only the first one is being read since by default the toolbox is not accepting space-separated entries:

allowSpaceSeparatedList=False

This PR changes that behavior, even though I'm not directly changing the variable allowSpaceSeparatedList in the line above. Now, for every line, we read as many space-separated consecutive scalars and bools as possible. Strings are still only read once. The prior implementation only read two integers when allowSpaceSeparatedList is set to True:

if allowSpaceSeparatedList and len(splits)>1:
if strIsInt(splits[1]):
d['value']=splits[0]+ ' '+splits[1]

Such restriction is now lifted.

The goal with the change is that when the user reads a file using f = FASTInputFile('my_openfast_input.dat') and then writes it again with f.write('my_openfast_input_mod.dat'), no changes are introduced.

There is one detail:
Now when the user specifies extra inputs because he/she knows OpenFAST will not read them, e.g. 2 3 WindType <comments>, then the toolbox will in fact read both and re-write them as 2, 3 WindType <comments>. The new written file will still be read by OpenFAST normally, only taking into account the first value. However, some processing scripts might have checks like f['WindType']==2 and that would fail.

@rthedin rthedin requested a review from ebranlard April 9, 2025 18:41
@rthedin rthedin merged commit 857434c into OpenFAST:main May 27, 2025
0 of 10 checks passed
@rthedin rthedin deleted the f/spaceseparated branch May 27, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant