Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/CI_RAFT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
fail-fast: false #true
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.11", "3.12"]
python-version: ["3.11", "3.12", "3.13"]


steps:
- name: checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- uses: conda-incubator/setup-miniconda@v3
# https://github.com/marketplace/actions/setup-miniconda
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Publish_RAFT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
id: cp
with:
python-version: "3.11"
python-version: "3.12"
update-environment: true

- name: Install pypa/build
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "OpenRAFT"
version = "2.0.0"
version = "2.0.1"
description = "RAFT: Response Amplitudes of Floating Turbines"
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -40,6 +40,8 @@ classifiers = [ # Optional
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",

"Operating System :: OS Independent",
Expand Down
20 changes: 9 additions & 11 deletions raft/omdao_raft.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def setup(self):
n_span = turbine_opt['n_span']
n_aoa = turbine_opt['n_aoa']
n_Re = turbine_opt['n_Re']
n_tab = turbine_opt['n_tab']
n_pc = turbine_opt['n_pc']
n_af = turbine_opt['n_af']
af_used_names = turbine_opt['af_used_names']
Expand Down Expand Up @@ -128,13 +127,12 @@ def setup(self):
self.add_input('blade_presweep', val=np.zeros(n_span), units='m', desc='location of blade pitch axis in y-direction of :ref:`blade coordinate system <azimuth_blade_coord>`')
self.add_input('blade_presweepTip', val=0.0, units='m', desc='location of blade pitch axis in y-direction at the tip (analogous to Rtip)')
# Airfoils
self.add_discrete_input("airfoils_name", val=n_af * [""], desc="1D array of names of airfoils.")
self.add_input("airfoils_position", val=np.zeros(n_af_span), desc="1D array of the non dimensional positions of the airfoils af_used defined along blade span.")
self.add_input("airfoils_r_thick", val=np.zeros(n_af), desc="1D array of the relative thicknesses of each airfoil.")
self.add_input("airfoils_aoa", val=np.zeros(n_aoa), units="rad", desc="1D array of the angles of attack used to define the polars of the airfoils. All airfoils defined in openmdao share this grid.")
self.add_input("airfoils_cl", val=np.zeros((n_af, n_aoa, n_Re, n_tab)), desc="4D array with the lift coefficients of the airfoils. Dimension 0 is along the different airfoils defined in the yaml, dimension 1 is along the angles of attack, dimension 2 is along the Reynolds number, dimension 3 is along the number of tabs, which may describe multiple sets at the same station, for example in presence of a flap.")
self.add_input("airfoils_cd", val=np.zeros((n_af, n_aoa, n_Re, n_tab)), desc="4D array with the drag coefficients of the airfoils. Dimension 0 is along the different airfoils defined in the yaml, dimension 1 is along the angles of attack, dimension 2 is along the Reynolds number, dimension 3 is along the number of tabs, which may describe multiple sets at the same station, for example in presence of a flap.")
self.add_input("airfoils_cm", val=np.zeros((n_af, n_aoa, n_Re, n_tab)), desc="4D array with the moment coefficients of the airfoils. Dimension 0 is along the different airfoils defined in the yaml, dimension 1 is along the angles of attack, dimension 2 is along the Reynolds number, dimension 3 is along the number of tabs, which may describe multiple sets at the same station, for example in presence of a flap.")
self.add_input("airfoils_aoa", val=np.zeros(n_aoa), units="deg", desc="1D array of the angles of attack used to define the polars of the airfoils. All airfoils defined in openmdao share this grid.")
self.add_input("airfoils_cl", val=np.zeros((n_af, n_aoa, n_Re)), desc="4D array with the lift coefficients of the airfoils. Dimension 0 is along the different airfoils defined in the yaml, dimension 1 is along the angles of attack, dimension 2 is along the Reynolds number, dimension 3 is along the number of tabs, which may describe multiple sets at the same station, for example in presence of a flap.")
self.add_input("airfoils_cd", val=np.zeros((n_af, n_aoa, n_Re)), desc="4D array with the drag coefficients of the airfoils. Dimension 0 is along the different airfoils defined in the yaml, dimension 1 is along the angles of attack, dimension 2 is along the Reynolds number, dimension 3 is along the number of tabs, which may describe multiple sets at the same station, for example in presence of a flap.")
self.add_input("airfoils_cm", val=np.zeros((n_af, n_aoa, n_Re)), desc="4D array with the moment coefficients of the airfoils. Dimension 0 is along the different airfoils defined in the yaml, dimension 1 is along the angles of attack, dimension 2 is along the Reynolds number, dimension 3 is along the number of tabs, which may describe multiple sets at the same station, for example in presence of a flap.")
self.add_input("rotor_powercurve_v", val=np.zeros(n_pc), units="m/s", desc="wind vector")
self.add_input("rotor_powercurve_omega_rpm", val=np.zeros(n_pc), units="rpm", desc="rotor rotational speed")
self.add_input("rotor_powercurve_pitch", val=np.zeros(n_pc), units="deg", desc="rotor pitch schedule")
Expand Down Expand Up @@ -484,12 +482,12 @@ def compute(self, inputs, outputs, discrete_inputs, discrete_outputs):
n_af = turbine_opt['n_af']
design['turbine']['airfoils'] = [dict() for m in range(n_af)] #Note: doesn't work [{}]*n_af
for i in range(n_af):
design['turbine']['airfoils'][i]['name'] = discrete_inputs['airfoils_name'][i]
design['turbine']['airfoils'][i]['name'] = turbine_opt['af_used_names'][i]
design['turbine']['airfoils'][i]['relative_thickness'] = float(inputs['airfoils_r_thick'][i])
design['turbine']['airfoils'][i]['data'] = np.c_[inputs['airfoils_aoa'] * raft.helpers.rad2deg(1),
inputs['airfoils_cl'][i,:,0,0],
inputs['airfoils_cd'][i,:,0,0],
inputs['airfoils_cm'][i,:,0,0]]
design['turbine']['airfoils'][i]['data'] = np.c_[inputs['airfoils_aoa'],
inputs['airfoils_cl'][i,:,0],
inputs['airfoils_cd'][i,:,0],
inputs['airfoils_cm'][i,:,0]]

# Control
design['turbine']['pitch_control'] = {}
Expand Down
Loading
Loading