Processing OpenFast linearization output

Discuss theory and modeling of wind-turbine structures.

Moderator: Bonnie.Jonkman

Ian.Prowell
Posts: 3
Joined: Wed Aug 26, 2009 2:39 pm

Processing OpenFast linearization output

Postby Ian.Prowell » Fri Apr 03, 2020 6:20 pm

Are any tools available for processing the linearization output files of OpenFast? It has been a while since I worked with the linearization output, and it looks like the file format has changed.

Thanks,
Ian Prowell

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Processing OpenFast linearization output

Postby Jason.Jonkman » Mon Apr 06, 2020 6:51 am

Hi Ian,

The MATLAB-based MBC3 post-processor has been updated to reflect the updated file format of the inearization output--MBC3 is now available in the MATLAB toolbox: https://github.com/OpenFAST/matlab-toolbox.

We have also been working closely with Envision Energy recently to improve the OpenFAST linearization process and post-processing, including automating the calculation of steady-state conditions (including controller trim) and introducing a mode shape visualization. This capability has been submitted as a pull request into OpenFAST, but is in NREL review before being merged into the OpenFAST dev branch: https://github.com/OpenFAST/openfast/pull/373.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Reza.Yaghmaie
Posts: 1
Joined: Mon Mar 30, 2020 9:19 am
Organization: Rutgers University
Location: New Jersey, U.S.

Re: Processing OpenFast linearization output

Postby Reza.Yaghmaie » Mon Apr 13, 2020 12:13 pm

Hi,
I am trying to test the matlab-toolbox (https://github.com/OpenFAST/matlab-toolbox) for the 1st time on a linux cluster. I am working on MBC/Source/runCampbell.m example. I have built openfast with Fortran modules. A top view of the folders:
matlab-toolbox openfast r-test

1-Is this the easiest example to run?
2-It seems FSTName = 'OpenFAST.fst' is missing. It will need other input files later on e.g. *.lin extension as well. Where do I get these?

Thanks,
Reza Yaghmaie

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Processing OpenFast linearization output

Postby Jason.Jonkman » Mon Apr 13, 2020 1:05 pm

Dear Reza,

I'm not sure what you mean when you ask "is this the easiest example to run?"

Regarding your second question, "OpenFAST.fst" is the name of the OpenFAST primary input file; you must have a complete OpenFAST model (the primary input file, plus the input files of each module) before running the script. The runCampbell.m script will run OpenFAST a number of times (for different rotor speeds, etc.), which will generate the associated linearization output (*.lin) files to be post-processed by the script to generate the Campbell diagram.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Dhaneesh.Machavarapu
Posts: 61
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Processing OpenFast linearization output

Postby Dhaneesh.Machavarapu » Fri Apr 17, 2020 11:53 am

Sir,

How to Conduct eigenvalue analysis to get natural frequencies for my test case(monopile supported 5MW NREL wind turbine), Hoping that I already conducted linearization analysis and I have linearization output files (for different rotor speeds and azimuth). Is the matlab-toolbox-master is same for all versions of openfast. I downloaded it from (https://github.com/OpenFAST/matlab-toolbox.) and presently I was using openfast v2.3

Thank you.

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Processing OpenFast linearization output

Postby Jason.Jonkman » Fri Apr 17, 2020 12:00 pm

Dear Dhaneesh,

By "monopile", do you mean a tubular land-based tower. Normally the SubDyn module is used to model the structural flexibility of offshore fixed-bottom monopiles, but the linearization functionality of OpenFAST does not yet support linearization with SubDyn enabled. (That said, we are currently working an update to OpenFAST that does support linearization with the SubDyn module enabled.)

Yes, the MBC3 post-processor provided with the MATLAB toolbox should be applicable to all linearization (*.lin) output files generated by OpenFAST v2.3.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Dhaneesh.Machavarapu
Posts: 61
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Processing OpenFast linearization output

Postby Dhaneesh.Machavarapu » Mon Apr 20, 2020 5:26 am

Sir,

By monopile, I mean 5MW offshore wind turbine(5MW_OC3Mnpl_DLL_WTurb_WavesIrr). But as linearization does not support with hydrodyn and subdyn enabled. So I did Linearization analysis for test case 5MW_Land_BD_Linear and got linearization output files. Now how should I add the Linearization output file to the eiganalysis (M File) in matlab-toolbox-master to get natural frequencies of 5MW land-based tower.

Thank you.

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Processing OpenFast linearization output

Postby Jason.Jonkman » Mon Apr 20, 2020 7:21 am

Dear Dhaneesh,

Unfortunately, there is not much documentation on MBC3 (but there is a bit outdated documentation available here: https://github.com/OpenFAST/matlab-tool ... s/MBC3.pdf). Hopefully, you can following the MBC3 scripts by reviewing their source code. fx_mbc3.m is the script that does the main MBC3 calculations. runCampbell will run OpenFAST for you, call fx_mbc3.m, and help you interpret the mode shapes through visualization, but this relies on an OpenFAST pull request that has not yet been reviewed and merged into OpenFAST-dev or -master.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Dhaneesh.Machavarapu
Posts: 61
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Processing OpenFast linearization output

Postby Dhaneesh.Machavarapu » Tue Apr 21, 2020 3:26 am

Sir,

I have followed the instructions given in https://github.com/OpenFAST/matlab-tool ... s/MBC3.pdf for execution of MBC. when I tried post processing of linearized output files of test case 5MW_Land_BD_Linear, this error has occured in matlab.

>> fx_getMats
Undefined function or variable 'ReadFASTLinear'.

Error in fx_getMats (line 46)
data(matData.NAzimStep) = ReadFASTLinear(FileNames{matData.NAzimStep}); %we'll read this twice so we can allocate space first; putting it at matData.NAzimStep saves some reallocation later

can I get some help.

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Processing OpenFast linearization output

Postby Jason.Jonkman » Tue Apr 21, 2020 8:45 am

Dear Dhaneesh,

The MATLAB script ReadFASTLinear.m is distributed in the MATLAB toolbox in the Utilities directory.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Dhaneesh.Machavarapu
Posts: 61
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Processing OpenFast linearization output

Postby Dhaneesh.Machavarapu » Wed Apr 22, 2020 12:50 am

Sir

After adding couple of matlab scripts in utility folder to my working directory this error was called in matlab. Does it mean is there something wrong with my test case .lin output files( i.e, Is it saying about size of linearized state space matrix). I tried checking the error it but I didn't get it.

>> fx_getMats
Index exceeds matrix dimensions.

Error in fx_getMats>getStateOrderingIndx (line 287)
lastModOrd = matData.StateDerivOrder(i);

Error in fx_getMats (line 98)
[matData.StateOrderingIndx, checkEDstates] = getStateOrderingIndx(matData);

Thank you.

Simon.Wiedemann
Posts: 74
Joined: Mon Jan 09, 2017 1:00 am
Organization: TÜV NORD
Location: Germany

Re: Processing OpenFast linearization output

Postby Simon.Wiedemann » Wed Apr 22, 2020 4:57 am

Hi Jason,

can you lead my to the correct scripts for eigenvalue analysis for OpenFAST 2.2.0 with BeamDyn?

Running matlab-toolbox-master\MBC\Source\fx_mbc3.m throws a error at i=13 (modName = 'BD_1'):

Code: Select all

Index exceeds the number of array elements (1).

Error in fx_getMats>getStateOrderingIndx (line 287)
            lastModOrd  = matData.StateDerivOrder(i);

Error in fx_getMats (line 98)
    [matData.StateOrderingIndx, checkEDstates]    = getStateOrderingIndx(matData);

Error in fx_mbc3 (line 41)
[matData, FAST_linData] = fx_getMats(FileNames);


Attached the matData.DescStates at time of Error.

Running fx_mbc3.m with *.lin files with ElastoDyn everything works fine.

And do you knwo when functionalities need for runCampbell.m to work merged into the master branch of OpenFAST?

Best wishes,
Simon
Attachments
DescStates.txt
(21.2 KiB) Downloaded 28 times

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Processing OpenFast linearization output

Postby Jason.Jonkman » Wed Apr 22, 2020 8:50 am

Dear Dahneesh and Simon,

It is hard for me to understand the problem without reproducing the error myself. Can you attach the OpenFAST linearization output (.lin) files you are using that generate these errors?

I'm not sure when the OpenFAST pull request will be reviewed and merged into OpenFAST-dev or -master, but I hope that is soon as well!

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Dhaneesh.Machavarapu
Posts: 61
Joined: Sat Feb 29, 2020 9:56 am
Organization: NITcalicut
Location: INDIA

Re: Processing OpenFast linearization output

Postby Dhaneesh.Machavarapu » Wed Apr 22, 2020 11:35 am

Sir,

I also tried Post-processing of linearization output files of test case (5MW_Land_DLL_WTurb) with elastodyn instead of beamdyn. After running fx_getMats, I got these errors in mbc3.

fx_mbc3

Running mbc3 (v2.0, 29-Jan-2018)

Not enough input arguments.

Error in fx_mbc3 (line 41)
[matData, FAST_linData] = fx_getMats(FileNames);


And I am attaching the linearization output files I got for test case 5MW_Land_BD_Linear that you asked in earlier reply.
Attachments
5MW_Land_BD_Linear.2.txt
(629.55 KiB) Downloaded 30 times
5MW_Land_BD_Linear.1.txt
(629.55 KiB) Downloaded 29 times

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Processing OpenFast linearization output

Postby Jason.Jonkman » Wed Apr 22, 2020 3:16 pm

Dear Dhaneesh,

OK, I was able to reproduce the error. I realized that there is a small bug in ReadFASTLinear.m. Line 66 should be:

Code: Select all

            data.x_DerivOrder(:) = 2; % (these are second-order states)

instead of:

Code: Select all

            data.x_DerivOrder = 2; % (these are second-order states)

(i.e., the "(:)" should be added in.) This is actually fixed in a pull request waiting to be reviewed and merged into the MATLAB toolbox (https://github.com/OpenFAST/matlab-toolbox/pull/12).

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov


Return to “Structural Analysis”

Who is online

Users browsing this forum: No registered users and 1 guest