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
665 stars 451 forks source link

Wave Excitation model generation in state-space (*.ssexctn input file) #397

Closed jonmtz closed 2 years ago

jonmtz commented 4 years ago

Hi,

I am using a platform for which I have the .hst, .1 and .3 files. My aim is to perform a full-system linearization using #350. As I have seen, for being able to perform the linearization in the HydroDyn Submodule, it is necessary to set both ExctnMod and RdtnMod to 2 (state-space model).

For the Radiation memory-effect model (RdtnMod), I have been able to create the .ss file using the SS_Fitting MATLAB Toolbox (https://nwtc.nrel.gov/SS_Fitting), but I was not able to find any toolbox for creating the *.ssexctn input file.

Between r-tests, I see that the marin_semi.ssexctn was created using SS_Excitation_Fitting v1.00.01, but I did not find this toolbox on the net.

Does anyone know how could I get that toolbox, or create the *.ssexctn file in another way?

Thanks in advance,

Jon

andrew-platt commented 4 years ago

@ghaymanNREL do you have any comments?

jjonkman commented 4 years ago

Alan Wright of NREL has developed a MATLAB-based preprocessor called SS_Excitation_Fitting--similar to SS_Fitting for fitting state-space wave-radiation models, but for fitting the state-space wave-excitation models. SS_Excitation_Fitting is not yet ready for general release, but I've asked Alan Wright to respond here as to the status.

jonmtz commented 4 years ago

Alright, thank you @andrew-platt and @jjonkman. I will wait for Alan Wright's answer.

On the other hand, @ghaymanNREL, is there any other way to perform linearization of the HydroDyn submodule using a platform without the state-space wave-excitation model?

Thank you and best regards,

Jon

jjonkman commented 4 years ago

@jonmtz,

If you don't have a linearized state-space representation of the wave-excitation loads, you can always disable wave excitation loads during the linearization process (ExctnMod = 0), but then the impact of perturbations in wave elevation will not be included in the linearized system (i.e., there will be no B and D matrices associated with a du for perturbations in wave elevation).

Best regards,

jonmtz commented 4 years ago

Dear @jjonkman,

I already tried that, but I got the following error when trying to do so.

Error_linOC4

That is why in my first message I said that as I have seen, both ExctnMod and RdtnMod must be 2. Nevertheless, it may happen that the error is due to another cause.

Any ideas?

Thank you in advance,

Jon

jjonkman commented 4 years ago

Well, it is hard for me to guess what is causing this problem...and whether it is a problem with your simulation set up or a bug in the source code. Do you run into the same segmentation fault when you linearize while setting ExctnMod = RdtnMod = 0 with one of the sample models NREL has provided? I would suggest compiling and running in debug mode to more precisely isolate the problem.

alandwright commented 4 years ago

Hi @jonmtz,

We don't have a formal release of the SS_Excitation_Fitting which is why you haven't found it on the github repository. I can work with you one-on-one to send the alpha version to you and help you through it to generate the *.ssexctn files you need for a complete linearization. Please email me at Alan.Wright@nrel.gov. Thanks.

jonmtz commented 4 years ago

Thank you both @jjonkman and @alandwright for your answers.

@jjonkman I tried with the NREL model and had that problem, but as you suggest I will try compiling in debug mode to get more information. @alandwright, I will contact you at your email, thank you for your help.

Best regards,

Jon

ramisetti commented 3 years ago

I tried to run linearisation test setting ExctnMod = RdtnMod = 0 for IEA 15MW semisubermisble case but openfast fails with segmentation fault. I repeated this with 5MW OC4 semisubmersible case available within the NREL test cases and I found it fails with similar problem. I used both OpenFast v2.4.0 to run the above two test cases.

As suggested by @jjonkman (https://wind.nrel.gov/forum/wind/viewtopic.php?f=4&t=2516&p=15915#p15915), I tried to repeat the linearisation run for the 5MW OC4 Semi case ( ExctnMod = RdtnMod = 0) with the code from pull request 537 but openfast aborted with an error (see below) during the initialisation. I am not aware of the changes that needs to be made to the HydroDyn.dat file in order to make it run with the pull 537 version. Is there any example HydroDyn.dat file compatible with pull 537 code?


FAST_InitializeAll:HydroDyn_Init:HydroDynInput_GetInput:Invalid numerical input for file "./NRELOffshrBsline5MW_OC4DeepCwindSemi_HydroDyn.dat" occurred while trying to read ExctnMod.

FAST encountered an error during module initialization. Simulation error level: FATAL ERROR

Can you please let me know if there is any fix to this problem?

jjonkman commented 3 years ago

Dear @ramisetti,

Please find attached a sample HydroDyn input file that is compatible with the HydroDyn changes in pull request #537.

NRELOffshrBsline5MW_OC4DeepCwindSemi_HydroDyn_New4.txt

Does upgrading from OpenFAST v2.4 to this branch of OpenFAST resolve the segmentation fault you are reporting?

Best regards,

ramisetti commented 3 years ago

Dear @jjonkman,

Thanks for sharing the sample HydroDyn input file. I tried to use it with the 5MW OC4 semi case but I still get initialisation error (see below). I think I don't have any answer yet to your question about the segmentation fault with the pull 537 version until I succeed running openfast with the appropriate HydroDyn.dat file.


FAST_InitializeAll:HydroDyn_Init:HydroDynInput_GetInput:ReadOutputList: Did not find the required number of Potfile strings on the input file line: only found 1.

FAST encountered an error during module initialization. Simulation error level: FATAL ERROR

jjonkman commented 3 years ago

Dear @ramisetti,

This error sounds like you've specified 3 potential-flow bodies (NBody = 3), but only specified properties of one of them. You should set NBody = 1 if you only want one potential-flow body.

Best regards,

ramisetti commented 3 years ago

Dear @jjonkman,

I have used the sample HydroDyn.dat file that you shared without making any major changes to run linearisation for the 5MW OC4 Semisubmersible case. As you suggested, I changed NBody to 1 but openfast is still aborting due to some other errors. I see there are some changes in inputs to the HydroDyn.dat file between v2.4.0 and pull537 code. I also noticed the AddF0 and AddCLin matrices in the PLATFORM ADDITIONAL STIFFNESS AND DAMPING section are changed. Could you please suggest how to fix this issue?


OpenFAST

Copyright (C) 2020 National Renewable Energy Laboratory Copyright (C) 2020 Envision Energy USA LTD

This program is licensed under Apache License Version 2.0 and comes with ABSOLUTELY NO WARRANTY. See the "LICENSE" file distributed with this software for details.


OpenFAST-v2.4.0-421-g93269618-dirty Compile Info:

MAP++ environment properties (set externally)... Gravity constant [m/s^2] : 9.81 Sea density [kg/m^3] : 1025.00 Water depth [m] : 200.00 Vessel reference position [m] : 0.00 , 0.00 , 0.00 Time: 0 of 10 seconds. Time: 4 of 10 seconds. Estimated final completion at 10:40:37.
FAST_Solution:FAST_AdvanceStates:ED_ABM4:ED_CalcContStateDeriv:SetCoordSy:Small angle assumption violated in SUBROUTINE SmllRotTrans() due to a large platform displacement (ElastoDyn SetCoordSy). The solution may be inaccurate. Simulation continuing, but future warnings from SmllRotTrans() will be suppressed. Additional debugging message from SUBROUTINE SmllRotTrans(): 4.4625 s FAST_Solution:CalcOutputs_And_SolveForInputs:SolveOption1:ED_HD_InputOutputSolve:HydroDyn_CalcOutp ut: Angles in GetSmllRotAngs() are larger than 0.4 radians. HydroDyn_CalcOutput: Angles in GetSmllRotAngs() are larger than 0.4 radians. ED_HD_InputOutputSolve:HydroDyn_CalcOutput: Angles in GetSmllRotAngs() are larger than 0.4 radians. HydroDyn_CalcOutput: Angles in GetSmllRotAngs() are larger than 0.4 radians.

FAST_Solution:CalcOutputs_And_SolveForInputs:SolveOption1:ED_HD_InputOutputSolve:HydroDyn_CalcOutp ut: Angles in GetSmllRotAngs() are larger than 0.4 radians. HydroDyn_CalcOutput: Angles in GetSmllRotAngs() are larger than 0.4 radians. ED_HD_InputOutputSolve:HydroDyn_CalcOutput: Angles in GetSmllRotAngs() are larger than 0.4 radians. HydroDyn_CalcOutput: Angles in GetSmllRotAngs() are larger than 0.4 radians.

FAST_Solution:FAST_AdvanceStates:ED_ABM4:ED_CalcContStateDeriv:LAPACK_DGETRF: U( 13, 13)=0. Factor U is exactly singular.

FAST encountered an error at simulation time 6.9125 of 10 seconds. Simulation error level: FATAL ERROR

Aborting OpenFAST

Regards,

jjonkman commented 3 years ago

Dear @ramisetti,

Well, at least you got past the model initialization errors. It looks like your model has gone numerically unstable, likely due to something improperly set in the updated HydroDyn file. Have you transferred all of the inputs from the original OC5 semi linearization test (https://github.com/OpenFAST/r-test/blob/master/glue-codes/openfast/5MW_OC4Semi_Linear/NRELOffshrBsline5MW_OC4DeepCwindSemi_HydroDyn.dat) to the new file format?

Regardless, my understanding is the only reason you are using this branch of OpenFAST is to see if the model seg faults when running a linearization with ExctnMod = RdtnMod = 0. You could try that now by linearizing right away at time zero (LinTimes = 0).

Best regards,

ramisetti commented 3 years ago

Dear @jjonkman,

Yes, indeed I got past the model initialisation errors. I did try to transfer all the inputs from the original OC4 semisubmersible case except the AddF0 and AddCLin matrices because of the difference between two formats. The size of AddF0 and AddCLin is different and it's not very clear how to adapt the new format with the values from the original case. could you please explain why this difference between the original case and new hydrodynamics file?

jjonkman commented 3 years ago

Dear @ramisetti,

NBody is the number of potential-flow bodies (historically this was always one; in the new branch, HydroDyn supports more than one body). The additional preload, stiffness, and damping are now just dimensioned by the number of bodies. When doing this, we also transposed how AddF0 is entered. Before it was 1 x 6, now it is 6 x NBody. See the comments after the variable names.

Best regards,

ramisetti commented 3 years ago

Thank you @jjonkman for your help. I am now able to run the linearisation with ExctnMod = RdtnMod = 0 for the IEA 15MW semisubmersible case using the pull 537 code.

Just a comment related to representation of the vectors/matrices used in PLATFORM ADDITIONAL STIFFNESS AND DAMPING section. In my opinion, I think the new representation of AddF0 and other Matrices is not really user-friendly. Instead, I prefer to use the vectors/matrices for NBody in new rows as this will also work with previous openfast versions and it is easy to prepare the HydroDyn.dat file. Hope this is clear.

jjonkman commented 3 years ago

Dear @ramisetti,

When extending the platform additional stiffness and damping to work with NBody and NBodyMod, we had to change the dimensions of the matrices and vectors. In this process, we thought it was confusing that AddF0 was input transposed in prior versions of HydroDyn, unlike the other matrices. We corrected this in the updated version of HydroDyn.

Best regards,

mftatfcyclone commented 3 years ago

Hi @jonmtz,

We don't have a formal release of the SS_Excitation_Fitting which is why you haven't found it on the github repository. I can work with you one-on-one to send the alpha version to you and help you through it to generate the *.ssexctn files you need for a complete linearization. Please email me at Alan.Wright@nrel.gov. Thanks.

Dear @alandwright I need to generate the ssexctn file. Could you help me to generate it for NREL 5MW?

jjonkman commented 3 years ago

Dear @mftatfcyclone,

For which floating platform do you want the *.ssexctn file for?

Best regards,

mftatfcyclone commented 3 years ago

Dear @jjonkman Thanks for your prompt response I need it for spar platform

jjonkman commented 3 years ago

Dear @mftatfcyclone,

Alan Wright just sent me the attached *.ssexctn file for the OC3-Hywind spar that supports the NREL 5-MW baseline wind turbine. I added a .txt file extension to attach it (rename it to spar.ssexxctn for use with OpenFAST).

spar.ssexctn.txt

I hope that helps.

Best regards,

mftatfcyclone commented 3 years ago

Dear @jjonkman

Thank you very much for your considerations. But I have a question, Is this state space valid for all wave conditions (operating points) of the spar platform of the 5MW wind turbine?

Best regards,

jjonkman commented 3 years ago

Dear @mftatfcyclone,

This model should be valid for any sea state (wave height, period) with zero-degree wave heading; it is not valid for other wave propagation directions.

Best regards,

Ian-Ammerman commented 1 year ago

Alan Wright of NREL has developed a MATLAB-based preprocessor called SS_Excitation_Fitting--similar to SS_Fitting for fitting state-space wave-radiation models, but for fitting the state-space wave-excitation models. SS_Excitation_Fitting is not yet ready for general release, but I've asked Alan Wright to respond here as to the status.

Dear @alandwright ,

Was this pre-processor developed further? Would you be willing to make it available?

Best, Ian

jjonkman commented 1 year ago

Dear @Ian-Ammerman,

See also the discussion on SS_Excitation_Fitting here: https://github.com/OpenFAST/openfast/discussions/1053. If you provide your e-mail address, I can send you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

Ian-Ammerman commented 1 year ago

Dear @Ian-Ammerman,

See also the discussion on SS_Excitation_Fitting here: #1053. If you provide your e-mail address, I can send you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

Dear @jjonkman ,

My email is: ian.ammerman@maine.edu

Best, Ian

jjonkman commented 1 year ago

Dear @Ian-Ammerman,

I've sent you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

Hamedfath commented 5 months ago

Dear @jjonkman,

Could you please send me SS_Excitation_Fitting for the OC4 semisubmersible platform that supports the NREL 5-MW baseline wind turbine, and its manual for me?

My Email is: hfathnejat@bcamath.org

Best regards, Hamed

jjonkman commented 5 months ago

Dear @Hamedfath,

I've sent you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

Hamedfath commented 5 months ago

Dear Dr. Jonkman,

Thank you very much.

Best regards, Hamed Fathnejat, Ph.D., Postdoctoral Fellow BCAM - Basque Center for Applied Mathematics Alameda de Mazarredo, 14 E-48009 Bilbao, Basque Country - Spain Tel. +34 613906430 @. @.>* , @.***

On Mon, Mar 25, 2024 at 4:12 PM jjonkman @.***> wrote:

Dear @Hamedfath https://github.com/Hamedfath,

I've sent you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

— Reply to this email directly, view it on GitHub https://github.com/OpenFAST/openfast/issues/397#issuecomment-2018236804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXJ64C7ETTUM57N6CHNVY3LY2A5HXAVCNFSM4K3K5YTKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBRHAZDGNRYGA2A . You are receiving this because you were mentioned.Message ID: @.***>

jiayaomeng commented 3 months ago

Dear @Ian-Ammerman,

See also the discussion on SS_Excitation_Fitting here: #1053. If you provide your e-mail address, I can send you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

Dear @jjonkman,

Could I please also ask for the alpha release of SS_Excitation_Fitting, so that I can compare my fitting method with it? Thank you so much! My email: jiayao.meng@wolfson.ox.ac.uk

Best wishes, Jiayao

jjonkman commented 3 months ago

Dear @jiayaomeng,

I've sent you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

jiayaomeng commented 3 months ago

Dear @jiayaomeng,

I've sent you the alpha release of SS_Excitation_Fitting via WeTransfer.

Best regards,

Thank you very much, @jjonkman, for always being so helpful!