Skip to content

Commit cadd555

Browse files
dzalkindmayankchetangbarter
authored
Openfast io (#417)
* Switch to openfast_io and update to OpenFAST v4.0.0 * Remove old IEA-UMaineSemi, move linearizations * Revert ROSCO_Testing exes * Start updating NREL-5MW model * Examples working except 5,7,14,17,26 * working example 26 * Enable yaw control * Add openfast_io to pip installs * Install openfast 4.0 in CI * Install openfast_io in toml * Print pytest outputs * Update IEA-15 Semi paths * Search for servodyn files recursively * Fix paths in tests, update discon script * Update discons * Increase tolerance on check, checkpoint not perfect * Skip python 3.9 * Fix path in notebook * try newer conda packages * add zmq explicitly * another try * more debug * Try m2-pkg-config * Update install.rst --------- Co-authored-by: Mayank Chetan <[email protected]> Co-authored-by: Garrett Barter <[email protected]>
1 parent 975ffac commit cadd555

File tree

509 files changed

+132640
-42782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

509 files changed

+132640
-42782
lines changed

.github/workflows/CI_rosco-compile.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false #true
1818
matrix:
1919
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] #mac-13 intel, mac-14 arm
20-
python-version: ["3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.10", "3.11", "3.12"]
2121

2222
steps:
2323
- name: Setup GNU Fortran
@@ -108,29 +108,33 @@ jobs:
108108
strategy:
109109
fail-fast: false #true
110110
matrix:
111-
os: ["ubuntu-latest", "macOS-13", "windows-latest"] #mac-13 intel, mac-14 arm
112-
python-version: ["3.9", "3.10", "3.11", "3.12"]
111+
os: ["ubuntu-latest", "macOS-13", "macOS-14", "windows-latest"] #mac-13 intel, mac-14 arm
112+
python-version: ["3.10", "3.11", "3.12"]
113113

114114
steps:
115115
- name: checkout repository
116116
uses: actions/checkout@v4
117117

118-
- uses: conda-incubator/setup-miniconda@v2
118+
- uses: conda-incubator/setup-miniconda@v3
119119
# https://github.com/marketplace/actions/setup-miniconda
120120
with:
121-
#mamba-version: "*"
122121
miniforge-version: "latest"
123122
auto-update-conda: true
124123
python-version: ${{ matrix.python-version }}
125124
environment-file: environment.yml
126125
activate-environment: test
127126
auto-activate-base: false
128127

128+
- name: Install OpenFAST
129+
run: |
130+
conda install openfast>=4.0
131+
129132
- name: Add dependencies windows specific
130133
if: contains( matrix.os, 'windows')
131134
run: |
132-
conda install -y m2w64-toolchain libpython
135+
conda install -y gfortran gcc libpython m2-pkg-config
133136
gfortran --version
137+
ls C:/Users/runneradmin/miniconda3/envs/test/Library/lib/*zmq*
134138
135139
- name: Add dependencies mac specific
136140
if: contains( matrix.os, 'mac')
@@ -142,15 +146,11 @@ jobs:
142146
- name: Debug
143147
run: |
144148
conda list
145-
printenv
149+
printenv | sort
146150
147151
- name: Conda Install ROSCO
148152
run: |
149-
python -m pip install -e .
150-
151-
- name: Install OpenFAST
152-
run: |
153-
conda install openfast==3.5.3
153+
python -m pip install -e . --no-build-isolation
154154
155155
- name: Generate Registry
156156
run: |
@@ -175,7 +175,7 @@ jobs:
175175
if: contains( matrix.os, 'ubuntu')
176176
run: |
177177
cd rosco/test
178-
pytest .
178+
pytest -s .
179179
180180
- name: Test walkthrough notebook
181181
if: contains( matrix.os, 'ubuntu')

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Examples/*.p
8282
# Exclude testing results
8383
ROSCO_testing/results/
8484
ROSCO_testing/testing
85+
rosco/test/testing
8586

8687
# Simulink/Matlab temp files
8788
*.slxc

Examples/.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
Cp_Ct_Cq.*.txt
21
*.p
3-
examples_out/
2+
examples_out/
3+
11_robust_tuning_out
4+
*.10

Examples/05_openfast_sim.py

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from rosco.toolbox import turbine as ROSCO_turbine
2424
from rosco.toolbox.utilities import write_DISCON, run_openfast
2525
from rosco.toolbox.inputs.validation import load_rosco_yaml
26+
from rosco import discon_lib_path
2627

2728
def main():
2829
this_dir = os.path.dirname(os.path.abspath(__file__))
@@ -48,6 +49,9 @@ def main():
4849
txt_filename=os.path.join(tune_dir,path_params['rotor_performance_filename'])
4950
)
5051

52+
# Setting up the location of ROSCO library
53+
turbine.fast.fst_vt['ServoDyn']['DLL_FileName'] = discon_lib_path
54+
5155
# Tune controller
5256
controller.tune_controller(turbine)
5357

Examples/07_openfast_outputs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def main():
2525
os.makedirs(example_out_dir)
2626

2727
# Define openfast output filenames
28-
filenames = ["Test_Cases/IEA-15-240-RWT-UMaineSemi/IEA-15-240-RWT-UMaineSemi.outb"]
28+
filenames = ["Test_Cases/IEA-15-240-RWT/IEA-15-240-RWT-UMaineSemi/IEA-15-240-RWT-UMaineSemi.outb"]
2929
# ---- Note: Could load and plot multiple cases, textfiles, and binaries...
3030
# filenames = ["../Test_Cases/NREL-5MW/NREL-5MW.outb",
3131
# "../Test_Cases/NREL-5MW/NREL-5MW_ex8.outb"]

Examples/14_open_loop_control.py

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ def main():
9191
### Run OpenFAST using aeroelasticse tools
9292
case_inputs = {}
9393
case_inputs[('ServoDyn','DLL_FileName')] = {'vals': [discon_lib_path], 'group': 0}
94+
case_inputs[('ServoDyn','Ptch_Cntrl')] = {'vals': [1], 'group': 0}
95+
case_inputs[('ServoDyn','YCMode')] = {'vals': [5], 'group': 0}
96+
case_inputs[('ServoDyn','TYCOn')] = {'vals': [0], 'group': 0}
97+
case_inputs[('ElastoDyn','YawDOF')] = {'vals': ['True'], 'group': 0}
98+
9499

95100
# Apply all discon variables as case inputs
96101
discon_vt = ROSCO_utilities.DISCON_dict(

Examples/22_cable_control.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from rosco.toolbox.ofTools.case_gen import CaseLibrary as cl
2020
from rosco.toolbox.ofTools.fast_io import output_processing
2121
import numpy as np
22-
from rosco.toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST
22+
from openfast_io.FAST_reader import InputReader_OpenFAST
2323
from rosco.toolbox.inputs.validation import load_rosco_yaml
2424
import matplotlib.pyplot as plt
2525
from rosco.toolbox.controller import OpenLoopControl

Examples/23_structural_control.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from rosco.toolbox.ofTools.case_gen.run_FAST import run_FAST_ROSCO
2020
from rosco.toolbox.ofTools.case_gen import CaseLibrary as cl
2121
#import numpy as np
22-
from rosco.toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST
22+
from openfast_io.FAST_reader import InputReader_OpenFAST
2323
from rosco.toolbox.inputs.validation import load_rosco_yaml
2424
from rosco.toolbox.controller import OpenLoopControl
2525

@@ -47,7 +47,7 @@ def main():
4747
reader.execute()
4848

4949
reader.fst_vt['ServoDyn']['NumSStC'] = 3
50-
reader.fst_vt['ServoDyn']['SStCfiles'] = ['StC-Force-Col1.dat', 'StC-Force-Col2.dat', 'StC-Force-Col3.dat']
50+
reader.fst_vt['ServoDyn']['SStCfiles'] = ['../StC-Force-Col1.dat', '../StC-Force-Col2.dat', '../StC-Force-Col3.dat']
5151
# Add SStC file inputs
5252
for StC_file in reader.fst_vt['ServoDyn']['SStCfiles']:
5353
reader.fst_vt['SStC'].append(reader.read_StC(StC_file))

Examples/28_tower_resonance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from rosco.toolbox.ofTools.case_gen.run_FAST import run_FAST_ROSCO
1010
from rosco.toolbox.ofTools.case_gen import CaseLibrary as cl
1111
#from rosco.toolbox.ofTools.fast_io import output_processing
12-
from rosco.toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST
12+
from openfast_io.FAST_reader import InputReader_OpenFAST
1313
from rosco.toolbox.inputs.validation import load_rosco_yaml
1414

1515
import numpy as np

Examples/ROSCO_walkthrough.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@
672672
"\n",
673673
"# Define openfast output filenames, please fill in your own .outb\n",
674674
"# filenames = [\"../Test_Cases/5MW_Step/5MW_Step.outb\"]\n",
675-
"filenames = ['Test_Cases/IEA-15-240-RWT-UMaineSemi/IEA-15-240-RWT-UMaineSemi.outb']\n",
675+
"filenames = ['Test_Cases/IEA-15-240-RWT/IEA-15-240-RWT-UMaineSemi/IEA-15-240-RWT-UMaineSemi.outb']\n",
676676
"# Load output info and data\n",
677677
"fast_out = op.load_fast_out(filenames)\n",
678678
"\n",

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_00.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF00_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF00_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
0.754030 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
29.393939 alpha0 ! 0-lift angle of attack, depends on airfoil.

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_01.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF01_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF01_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
1.626654 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
2.107816 alpha0 ! 0-lift angle of attack, depends on airfoil.

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_02.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF02_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF02_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
2.538528 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
1.985575 alpha0 ! 0-lift angle of attack, depends on airfoil.

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_03.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF03_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF03_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
3.518213 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
1.807510 alpha0 ! 0-lift angle of attack, depends on airfoil.

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_04.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF04_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF04_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
4.575668 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
1.678026 alpha0 ! 0-lift angle of attack, depends on airfoil.

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_05.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF05_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF05_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
5.700528 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
1.619305 alpha0 ! 0-lift angle of attack, depends on airfoil.

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_06.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF06_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF06_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
6.865415 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
1.063866 alpha0 ! 0-lift angle of attack, depends on airfoil.

Examples/Test_Cases/BAR_10/Airfoils/BAR_10_AeroDyn15_Polar_07.dat

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DEFAULT InterpOrd ! Interpolation order to use for quasi-stea
77
1 NonDimArea ! The non-dimensional area of the airfoil (area/chord^2) (set to 1.0 if unsure or unneeded)
88
@"AF07_Coords.txt" NumCoords ! The number of coordinates in the airfoil shape file. Set to zero if coordinates not included.
99
AF07_BL.txt BL_file ! The file name including the boundary layer characteristics of the profile. Ignored if the aeroacoustic module is not called.
10-
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and Ctrl.
10+
1 NumTabs ! Number of airfoil tables in this file. Each table must have lines for Re and UserProp.
1111
! ------------------------------------------------------------------------------
1212
! data for table 1
1313
! ------------------------------------------------------------------------------
1414
8.026545 Re ! Reynolds number in millions
15-
0 Ctrl ! Control setting (must be 0 for current AirfoilInfo)
15+
0 UserProp ! Control setting (must be 0 for current AirfoilInfo)
1616
True InclUAdata ! Is unsteady aerodynamics data included in this table? If TRUE, then include 30 UA coefficients below this line
1717
!........................................
1818
-0.252813 alpha0 ! 0-lift angle of attack, depends on airfoil.

0 commit comments

Comments
 (0)