Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Jan 3, 2025
2 parents 938e4f1 + 975ffac commit 718dc84
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Examples/28_tower_resonance.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def main():
# Ramp: good demo of functionality, short for CI
r.wind_case_fcn = cl.ramp
r.wind_case_opts = {
'U_start': 4, # from 10 to 15 m/s
'U_start': 0, # from 10 to 15 m/s
'U_end': 10,
't_start': 100,
't_end': 300
Expand Down
2 changes: 1 addition & 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 = "rosco"
version = "2.9.5"
version = "2.9.6"
description = "A reference open source controller toolset for wind turbine applications."
readme = "README.md"
requires-python = ">=3.9"
Expand Down
5 changes: 3 additions & 2 deletions rosco/controller/src/ControllerBlocks.f90
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,9 @@ SUBROUTINE WindSpeedEstimator(LocalVar, CntrPar, objInst, PerfData, DebugVar, Er
! Initialize recurring values
LocalVar%WE%om_r = WE_Inp_Speed
LocalVar%WE%v_t = 0.0
LocalVar%WE%v_m = max(LocalVar%WE_Vw, 3.0_DbKi) ! avoid divide by 0 below if WE_Vw is 0, which some AMRWind setups create
LocalVar%WE%v_h = max(LocalVar%WE_Vw, 3.0_DbKi) ! avoid divide by 0 below if WE_Vw is 0, which some AMRWind setups create
LocalVar%WE%v_m = max(LocalVar%HorWindV, 3.0_DbKi) ! avoid divide by 0 below if HorWindV is 0, which some AMRWind setups create
LocalVar%WE%v_h = max(LocalVar%HorWindV, 3.0_DbKi) ! avoid divide by 0 below if HorWindV is 0, which some AMRWind setups create
LocalVar%WE_Vw = LocalVar%WE%v_m + LocalVar%WE%v_t ! Initialize WE_Vw to aviod divide by zero
lambda = WE_Inp_Speed * CntrPar%WE_BladeRadius/LocalVar%WE%v_h
LocalVar%WE%xh = RESHAPE((/LocalVar%WE%om_r, LocalVar%WE%v_t, LocalVar%WE%v_m/),(/3,1/))
LocalVar%WE%P = RESHAPE((/0.01, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 1.0/),(/3,3/))
Expand Down
4 changes: 3 additions & 1 deletion rosco/controller/src/Functions.f90
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,14 @@ REAL(DbKi) FUNCTION AeroDynTorque(RotSpeed, BldPitch, LocalVar, CntrPar, PerfDat
REAL(DbKi) :: RotorArea
REAL(DbKi) :: Cp
REAL(DbKi) :: Lambda
REAL(DbKi) :: WindSpeed

CHARACTER(*), PARAMETER :: RoutineName = 'AeroDynTorque'

! Find Torque
RotorArea = PI*CntrPar%WE_BladeRadius**2
Lambda = RotSpeed*CntrPar%WE_BladeRadius/LocalVar%WE_Vw
WindSpeed = MAX(LocalVar%WE_Vw,EPSILON(1.0_DbKi))
Lambda = RotSpeed*CntrPar%WE_BladeRadius/WindSpeed

! Compute Cp
Cp = interp2d(PerfData%Beta_vec,PerfData%TSR_vec,PerfData%Cp_mat, BldPitch*R2D, Lambda, ErrVar)
Expand Down
4 changes: 2 additions & 2 deletions rosco/toolbox/inputs/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

schema_dir = os.path.dirname(os.path.abspath(__file__))

def load_rosco_yaml(finput):
def load_rosco_yaml(finput, rank_0=False):
rosco_schema = os.path.join(schema_dir,'toolbox_schema.yaml')
return _validate(finput, rosco_schema, defaults=True)
return _validate(finput, rosco_schema, defaults=True, rank_0=rank_0)


if __name__=='__main__':
Expand Down

0 comments on commit 718dc84

Please sign in to comment.