From 64a54938af3cd4fe86234a8aa5c0af48c4f9f053 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 23 Jun 2023 16:18:29 -0600 Subject: [PATCH 1/2] FF: fix bug with Mod_AmbWind=3 -- hub point wasn't shifted. We added the hub point to AWAE at the center of the grid now that IfW calculates the disk average velocity every time IfW_CalcOutput gets called. But this point needs to be shifted by the turbine position so it is in the box. This will all change in 4.0.0 when we switch to pointers for all this and don't call IfW_CalcOutput directly anymore. --- modules/awae/src/AWAE.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/awae/src/AWAE.f90 b/modules/awae/src/AWAE.f90 index b640d50397..beecc09957 100644 --- a/modules/awae/src/AWAE.f90 +++ b/modules/awae/src/AWAE.f90 @@ -1455,7 +1455,7 @@ subroutine AWAE_UpdateStates( t, n, u, p, x, xd, z, OtherState, m, errStat, errM end do do n_hl=0, n_high_low ! Set the hub position and orientation to pass to IfW (IfW always calculates hub and disk avg vel) - m%u_IfW_High%HubPosition = (/ p%X0_high(nt) + 0.5*p%nX_high*p%dX_high(nt), p%Y0_high(nt) + 0.5*p%nY_high*p%dY_high(nt), p%Z0_high(nt) + 0.5*p%nZ_high*p%dZ_high(nt) /) + m%u_IfW_High%HubPosition = (/ p%X0_high(nt) + 0.5*p%nX_high*p%dX_high(nt), p%Y0_high(nt) + 0.5*p%nY_high*p%dY_high(nt), p%Z0_high(nt) + 0.5*p%nZ_high*p%dZ_high(nt) /) - p%WT_Position(:,nt) call Eye(m%u_IfW_High%HubOrientation,ErrStat2,ErrMsg2) call InflowWind_CalcOutput(t+p%dt_low+n_hl*p%DT_high, m%u_IfW_High, p%IfW(nt), x%IfW(nt), xd%IfW(nt), z%IfW(nt), OtherState%IfW(nt), m%y_IfW_High, m%IfW(nt), errStat2, errMsg2) call SetErrStat( ErrStat2, ErrMsg2, errStat, errMsg, RoutineName ) From 787bed6b897646729da8a3d3ca832719a05fbdb6 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 23 Jun 2023 17:04:04 -0600 Subject: [PATCH 2/2] IfW: fix routinename for InflowWind_GetHubValues --- modules/inflowwind/src/InflowWind_Subs.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/inflowwind/src/InflowWind_Subs.f90 b/modules/inflowwind/src/InflowWind_Subs.f90 index ed69082636..de910b24c8 100644 --- a/modules/inflowwind/src/InflowWind_Subs.f90 +++ b/modules/inflowwind/src/InflowWind_Subs.f90 @@ -1733,7 +1733,7 @@ SUBROUTINE InflowWind_GetHubValues( Time, InputData, p, x, xd, z, OtherStates, m IMPLICIT NONE - CHARACTER(*), PARAMETER :: RoutineName="InflowWind_GetSpatialAverage" + CHARACTER(*), PARAMETER :: RoutineName="InflowWind_GetHubValues" ! Inputs / Outputs