User Defined WindType in InflowWind

Dear OpenFAST developers,

In the InflowWind user guide(link: https://openfast.readthedocs.io/en/main/_downloads/a231262e7763b4d61759ebe4e0fc30b2/InflowWind_Manual.pdf) , it is mentioned that for WindType = 6 is user defined using the UserWind subroutine (to be supplied by and compiled by the end user; template file IfW_UserWind.f90 is provided).

I have checked the github repository of OpenFAST for that Fortran file but I cannot find it. The online documentation does not seem to explain that option.

Could you please point me to an example or provide an explanation how to use the User defined WindType in InflowWind?

Best regards,

Y. Thiziri

@Yoor.Thiziri

I apologize, the documentation hasn’t been updated to reflect the changes to InflowWind with regards to the user defined flow field. An issue has been filed on the OpenFAST github to get this fixed.

In the meantime, I can tell you where to look in the source code. The relevant locations are found in IfW_FlowField.f90 on lines 1738 (UserField_GetVel) and 310 (case (User_FieldType)). Populate the subroutine UserField_GetVel with your code to provide the wind velocity vector based on time and position. Persistent data may be stored in the UserFieldType which is also passed to that subroutine. Members maybe be added to the UserFieldType by modifying the IfW_FlowField.txt registry file.

After this function has been populated, replace lines 316 and 317,

call SetErrStat(ErrID_Fatal, "User Field not implemented", ErrStat, ErrMsg, RoutineName)
return

which return an error stating that the user field hasn’t been implemented, with the call to UserField_GetVel.

Thanks,

Derek Slaughter

2 Likes

Here is a link to the issue in the OpenFAST GitHub repository: Missing documentation for User Defined Wind in InflowWind · Issue #3000 · OpenFAST/openfast · GitHub.

Best regards,

1 Like

Dear @Derek.Slaughter ,

Thank you for the clarification. I will try to go through the code to understand it.

I wonder if there is an alternative way. My goal is to:

  • Export a transient velocity field from a CFD simulation in the YZ plane slice from a post-processing tool like ParaView to some file format that can be read by InflowWind module (Could it be TurbSim or other file formats?).
  • Use those inflow velocities as input to InflowWind each time step.

I am still learning OpenFAST and appreciate some guidance on how to achieve that.

Best regards,

Y. Thiziri

Dear @Yoor.Thiziri ,

Presumably you mean a time-dependent vertical YZ grid of inflow data (rather than a horizontal XY grid).

Regardless, I agree that you could always convert your CFD data to a format already supported by InflowWind, such as TurbSim, Bladed, or HAWC format.

Best regards,

1 Like

Dear @Jason.Jonkman ,

Thank you for your answer. Yes, I mean YZ plane not XY.

Thank you.

Best,

Y.Thiziri