Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into usflowt
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Jul 11, 2024
2 parents 1c0e878 + d621956 commit 1e0e78b
Show file tree
Hide file tree
Showing 193 changed files with 22,755 additions and 18,183 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

## Desired use case
_If you are able, please provide some background about your ROSCO use case. It helps guide our development and could help us better fix your issue._

## Description
_Describe the bug here_

### Steps to reproduce issue
_Please provide a minimum working example (MWE) if possible_

1.
2.
3.

### Current behavior

### Expected behavior


### Code versions
_List versions only if relevant_
- Python
-
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

# Description of feature
Describe the feature here and provide some context. Under what scenario would this be useful?

# Potential solution
Can you think of ways to implement this?
10 changes: 10 additions & 0 deletions .github/tools/cibw_repair_wheel_command_windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e
set -x

WHEEL=$1
DEST_DIR=$2

python -m pip install delvewheel
python -m delvewheel show "$WHEEL" && python -m delvewheel repair -w "$DEST_DIR" "$WHEEL" --no-mangle-all
59 changes: 45 additions & 14 deletions .github/workflows/CI_rosco-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,61 @@ jobs:
strategy:
fail-fast: false #true
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] #mac-13 intel, mac-14 arm
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Setup GNU Fortran
# if: false == contains( matrix.os, 'windows')
uses: awvwgk/setup-fortran@v1 #modflowpy/install-intelfortran-action@v1 #
if: false == contains( matrix.os, 'windows')
uses: fortran-lang/[email protected]
# with:
# compiler: intel-classic

- name: Install compiler
if: false == contains( matrix.os, 'windows')
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: clang

- name: Install mingw-w64 on Windows
if: contains( matrix.os, 'windows')
uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: |
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-zeromq
mingw-w64-x86_64-cmake
mingw-w64-x86_64-pkg-config
- name: Install zeromq ubuntu
if: contains( matrix.os, 'ubuntu')
run: |
sudo apt install libzmq3-dev libzmq5 libczmq-dev libczmq4
- name: Install zeromq mac
if: contains( matrix.os, 'mac')
run: |
brew install zeromq
- name: checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
id: cp
with:
python-version: ${{ matrix.python-version }}
update-environment: true

- name: Set compilers
if: false == contains( matrix.os, 'windows')
run: |
echo "CC=${{ steps.install_cc.outputs.cc }}" >> $GITHUB_ENV
echo "CXX=${{ steps.install_cc.outputs.cxx }}" >> $GITHUB_ENV
#- name: Setup tmate session
# if: contains( matrix.os, 'windows')
# uses: mxschmitt/action-tmate@v3
Expand Down Expand Up @@ -71,8 +108,8 @@ jobs:
strategy:
fail-fast: false #true
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest", "macOS-13", "windows-latest"] #mac-13 intel, mac-14 arm
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: checkout repository
Expand Down Expand Up @@ -113,13 +150,7 @@ jobs:
- name: Install OpenFAST
run: |
conda install openfast==3.5.2
#- name: Check OpenFAST
# # if: contains( matrix.os, 'windows')
# run: |
# openfast -v
# which openfast
conda install openfast==3.5.3
- name: Generate Registry
run: |
Expand Down
85 changes: 75 additions & 10 deletions .github/workflows/Publish_ROSCO.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,96 @@
name: Build and upload to PyPI
# https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
# Best comparable example: https://github.com/pdfo/pdfo

# Build on every branch push, tag push, and pull request change:
#on: [push, pull_request]
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
on:
release:
types:
- published
# Build on every pull request (no need for every push) and release change:
on: [pull_request, release]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-12, macos-13, macos-14]

steps:
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Setup GNU Fortran
if: false == contains( matrix.os, 'windows')
uses: awvwgk/setup-fortran@v1

- name: Install compiler
if: false == contains( matrix.os, 'windows')
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: clang

- name: Install mingw-w64 on Windows
if: contains( matrix.os, 'windows')
uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: |
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-zeromq
mingw-w64-x86_64-cmake
mingw-w64-x86_64-pkg-config
- name: Install zeromq ubuntu
if: contains( matrix.os, 'ubuntu')
run: |
sudo apt install libzmq3-dev libzmq5 libczmq-dev libczmq4
- name: Install zeromq mac
if: contains( matrix.os, 'mac')
run: |
brew install zeromq
- name: Checkout
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/[email protected]
- name: Build wheels linux
if: contains( matrix.os, 'ubuntu')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}

- name: Build wheels mac-12
if: contains( matrix.os, 'macos-12')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="12.0"

- name: Build wheels mac-13
if: contains( matrix.os, 'macos-13')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="13.0"

- name: Build wheels mac-14
if: contains( matrix.os, 'macos-14')
uses: pypa/[email protected]
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="14.0"

- name: Build wheels windows
if: contains( matrix.os, 'windows')
uses: pypa/[email protected]

- uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ build:
os: ubuntu-22.04
tools:
python: "mambaforge-22.9"
jobs:
# Read the docs needs a couple packages not in the environment file
pre_install:
- conda install -y cmake compilers sphinx sphinxcontrib-bibtex
- conda install sphinx_rtd_theme>=1.3

conda:
environment: environment.yml
Expand Down
2 changes: 1 addition & 1 deletion Examples/Test_Cases/BAR_10/BAR_10.fst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ True Echo - Echo input data to <RootName>.ech (flag)
99999.0 DT_UJac - Time between calls to get Jacobians (s)
1000000.0 UJacSclFact - Scaling factor used in Jacobians (-)
---------------------- FEATURE SWITCHES AND FLAGS ------------------------------
1 CompElast - Compute structural dynamics (switch) {1=ElastoDyn; 2=ElastoDyn + BeamDyn for blades}
2 CompElast - Compute structural dynamics (switch) {1=ElastoDyn; 2=ElastoDyn + BeamDyn for blades}
1 CompInflow - Compute inflow wind velocities (switch) {0=still air; 1=InflowWind; 2=external from OpenFOAM}
2 CompAero - Compute aerodynamic loads (switch) {0=None; 1=AeroDyn v14; 2=AeroDyn v15}
1 CompServo - Compute control and electrical-drive dynamics (switch) {0=None; 1=ServoDyn}
Expand Down
12 changes: 6 additions & 6 deletions Examples/Test_Cases/BAR_10/BAR_10_DISCON.IN
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
! Controller parameter input file for the BAR_10 wind turbine
! - File written using ROSCO version 2.8.0 controller tuning logic on 01/05/24
! - File written using ROSCO version 2.9.4 controller tuning logic on 07/01/24

!------- SIMULATION CONTROL ------------------------------------------------------------
1 ! LoggingLevel - {0: write no debug files, 1: write standard output .dbg-file, 2: LoggingLevel 1 + ROSCO LocalVars (.dbg2) 3: LoggingLevel 2 + complete avrSWAP-array (.dbg3)}
0 ! DT_Out - {Time step to output .dbg* files, or 0 to match sampling period of OpenFAST}
1 ! Ext_Interface - (0 - use standard bladed interface, 1 - Use the extened DLL interface introduced in OpenFAST 3.5.0.)
1 ! Ext_Interface - (0 - use standard bladed interface, 1 - Use the extened DLL interface introduced in OpenFAST 3.5.0.)
0 ! Echo - (0 - no Echo, 1 - Echo input data to <RootName>.echo)

!------- CONTROLLER FLAGS -------------------------------------------------
Expand Down Expand Up @@ -53,8 +53,8 @@
!------- BLADE PITCH CONTROL ----------------------------------------------
30 ! PC_GS_n - Amount of gain-scheduling table entries
0.057899 0.086034 0.108220 0.127602 0.145231 0.161628 0.177110 0.191882 0.205973 0.219605 0.232854 0.245775 0.258317 0.270576 0.282622 0.294421 0.305965 0.317359 0.328547 0.339534 0.350412 0.361066 0.371600 0.382012 0.392231 0.402383 0.412328 0.422200 0.431927 0.441532 ! PC_GS_angles - Gain-schedule table: pitch angles [rad].
-0.017460 -0.014512 -0.012235 -0.010423 -0.008947 -0.007722 -0.006689 -0.005805 -0.005042 -0.004374 -0.003787 -0.003265 -0.002799 -0.002380 -0.002002 -0.001658 -0.001344 -0.001057 -0.000793 -0.000549 -0.000324 -0.000115 0.000080 0.000261 0.000431 0.000590 0.000740 0.000880 0.001013 0.001138 ! PC_GS_KP - Gain-schedule table: pitch controller kp gains [s].
-0.000715 -0.000623 -0.000552 -0.000496 -0.000450 -0.000412 -0.000380 -0.000352 -0.000328 -0.000307 -0.000289 -0.000273 -0.000258 -0.000245 -0.000233 -0.000223 -0.000213 -0.000204 -0.000196 -0.000188 -0.000181 -0.000175 -0.000169 -0.000163 -0.000158 -0.000153 -0.000148 -0.000144 -0.000140 -0.000136 ! PC_GS_KI - Gain-schedule table: pitch controller ki gains [-].
-0.017426 -0.014498 -0.012232 -0.010428 -0.008956 -0.007733 -0.006701 -0.005818 -0.005054 -0.004387 -0.003799 -0.003276 -0.002810 -0.002390 -0.002011 -0.001666 -0.001352 -0.001064 -0.000799 -0.000554 -0.000328 -0.000118 0.000077 0.000259 0.000430 0.000589 0.000739 0.000881 0.001014 0.001139 ! PC_GS_KP - Gain-schedule table: pitch controller kp gains [s].
-0.000714 -0.000623 -0.000552 -0.000496 -0.000450 -0.000412 -0.000380 -0.000353 -0.000329 -0.000308 -0.000290 -0.000274 -0.000259 -0.000246 -0.000234 -0.000223 -0.000214 -0.000205 -0.000196 -0.000189 -0.000182 -0.000175 -0.000169 -0.000164 -0.000158 -0.000153 -0.000149 -0.000144 -0.000140 -0.000136 ! PC_GS_KI - Gain-schedule table: pitch controller ki gains [-].
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ! PC_GS_KD - Gain-schedule table: pitch controller kd gains
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ! PC_GS_TF - Gain-schedule table: pitch controller tf gains (derivative filter)
1.570000000000 ! PC_MaxPit - Maximum physical pitch limit, [rad].
Expand Down Expand Up @@ -86,7 +86,7 @@
63892.81326000 ! VS_RtTq - Rated torque, [Nm].
75.83317000000 ! VS_RefSpd - Rated generator speed [rad/s]
1 ! VS_n - Number of generator PI torque controller gains
-2452.07948000 ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)
-2454.67747000 ! VS_KP - Proportional gain for generator PI torque controller [-]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)
-332.357190000 ! VS_KI - Integral gain for generator PI torque controller [s]. (Only used in the transitional 2.5 region if VS_ControlMode =/ 2)
9.76 ! VS_TSRopt - Power-maximizing region 2 tip-speed-ratio. Only used in VS_ControlMode = 2.
0.314000000000 ! VS_PwrFiltF - Low pass filter on power used to determine generator speed set point. Only used in VS_ControlMode = 3.
Expand All @@ -113,7 +113,7 @@
36 26 ! PerfTableSize - Size of rotor performance tables, first number refers to number of blade pitch angles, second number referse to number of tip-speed ratios
60 ! WE_FOPoles_N - Number of first-order system poles used in EKF
3.0000 3.1818 3.3637 3.5455 3.7274 3.9092 4.0911 4.2729 4.4548 4.6366 4.8185 5.0003 5.1822 5.3640 5.5459 5.7277 5.9096 6.0914 6.2732 6.4551 6.6369 6.8188 7.0006 7.1825 7.3643 7.5462 7.7280 7.9099 8.0917 8.2736 8.8311 9.3887 9.9462 10.5038 11.0613 11.6188 12.1764 12.7339 13.2915 13.8490 14.4066 14.9641 15.5217 16.0792 16.6368 17.1943 17.7519 18.3094 18.8670 19.4245 19.9821 20.5396 21.0972 21.6547 22.2123 22.7698 23.3274 23.8849 24.4425 25.0000 ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]
-0.00972164 -0.01031092 -0.01090020 -0.01148948 -0.01207877 -0.01266805 -0.01325733 -0.01384662 -0.01443590 -0.01502518 -0.01561447 -0.01620375 -0.01679303 -0.01738232 -0.01797160 -0.01856088 -0.01915016 -0.01973945 -0.02032873 -0.02091801 -0.02150730 -0.02209658 -0.02268586 -0.02327515 -0.02386443 -0.02445371 -0.02504300 -0.02563228 -0.02622156 -0.02378670 -0.02062296 -0.02541485 -0.03159105 -0.03849962 -0.04595997 -0.05389417 -0.06225884 -0.07101431 -0.08016995 -0.08970426 -0.09955610 -0.10976762 -0.12028100 -0.13120419 -0.14238799 -0.15383228 -0.16572504 -0.17783697 -0.19011487 -0.20289651 -0.21593424 -0.22919262 -0.24255457 -0.25635133 -0.27049546 -0.28482651 -0.29923376 -0.31380076 -0.32862514 -0.34372726 ! WE_FOPoles - First order system poles [1/s]
-0.00969265 -0.01028018 -0.01086771 -0.01145523 -0.01204276 -0.01263029 -0.01321781 -0.01380534 -0.01439287 -0.01498039 -0.01556792 -0.01615544 -0.01674297 -0.01733050 -0.01791802 -0.01850555 -0.01909308 -0.01968060 -0.02026813 -0.02085566 -0.02144318 -0.02203071 -0.02261823 -0.02320576 -0.02379329 -0.02438081 -0.02496834 -0.02555587 -0.02614339 -0.02379613 -0.02047291 -0.02537932 -0.03151563 -0.03840840 -0.04587537 -0.05382394 -0.06221064 -0.07100937 -0.08011138 -0.08959645 -0.09946249 -0.10970584 -0.12021535 -0.13105665 -0.14226361 -0.15376640 -0.16552312 -0.17764204 -0.19004300 -0.20272586 -0.21577830 -0.22897091 -0.24242644 -0.25613739 -0.27000365 -0.28425482 -0.29866687 -0.31351260 -0.32866968 -0.34414305 ! WE_FOPoles - First order system poles [1/s]

!------- YAW CONTROL ------------------------------------------------------
0.00000 ! Y_uSwitch - Wind speed to switch between Y_ErrThresh. If zero, only the second value of Y_ErrThresh is used [m/s]
Expand Down
Loading

0 comments on commit 1e0e78b

Please sign in to comment.