External wind field data to fast - by IfW_UserWind

Hello Everyone,

I hope this message finds you well. Also i hope i am posting it on the right place.

I have used wind field data that is stored on a txt file in which i wanted to be read by FAST. The data in the text file is as follows: There is a line for each single data, each line has 10 entries as follows: (NO, DISTANCE, ANGLE, NODE, XNODE, YNODE, ZNODE, VX, VY, VZ).

I read the data and stored the values of the txt file into arrays in the fortran’s module (IfW_UserWind.f90) for (NODE, XNODE, YNODE, ZNODE, VX, VY, VZ). I used the subroutine IfW_UserWind_Init to initiate the data (to open and read the txt file and store the data by a do loop in arrays called: XNODE, YNODE, ZNODE, VX, VY, VZ). I compiled the code and it was successful.

So, i moved to add the these values into IfW_UserWind_CalcOutput subroutine. But when i try to add the points of the grid (XNODE, YNODE, ZNODE) - (xnode is zero, so basically it’s just Y, Z grid) - into PositionXYZ(:,:), i get an error says that: a dummy argument shall not be defined or be undefined. I got the same error when i tried to add the values of the velocities on Velocity(:,:slight_smile: (also on the IfW_UserWind_CalcOutput subroutine).

Is it wrong to add the velocities of the wind field (VX, VY, VZ) on Velocity(:,:slight_smile: and the grid points of these data on PositionXYZ(:,:slight_smile: ?! If not, where should it be stored to get the response of the tower to these specific wind data?

The wind field’s data is something like that:

NO     DISTANCE          ANGLE    NODE         YNODE           XNODE          ZNODE            VY            VX            VZ
1      120.00000       60.00000   00001      -50.00000        0.00000        0.00000        0.00000        0.00000        0.00000
1      120.00000       60.00000   00002      -48.00000        0.00000        1.00000        4.37233      -11.37799       -0.06828
1      120.00000       60.00000   00003      -46.00000        0.00000        2.00000        4.37233      -11.37799       -0.06828
1      120.00000       60.00000   00004      -44.00000        0.00000        3.00000        4.37233      -11.37799       -0.06828
1      120.00000       60.00000   00005      -42.00000        0.00000        4.00000        4.37233      -11.37799       -0.06828

Any helpful recommendation would be so much appreciated.

Dear Mohamed,

PositionXYZ() is an input argument to routine IfW_UserWind.f90/IfW_UserWind_CalcOutput() i.e. it is set by the calling program and it cannot be changed within the routine. If you want to implement your own logic in this routine, you must set the values of Velocity() associated with each X-Y-Z position specified by PositionXYZ().

Best regards,

Thank you Dr. Jason for your reply. But I am not sure I understood everything correctly (I am so sorry, I am a beginner in fortran)…

I edited the module IfW_UserWind.f90 as recommended here on the forum to add the wind velocities externally. I added few lines to IfW_UserWind_Init subroutine to open and read the data and put them into vectors named as: XNODE, YNODE, ZNODE, VX, VY, VZ

Then I want to add these values of the velocities to the place where the data can be read and interpolated for the analysis to get the response of the wind turbine tower and blades (IfW_UserWind_CalcOutput()) . From what I understand, the values of the velocities should be added to Velocity() while the location of the nodes where I added the velocities should be placed at PositionXYZ(). Is it correct?

If what I understand is correct, why while I am adding the velocities and the positions of the nodes, it says that I can’t define or un define that argument (PositionXYZ() and Velocity()) ? Or should I use different way to define it?

And If I understand wrongly, How can I add the data of XNODE(2470), YNODE(2470) , ZNODE(2470), VX(2470), VY(2470), VZ(2470) into PositionXYZ() and Velocity()?

I even tried to redefine PositionXYZ() and Velocity() to add the dimensions for PositionXYZ(2470,2470,2470) and it said that the number of data is too large.

I am sorry of it’s stupid question, but I am really stuck on it…

Dear Mohamed,

No, your understanding is not correct. As I said in my prior post, PositionXYZ() cannot be set within routine IfW_UserWind.f90/IfW_UserWind_CalcOutput(). PositionXYZ() is an input that is set by the calling program. Basically, FAST sets PositionXYZ() to be currently location of the tower and blade aerodynamic analysis nodes (and so the positions change every time step that routine IfW_UserWind.f90/IfW_UserWind_CalcOutput() is called). When you change routine IfW_UserWind.f90/IfW_UserWind_CalcOutput(), you must implement the routine such that you are able to calculate the Velocity() at each location stored in PositionXYZ() (the positions of which are not defined by you and change every time step). For example, I would imagine you’d have to interpolate from your XNODE/YNODE/ZNODE grid to the positions defined by PositionXYZ().

I hope that helps.

Best regards,