Questions about debugging OpenFAST StrucCtrl module and missing the driver test input files

Dear community,

I am currently trying to modify the StrucCtrl module (ServoDyn.f90 and StrucCtrl.f90) in order to simulate a novel type of vibration absorber. I have two questions and would really appreciate your advice:

  1. Since the complete OpenFAST source code is quite large, although I have successfully compiled the .exe, I’m having trouble debugging it in Visual Studio — I can’t easily locate or visualize the key data structures of important variables during runtime. Does anyone have an effective way to do this?

  2. In the modules directory, I found a test driver file named StrucCtrl_Driver.f90. However, when I tried to run it, I noticed it requires several input files that I cannot find anywhere:

CHARACTER(1024) :: AV_file = ‘AngVel_NO_Input_Data.inp’
CHARACTER(1024) :: AA_file = ‘AngAccel_NO_Input_Data.inp’
CHARACTER(1024) :: AP_file = ‘AngPos_NO_Input_Data.inp’
CHARACTER(1024) :: RA_file = ‘rddot_NO_Input_Data.inp’

CALL ReadAngPosFile(AP_file, APvec, NumSteps, UnEcho, ErrStat2, ErrMsg2)
CALL ReadAngVelFile(AV_file, AVvec, NumSteps, UnEcho, ErrStat2, ErrMsg2)
CALL ReadAngAccelFile(AA_file, AAvec, NumSteps, UnEcho, ErrStat2, ErrMsg2)
CALL ReadAccelFile(RA_file, LAvec, NumSteps, UnEcho, ErrStat2, ErrMsg2)

I couldn’t find these .inp files in either the current OpenFAST source or the r-test package.
Could anyone please tell me where these input files can be obtained? Or are they simply template or zero files meant to be generated manually with a fixed format?

Thank you very much for your help!

Best regards,
Hang Zhang

Dear @Hang.Zhang,

The StrucCtrl_Driver.90 is a unfortunately not currently functional (I thought there was a note about that in the code base, but I can’t find it). It was developed externally prior to inclusion of the Structural controls in OpenFAST, and did not get updated at the time due to time constraints (the structural control code was refactored and new models added). We left it in the code for updating at a later time, however I evidently did not add any notes regarding it’s status. As for the input files, I don’t believe we ever received any.

To get the StrucCtrl_Driver.90 code working, we will need to rewrite a significant portion of it to include the additional models, as well as generate a set of input files for it. This would take a few days and a little funding to do. I will add this onto our wish list of codes to update, but in the meantime I will add a note about it’s current status to avoid confusion on it.

To use the Visual Studio debugger, you will need to compile in debug mode, then run the code through the debugger (you will need to configure the debugger to know what input file to pass). To access the data structures, you will need to set a breakpoint in the code where you want to explore the data (and perhaps a watchlist). You can then interactively hover over any data structure in the code when the breakpoint is hit and view its contents. Disclaimer: I don’t debug with Visual Studio very often, so I’m going from memory of how this is done – I may be missing some steps.

My apologies for the confusion,

Andy

Dear Andy,

Thank you very much for the clarification and for taking the time to explain the background of the StrucCtrl_Driver.90 file. In fact, reading both StrucCtrl_Driver.f90 and ServoDyn_Driver.f90 has also given me some insights into how the modules are organized.

By the way, may I ask if ServoDyn_Driver is currently a functional test module?

Best regards,
Hang

Dear @Hang.Zhang,

I don’t know if the ServoDyn_Driver is functional. If I recall correctly, it didn’t do very much so we didn’t add it into the integration testing.

Regards,

Andy

Dear Andy,

Got it — thank you for the clarification and for confirming that. Really appreciate your help!

Best regards,
Hang