Python package to work with NREL-supported OpenFAST tool. This repository intends to provide simple scripts to help OpenFAST users setup models, run simulations and postprocess the results.
git clone http://github.com/OpenFAST/openfast_toolbox
cd openfast_toolbox
python -m pip install -e .
pytest
The repository contains a set of small packages:
Find examples scripts in this folder and the different fileformats here.
Read an AeroDyn file (or any OpenFAST input file), modifies some values and write the modified file:
from openfast_toolbox.io import FASTInputFile
filename = 'AeroDyn.dat'
f = FASTInputFile(filename)
f['TwrAero'] = True
f['AirDens'] = 1.225
f.write('AeroDyn_Changed.dat')
Read an OpenFAST binary output file and convert it to a pandas DataFrame
from openfast_toolbox.io import FASTOutputFile
df = FASTOutputFile('5MW.outb').toDataFrame()
time = df['Time_[s]']
Omega = df['RotSpeed_[rpm]']
Read a TurbSim binary file, modify it and write it back
from openfast_toolbox.io import TurbSimFile
ts = TurbSimFile('Turb.bts')
print(ts.keys())
print(ts['u'].shape)
ts['u'][0,:,:,:] += 1 # Adding 1 m/s in the streamwise
tw.write('NewTurbulenceBox.bts')
Find examples scripts in this folder.
Read a CSV file with alpha, Cl, Cd, Cm
, and write it to AeroDyn format (also computes unsteady coefficients)
from openfast_toolbox.airfoils.Polar import Polar
polar = Polar('openfast_toolbox/airfoils/data/DU21_A17.csv', fformat='delimited')
ADpol = polar.toAeroDyn('AeroDyn_Polar_DU21_A17.dat')
Find examples scripts in this folder.
Below are different scripts to manipulate OpenFAST outputs:
This repository intends to provide simple scripts to help users of OpenFAST. The repo is still in its early phase, so you may find that functionalities are missing or not bullet proof. Your contributions would be much appreciated, feel free to post issues and pull-requests. We will thrive to provide tests and examples.
In the meantime, you can also find relevant python scripts in the following repositories:
Matlab script are found in the matlab-toolbox.
Open-source OpenFAST wind turbine models can be found here:
General documentation for OpenFAST is found on its readthedocs page.
This repository is still work in progress, thank you for your understanding. Any contribution is much appreciated, feel free to post issues or pull-requests.