WISDEM / RAFT

A frequency-domain dynamics model for floating wind turbines
https://openraft.readthedocs.io
Apache License 2.0
40 stars 21 forks source link

Outputting results #28

Open ttosdevin opened 9 months ago

ttosdevin commented 9 months ago

Hi,

Thanks for creating what looks like another very useful model!

I apologize if this is a silly issue but I am struggling to write the results from the VolturnUS example to an output file as I do not have much experience with Python. Is there an existing function/command which can be added to the 'example_from_yaml.py' file to do this?

To calculate the QTFs in Nemoh V3 a linearized mooring stiffness matrix and viscous drag matrix are needed as inputs, these are primarily the outputs I want from RAFT after running 'model.analyzeCases'. Up to now I have been using MoorPY to get the linearized mooring stiffness matrix but as RAFT can calculate the linearized viscous drag matrix also it makes sense to use RAFT.

Thanks, Tom

mattEhall commented 6 months ago

Hi Tom, Sorry for my huge delay responding. RAFT is mainly intended as a tool within a larger Python-based workflow at the moment and we don't have user-friendly outputs set up yet. For getting certain quantities of interest, it can come down to looking through the code and identifying the variable you're looking for, then calling it after you run RAFT. If you're looking for the linearized viscous drag damping matrix of the platform, you should be able to get that by something like model.fowtList[0].B_hydro_drag after solving the dynamics of your case of interest (e.g. with model.analyzeCases). Note that the variable I listed would just be storing the value calculated in whatever the last case was. Matt

ttosdevin commented 4 months ago

Thankyou for this, it was good meeting you at IOWTC. I can get most of the outputs I need out now. Part of the problem was I did not have the editable version of RAFT installed so any edits I was trying to make to raft_model etc weren't doing anything. We discussed briefly trying to get the phase of the responses out which I have been able to do - see VolturnUS plot below comparing the phase of the RAOs between RAFT and OpenFAST for a white noise case with no wind. I would like to do the same for a wind only case (with turbulent wind and control) but when I run a case in still water with wind the response PSD plots are all zero. From the maximum and average positions reported it looks as though the wind is constant as they are the same e.g.

Response channel Average RMS Maximum surge (m) 1.88e+01 0.00e+00 1.88e+01 sway (m) 4.75e-01 0.00e+00 4.75e-01 heave (m) -6.30e-02 0.00e+00 -6.30e-02 roll (deg) 9.88e-02 0.00e+00 9.88e-02 pitch (deg) 5.75e+00 0.00e+00 5.75e+00 yaw (deg) 2.54e-01 0.00e+00 2.54e-01 nacelle acc. (m/s) 9.83e-01 0.00e+00 9.83e-01 tower bending (Nm) 3.44e+08 0.00e+00 3.44e+08 rotor speed (RPM) 7.16e+00 2.01e+00 1.12e+01 blade pitch (deg) -2.50e-01 0.00e+00 rotor power 1.27e+07

I am using the latest version of RAFT downloaded on the 21/02/2024 and have attached the yaml file I'm trying to use, any guidance on this would be much appreciated. VolturnUS-S_example.txt

Phase_comp

Thanks, Tom

lucas-carmo commented 3 months ago

Hi Tom,

My apologies for the delay in getting to this. Currently, RAFT does not include wind forcing in the solution of body dynamics, though it does include aerodynamic damping and added mass (introduced by the controller). We plan to address that in the future after we finish other implementations that are higher in our priority list. I will let you know when this capability is implemented.

Best, Lucas

ttosdevin commented 2 months ago

No worries, thanks for the update.

Tom