From 901e3b325a42dc7768c75846aa22bd908690e1d0 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 22 Nov 2024 15:12:36 -0700 Subject: [PATCH 1/2] Incorrect initial value for `BoxExceedAllowIdx` This was introduced in PR #2518. The result was that anytime the driver was used with OLAF, all points were allowed outside the box, not just the wake as intended. --- modules/aerodyn/src/AeroDyn_Inflow.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/aerodyn/src/AeroDyn_Inflow.f90 b/modules/aerodyn/src/AeroDyn_Inflow.f90 index c83971db0b..0418fa019b 100644 --- a/modules/aerodyn/src/AeroDyn_Inflow.f90 +++ b/modules/aerodyn/src/AeroDyn_Inflow.f90 @@ -347,7 +347,7 @@ subroutine ADI_InitInflowWind(Root, i_IW, u_AD, o_AD, IW, dt, InitOutData, errSt ! Box exceed allow for OLAF poitns if (allocated(o_AD%WakeLocationPoints)) then InitInData%BoxExceedAllowF = .true. - InitInData%BoxExceedAllowIdx = min(InitInData%BoxExceedAllowIdx, AD_BoxExceedPointsIdx(u_AD, o_AD)) + InitInData%BoxExceedAllowIdx = AD_BoxExceedPointsIdx(u_AD, o_AD) endif if (.not. i_IW%UseInputFile) then call NWTC_Library_Copyfileinfotype( i_IW%PassedFileData, InitInData%PassedFileData, MESH_NEWCOPY, errStat2, errMsg2 ); if (Failed()) return From 5bbddd98e934ad61fbd3900fcface1ec94841886 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 22 Nov 2024 15:18:31 -0700 Subject: [PATCH 2/2] Fix error in BoxExceedAllowIdx in glue code IfW defaults this to -1, so if OLAF is used it would simply pass -1 for the index rather than the correct location from the AD_BoxExceedPointsIdx routine. --- modules/openfast-library/src/FAST_Subs.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openfast-library/src/FAST_Subs.f90 b/modules/openfast-library/src/FAST_Subs.f90 index 7fc3954ec9..e23cfe2e04 100644 --- a/modules/openfast-library/src/FAST_Subs.f90 +++ b/modules/openfast-library/src/FAST_Subs.f90 @@ -578,7 +578,7 @@ SUBROUTINE FAST_InitializeAll( t_initial, p_FAST, y_FAST, m_FAST, ED, BD, SrvD, ! Wake -- we allow the wake positions to exceed the wind box if (allocated(AD%OtherSt(STATE_CURR)%WakeLocationPoints)) then Init%InData_IfW%BoxExceedAllowF = .true. - Init%InData_IfW%BoxExceedAllowIdx = min(Init%InData_IfW%BoxExceedAllowIdx, AD_BoxExceedPointsIdx(AD%Input(1), AD%OtherSt(STATE_CURR))) + Init%InData_IfW%BoxExceedAllowIdx = AD_BoxExceedPointsIdx(AD%Input(1), AD%OtherSt(STATE_CURR)) endif END IF