Skip to content

Commit

Permalink
Adding debug for yaw
Browse files Browse the repository at this point in the history
  • Loading branch information
ebranlard committed Sep 16, 2024
1 parent f08c4e8 commit 218491f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 7 deletions.
Binary file modified docs/OtherSupporting/OutListParameters.xlsx
Binary file not shown.
2 changes: 2 additions & 0 deletions modules/aerodyn/src/AeroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2993,6 +2993,7 @@ subroutine SetInputsForBEMT(p, p_AD, u, RotInflow, m, indx, errStat, errMsg)

! Get disk average values and orientations
call DiskAvgValues(p, u, RotInflow, m, x_hat_disk, y_hat_disk, z_hat_disk, Azimuth) ! also sets m%V_diskAvg, m%V_dot_x
m%psi_s = Azimuth

! Velocity in disk normal
m%BEMT_u(indx)%V0 = m%AvgDiskVelDist ! Note: used for SkewWake Cont
Expand Down Expand Up @@ -3079,6 +3080,7 @@ subroutine SetInputsForBEMT(p, p_AD, u, RotInflow, m, indx, errStat, errMsg)
if (p%AeroProjMod==APM_BEM_NoSweepPitchTwist .or. p%AeroProjMod==APM_LiftingLine) then

m%BEMT_u(indx)%psi_s = Azimuth
m%BEMT_u(indx)%psiSkewOffset = 0.0_ReKi
elseif (p%AeroProjMod==APM_BEM_Polar) then

do k=1,p%NumBlades
Expand Down
5 changes: 5 additions & 0 deletions modules/aerodyn/src/AeroDyn_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,11 @@ subroutine Calc_WriteOutput_BEMT()
! m%AllOuts( RtTSR ) = m%BEMT_u(indx)%TSR
m%AllOuts( DBEMTau1 ) = OtherState%BEMT%DBEMT%tau1

! Debug
m%AllOuts( zDebug1 ) = m%BEMT_u(indx)%psiSkewOffset*R2D
m%AllOuts( zDebug2 ) = m%psi_s(1)*R2D
m%AllOuts( zDebug3 ) = m%psi_s(2)*R2D
m%AllOuts( zDebug4 ) = m%psi_s(3)*R2D

end subroutine Calc_WriteOutput_BEMT

Expand Down
30 changes: 23 additions & 7 deletions modules/aerodyn/src/AeroDyn_IO_Params.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1574,8 +1574,21 @@ module AeroDyn_IO_Params
INTEGER(IntKi), PARAMETER :: TFMzi = 1520


! Debug:

INTEGER(IntKi), PARAMETER :: zDebug1 = 1521
INTEGER(IntKi), PARAMETER :: zDebug2 = 1522
INTEGER(IntKi), PARAMETER :: zDebug3 = 1523
INTEGER(IntKi), PARAMETER :: zDebug4 = 1524
INTEGER(IntKi), PARAMETER :: zDebug5 = 1525
INTEGER(IntKi), PARAMETER :: zDebug6 = 1526
INTEGER(IntKi), PARAMETER :: zDebug7 = 1527
INTEGER(IntKi), PARAMETER :: zDebug8 = 1528
INTEGER(IntKi), PARAMETER :: zDebug9 = 1529


! The maximum number of output channels which can be output by the code.
INTEGER(IntKi), PARAMETER :: MaxOutPts = 1520
INTEGER(IntKi), PARAMETER :: MaxOutPts = 1529

!End of code generated by Matlab script
! ===================================================================================================
Expand Down Expand Up @@ -1874,7 +1887,7 @@ module AeroDyn_IO_Params



CHARACTER(OutStrLenM1), PARAMETER :: ValidParamAry(1594) = (/ & ! This lists the names of the allowed parameters, which must be sorted alphabetically
CHARACTER(OutStrLenM1), PARAMETER :: ValidParamAry(1603) = (/ & ! This lists the names of the allowed parameters, which must be sorted alphabetically
"B1AEROFX ","B1AEROFXI","B1AEROFY ","B1AEROFYI","B1AEROFZ ","B1AEROFZI","B1AEROMX ","B1AEROMXI", &
"B1AEROMY ","B1AEROMYI","B1AEROMZ ","B1AEROMZI","B1AEROPWR","B1AZIMUTH","B1FLDFX ","B1FLDFXI ", &
"B1FLDFY ","B1FLDFYI ","B1FLDFZ ","B1FLDFZI ","B1FLDMX ","B1FLDMXI ","B1FLDMY ","B1FLDMYI ", &
Expand Down Expand Up @@ -2074,8 +2087,9 @@ module AeroDyn_IO_Params
"TWN8RE ","TWN8STVX ","TWN8STVY ","TWN8STVZ ","TWN8VREL ","TWN8VUNDX","TWN8VUNDY","TWN8VUNDZ", &
"TWN9DYNP ","TWN9FBX ","TWN9FBY ","TWN9FBZ ","TWN9FDX ","TWN9FDY ","TWN9M ","TWN9MBX ", &
"TWN9MBY ","TWN9MBZ ","TWN9RE ","TWN9STVX ","TWN9STVY ","TWN9STVZ ","TWN9VREL ","TWN9VUNDX", &
"TWN9VUNDY","TWN9VUNDZ"/)
INTEGER(IntKi), PARAMETER :: ParamIndxAry(1594) = (/ & ! This lists the index into AllOuts(:) of the allowed parameters ValidParamAry(:)
"TWN9VUNDY","TWN9VUNDZ","ZDEBUG1 ","ZDEBUG2 ","ZDEBUG3 ","ZDEBUG4 ","ZDEBUG5 ","ZDEBUG6 ", &
"ZDEBUG7 ","ZDEBUG8 ","ZDEBUG9 "/)
INTEGER(IntKi), PARAMETER :: ParamIndxAry(1603) = (/ & ! This lists the index into AllOuts(:) of the allowed parameters ValidParamAry(:)
B1AeroFx , B1AeroFxi , B1AeroFy , B1AeroFyi , B1AeroFz , B1AeroFzi , B1AeroMx , B1AeroMxi , &
B1AeroMy , B1AeroMyi , B1AeroMz , B1AeroMzi , B1AeroPwr , B1Azimuth , B1AeroFx , B1AeroFxi , &
B1AeroFy , B1AeroFyi , B1AeroFz , B1AeroFzi , B1AeroMx , B1AeroMxi , B1AeroMy , B1AeroMyi , &
Expand Down Expand Up @@ -2275,8 +2289,9 @@ module AeroDyn_IO_Params
TwN8Re , TwN8STVx , TwN8STVy , TwN8STVz , TwN8Vrel , TwN8VUndx , TwN8VUndy , TwN8VUndz , &
TwN9DynP , TwN9Fbx , TwN9Fby , TwN9Fbz , TwN9Fdx , TwN9Fdy , TwN9M , TwN9Mbx , &
TwN9Mby , TwN9Mbz , TwN9Re , TwN9STVx , TwN9STVy , TwN9STVz , TwN9Vrel , TwN9VUndx , &
TwN9VUndy , TwN9VUndz /)
CHARACTER(ChanLen), PARAMETER :: ParamUnitsAry(1594) = (/ character(ChanLen) :: & ! This lists the units corresponding to the allowed parameters
TwN9VUndy , TwN9VUndz , zDebug1 , zDebug2 , zDebug3 , zDebug4 , zDebug5 , zDebug6 , &
zDebug7 , zDebug8 , zDebug9 /)
CHARACTER(ChanLen), PARAMETER :: ParamUnitsAry(1603) = (/ character(ChanLen) :: & ! This lists the units corresponding to the allowed parameters
"(N) ","(N) ","(N) ","(N) ","(N) ","(N) ","(N-m) ","(N-m) ", &
"(N-m) ","(N-m) ","(N-m) ","(N-m) ","(W) ","(deg) ","(N) ","(N) ", &
"(N) ","(N) ","(N) ","(N) ","(N-m) ","(N-m) ","(N-m) ","(N-m) ", &
Expand Down Expand Up @@ -2476,7 +2491,8 @@ module AeroDyn_IO_Params
"(-) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ", &
"(Pa) ","(N/m) ","(N/m) ","(N/m) ","(N/m) ","(N/m) ","(-) ","(N-m/m)", &
"(N-m/m)","(N-m/m)","(-) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ","(m/s) ", &
"(m/s) ","(m/s) "/)
"(m/s) ","(m/s) "," "," "," "," "," "," ", &
" "," "," "/)


end module AeroDyn_IO_Params
1 change: 1 addition & 0 deletions modules/aerodyn/src/AeroDyn_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ typedef ^ RotMiscVarType MeshMapType T_P_2_T_L - - - "mapping data structure to
typedef ^ RotMiscVarType Logical FirstWarn_TowerStrike - - - "flag to avoid printing tower strike multiple times" -
typedef ^ RotMiscVarType ReKi AvgDiskVel {3} - - "disk-averaged U,V,W (undisturbed)" m/s
typedef ^ RotMiscVarType ReKi AvgDiskVelDist {3} - - "disk-averaged U,V,W (disturbed)" m/s
typedef ^ RotMiscVarType ReKi psi_s {3} - - "Skew Azimuth of blades" rad
# TailFin
typedef ^ RotMiscVarType ReKi TFinAlpha - - - "Angle of attack for tailfin"
typedef ^ RotMiscVarType ReKi TFinRe - - - "Reynolds number for tailfin"
Expand Down
4 changes: 4 additions & 0 deletions modules/aerodyn/src/AeroDyn_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ MODULE AeroDyn_Types
LOGICAL :: FirstWarn_TowerStrike = .false. !< flag to avoid printing tower strike multiple times [-]
REAL(ReKi) , DIMENSION(1:3) :: AvgDiskVel = 0.0_ReKi !< disk-averaged U,V,W (undisturbed) [m/s]
REAL(ReKi) , DIMENSION(1:3) :: AvgDiskVelDist = 0.0_ReKi !< disk-averaged U,V,W (disturbed) [m/s]
REAL(ReKi) , DIMENSION(1:3) :: psi_s = 0.0_ReKi !< Skew Azimuth of blades [rad]
REAL(ReKi) :: TFinAlpha = 0.0_ReKi !< Angle of attack for tailfin [-]
REAL(ReKi) :: TFinRe = 0.0_ReKi !< Reynolds number for tailfin [-]
REAL(ReKi) :: TFinVrel = 0.0_ReKi !< Orthogonal relative velocity nrom at the reference point [-]
Expand Down Expand Up @@ -3543,6 +3544,7 @@ subroutine AD_CopyRotMiscVarType(SrcRotMiscVarTypeData, DstRotMiscVarTypeData, C
DstRotMiscVarTypeData%FirstWarn_TowerStrike = SrcRotMiscVarTypeData%FirstWarn_TowerStrike
DstRotMiscVarTypeData%AvgDiskVel = SrcRotMiscVarTypeData%AvgDiskVel
DstRotMiscVarTypeData%AvgDiskVelDist = SrcRotMiscVarTypeData%AvgDiskVelDist
DstRotMiscVarTypeData%psi_s = SrcRotMiscVarTypeData%psi_s
DstRotMiscVarTypeData%TFinAlpha = SrcRotMiscVarTypeData%TFinAlpha
DstRotMiscVarTypeData%TFinRe = SrcRotMiscVarTypeData%TFinRe
DstRotMiscVarTypeData%TFinVrel = SrcRotMiscVarTypeData%TFinVrel
Expand Down Expand Up @@ -3843,6 +3845,7 @@ subroutine AD_PackRotMiscVarType(RF, Indata)
call RegPack(RF, InData%FirstWarn_TowerStrike)
call RegPack(RF, InData%AvgDiskVel)
call RegPack(RF, InData%AvgDiskVelDist)
call RegPack(RF, InData%psi_s)
call RegPack(RF, InData%TFinAlpha)
call RegPack(RF, InData%TFinRe)
call RegPack(RF, InData%TFinVrel)
Expand Down Expand Up @@ -3992,6 +3995,7 @@ subroutine AD_UnPackRotMiscVarType(RF, OutData)
call RegUnpack(RF, OutData%FirstWarn_TowerStrike); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%AvgDiskVel); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%AvgDiskVelDist); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%psi_s); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%TFinAlpha); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%TFinRe); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%TFinVrel); if (RegCheckErr(RF, RoutineName)) return
Expand Down

0 comments on commit 218491f

Please sign in to comment.