Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6600779
Clean up examples to clarify inputs/outputs
dzalkind Nov 21, 2025
6ba35e9
Change default ss_pcgain
dzalkind Nov 21, 2025
8cc176e
Add tuning input to change setpoint separation when tuning
dzalkind Nov 21, 2025
e9a45b6
Fix directories in ex 06
dzalkind Nov 24, 2025
937e799
Bug fix: Use LSS speed throughout TRA subroutine
dzalkind Nov 25, 2025
9174ba3
Add setpoint separation to DISCON_dict
dzalkind Nov 25, 2025
ea86add
Test build on macos-latest and not 13, those runners being depreciated
dzalkind Nov 25, 2025
54995e4
Clarify DISCON description for SD_TimeActivate
dzalkind Nov 25, 2025
a17a529
Remove macos-13 from publish CI
dzalkind Nov 25, 2025
a3c1583
Tidy example 02
dzalkind Nov 25, 2025
2b8d134
Increment version
dzalkind Nov 25, 2025
b20ffd8
Update discons
dzalkind Nov 26, 2025
34212e0
Add script for creating windio input yamls
dzalkind Dec 31, 2025
0f159ae
Create rosco vt from windio and functionize
dzalkind Dec 31, 2025
061dda0
Add windio schema conversion to own file
dzalkind Feb 3, 2026
a9fd789
Make example self-contained in ROSCO
dzalkind Feb 3, 2026
2eaaf3a
Merge branch 'develop' into windio_support
dzalkind Feb 4, 2026
974290e
Update inputs for openfast 4.2.0 (#491)
dzalkind Feb 4, 2026
2cd4d7d
Merge remote-tracking branch 'origin/main' into develop
dzalkind Feb 4, 2026
5c41edf
Merge branch 'develop' into windio_support
dzalkind Feb 4, 2026
3b29262
Pull windIO yamls from their repos for example
dzalkind Feb 9, 2026
cac2923
Revert to windIO versions because they have the updated control inputs
dzalkind Feb 9, 2026
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
75 changes: 75 additions & 0 deletions Examples/34_discon_windio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
"""
34_discon_windio
----------------

Convert between a DISCON.IN file and a windIO turbine control schema YAML file.

Convert from a windIO turbine control schema yaml to a rosco tuning yaml and a DISCON.IN file

Check against the original DISCON.IN file

"""
import os
import numpy as np
from rosco.toolbox.utilities import read_DISCON
from rosco.toolbox.inputs.windio import windio_to_discon, discon_to_windio
from wisdem.inputs.validation import simple_types
import windIO


def main():
examples_dir = os.path.dirname(os.path.abspath(__file__))

# Within ROSCO repo
discon_yaml_map = {
os.path.join(examples_dir,'Test_Cases','IEA-15-240-RWT', 'IEA-15-240-RWT-UMaineSemi', 'IEA-15-240-RWT-UMaineSemi_DISCON.IN'): os.path.join(examples_dir,'example_inputs', 'windio', 'IEA-15-240-RWT.yaml'),
os.path.join(examples_dir,'Test_Cases','IEA-15-240-RWT', 'IEA-15-240-RWT-Monopile', 'IEA-15-240-RWT-Monopile_DISCON.IN'): os.path.join(examples_dir,'example_inputs', 'windio', 'IEA-15-240-RWT.yaml'),
}

# # For updating windIO repo
# discon_yaml_map = {
# 'IEA-15_Repo_Dir/OpenFAST/IEA-15-240-RWT-UMaineSemi/IEA-15-240-RWT-UMaineSemi_DISCON.IN':'windio_repo_dir/windIO/examples/turbine/IEA-15-240-RWT_VolturnUS-S.yaml',
# 'IEA-15_Repo_Dir/OpenFAST/IEA-15-240-RWT-Monopile/IEA-15-240-RWT-Monopile_DISCON.IN': 'windio_repo_dir/windIO/examples/turbine/IEA-15-240-RWT.yaml',
# 'IEA-22_Repo_Dir/OpenFAST/IEA-22-280-RWT-Semi/IEA-22-280-RWT-Semi_DISCON.IN': 'windio_repo_dir/windIO/examples/turbine/IEA-22-280-RWT_Floater.yaml',
# 'IEA-22_Repo_Dir/OpenFAST/IEA-22-280-RWT-Monopile/IEA-22-280-RWT_DISCON.IN': 'windio_repo_dir/windIO/examples/turbine/IEA-22-280-RWT.yaml'
# }

for discon_in_file, windio_yaml in discon_yaml_map.items():

# Read DISCON.IN file
rosco_vt = read_DISCON(discon_in_file)

# Convert to windIO control dictionary
windio_control = discon_to_windio(rosco_vt)

# Update windio YAML file
windio_control = simple_types(windio_control)
windio_dict = windIO.load_yaml(windio_yaml)
windio_dict['control'] = windio_control

windIO.yaml.write_yaml(windio_dict, windio_yaml)

# Do the opposite of the above and convert a windio yaml to a DISCON.IN file
windio_loaded = windIO.load_yaml(windio_yaml)
rosco_vt_from_windio = windio_to_discon(windio_loaded)


# Compare with original DISCON values
print(f"Comparing values for {discon_in_file}:")
error = False
for key in rosco_vt_from_windio.keys():
if key in rosco_vt:
try:
np.testing.assert_allclose(rosco_vt[key], rosco_vt_from_windio[key], atol = 1e-3)
except AssertionError:
error = True
print(f"{key}: Original={rosco_vt[key]}, Converted={rosco_vt_from_windio[key]}")

if error:
raise ValueError("Discrepancies found between original DISCON values and those converted from windIO YAML.")




if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions Examples/Test_Cases/BAR_10/BAR_10_ElastoDyn.dat
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ False PtfmYDOF - Platform yaw rotation DOF (flag)
0.0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
119991.18553379682 HubMass - Hub mass (kg)
894745.0292084403 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
0 HubIner_Teeter - Hub inertia about teeter axis (2-blades) (kg m^2)
590.965098296 GenIner - Generator inertia about HSS (kg m^2)
401378.6972054646 NacMass - Nacelle mass (kg)
3185495.2912376686 NacYIner - Nacelle inertia about yaw axis (kg m^2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
0.0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
69131 HubMass - Hub mass (kg)
969952 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
0 HubIner_Teeter - Hub inertia about teeter axis (2-blades) (kg m^2)
1836784 GenIner - Generator inertia about HSS (kg m^2)
644857 NacMass - Nacelle mass (kg)
32929058 NacYIner - Nacelle inertia about yaw axis (kg m^2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
69131 HubMass - Hub mass (kg)
969952 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
0 HubIner_Teeter - Hub inertia about teeter axis (2-blades) (kg m^2)
1836784 GenIner - Generator inertia about HSS (kg m^2)
644857 NacMass - Nacelle mass (kg)
32929058 NacYIner - Nacelle inertia about yaw axis (kg m^2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,22 @@ False OutAll - Output all user-specified member and joint loa
"ES11.4e2" OutFmt - Output format for numerical results (quoted string) [not checked for validity!]
"A11" OutSFmt - Output format for header strings (quoted string) [not checked for validity!]
---------------------- OUTPUT CHANNELS -----------------------------------------
"B1WvsFxi"
"B1WvsFyi"
"B1WvsFzi"
"B1WvsMxi"
"B1WvsMyi"
"B1WvsMzi"
"B1WvsF1xi"
"B1WvsF1yi"
"B1WvsF1zi"
"B1WvsM1xi"
"B1WvsM1yi"
"B1WvsM1zi"
"B1WvsF2xi"
"B1WvsF2yi"
"B1WvsF2zi"
"B1WvsM2xi"
"B1WvsM2yi"
"B1WvsM2zi"
END of output channels and end of file. (the word "END" must appear in the first 3 columns of this line)
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,4 @@ False SeaStSum - Output a summary file [flag]
-10, -15 WaveKinzi - List of zi-coordinates for points where the wave kinematics can be output (meters) [NWaveKin points, separated by commas or white space; usused if NWaveKin = 0]
---------------------- OUTPUT CHANNELS -----------------------------------------
"Wave1Elev" - Wave elevation at the platform reference point ( 0, 0)
"WavesF1xi"
"WavesF1zi"
"WavesM1yi"
"WavesF2xi"
"WavesF2zi"
"WavesM2yi"
"WavesF2xi"
"WavesF2yi"
"WavesF2zi"
"WavesM2xi"
"WavesM2yi"
"WavesM2zi"
END of output channels and end of file. (the word "END" must appear in the first 3 columns of this line)
1 change: 1 addition & 0 deletions Examples/Test_Cases/MHK_RM1/MHK_RM1_Floating_ElastoDyn.dat
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
140 HubMass - Hub mass (kg)
79.6 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
0 HubIner_Teeter - Hub inertia about teeter axis (2-blades) (kg m^2)
139.50 GenIner - Generator inertia about HSS (kg m^2)
40100 NacMass - Nacelle mass (kg)
244643 NacYIner - Nacelle inertia about yaw axis (kg m^2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ False PtfmYDOF - Platform yaw rotation DOF (flag)
0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
56780 HubMass - Hub mass (kg)
115926 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
0 HubIner_Teeter - Hub inertia about teeter axis (2-blades) (kg m^2)
534.116 GenIner - Generator inertia about HSS (kg m^2)
240000 NacMass - Nacelle mass (kg)
2.60789E+06 NacYIner - Nacelle inertia about yaw axis (kg m^2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ False PtfmYDOF - Platform yaw rotation DOF (flag)
0.0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
7482.264184443234 HubMass - Hub mass (kg)
28639.287453422658 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
0 HubIner_Teeter - Hub inertia about teeter axis (2-blades) (kg m^2)
4940.938090969189 GenIner - Generator inertia about HSS (kg m^2)
113487.2812241146 NacMass - Nacelle mass (kg)
693579.6265889656 NacYIner - Nacelle inertia about yaw axis (kg m^2)
Expand Down
31 changes: 29 additions & 2 deletions Examples/Test_Cases/updateFromTask37.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ temp_dir=$(mktemp -d)
echo "Created temporary directory: $temp_dir"

# Clone the repository
git clone -b develop https://github.com/IEAWindTask37/IEA-15-240-RWT "$temp_dir"
git clone -b develop https://github.com/IEAWindSystems/IEA-15-240-RWT.git "$temp_dir"

# Check if clone was successful
if [ $? -ne 0 ]; then
Expand All @@ -23,7 +23,34 @@ mkdir -p IEA-15-240-RWT
# Copy OpenFAST directory contents
cp -r "$temp_dir/OpenFAST/"* IEA-15-240-RWT/

# Copy windIO inputs
cp -r "$temp_dir/WT_Ontology/"* ../example_inputs/windio/

# Clean up temporary directory
rm -rf "$temp_dir"

echo "Files copied successfully to IEA-15-240-RWT directory"

# Now do the same for the IEA-22 windIO files

# Create a temporary directory for cloning
temp_dir=$(mktemp -d)
echo "Created temporary directory: $temp_dir"

# Clone the repository
git clone -b main https://github.com/IEAWindSystems/IEA-22-280-RWT.git "$temp_dir"

# Check if clone was successful
if [ $? -ne 0 ]; then
echo "Failed to clone repository"
rm -rf "$temp_dir"
exit 1
fi

# Copy windIO inputs
cp -r "$temp_dir/windIO/"* ../example_inputs/windio/

# Clean up temporary directory
rm -rf "$temp_dir"

echo "Files copied successfully to IEA-15-240-RWT directory"
echo "Files copied successfully from IEA-22-280-RWT repo"
Loading
Loading