OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
671 stars 453 forks source link

FAST-Simulink Rapid Accelerator mode #722

Open Oliver-Tulloch opened 3 years ago

Oliver-Tulloch commented 3 years ago

I am having issues trying to run the 'openloop.m' Simulink example in rapid accelerator mode. (runs fine in normal mode).

Initially I received an error due to the use of the 'mexPutVariable' function within the s-function. I commented out the lines that use this function (lines 207-245 in FAST_SFunc.c) and set the variables that were being output within the Simulink model workspace. The Simulink model will now build/compile and run but it only completes for very short simulations. It gets stuck for longer simulations, for example, it will get 20 seconds into a simulation and then hang. No error messages are output. Everything works fine in normal mode.

Have you tested the s-function for use in Simulink's rapid accelerator mode/for code generation?

Any help is much appreciated!

I am using MATLAB 2020b and Windows 10.

andrew-platt commented 3 years ago

Which version of OpenFAST are you running?

Oliver-Tulloch commented 3 years ago

I am using version 2.5.0

andrew-platt commented 3 years ago

We have not done much testing with the Simulink accelerator mode. I'm not familiar with it or what it does.