NREL / ROSCO_toolbox

A repository for generating ROSCO controller input files and more.
http://rosco-toolbox.readthedocs.io/
Apache License 2.0
23 stars 20 forks source link

Issue of running simulink #25

Closed isablanca closed 3 years ago

isablanca commented 3 years ago

Hi all, When I run the matlab script "runFAST.m", firstly, the error message shows

 "Unrecognized function or variable 'ROSCO2Matlab'.

Error in ReadWrite_FAST (line 43)
SD_dllP                 = ROSCO2Matlab(SD_dllFile,2);

Error in runFAST (line 30)
[Param,Cx] = ReadWrite_FAST(fast);" 

I have found these matlab-fast functions in another link: https://github.com/dzalkind/matlab-toolbox to solve that error. But a new error arises as

Error using runFAST (line 60) Error reported by S-function 'FAST_SFunc' in 'ROSCO/FAST Nonlinear Wind Turbine/S-Function': FAST_InitializeAll:FAST_Init:FAST_ReadPrimaryFile:Invalid logical input for file "D:\Documents\Me_doc\ROSCO_toolbox\Test_Cases\5MW_Land_Simulink\5MW_Land_Simulink.fst" occurred while trying to read CalcSteady. FAST_ReadPrimaryFile:Invalid numerical input for file "D:\Documents\Me_doc\ROSCO_toolbox\Test_Cases\5MW_Land_Simulink\5MW_Land_Simulink.fst" occurred while trying to read Twr_Kdmp. FAST_ReadPrimaryFile:Invalid numerical input for file "D:\Documents\Me_doc\ROSCO_toolbox\Test_Cases\5MW_Land_Simulink\5MW_Land_Simulink.fst" occurred while trying to read Bld_Kdmp.

I am not very familiar with the setting in the .fst file, and have no idea to solve this error.

dzalkind commented 3 years ago

Hi @isablanca,

Your second issue looks like there is a mismatch between the OpenFAST version and the input files. In this simulink branch, I have updated them to work with the latest release (2.4.0) of OpenFAST. Is this what you are using? Can you confirm that the runFAST.m example works?

In the first issue, make sure that the matlab-toolbox is on your matlab path. I have added the extra files to the ROSCO_toolbox.

I hope this helps!

Best, Dan

isablanca commented 3 years ago

Hi @isablanca,

Your second issue looks like there is a mismatch between the OpenFAST version and the input files. In this simulink branch, I have updated them to work with the latest release (2.4.0) of OpenFAST. Is this what you are using? Can you confirm that the runFAST.m example works?

In the first issue, make sure that the matlab-toolbox is on your matlab path. I have added the extra files to the ROSCO_toolbox.

I hope this helps!

Best, Dan

Thanks for the message. The second issue was caused by the different versions of input files and openfast.

Francis599 commented 2 years ago

Hi all, When I run the matlab script "runFAST.m", firstly, the error message shows ”Error using runFAST (第 57 行) Error reported by S-function 'FAST_SFunc' in 'ROSCO/FAST Nonlinear Wind Turbine/S-Function': FAST_InitializeAll:InflowWind_Init:InflowWind_ReadInput:Invalid numerical input for file "E:\working space\OPENFAST\ROSCO-main\Test_Cases\5MW_Land_Simulink../NREL-5MW/NRELOffshrBsline5MW_InflowWind.dat" occurred while trying to read HWindSpeed.“ But I find the "../NREL-5MW/NRELOffshrBsline5MW_InflowWind.dat" and it looks correct as "================== Parameters for Steady Wind Conditions [used only for WindType = 1] ========================= 8 HWindSpeed - Horizontal windspeed (m/s) 90 RefHt - Reference height for horizontal wind speed (m) 0 PLexp - Power law exponent (-)" Anyone can help me to solve it?