MATLAB2HD script

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

Moderators: Bonnie.Jonkman, Jason.Jonkman

Charlie.Sheng
Posts: 23
Joined: Wed Jul 25, 2018 3:00 pm
Organization: western university
Location: canada

MATLAB2HD script

Postby Charlie.Sheng » Thu Aug 08, 2019 8:42 am

Dear all,

I am using the MATLAB script to generate the new HydroDyn input files with the modified certain parameters. but I got problem, and here to seek for help, my code is as followings:

% HydroDyn input file
Hrefer='C:\Users\Desktop\FAST_MATLAB\OC4TC\5MW_Baseline\NRELOffshrBsline5MW_OC4DeepCwindSemi_HydroDyn.dat';
HydroS = HD2Matlab(Hrefer,2); % this contains 2 header lines
% Wave seed
WaS=randi([-2147483648,2147483647],1);
HydroS = SetFASTPar(HydroS,'WaveSeed(1)',WaS);
%Hs
Hs=12;
HydroS = SetFASTPar(HydroS,'WaveHs',Hs);

Hrefer1='C:\Users\Desktop\FAST_MATLAB\OC4TC\5MW_Baseline\NRELOffshrBsline5MW_OC4DeepCwindSemi_HydroDynCS.dat';
Matlab2HD(HydroS,Hrefer,Hrefer1,2); % there are 2 header lines

while I got the error from the MATLAB as follows:

WARNING: ! not found in the HD data structure. Default value listed below (from template file, C:\Users\Desktop\FAST_MATLAB\OC4TC\5MW_Baseline\NRELOffshrBsline5MW_OC4DeepCwindSemi_HydroDyn.dat) will be used instead:
Columns 1 through 13

20.0000 0.6300 0.6300 0 0 0 0 0 0 0 0 0 0

Columns 14 through 21

0 0 0 0 0 0 0 0

WARNING: ! not found in the HD data structure. Default value listed below (from template file, C:\Users\Desktop\FAST_MATLAB\OC4TC\5MW_Baseline\NRELOffshrBsline5MW_OC4DeepCwindSemi_HydroDyn.dat) will be used instead:
Columns 1 through 13

21.0000 0.6300 0.6300 0 0 0 0 0 0 0 0 0 0

Columns 14 through 21

0 0 0 0 0 0 0 0
......

I try to recheck the code many times, while still cannot figure out what is the problem. Any help would be appreciated!

Best regards,
Charlie

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

Re: MATLAB2HD script

Postby Bonnie.Jonkman » Wed Oct 16, 2019 4:44 pm

Hi, Charlie.

I am not exactly sure what the problem is, but the warning message indicates that it thinks there is a variable called "!" in the template that has a value of "20.0000 0.6300 0.6300 0 0 0 0 0 0 0 0 0 0". Perhaps it's not reading a table correctly?

Do you get this problem if you use this template: https://github.com/OpenFAST/matlab-tool ... droDyn.dat
Bonnie Jonkman

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

Charlie.Sheng
Posts: 23
Joined: Wed Jul 25, 2018 3:00 pm
Organization: western university
Location: canada

Re: MATLAB2HD script

Postby Charlie.Sheng » Fri Oct 18, 2019 3:03 pm

Hi Bonnie,

I figure out the problem. Yes, you are right, when using MATLAB2HD script to modify the parameters in template HydroDyn input files, the '!' cannot be read by the script. With all '!' being deleted, the matlab script will work successfully.

Thanks,
Charlie


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest