Compiling FAST

Hi,

i tried to compile FAST but i encountered to the error#10037, please see the attached file.
please provide me with your help,

thanks,

Based on the message

it looks like you have not called IFORTVARS.bat correctly for your compiler. This batch script sets the paths and variables the compiler needs to work properly. (You can also just open the shortcut to the command prompt window that is installed with your compiler instead of explicitly calling IFORTBARS.bat.)

There is a discussion on how to fix the issue here: http://forums.nrel.gov/t/compiling-fast-with-ivf/239/1

Dear Bonnie,

Thanks for your great advice,
Milad.

Hi ,
i am trying to exert an user-defined load on arbitrary tower point of ITI energy barge with 5 mw baseline NREL wind turbine in each time step.
as per your advice, i have done some modifications in Subroutine UserTwrLd and also in FAST.f90 . i recompiled FAST by Visual Studio and it recompiled without any errors. i have added the TOWER (CONT) to the Platform input file(please see the attached file). in FAST_IO.f90 there are some command lines related to the TOWER (CONT) after CASE ( 2 ):

READ (UnIn,’(A80)’,IOSTAT=IOS) Line

IF ( IOS == 0 ) THEN ! .TRUE. if there was no error reading the Line.

  IF ( Line(1:80) == '---------------------- TOWER (CONT) --------------------------------------------' )  THEN  ! .TRUE. if we are using the undocumented monopile feature

! Enable the undocumented hydrodynamic loading routines:

     CompHydro = .TRUE.

! -------------- TOWER (CONT) -------------------------------------------------

     IF ( Echo )  WRITE (UnEc,'(A)')  &
        '  ---------------------- TOWER (CONT) --------------------------------------------                    '

! TwrLdMod - Tower loading model switch.

     CALL ReadIVar ( UnIn, PtfmFile, TwrLdMod, 'TwrLdMod', 'Tower loading model switch' )

     IF ( ( TwrLdMod /= 0 ) .AND. ( TwrLdMod /= 1 ) .AND. ( TwrLdMod /= 2 ) )  THEN
        CALL ProgAbort ( ' TwrLdMod must be 0, 1, or 2.' )
     END IF


     IF ( TwrLdMod == 1 )  THEN ! .TRUE if we will be using the built-in Morison's equation.

! TwrDiam - Tower diameter in Morison’s equation.

        CALL ReadRVar ( UnIn, PtfmFile, TwrDiam, 'TwrDiam', 'Tower diameter in Morison''s equation' )

        IF ( TwrDiam < 0.0 )  CALL ProgAbort ( ' TwrDiam must not be negative.' )

! TwrCA - Normalized hydrodynamic added mass coefficient in Morison’s equation.

        CALL ReadRVar ( UnIn, PtfmFile, TwrCA, 'TwrCA', &
           'Normalized hydrodynamic added mass coefficient in Morison''s equation' )

        IF ( TwrCA < 0.0 )  CALL ProgAbort ( ' TwrCA must not be negative.' )

! TwrCD - Normalized hydrodynamic viscous drag coefficient in Morison’s equation.

        CALL ReadRVar ( UnIn, PtfmFile, TwrCD, 'TwrCD', &
           'Normalized hydrodynamic viscous drag coefficient in Morison''s equation' )

        IF ( TwrCD < 0.0 )  CALL ProgAbort ( ' TwrCD must not be negative.' )


     ELSE                       ! We must not be using the built-in Morison's equation, so skip these inputs.


        CALL ReadCom ( UnIn, PtfmFile, 'unused TwrDiam')
        CALL ReadCom ( UnIn, PtfmFile, 'unused TwrCA'  )
        CALL ReadCom ( UnIn, PtfmFile, 'unused TwrCD'  )


     ENDIF

but there not exist such command lines after CASE ( 3 ). i have blocked with this,
please provide me with your advice.

Dear Milad,

As discussed in the forum topic found here: http://forums.nrel.gov/t/simulink/403/1, FAST v7.00.01a-bjj is not currently set up to support loading on the tower for a floating wind system. We are currently working on an updated version of FAST and HydroDyn. This version will include the option to include both tower and platform loading at the same time. You can either wait for this version or add the capability yourself. If I understand your post, you appear to be adding this capability yourself. As I see it, the steps required to do this would include:

*Modify the floating platform input file to include the tower section data from the fixed-bottom offshore input file (I see from your post that you have already done this).
*Modify the FAST_IO.f90 source file to read in the new tower section data. I see from your post that you’ve identified the correct section of code from CASE (2) of PtfmModel. You’ll need to copy this section of code and include it in CASE (3) of PtfmModel.
*Modify the remaining source code to apply the new tower section data to floating platforms.

I hope that helps.

Best regards,

Dear Mr.Jonkman

i modified the FAST_IO.f90 source file and copy the commands in CASE ( 3 ) section, but i have encountered to a new issue:
when i use subroutine UsertwrLD, the undocumented Hydrodynamic loading routines will be enabled in TOWER (CONT) section and consequently CompHydro will be set to True. on the other hand, if CompHydro is set to True the WaveMod and RdtnTMax must be set to Zero. i was wondering if i want to exert a User-Defined load on an arbitrary tower point of a floating wind turbine through UserTwrLD, do I have to set WaveMod to Zero and ignore the impact of Incident wave on wind turbine structure?

thanks,

Dear Milad,

WaveMod and RdtnTMax must only be zero during a FAST linearization analysis (AnalMode = 2). During a time-marching simulation, they can certainly both be nonzero.

With the modifications you’ve been making, you should be able to have user-defined tower loading via the UserTwrLd routine and floating platform hydrodynamics both at the same time.

I hope that helps.

Best reards,

Dear Mr.Jonkman

many thanks for your response,
As a test, i compiled FAST v7.00.01a-bjj by Visual Studio and i used the attached source files, and it compiled smoothly.i used ITI energy barge with 5 mw baseline NREL wind turbine input files, but when i was debugging the code, i encountered to an error which is attached,(“file name” has triggered a breakpoint)
please provide me with your advice,


source-2.png

The message you have attached does not necessarially indicate an error in the Fortran code or model you are running. It looks like an informational message from the debugger telling you that the program has reached a particular line or condition that you have set as a breakpoint. (It is fairly easy to accidentally set a breakpoint by clicking on the left margin of the source code in Visual Studio.) Please see the Microsoft Visual Studio debugger documentation to learn more about its behavior and features.

If you added a breakpoint to catch something in particular, please let us know what you think the error condition is.

Dear Dr.Jonkman

First, i really appreciate your response,
actually, when the error " ‘file name’ has triggered a breakpoint" is appeared in Visual Studio, a message is written on the exe window which is attached. by the way, you can find the project, “TestFAST.rar”, which is built in Visual Studio 8 in following link: 4shared.com/folder/KyLsGxB2/_online.html
i have used the ITI energy barge with 5 mw baseline NREL wind turbine input files for this project.
thanks.

Dear Milad,

Unfortunately, we do not have resources to look through user’s entire projects, so I have not looked at all of your code. But, from your error message, I would guess that you have not allocated the LNodesX array (or you allocated it to be the wrong size). I suggest you look through the changes you made and make sure that the arrays are getting allocated.

Hope that helps.

Dear Dr.jonkman

Regarding the project i have done, i have just used the original codes of FAST v7.00.01a-bjj, and then recompiled it ,without any error, in Visual Studio. actually, i did not any changes in the source code of FAST v7.00.01a-bjj and the allocatable Array LNodesX bounds " ALLOCATE ( LNodesX ( LineNodes) , STAT=Sttus )" is set to: LineNodes = LineNodesIn in HydroCalc line 4105.

thanks for your help.
Best Regards,

If you have not made any changes to the FAST, AeroDyn, or NWTC Subroutine Library source code downloaded from the NWTC web site, then there is likely an issue with your compiler or its settings. Which compiler are you using?

The particular array the compiler is complaining about looks like it is zero-size array. Those are legal in Fortran, but they are kind of a strange thing (especially if you have asked for bounds checking on your arrays). If you can’t work your way through resolving the compiler error, I think you can set LineNodes = 1 and create a dummy node, which you wouldn’t need to actually use.

Dear Dr.jonkman

thanks for your advice, the error was resolved by applying some changes.
In another project, i recompiled FAST with GH-Bladed DLL interface smoothly by Visual Studio 8, (as per Compile_FAST.bat, i had done the required changes in: UserSubs.f90, UserVSCont_KP.f90 and added the BladedDLLInterface.f90 source codes). i ran FAST with ITI energy barge with 5 mw baseline NREL wind turbine input files and also created the “90m_12mps” files through TurbSim (TurbSim “90m_12mps” file specifications:NumGrid_Z = 13, NumGrid_Y = 13, AnalysisTime = 630, UsableTime = 630, HubHt = 90, GridHeight = 160, GridWidth = 200, refHt = 90, URef = 12). At run time, i have encountered with this error: “Error: FF wind boundaries violated. Grid too small in Z direction (height (Z=-125.11 m) is below the grid and no tower points are defined). Error getting velocity in Aerodyn/AD_WindVelocityWith disturbance().please, see the attached file.
i was wondering whether this error related to the executable file (the exe file which is built by Visual Studio)?

thanks.

Dear Milad,

I suspect your model is going numerically unstable. The error regarding FF wind boundaries is simply the first error that the program found. Earlier signs of a problem are seen by the “Small angle assumption violation” and “supersonic” blade velocity warnings. Without more information, it is hard to know what is causing this instability. Did you change the ITI Energy barge model in any way, such as changing the time steps or changing GBRatio?

Best regards,

Dear Mr.Jonkman

thanks for your helpful hint. i set GBRatio to 97.0 and tried it again. the FAST-dll ran smoothly.

Best Regards,

Dear Milad,

I’m glad your model is now working. Changing GBRatio from 97 to 1 effectively gives the free-free torsion mode of the drivetrain an extremely large natural frequency, which is not realistic. The model becomes unstable if the structural time step is not dramatically reduced or if natural frequency is changed back to what it should be.

Best regards,

Dear Dr.Jonkman

i’ve attached a file which shows a warning related to the small angle assumption violation. i guess that the warning will lead to violation in pitch motion. anyway, i was wondering whether this warning has significant impact on the results or can be ignored?

Thanks.

Dear Milad,

This warning cannot be ignored. Like the message says, the simulation results may be inaccurate due to the large deflection. Please see the forum post found here for more information on the small angle assumption violation warning: http://forums.nrel.gov/t/nrel-5mw-controls-dll-interface/183/1.

Best regards,

Dear Dr.Jonkman

thanks for your quick response.
i ran FAST with 12 mps wind speed loading and it worked smoothly without the small angle assumption violation warning. actually, this warning is appeared when i applied the 18 mps wind speed loading.however,i checked the magnitude of the tip blade deflection in 20 seconds and the deflections does not exceed this value in the remainder of the simulation also the time step is set to 0.0125 . so i guess that, as you mentioned on viewtopic.php?f=4&t=272, small angle assumption is only violated during the start-up transient.

Best Regards,
Milad.