Hi All,
I have run OpenFAST successfully for steady cases using a set of tools that I have written to manipulate the input files using Python.
Now, however, I need to move on to dynamic modelling as I want to investigate the behaviour of a spring-based passive blade-pitch mechanism.
My understanding is that Simulink would be the best tool for setting up and running a time-step dynamic model. Please could someone point me towards some really simple instructions as to how to get started with running OpenFAST with Simulink.?
Here is what I have tried so far:
1) I first tried to open “Run_OpenLoop.m” in matlab and “OpenLoop.mdl” in Simulink
2.) I ran “Run_OpenLoop.m” but got the following error:
"Error while obtaining sizes from MEX S-function ‘FAST_SFunc’ in ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’.
Caused by:
Invalid MEX-file ‘C:\Users.…\OpenFAST\glue-codes\simulink\examples\FAST_SFunc.mexw64’: The specified module could not be found."
3) I then tried to run “mex -setup” and “Create_FAST_SFunc.m” to see if this would solve the problem, but it does not. When I run “Create_FAST_SFunc.m” I get the following error:
"Error using mex
MEX cannot find library ‘openfastlib’, specified with the -l option.
- MEX searched for a file with one of the following names:*
- libopenfastlib.a*
openfastlib.lib
libopenfastlib.lib - Verify the library name is correct. If the library is not*
- on the existing path, specify the path with the -L option.*
Error in create_FAST_SFunc (line 63)
mex(‘-largeArrayDims’, …"
I suspect the problem may be to do with compiling OpenFAST for Simulink to create a DLL. I have so far used the compiled OpenFAST executable (openfast_x64.exe) and I have no experience of using cmake or Visual Studio.
So, as I said, I’m looking for some really simple instructions as to how to get started with running OpenFAST with Simulink, and I specifically need to know how to overcome the errors mentioned above.
I would be very grateful for any advice anyone is able to offer.
Kind regards,
Tom