# Active structural control in OpenFAST

**URL:** <https://forums.nlr.gov/t/active-structural-control-in-openfast/6735>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [March 26, 2024, 4:31pm UTC](https://forums.nlr.gov/t/active-structural-control-in-openfast/6735 "2024-03-26T16:31:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riad.Elhamoud](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/riad.elhamoud/32/5481_2.png) [@Riad.Elhamoud](https://forums.nlr.gov/u/Riad.Elhamoud)\
**Post date:** [March 26, 2024, 4:31pm UTC](https://forums.nlr.gov/t/active-structural-control-in-openfast/6735/1 "2024-03-26T16:31:36Z")

</div>

Hello everyone,

I am interested in applying structural control in FOWT. Indeed, a tuned mass damper will be attached to the structure and will be given a force in order to enhance its vibration mitigation capability.

In order to achieve this in OpenFAST, there are two ways (I am using windows OS):

1- Modification of the source code in StrucCtrl.f90

2- Use of the EX\_Bladed\_Interface.

As a first test, i modified the source code (option 1), then i recompile OpenFAST using Visual Studio 2019. To compile, I choose Release and x64 (my computer is x64 bit processor) and click on Build —\> Rebuild Solution (see figure).

 ![Capture](https://europe1.discourse-cdn.com/nrel/original/2X/f/fcc732779bb72cb55d11be444d3f7169291b167c.png)

Compiling OpenFAST was successful ! No errors in the code and i run a simulation with the compiled openfast and i have seen the effect of the modification i have done, on the response. However, this method of working is not practical.

My question is how to compile a dll of type bladed in visual studio. Steps ? manual ?

Does anyone has worked on this before ?

Thank you in advance.

Best Regards,

Riad

---

<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:** [March 26, 2024, 5:02pm UTC](https://forums.nlr.gov/t/active-structural-control-in-openfast/6735/2 "2024-03-26T17:02:42Z")

</div>

Dear @Riad.Elhamoud,

A Visual Studio project file for compiling the Bladed-style DISCON controller is available in the OpenFAST repository–see: [openfast/vs-build/Discon at main · OpenFAST/openfast · GitHub](https://github.com/OpenFAST/openfast/tree/main/vs-build/Discon).

Best regards,

---

<div class="post-metadata">

**Author:** ![Riad.Elhamoud](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/riad.elhamoud/32/5481_2.png) [@Riad.Elhamoud](https://forums.nlr.gov/u/Riad.Elhamoud)\
**Post date:** [August 20, 2024, 3:52pm UTC](https://forums.nlr.gov/t/active-structural-control-in-openfast/6735/3 "2024-08-20T15:52:22Z")

</div>

Dear @Jason.Jonkman,

Thank you for guiding me. I successfully compiled the Discon.sln and obtained the well-known Discon.dll.

However, i have some questions for you.

1- I was looking at ServoDyn input file of the 5 MW barge-type FOWT in the section named Bladed Interface.

> <https://github.com/OpenFAST/r-test/blob/main/glue-codes/openfast/5MW_ITIBarge_DLL_WTurb_WavesIrr/NRELOffshrBsline5MW_ITIBarge4_ServoDyn.dat>

In line 78, it is written:  
“DISCON.IN” DLL\_InFile - Name of input file sent to the DLL (-) [used only with Bladed Interface]

However, i did not succeed to find this DISCON.IN.  
Am i wrong ? Should i find it in the same folder of ServoDyn input file ?

2- I used the .IN file obtained from this example: [ROSCO/Examples/23\_structural\_control.py at main · NREL/ROSCO · GitHub](https://github.com/NREL/ROSCO/blob/main/Examples/23_structural_control.py)

I use it instead of the original DISCON.IN in ServoDyn of the 5 MW barge-type. Unfortunately, nothing happen. Is it normal ? I understand from reading the python in the 4th example in ROSCO repository: [ROSCO/Examples/04\_simple\_sim.py at main · NREL/ROSCO · GitHub](https://github.com/NREL/ROSCO/blob/main/Examples/04_simple_sim.py)  
that this example could generate .IN file from .yaml file. Is my understanding correct ? Can i use it to generate my own DISCON.IN and put it in the barge ServoDyn.

3- Could you please explain to me the relation between ROSCO and Discon.f90 ?

Thank you a lot.

Best Regards,

Riad

---

<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:** [August 20, 2024, 10:57pm UTC](https://forums.nlr.gov/t/active-structural-control-in-openfast/6735/4 "2024-08-20T22:57:51Z")

</div>

Dear @Riad.Elhamoud,

The Bladed-style DISCON interface is a generic interface for coupling controllers with OpenFAST (and other aeroelastic codes such as Bladed). The original NREL 5-MW baseline turbine models used a simple baseline controller implemented in DISCON format. Since then, ROSCO has been developed as a much better baseline controller, which is also implemented in DISCON format. But the sample NREL 5-MW baseline turbine models still rely on the original baseline controller, not ROSCO. The original baseline controller does not make use of a _DISCON.IN_ input file (rather, the controller parameters are hard-coded within the DISCON source code, requiring a recompile of the DLL to change. The ROSCO controller makes use of controller parameters set within a _DISCON.IN_ input file.

I hope that helps.

Best regards,
