Skip to content

Commit

Permalink
Fix relative Cp filepaths
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Jul 24, 2023
1 parent 20cfdf8 commit 1be1d92
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion ROSCO_toolbox/ofTools/fast_io/update_discons.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ def update_discons(tune_to_test_map):
if not isinstance(tune_to_test_map[tuning_yaml],list):
tune_to_test_map[tuning_yaml] = [tune_to_test_map[tuning_yaml]]

# Handle relative directory to Cp file
yaml_dir = os.path.dirname(tuning_yaml)
cp_filename = os.path.relpath(
os.path.join(yaml_dir,path_params['rotor_performance_filename']),
os.path.join(yaml_dir,path_params['FAST_directory']))

discon_in_files = [f for f in tune_to_test_map[tuning_yaml]]
for discon in discon_in_files:
write_DISCON(
turbine,controller,
param_file=discon,
txt_filename=path_params['rotor_performance_filename']
txt_filename=cp_filename
)
2 changes: 1 addition & 1 deletion Test_Cases/BAR_10/BAR_10_DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
96.8 ! WE_GearboxRatio - Gearbox ratio [>=1], [-]
311169343.31448 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS, [kg m^2]
1.225 ! WE_RhoAir - Air density, [kg m^-3]
"../Test_Cases/BAR_10/Cp_Ct_Cq.BAR_10.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
"Cp_Ct_Cq.BAR_10.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
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]
Expand Down
2 changes: 1 addition & 1 deletion Test_Cases/IEA-15-240-RWT-UMaineSemi/DISCON-UMaineSemi.IN
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
1.0 ! WE_GearboxRatio - Gearbox ratio [>=1], [-]
318628138.00000 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS, [kg m^2]
1.225 ! WE_RhoAir - Air density, [kg m^-3]
"../Test_Cases/IEA-15-240-RWT-UMaineSemi/Cp_Ct_Cq.IEA15MW.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
"Cp_Ct_Cq.IEA15MW.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
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.2669 3.5338 3.8007 4.0676 4.3345 4.6014 4.8683 5.1352 5.4021 5.6690 5.9359 6.2028 6.4697 6.7366 7.0034 7.2703 7.5372 7.8041 8.0710 8.3379 8.6048 8.8717 9.1386 9.4055 9.6724 9.9393 10.2062 10.4731 10.7400 11.2153 11.6907 12.1660 12.6413 13.1167 13.5920 14.0673 14.5427 15.0180 15.4933 15.9687 16.4440 16.9193 17.3947 17.8700 18.3453 18.8207 19.2960 19.7713 20.2467 20.7220 21.1973 21.6727 22.1480 22.6233 23.0987 23.5740 24.0493 24.5247 25.0000 ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]
Expand Down
2 changes: 1 addition & 1 deletion Test_Cases/NREL-5MW/DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
97.0 ! WE_GearboxRatio - Gearbox ratio [>=1], [-]
43702538.05700 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS, [kg m^2]
1.225 ! WE_RhoAir - Air density, [kg m^-3]
"../Test_Cases/NREL-5MW/Cp_Ct_Cq.NREL5MW.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
"Cp_Ct_Cq.NREL5MW.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
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.2897 3.5793 3.8690 4.1586 4.4483 4.7379 5.0276 5.3172 5.6069 5.8966 6.1862 6.4759 6.7655 7.0552 7.3448 7.6345 7.9241 8.2138 8.5034 8.7931 9.0828 9.3724 9.6621 9.9517 10.2414 10.5310 10.8207 11.1103 11.4000 11.8533 12.3067 12.7600 13.2133 13.6667 14.1200 14.5733 15.0267 15.4800 15.9333 16.3867 16.8400 17.2933 17.7467 18.2000 18.6533 19.1067 19.5600 20.0133 20.4667 20.9200 21.3733 21.8267 22.2800 22.7333 23.1867 23.6400 24.0933 24.5467 25.0000 ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]
Expand Down
2 changes: 1 addition & 1 deletion Test_Cases/NREL_2p8_127/NREL-2p8-127_DISCON.IN
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
97.0 ! WE_GearboxRatio - Gearbox ratio [>=1], [-]
66347470.49793 ! WE_Jtot - Total drivetrain inertia, including blades, hub and casted generator inertia to LSS, [kg m^2]
1.225 ! WE_RhoAir - Air density, [kg m^-3]
"../Test_Cases/NREL_2p8_127/NREL-2p8-127_Cp_Ct_Cq.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
"NREL-2p8-127_Cp_Ct_Cq.txt" ! PerfFileName - File containing rotor performance tables (Cp,Ct,Cq) (absolute path or relative to this file)
30 30 ! 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.2897 3.5793 3.8690 4.1586 4.4483 4.7379 5.0276 5.3172 5.6069 5.8966 6.1862 6.4759 6.7655 7.0552 7.3448 7.6345 7.9241 8.2138 8.5034 8.7931 9.0828 9.3724 9.6621 9.9517 10.2414 10.5310 10.8207 11.1103 11.4000 11.8533 12.3067 12.7600 13.2133 13.6667 14.1200 14.5733 15.0267 15.4800 15.9333 16.3867 16.8400 17.2933 17.7467 18.2000 18.6533 19.1067 19.5600 20.0133 20.4667 20.9200 21.3733 21.8267 22.2800 22.7333 23.1867 23.6400 24.0933 24.5467 25.0000 ! WE_FOPoles_v - Wind speeds corresponding to first-order system poles [m/s]
Expand Down

0 comments on commit 1be1d92

Please sign in to comment.