Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Open Loop Control Error Catching #273

Merged
merged 249 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
aa888a1
FOCAL Updates (#64)
dzalkind Nov 19, 2021
6f16a9d
update listcheck method for numpy arrays
nikhar-abbas Dec 7, 2021
f57ee45
Merge pull request #97 from nikhar-abbas/b/listcheck
nikhar-abbas Dec 8, 2021
50f686d
Open Loop Control (#98)
dzalkind Dec 14, 2021
337ecf6
Convert WE saved variables to WE type
nikhar-abbas Dec 17, 2021
ab46545
Put restart flag in localvars
nikhar-abbas Dec 17, 2021
9d67547
Use saved filter params from LocalVar
nikhar-abbas Dec 17, 2021
ed81a23
save pitcomt last
nikhar-abbas Dec 17, 2021
3bbaf86
Move IPC saved variables to localvars
nikhar-abbas Dec 17, 2021
30e98d6
Saved pi controller variables to localvar
nikhar-abbas Dec 17, 2021
38dff08
Save RootMyb_Last to localvar
nikhar-abbas Dec 17, 2021
fc1c9ec
ROSCO_IO - initial commit. Include restart and debug functions
nikhar-abbas Dec 17, 2021
2025565
Use ROSCO IO and call restart functions
nikhar-abbas Dec 17, 2021
915922a
Remove debug from function.f90
nikhar-abbas Dec 17, 2021
6800344
Save ACC Infile info
nikhar-abbas Dec 17, 2021
92e27bb
update for restart capabilities
nikhar-abbas Dec 17, 2021
3ff3800
add rosco_io with restart and debug functions
nikhar-abbas Dec 21, 2021
15eb73d
cleanup debug call
nikhar-abbas Dec 21, 2021
5e2eb07
use registry generate types and IO
nikhar-abbas Dec 21, 2021
24fa6b7
delete DFController
nikhar-abbas Dec 21, 2021
9149b12
fix timestep mismatch
nikhar-abbas Dec 21, 2021
3c9c89d
remove unnecessaray istatus check
nikhar-abbas Dec 21, 2021
492348c
close files
nikhar-abbas Dec 21, 2021
7897a83
add reg test for restart
nikhar-abbas Dec 21, 2021
969beb6
add restart option to run_openfast
nikhar-abbas Dec 21, 2021
ace827d
add testing to CI, ignore generate files
nikhar-abbas Dec 21, 2021
1347767
fix fastcall
nikhar-abbas Dec 21, 2021
67ada29
remove extra commas
nikhar-abbas Dec 21, 2021
4c31544
specify gfortran-10
nikhar-abbas Dec 21, 2021
6f29556
testing flag cleanup
nikhar-abbas Dec 21, 2021
3e43206
Use lv_strings to generate debug output
dzalkind Dec 21, 2021
b1607e0
Revert "testing flag cleanup"
nikhar-abbas Dec 21, 2021
24e5daf
Revert "specify gfortran-10"
nikhar-abbas Dec 21, 2021
76caca3
minor cleanup
nikhar-abbas Dec 21, 2021
4b6041a
Use kind from constants
nikhar-abbas Dec 22, 2021
878b143
Add some comments for clarity
nikhar-abbas Dec 22, 2021
59519a1
put debug in if statements
nikhar-abbas Dec 22, 2021
8749713
separate reg tests from oother tests
nikhar-abbas Dec 22, 2021
b5ac62d
Fl_Mode>0
nikhar-abbas Dec 22, 2021
3fdbdad
Remove hard coded values
nikhar-abbas Dec 22, 2021
52492d3
Add filtered signals and WE_Vw to debug varrs
nikhar-abbas Dec 22, 2021
7cb1151
cd for regtest
nikhar-abbas Dec 22, 2021
a2d6de4
Check logging level before calling debug
nikhar-abbas Dec 22, 2021
2ab7de6
add fl_pitcom and pc_minpit to debugvars
nikhar-abbas Dec 22, 2021
1f68bd5
Turn runFAST into a class
dzalkind Dec 22, 2021
1b0b1c3
Refactor/simplify CaseLibrary
dzalkind Dec 22, 2021
6c1e4db
Restart & registry (#99)
nikhar-abbas Jan 3, 2022
7fec13b
Implement initial pitch actuator
dzalkind Jan 5, 2022
a034086
Set up steps case
dzalkind Jan 5, 2022
93dceb7
Break up if statement in open loop pitch (#100)
dzalkind Jan 5, 2022
5d5a9ba
add bld edgewise freq to robust dict_inputs
nikhar-abbas Jan 6, 2022
aad7396
Merge pull request #103 from nikhar-abbas/hf/robust
nikhar-abbas Jan 6, 2022
3d696e6
Add actuator variable
dzalkind Jan 7, 2022
7042b49
Print first time step in debug outs
dzalkind Jan 7, 2022
8c7949e
Fix FOCAL yaml
dzalkind Jan 7, 2022
1a0e59a
Set actuator to 0.25 Hz bandwidth
dzalkind Jan 7, 2022
41e0dc6
Fix ccrotor inputs (#104)
nikhar-abbas Jan 14, 2022
a857211
Allow default inputs (#110)
dzalkind Feb 25, 2022
9b5499d
ipc (#105)
nikhar-abbas Mar 18, 2022
5f18bf8
Increment version number
dzalkind Mar 21, 2022
8c31287
Bladed docs (#116)
dzalkind Mar 21, 2022
d7d15b0
Update version in API change docs
dzalkind Mar 22, 2022
4126adb
Bladed readthedocs (#117)
dzalkind Mar 22, 2022
e9c9378
Merge remote-tracking branch 'upstream/develop' into develop
dzalkind Mar 22, 2022
d520192
Update docs to reflect CI process
dzalkind Mar 30, 2022
f53a49e
Merge remote-tracking branch 'upstream/main' into develop
dzalkind Apr 7, 2022
31d7250
Merge branch 'develop' into f/pitch_act
dzalkind Apr 7, 2022
eab381a
Regenerate types, IO with registry
dzalkind Apr 7, 2022
ad36ab9
Update registry so first timestep is printed
dzalkind Apr 7, 2022
d15bc7c
Update inverted notch to move frequency properly
dzalkind Apr 8, 2022
5a9b44d
Saturate inv notch corner frequency at 0
dzalkind Apr 8, 2022
a898f9d
Add tower damper mode flag
dzalkind Apr 14, 2022
c965339
Add Azimuth tracking controller in Simulink
dzalkind Apr 22, 2022
bdbc940
Always enable GenDOF, add options for simp_step
dzalkind Apr 22, 2022
6bb9c6b
Add sweep for IPC gains and FA damper
dzalkind Apr 22, 2022
c2ec84d
Fix NumCoords in FAST_writer
dzalkind Apr 22, 2022
bd0562c
sigma + ipc (#125)
nikhar-abbas Apr 25, 2022
97aae35
Add turbulent case to runFAST/CaseLibrary
dzalkind Apr 25, 2022
899750a
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind Apr 25, 2022
2ab0190
Add peak shaving sweep function
dzalkind Apr 26, 2022
e33631d
Increase default IPC_IntSat, make input parameter in future
dzalkind Apr 26, 2022
1b00cca
Flip Ct and Cq table allocation
dzalkind Apr 26, 2022
e035a7d
Flip Ct and Cq table allocation (#130)
dzalkind Apr 27, 2022
3f059d1
Merge remote-tracking branch 'origin/develop' into f/pitch_act
dzalkind Apr 27, 2022
379b6d2
Regen types
dzalkind Apr 27, 2022
747fcaa
Remove print statements used for debugging
dzalkind Apr 27, 2022
bba2816
Update input files: IEA model has pitch actuator
dzalkind Apr 27, 2022
5db820e
Merge branch 'develop' into f/pitch_act
dzalkind Apr 29, 2022
5612797
Merge remote-tracking branch 'origin/f/pitch_act' into f/pitch_act
dzalkind Apr 29, 2022
f6643b9
Add back flap control (no idea when it was deleted)
dzalkind Apr 29, 2022
7051a99
Update discons, docs with API change
dzalkind Apr 29, 2022
0eff188
Merge branch 'f/pitch_act' into raaw
dzalkind May 2, 2022
1ff7c11
Add user-defined hh case
dzalkind May 3, 2022
d8724f4
Fix AddF0 and RayleighDamp in FAST_reader
dzalkind May 4, 2022
5cdb0b5
Pitch Actuator and IPC updates (#123)
dzalkind May 6, 2022
155c132
Merge remote-tracking branch 'upstream/main' into raaw
dzalkind May 10, 2022
fc44a4a
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind May 10, 2022
f4094ea
Add max_torque_factor for constant power control, flexible upper limit
dzalkind May 11, 2022
f8c1dbe
Make update discons relative to tuning yaml
dzalkind May 11, 2022
97e2fe7
Update AddF0 and NumCoords in FAST_reader/writer
dzalkind May 11, 2022
e2bca61
Remove matlab/rotor position control stuff
dzalkind May 13, 2022
50a2f90
Add OpenFAST channels that Simulink reads (#135)
dzalkind May 20, 2022
3b97e4c
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind May 20, 2022
75e7fb8
RAAW Updates (#133)
dzalkind May 20, 2022
0bf504e
Pass through (#136)
dzalkind May 20, 2022
ffe5082
Add ExtControl manually from f/ext_control, compiling
dzalkind May 24, 2022
a832a0a
Fix c_float type in registry, building
dzalkind May 27, 2022
f88c1c5
Update DISCON writer, fix reader
dzalkind May 27, 2022
098227c
Add example for running Ext control, running
dzalkind May 27, 2022
d73b6d5
Max example actually call extdll, update inputs, running
dzalkind May 27, 2022
b44f131
Add ExtControl module!
dzalkind Jun 1, 2022
95f125a
Add ROSCO_Helpers, GetNewUnit, shorten ReadSetParameters, Functions
dzalkind Jun 1, 2022
ec6ec75
Update write_registry with GetNewUnit
dzalkind Jun 1, 2022
7898fba
Merge remote-tracking branch 'origin/develop' into rotor_position_sim
dzalkind Jun 2, 2022
f57f4a9
Merge remote-tracking branch 'dz/ext_interface2' into rotor_position_sim
dzalkind Jun 2, 2022
0917bcb
Add open loop IPC
dzalkind Jun 2, 2022
9ca75e1
Robust control updates (#139)
nikhar-abbas Jun 3, 2022
3ee9d35
Pass case_inputs and rosco_dll to runFAST object
dzalkind Jun 6, 2022
364588c
Set default T_max in power_curve case
dzalkind Jun 6, 2022
9abee3f
Add rotor position control example
dzalkind Jun 6, 2022
181d024
Add inputs for Azimuth index and rotor pos gains
dzalkind Jun 6, 2022
bc908f6
Set up OL IPC example, working, refactor OL setup in RT
dzalkind Jun 7, 2022
b45fb43
External Control Interface (#141)
dzalkind Jun 13, 2022
40a4edc
F/zmq (#145)
nikhar-abbas Jun 28, 2022
5988841
Tidy up OL_Mode
dzalkind Jun 28, 2022
53517c3
Add unwrap function, working on OL target
dzalkind Jun 28, 2022
0fa487a
Set azimuth ol_timeseries in radians
dzalkind Jun 28, 2022
84d0cc2
Move example number
dzalkind Jun 28, 2022
cbb0b3a
Merge remote-tracking branch 'origin/develop' into rotor_position_sim
dzalkind Jun 28, 2022
3f82024
Add default Ind_Azimuth, regen DISCONs
dzalkind Jun 28, 2022
7bb226a
Tidy merge, building
dzalkind Jun 28, 2022
df45ffd
Calculate azimuth error
dzalkind Jun 29, 2022
9dbe0c9
Make PID control, building
dzalkind Jun 29, 2022
0f77676
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind Oct 5, 2022
e67ca0d
Add collective blade pitch signal for WSE, shutdown
dzalkind Oct 6, 2022
5622fd3
Clean up merge: two sigma functions, finish adding collective BP
dzalkind Oct 6, 2022
74c392c
Use IPC always in IEA-15MW case
dzalkind Oct 6, 2022
da6ecec
Add IPC_SatMode input
dzalkind Jul 14, 2022
44d2a83
Force IPC_SatMode to be an int in writer
dzalkind Jul 15, 2022
d96a96b
Fix IPC_SatMode cherry pick
dzalkind Oct 6, 2022
6593f41
Fix IPC_SatMode/IntSat description, update DISCONs
dzalkind Oct 6, 2022
a2e4619
Add new IPC_SatModes
dzalkind Oct 6, 2022
feb7b2b
Merge remote-tracking branch 'upstream/raaw' into raaw
dzalkind Oct 6, 2022
fdd6ec1
Fix ******s in dbg files
dzalkind Oct 7, 2022
a7f9770
Move example 18 to 19 (rotor position control)
dzalkind Oct 10, 2022
085eec1
Merge branch 'raaw' into rotor_position_sim
dzalkind Oct 10, 2022
858d7e0
Tidy up types, regen Types, IO, DISCONs
dzalkind Oct 10, 2022
2799af1
Make openfast_exe an attribute
dzalkind Sep 29, 2022
f54f288
Update and run example_19
dzalkind Oct 10, 2022
da1e68a
Set up PID control for GenTqAz, working in steady
dzalkind Oct 12, 2022
061619a
Set up turbulence example
dzalkind Oct 13, 2022
b1f761c
Rate limit blade pitch on first time step
dzalkind Oct 14, 2022
2d97404
Initialize AzBuffer
dzalkind Oct 19, 2022
769a143
Fix open loop IPC
dzalkind Oct 19, 2022
6ab46ee
Add SCADA to example_19, needs tuning
dzalkind Oct 19, 2022
754a34c
Merge branch 'raaw' into rotor_position_sim
dzalkind Oct 19, 2022
5027d3e
Fix PID, tune gains for RAAW, working
dzalkind Oct 7, 2022
011d956
Sync OF tools with WEIS
dzalkind Dec 16, 2022
8930462
Add DT_Out to ROSCO to downsample debug files
dzalkind Dec 16, 2022
7e5d20f
Update user defined controller parameters deep in control_param dict
dzalkind Dec 22, 2022
0b959e1
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind Jan 18, 2023
e0143a8
Update discons, registry
dzalkind Jan 18, 2023
d6ce5d5
Move BlPitchC -> BlPitchCMeas(ured)
dzalkind Jan 18, 2023
3d97084
Update registry description
dzalkind Jan 23, 2023
e2438e9
Remove old update_discons
dzalkind Jan 23, 2023
516d16a
Merge remote-tracking branch 'upstream/develop' into raaw
dzalkind Jan 25, 2023
64393b6
Start DISCON_dict with schema defaults
dzalkind Jan 25, 2023
2a32582
Allow DEFAULT in read_DISCON
dzalkind Jan 25, 2023
45163f4
Set up baseline cases in example_19
dzalkind Feb 15, 2023
5fb9c6b
Set up sweep cases in run_FAST
dzalkind Feb 15, 2023
ac938e3
Fix bug in FAST_writer
dzalkind Feb 15, 2023
d0f529e
Rename example
dzalkind Mar 9, 2023
ed135d0
Merge remote-tracking branch 'origin/develop' into rotor_position_sim
dzalkind Mar 9, 2023
c082918
Complete merge, building
dzalkind Mar 9, 2023
f8edf21
Get openfast read/write from 3.4
dzalkind Mar 14, 2023
b50c279
Fix error message in dbl read
dzalkind Mar 14, 2023
49ebd4d
Update example number for output file
dzalkind Mar 14, 2023
03abde1
Change default DT_Out to 0
dzalkind Mar 14, 2023
e88714d
Remove raaw example parts
dzalkind Mar 14, 2023
24c81f4
Merge remote-tracking branch 'dz/awc' into raaw_rpc
dzalkind Mar 14, 2023
8c3364d
Merge remote-tracking branch 'origin/develop' into rotor_position_sim
dzalkind Jul 12, 2023
0d1868e
Update discons
dzalkind Jul 12, 2023
77d4135
Give new model, relative path for example
dzalkind Jul 12, 2023
f55a15a
Regen registry
dzalkind Jul 12, 2023
daf2475
Tidy up indices, example running
dzalkind Jul 12, 2023
5251f57
Remove old update_discons
dzalkind Jul 19, 2023
c6d5e29
Clean up print statements
dzalkind Jul 19, 2023
70d4e6d
Clean up rpc example
dzalkind Jul 19, 2023
68b8a74
Change name of rpc example
dzalkind Jul 19, 2023
480d963
Tidy up paths in RPC example
dzalkind Jul 19, 2023
9248e23
Fix original open loop set up
dzalkind Jul 19, 2023
21eb339
Fix OL file writing for Cable/StC
dzalkind Jul 19, 2023
33f1c8f
Fix OL indices again
dzalkind Jul 19, 2023
ebe0e2e
Merge remote-tracking branch 'origin/develop' into rotor_position_sim
dzalkind Jul 24, 2023
2f551d1
Remove duplicate PF_Mode
dzalkind Jul 24, 2023
486f97b
Regen registry files, discons
dzalkind Jul 24, 2023
576c135
Clean up cable control example
dzalkind Jul 24, 2023
dfc757a
Add RPC example to CI
dzalkind Jul 24, 2023
547c40d
Remove duplicate AWC inputs from registry
dzalkind Jul 24, 2023
8ec395c
Clean up open loop yaw control
dzalkind Jul 24, 2023
16842d2
Clean up AWC implementation again
dzalkind Jul 24, 2023
d6c207b
Regen registry
dzalkind Jul 24, 2023
db81431
Revert AWC controller
dzalkind Jul 24, 2023
6895d93
Allow defaults for DT_Out, LoggingLevel
dzalkind Jul 24, 2023
ffa94f1
Clean up run_FAST
dzalkind Jul 24, 2023
94152fe
Update input writer, inputs
dzalkind Jul 24, 2023
20cfdf8
Document API changes
dzalkind Jul 24, 2023
1be1d92
Fix relative Cp filepaths
dzalkind Jul 24, 2023
6c24d58
Move all CntrPar%* assignments to ReadControlParameterFileSub
dzalkind Jul 24, 2023
86ea490
Write dbg3 only at DT_Out
dzalkind Jul 24, 2023
0df0761
Tidy up examples
dzalkind Jul 24, 2023
b196cd9
Pass fst_vt from runFAST properly
dzalkind Jul 25, 2023
2a57622
Change AFAeroMod only in DLC 1.4 sims
dzalkind Jul 28, 2023
d1bc65d
Saturate lower limit of WSE initialization
dzalkind Jul 28, 2023
fcea64e
Give max() proper inputs
dzalkind Jul 28, 2023
0fd891c
Do a light clean up
dzalkind Jul 28, 2023
d3c41d4
Revert moordyn
dzalkind Jul 31, 2023
8515cd8
Remove duplicate import
dzalkind Jul 31, 2023
1d0e202
Clean up types
dzalkind Jul 31, 2023
ec9c367
Saturate values too large for fortran write format
dzalkind Jul 31, 2023
7d9a480
Fix example 25 output folder
dzalkind Jul 31, 2023
950b2da
Update docs to use python 3.9
dzalkind Jul 31, 2023
1fc4aad
Add Tf for derivative term of RPC
dzalkind Aug 3, 2023
3cf9ac9
Merge remote-tracking branch 'origin/develop' into rotor_position_sim
dzalkind Sep 11, 2023
764a938
Let user_hh inputs be different lengths
dzalkind Sep 11, 2023
4f58f5a
Use Fst Dens and KinVisc
dzalkind Sep 11, 2023
9151cba
Merge branch 'rpc_updates' into raaw
dzalkind Sep 11, 2023
232fdb2
Regen registry, DISCONs
dzalkind Sep 11, 2023
092e274
Merge branch 'rotor_position_sim' into raaw
dzalkind Sep 11, 2023
39fe84e
Control yaw in open loop with OL_Mode 2
dzalkind Sep 11, 2023
32e5689
Declare dummy partials in robust_scheduling
dzalkind Sep 6, 2023
0212e3e
Check for error/return after trying to read OL_Filename
dzalkind Oct 24, 2023
b6a0079
Merge remote-tracking branch 'origin/develop' into raaw
dzalkind Oct 24, 2023
0bc4218
Try python 3.11
dzalkind Oct 25, 2023
e364a26
Use python 3.11 throughout
dzalkind Oct 25, 2023
426b167
Debug robust_tuning
dzalkind Oct 25, 2023
c45d95a
Merge remote-tracking branch 'origin/raaw' into raaw
dzalkind Oct 25, 2023
591d927
Debug some more
dzalkind Oct 26, 2023
1068c90
Remove openmdao recorders
dzalkind Oct 26, 2023
a2547e3
Debug better
dzalkind Oct 26, 2023
e5696f3
Add more print statements
dzalkind Oct 26, 2023
d2366fa
Print more stuff
dzalkind Oct 26, 2023
09f3ded
Print in interp_matrix
dzalkind Oct 26, 2023
7302298
Fix matrix_3D
dzalkind Oct 26, 2023
d1b9c15
Use older python-toolbox
dzalkind Oct 26, 2023
4ac1f09
Revert debugging attempts
dzalkind Oct 26, 2023
bd46d08
Make output directory if it doesn't exist
dzalkind Oct 26, 2023
cc7805e
Add error catch when OL IPC is enabled but IPC not enabled in ServoDyn
dzalkind Oct 26, 2023
3fbc908
Enable all examples, print time to execute better
dzalkind Oct 26, 2023
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
1 change: 1 addition & 0 deletions Examples/11_robust_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def run_example():

# Path options
example_out_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'examples_out')
os.makedirs(example_out_dir,exist_ok=True)
output_name = '11_robust_scheduling'
path_options = {'output_dir': example_out_dir,
'output_name': output_name
Expand Down
2 changes: 1 addition & 1 deletion Examples/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def execute_script(fscript):
# Use runpy to execute examples
s = time()
runpy.run_path(os.path.realpath(fullpath), run_name='__main__')
print(time() - s, "seconds to run")
print(f"{fscript} took {time() - s} seconds to run")

class TestExamples(unittest.TestCase):

Expand Down
2 changes: 1 addition & 1 deletion ROSCO/src/Controllers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ SUBROUTINE YawRateControl(avrSWAP, CntrPar, LocalVar, objInst, zmqVar, DebugVar,

! If using open loop yaw rate control, overwrite controlled output
! Open loop yaw rate control - control input in rad/s
IF ((CntrPar%OL_Mode == 1) .AND. (CntrPar%Ind_YawRate > 0)) THEN
IF ((CntrPar%OL_Mode > 0) .AND. (CntrPar%Ind_YawRate > 0)) THEN
IF (LocalVar%Time >= CntrPar%OL_Breakpoints(1)) THEN
avrSWAP(48) = interp1d(CntrPar%OL_Breakpoints,CntrPar%OL_YawRate,LocalVar%Time, ErrVar)
ENDIF
Expand Down
10 changes: 9 additions & 1 deletion ROSCO/src/ReadSetParameters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,9 @@ SUBROUTINE ReadControlParameterFileSub(CntrPar, LocalVar, zmqVar, accINFILE, acc

CALL GetNewUnit(UnOpenLoop, ErrVar)
CALL Read_OL_Input(CntrPar%OL_Filename,UnOpenLoop,OL_Count,CntrPar%OL_Channels, ErrVar)
IF (ErrVar%aviFAIL < 0) THEN
RETURN
ENDIF

CntrPar%OL_Breakpoints = CntrPar%OL_Channels(:,CntrPar%Ind_Breakpoint)

Expand Down Expand Up @@ -1392,7 +1395,12 @@ SUBROUTINE CheckInputs(LocalVar, CntrPar, avrSWAP, ErrVar, size_avcMSG)
ErrVar%ErrMsg = 'Pitch angle actuator not requested.'
ENDIF

IF (NINT(avrSWAP(28)) == 0 .AND. ((CntrPar%IPC_ControlMode > 0) .OR. (CntrPar%Y_ControlMode > 1))) THEN
IF ((NINT(avrSWAP(28)) == 0) .AND. &
((CntrPar%IPC_ControlMode > 0) .OR. &
(CntrPar%Y_ControlMode > 1) .OR. &
(CntrPar%Ind_BldPitch(2) > 0) .OR. &
(CntrPar%Ind_BldPitch(3) > 0) &
)) THEN
ErrVar%aviFAIL = -1
ErrVar%ErrMsg = 'IPC enabled, but Ptch_Cntrl in ServoDyn has a value of 0. Set it to 1 for individual pitch control.'
ENDIF
Expand Down
21 changes: 13 additions & 8 deletions ROSCO_toolbox/ofTools/case_gen/CaseLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,21 +333,26 @@ def user_hh(**wind_case_opts):
'''
Uniform, hub-height wind file
Expected inputs:
TMax TODO: someday make all TMaxs TMax
wind_inputs (list of string wind inputs filenames)
TMax (float or array) of simulation TMax
wind_filenames (list of string wind inputs filenames)
'''

if 'TMax' in wind_case_opts:
TMax = wind_case_opts['TMax']
else:
TMax = 720
# Default is 720 for all cases
TMax = wind_case_opts.get('TMax', 720)

if 'wind_filenames' not in wind_case_opts:
raise Exception('Define wind_filenames when using turb_bts case generator')
raise Exception('Define wind_filenames when using user_hh case generator')

# Make into array
if not hasattr(TMax,'__len__'):
TMax = len(wind_case_opts['wind_filenames']) * [TMax]




# wind inflow
case_inputs = base_op_case()
case_inputs[("Fst","TMax")] = {'vals':[TMax], 'group':0}
case_inputs[("Fst","TMax")] = {'vals':TMax, 'group':1}
case_inputs[("InflowWind","WindType")] = {'vals':[2], 'group':0}
case_inputs[("InflowWind","Filename_Uni")] = {'vals':wind_case_opts['wind_filenames'], 'group':1}

Expand Down
Loading