Skip to content

Commit

Permalink
Merge pull request #2581 from andrew-platt/b/OLAF_bounds
Browse files Browse the repository at this point in the history
OLAF out of bounds
  • Loading branch information
andrew-platt authored Dec 23, 2024
2 parents 40202bb + 355419c commit fafeb6e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/aerodyn/src/AeroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ subroutine AD_CalcWind_Rotor(t, u, FlowField, p, RotInflow, StartNode, ErrStat,

contains
logical function Failed()
call SetErrStat(errStat2, errMsg2, errStat, errMsg, 'AD_CalcWind')
call SetErrStat(errStat2, errMsg2, errStat, errMsg, 'AD_CalcWindRotor')
Failed = errStat >= AbortErrLev
end function Failed
end subroutine
Expand Down
4 changes: 4 additions & 0 deletions modules/aerodyn/src/AeroDyn_Inflow.f90
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ subroutine ADI_InitInflowWind(Root, i_IW, u_AD, o_AD, IW, dt, InitOutData, errSt
endif
InitInData%RootName = trim(Root)//'.IfW'
InitInData%MHK = i_IW%MHK
! OLAF might be used in AD, in which case we need to allow out of bounds for some calcs. To do that
! the average values for the entire wind profile must be calculated and stored (we don't know if OLAF
! is used until after AD_Init below).
InitInData%BoxExceedAllow = .true.
CALL InflowWind_Init( InitInData, IW%u, IW%p, &
IW%x, IW%xd, IW%z, IW%OtherSt, &
IW%y, IW%m, dt, InitOutData, errStat2, errMsg2 )
Expand Down
7 changes: 7 additions & 0 deletions modules/openfast-library/src/FAST_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,13 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, SED, BD, S
Init%InData_IfW%Use4Dext = .false.
END IF

! OLAF might be used in AD, in which case we need to allow out of bounds for some calcs. To do that
! the average values for the entire wind profile must be calculated and stored (we don't know if OLAF
! is used until after AD_Init below).
if (p_FAST%CompAero == Module_AD) then
Init%InData_IfW%BoxExceedAllow = .true.
endif

CALL InflowWind_Init( Init%InData_IfW, IfW%Input(1), IfW%p, IfW%x(STATE_CURR), IfW%xd(STATE_CURR), IfW%z(STATE_CURR), &
IfW%OtherSt(STATE_CURR), IfW%y, IfW%m, p_FAST%dt_module( MODULE_IfW ), Init%OutData_IfW, ErrStat2, ErrMsg2 )
CALL SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
Expand Down

0 comments on commit fafeb6e

Please sign in to comment.