OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
675 stars 455 forks source link

How to calculate the quality matrix using fx_getMats.m #2422

Open lk73438702 opened 1 week ago

lk73438702 commented 1 week ago

image image The MATLAB command line window will have the problem shown in Figure 1. The output result obtained by using fx_getMats.m is Figure 2. Does Figure 1 have any impact? How to get the mass matrix

jjonkman commented 5 days ago

Dear @lk73438702,

Regarding the "triplet" warnings from the MBC3 scripts in the MATLAB Toolbox, these warning are associated with the write outputs from ElastoDyn, IPDefl1 etc., and so, should only effect the linearized output equation (matrices C and D, not A and B). You should be able to eliminate the warning by ensuring the outputs are consistent across all blades (i.e., remove output IPDefl1 or add outputs IPDefl2 and IPDefl3; likewise for the other "triplet" warnings).

Best regards,

jjonkman commented 5 days ago

Dear @lk7343870,

The linearization functionality of OpenFAST will not export the full-system mass matrix (rather, OpenFAST linearization produces a linear model in 1st-order form, where in the state matrix “A”, the mass matrix has been inverted and multiplied by the stiffness and damping matrices).

You can often derive the rigid-body mass matrix from the linearized "D" matrix, but this same approach does not work for the generalized mass matrix (including structural flexibility).

Best regards,

lk73438702 commented 4 days ago

Dear @jjonkman, I have read the User’s Guide to MBC3 and followed its operation. I found that I cannot output MBC_M. I want to get the 6×6 mass matrix of the wind turbine generator and tower of IEA-15MW. How should I operate and set openfast and matlab? Best regards.

jjonkman commented 4 days ago

Dear @lk73438702,

You can use an OpenFAST linearization analysis to calculate the 6x6 mass matrix of a rigid ElastoDyn model of a wind turbine using the approach outlined in the following topic on our forum: https://forums.nrel.gov/t/openfast-2nd-order-linearization/2249.

Best regards,

lk73438702 commented 3 days ago

Dear @jjonkman I found that the output D matrix is ​​318×48. Is there any problem with ElastoDyn.dat and fst files?Thank you so much Best regards, IEA-15-240-RWT-UMaineSemi.fst.txt IEA-15-240-RWT-UMaineSemi_ElastoDyn.dat.txt

jjonkman commented 3 days ago

Dear @lk73438702,

As stated in the forum post I linked to, you should take the 6x6 matrix subset from ElastoDyn's "D" matrix associated with the 6 platform load inputs and 6 platform acceleration outputs. The platform load inputs will automatically be included when you select LinInputs = 2, which you've done. But I don't see that you've included the 6 platform acceleration outputs (QD2_Sg, etc.) in ElastoDyn's OutList. I also noticed that you don't have the 6 platform DOFs enabled in your ElastoDyn model but you do have other DOFs enabled. You'll have to enable the 6 platform DOFs (PtfmSgDOF, etc.) and disable all other DOFs to ensure that the ElastoDyn model is a pure 6-DOF rigid body.

Best regards,

lk73438702 commented 2 days ago

Dear @jjonkman I have derived the mass matrix by reading the forum. Thank you for your help. Could you help me see if the result is the mass matrix of wind turbine generator and tower of IEA-15MW? Because I read the Definition of the IEA Wind 15-Megawatt Offshore Reference Wind Turbine and found that the quality was not right.Another question is whether the center of gravity coordinates are relative to the waterline? Best regards, ![Uploading image.png…]()

jjonkman commented 2 days ago

Dear @lk73438702,

I can't see the image you tried to upload, so, I can't really answer your first question.

Regarding the reference point for the center of gravity and inertia values, this would be the user-specified platform reference point in ElastoDyn, which unless you've changed it was set to PtfmRefzt = 0 in the ElastoDyn input file you previously shared, corresponding to the intersection point between the tower centerline and ground level.

Best regards,

lk73438702 commented 1 day ago

Dear @jjonkman, Sorry, I failed to upload the photo. According to the Definition of the IEA 15-Megawatt Offshore Reference Wind, I know that Tower mass=860t, Rotor nacelle assembly mass=1017t, but the mass in the mass matrix I calculated is 2420t. I also calculated the mass of the rotor and nacelle by adjusting the ElastoDyn file, and the result is 950t. What is the reason? image Best regards,

jjonkman commented 1 day ago

Dear @lk73438702,

Can you share the 6x6 mass matrices you derived for these two cases with and without the tower mass?

What value of OutFmt in the OpenFAST primary (*.fst) input file are you using when generating the linearized solution? We generally recommend setting OutFmt to a high precision, such as "ES17.9E2" when generating linearization output files.

Best regards,

lk73438702 commented 14 hours ago

Dear @jjonkman , Yes,the value of OutFmt in the OpenFAST primary (*.fst)and ElastoDyn.dat input file is ES17.92. The data in the following two pictures are the mass matrices of the two cases I calculated. image image Best regards,

jjonkman commented 1 hour ago

Dear @lk73438702,

It sounds like you are following the correct process and the mass matrices look like I would expect in terms of the various quadrants of the 6x6 matrices. I'm not sure why the masses are not matching what you are expecting. The total mass is also written to the ElastoDyn summary (.ED.sum) file; do they match what you are seeing in upper-left quadrant of the 6x6 matrices?

Best regards,

lk73438702 commented 54 minutes ago

Dear @jjonkman , Yes, the total mass in the ElastoDyn summary (.ED.sum) is the same as the mass in the calculated mass matrix, Tower Mass=1446.5t, but the To tower mass in the report is=860t. Should I follow the calculation result in openfast? Thank you very much for your help these days. image Best,regards