Giter VIP home page Giter VIP logo

matlab-toolbox's Introduction

OpenFAST

Build Status Documentation Status

OpenFAST is a wind turbine simulation tool which builds on FAST v8. FAST.Farm extends the capability of OpenFAST to simulate multi-turbine wind farms. They were created with the goal of being community models developed and used by research laboratories, academia, and industry. They are managed by a dedicated team at the National Renewable Energy Lab. Our objective is to ensure that OpenFAST and FAST.Farm are sustainable software that are well tested and well documented. If you'd like to contribute, see the Developer Documentation and any open GitHub issues with the Help Wanted tag.

OpenFAST is under active development.

FAST v8 - OpenFAST

The transition from FAST v8 to OpenFAST represents the effort to better support an open-source developer community around FAST-based aero-hydro-servo- elastic engineering models of wind-turbines and wind-plants. OpenFAST is the next generation of FAST analysis tools. More information is available in the transition notes.

FAST v8, now OpenFAST, is a physics-based engineering tool for simulating the coupled dynamic response of wind turbines. OpenFAST joins aerodynamics models, hydrodynamics models for offshore structures, control and electrical system (servo) dynamics models, and structural (elastic) dynamics models to enable coupled nonlinear aero- hydro-servo-elastic simulation in the time domain. The OpenFAST tool enables the analysis of a range of wind turbine configurations, including two- or three-blade horizontal-axis rotor, pitch or stall regulation, rigid or teetering hub, upwind or downwind rotor, and lattice or tubular tower. The wind turbine can be modeled on land or offshore on fixed-bottom or floating substructures. OpenFAST is based on advanced engineering models derived from fundamental laws, but with appropriate simplifications and assumptions, and supplemented where applicable with computational solutions and test data.

With OpenFAST, you can run large numbers of nonlinear time-domain simulations in approximately real time to enable standards-based loads analysis for predicting wind system ultimate and fatigue loads. You can also linearize the underlying nonlinear model about an operating point to understand the system response and enable the calculation of natural frequencies, damping, and mode shapes; the design of controllers, and analysis of aero-elastic instabilities.

The aerodynamic models use wind-inflow data and solve for the rotor-wake effects and blade-element aerodynamic loads, including dynamic stall. The hydrodynamics models simulate the regular or irregular incident waves and currents and solve for the hydrostatic, radiation, diffraction, and viscous loads on the offshore substructure. The control and electrical system models simulate the controller logic, sensors, and actuators of the blade-pitch, generator-torque, nacelle-yaw, and other control devices, as well as the generator and power-converter components of the electrical drive. The structural-dynamics models apply the control and electrical system reactions, apply the aerodynamic and hydrodynamic loads, adds gravitational loads, and simulate the elasticity of the rotor, drivetrain, and support structure. Coupling between all models is achieved through a modular interface and coupler (glue code).

FAST.Farm extends the capabilities of OpenFAST to provide physics-based engineering simulation of multi-turbine land-based, fixed-bottom offshore, and floating offshore wind farms. With FAST.Farm, you can simulate each wind turbine in the farm with an OpenFAST model and capture the relevant physics for prediction of wind farm power performance and structural loads, including wind farm-wide ambient wind, super controller, and wake advection, meandering, and merging. FAST.Farm maintains computational efficiency through parallelization to enable loads analysis for predicting the ultimate and fatigue loads of each wind turbine in the farm.

Documentation

The full documentation is available at http://openfast.readthedocs.io/.

This documentation is stored and maintained alongside the source code. It is compiled into HTML with Sphinx and is tied to a particular version of OpenFAST. Readthedocs hosts the following versions of the documentation:

  • latest - The latest commit on the main branch
  • stable - Corresponds to the last tagged release
  • dev - The latest commit on the dev branch

These can be toggled with the v: latest button in the lower left corner of the docs site.

Obtaining OpenFAST and FAST.Farm

OpenFAST and FAST.Farm are hosted entirely on GitHub so you are in the right place! The repository is structured with two branches following the "git-flow" convention:

  • main
  • dev

The main branch is stable, well tested, and represents the most up to date released versions of OpenFAST and FAST.Farm. The latest commit on main contains a tag with version info and brief release notes. The tag history can be obtained with the git tag command and viewed in more detail on GitHub Releases. For general use, the main branch is highly recommended.

The dev branch is generally stable and tested, but not static. It contains new features, bug fixes, and documentation updates that have not been compiled into a production release. Before proceeding with new development, it is recommended to explore the dev branch. This branch is updated regularly through pull requests, so be sure to git fetch often and check outstanding pull requests.

For those not familiar with git and GitHub, there are many resources:

Compilation, Usage, and Development

Details for compiling compiling, using, and developing OpenFAST and FAST.Farm on Unix-based and Windows machines are available at readthedocs.

Help

Please use GitHub Issues to:

  • ask usage questions
  • report bugs
  • request code enhancements

Users and developers may also be interested in the NREL National Wind Technology Center (NWTC) phpBB Forum, which is still maintained and has a long history of FAST-related questions and answers.

Acknowledgments

OpenFAST and FAST.Farm are maintained and developed by researchers and software engineers at the National Renewable Energy Laboratory (NREL), with support from the US Department of Energy's Wind Energy Technology Office. NREL gratefully acknowledges development contributions from the following organizations:

matlab-toolbox's People

Contributors

andrew-platt avatar bjonkman avatar ebranlard avatar hkross avatar jjonkman avatar pschuenemann avatar rafmudaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

matlab-toolbox's Issues

xlmwrite in campbell_diagram_data function fails on Mac OS

The use of xlmwrite inside the campbell_diagram_data function to generate the excel sheet is not working on Mac OS. xlmwrite function works for Windows OS and may be Linux OS. Instead writetable function can be used but the cell data should be first converted to table data. I think this problem can be avoided if a flag is used to check OS type and accordingly call appropriate function, either xlmwrite or writetable, to write the excel sheet.

Incompatible excel sheet generated by `campbell_diagram_data.m`

Hi,

I've been trying to generate the Campbell Diagram for the IEA3.4MW turbine.

The Excel files generated by campbell_diagram_data.m are not compatible with the Plot_CampbellData.m function, nor do they match the format described in Plot_CampbellData.m.

Should the Excel which is an input to Plot_CampbellData.m function be manually generated?

Thank you

Unrecognized field name "BldPropHdr"

Hello everybody,

Trust that everyone is doing well. Thank you in advance for any feedback that you provide me on this issue.

We trying to convert some V7 files to V8 but have come across this 'unrecognized field name "BldPropHdr"' error which we can't quite get past (see attached).

Is anyone familiar with this BldPropHdr?

Thank you all again.

Olivier Maudhuit

Git_Issue_01

Problem with campell

Dear openfast team, 
I am facing some issues with the MATLAB-toolbox for Campbell diagram. As I am completely new to this field, these issues may be superficial. Any guidance would be really helpful .

I want to see the frequency and damping of  blade without other parts of wind turbine at different wind speeds (roter speed is always 0).To do this, I set FlapDOF1=True,FlapDOF2=True, EdgeDOF=True with no other DOFs and rotor speed is always 0. Are these Settings feasible?

Another follow-up question. When I set only one blade(NumBl=1), I get some warnings from the "fx_mbc3()" function. Is there any way on how to set only one blade?

The third thing- very sorry for my clumsiness- as I turned BeamDny feature ON (CompElast=2), it is hard for me to identify the modes from one operating point to the next in the "Summary.txt" file with the wind speeds up. And Compared with ED , no blade changes are visible in VTK files with BeamDny feature ON. I don't sure if it's my setup or the program. Any suggestions/guidance?
图片1

upload output file to matlab

Dear openfast team,
i wanted to ask you what's the procedure to upload the output file generated from the openfast simulation in Matlab.
Thank you

multiple problems using runCampbell script

  1. The InflowWind.dat, ServoDyn.dat, and ElastoDyn.dat files required to run runCampbell.m script are missing inside the TemplateFiles directory.
  2. WriteVTKmodes and WriteFASTfiles are assigned twice. It can be understood if WriteVTKmodes is set true then VTK files will be generated. However, I see the purpose of using WriteFASTfiles flag is redundant because without generating the FAST input files and running FAST there will be no *.lin output file, which in turn is required by the fx_mbc3 at lines 173 or 182 inside the runCampbell.m script.
  3. As mentioned in one of my last issue (#17), xlmwrite function at line numbers 188, 230 and 231 does not work on Mac OS. I think an alternative solution to xlmwrite is needed here.
  4. The code from line number 198 does not work without the Campbell data being generated at 184 if WriteFASTfiles flag is set false.
  5. The system commands like copy, used in line 180, are OS-dependent. Also the file fort.51 used in the copy command is missing. I was expecting fort.51 file would be generated by runCampbell script but it does not create this file.

Discussion on repository name and python vs matlab

We have more and more python-scripts available to deal with OpenFAST simulations, but no repository for it.
Some options would be to either:

  1. Create a python-toolbox repository
  2. Rename matlab-toolbox to openfast-toolbox. Then we could either gather code by:
    2.1 language (e.g. a folder matlab and a folder python at the root
    2.2 functionality (e.g. folders io , mbc, areoacoustics, preprocessors.

If you think of other options, I can add them to this post. I'd be happy to hear the opinion of people listening to this channel (for instance: @bjonkman, @andrew-platt , @jjonkman , @ptrbortolotti, @nikhar-abbas, @gbarter, @kshaler, @evan-gaertner, @ewquon)

Hopefully we can come up with some kind of consensus on what to do about matlab/python. Then I'd suggest we sit down and decide on an architecture. On the python side, I'd like to aim for a repository with unit tests and continuous integration, and a couple of examples. Hopefully we can find a balance between adding a lot of inconsistent scripts and having a too restrictive framework that no one dares using or pushing to.

I believe the repository should stay fairly small and OpenFAST-focused: read/write files, generate cases, postprocess them. Some of these steps might involve generic tools, which we can extract from other repositories without actively developing on them. Otherwise things might run out of proportion.

But that's already too much details.. I just want to start a discussion on where to put our python scripts. Let me know your thoughts.

Examples of repositories with potential overlap

How use "runFAST.m"

Hello everyone,

I don't quite understand how to use the matlab runFAST.m function.
I would like to know how to modify which parameters to make it work properly.

This is the source code:

function status = runFAST(FASTfilenames, FASTexe, varargin)
% Run a set of FAST simulations using FAST exe.
%
% TODO , parallelization...
%
% INPUTS
% - FASTfilenames: list of fullpath (relative or absolute) to fst flies
% - FASTexe: fullpath (relative or absolute) to an openfast executable
%
% OPTIONAL INPUTS:
% - varargin is a set of ('key', value) pairs.
% Look at opts below for the different options, and default values.
%
% OUPUTS:
% - status: array of status for each simulation

% --- Optional arguments
OptsFields={'flag',};
opts=struct();
% Default values
opts.flag = '' ; % Extra flag passed as command line argument
% Values input by users % NOTE: inputParser not available in Octave
if mod(length(varargin),2)~=0; error('Varargin should have an even number of values, for key/values pairs'); end
for iVar = 1:2:length(varargin)
i = find( strcmp( OptsFields, varargin{iVar}) == 1);
if ~isempty(i)
opts.(OptsFields{i}) = varargin{iVar + 1};
else
warning('Optional key %s not supported by function %s',varargin{iVar},mfilename)
end
end
% --- Inputs sanity
if ispc()
FASTexe = strrep(FASTexe,'/','');
end

status=zeros(1,length(FASTfilenames));

% --- Creating a list of commands
commands=cell(1,length(FASTfilenames));
for isim = 1:length(FASTfilenames)
FASTfile = FASTfilenames{isim};
if ispc()
FASTfile = strrep(FASTfile,'/','');
end
sCmd= [FASTexe ' ' opts.flag ' ' FASTfile];
commands{isim}=sCmd;
end

% --- Running
status = runCommands(commands);

Thank you for your answers.

Problem with matlab command to add path

The documentation says addpath( getpath('AbsolutePathToToolbox') ) to add the path to matlab-toolbox in Matlab. I think the command should be instead addpath( genpath('AbsolutePathToToolbox') )

How use ReadFASTMesh

Hello everyone,

I don't quite understand how to use the matlab ReadFASTMesh function. Does the fileID correspond to a .vtk file? How to generate a mesh file?
If anyone ever has a mesh file so I can analyze the structure.

Thank you for your answers.

Regards,

Tom

fx_getMats bug while running runCampbell.m

fx_getMats code matData.WindSpeed(iFile) = data(iFile).WindSpeed appeared a bug : Cannot perform assignment because the number of elements on the left and right sides is different

But all 36 .lin files can be generated
2

The detailed information is shown in the following diagram
3

My OpenFAST version is 3.5.2
Matlab workspace
1

campbell_diagram_data.m Needs to be Updated for Recent Linearization Upgrades to OpenFAST

The campbell_diagram_data.m script provides a useful representation of the eigensolution so as to enable users to interpret the eigenvectors and eigenvalues resulting from the MBC3 analysis in terms of the full system natural frequencies, damping ratios, and mode shapes. However, the script has not been updated to reflect recent improvements to OpenFAST involving linearization of SubDyn, MoorDyn, AeroDyn, and the structural control (StC) submodel of ServoDyn. A few improvements are warranted:

  • For the ElastoDyn and BeamDyn states, only the displacement states are included in the eigenvectors because the velocity states contain redundant information. However, both the displacement and velocity states from MoorDyn are currently included. These velocity states should be removed from the reported eigenvectors.

  • The script applies scaling to the blade and tower translation states of ElastoDyn and BeamDyn so as to ensure all states represented in the eigenvector have similar units (radians). That is, the blade translation states are scaled by one over the blade length and the tower translation states are scaled by one of the tower length, effectively converting the translation in meters to an equivalent slope in radians. Similar scaling should be added for the platform transnational displacements in ElastoDyn (based on the tower length) and the mooring line translational states in MoorDyn (based on the water depth). Likewise, a scaling of the C-B mode states in SubDyn and the StC states in ServoDyn should be developed.

  • Aerodynamic states from the DBEMT and UA submodels of AeroDyn can now be included in the linearized state-space matrices derived from OpenFAST. It is desired to account for the effect of these aerodynamic states on the frequencies and damping of the structure, but not to have aerodynamic modes themselves show up in the eigensolution. A way to eliminate the aerodynamic modes from showing up in the eigensolution should be developed.

Problems with "Matlab2FAST.m", some parameters wrong when creating the HydroDyn Input File

Dear openfast team,
I use the "changeFASTInputDeck.m" to extract data from HydroDyn Input File, but the new "HydroDyn. dat" generate some errors.
The "PLATFORM ADDITIONAL STIFFNESS AND DAMPING" in old input files is shown below:
---------------------- PLATFORM ADDITIONAL STIFFNESS AND DAMPING -------------- [unused with PotMod=0 or 2]
0 AddF0 - Additional preload (N, N-m) [If NBodyMod=1, one size 6NBody x 1 vector; if NBodyMod>1, NBody size 6 x 1 vectors]
0
0
0
0
0
0 0 0 0 0 0 AddCLin - Additional linear stiffness (N/m, N/rad, N-m/m, N-m/rad) [If NBodyMod=1, one size 6
NBody x 6NBody matrix; if NBodyMod>1, NBody size 6 x 6 matrices]
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 AddBLin - Additional linear damping(N/(m/s), N/(rad/s), N-m/(m/s), N-m/(rad/s)) [If NBodyMod=1, one size 6
NBody x 6NBody matrix; if NBodyMod>1, NBody size 6 x 6 matrices]
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0 AddBQuad - Additional quadratic drag(N/(m/s)^2, N/(rad/s)^2, N-m(m/s)^2, N-m/(rad/s)^2) [If NBodyMod=1, one size 6
NBody x 6*NBody matrix; if NBodyMod>1, NBody size 6 x 6 matrices]
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

!!!!!however, the new input files that generated through "Matlab2FAST.m" is shown below(PLATFORM ADDITIONAL STIFFNESS AND DAMPING part, too):
---------------------- PLATFORM ADDITIONAL STIFFNESS AND DAMPING -------------- [unused with PotMod=0 or 2]
0 AddF0 - Additional preload (N, N-m) [If NBodyMod=1, one size 6NBody x 1 vector; if NBodyMod>1, NBody size 6 x 1 vectors]
0, 0, 0, 0, 0, 0 AddCLin - Additional linear stiffness (N/m, N/rad, N-m/m, N-m/rad) [If NBodyMod=1, one size 6
NBody x 6NBody matrix; if NBodyMod>1, NBody size 6 x 6 matrices]
0, 0, 0, 0, 0, 0 AddBLin - Additional linear damping(N/(m/s), N/(rad/s), N-m/(m/s), N-m/(rad/s)) [If NBodyMod=1, one size 6
NBody x 6NBody matrix; if NBodyMod>1, NBody size 6 x 6 matrices]
0, 0, 0, 0, 0, 0 AddBQuad - Additional quadratic drag(N/(m/s)^2, N/(rad/s)^2, N-m(m/s)^2, N-m/(rad/s)^2) [If NBodyMod=1, one size 6
NBody x 6*NBody matrix; if NBodyMod>1, NBody size 6 x 6 matrices]

Some of the following parameters are also different, I'm not sure if it's my setup or the program. Any suggestions/guidance? Thank you!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.