Skip to content

Commit

Permalink
FF: fix bug with Mod_AmbWind=3 -- hub point wasn't shifted.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andrew-platt committed Jun 23, 2023
1 parent 4d038af commit 64a5493
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/awae/src/AWAE.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 64a5493

Please sign in to comment.