Sending RtAeroPwr via ServoDyn to Bladed-Style DLL Controller

Provide feedback, request enhancements, and get help with wind-turbine computer-aided engineering tools.

Moderators: Bonnie.Jonkman, Jason.Jonkman

Paul.Schünemann
Posts: 25
Joined: Wed Jul 13, 2016 7:46 am
Organization: University Rostock
Location: Germany

Sending RtAeroPwr via ServoDyn to Bladed-Style DLL Controller

Postby Paul.Schünemann » Mon May 13, 2019 10:15 am

Dear all,

In order to develop and test a controller for a variable speed, stall controlled wind turbine, I need the current rotor aerodynamic power RtAeroPwr at each time step being available in a Bladed-Style DLL controller. I am using OpenFAST v2.1.0. and followed the instructions for passing parameters from one module to another given by Bonnie in these posts:
viewtopic.php?f=4&t=1171#p5026
viewtopic.php?f=4&t=1171#p5230

With this help I was able to compile a modified OpenFAST version without errors. However, once I try to run my modified OpenFAST version I get the following error message:
FAST_InitializeAll:Error allocating AD%Input and AD%InputTimes.
forrtl: severe (157): Program Exception - access violation

All my changes to the source code are summarized in the attached document.

Does someone know where this error might come from?
In my investigations I found that this error is triggerd in line 439 of FAST_Subs.f90 (subroutine FAST_InitializeAll), but that doesn't really help me.
I would be deeply grateful for any help.

Best regards,
Paul
Attachments
Changes_in_OpenFAST_SourceCode_to_send_RtAeroPwr_to_dll.docx
(13.88 KiB) Downloaded 28 times

Bonnie.Jonkman
Posts: 557
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: Sending RtAeroPwr via ServoDyn to Bladed-Style DLL Controller

Postby Bonnie.Jonkman » Mon May 13, 2019 2:34 pm

Hi, Paul.

I don't see anything in your code that would be problematic. I suspect that the code isn't linking with the new compiled version of the FAST_types.f90 files, which is what causes the access violations. (I have had this problem before, myself. I am not sure if this is a Visual Studio problem or if there is something wrong in the way the FAST project files are set up.)

Any time you change the Registry input files in FAST, I would suggest "cleaning" the FAST project file (highlight the "FAST" project, right click, select "project only->Clean Only FAST"), and then building again. You can also just do a "clean" or "rebuild" of the entire solution, but it takes a while to build everything.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Paul.Schünemann
Posts: 25
Joined: Wed Jul 13, 2016 7:46 am
Organization: University Rostock
Location: Germany

Re: Sending RtAeroPwr via ServoDyn to Bladed-Style DLL Controller

Postby Paul.Schünemann » Thu Jun 13, 2019 2:13 am

Hi Bonnie,

Thank you very much for your helpful answer. The missing link of the code with the new FAST_types.f90 files was one problem in my version that I would not have found by myself. So, thanks for giving the hint on testing this.

Additionally, I had one other mistake at one call of my modified SrvD_InputSolve routine. After solving this issue my modified OpenFAST version now is compiling without errors and running as expected. Thanks again for helping me in achiving this.

For those trying similar things, I have attached an updated version of the document summarizing all changes to the code, which I have made for my final version.

Best regards,
Paul Schünemann

P.S.: For anyone new to modifying the OpenFAST source code, I really recommend to use the debug mode, i.e. selecting Debug or Debug_Double in the Solution Configuration when working with MS Visual Studio. With this, compiling will take a while, but afterwards if you have a bug in your code and run your compiled OpenFAST version in command window, you will get useful information where to find the bug in the command window.
Attachments
Changes_in_OpenFAST_SourceCode_to_send_RtAeroPwr_to_dll.pdf
(291.34 KiB) Downloaded 23 times


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest