# Hywind OC3 simulation problem

**URL:** <https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [October 15, 2013, 5:20pm UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777 "2013-10-15T17:20:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giuseppe.Abbate](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Giuseppe.Abbate](https://forums.nlr.gov/u/Giuseppe.Abbate)\
**Post date:** [October 15, 2013, 5:20pm UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/1 "2013-10-15T17:20:18Z")

</div>

Hi all,

I’m doing a project for the Hywind OC3 floating windturbine and I’m trying to simulate it by FAST in Simulink. I’ve downloaded the zip file from this link  
[wind.nrel.gov/public/jjonkman/NR … Hywind.zip](http://wind.nrel.gov/public/jjonkman/NRELOffshrBsline5MW/NRELOffshrBsline5MW_OC3Hywind.zip)  
I wanted to see if everything was working properly, so I’m using the openloop.mdl scheme (with no changes). As input wind file I’m using the output of TurbSim as input this inp file  
[wind.nrel.gov/public/bjonkman/Sa … urbSim.inp](http://wind.nrel.gov/public/bjonkman/Samples/Sample5MWTurbSim.inp)  
For the fast primary input file I’m using the file founded in the zip file posted above, switching between VSControl and PitchControl to “simulink input” and “user define routine…”.  
The problem is that when I run the simulation, it start but after 60 seconds the simulation stops and gives me this error:

[i]Additional debugging message from SUBROUTINE SmllRotTrans(): 10.919 s  
Error FF wind array boundaries violated: Grid too small in Y direction. Y=73.21; Y boundaries =  
[-72.5, 72.5]  
Error getting velocity in AeroDyn/AD\_WindVelocityWithDisturbance().

Aborting FAST.[/i]

I’ve seen in other posts that this could be caused by the numerical instability, so that the turbine fall down thus the grid size is not enough to describe this position of the wind turbine, but I’ve tryed to fix it using the control mdl scheme that I’ve made for the onshore wind turbine (detuning it) or using the embedded control routine in fast but with no result.  
The question is:  
-is it possible to run a simulation in openloop without this error?  
-is it possible to give in input a steady wind?  
-how can I fix this problem?  
-I’ve seen that in the zip file there is a new exe for FAST. I’m using FAST open loop scheme: do I have to change any parameter for referring to other files?

Thank you in advance for the help,  
Regards,  
Giuseppe

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [October 15, 2013, 7:08pm UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/2 "2013-10-15T19:08:09Z")

</div>

Dear Giuseppe,

I see a couple problems with your approach:  
\*The OC3-Hywind model included a few customizations to the source code to more accurately model the OC3-Hywind system. You can read about these customizations in the following forum topic: [Additional linear hydrodynamic damping in OC3 Hywind](http://forums.nlr.gov/t/additional-linear-hydrodynamic-damping-in-oc3-hywind/383/1). These customizations are included in the special executable supplied with the OC3-Hywind model, but we have not built a FAST S-function for Simulink with these customizations. For accurate simulations of the OC3-Hywind model within Simulink, I suggest you recompile the FAST S-Function with these customizations.  
\*The controller for the OC3-Hywind model was implemented as a GH Bladed DLL. The DLL interface was included in the special executable mentioned above, but we have not built a FAST S-function for Simulink with this interface. So, you are probably not getting what you want when you toggle to “user-defined routine” within Simulink.

I’m not exactly sure what is causing the model to move enough to exceed the boundaries of the turbulence grid, but you can avoid this error by using steady winds in place of turbulent winds. Steady winds can be specified using AeroDyn’s so-called “hub-height” wind data files.

Best regards,

---

<div class="post-metadata">

**Author:** ![Giuseppe.Abbate](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Giuseppe.Abbate](https://forums.nlr.gov/u/Giuseppe.Abbate)\
**Post date:** [October 16, 2013, 9:35am UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/3 "2013-10-16T09:35:13Z")

</div>

Dear Jason,

first of all I want to thank you for your fast reply to my post, it was very helpful. I didn’t understand that the S-Function had to be recompiled for the OC3 Hywind. I think that this is the reason why the simulation didn’t run properly.  
I will try to recompile the S-function for the Hywind turbine. The problem is that is the first time that I do that.  
I was searching in the FAST user’s guide and in the forum, but I couldn’t find any guide on how to do that.  
Can you send me a link where is described the procedure for recompiling the S-Function?  
Regarding the HH file, it was a stupid mistake. I fixed it giving in the aerodyn \*.ipt file also the extension hh

```auto
"WindData\90m_12mps.hh" WindFile - Name of file containing wind data (quoted string)
```

Thank you again for your help,

Regards,  
Giuseppe

---

<div class="post-metadata">

**Author:** ![Giuseppe.Abbate](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Giuseppe.Abbate](https://forums.nlr.gov/u/Giuseppe.Abbate)\
**Post date:** [October 16, 2013, 1:23pm UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/4 "2013-10-16T13:23:18Z")

</div>

Dear Jason,

I was looking how to recompile the S-Function of the Hywind, but I found this topic:

> [@OC3 blade pitch control problem & its errors](http://forums.nlr.gov/t/oc3-blade-pitch-control-problem-its-errors/414/28):
>
> Dear All, I couldn’t install matlab 32bit on my machine, so started to compile mexw64 myself. I have installed IVF 11(32bit) and visual studio 2005 on my win 7 (64bit) machine. I changed “make\_FAST\_SFunc.m” file as below: FortranOptionsFile = ‘intelf11msvs2005opts.bat’; OutputRootName = ‘FAST\_SFunc’; NWTC\_LIB = ‘C:\Design Codes\NWTC\_Lib\_v1.03.01\Source’; WIND\_LOC = ‘C:\Design Codes\AeroDyn\Source\InflowWind\Source’; AD\_LOC = ‘C:\Design Codes\AeroDyn\Source’; FAST\_LOC …

in which you have written that there should be in the zip folder of Hywind the \*.mexw32 file. As I’ve said in the first post I’ve downloaded this zip folder  
[wind.nrel.gov/public/jjonkman/NR … Hywind.zip](http://wind.nrel.gov/public/jjonkman/NRELOffshrBsline5MW/NRELOffshrBsline5MW_OC3Hywind.zip)  
in which that file is not included. Searching more in the public folder I’ve found this zip file:  
[wind.nrel.gov/public/jjonkman/NR … Hywind.zip](http://wind.nrel.gov/public/jjonkman/NRELOffshrBsline5MW/FAST_v7.00-v7.01/NRELOffshrBsline5MW_OC3Hywind.zip)  
in which the \*.mexw32 file is included. Can I use this older package to simulate the Hywind with my FAST v7.02.00d-bjj?  
Thanks again

Regards  
Giuseppe

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [October 17, 2013, 7:58pm UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/5 "2013-10-17T19:58:57Z")

</div>

Dear Giuseppe,

See the “make\_FAST\_SFunc.m” script in the “Simulink\Source” directory of the FAST archive for help in compiling the FAST S-Function.

We’ve compiled a version of the FAST S-Function with the customizations for the OC3-Hywind system for FAST v7.01.00a-bjj as you found in that old archive. But we have not created one for FAST v7.02.00d-bjj. If you are OK with not using the features new to v7.02.00d-bjj, then feel free to use v7.01.00a-bjj. See the following documentation regarding what’s new in v7.02.00d-bjj: [wind.nrel.gov/designcodes/simula … erface.pdf](http://wind.nrel.gov/designcodes/simulators/aerodyn/UserGuideAddendum_AeroDyn13Interface.pdf).

Best regards,

---

<div class="post-metadata">

**Author:** ![Giuseppe.Abbate](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Giuseppe.Abbate](https://forums.nlr.gov/u/Giuseppe.Abbate)\
**Post date:** [October 18, 2013, 9:11am UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/6 "2013-10-18T09:11:31Z")

</div>

Dear Jason,

now it works. =)  
I will post what I have done, to make it easier for other newbies =)  
To run a simulation in Simulink of the OC3 (without recompiling the \*.mex32) I download the older version of fast, at this link:  
[wind.nrel.gov/designcodes/simula … 0a-bjj.exe](http://wind.nrel.gov/designcodes/simulators/fast/downloaders/FAST_v7.01.00a-bjj.exe)  
Extract it in a new folder. Then, delete the path setted in MATLAB for other versions of FAST and add the simulink folder found in this version.  
Download the OC3 folder at this link  
[wind.nrel.gov/public/jjonkman/NR … Hywind.zip](http://wind.nrel.gov/public/jjonkman/NRELOffshrBsline5MW/FAST_v7.00-v7.01/NRELOffshrBsline5MW_OC3Hywind.zip)  
and extract in the FAST folder.  
Run the openloop.mdl and now it should work.  
For controlling it I’ve tried to use the subroutine of the OC3 but I had some problem with the DISCON.dll (couldn’t load it). Anyway, using the baseline controller of the onshore version it works (with a degradation of performance, of course).  
Hope that helps!

Thank you Jason for all the help, your suggestion were really useful

Have a nice day,  
Giuseppe

---

<div class="post-metadata">

**Author:** ![Giuseppe.Abbate](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Giuseppe.Abbate](https://forums.nlr.gov/u/Giuseppe.Abbate)\
**Post date:** [December 11, 2013, 3:28pm UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/7 "2013-12-11T15:28:23Z")

</div>

Dear All,

I still have a problem in the simulation of the Hywind. I have made my controller for the Hywind in Simulink and applied it using the procedure described above and it work properly.  
I should now make a comparison between my controller and the baseline descripted in the “Definition of the Floating System for Phase IV of OC3”. In order to do so, in the primary fst file I’m setting:

`PCMode=2
VSContrl=1`

to use the subroutine created for the Hywind but when I run it I have this error in MATLAB window:

[code]The DLL DISCON.dll could not be loaded.

Aborting FAST.[/code]

The file “DISCON.dll” is in the same folder I’m using for the simulation. Is there an update of the DISCON.dll that I have to use that I don’t know?

Thank you for your help,  
Have a nice evening.  
Giuseppe Abbate

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [December 11, 2013, 6:46pm UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/8 "2013-12-11T18:46:53Z")

</div>

Dear Giuseppe,

I’m confused about what you are doing. A few comments:

\*PCMode = 2 in FAST v7 means to accept pitch-control commands from Simulink.  
\*VSContrl = 1 in FAST v7 means to accept torque-control commands from the simple built-in variable-speed control model.  
\*The GH Bladed DLL shouldn’t be called in FAST v7 when PCMode =2 and VSContrl = 1.  
\*We haven’t compiled a version of the FAST S-Function for Simulink that is able to call the GH Bladed DLL. (Because why would you being running FAST in Simulink if you want control commands from a DLL.)

Best regards,

---

<div class="post-metadata">

**Author:** ![Giuseppe.Abbate](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Giuseppe.Abbate](https://forums.nlr.gov/u/Giuseppe.Abbate)\
**Post date:** [December 12, 2013, 9:22am UTC](https://forums.nlr.gov/t/hywind-oc3-simulation-problem/777/9 "2013-12-12T09:22:22Z")

</div>

Dear Jason,

I am really sorry for my mistake. I actually wanted to use  
PCMode=1  
VSContrl=2

Anyway, I wanted to use the baseline controller using the library you have wrote, and because I’m using it in MATLAB I thought that it was possibile to use the library controller directly from FAST. I understand that for running FAST with this configuration I have to use it without Simulink. I will try it.  
Thank you again for your help,

Best regards,  
Giuseppe
