Hi Bonnie,
now I’d like to integrate a “sensor” into Fast and receive the Information in the dll. In my case the sensor is supposed to be the local wind normal to the rotor plane for a specific blade element (VNWind in the Aerodyn AD_CalcOutput subroutine).
I was able to add this component as a Fast Output sensor to have a look on it after a full Simulation. For a reason I don’t know I was not able to feed it to the ServoDyn module and receive it in the dll.
Here is what I did so far:
In subroutine CalcOutput i added these lines in the corresponding loops to store the wind
o%SensorWind(1,IElement,IBlade) = VNWind
y%SensorWind(:,IElement,IBlade) = o%SensorWind(:,IElement,IBlade)
In the AeroDyn registry I added
typedef ^ OtherStateType Reki SensorWind {2}{59}{3} #indices: Wind, ielm, iblade
typedef ^ OutputType ReKi SensorWind {2}{59}{3} - -
In ElastoDyn.f90 I added the following line in a loop
OtherState%AllOuts( SensorF( runningIndex) )= u%SensorWind(1,J,K)
I also followed the instruction on how to add a sensor to the Output and it worked, I can see my signals in the Fast output.
But when I try to add the sensor to the output for ServoDyn it seems that the signals get lost somewhere but I could not figure out where.
I added the following lines:
In the ElastoDyn.f90 after “!Control outputs for Bladed DLL:” :
y%SensorF(J) = OtherState%AllOuts( SensorF( J ) )
In the ElastoDyn_Registry.txt:
typedef ^ OutputType ReKi SensorF {45} - - “sensor signal”
In the ServoDyn_Registry.txt:
typedef ^ OutputType ReKi SensorF {45} - - “SensorF”
typedef ^ InputType ReKi SensorF {45} - - “SensorF”
typedef ^ BladedDLLType ReKi SensorF {45} - - "Sensor Position
(I think the definition as a BladedDLLType is not necessary)
From my understanding this should be passed through to ServoDyn like other sensors (e.g. y%RootMyc).
But if try to use u%SensorF( I ) in SUBROUTINE Fill_avrSWAP to fill the Swap Array:
dll_data%avrSWAP( 84 + I ) = u%SensorF( I )
the value I receive in the dll seems to be Zero. My interface works properly. I receive the value in the dll correctly, if I set
dll_data%avrSWAP( 84 + I ) = 8.
Do you have any idea where the missing link is or could you please describe how you would lead a Signal from AeroDyn to the ServoDyn Bladed dll Interface?
Thank you for your time.
Cheers
Niklas