Processing OpenFast linearization output

Discuss theory and modeling of wind-turbine structures.

Moderator: Bonnie.Jonkman

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

Re: Processing OpenFast linearization output

Postby Dhaneesh.Machavarapu » Thu Apr 23, 2020 2:24 am

Sir,

Thank you for spending your time on clearing my doubts. I made changes to copy of my Matlab scripts as in https://github.com/OpenFAST/matlab-toolbox/pull/12. For running Matlab scripts I followed the procedure given in MBC3.pdf. After I issued the command fx_getMATS in matlab command window the code started executing and when I typed Fast output file without .lin extention I got error then I tried executing fx_mbc3 then I got another error.

>> 5MW_Land_BD_Linear.1
5MW_Land_BD_Linear.1

Error: Unexpected MATLAB expression.


>> 5MW_Land_BD_Linear.1 5MW_Land_BD_Linear.2
5MW_Land_BD_Linear.1 5MW_Land_BD_Linear.2

Error: Unexpected MATLAB expression.

>> who

Your variables are:

ans

>> 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 tried to run fx_mbc3 by replacing FileNames by ('5MW_Land_BD_Linear.1.lin','5MW_Land_BD_Linear.2.lin') in line 41 of fxmbc3 M file. Then I got this error.

Error using fx_getMats
Too many input arguments.

Error in fx_mbc3 (line 41)
[matData, FAST_linData] = fx_getMats('5MW_Land_BD_Linear.1.lin','5MW_Land_BD_Linear.2.lin');

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 » Thu Apr 23, 2020 12:45 pm

Dear Dhaneesh,

FileNames is a required argument to fx_getMats. Specify a single file in quotes, e.g., FileNames = '5MW_Land_BD_Linear.1.lin'. If you want to specify multiple files, use a cell array, e.g., FileNames = { '5MW_Land_BD_Linear.1.lin', '5MW_Land_BD_Linear.2.lin' }

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 » Thu Apr 23, 2020 3:19 pm

Sir,

From beginning I was using cell array to define FileNames in fx_getMats. Eventhough I was getting the same error. I am attaching the matlab scripts fx_getMats and fx_mbc3. Can I know where I was wrong.
Attachments
fx_mbc3.docx
(16.23 KiB) Downloaded 27 times
fx_getMats.docx
(16.19 KiB) Downloaded 32 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 » Thu Apr 23, 2020 3:30 pm

Dear Dhaneesh,

I haven't looked at your MATLAB scripts, but after downloading the master branch of the MATLAB toolbox, the only thing that you should need to change is the one line in ReadFASTLinear.m that I indicated in my Apr 22. 2020 post above. I was able to run fx_mbc3.m using the OpenFAST linearization output files you attached in your Apr 22, 2020 post above with this one line change to ReadFASTLinear.m.

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 » Thu Apr 23, 2020 5:12 pm

Sir,

Thank you for your quick reply and sorry to bother you this many times on same topic. Earlier I made all changes showed in pull request to my matlab scripts and tried to run mbc then I got error(Not enough input arguments) and error in line 41 of mbc. After seeing your last reply I only changed that 66 line in ReadFASTlinear.m and tried running mbc. Eventhough I was getting same error. And I haven't made any changes in matlab scripts.

Thank you.
Attachments
ReadFASTLinear.docx
(12.54 KiB) Downloaded 33 times
fx_mbc3.docx
(16.22 KiB) Downloaded 27 times
fx_getMats.docx
(14.76 KiB) Downloaded 27 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 » Thu Apr 23, 2020 5:39 pm

Dear Dhaneesh,

How are you calling fx_mb3.m? I would expect it to look something like:

Code: Select all

>> [MBC] = fx_mbc3( '5MW_Land_BD_Linear.1.lin' )

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

Rotating channel "ED BldPitch1, (deg)" does not form a unique blade triplet. Blade(s) not found: 2  3
 
 Multi-Blade Coordinate transformation completed

MBC =

  struct with fields:

                 DescStates: {194×1 cell}
                      ndof2: 97
                      ndof1: 0
               RotSpeed_rpm: 12.0991
    performedTransformation: 1
                          A: [194×194 double]
                          B: [194×6 double]
                          C: [60×194 double]
                          D: [60×6 double]
                       AvgA: [194×194 double]
                     eigSol: [1×1 struct]
                       AvgB: [194×6 double]
                       AvgC: [60×194 double]
                       AvgD: [60×6 double]

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 24, 2020 4:29 am

Sir,

It worked. I think the problem was in issuing the command in Matlab window. Because I was following an outdated procedure for executing MBC3 mentioned in (https://github.com/OpenFAST/matlab-tool ... s/MBC3.pdf).

1. In MBC generated output the MBC transformed mass and stiffness matrices are not generated. Can I Know how to get them in MBC output ?

2. I am interested in cce generated eigen-results. So when I tried to run eiganalysis script I got the error

>> [MBC] = eiganalysis('5MW_Land_DLL_WTurb.1.lin','5MW_Land_DLL_WTurb.2.lin')
Error using eiganalysis (line 26)
**ERROR: the state-space matrix is not a square matrix.

But the state-space matrix I got in output file was a square matrix.
I think I was issuing the command in wrong way. Can I know the correct procedure ?

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 24, 2020 7:59 am

Dear Dhaneesh,

The linearization functionality of OpenFAST does not export the mass and stiffness matrices directly. The presence of mass and stiffness matrices would require that all states be second order, but the OpenFAST linearization functionality supports states in both first and second order. So instead of mass and stiffness, the OpenFAST linearization generates the first-order state matrix, A. If all states were second order, the state matrix would likely look something like the following, and so, contain the same information:

A = [ [ 0, I ]; [ -M^-1*K, -M^-1*C ] ]

where:
0 = Zero matrix
I = Identity matrix
M = Mass matrix
K = Stiffness matrix
C = Damping matrix
M^-1 = The inverse of the mass matrix

If you look at the Eigenalysis.m script, you'll see that it expects the first argument to be the state matrix, A, not a filename.

The CCE script is no longer supported. I would not recommend that you use it anyway, because performing an eigenanalysis on state matrices that are averaged without first applying the MBC transform, will not result in a meaningful eigensolution.

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 24, 2020 1:32 pm

Sir,

Whether the natural frequencies obtained in eigsol of MBC output are the complete frequencies obtained in eigenanalysis of wind turbine ? or are there any AvgNaturalFrequencies like cce generated eigvalues as old version. Because when I tried with syntax command [mbc] = eiganalysis(A, ndof2, ndof1) It was showing an error printing ( undefined function or variable A ). If MBC output frequencies are not the complete natural frequencies then how can I get complete system frequencies.

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 24, 2020 2:19 pm

Dear Dhaneesh,

fx_mbc3.m already calls eigenanalysis.m; there is no need to call eigenanalysis.m separately. All you need to do is run fx_mbc3.m.

Assuming you've called fx_mbc3.m as follows:

Code: Select all

[MBC] = fx_mbc3( '5MW_Land_BD_Linear.1.lin' )


the eigensolution is stored in the MATLAB structure, MBC.eigSol, e.g., the full-system natural frequencies in Hz are contained in MBC.eigSol.NaturalFreqs_Hz.

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

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 29, 2020 12:43 am

Hi Jason,

the fix solved my problem. Thank you.

Best regards,
Simon

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 29, 2020 3:00 am

Sir,

Was the pull request 350 (for linearization of offshore wind turbine ) included in dev branch of openfast? If it is included where I can download reg-test and openfast binaries for modified source code.

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 » Wed Apr 29, 2020 7:02 am

Dear Dhaneesh,

Not yet, and I'm not sure why it is taking so long (likely key staff are just busy). Regardless, you can access the branch of OpenFAST that includes the new offshore linearization capability through the links found here: https://github.com/OpenFAST/openfast/pull/350.

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

Srinivasa.Ramisetti
Posts: 17
Joined: Fri May 08, 2020 2:12 am
Organization: CSIR-SERC
Location: India

Re: Processing OpenFast linearization output

Postby Srinivasa.Ramisetti » Wed May 13, 2020 7:10 am

Dear Jason,

I am interested in using the runCampbell matlab script you mentioned on this forum to run OpenFAST with linearization. I pulled the source code for the matlab-toolbox from github. I found that the runCampbell script requires InflowWind.dat, ServoDyn.dat, and ElastoDyn.dat files template files but they are missing on the github. I have reported this on the github but there is still no reply. I would like to know if I can generate those template files using one of the examples available in the r-tests. Can you please let me know how to generate these template files?

Thank you,
Srinivasa

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 May 13, 2020 10:56 am

Dear Srinivasa,

Yes, the runCampbell.m script runs OpenFAST multiple times, and so, it expects standard InflowWind, ServoDyn, ElastoDyn, etc. input files to exist. Templates for these files can be obtained from the OpenFAST regression tests (r-test) suite: https://github.com/OpenFAST/r-test. The InflowWind file is assumed to use WindType = 1 and the ServoDyn file is assumed to use PCMode = 0, VSContrl = 1, HSSBrMode = 0, and YCMode = 0.

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