Dear all,
I have recently been working on migrating a Bladed model to OpenFAST. The initial progress went relatively smoothly, but I ran into some issues when configuring the controller. Bladed uses external controllers in the form of .dll files, so at first I tried to call it directly, but it obviously failed — because the controller is 32-bit, while OpenFAST is 64-bit. Since the vendor refused to provide me with a 64-bit controller, I had to figure out a way around it myself.
My approach is as follows:
- Write a 32-bit host program: create a simple 32-bit EXE or DLL host that loads my 32-bit .dll and exposes its functionality via IPC.
- Write a 64-bit proxy DLL: the 64-bit program links to this proxy DLL. When the 64-bit program calls the exported functions of the proxy DLL, the proxy DLL sends the call request and parameters to the 32-bit host program via IPC.
- The 32-bit host program executes the actual DLL function and returns the results to the 64-bit proxy DLL via IPC.
- The proxy DLL returns the results to the 64-bit program.
I first tested this with the public IEA 15 MW model, running it with both the 32-bit and 64-bit Bladed-style controllers, and the results matched quite well, as shown in the figure below:
At the very least, this should indicate that my idea seems feasible. So I started trying it on my own model, but the controller initialization always fails. To find the cause, I printed out the communication process and tried a number of different approaches, but none of them worked. I wonder if anyone else has encountered a similar issue. I would greatly appreciate any suggestions!
**************************************************************************************************
OpenFAST
Copyright (C) 2025 National Renewable Energy Laboratory
Copyright (C) 2025 Envision Energy USA LTD
This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY.
See the "LICENSE" file distributed with this software for details.
**************************************************************************************************
OpenFAST-v4.1.2
Compile Info:
- Compiler: Intel(R) Fortran Compiler 2021
- Architecture: 64 bit
- Precision: single
- OpenMP: No
- Date: Aug 06 2025
- Time: 19:22:48
Execution Info:
- Date: 08/26/2026
- Time: 10:36:56+0800
OpenFAST input file heading:
TEST Wind Turbine, Linearization with AeroDyn + BD
Running ElastoDyn.
Nodal outputs section of ElastoDyn input file not found or improperly formatted.
Running BeamDyn.
Running BeamDyn.
Running BeamDyn.
Running InflowWind.
Running AeroDyn.
AD15 Nodal Outputs: Nodal output section of AeroDyn input file not found or improperly formatted.
Skipping nodal outputs.
AeroDyn: projMod: 2
Projection: Polar, BEM: polar (3D)
Running ServoDyn.
Running ServoDyn Interface for Bladed Controllers (using Intel Visual Fortran for Windows).
Using legacy Bladed DLL interface.
FAST_InitializeAll:AD_Init:ReadInputFiles:Blade1:ReadBladeInputs:BlCrvAng will be calculated and
overwrite the values specified in blade file
"D:\LFC\OpenFAST_TEST_case\TEST_case06\../TEST_baseline/TEST_AeroDyn_blade.dat".
ReadInputFiles:Blade2:ReadBladeInputs:BlCrvAng will be calculated and overwrite the values
specified in blade file
"D:\LFC\TEST_case\TEST_case06\../TEST_baseline/TEST_AeroDyn_blade.dat".
ReadInputFiles:Blade3:ReadBladeInputs:BlCrvAng will be calculated and overwrite the values
specified in blade file
"D:\LFC\TEST_case\TEST_case06\../TEST_baseline/TEST_AeroDyn_blade.dat".
FAST_InitializeAll:InitModuleMappings:AD_2_BD_BladeLoad(1):MeshMapCreate:CreateLoadMap_L2_to_L2:Cr
eateMapping_ProjectToLine2:Found close value for node 82. (1.26497E-05 m)
CreateMapping_ProjectToLine2:Found close value for node 122. (1.36619E-05 m)
CreateMapping_ProjectToLine2:Found close value for node 121. (6.75305E-06 m)
Time: 0 of 300 seconds.
The BEM solution is being turned off due to low TSR. (TSR = 0). This warning will not be
repeated though the condition may persist. (See GeomPhi output channel.)
[DISCON INPUT] status=0 time=0 DLL_DT=0.02 pitch=0 pitchSet=0 pitchMin=0 pitchMax=1.58825 rateMin=-0.0698132 rateMax=0.0698132 pitchAct=0 genSpeed=0 rotorSpeed=0 pitchCtrl=0 yawCtrl=0 numBlades=3 pwrDem=1.006e+07 shaftPwr=0 elecPwr=0 gainOM=0.860622 genSpdMin=109.956 genSpdMax=180.118 genSpdDem=180.118 genTrqDem=58500 yawErr=-0 wind=8 msgLen=8197 infileLen=1 outnameLen=74
[DISCON OUTPUT] aviFAIL=-1 genContactor=1 brake=0 pitch1=0 pitch2=0 pitch3=0 collPitch=0 pitchRate=0 genTorque=0 yawRate=0 override55=0 override56=0 logCount=0
FAST_Solution0:CalcOutputs_And_SolveForInputs:SolveOption2:SrvD_CalcOutput:DLL_controller_call:***
Note: Running DISCON
*** Note: No DISCON.IN file read
*** Note: 7p1.5MWA3V8_20220530 controller version 0.3.
*** Note: DISCON controller compiled on 2024/3/27 at 14:53:07.
*** Note: Initial conditions:
*** Note: Pitch: 0.000000 rad Gen Speed : 0.000000 rad / s
[DISCON INPUT] status=-1 time=0 DLL_DT=0.02 pitch=0 pitchSet=0 pitchMin=0 pitchMax=1.58825 rateMin=-0.0698132 rateMax=0.0698132 pitchAct=0 genSpeed=0 rotorSpeed=0 pitchCtrl=0 yawCtrl=0 numBlades=3 pwrDem=1.006e+07 shaftPwr=0 elecPwr=0 gainOM=0.860622 genSpdMin=109.956 genSpdMax=180.118 genSpdDem=180.118 genTrqDem=58500 yawErr=-0 wind=8 msgLen=8197 infileLen=1 outnameLen=74
[DISCON OUTPUT] aviFAIL=0 genContactor=0 brake=0 pitch1=0 pitch2=0 pitch3=0 collPitch=0 pitchRate=0 genTorque=0 yawRate=0 override55=0 override56=0 logCount=0
OpenFAST encountered an error during simulation initialization.
Simulation error level: FATAL ERROR
Aborting OpenFAST.
All best wishes,
Xingyu

